/* ==========================================================================
   SILEDOS / DOSEL - DARK TACTICAL MILITARY DESIGN SYSTEM 3.0
   Gaya Visual: High-End Dark Tactical Military Command Interface
   Referensi: SILEDOS Dashboard & Dapok UI (Sidebar Kiri + Top Bar + Gold Accent)
   Tipografi: Plus Jakarta Sans (Data & Body) & Outfit (Heading & Metrik)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ROOT VARIABLES & PALET WARNA MILITER GELAP
   -------------------------------------------------------------------------- */
:root {
    color-scheme: dark;
    /* Latar Belakang Taktis Gelap */
    --bg-body: #0d111c;
    --bg-sidebar: #111625;
    --bg-header: #131929;
    --bg-card: #161c2d;
    --bg-card-elevated: #1a2236;
    --bg-input: #1a2236;
    --bg-hover: #1e273d;

    /* Garis Batas & Hairlines */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.15);

    /* Aksen Emas Komando (Sidebar Active & Highlights) */
    --gold-primary: #f59e0b;
    --gold-hover: #d97706;
    --gold-dark: #b45309;
    --gold-light: #fef3c7;
    --gold-glow: rgba(245, 158, 11, 0.35);

    /* Status & Kapsul Progres */
    --green-progress: #10b981;
    --green-progress-glow: rgba(16, 185, 129, 0.4);
    --green-light: #ecfdf5;
    --green-dark: #059669;

    --rose-danger: #f43f5e;
    --rose-dark: #be123c;
    --rose-glow: rgba(244, 63, 94, 0.4);

    --sky-info: #0ea5e9;
    --sky-dark: #0284c7;

    /* Teks & Tipografi */
    --text-white: #ffffff;
    --text-slate: #94a3b8;
    --text-muted: #64748b;
    --text-dark: #0f172a;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);

    /* Sudut & Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Bayangan Elevasi */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.5);

    /* Backward compatibility aliases */
    --primary: var(--gold-primary);
    --primary-dark: var(--gold-hover);
    --gold-300: #fde68a;
    --gold-400: #fcd34d;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --emerald-600: #10b981;
    --rose-600: #f43f5e;
    --rose-50: rgba(244, 63, 94, 0.12);
    --sky-600: #0ea5e9;
    --slate-900: #ffffff;
    --slate-800: #f1f5f9;
    --slate-700: #cbd5e1;
    --slate-600: #94a3b8;
    --slate-500: #64748b;
    --slate-400: #475569;
    --slate-300: #334155;
    --slate-200: rgba(255, 255, 255, 0.1);
    --slate-100: rgba(255, 255, 255, 0.05);
    --slate-50: rgba(255, 255, 255, 0.025);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sleek Dark Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   3. ARSITEKTUR SHELL: SIDEBAR KIRI + MAIN WRAPPER (SILEDOS LAYOUT)
   -------------------------------------------------------------------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Kiri Tetap (Fixed / Sticky) */
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.25s ease;
}

