/* ==========================================================================
   POKAS (Portal Keuangan & Kas) - Stylesheet Resmi v1.2.0 (ptgtn.com)
   PT GEODWIPA TEKNIKA NUSANTARA
   Palet Warna Resmi:
   - Latar:     #0C1B33
   - Permukaan: #16294A
   - Teks:      #EEF1F6
   - Aksen:     #8FB4E3
   - Redup:     #8793A8
   ========================================================================== */

:root {
    --bg-main: #0C1B33;
    --bg-surface: #16294A;
    --bg-surface-elevated: #1D355E;
    --bg-surface-hover: #233F6E;
    --bg-input: #0F213D;
    --text-primary: #EEF1F6;
    --accent-primary: #8FB4E3;
    --accent-hover: #A8C7EE;
    --text-muted: #8793A8;
    --border-color: rgba(143, 180, 227, 0.18);
    --border-strong: rgba(143, 180, 227, 0.35);

    /* Warna Identitas 4 Role */
    --role-admin: #A78BFA;
    --role-admin-bg: rgba(167, 139, 250, 0.16);
    --role-l1: #38BDF8;
    --role-l1-bg: rgba(56, 189, 248, 0.16);
    --role-l2: #34D399;
    --role-l2-bg: rgba(52, 211, 153, 0.16);
    --role-user: #8FB4E3;
    --role-user-bg: rgba(143, 180, 227, 0.18);

    /* Warna Status */
    --status-draft: #64748B;
    --status-pending: #F59E0B;
    --status-waiting: #F97316;
    --status-revision: #A855F7;
    --status-rejected: #EF4444;
    --status-approved: #38BDF8;
    --status-paid: #10B981;

    /* Kontrol Jendela MacBook */
    --mac-close: #FF5F56;
    --mac-min: #FFBD2E;
    --mac-max: #27C93F;

    --shadow-soft: 0 10px 28px rgba(4, 10, 22, 0.42);
    --shadow-modal: 0 22px 58px rgba(2, 6, 16, 0.75);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12.5px;
    line-height: 1.45;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(143, 180, 227, 0.26);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent !important;
    filter: drop-shadow(0 2px 5px rgba(12, 27, 51, 0.32));
}

/* ==========================================================================
   MACBOOK TRAFFIC LIGHTS WINDOW CONTROLS
   ========================================================================== */
.mac-controls {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.mac-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
    position: relative;
    padding: 0;
}
.mac-dot:hover {
    transform: scale(1.14);
}
.mac-dot.close { background-color: var(--mac-close); }
.mac-dot.minimize { background-color: var(--mac-min); }
.mac-dot.maximize { background-color: var(--mac-max); }
.mac-dot span {
    font-size: 8.5px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.65);
    opacity: 0;
    line-height: 1;
}
.mac-controls:hover .mac-dot span {
    opacity: 1;
}

/* ==========================================================================
   1. HALAMAN LOGIN & REGISTER (DIPERKECIL AGAR BACKGROUND TERLIHAT JELAS)
   ========================================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 24px;
    background: radial-gradient(circle at 18% 22%, rgba(143, 180, 227, 0.16), transparent 42%),
                radial-gradient(circle at 82% 78%, rgba(29, 53, 94, 0.85), transparent 48%),
                var(--bg-main);
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 760px;
    min-height: 440px;
    background: var(--bg-surface);
    border-radius: 22px;
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.auth-left {
    background: linear-gradient(145deg, #EEF1F6 0%, #D9E6F7 100%);
    color: #0C1B33;
    padding: 20px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.auth-wave-divider {
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 68px;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.auth-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.auth-logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-logo-badge {
    width: 40px;
    height: 40px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.auth-brand-text h2 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #0C1B33;
    line-height: 1.15;
}
.auth-brand-text p {
    font-size: 10px;
    font-weight: 600;
    color: #3B5278;
}

.auth-illustration-box {
    padding: 8px 16px 8px 0;
    text-align: center;
}
.auth-illustration-box svg {
    max-width: 225px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(12, 27, 51, 0.12));
}
.auth-illustration-caption {
    margin-top: 8px;
    font-size: 11.5px;
    color: #243B61;
    font-weight: 600;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.auth-left-footer {
    font-size: 10px;
    color: #496185;
    font-weight: 600;
}

.auth-right {
    background: var(--bg-surface);
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.auth-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.auth-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.auth-form-group {
    margin-bottom: 11px;
}
.auth-form-group label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 12.5px;
    outline: none;
    transition: var(--transition);
}
.auth-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(143, 180, 227, 0.2);
}
.auth-input::placeholder {
    color: var(--text-muted);
}

/* Sembunyikan ikon password bawaan browser Edge/IE agar Ikon Mata POKAS selalu terlihat jelas */
input::-ms-reveal,
input::-ms-clear {
    display: none !important;
}

