/* ==========================================================================
   KANCIL SAPA - SISTEM DESAIN RESMI IMIGRASI CILACAP (LARAVEL 12)
   Font: Poppins | Theme: Deep Navy (#0b1a30) & Crisp White (#ffffff)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Palet Warna Utama Sesuai Referensi Desain */
    --navy-dark: #0b1a30;
    --navy-hover: #132742;
    --navy-card: #081426;
    --navy-border: #1a2e4a;
    --sidebar-active: #152843;
    --sidebar-text: #8fa0b5;
    
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Indikator Status & Aksen */
    --status-green: #15803d;
    --status-green-bg: #dcfce7;
    --status-blue: #0369a1;
    --status-blue-bg: #e0f2fe;
    --status-amber: #A98232;
    --status-amber-bg: #FDF8EE;
    --status-red: #dc2626;
    --status-red-bg: #fee2e2;
    --status-gray: #475569;
    --status-gray-bg: #f1f5f9;

    /* Aksen Emas & Kuning (Gold & Yellow Accent System) */
    --gold: #C6A04A;
    --gold-deep: #A98232;
    --gold-soft: #E8D7A7;
    --gold-bg: #FDF8EE;
    --gold-border: #DFC07A;
    --yellow-warm: #F2D36B;
    --yellow-soft: #FFF4CC;

    --sidebar-width: 260px;
    --topbar-height: 68px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

html, body {
    height: 100%;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-size: 13.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==========================================================================
   LAYOUT UTAMA (FIXED SIDEBAR & STICKY TOPBAR)
   ========================================================================== */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR TETAP DI KIRI (100VH) */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--navy-dark);
    color: #ffffff;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid var(--navy-border);
}

.sidebar-brand {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(198, 160, 74, 0.25);
}

.brand-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.brand-text h2 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    line-height: 1.2;
}

.brand-text span {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--gold-soft);
    text-transform: uppercase;
}

/* MENU SIDEBAR */
.sidebar-menu {
    flex: 1;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: rgba(198, 160, 74, 0.55);
    letter-spacing: 1px;
    padding: 6px 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-item:hover {
    background-color: rgba(198, 160, 74, 0.08);
    color: var(--gold-soft);
}

.menu-item.active {
    background-color: var(--sidebar-active);
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--gold);
}

.menu-item.active .menu-icon {
    color: var(--gold);
}

.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: inherit;
}

/* SIDEBAR BOTTOM: STATUS SISTEM SIAGA */
.sidebar-bottom {
    padding: 16px 14px 20px 14px;
    margin-top: auto;
}