/* Logo SILEDOS di Puncak Sidebar */
.sidebar-logo {
    padding: 24px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-logo a {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
}

.sidebar-logo-sub {
    font-size: 0.65rem;
    color: var(--gold-primary);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Menu Navigasi Sidebar */
.sidebar-nav {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-slate);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.18s ease;
    position: relative;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* Status Menu Aktif Sesuai Screenshot (Pill Emas Solid) */
.sidebar-link.active {
    background: var(--gold-primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--gold-glow);
}

.sidebar-icon {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pembatas & Judul Bagian Sidebar (Misal: ACCOUNT) */
.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 14px 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-section-header span.chevron {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

/* --------------------------------------------------------------------------
   4. MAIN WRAPPER & TOP HEADER BAR (SILEDOS HEADER)
   -------------------------------------------------------------------------- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-body);
}

/* Top Header Bar di Atas Konten */
.top-header {
    height: 64px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 90;
    gap: 16px;
}

/* Breadcrumbs di Sisi Kiri Topbar */
.top-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--text-slate);
    font-weight: 500;
    line-height: 1;
}

.top-breadcrumbs a {
    color: var(--text-slate);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}

.top-breadcrumbs a:hover {
    color: #fff;
}

.top-breadcrumbs span.separator {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    opacity: 0.6;
}

.top-breadcrumbs span.current {
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

/* User Welcome Banner di Dasbor */
.user-welcome-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-welcome-avatar {
    width: 36px;
    height: 36px;
    background: #111625;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-welcome-info {
    line-height: 1.25;
}

.user-welcome-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #ffffff;
}

.user-welcome-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.user-welcome-sub a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.user-welcome-sub a:hover {
    color: var(--rose-danger);
}

/* Sisi Kanan Topbar (Pencarian Pill, Notifikasi, Bendera RI, Profil) */
.top-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Input Pencarian Pill Memanjang di Topbar (Fixed Overlap & Normalized) */
.top-search-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.top-search-pill input,
.top-search-pill input[type="text"],
.top-search-pill input[type="search"] {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    padding: 7px 16px 7px 40px !important;
    font-size: 0.84rem;
    color: #ffffff;
    width: 200px;
    transition: all 0.2s ease;
    -webkit-appearance: textfield;
    appearance: textfield;
}

.top-search-pill input:focus,
.top-search-pill input[type="text"]:focus,
.top-search-pill input[type="search"]:focus {
    width: 260px;
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px var(--gold-glow);
}

.top-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    z-index: 2;
}

/* Notifikasi Topbar Popover */
.top-notif-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.top-notif-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-slate);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 0;
}

.top-notif-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: var(--gold-primary);
}

.notif-badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--rose-danger);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid var(--bg-header);
    box-shadow: 0 0 6px var(--rose-glow);
}

.notif-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 420px;
    background: #111625;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow: hidden;
    flex-direction: column;
}

.notif-dropdown-menu.show {
    display: flex !important;
    animation: fadeIn 0.15s ease-out;
}

.notif-header {
    padding: 12px 16px;
    background: #0d111c;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #ffffff;
}

.notif-mark-read-btn {
    background: transparent;
    border: none;
    color: var(--gold-primary);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.notif-mark-read-btn:hover {
    text-decoration: underline;
}

.notif-list {
    overflow-y: auto;
    max-height: 350px;
}

.notif-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: background 0.15s ease;
}

.notif-item:hover {
    background: var(--bg-hover);
}

.notif-item.unread {
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid var(--gold-primary);
}

.notif-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.notif-msg {
    font-size: 0.76rem;
    color: var(--text-slate);
    line-height: 1.35;
    margin-bottom: 4px;
}

.notif-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Lencana Lingkaran Bendera Merah Putih Indonesia 🇮🇩 */
.flag-badge-ri {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    cursor: default;
}

.flag-ri-red {
    background: #e11d48;
    height: 50%;
    width: 100%;
}

.flag-ri-white {
    background: #ffffff;
    height: 50%;
    width: 100%;
}

/* Avatar Lingkaran Pengguna di Topbar */
.top-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #111625;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.84rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.18s ease;
}

.top-avatar-circle:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-glow);
}

/* --------------------------------------------------------------------------
   5. KONTEN UTAMA, PAGE HERO & KARTU BENTO TAKTIS
   -------------------------------------------------------------------------- */
.content-body {
    padding: 28px;
    flex: 1;
}

/* Standar Page Header / Hero */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.page-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.01em;
}

.page-header-desc {
    color: var(--text-slate);
    font-size: 0.88rem;
    margin-top: 4px;
    line-height: 1.45;
}

.page-icon-badge {
    width: 52px;
    height: 52px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--gold-primary);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    flex-shrink: 0;
    box-shadow: 0 4px 16px var(--gold-glow);
}

/* Bento Stats Grid & KPI Cards */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.22s ease;
    box-shadow: var(--shadow-sm);
}