.password-eye-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(143, 180, 227, 0.16);
    border: 1px solid rgba(143, 180, 227, 0.35);
    color: var(--accent-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0;
    z-index: 10;
    transition: var(--transition);
}
.password-eye-btn:hover {
    background: var(--accent-primary);
    color: #0C1B33;
}

.auth-submit-btn {
    width: 100%;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--accent-primary);
    color: #0C1B33;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    margin-top: 6px;
    transition: var(--transition);
    box-shadow: 0 5px 14px rgba(143, 180, 227, 0.25);
}
.auth-submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.auth-switch-box {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
}
.auth-switch-link {
    color: var(--accent-primary);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    margin-left: 4px;
    font-size: 12px;
}
.auth-switch-link:hover {
    color: var(--text-primary);
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ==========================================================================
   2. LAYOUT UTAMA & SIDEBAR FIXED (100% DIAM DI TEMPAT SAAT DI-SCROLL)
   ========================================================================== */
.app-layout {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
    padding: 12px;
    gap: 14px;
    background-color: var(--bg-main);
}

.sidebar {
    width: 232px;
    min-width: 232px;
    background: var(--bg-surface);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    padding: 14px 12px;
    transition: width 0.22s ease, min-width 0.22s ease, padding 0.22s ease, transform 0.22s ease;
    position: fixed;
    top: 12px;
    left: 12px;
    bottom: 12px;
    height: calc(100vh - 24px);
    overflow: hidden;
    z-index: 60;
    flex-shrink: 0;
}

/* Mode Sidebar Diperkecil: Tombol tetap di dalam garis sidebar & Kontrol MacBook tersembunyi */
.sidebar.collapsed {
    width: 68px;
    min-width: 68px;
    padding: 14px 8px;
}
.sidebar ~ .main-content {
    margin-left: 246px;
    width: calc(100% - 246px);
    transition: margin-left 0.22s ease, width 0.22s ease;
}
.sidebar.collapsed ~ .main-content {
    margin-left: 82px;
    width: calc(100% - 82px);
}
.sidebar.collapsed .hide-on-collapse {
    display: none !important;
}
.sidebar.collapsed .sidebar-top-bar {
    justify-content: center;
    padding: 0;
}
.sidebar.collapsed .sidebar-brand-row {
    justify-content: center;
    padding: 2px 0;
}
.sidebar.collapsed .sidebar-account-card {
    justify-content: center;
    padding: 8px 4px;
}
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 9px 0;
}
.sidebar.collapsed .sidebar-bottom-card {
    padding: 6px 4px;
}

.sidebar-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
    min-height: 26px;
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding: 2px 4px;
}

.sidebar-brand-logo {
    display: flex;
    align-items: center;
    gap: 9px;
}
.brand-icon-box {
    width: 36px;
    height: 36px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: visible;
}
.brand-title-wrap h1 {
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    line-height: 1.1;
}
.brand-title-wrap span {
    font-size: 10px;
    color: var(--text-muted);
}

