/* ==========================================================================
   SUNCANA DESIGN SYSTEM v3.2
   Revised Emerald Theme â€” Primary #047857
   Mobile-first â€¢ Plus Jakarta Sans â€¢ Bootstrap 5 compatible
   ========================================================================== */

/* --------------------------------------------------------------------------
   Â§1 FONTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

/* --------------------------------------------------------------------------
   Â§2 DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* — Brand Palette (Primary #006E6D) —
       Rule:
       --brand-500 is the main color.
       Use --brand-600 for hover.
       Use --brand-700 for active/darker surfaces.
     */
    --brand-50: #e8f7f4;
    --brand-100: #d0f0e8;
    --brand-200: #AAE0D2; /* Soft Accent */
    --brand-300: #7acfc0;
    --brand-400: #40bda8;
    --brand-500: #006E6D; /* Primary */
    --brand-600: #005958; /* Primary Hover */
    --brand-700: #004544; /* Primary Darker/Active */
    --brand-800: #003130;
    --brand-900: #001c1c;
    --brand-950: #000c0c;

    --brand-gradient: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
    --brand-gradient-hover: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
    --brand-gradient-soft: linear-gradient(135deg, rgba(0, 110, 109, .12), rgba(0, 89, 88, .06));
    --brand-green-soft: var(--brand-50);
    --brand-light: var(--brand-500);

    /* — Accent (Warm Gold) — */
    --accent-400: #FBBB3F; /* Accent */
    --accent-500: #e29f27;
    --accent-600: #be7d1b;

    /* — Neutrals — */
    --text-50: #f8fafc;
    --text-100: #f1f5f9;
    --text-200: #e2e8f0;
    --text-300: #cbd5e1;
    --text-400: #94a3b8;
    --text-500: #64748b;
    --text-600: #475569;
    --text-700: #334155;
    --text-800: #1e293b;
    --text-900: #0f172a;

    /* — Surfaces — */
    --surface-bg: #f8faf9;
    --surface-1: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;

    /* — Borders — */
    --border-100: #f1f5f9;
    --border-200: #e2e8f0;
    --border-300: #cbd5e1;

    /* — Shadows — */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, .06);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .08);
    --shadow-xl: 0 20px 48px rgba(15, 23, 42, .12);
    --shadow-brand: 0 8px 22px rgba(0, 110, 109, .26);
    --shadow-brand-hover: 0 12px 28px rgba(0, 110, 109, .38);

    /* — Radii — */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-pill: 999px;

    /* — Typography — */
    --font-sans: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* — Motion — */
    --ease: cubic-bezier(.4, 0, .2, 1);
    --dur: 180ms;
    --dur-lg: 280ms;

    /* — Layout — */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --navbar-height: 60px;
    --footer-height: 48px;

    /* — Glass — */
    --glass-bg: rgba(255, 255, 255, .82);
    --glass-border: rgba(255, 255, 255, .35);
    --glass-blur: blur(20px);

    /* — Focus — */
    --focus-ring: 0 0 0 3px rgba(0, 110, 109, .24);

    /* --- New Color Palette Variables --- */
    --color-primary: #006E6D;
    --color-accent: #FBBB3F;
    --color-soft: #AAE0D2;

    --color-bg: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-text: #0F172A;
    --color-text-muted: #475569;
    --color-border: #E2E8F0;

    --color-danger: #DC2626;
    --color-success: #16A34A;
    --color-warning: #D97706;
    --color-info: #0284C7;

    /* --- Bootstrap 5 Global Theme Overrides --- */
    --bs-primary: #006E6D;
    --bs-primary-rgb: 0, 110, 109;
    --bs-primary-bg-subtle: #e8f7f4;
    --bs-primary-border-subtle: #d0f0e8;
    --bs-primary-text-emphasis: #004544;

    --bs-success: #16A34A;
    --bs-success-rgb: 22, 163, 74;
    --bs-success-bg-subtle: #dcfce7;
    --bs-success-border-subtle: #bbf7d0;
    --bs-success-text-emphasis: #15803d;

    --bs-warning: #D97706;
    --bs-warning-rgb: 217, 119, 6;
    --bs-warning-bg-subtle: #fef3c7;
    --bs-warning-border-subtle: #fde68a;
    --bs-warning-text-emphasis: #b45309;

    --bs-info: #0284C7;
    --bs-info-rgb: 2, 132, 199;
    --bs-info-bg-subtle: #e0f2fe;
    --bs-info-border-subtle: #bae6fd;
    --bs-info-text-emphasis: #0369a1;
}

/* --------------------------------------------------------------------------
   Â§3 RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* --- Global Custom Scrollbar (Auto-Hide Effect) --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 110, 109, 0.2);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 110, 109, 0.55);
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-700);
    background: var(--surface-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-800);
    letter-spacing: -.015em;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.15rem;
}

h4 {
    font-size: 1rem;
}

a {
    color: var(--brand-700);
    text-decoration: none;
}

a:hover {
    color: var(--brand-600);
}

img,
svg {
    vertical-align: middle;
    max-width: 100%;
}

::selection {
    background: var(--brand-100);
    color: var(--brand-900);
}

/* --------------------------------------------------------------------------
   Â§4 LAYOUT SHELL
   -------------------------------------------------------------------------- */

/* --- App Shell --- */
.app-shell {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--dur-lg) var(--ease);
}

.sidebar-collapsed .app-shell {
    margin-left: var(--sidebar-collapsed);
}

/* --- Navbar --- */
.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1042;
    height: var(--navbar-height);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    margin-left: var(--sidebar-width);
    transition: margin-left var(--dur-lg) var(--ease);
}

.sidebar-collapsed .app-navbar {
    margin-left: var(--sidebar-collapsed);
}