.bento-card:hover {
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold-primary);
}

.bento-card.success::before {
    background: var(--green-progress);
}

.bento-card.danger::before {
    background: var(--rose-danger);
}

.bento-card.info::before {
    background: var(--sky-info);
}

.bento-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.bento-value {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
}

.bento-value.gold { color: var(--gold-primary); }
.bento-value.green { color: var(--green-progress); }
.bento-value.rose { color: var(--rose-danger); }
.bento-value.sky { color: var(--sky-info); }

.bento-sub {
    font-size: 0.76rem;
    color: var(--text-slate);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Kartu Panel Gelap Taktis */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   6. TABEL TAKTIS MILITER (DAPOK & SATUAN PERSENTASE)
   -------------------------------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

th {
    background: #111726;
    color: var(--text-slate);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    user-select: none;
}

th.sortable {
    cursor: pointer;
}

th.sortable:hover {
    color: #ffffff;
}

th.sortable::after {
    content: ' ▾';
    font-size: 0.7rem;
    color: var(--text-muted);
}

td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    vertical-align: middle;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: var(--bg-hover);
}

/* Checkbox Gelap Modern */
input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--gold-primary);
    cursor: pointer;
    border-radius: 4px;
    vertical-align: middle;
}

/* Kolom Foto Prajurit (Bulat Seragam atau Inisial Huruf) */
.soldier-photo-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
    background: #0f1422;
    display: flex;
    align-items: center;
    justify-content: center;
}

.soldier-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.soldier-photo-initial {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Kapsul Progres Hijau Militer (% Dosir / % Jumlah Dosir) */
.capsule-progress-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.capsule-progress-bar {
    width: 44px;
    height: 9px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.capsule-progress-fill {
    height: 100%;
    background: var(--green-progress);
    border-radius: var(--radius-full);
    box-shadow: 0 0 8px var(--green-progress-glow);
    transition: width 0.4s ease;
}

.capsule-progress-fill.red {
    background: var(--rose-danger);
    box-shadow: 0 0 8px var(--rose-glow);
}

.capsule-progress-fill.empty {
    background: var(--text-muted);
}

.capsule-progress-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    min-width: 32px;
}

/* Tautan Satuan Berwarna Emas (Sesuai Screenshot 2) */
.satuan-gold-link {
    color: var(--gold-primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease;
}

.satuan-gold-link:hover {
    color: #fbbf24;
    text-decoration: underline;
}

/* Tombol Tautan Hijau Rekap (Sesuai Screenshot 2) */
.rekap-action-link {
    color: var(--green-progress);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.rekap-action-link:hover {
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Menu Aksi Tiga Titik (Vertical Dots ⋮ Sesuai Screenshot 1) */
.action-dots-btn {
    background: transparent;
    border: none;
    color: var(--gold-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.18s ease;
}

.action-dots-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    transform: scale(1.15);
}

/* Dropdown Menu Tiga Titik */
.action-dropdown-menu {
    position: absolute;
    right: 16px;
    background: #111625;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    min-width: 170px;
    z-index: 120;
    overflow: hidden;
    animation: fadeIn 0.15s ease-out;
}

.action-dropdown-menu.show {
    display: flex;
}

.action-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text-slate);
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.action-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.action-dropdown-item.danger:hover {
    background: rgba(244, 63, 94, 0.15);
    color: var(--rose-danger);
}

/* --------------------------------------------------------------------------
   7. INPUT CONTROLS, SEARCH BOX, & TOOLBAR TAKTIS
   -------------------------------------------------------------------------- */
.tactical-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tactical-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tactical-search-wrap input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 34px 8px 38px !important;
    font-size: 0.86rem;
    color: #ffffff;
    min-width: 220px;
    transition: all 0.2s ease;
    -webkit-appearance: textfield;
    appearance: textfield;
}

.tactical-search-wrap input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 2px var(--gold-glow);
    background: #1c253b;
}

.tactical-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    z-index: 2;
}