.sidebar-collapse-btn {
    background: rgba(143, 180, 227, 0.12);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 26px;
    height: 26px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
    background: var(--accent-primary);
    color: #0C1B33;
}

/* Blok Nama Akun & Login Sebagai (4 Warna Berbeda Sesuai Role: Admin, Approval L1, Approval L2, Karyawan) */
.sidebar-account-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    background: rgba(12, 27, 51, 0.55);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: var(--transition);
}
.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--accent-primary);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-meta {
    overflow: hidden;
}
.account-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-role-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 1.5px 8px;
    border-radius: 99px;
    margin-top: 2px;
}

/* 1. Warna Kartu Sidebar Role ADMIN (Ungu Royal) */
.sidebar-account-card.role-card-admin {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.24), rgba(12, 27, 51, 0.78));
    border-color: #A78BFA;
    box-shadow: 0 4px 14px rgba(167, 139, 250, 0.16);
}
.sidebar-account-card.role-card-admin .account-avatar {
    background: rgba(167, 139, 250, 0.22);
    border-color: #A78BFA;
    color: #DDD6FE;
}
.sidebar-account-card.role-card-admin .account-name {
    color: #EDE9FE;
}

/* 2. Warna Kartu Sidebar Role APPROVAL L1 / Accounting (Biru Cyan) */
.sidebar-account-card.role-card-l1 {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(12, 27, 51, 0.78));
    border-color: #38BDF8;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.16);
}
.sidebar-account-card.role-card-l1 .account-avatar {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38BDF8;
    color: #BAE6FD;
}
.sidebar-account-card.role-card-l1 .account-name {
    color: #E0F2FE;
}

/* 3. Warna Kartu Sidebar Role APPROVAL L2 / Finance (Hijau Emerald) */
.sidebar-account-card.role-card-l2 {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.24), rgba(12, 27, 51, 0.78));
    border-color: #34D399;
    box-shadow: 0 4px 14px rgba(52, 211, 153, 0.16);
}
.sidebar-account-card.role-card-l2 .account-avatar {
    background: rgba(52, 211, 153, 0.22);
    border-color: #34D399;
    color: #A7F3D0;
}
.sidebar-account-card.role-card-l2 .account-name {
    color: #D1FAE5;
}

/* 4. Warna Kartu Sidebar Role KARYAWAN / User (Kuning Amber Emas) */
.sidebar-account-card.role-card-user {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(12, 27, 51, 0.78));
    border-color: #FBBF24;
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.16);
}
.sidebar-account-card.role-card-user .account-avatar {
    background: rgba(251, 191, 36, 0.22);
    border-color: #FBBF24;
    color: #FEF08A;
}
.sidebar-account-card.role-card-user .account-name {
    color: #FEF9C3;
}
.role-pill-karyawan-amber {
    background: rgba(251, 191, 36, 0.22);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.48);
}

/* Navigasi Utama Sidebar (Tanpa Scroll) */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8.5px 11px;
    border-radius: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    transition: var(--transition);
}
.nav-item:hover {
    background: rgba(238, 241, 246, 0.08);
    color: var(--accent-primary);
}
.nav-item.active {
    background: #EEF1F6;
    color: #0C1B33;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}
.nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 4px;
}

.sidebar-bottom-card {
    background: #EEF1F6;
    border-radius: 13px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sidebar-bottom-card .nav-item {
    color: #0C1B33;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
}
.sidebar-bottom-card .nav-item:hover {
    background: rgba(12, 27, 51, 0.08);
    color: #0C1B33;
}
.sidebar-bottom-card .nav-item.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #B91C1C;
}

/* ==========================================================================
   3. KONTEN UTAMA & HEADER RINGKAS
   ========================================================================== */
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-header {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-soft);
}