.app-navbar .container-fluid {
    display: flex;
    align-items: center;
    gap: .75rem;
    height: 100%;
    padding: 0 1.25rem;
}

.app-navbar .navbar-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1 1 auto;
    min-width: 0;
}

.sidebar-toggle-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-200);
    border-radius: var(--radius-sm);
    background: var(--surface-1);
    color: var(--text-600);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: var(--brand-50);
    border-color: var(--brand-200);
    color: var(--brand-700);
}

.navbar-route-info {
    min-width: 0;
}

.navbar-route-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.navbar-route-title-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

/* Year Trigger */
.navbar-year-trigger {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .75rem;
    border: 1px solid var(--border-200);
    border-radius: var(--radius-sm);
    background: var(--surface-1);
    color: var(--text-700);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    text-decoration: none;
}

.navbar-year-trigger:hover {
    border-color: var(--brand-200);
    color: var(--brand-700);
    background: var(--brand-50);
}

.navbar-year-trigger .year-value {
    font-weight: 700;
    color: var(--brand-700);
}

.navbar-year-trigger .year-icon {
    font-size: .85rem;
    color: var(--brand-600);
}

/* Navbar year form (legacy) */
.navbar-year-form {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.navbar-year-form .year-submit-icon {
    display: none;
}

.year-option {
    padding: .55rem .85rem;
    border: 1px solid var(--border-200);
    border-radius: var(--radius-md);
    background: var(--surface-1);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

.year-option:hover {
    border-color: var(--brand-300);
    background: var(--brand-50);
}

.year-option.active {
    border-color: var(--brand-500);
    background: var(--brand-50);
    color: var(--brand-700);
}

.year-check {
    color: var(--brand-500);
}

/* User Chip */
.navbar-user-chip {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .3rem .45rem .3rem .75rem;
    border: 1px solid var(--border-200);
    border-radius: var(--radius-pill);
    background: var(--surface-1);
    color: var(--text-700);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--dur) var(--ease);
}

.navbar-user-chip:hover {
    border-color: var(--brand-200);
    background: var(--brand-50);
}

.navbar-user-chip__copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.navbar-user-chip__name {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-800);
}

.navbar-user-chip__role {
    font-size: .65rem;
    color: var(--text-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.navbar-user-chip__avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--brand-gradient);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navbar-user-chip.dropdown-toggle::after {
    margin-left: 0;
}

/* User Dropdown */
.navbar-user-dropdown {
    border: 1px solid var(--border-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: .5rem;
    min-width: 220px;
    background: var(--surface-1);
}

.navbar-user-dropdown .dropdown-item {
    padding: .55rem .85rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-700);
    transition: all var(--dur) var(--ease);
}

.navbar-user-dropdown .dropdown-item:hover {
    background: var(--brand-50);
    color: var(--brand-700);
}

.navbar-user-dropdown .dropdown-item i {
    width: 1.25rem;
}

/* Navbar search/breadcrumb */
.navbar-search {
    display: none;
}

.user-menu {
    z-index: 2000;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #006E6D 0%, #004544 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width var(--dur-lg) var(--ease), transform var(--dur-lg) var(--ease);
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15) !important;
}

.sidebar-inner {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    overscroll-behavior: contain;
}

.sidebar-inner::-webkit-scrollbar {
    display: none;
}

/*
 * .navbar-sidebar-shell: brand logo + pin button.
 * Lives inside <nav class="navbar app-navbar"> in navbar.blade.php.
 * On desktop (d-lg-flex), Bootstrap shows it as flex.
 * We use position:fixed to pull it OUT of the navbar's stacking context.
 * The navbar has no backdrop-filter (removed), so position:fixed works.
 * z-index 1043 = above navbar (1042) so it's always on top.
 */
.navbar-sidebar-shell {
    width: var(--sidebar-width);
    height: var(--navbar-height);
    padding: 0 .75rem;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: width var(--dur-lg) var(--ease);
}

.sidebar-collapsed .navbar-sidebar-shell {
    width: var(--sidebar-collapsed);
}

.navbar-sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
    color: #ffffff !important;
    text-decoration: none;
}

.navbar-sidebar-brand:hover {
    color: #fabc2a !important;
}

.navbar-sidebar-brand .brand-icon-img {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navbar-sidebar-brand .brand-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.navbar-sidebar-brand__text {
    font-size: 0.95rem !important;
    font-weight: 800;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
}

.sidebar-pin-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: .82rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--dur) var(--ease);
}

.sidebar-pin-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}


.sidebar-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.sidebar-brand-name {
    font-size: .88rem;
    font-weight: 800;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-brand-sub {
    font-size: .62rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5) !important;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Sidebar Mobile Header */
.sidebar-mobile-header {
    display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: .75rem .5rem !important;
    flex: 1;
}

.sidebar-group {
    margin-bottom: .5rem !important;
}

.sidebar-group-label {
    display: block;
    padding: 0.75rem .75rem .25rem !important; /* Slimmer spacing above/below group headers */
    font-size: .68rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--brand-200) !important;
}

/* Sidebar Links */
.sidebar .nav-link,
.sidebar-link {
    display: flex;
    align-items: center;
    width: 100%;
    gap: .65rem;
    padding: .35rem .6rem; /* Slimmer padding vertikal & horizontal */
    margin: 2px 0; /* Slimmer margin antar menu */
    border-radius: 10px !important; /* Premium rounded rect corner from screenshot */
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    min-height: 32px; /* Slimmer min-height */
}

.sidebar .nav-link:hover,
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    transform: translateX(4px);
}

.sidebar .nav-link.active:not(.sidebar-link--toggle),
.sidebar-link.active:not(.sidebar-link--toggle) {
    background: #FBBB3F !important; /* Accent background for active leaf items */
    color: #00382f !important; /* Dark text for contrast */
    box-shadow: 0 4px 18px rgba(251, 187, 63, 0.28) !important;
}