.tactical-clear-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
}

.tactical-clear-btn:hover {
    color: #ffffff;
}

.tactical-grid-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--gold-primary);
    padding: 7px 11px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.tactical-grid-btn:hover {
    border-color: var(--gold-primary);
    background: rgba(245, 158, 11, 0.1);
}

/* Pagination Footer (Sesuai Screenshot 2: 10 ⌄ per halaman) */
.pagination-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-slate);
}

.pagination-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 0.84rem;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. TOMBOL-TOMBOL MILITER (BUTTONS)
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gold-primary);
    color: #ffffff;
    border: 1px solid transparent;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.18s ease;
    box-shadow: 0 3px 10px var(--gold-glow);
}

.btn:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px var(--gold-glow);
}

.btn-secondary {
    background: #1e273d;
    color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: #28334f;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-slate);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-success {
    background: var(--green-progress);
    color: #ffffff;
    box-shadow: 0 3px 10px var(--green-progress-glow);
}

.btn-success:hover {
    background: var(--green-dark);
}

.btn-danger {
    background: var(--rose-danger);
    color: #ffffff;
    box-shadow: 0 3px 10px var(--rose-glow);
}

.btn-danger:hover {
    background: var(--rose-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-xs);
}

/* --------------------------------------------------------------------------
   9. BADGES & PILL STATUS
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
}

.badge-approved {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-rejected {
    background: rgba(244, 63, 94, 0.15);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-empty {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-slate);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Filter Tab Bar (Verifikasi, Personel, & Dosir Saya) */
.filter-tab-bar {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card-elevated);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    gap: 4px;
    flex-wrap: wrap;
}

.filter-tab-bar a, .filter-tab-bar button {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    color: var(--text-slate);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.18s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
    white-space: nowrap;
}

.filter-tab-bar a:hover, .filter-tab-bar button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.filter-tab-bar a.active, .filter-tab-bar button.active {
    background: var(--gold-primary);
    color: #000000;
    font-weight: 800;
    box-shadow: 0 2px 10px var(--gold-glow);
}

/* Bulat Indikator Konsisten (Tab Dots) */
.tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.tab-dot.dot-pending {
    background: var(--gold-primary);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.tab-dot.dot-approved {
    background: var(--green-progress);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.tab-dot.dot-rejected {
    background: var(--rose-danger);
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.6);
}

.tab-dot.dot-all {
    background: var(--text-slate);
}

.filter-tab-bar a.active .tab-dot,
.filter-tab-bar button.active .tab-dot {
    background: #000000;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   10. FORMULIR & INPUT CONTROLS TAKTIS
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-slate);
}

/* Normalisasi Search Input untuk Menghilangkan Icon Bawaan Browser */
input[type="search"] {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

input[type=text],
input[type=password],
input[type=search],
input[type=email],
input[type=number],
input[type=date],
input[type=datetime-local],
input[type=month],
input[type=time],
select,
textarea {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.88rem;
    color: #ffffff;
    background-color: var(--bg-input);
    transition: all 0.2s ease;
    color-scheme: dark;
    min-height: 40px;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 2px var(--gold-glow);
    background-color: #1f2a42;
}

/* Custom Styling Form Input Tanggal (Datepicker Taktis Militer) */
input[type="date"],
input[type="datetime-local"],
input[type="month"] {
    color-scheme: dark;
    position: relative;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
}

/* WebKit Date Edit Text & Field Highlight */
input[type="date"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit {
    padding: 0;
    color: #ffffff;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text {
    color: var(--text-muted);
    padding: 0 3px;
    font-weight: 700;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: #ffffff;
    padding: 2px 3px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
    background-color: var(--gold-primary);
    color: #000000;
    outline: none;
    font-weight: 700;
}

/* Icon Kalender Modern Emas/Amber */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.85;
    /* Warna emas militer yang serasi dengan var(--gold-primary) */
    filter: invert(72%) sepia(85%) saturate(850%) hue-rotate(355deg) brightness(102%) contrast(101%);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.15);
    background: rgba(245, 158, 11, 0.15);
    filter: invert(80%) sepia(90%) saturate(1000%) hue-rotate(355deg) brightness(108%) contrast(105%);
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button {
    display: none;
    -webkit-appearance: none;
}

/* Input dengan Icon Vektor SVG */
.input-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    z-index: 2;
}