.top-header.role-theme-admin { border-left: 4px solid var(--role-admin); }
.top-header.role-theme-l1 { border-left: 4px solid var(--role-l1); }
.top-header.role-theme-l2 { border-left: 4px solid var(--role-l2); }
.top-header.role-theme-user { border-left: 4px solid var(--role-user); }

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mobile-menu-btn {
    display: none;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-heading h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}
.page-heading p {
    font-size: 11px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.header-icon-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--status-pending);
    display: inline-block;
}

/* ==========================================================================
   4. KARTU METRIK DASHBOARD (DIKECILKAN & KOMPAK)
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}
.metric-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
}

.metric-info span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 3px;
}
.metric-info h3 {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
}
.metric-info small {
    display: block;
    margin-top: 3px;
    font-size: 10.5px;
    color: var(--accent-primary);
    font-weight: 600;
}

.metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(143, 180, 227, 0.14);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.metric-icon svg {
    width: 17px;
    height: 17px;
}

/* ==========================================================================
   5. GRAFIK GARIS (GAMBAR 2) & DIAGRAM BEBAN (TOTAL DI TENGAH CINCIN)
   ========================================================================== */
.charts-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 12px;
}

.surface-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: var(--shadow-soft);
}

.card-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.card-title-group h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.card-title-group p {
    font-size: 11px;
    color: var(--text-muted);
}

.chart-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.period-tabs {
    display: inline-flex;
    background: var(--bg-main);
    padding: 2px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.period-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}
.period-tab.active {
    background: var(--accent-primary);
    color: #0C1B33;
    font-weight: 700;
}