/* Active style for toggles (parent menus whose children are active) */
.sidebar-link--toggle.active {
    background: rgba(255, 255, 255, 0.08) !important; /* Subtle highlight instead of full gold */
    color: #ffffff !important; /* White text for contrast */
}

.sidebar-link--toggle.active .sidebar-link__icon {
    color: #FBBB3F !important; /* Highlighted accent icon */
}

/* Ensure active menu doesn't lose its background color on hover */
.sidebar .nav-link.active:not(.sidebar-link--toggle):hover,
.sidebar-link.active:not(.sidebar-link--toggle):hover {
    background: #e29f27 !important; /* Accent Hover */
    color: #00382f !important;
    transform: translateX(4px);
}

.sidebar-link--toggle.active:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    transform: translateX(4px);
}

.sidebar .nav-link.active:not(.sidebar-link--toggle) .sidebar-link__icon,
.sidebar-link.active:not(.sidebar-link--toggle) .sidebar-link__icon {
    background: transparent !important;
    color: #00382f !important;
}

.sidebar-link__icon {
    width: auto !important;
    height: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    background: transparent !important; /* Transparent like screenshot */
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1.1rem !important; /* Large beautiful outline icon */
    flex-shrink: 0;
    transition: all var(--dur) var(--ease);
    margin-right: 0.15rem;
}

.sidebar-link__copy {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.sidebar-link__label {
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Chevron (toggle) */
.sidebar-link__chevron {
    font-size: .7rem;
    color: rgba(255, 255, 255, 0.5) !important;
    transition: transform var(--dur) var(--ease);
    flex-shrink: 0;
}

.sidebar-link--toggle:not(.collapsed) .sidebar-link__chevron {
    transform: rotate(90deg);
}

.sidebar-link--toggle.active .sidebar-link__chevron {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Sidebar Submenu */
.sidebar-submenu__inner {
    padding: .15rem 0 .15rem .65rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1) !important;
    margin-left: 1.65rem;
}

.sidebar-link--child {
    padding: .25rem .65rem; /* Slimmer padding for submenu child links */
    min-height: 28px; /* Slimmer min-height for children */
    font-size: .8rem;
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-link--child .sidebar-link__icon {
    width: 1.6rem;
    height: 1.6rem;
    font-size: .75rem;
    border-radius: 6px;
}

/* --- Sidebar Collapsed State --- */
.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

/* Collapsed brand header: hide logo, show only pin button centered */
.sidebar-collapsed .navbar-sidebar-shell {
    width: var(--sidebar-collapsed);
    justify-content: center;
    padding: .35rem;
}

/* Hide only brand text when collapsed and center the brand */
.sidebar-collapsed .navbar-sidebar-brand__text {
    display: none;
}
.sidebar-collapsed .navbar-sidebar-shell {
    justify-content: center;
    padding-left: 0;
}
.sidebar-collapsed .navbar-sidebar-brand {
    margin: 0;
}

/* Hide text labels when collapsed */
.sidebar-collapsed .sidebar-link__copy,
.sidebar-collapsed .sidebar-group-label {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    position: absolute;
}

/* Center icons when collapsed */
.sidebar-collapsed .sidebar .nav-link,
.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: .55rem;
}

.sidebar-collapsed .sidebar-link__icon {
    margin: 0;
    flex-shrink: 0;
}

/* Hide submenu chevron */
.sidebar-collapsed .sidebar-link__chevron {
    display: none;
}

/* Collapse submenu when sidebar collapses */
.sidebar-collapsed .sidebar-submenu__inner {
    display: none;
}

/* Hide sidebar group dividers */
.sidebar-collapsed .sidebar-group {
    padding: .25rem .35rem;
}

/* Hide sidebar footer when collapsed */
.sidebar-collapsed .sidebar-footer {
    display: none !important;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1039;
    background: rgba(0, 110, 109, .45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-lg) var(--ease), visibility var(--dur-lg) var(--ease);
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: 1.25rem;
    max-width: 100%;
}

/* --- Footer --- */
.footer {
    background: transparent;
    border-top: none;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.footer-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 1.25rem;
    gap: 1.5rem;
}

.footer-copy {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    color: var(--text-500);
    font-weight: 500;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-meta__item {
    font-size: .72rem;
    color: var(--text-400);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

/* --------------------------------------------------------------------------
   Â§5 PAGE LAYOUT COMPONENTS
   -------------------------------------------------------------------------- */

/* --- Page Strip (Breadcrumbs) --- */
.app-page-strip {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xs);
}

.app-page-strip .card-body {
    padding: .5rem 1rem;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    font-size: .8rem;
    font-weight: 600;
    background: transparent;
}

.breadcrumb-item {
    color: var(--text-500);
}

.breadcrumb-item a {
    color: var(--brand-600);
    font-weight: 600;
}

.breadcrumb-item a:hover {
    color: var(--brand-700);
}

.breadcrumb-item.active {
    color: var(--text-700);
    font-weight: 700;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--text-300);
}

/* --- Page Header --- */
.page-header-shell {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.page-header-shell__title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-800);
    margin: 0;
    letter-spacing: -.02em;
}

.page-header-shell__description {
    font-size: .85rem;
    color: var(--text-500);
    margin: .2rem 0 0;
    max-width: 48rem;
}

.page-header-shell__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Â§6 COMPONENTS
   -------------------------------------------------------------------------- */

/* --- Cards --- */
.card {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--dur) var(--ease);
}