.input-icon-wrap input,
.input-icon-wrap input[type="text"],
.input-icon-wrap input[type="search"],
.input-icon-wrap input[type="password"] {
    padding-left: 38px !important;
    padding-right: 14px;
}

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

.password-input-wrap input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #ffffff;
}

.form-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* --------------------------------------------------------------------------
   11. ALERTS & NOTIFIKASI
   -------------------------------------------------------------------------- */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fda4af;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1100;
    }
    .sidebar.open,
    .sidebar.mobile-open {
        left: 0;
        transform: translateX(0) !important;
        box-shadow: 12px 0 30px rgba(0, 0, 0, 0.4);
    }
    .top-breadcrumbs {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   12B. RESPONSIVE MOBILE LAYOUT & THEME TOKENS
   -------------------------------------------------------------------------- */
.theme-toggle-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: var(--bg-hover);
    color: var(--gold-primary);
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-glow);
}

.sidebar-toggle-btn {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    background: var(--bg-hover);
    color: var(--text-white);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: inline; }

[data-theme="light"] {
    color-scheme: light;
    --bg-body: #edf1ed;
    --bg-sidebar: #1d2b27;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-card-elevated: #f7faf7;
    --bg-input: #ffffff;
    --bg-hover: #e8eee9;
    --border-color: rgba(27, 55, 45, 0.14);
    --border-subtle: rgba(27, 55, 45, 0.08);
    --border-light: rgba(27, 55, 45, 0.24);
    --text-white: #17231f;
    --text-slate: #53675f;
    --text-muted: #71847b;
    --text-dark: #17231f;
    --gold-primary: #b77908;
    --gold-hover: #945f05;
    --gold-glow: rgba(183, 121, 8, 0.2);
}

[data-theme="light"] .top-header,
[data-theme="light"] .main-wrapper,
[data-theme="light"] body { color: var(--text-white); }
[data-theme="light"] .top-header { background: var(--bg-header); }
[data-theme="light"] .top-breadcrumbs span.current,
[data-theme="light"] .page-header h1,
[data-theme="light"] .card-title,
[data-theme="light"] .bento-value,
[data-theme="light"] .top-avatar-circle,
[data-theme="light"] .user-welcome-title,
[data-theme="light"] .file-link-title,
[data-theme="light"] .modal-header h3 { color: var(--text-white); }
[data-theme="light"] .top-search-pill input,
[data-theme="light"] input[type=text],
[data-theme="light"] input[type=password],
[data-theme="light"] input[type=search],
[data-theme="light"] input[type=email],
[data-theme="light"] input[type=number],
[data-theme="light"] input[type=date],
[data-theme="light"] input[type=datetime-local],
[data-theme="light"] input[type=month],
[data-theme="light"] input[type=time],
[data-theme="light"] select,
[data-theme="light"] textarea { color: var(--text-white); background: var(--bg-input); color-scheme: light; }
[data-theme="light"] .notif-dropdown-menu,
[data-theme="light"] .modal-content,
[data-theme="light"] .bulk-action-bar { background: var(--bg-card); }
[data-theme="light"] .notif-header,
[data-theme="light"] .modal-header,
[data-theme="light"] .modal-footer { background: var(--bg-card-elevated); }
[data-theme="light"] .ai-chat-container,
[data-theme="light"] .ai-chat-header,
[data-theme="light"] .ai-chat-input-area,
[data-theme="light"] .ai-chat-full-panel { background: var(--bg-card); color: var(--text-white); }
[data-theme="light"] .ai-msg-text { color: var(--text-white); }