.sidebar-status-card {
    background-color: var(--navy-card);
    border: 1px solid rgba(198, 160, 74, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.status-card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.status-title {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.status-pill {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    color: #4ade80;
    background-color: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 1px 7px;
    border-radius: 12px;
}

.status-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-subtitle {
    font-size: 10.5px;
    color: #94a3b8;
}

.status-time {
    font-size: 10.5px;
    color: #cbd5e1;
    font-weight: 500;
}

/* MAIN WRAPPER */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-page);
    position: relative;
}

/* TOPBAR / HEADER TETAP DI ATAS (STICKY) */
.topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    height: var(--topbar-height);
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.topbar-left {
    display: flex;
    align-items: center;
}

.breadcrumb {
    font-size: 13.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb strong {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb-separator {
    color: #cbd5e1;
    font-size: 13px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-info {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.profile-info strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

.profile-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--navy-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.avatar-placeholder {
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* PROFILE DROPDOWN WRAPPER */
.profile-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.profile-caret {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1;
    transition: transform 0.2s ease;
}

/* PROFILE DROPDOWN MENU */
.profile-dropdown {
    position: absolute;
    top: calc(var(--topbar-height) - 4px);
    right: 24px;
    width: 220px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(11, 26, 48, 0.10);
    z-index: 200;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.profile-dropdown.open {
    display: flex;
}

.dropdown-user-info {
    padding: 13px 16px 11px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.dropdown-role {
    font-size: 11px;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 0;
}

.dropdown-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 12.5px;
    color: var(--text-secondary);
    transition: background 0.15s ease;
    text-decoration: none;
}

.dropdown-item-link:hover {
    background-color: var(--bg-page);
    color: var(--text-primary);
}

.dropdown-item-link svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.dropdown-logout-form {
    margin: 0;
}

.dropdown-item-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    font-size: 12.5px;
    font-weight: 500;
    color: #dc2626;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    font-family: var(--font-family);
}

.dropdown-item-logout:hover {
    background-color: #fef2f2;
}

.dropdown-item-logout svg {
    flex-shrink: 0;
}

/* SIDEBAR LOGOUT BUTTON */
.sidebar-logout-form {
    margin: 0 0 10px 0;
    padding: 0 10px;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: var(--font-family);
    text-align: left;
}

.sidebar-logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.5);
}

.sidebar-logout-btn .menu-icon {
    display: inline-flex;
    flex-shrink: 0;
}

/* KONTEN UTAMA */

.main-content {
    flex: 1;
    padding: 28px 32px;
}

/* FOOTER */
.main-footer {
    padding: 16px 32px;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
}

.footer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.status-dot-amber {
    color: var(--gold);
    font-size: 9px;
}

.footer-copyright {
    color: var(--text-muted);
}

/* ==========================================================================
   KOMPONEN GLOBAL (PAGE HEADING, BUTTONS, CARDS, BADGES)
   ========================================================================== */

.page-heading-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 16px;
}

.page-heading-action h1 {
    font-size: 21px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

.page-heading-action p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.heading-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.heading-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--navy-dark);
}

.page-overline {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gold-deep);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.heading-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* TOMBOL RESMI */
.btn-primary-dark {
    background-color: var(--navy-dark);
    color: #ffffff;
    border: 1px solid var(--navy-dark);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary-dark:hover {
    background-color: var(--navy-hover);
    border-color: var(--navy-hover);
}

.btn-primary-dark.full-width {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
}

.btn-outline {
    background-color: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 15px;
    font-size: 12.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-modal-cancel {
    background-color: #ffffff;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.btn-modal-cancel:hover {
    background-color: #f1f5f9;
}

.btn-danger-outline {
    background-color: #ffffff;
    color: var(--status-red);
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger-outline:hover {
    background-color: #fef2f2;
    border-color: var(--status-red);
}

.btn-table-action {
    background-color: var(--navy-dark);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    transition: background 0.2s ease;
}

.btn-table-action:hover {
    background-color: var(--navy-hover);
}

.btn-link-action {
    background: none;
    border: none;
    color: var(--navy-dark);
    font-size: 12.5px;
    font-weight: 500;
    padding: 0 4px;
    cursor: pointer;
}

.btn-link-action:hover {
    text-decoration: underline;
}

.action-divider {
    color: #cbd5e1;
    margin: 0 2px;
}

.btn-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid transparent;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon-action:hover {
    background-color: #f1f5f9;
    color: var(--navy-dark);
}

.btn-icon-action.delete:hover {
    background-color: #fee2e2;
    color: var(--status-red);
}

/* KARTU PANEL KONTEN */
.content-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 22px;
}

.panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-heading-row h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-heading-row p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.panel-text-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--navy-dark);
}

.panel-text-link:hover {
    text-decoration: underline;
}

.panel-badge-pill {
    font-size: 11px;
    font-weight: 500;
    background-color: #f1f5f9;
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 12px;
}

/* GRID 4 STAT CARDS */
.stat-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

/* GRID 5 STAT CARDS (laporan): satu baris ke samping, turun bertahap hanya di layar sempit */
.stat-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-grid-5 .stat-metric-card {
    padding: 16px 16px 14px;
    min-width: 0;
}

.stat-grid-5 .stat-metric-header {
    align-items: flex-start;
    gap: 8px;
    min-height: 32px;
    margin-bottom: 6px;
}

.stat-grid-5 .stat-metric-label {
    font-size: 10.5px;
    line-height: 1.35;
}

.stat-grid-5 .stat-metric-value {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-pct-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    margin-bottom: 8px;
}

.stat-pct-pill {
    background: #e0ecf8;
    color: var(--navy-dark);
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.stat-pct-pill.is-empty {
    background: #f1f5f9;
    color: var(--text-muted);
}

.stat-pct-note {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

.stat-bar {
    height: 5px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
    margin-bottom: 8px;
}

.stat-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--navy-dark);
}

.stat-bar.is-blank {
    background: transparent;
}

.stat-grid-5 .stat-metric-footer {
    margin-top: auto;
}

@media (max-width: 1180px) {
    .stat-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .stat-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .stat-grid-5 {
        grid-template-columns: 1fr;
    }
}

.stat-metric-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.stat-metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-metric-label {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-metric-icon {
    color: var(--navy-dark);
    display: inline-flex;
}

.stat-icon-amber { color: var(--gold); }
.stat-icon-blue { color: #0284c7; }
.stat-icon-green { color: #16a34a; }
.alert-icon { color: #dc2626; }

.stat-metric-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 6px;
}

.stat-metric-footer {
    font-size: 11.5px;
    color: var(--text-muted);
}

.stat-metric-footer.trend-up {
    color: var(--status-green);
    font-weight: 500;
}

.stat-metric-footer.trend-warning {
    color: #dc2626;
    font-weight: 500;
}

/* ==========================================================================
   TABEL & PAGINATION
   ========================================================================== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.clean-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.clean-data-table thead th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
    text-transform: uppercase;
}

.clean-data-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.clean-data-table tbody tr:hover {
    background-color: #fafbfc;
}

.clean-data-table tbody tr.active-row {
    background-color: #f1f7fe;
    border-left: 3px solid var(--navy-dark);
}

.font-medium {
    font-weight: 500;
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary-cell {
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.45;
}

/* BADGES */
.badge-status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-status-pill.bot {
    background-color: #f1f5f9;
    color: #334155;
}

.badge-status-pill.agent {
    background-color: var(--status-blue-bg);
    color: var(--status-blue);
}

.badge-status-pill.waiting {
    background-color: var(--status-amber-bg);
    color: var(--status-amber);
}

.badge-status-pill.success {
    background-color: var(--status-green-bg);
    color: var(--status-green);
}

.status-dot-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
}

.status-dot-badge.active {
    color: var(--status-green);
    background-color: rgba(22, 163, 74, 0.1);
}

.status-dot-badge.draft {
    color: #64748b;
    background-color: #f1f5f9;
}

/* PAGINATION FOOTER */
.table-pagination-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.pagination-info {
    font-size: 12px;
    color: var(--text-muted);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-page-num, .btn-page-nav {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.btn-page-num:hover:not(:disabled), .btn-page-nav:hover:not(:disabled) {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-page-num.active {
    background-color: var(--navy-dark);
    border-color: var(--navy-dark);
    color: #ffffff;
}

.btn-page-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--text-light);
    padding: 0 4px;
}

/* ==========================================================================
   HALAMAN DASHBOARD (HALAMAN 2)
   ========================================================================== */

.dashboard-middle-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
}

.chart-legend-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.legend-color-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color-box.bot-box { background-color: var(--navy-dark); }
.legend-color-box.staff-box { background-color: #718096; }

.chart-wrapper-canvas {
    height: 240px;
    width: 100%;
    position: relative;
}

.chart-wrapper-canvas.large-height {
    height: 300px;
}

.category-bars-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-bar-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}

.category-bar-label-row span {
    color: var(--text-primary);
    font-weight: 500;
}

.category-bar-label-row strong {
    color: var(--text-primary);
    font-weight: 600;
}

.category-progress-track {
    width: 100%;
    height: 6px;
    background-color: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.category-progress-fill {
    height: 100%;
    background-color: var(--navy-dark);
    border-radius: 3px;
}

/* ==========================================================================
   HALAMAN MANAJEMEN PENGADUAN (HALAMAN 3)
   ========================================================================== */

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

.service-notice-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 12px;
    color: #1e40af;
}

.notice-info-icon {
    display: inline-flex;
    color: #2563eb;
}

.pengaduan-split-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 20px;
}

.pengaduan-toolbar-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.search-input-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    flex: 1;
}

.search-input-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 12.5px;
    width: 100%;
    color: var(--text-primary);
}

.search-input-box.compact {
    max-width: 320px;
}

.search-submit-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    display: inline-flex;
}