.card-header {
    padding: 1rem 1.25rem;
    background: transparent;
    border-bottom: 1px solid var(--border-100);
    font-weight: 700;
    color: var(--text-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: .85rem 1.25rem;
    background: var(--surface-2);
    border-top: 1px solid var(--border-100);
}

/* Table Card Shell */
.table-card-shell {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

/* KPI Card */
.kpi-card-simple {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.kpi-card-simple .card-body {
    padding: 1rem;
}

/* Premium cards */
.card-premium {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-200);
}

.card-dashboard {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-xs);
}

.card-stat {
    background: var(--brand-gradient-soft);
    border: 1px solid rgba(11, 106, 69, .16);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.card-stat .type-title {
    font-weight: 600;
    font-size: .85rem;
}

.card-stat .type-meta {
    font-size: .78rem;
    color: var(--text-500);
}

.card-stat .progress {
    height: 6px;
    background: rgba(15, 23, 42, .06);
    border-radius: 10px;
    overflow: hidden;
}

.card-stat .progress-bar {
    background: linear-gradient(90deg, #0f766e, #16a34a);
    border-radius: 10px;
}

/* --- Tables --- */
.table {
    font-size: .88rem;
    color: var(--text-700);
    margin-bottom: 0;
}

.table thead th {
    background: var(--surface-2);
    color: var(--text-600);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border-200);
    border-top: none;
    white-space: nowrap;
}

.table tbody td {
    padding: .7rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-100);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-hover tbody tr:hover td {
    background: rgba(11, 106, 69, .045);
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Table Shell (reusable wrapper) */
.table-shell {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.table-shell>.table {
    margin-bottom: 0;
}

/* --- Forms & Inputs --- */
.form-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-700);
    margin-bottom: .4rem;
}

.form-control,
.form-select {
    padding: .6rem .85rem;
    border: 1px solid var(--border-200);
    border-radius: var(--radius-md);
    background: var(--surface-1);
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-700);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.form-control:focus,
.form-select:focus {
    background: var(--surface-1);
    border-color: var(--brand-400);
    box-shadow: var(--focus-ring);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-400);
}

.form-control.is-invalid {
    border-color: #dc2626;
}

.input-group-text {
    background: var(--surface-3);
    border: 1px solid var(--border-200);
    color: var(--text-500);
    font-size: .85rem;
}

.form-check-input:checked {
    background-color: var(--brand-500);
    border-color: var(--brand-500);
}

.form-check-input:focus {
    box-shadow: var(--focus-ring);
}

.invalid-feedback {
    font-size: .8rem;
    font-weight: 500;
}

.form-text {
    font-size: .78rem;
    color: var(--text-500);
}

/* --- Buttons --- */
.btn {
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: .5rem 1rem;
    font-size: .88rem;
    transition: all var(--dur) var(--ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}

.btn-primary {
    background: var(--brand-gradient);
    border: none;
    color: #fff;
    box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
    box-shadow: 0 10px 24px rgba(11, 106, 69, .30);
    transform: translateY(-1px);
    background: var(--brand-gradient-hover);
}

.btn-outline-primary {
    border-color: var(--brand-600);
    color: var(--brand-700);
}

.btn-outline-primary:hover {
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #42a373 0%, #085437 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(11, 106, 69, .15);
}

.btn-success:hover {
    background: linear-gradient(135deg, #085437 0%, #06452e 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(11, 106, 69, .30);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, .15);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(239, 68, 68, .30);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, .15);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--accent-600) 0%, #b45309 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(245, 158, 11, .30);
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--text-500) 0%, var(--text-600) 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, .15);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--text-600) 0%, var(--text-700) 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(100, 116, 139, .30);
    transform: translateY(-1px);
}

.btn-dark {
    background: linear-gradient(135deg, var(--text-800) 0%, var(--text-900) 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .15);
}

.btn-dark:hover {
    background: linear-gradient(135deg, var(--text-900) 0%, #000000 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .30);
    transform: translateY(-1px);
}

.btn-sm {
    padding: .35rem .65rem;
    font-size: .8rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* --- CRUD & Action Button Icon Standardization --- */

/* Menyeragamkan ukuran icon Lucide/SVG di dalam tombol aksi (CRUD) */
.btn svg,
.btn-sm svg,
.btn-lg svg {
    vertical-align: middle;
    flex-shrink: 0;
}

/* Tombol kecil (btn-sm) seperti tombol CRUD di tabel menggunakan icon 16px */
.btn-sm svg {
    width: 16px !important;
    height: 16px !important;
}

/* Tombol standar/normal menggunakan icon 18px */
.btn:not(.btn-sm):not(.btn-lg) svg {
    width: 18px !important;
    height: 18px !important;
}

/* Tombol besar (btn-lg) menggunakan icon 20px */
.btn-lg svg {
    width: 20px !important;
    height: 20px !important;
}

/* Menyeragamkan ukuran icon Lucide/SVG di dalam dropdown item menu aksi */
.dropdown-item svg {
    width: 16px !important;
    height: 16px !important;
    vertical-align: middle;
    flex-shrink: 0;
}

/* --- Badges --- */
.badge {
    padding: .35em .7em;
    font-weight: 700;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    letter-spacing: .02em;
    border: 1px solid transparent;
}

.badge.bg-primary {
    background: rgba(15, 118, 110, .1) !important;
    color: var(--brand-700) !important;
    border-color: rgba(15, 118, 110, .2);
}

.badge.bg-success {
    background: rgba(22, 163, 74, .1) !important;
    color: #16a34a !important;
    border-color: rgba(22, 163, 74, .2);
}

.badge.bg-warning {
    background: rgba(245, 158, 11, .1) !important;
    color: #d97706 !important;
    border-color: rgba(245, 158, 11, .2);
}

.badge.bg-danger {
    background: rgba(220, 38, 38, .1) !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, .2);
}

.badge.bg-info {
    background: rgba(2, 132, 199, .1) !important;
    color: #0284c7 !important;
    border-color: rgba(2, 132, 199, .2);
}

.badge.bg-secondary {
    background: rgba(100, 116, 139, .1) !important;
    color: #475569 !important;
    border-color: rgba(100, 116, 139, .2);
}

/* Status Badge Component */
.status-badge {
    font-weight: 700;
    text-transform: capitalize;
}

/* --- Alerts --- */
.alert {
    border: 1px solid rgba(15, 23, 42, .05);
    border-left: 4px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: .85rem 1.15rem;
    font-size: .88rem;
}

.alert-primary {
    background: rgba(11, 106, 69, .045);
    border-left-color: var(--brand-500);
    color: var(--brand-700);
}

.alert-success {
    background: rgba(11, 106, 69, .045);
    border-left-color: var(--brand-500);
    color: var(--brand-700);
}

.alert-warning {
    background: rgba(212, 154, 19, .045);
    border-left-color: var(--accent-500);
    color: var(--accent-600);
}

.alert-danger {
    background: rgba(220, 38, 38, .04);
    border-left-color: #dc2626;
    color: #b91c1c;
}

.alert-info {
    background: rgba(11, 106, 69, .045);
    border-left-color: var(--brand-500);
    color: var(--brand-700);
}

/* --- Modals --- */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-100);
    padding: 1.15rem 1.35rem;
}