@media (max-width: 900px) {
    .sidebar-toggle-btn { display: inline-flex; align-items: center; justify-content: center; }
    .top-header {
        height: auto;
        min-height: 60px;
        padding: 10px 14px;
    }
    .content-body { padding: 18px 14px; }
    .top-controls { gap: 7px; }
    .top-search-pill { flex: 1; min-width: 0; }
    .top-search-pill input,
    .top-search-pill input:focus { width: 100%; }
    .flag-badge-ri { display: none; }
    .user-welcome-info { max-width: calc(100vw - 100px); }
    .user-welcome-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .page-header { align-items: flex-start; }
    .page-header > div:first-child { min-width: 0; }
    .page-header h1 { font-size: 1.25rem; }
    .page-header > .btn-group,
    .page-header .btn-group { width: 100%; }
    .page-header .btn-group .btn,
    .page-header .btn-group a { flex: 1; text-align: center; }
    .card { padding: 16px; overflow: hidden; }
    .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .bento-card { padding: 14px 15px; }
    .bento-value { font-size: 1.45rem; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-responsive table { min-width: 680px; }
    .form-grid,
    .form-row,
    .filter-bar { grid-template-columns: 1fr !important; flex-direction: column; align-items: stretch !important; }
    .btn-group { flex-wrap: wrap; }
    .ai-chat-container { width: min(calc(100vw - 24px), 420px); right: 12px; bottom: 76px; }
    .ai-chat-wrapper { right: 12px; bottom: 12px; }
    .modal-overlay { padding: 10px; }
    .modal-content { max-height: calc(100vh - 20px); }
}

@media (max-width: 480px) {
    .top-header { gap: 8px; }
    .sidebar-toggle-btn { flex-shrink: 0; }
    .top-controls .top-avatar-circle { width: 30px; height: 30px; font-size: 0.72rem; }
    .top-notif-btn, .theme-toggle-btn { width: 30px; height: 30px; }
    .top-search-pill input { padding-left: 32px !important; font-size: 0.76rem; }
    .top-search-icon { left: 10px; }
    .bento-grid { grid-template-columns: 1fr; }
    .page-header { gap: 12px; }
    .page-header > div:first-child { gap: 10px !important; }
    .page-icon-badge { width: 42px; height: 42px; font-size: 1.25rem; }
    .page-header h1 { font-size: 1.1rem; }
    .page-header-desc { font-size: 0.8rem; }
    .ai-chat-wrapper .ai-btn-label { display: none; }
    .notif-dropdown-menu { position: fixed; top: 62px; right: 10px; left: 10px; width: auto; }
}

/* --------------------------------------------------------------------------
   13. FILE BADGES & PRESENTASI DOKUMEN
   -------------------------------------------------------------------------- */
.file-cell-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-type-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.file-type-badge.pdf {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.file-type-badge.img {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.file-link-title {
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.88rem;
    display: block;
    transition: color 0.15s ease;
}

.file-link-title:hover {
    color: var(--gold-primary);
    text-decoration: underline;
}

.file-subtext {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.checklist-kode {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--gold-primary);
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   14. FLOATING BULK BAR (VERIFIKASI MASSAL)
   -------------------------------------------------------------------------- */
.bulk-action-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #111625;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 12px 28px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.bulk-action-bar.show {
    bottom: 24px;
}

/* --------------------------------------------------------------------------
   15. MODAL INSPEKSI CEPAT, DIALOG & PRATINJAU DOKUMEN
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 10, 19, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 20px;
}

.modal-overlay.active,
.modal-overlay.show {
    display: flex !important;
}

.modal-content {
    background: #111625;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 18px 24px;
    background: #0d111c;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-slate);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--rose-danger);
    color: #ffffff;
}

.modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-white);
}

.modal-footer {
    padding: 16px 24px;
    background: #0d111c;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.btn-approve {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--green-progress-glow);
}

.btn-approve:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-reject {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: #ffffff;
    border: none;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--rose-glow);
}

.btn-reject:hover {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    font-weight: 700;
}

.modal-dialog-wide {
    background: #111625;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 1050px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header-modern {
    padding: 16px 22px;
    background: #0d111c;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    background: var(--rose-danger);
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(17, 22, 37, 0.85);
    border: 1px solid var(--border-light);
    color: #ffffff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 10;
}

.carousel-nav-btn.prev {
    left: 16px;
}

.carousel-nav-btn.next {
    right: 16px;
}

.carousel-nav-btn:hover {
    background: var(--gold-primary);
    color: #ffffff;
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-glow);
}

/* --------------------------------------------------------------------------
   16. DRAG & DROP UPLOAD ZONE (UNGGAH DOSIR)
   -------------------------------------------------------------------------- */
.dropzone-box {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 40px 24px;
    text-align: center;
    background: #111625;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dropzone-box:hover, .dropzone-box.dragover {
    border-color: var(--gold-primary);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 0 20px var(--gold-glow);
}

.dropzone-icon {
    font-size: 3rem;
    color: var(--gold-primary);
    margin-bottom: 12px;
}

.dropzone-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.dropzone-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.file-selected-card {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    margin-top: 14px;
}

/* --------------------------------------------------------------------------
   17. HALAMAN LOGIN PORTAL TAKTIS
   -------------------------------------------------------------------------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090d16;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-wrap {
    width: 100%;
    max-width: 420px;
    background: #111625;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.login-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #10b981, #3b82f6);
}

.login-header {
    padding: 34px 28px 18px;
    text-align: center;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #ffffff;
    text-transform: uppercase;
}

.login-subtitle {
    font-size: 0.74rem;
    color: var(--gold-primary);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 4px;
}

.login-body {
    padding: 18px 28px 34px;
}

.btn-login-submit {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    margin-top: 10px;
    background: var(--gold-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--gold-glow);
    transition: all 0.18s ease;
}

.btn-login-submit:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
}

.login-badge {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px var(--gold-glow);
}

.badge-shield-icon {
    font-size: 2rem;
}

.login-tagline {
    font-size: 0.78rem;
    color: var(--text-slate);
    margin-top: 6px;
}

.login-tips {
    margin-top: 24px;
    padding: 14px 16px;
    background: #161c2d;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-primary);
    font-weight: 700;
    margin-bottom: 6px;
}

.tips-list {
    margin-left: 20px;
    color: var(--text-slate);
    line-height: 1.6;
}

.tips-list code {
    background: #111625;
    color: var(--gold-primary);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-family: monospace;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   19. FLOATING TACTICAL AI CHATBOT WIDGET (SILEDOS AI / WSL SERVICE)
   ========================================================================== */
.ai-chat-wrapper {
    position: relative;
    z-index: 1000;
}

/* Floating Action Button (FAB) */
.ai-chat-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    height: 50px;
    padding: 0 18px 0 14px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 18px var(--gold-glow);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    color: #ffffff;
    user-select: none;
    touch-action: none;
    cursor: grab;
}

.ai-chat-toggle-btn.dragging {
    cursor: grabbing;
    transition: none;
}

/* Footer ringkas agar tidak mengambil ruang layar mobile. */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 28px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.app-footer strong { color: var(--text-slate); }

.ai-chat-toggle-btn:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: var(--gold-primary);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 26px rgba(245, 158, 11, 0.5);
}

.ai-chat-toggle-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000000;
    border-color: #fbbf24;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.ai-chat-toggle-btn.active .ai-btn-icon {
    color: #000000;
}