.chart-canvas-wrap {
    position: relative;
    height: 220px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-center-total {
    position: absolute;
    top: 43%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 2;
}
.ring-center-total small {
    display: block;
    font-size: 9.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ring-center-total strong {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Tabel Ringkas di Dashboard Bawah (Agar Tidak Terlalu Ke Bawah) */
.dashboard-mini-table-wrap {
    max-height: 190px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   6. FILTER BAR, TOMBOL, & IKON AKSI BERWARNA RATA KANAN-KIRI
   ========================================================================== */
.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(12, 27, 51, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.form-control, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    outline: none;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(143, 180, 227, 0.18);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}
.btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.btn-primary {
    background: var(--accent-primary);
    color: #0C1B33;
    font-weight: 700;
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn-success {
    background: var(--status-paid);
    color: #052E16;
    font-weight: 700;
}
.btn-warning {
    background: var(--status-revision);
    color: #FFFFFF;
}
.btn-danger {
    background: var(--status-rejected);
    color: #FFFFFF;
}
.btn-outline {
    background: var(--bg-main);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.pokas-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12px;
}
.pokas-table thead tr {
    background: rgba(12, 27, 51, 0.85);
    border-bottom: 1px solid var(--border-color);
}
.pokas-table th {
    padding: 9px 11px;
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.pokas-table td {
    padding: 9px 11px;
    border-bottom: 1px solid rgba(143, 180, 227, 0.1);
    color: var(--text-primary);
    vertical-align: middle;
}
.pokas-table tbody tr:hover {
    background: rgba(143, 180, 227, 0.05);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-draft { background: rgba(100, 116, 139, 0.25); color: #CBD5E1; border: 1px solid rgba(148, 163, 184, 0.35); }
.badge-pending-l1 { background: rgba(245, 158, 11, 0.18); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-pending-l2 { background: rgba(56, 189, 248, 0.18); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.4); }
.badge-waiting-return { background: rgba(249, 115, 22, 0.2); color: #FB923C; border: 1px solid rgba(249, 115, 22, 0.45); }
.badge-revision { background: rgba(168, 85, 247, 0.2); color: #C084FC; border: 1px solid rgba(168, 85, 247, 0.45); }
.badge-rejected { background: rgba(239, 68, 68, 0.2); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.45); }
.badge-approved { background: rgba(59, 130, 246, 0.22); color: #60A5FA; border: 1px solid rgba(59, 130, 246, 0.45); }
.badge-paid { background: rgba(16, 185, 129, 0.22); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.45); }

.role-pill-admin { background: var(--role-admin-bg); color: var(--role-admin); border: 1px solid rgba(167, 139, 250, 0.4); }
.role-pill-l1 { background: var(--role-l1-bg); color: var(--role-l1); border: 1px solid rgba(56, 189, 248, 0.4); }
.role-pill-l2 { background: var(--role-l2-bg); color: var(--role-l2); border: 1px solid rgba(52, 211, 153, 0.4); }
.role-pill-user { background: var(--role-user-bg); color: var(--role-user); border: 1px solid rgba(143, 180, 227, 0.4); }

/* Tombol Aksi Ikon Berwarna & Rata Kiri-Kanan (Tidak Turun ke Bawah) */
.action-icons {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.icon-action-btn {
    width: 27px;
    height: 27px;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}
.icon-action-btn svg {
    width: 13.5px;
    height: 13.5px;
}

/* Warna Khusus Tiap Ikon Aksi */
.icon-action-btn.print {
    color: #38BDF8;
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.1);
}
.icon-action-btn.view {
    color: #8FB4E3;
    border-color: rgba(143, 180, 227, 0.35);
    background: rgba(143, 180, 227, 0.12);
}
.icon-action-btn.edit {
    color: #FBBF24;
    border-color: rgba(251, 191, 36, 0.38);
    background: rgba(251, 191, 36, 0.12);
}
.icon-action-btn.key {
    color: #FB923C;
    border-color: rgba(251, 146, 60, 0.38);
    background: rgba(251, 146, 60, 0.12);
}
.icon-action-btn.lock {
    color: #A78BFA;
    border-color: rgba(167, 139, 250, 0.42);
    background: rgba(167, 139, 250, 0.14);
}
.icon-action-btn.lock.is-locked {
    color: #0C1B33;
    background: #A78BFA;
    border-color: #A78BFA;
}
.icon-action-btn.approve {
    color: #34D399;
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.12);
}
.icon-action-btn.reject, .icon-action-btn.delete {
    color: #F87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.12);
}
.icon-action-btn:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.05);
    filter: brightness(1.18);
}

/* Badge Angka Cetak di Atas Ikon Printer */
.printed-reminder-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--status-paid);
    color: #052E16;
    font-size: 8.5px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 99px;
    border: 1px solid #0C1B33;
    line-height: 1.1;
}

/* ==========================================================================
   7. POP-UP MODAL SMOOTH TRANSITION & TIMELINE RIWAYAT STATUS (GAMBAR 3)
   ========================================================================== */
@keyframes modalBackdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalWindowPopIn {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 11, 23, 0.76);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
    animation: modalBackdropFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.18s ease;
}
.modal-backdrop.closing {
    opacity: 0;
}

.mac-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-modal);
    overflow: hidden;
    animation: modalWindowPopIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.18s ease, opacity 0.18s ease, width 0.22s ease, max-width 0.22s ease;
}
.modal-backdrop.closing .mac-modal {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
}
.mac-modal.modal-lg {
    max-width: 1080px;
    width: 96vw;
}
.mac-modal.modal-sm {
    max-width: 440px;
}
.mac-modal.maximized {
    max-width: 98vw !important;
    width: 98vw !important;
    height: 95vh !important;
    max-height: 95vh !important;
    border-radius: 12px;
}

.mac-modal-titlebar {
    background: linear-gradient(180deg, #1D355E 0%, #142645 100%);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
}

.mac-modal-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    flex: 1;
}

.mac-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.mac-modal-footer {
    padding: 11px 20px;
    background: rgba(12, 27, 51, 0.6);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.minimized-dock {
    position: fixed;
    bottom: 16px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    z-index: 150;
}
.dock-pill {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--accent-primary);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow-modal);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 700;
}