.modal-header .btn-close {
    background-color: rgba(15, 23, 42, .04);
    border-radius: 50%;
    padding: .5em;
}

.modal-title {
    font-weight: 700;
    color: var(--text-800);
    letter-spacing: -.01em;
}

.modal-body {
    padding: 1.35rem;
    font-size: .9rem;
}

.modal-body .form-label {
    font-weight: 600;
    color: var(--text-700);
    margin-bottom: .45rem;
    font-size: .88rem;
}

.modal-body .form-text {
    font-size: .78rem;
    color: var(--text-500);
}

.modal-footer {
    border-top: 1px solid var(--border-100);
    background: var(--surface-2);
    padding: 1rem 1.35rem;
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
}

.modal-footer>* {
    margin: 0 !important;
}

/* Detail Modal */
.detail-modal-shell .modal-body .table td,
.detail-modal-shell .modal-body .table th {
    padding: .55rem .75rem;
    font-size: .85rem;
}

/* Modal Panel */
.modal-panel,
.modal-body .border.rounded.p-3 {
    background: var(--surface-2) !important;
    border: 1px solid var(--border-200) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.15rem !important;
}

/* --- Pagination --- */
.pagination {
    gap: .2rem;
    margin: 0;
}

.page-link {
    border: 1px solid var(--border-200);
    border-radius: var(--radius-sm) !important;
    color: var(--text-600);
    font-size: .82rem;
    font-weight: 600;
    padding: .4rem .7rem;
    transition: all var(--dur) var(--ease);
}

.page-link:hover {
    background: var(--brand-50);
    border-color: var(--brand-200);
    color: var(--brand-700);
}

.page-item.active .page-link {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, .2);
}

/* --- Tabs --- */
.nav-tabs {
    border-bottom-color: var(--border-200);
}

.nav-tabs .nav-link {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-weight: 600;
    color: var(--text-500);
    font-size: .85rem;
    padding: .6rem 1rem;
    transition: color var(--dur) var(--ease);
}

.nav-tabs .nav-link.active {
    color: var(--brand-700);
    border-color: var(--border-200) var(--border-200) var(--surface-1);
    font-weight: 700;
}

/* --- Empty State --- */
.empty-state-shell {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-500);
}

.empty-state-shell i {
    font-size: 2.5rem;
    color: var(--text-300);
    margin-bottom: .75rem;
    display: block;
}

.empty-state-shell p {
    font-size: .88rem;
    font-weight: 500;
    max-width: 28rem;
    margin: 0 auto;
}

/* --- Search Toolbar --- */
.search-toolbar-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.search-toolbar-shell .input-group {
    max-width: 320px;
}

/* --- Flash Messages --- */
.flash-wrapper {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: grid;
    gap: .5rem;
    max-width: 380px;
}

/* --- Year Picker Modal --- */
#yearPickerModal .modal-body {
    padding: 1.25rem;
}

#yearPickerModal .year-option {
    cursor: pointer;
}


/* --------------------------------------------------------------------------
   Â§8 DASHBOARD
   -------------------------------------------------------------------------- */

/* Admin Dashboard */
.dashboard-wrapper {
    font-family: var(--font-sans);
    background-color: var(--surface-bg);
    min-height: 100vh;
}

.dashboard-header-banner {
    background: var(--brand-gradient);
    border-radius: var(--radius-xl);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.dashboard-header-banner::after {
    content: '';
    position: absolute;
    inset: auto -60px -80px auto;
    width: 200px;
    height: 200px;
    border-radius: 40px;
    transform: rotate(18deg);
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.dashboard-header-banner h1 {
    font-size: 1.65rem;
    color: #fff;
    margin: 0 0 .35rem;
}

.badge-date {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .75rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .9);
    font-size: .78rem;
    font-weight: 700;
}

/* KPI */
.icon-stat-circle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

/* Shortcuts */
.header-indicator {
    width: 4px;
    height: 18px;
    border-radius: 10px;
}

.shortcut-item {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-md);
    padding: .75rem;
    transition: all var(--dur) var(--ease);
}

.shortcut-item:hover {
    background: var(--brand-50);
    border-color: var(--brand-200);
    box-shadow: var(--shadow-sm);
}

.shortcut-item:hover .shortcut-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.shortcut-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
}