.ai-btn-icon {
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.ai-chat-toggle-btn:hover .ai-btn-icon {
    transform: rotate(-10deg) scale(1.1);
}

.ai-btn-label {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ai-pulse-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
    background: var(--green-progress);
    border-radius: 50%;
    border: 2px solid #0f172a;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Chat Container Window Drawer */
.ai-chat-container {
    position: fixed;
    bottom: 86px;
    right: 24px;
    width: 390px;
    max-width: calc(100vw - 36px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: #0f1422;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(245, 158, 11, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    animation: chatSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chat Header */
.ai-chat-header {
    background: linear-gradient(135deg, #161d30 0%, #111728 100%);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar-badge {
    width: 34px;
    height: 34px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-sm);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--gold-glow);
}

.ai-chat-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.2;
}

.ai-chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: var(--text-slate);
    margin-top: 2px;
}

.ai-status-indicator {
    width: 6px;
    height: 6px;
    background: var(--green-progress);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.ai-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-header-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-slate);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Chat Body */
.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.03), transparent 60%), #0c101b;
}

.ai-chat-body::-webkit-scrollbar {
    width: 5px;
}

.ai-chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Chat Message Bubbles */
.ai-msg {
    display: flex;
    gap: 10px;
    max-width: 90%;
    animation: msgFadeIn 0.2s ease;
}

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-msg-bot {
    align-self: flex-start;
}