.select-dropdown-box select, .form-select-clean {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    background-color: #ffffff;
    font-size: 12.5px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
}

.btn-filter-trigger {
    background-color: var(--navy-dark);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.col-ticket-code {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.pemohon-cell {
    display: flex;
    flex-direction: column;
}

.cell-subtext {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* RIGHT PANEL: TINDAK LANJUT */
.pengaduan-detail-card {
    display: flex;
    flex-direction: column;
}

.detail-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.detail-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.detail-card-title h3 {
    font-size: 14.5px;
    font-weight: 600;
}

.detail-meta-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

.detail-complaint-box {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: 4px;
}

.complaint-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.complaint-text {
    font-size: 12.5px;
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.45;
}

.detail-form-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: auto;
}

.form-group-custom label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-textarea-clean {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12.5px;
    color: var(--text-primary);
    outline: none;
    resize: vertical;
}

.form-textarea-clean:focus, .form-control-clean:focus, .form-select-clean:focus {
    border-color: var(--navy-dark);
}

/* ==========================================================================
   HALAMAN KATEGORI FAQ (HALAMAN 4 & 8)
   ========================================================================== */

.kategori-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.kategori-counter-info {
    font-size: 12.5px;
    color: var(--text-muted);
}

.kategori-counter-info strong {
    color: var(--text-primary);
}

/* MODAL EDIT KATEGORI (HALAMAN 8) */
.clean-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 26, 48, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(2px);
}

.clean-modal-card {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.clean-modal-header {
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.modal-close-icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-form-body {
    padding: 22px;
}

.clean-modal-footer {
    padding: 14px 22px;
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* ==========================================================================
   HALAMAN PENGATURAN (HALAMAN 5)
   ========================================================================== */

.pengaturan-vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 860px;
}

.settings-card {
    padding: 24px;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section-icon {
    display: inline-flex;
    color: var(--navy-dark);
}

.settings-card-header h3 {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group-clean {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-clean label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control-clean {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 13px;
    font-size: 13px;
    color: var(--text-primary);
    background-color: #ffffff;
    outline: none;
}

.form-control-clean:focus {
    border-color: var(--navy-dark);
}

.form-helper-note {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}

.required-star {
    color: #dc2626;
}

.settings-action-row {
    margin-top: 6px;
}

/* ==========================================================================
   HALAMAN PERCAKAPAN WHATSAPP (HALAMAN 6)
   ========================================================================== */

.conversation-split-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    height: calc(100vh - 160px);
    min-height: 580px;
}

.chat-list-sidebar {
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-search-wrap {
    margin-bottom: 12px;
}

.chat-filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.conversation-filter-btn {
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 14px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.conversation-filter-btn.active {
    background-color: var(--navy-dark);
    border-color: var(--navy-dark);
    color: #ffffff;
}

.chat-thread-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.chat-thread-item {
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-thread-item:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.chat-thread-item.active {
    background-color: var(--gold-bg);
    border-color: var(--gold-border);
    box-shadow: 0 1px 3px rgba(11, 26, 48, 0.05);
}

.thread-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.thread-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.thread-time {
    font-size: 11px;
    color: var(--text-light);
}

.thread-phone {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.thread-preview {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.thread-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.thread-ticket-id {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
}

/* PANEL CHAT ROOM KANAN */
.chat-room-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

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

.chat-target-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--navy-dark);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.chat-target-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-target-name-row h3 {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-target-phone {
    font-size: 11.5px;
    color: var(--text-muted);
}

.chat-room-messages {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-date-pill-divider {
    text-align: center;
    margin: 4px 0 10px 0;
}

.chat-date-pill-divider span {
    font-size: 11px;
    background-color: #e2e8f0;
    color: var(--text-secondary);
    padding: 3px 12px;
    border-radius: 12px;
}

.chat-bubble-row {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.chat-bubble-row.received {
    align-self: flex-start;
}

.chat-bubble-row.sent {
    align-self: flex-end;
}

.chat-bubble-sender {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.chat-bubble-sender.text-right {
    text-align: right;
}

.sender-inline-icon {
    display: inline-block;
    vertical-align: -2px;
    margin-right: 4px;
}

.bubble-timestamp {
    font-weight: 400;
    color: var(--text-light);
    margin-left: 4px;
}

.chat-bubble-content {
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
}

.chat-bubble-content.citizen {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.chat-bubble-content.bot {
    background-color: #eff6ff;
    border: 1px solid #93c5fd;
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.chat-bubble-content.official {
    background-color: var(--navy-dark);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(11, 26, 48, 0.15);
}

.official-sent-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 6px;
}

.chat-room-input-container {
    padding: 14px 20px;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
}

.chat-textarea-field {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12.5px;
    resize: none;
    outline: none;
    color: var(--text-primary);
}

.chat-textarea-field:focus {
    border-color: var(--navy-dark);
}

.chat-input-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.gateway-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attachment-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.attachment-icon-btn:hover,
.attachment-icon-btn:focus-visible {
    color: var(--navy-dark);
    background-color: #f1f5f9;
}

/* Lampiran di bubble chat */
.chat-media-thumb {
    display: block;
    padding: 0;
    margin-bottom: 6px;
    border: none;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    overflow: hidden;
    cursor: zoom-in;
}

.chat-media-thumb img {
    display: block;
    min-width: 64px;
    min-height: 64px;
    max-width: 240px;
    max-height: 240px;
    width: auto;
    height: auto;
    object-fit: cover;
}

.chat-file-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: 320px;
    margin-bottom: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #f8fafc;
    color: var(--text-primary);
}

.chat-file-card.unavailable {
    opacity: 0.75;
    border-style: dashed;
}

.chat-file-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: var(--navy-dark);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.chat-file-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat-file-meta strong {
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-file-meta span,
.chat-file-missing {
    font-size: 11px;
    color: var(--text-muted);
}

.chat-file-actions {
    display: flex;
    gap: 6px;
}

.chat-file-btn {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #ffffff;
    color: var(--navy-dark);
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.chat-file-btn:hover {
    border-color: var(--navy-dark);
}

/* Pratinjau lampiran sebelum dikirim */
.chat-attach-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #f8fafc;
}

.chat-attach-chip[hidden],
.chat-attach-error[hidden] {
    display: none;
}

.chat-attach-chip img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 4px;
}

.chat-attach-chip-icon {
    display: inline-flex;
    color: var(--navy-dark);
}

.chat-attach-chip-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.chat-attach-chip-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-attach-chip-meta span {
    color: var(--text-muted);
    font-size: 11px;
}

.chat-attach-chip-remove {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.chat-attach-error {
    margin: 0 0 8px;
    color: #dc2626;
    font-size: 12px;
}

.chat-room-panel.chat-drop-active {
    outline: 2px dashed var(--navy-dark);
    outline-offset: -6px;
}

/* Lightbox foto */
.chat-lightbox {
    /* Reset global menghapus margin bawaan <dialog>: kembalikan agar di tengah layar. */
    margin: auto;
    max-width: min(92vw, 960px);
    max-height: 92vh;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
}

.chat-lightbox::backdrop {
    background: rgba(11, 26, 48, 0.75);
}

.chat-lightbox img {
    display: block;
    min-width: 160px;
    min-height: 160px;
    object-fit: contain;
    max-width: 100%;
    max-height: calc(92vh - 90px);
    margin: 0 auto;
}

.chat-lightbox-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.gateway-text {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* ==========================================================================
   HALAMAN DATABASE FAQ & FORM FAQ (HALAMAN 7, 9, 12)
   ========================================================================== */

.faq-filter-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-reset-outline {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-reset-outline:hover {
    background-color: #f8fafc;
}

/* DETAIL FAQ BREADCRUMB & BADGE */
.faq-detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.faq-detail-breadcrumb .sep {
    color: #cbd5e1;
}

.faq-detail-breadcrumb .active {
    color: var(--navy-dark);
    font-weight: 500;
}

.faq-sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    margin-bottom: 4px;
}

.badge-text-primary {
    color: var(--gold-deep);
    font-weight: 600;
}

.badge-id-ref {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 11.5px;
}

.faq-title-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.faq-title-meta-row h1 {
    font-size: 21px;
    font-weight: 600;
}

.faq-last-updated {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-panel-card {
    max-width: 900px;
}

.form-card-header-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 22px;
}

.form-card-header-between h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-card-header-between p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-with-edit-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--navy-dark);
}

.required-notice-star {
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
}

.clean-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.label-with-right-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-hint-right {
    font-size: 11.5px;
    color: var(--text-muted);
}

.field-hint {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.radio-group-clean {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}

.form-action-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
}

.form-action-footer.right-align {
    justify-content: flex-end;
}

.form-action-footer.space-between {
    justify-content: space-between;
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   HALAMAN LAPORAN (HALAMAN 10 & 11)
   ========================================================================== */

.laporan-filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 22px;
}

.filter-group-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group-inline[hidden] {
    display: none;
}

.filter-group-inline label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.select-clean-inline {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12.5px;
    background-color: #ffffff;
    color: var(--text-primary);
    outline: none;
}

.laporan-export-footer-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.btn-export-outline {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.btn-export-outline:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-export-outline.pdf svg { color: #dc2626; }
.btn-export-outline.excel svg { color: #16a34a; }

/* ==========================================================================
   HALAMAN LOGIN (HALAMAN 1)
   ========================================================================== */

.login-body {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f6fa;
    padding: 16px;
    font-size: 13px;
}

.login-wrapper {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── HEADER / BRAND ── */
.login-header-brand {
    text-align: center;
    margin-bottom: 14px;
}

.login-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.login-official-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(11, 26, 48, 0.14));
}

.login-agency-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.yellow-dot {
    color: var(--gold);
    font-size: 7px;
}

.login-app-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--navy-dark);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.login-office-title {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── CARD ── */
.login-card-box {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: 0 4px 16px rgba(11, 26, 48, 0.05);
}

.login-card-title-group {
    margin-bottom: 14px;
}

.login-card-title-group h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.login-card-title-group p {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── ALERT ── */
.login-alert-banner {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    margin-bottom: 12px;
}

/* ── FORM ── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group-login {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label-row label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.input-hint-right {
    font-size: 10.5px;
    color: var(--text-light);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 11px;
    color: #94a3b8;
    display: inline-flex;
    pointer-events: none;
}

.input-icon-wrapper input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 36px;
    font-size: 12.5px;
    outline: none;
    color: var(--text-primary);
}

.input-icon-wrapper input:focus {
    border-color: var(--navy-dark);
}

.password-toggle-btn {
    position: absolute;
    right: 11px;
    background: none;
    border: none;
    color: #94a3b8;
    display: inline-flex;
    cursor: pointer;
    padding: 0;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

/* ── META ROW (remember + lupa sandi) ── */
.login-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
}

.remember-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}

.forgot-password-link {
    color: var(--navy-dark);
    font-weight: 500;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* ── SUBMIT BUTTON ── */
.login-submit-button {
    background-color: var(--navy-dark);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 2px;
    transition: background 0.2s ease;
    width: 100%;
    cursor: pointer;
}

.login-submit-button:hover {
    background-color: var(--navy-hover);
}

/* ── WARNING BOX ── */
.restricted-warning-box {
    margin-top: 14px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.warning-shield-icon {
    color: var(--navy-dark);
    display: inline-flex;
    margin-top: 1px;
    flex-shrink: 0;
}

.warning-text strong {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.warning-text p {
    font-size: 10.5px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 1px;
}

/* ── FOOTER COPYRIGHT ── */
.login-bottom-copyright {
    margin-top: 14px;
    font-size: 10.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot-accent {
    color: var(--gold);
    font-size: 7px;
}

/* ── LAPTOP LAYAR PENDEK (tinggi ≤ 700px) ── */
@media (max-height: 700px) {
    .login-body {
        align-items: flex-start;
        padding: 14px 16px;
    }

    .login-header-brand {
        margin-bottom: 10px;
    }

    .login-logo-container {
        margin-bottom: 6px;
    }

    .login-official-logo {
        width: 40px;
        height: 40px;
    }

    .login-app-title {
        font-size: 17px;
    }

    .login-card-box {
        padding: 16px 20px;
    }

    .login-card-title-group {
        margin-bottom: 10px;
    }

    .login-form {
        gap: 10px;
    }

    .restricted-warning-box {
        margin-top: 10px;
        padding: 8px 11px;
    }

    .login-bottom-copyright {
        margin-top: 10px;
    }
}

/* ── TABLET (max 768px) ── */
@media (max-width: 768px) {
    .login-body {
        padding: 20px 14px;
        align-items: flex-start;
        padding-top: 28px;
    }

    .login-wrapper {
        max-width: 100%;
    }

    .login-official-logo {
        width: 44px;
        height: 44px;
    }

    .login-app-title {
        font-size: 18px;
    }

    .login-card-box {
        padding: 18px 18px;
    }

    .login-card-title-group h2 {
        font-size: 14px;
    }
}

/* ── MOBILE (max 480px) ── */
@media (max-width: 480px) {
    .login-body {
        padding: 14px 12px;
        padding-top: 20px;
    }

    .login-official-logo {
        width: 40px;
        height: 40px;
    }

    .login-agency-tag {
        font-size: 8.5px;
        letter-spacing: 0.7px;
    }

    .login-app-title {
        font-size: 16px;
    }

    .login-office-title {
        font-size: 11px;
    }

    .login-card-box {
        padding: 16px 14px;
        border-radius: var(--radius-md);
    }

    .login-card-title-group {
        margin-bottom: 12px;
    }

    .login-card-title-group h2 {
        font-size: 14px;
    }

    .login-form {
        gap: 10px;
    }

    .input-icon-wrapper input {
        padding: 8px 34px;
        font-size: 12px;
    }

    .login-submit-button {
        padding: 9px 14px;
        font-size: 12px;
    }

    .login-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }

    .login-bottom-copyright {
        margin-top: 12px;
        font-size: 10px;
        text-align: center;
        justify-content: center;
    }
}


/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
    .dashboard-middle-grid {
        grid-template-columns: 1fr;
    }
    
    .pengaduan-split-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .conversation-split-layout {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .stat-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .form-row-2col {
        grid-template-columns: 1fr;
    }
    
    .conversation-split-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .topbar {
        padding: 0 16px;
    }
}

/* ANTREAN TIKET PETUGAS */
.menu-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 10px;
    background-color: var(--status-red);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.ticket-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.ticket-priority {
    display: inline-block;
    margin-left: 4px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 600;
    background-color: var(--status-gray-bg);
    color: var(--status-gray);
}

.ticket-priority.priority-high {
    background-color: var(--status-red-bg);
    color: var(--status-red);
}

.ticket-priority.priority-medium {
    background-color: var(--status-amber-bg);
    color: var(--status-amber);
}

.ticket-row-mine td {
    background-color: var(--status-blue-bg);
}

.thread-queue-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--status-amber);
}

.complaint-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.complaint-attachment-link {
    padding: 3px 10px;
    border-radius: 10px;
    background-color: var(--status-gray-bg);
    color: var(--status-gray);
    font-size: 12px;
    text-decoration: none;
}

a.complaint-attachment-link:hover {
    background-color: var(--status-blue-bg);
    color: var(--status-blue);
}

.ticket-dialog {
    width: min(520px, calc(100vw - 32px));
    padding: 24px;
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.ticket-dialog::backdrop {
    background-color: rgba(15, 23, 42, 0.45);
}

.ticket-dialog h3 {
    margin: 0 0 8px;
}

.ticket-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}