.info-icon-square {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Â§10 UTILITY CLASSES
   -------------------------------------------------------------------------- */
.fw-800 {
    font-weight: 800;
}

.text-brand {
    color: var(--brand-600);
}

.text-brand-dark {
    color: var(--brand-700);
}

.bg-brand {
    background-color: var(--brand-600);
}

.bg-brand-dark {
    background-color: var(--brand-700);
}

.bg-brand-gradient {
    background: var(--brand-gradient);
}

.bg-soft-brand {
    background-color: var(--brand-green-soft);
}

.border-light-gray {
    border-color: var(--border-100) !important;
}

.text-muted-dark {
    color: var(--text-600) !important;
}

.x-small {
    font-size: .65rem;
}

.ls-1 {
    letter-spacing: .05em;
}

.transition-all {
    transition: all .2s ease-in-out;
}

.bg-soft-emerald {
    background: rgba(11, 106, 69, .12);
}

.text-emerald {
    color: var(--brand-700);
}

.bg-soft-amber {
    background: rgba(212, 154, 19, .1);
}

.text-amber {
    color: #d97706;
}

.bg-soft-teal {
    background: rgba(20, 184, 166, .1);
}

.text-teal {
    color: #0d9488;
}

.bg-white-opacity-10 {
    background: rgba(255, 255, 255, .1);
}

.text-emerald-light {
    color: var(--brand-500);
}

.bg-light-subtle {
    background: rgba(11, 106, 69, .08) !important;
}

.hover-bg-light:hover {
    background: var(--surface-2);
}

.loc-marker {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.letter-spacing-1 {
    letter-spacing: .05em;
}

.info-bg-shape {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, .05) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.btn-view-all {
    font-size: .75rem;
    text-decoration: none;
    transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn-view-all:hover {
    color: var(--brand-700) !important;
    transform: translateX(3px);
}

/* Menu Access Accordion */
.access-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.access-accordion .accordion-item {
    background: var(--surface-1);
    border: 1px solid var(--border-100);
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.access-accordion .accordion-item:hover {
    box-shadow: var(--shadow-md);
}

.access-accordion .accordion-button {
    padding: 1.15rem 1.35rem;
    background: transparent;
    font-weight: 700;
    color: var(--text-700);
    box-shadow: none !important;
}

.access-accordion .accordion-button:not(.collapsed) {
    background: rgba(11, 106, 69, .08);
    color: var(--brand-600);
    border-bottom: 1px solid var(--border-100);
}

.access-table-col-alt {
    background: rgba(15, 23, 42, .02) !important;
}

.access-form-switch .form-check-input {
    width: 2.8em;
    height: 1.4em;
    cursor: pointer;
}

.access-form-switch .form-check-input:checked {
    background-color: var(--brand-500);
    border-color: var(--brand-500);
}

/* Data Request Recap */
.table-shell.table-responsive.data-request-recap-shell {
    overflow-x: auto;
    overflow-y: visible;
}

.data-request-recap-table {
    min-width: 880px;
    table-layout: fixed;
}

.data-request-recap-table__number {
    width: 48px;
}

.data-request-recap-table__satker {
    width: 28%;
}

.data-request-recap-table__status {
    width: 132px;
}

.data-request-recap-table__filling {
    width: 140px;
}

.data-request-recap-table__actions {
    width: 172px;
}

.data-request-recap-table .recap-action-cell {
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--surface-1);
    box-shadow: -12px 0 18px rgba(15, 23, 42, .06);
    white-space: nowrap;
}

.data-request-recap-table thead .recap-action-cell {
    z-index: 3;
    background: var(--surface-2);
}

.data-request-recap-table.table-hover tbody tr:hover .recap-action-cell {
    background: #fbfefd;
}

.recap-action-list {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .25rem;
}

/* Maintenance Page */
.maintenance-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-bg);
}


/* ==========================================================================
   Â§15 RESPONSIVE â€” Consolidated Mobile-First
   Single block, no conflicts, no overrides needed
   ========================================================================== */

/* --- Tablet (â‰¤992px) --- */
@media (max-width: 991.98px) {

    /* Layout */
    .app-shell {
        margin-left: 0 !important;
    }

    .app-navbar {
        margin-left: 0 !important;
    }

    /* navbar-sidebar-shell is position:fixed â€” hide it on mobile */
    .navbar-sidebar-shell {
        display: none !important;
    }

    .sidebar {
        width: min(280px, 85vw);
        top: 0;
        padding-top: 0;
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 1050;
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(4, 50, 34, .22);
    }

    .sidebar-mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: .75rem .85rem;
        border-bottom: 1px solid rgba(11, 106, 69, .12);
        background: rgba(255, 255, 255, .96);
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 10;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .sidebar-mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: .6rem;
        color: var(--brand-700);
        font-weight: 800;
        font-size: .92rem;
        text-decoration: none;
    }

    .sidebar-mobile-brand img {
        border-radius: 8px;
    }

    .sidebar-mobile-close {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(11, 106, 69, .14);
        border-radius: 10px;
        background: rgba(255, 255, 255, .8);
        color: var(--text-700);
        font-size: 1rem;
        cursor: pointer;
        transition: all var(--dur) var(--ease);
    }

    .sidebar-mobile-close:hover {
        background: rgba(239, 68, 68, .1);
        color: #ef4444;
        border-color: rgba(239, 68, 68, .25);
    }

    body.sidebar-open {
        overflow: hidden;
        touch-action: none;
    }

    /* Sidebar touch targets */
    .sidebar .nav-link {
        min-height: 44px;
        padding: .55rem .75rem;
    }

    /* Navbar: single-row */
    .app-navbar {
        height: auto;
        padding: .5rem 0;
        margin-left: 0 !important;
    }

    .app-navbar .container-fluid {
        flex-wrap: nowrap;
        gap: .5rem;
        height: auto;
        padding: 0 .75rem;
    }

    .app-navbar .navbar-left {
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
        gap: .5rem;
    }

    .navbar-actions {
        width: auto;
        flex-wrap: nowrap;
        flex-shrink: 0;
        margin-left: auto;
        justify-content: flex-end;
        gap: .4rem;
    }

    .navbar-year-trigger {
        padding: .32rem .55rem;
        font-size: .78rem;
        border-radius: 10px;
    }

    .navbar-year-trigger .year-value {
        font-size: .78rem;
    }

    .navbar-user-chip {
        padding: .28rem;
        border-radius: var(--radius-md);
    }

    .navbar-user-chip__copy {
        display: none;
    }

    .navbar-user-chip__avatar {
        width: 30px;
        height: 30px;
        font-size: .78rem;
        border-radius: 10px;
    }

    .navbar-user-chip.dropdown-toggle::after {
        display: none;
    }

    .navbar-user-dropdown {
        min-width: 200px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    /* Disable hover lift on touch */
    .card:hover {
        transform: none !important;
    }

    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
        transform: none !important;
    }

    /* Prevent horizontal overflow */
    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    * {
        -webkit-tap-highlight-color: transparent;
    }

}