.ai-msg-user {
    align-self: flex-end;
    flex-direction: row;
}

.ai-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--gold-primary);
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-msg-avatar.user {
    background: rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.4);
    color: var(--sky-info);
}

.ai-msg-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-msg-bot .ai-msg-text {
    background: #161d30;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 4px 14px 14px 14px;
    font-size: 0.86rem;
    line-height: 1.55;
    word-break: break-word;
}

.ai-msg-bot.ai-msg-error .ai-msg-text {
    background: rgba(244, 63, 94, 0.08);
    border-color: rgba(244, 63, 94, 0.3);
    color: #fecdd3;
}

.ai-msg-user .ai-msg-text {
    background: linear-gradient(135deg, #1e293b 0%, #172133 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 14px 4px 14px 14px;
    font-size: 0.86rem;
    line-height: 1.55;
    word-break: break-word;
}

.ai-msg-text strong {
    color: #ffffff;
}

.ai-msg-text code {
    background: #0b0f19;
    color: var(--gold-primary);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-msg-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ai-msg-user .ai-msg-time {
    text-align: right;
}

/* Typing Indicator Animation */
.ai-typing-dots {
    background: #161d30;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 4px 14px 14px 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ai-typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--gold-primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.ai-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Quick Suggestion Chips */
.ai-chips-wrap {
    margin-top: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

.ai-chips-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.ai-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-chip {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    line-height: 1.2;
}

.ai-chip:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #ffffff;
    border-color: var(--gold-primary);
    transform: translateY(-1px);
}

/* Chat Footer & Input */
.ai-chat-footer {
    background: #111728;
    border-top: 1px solid var(--border-color);
    padding: 12px 14px;
}

.ai-input-form {
    margin: 0;
}

.ai-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #182035;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    padding: 3px 4px 3px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-input-wrap:focus-within {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 2px var(--gold-glow);
    background: #1c263e;
}

.ai-input-wrap input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    padding: 8px 6px 8px 0 !important;
    font-size: 0.86rem;
    color: #ffffff;
    outline: none !important;
    min-height: auto !important;
    box-shadow: none !important;
}

.ai-input-wrap input::placeholder {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.ai-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold-primary);
    border: none;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.ai-send-btn:hover {
    background: #fbbf24;
    transform: scale(1.08);
}

.ai-send-btn:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
}

.ai-footer-note {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
}

/* Mobile Responsiveness for AI Chat */
@media (max-width: 480px) {
    .app-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 10px 14px;
        font-size: 0.68rem;
    }
    .ai-chat-container {
        bottom: 80px;
        right: 12px;
        left: 12px;
        width: auto;
        height: 75vh;
    }
    .ai-chat-toggle-btn {
        bottom: 16px;
        right: 16px;
    }
}