/* Layout Pop-up Detail & Kolom Kanan Ringkas (Gambar 3: Riwayat Status Tanpa Terpotong) */
.review-split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 265px;
    gap: 16px;
    align-items: start;
}
.review-split-layout > div:first-child {
    min-width: 0;
    overflow: hidden;
}

.approval-action-panel {
    background: rgba(12, 27, 51, 0.72);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 13px;
    width: 100%;
    box-sizing: border-box;
}

/* Desain Timeline Riwayat Status Ringkas Sesuai Gambar 3 */
.status-timeline-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.status-timeline-list {
    position: relative;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.status-timeline-list::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 1.5px;
    background: rgba(143, 180, 227, 0.25);
}
.tl-item {
    position: relative;
}
.tl-dot {
    position: absolute;
    left: -20px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-main);
}
.tl-dot.green { background: #10B981; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25); }
.tl-dot.yellow { background: #F59E0B; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25); }
.tl-dot.red { background: #EF4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25); }

.tl-status-name {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}
.tl-meta-row {
    font-size: 11px;
    color: var(--text-muted);
    margin: 2px 0 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.tl-quote-box {
    background: rgba(22, 41, 74, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 7px;
    padding: 6px 9px;
    font-size: 11px;
    font-style: italic;
    color: var(--text-primary);
}

/* ==========================================================================
   8. FORMULIR, DRAG & DROP BARIS, DAN UPLOAD PASTE (CTRL + V)
   ========================================================================== */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.form-field {
    margin-bottom: 10px;
}
.form-field label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 4px;
}
.form-field .form-control,
.form-field .form-select {
    width: 100%;
}

.upload-dropzone {
    border: 1.5px dashed var(--border-strong);
    background: rgba(12, 27, 51, 0.55);
    border-radius: 12px;
    padding: 13px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--accent-primary);
    background: rgba(143, 180, 227, 0.1);
}
.upload-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.upload-chip {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.drag-row-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    background: rgba(143, 180, 227, 0.12);
    border-radius: 5px;
    font-weight: 700;
    font-size: 11px;
    user-select: none;
}

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast-item {
    background: var(--bg-surface-elevated);
    border-left: 4px solid var(--accent-primary);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: var(--shadow-modal);
    font-size: 12px;
    font-weight: 600;
    max-width: 350px;
}

/* ==========================================================================
   9. RESPONSIVE MOBILE (HP) & TABLET
   ========================================================================== */
@media (max-width: 960px) {
    .auth-card {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
    .auth-wave-divider {
        display: none;
    }
    .charts-grid, .review-split-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        top: 10px;
        left: 10px;
        bottom: 10px;
        height: calc(100vh - 20px);
        transform: translateX(-115%);
        z-index: 120;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar ~ .main-content,
    .sidebar.collapsed ~ .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .mobile-menu-btn {
        display: inline-flex;
    }
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   10. TEMPLATE CETAK RESMI (PDF 1, PDF 2, PDF 3 - PT GEODWIPA TEKNIKA NUSANTARA)
   ========================================================================== */
#printVoucherContainer {
    display: none;
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }
    body * {
        visibility: hidden !important;
    }
    #printVoucherContainer,
    #printVoucherContainer * {
        visibility: visible !important;
    }
    #printVoucherContainer {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #FFFFFF !important;
        color: #111827 !important;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
    }
    .print-page {
        position: relative;
        width: 100%;
        min-height: 255mm;
        padding: 4mm 2mm;
        page-break-after: always;
        box-sizing: border-box;
    }
    .print-page:last-child {
        page-break-after: auto;
    }
    .print-watermark {
        position: absolute;
        top: 48%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-42deg);
        font-size: 64px;
        font-weight: 800;
        color: rgba(34, 197, 94, 0.16);
        border: 5px solid rgba(34, 197, 94, 0.16);
        padding: 10px 38px;
        letter-spacing: 6px;
        pointer-events: none;
        user-select: none;
        z-index: 0;
        white-space: nowrap;
    }
}