/* --- Small Tablet (â‰¤768px) --- */
@media (max-width: 767.98px) {

    .main-content {
        padding: .75rem .65rem;
    }

    /* Cards */
    .card,
    .table-card-shell,
    .app-page-strip {
        border-radius: var(--radius-lg);
    }

    .app-page-strip .card-body {
        padding: .45rem .75rem;
    }

    /* Page Header */
    .page-header-shell {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-shell__title {
        font-size: 1.05rem;
    }

    .page-header-shell__description {
        font-size: .8rem;
    }

    .page-header-shell__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-shell__actions .btn {
        justify-content: center;
        width: 100%;
    }

    /* Tables */
    td .d-none.d-md-inline-flex {
        display: inline-flex !important;
        gap: .35rem;
    }

    td .d-none.d-md-inline-flex .btn-sm {
        padding: .28rem .45rem;
        font-size: .78rem;
        border-radius: var(--radius-sm);
    }

    .table {
        font-size: .82rem;
    }

    .table thead th {
        font-size: .72rem;
        padding: .45rem .5rem;
    }

    .table tbody td {
        padding: .4rem .5rem;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: .2rem;
        justify-content: center;
    }

    .page-link {
        padding: .35rem .6rem;
        font-size: .78rem;
    }

    /* Search Toolbar */
    .search-toolbar-shell .input-group,
    .d-flex.flex-wrap.align-items-center.gap-2 .input-group {
        max-width: 100%;
        flex: 1;
    }

    .table-card-shell .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }

    .table-card-shell .card-header>.d-flex {
        width: 100%;
    }

    .table-card-shell .card-header form {
        width: 100%;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: .74rem;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .breadcrumb-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }

    .breadcrumb-item.active {
        max-width: 180px;
    }

    /* Forms touch targets */
    .form-control,
    .form-select {
        min-height: 42px;
        font-size: .88rem;
        border-radius: var(--radius-md);
    }

    .input-group-text {
        min-height: 42px;
    }

    .form-label {
        font-size: .82rem;
        margin-bottom: .3rem;
    }

    .btn {
        min-height: 38px;
    }

    .btn-sm {
        min-height: 34px;
    }

    /* Nav tabs scroll */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 1rem;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
        padding: .55rem .85rem;
        font-size: .82rem;
    }

    /* Footer */
    .footer {
        height: auto;
        padding: .5rem 0;
    }

    .footer-shell {
        flex-direction: column;
        align-items: center;
        gap: .25rem;
        text-align: center;
        padding: .5rem .65rem;
    }

    .footer-copy {
        font-size: .72rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-meta {
        font-size: .68rem;
        justify-content: center;
        gap: .6rem;
    }

    /* Dashboard */
    .dashboard-header-banner {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-lg);
    }

    .dashboard-header-banner h1 {
        font-size: 1.35rem;
    }

    .dashboard-wrapper .row .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .icon-stat-circle {
        width: 2.2rem;
        height: 2.2rem;
        font-size: .9rem;
        border-radius: var(--radius-sm);
    }

    .kpi-card-simple .card-body {
        padding: .75rem;
    }

}

/* --- Phone (â‰¤576px) --- */
@media (max-width: 575.98px) {

    .main-content {
        padding: .6rem .5rem;
    }

    .container-fluid {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    /* Cards */
    .card-header {
        padding: .65rem .75rem;
    }

    .card-body {
        padding: .65rem;
    }

    /* Modals bottom-sheet */
    .modal-dialog {
        margin: .5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        border-radius: 18px;
    }

    .detail-modal-shell .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100dvh;
        align-items: flex-end;
    }

    .detail-modal-shell .modal-content {
        border-radius: 18px 18px 0 0;
        max-height: 85dvh;
        overflow-y: auto;
    }

    /* Alerts & Badges compact */
    .alert {
        padding: .65rem .85rem;
        font-size: .82rem;
        border-radius: var(--radius-md);
    }

    .badge {
        font-size: .68rem;
        padding: .28rem .55rem;
    }

    /* Form buttons stack */
    .d-flex.justify-content-end.gap-2 {
        flex-direction: column;
    }

    .d-flex.justify-content-end.gap-2 .btn {
        width: 100%;
    }

}

/* --- Ultra-small (â‰¤420px) --- */
@media (max-width: 420px) {
}




/*
   Migration note:
   Main brand color is now #047857 through --brand-500.
   Avoid direct use of #34D399 for primary UI because it is too bright for buttons, active menus, and headers.
   Use #34D399 only as a light accent when needed, through --brand-300 or specific decorative states.
*/

/* ==========================================================================
   Â§16 THEME NORMALIZATION â€” Primary #047857
   Purpose: keep old Bootstrap/custom aliases aligned with the new brand tokens.
   ========================================================================== */

.btn-primary,
.btn-login,
.page-item.active .page-link,
.sidebar .nav-link.active,
.sidebar-link.active,
.dashboard-header-banner,
.profile-shell .profile-hero-card,
.profile-shell .profile-avatar,
.navbar-user-chip__avatar,
.app-card__icon {
    background: var(--brand-gradient) !important;
}

.btn-primary:hover,
.btn-login:hover {
    background: var(--brand-gradient-hover) !important;
}

/* Ensure high-contrast white text for all filled buttons and active/selected states,
   preventing them from being overridden by generic anchor (a) tag styles. */
.btn-primary,
.btn-login,
.btn-success,
.btn-danger,
.btn-warning,
.btn-secondary,
.btn-dark,
.page-item.active .page-link,
.sidebar .nav-link.active,
.sidebar-link.active {
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-login:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-secondary:hover,
.btn-dark:hover {
    color: #ffffff !important;
}

.sidebar .nav-link.active .sidebar-link__icon,
.sidebar-link.active .sidebar-link__icon {
    color: #ffffff !important;
}

.text-brand,
.text-brand-dark,
a,
.breadcrumb-item a,
.navbar-year-trigger .year-value,
.navbar-year-trigger .year-icon,
.sidebar-toggle-btn:hover,
.sidebar-pin-btn:hover,
.navbar-sidebar-brand:hover,
.navbar-user-dropdown .dropdown-item:hover,
.page-link:hover,
.nav-tabs .nav-link.active {
    color: var(--brand-700) !important;
}

.bg-brand,
.bg-brand-dark,
.bg-brand-gradient {
    background: var(--brand-gradient) !important;
}

.bg-soft-brand,
.bg-soft-emerald,
.bg-light-subtle,
.shortcut-item:hover,
.user-quicklink-card:hover,
.sidebar-toggle-btn:hover,
.sidebar-pin-btn:hover,
.navbar-user-chip:hover,
.navbar-year-trigger:hover,
.navbar-user-dropdown .dropdown-item:hover,
.page-link:hover {
    background: var(--brand-50) !important;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--brand-500) !important;
    box-shadow: var(--focus-ring) !important;
}

.form-check-input:checked,
.access-form-switch .form-check-input:checked {
    background-color: var(--brand-500) !important;
    border-color: var(--brand-500) !important;
}

.btn-outline-primary {
    color: var(--brand-700) !important;
    border-color: var(--brand-500) !important;
}

.btn-outline-primary:hover {
    color: #fff !important;
    background: var(--brand-500) !important;
    border-color: var(--brand-500) !important;
}

.badge.bg-primary {
    background: rgba(11, 106, 69, .12) !important;
    color: var(--brand-800) !important;
    border-color: rgba(11, 106, 69, .24) !important;
}


.table-hover tbody tr:hover td {
    background: rgba(11, 106, 69, .045) !important;
}

::selection {
    background: var(--brand-100);
    color: var(--brand-900);
}

/* --------------------------------------------------------------------------
   DATATABLES OVERRIDES (Emerald Brand)
   -------------------------------------------------------------------------- */
.dataTables_wrapper {
    padding: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-200);
    border-radius: var(--radius-md);
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    transition: all var(--dur) var(--ease);
    margin-left: 0.5em;
    background-color: var(--surface-1);
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--brand-300);
    box-shadow: var(--focus-ring);
    outline: none;
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border-200);
    border-radius: var(--radius-md);
    padding: 0.4rem 1.8rem 0.4rem 0.9rem;
    font-size: 0.85rem;
    background-color: var(--surface-1);
    margin: 0 0.5em;
}
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--brand-300);
    box-shadow: var(--focus-ring);
    outline: none;
}
.dataTables_wrapper .pagination {
    margin-top: 0.5rem;
}
.dataTables_wrapper .pagination .page-link {
    border: 1px solid var(--border-200);
    color: var(--text-600);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    margin: 0 0.15rem;
    border-radius: var(--radius-sm);
    transition: all var(--dur) var(--ease);
}
.dataTables_wrapper .pagination .page-item:first-child .page-link,
.dataTables_wrapper .pagination .page-item:last-child .page-link {
    border-radius: var(--radius-sm);
}
.dataTables_wrapper .pagination .page-item.active .page-link {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.dataTables_wrapper .pagination .page-link:hover:not(.active) {
    background: var(--brand-50);
    color: var(--brand-700);
    border-color: var(--brand-200);
}
table.dataTable > thead > tr > th {
    background: var(--surface-2);
    color: var(--text-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-200) !important;
    padding: 0.85rem 1rem;
    border-top: none;
}
table.dataTable > tbody > tr > td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-100);
}
table.dataTable > tbody > tr {
    transition: background-color var(--dur) var(--ease);
}
table.dataTable > tbody > tr:hover {
    background-color: var(--brand-50);
}
.dataTables_wrapper .dataTables_info {
    font-size: 0.82rem;
    color: var(--text-500);
    font-weight: 500;
    padding-top: 0.85rem;
}
table.dataTable.no-footer {
    border-bottom: 1px solid var(--border-200);
}

/* Override text colors in all tables, sidebar, navbar, and footer to be uniform (hitam/putih standar) */
table .text-muted,
table [class*="text-brand"],
table .text-dark,
table .text-success,
table .text-primary,
.sidebar .text-muted,
.sidebar [class*="text-brand"],
.sidebar .text-dark,
.sidebar .text-success,
.sidebar .text-primary,
.app-navbar .text-muted,
.app-navbar [class*="text-brand"],
.app-navbar .text-dark,
.app-navbar .text-success,
.app-navbar .text-primary,
.footer .text-muted,
.footer [class*="text-brand"],
.footer .text-dark,
.footer .text-success,
.footer .text-primary {
    color: var(--bs-body-color) !important;
}

/* Ensure badges inside tables using light background have dark text instead of white */
table .badge.bg-light,
table .badge.bg-brand-50 {
    color: var(--bs-body-color) !important;
}
