/* ==============================================
   SI-OMB Design System
   Referensi visual: Hando Dashboard
   Warna utama: Biru #4880FF
   ============================================== */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables (Design Tokens) --- */
:root {
    /* Warna utama */
    --primary: #4880FF;
    --primary-light: #E8EEFF;
    --primary-dark: #3366E6;
    --primary-gradient: linear-gradient(135deg, #4880FF 0%, #6C5CE7 100%);

    /* Warna status */
    --success: #00B69B;
    --success-light: #E6F9F5;
    --warning: #F4A100;
    --warning-light: #FFF8E6;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #EFF6FF;

    /* Warna netral */
    --bg-body: #F5F6FA;
    --bg-white: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F0F1F3;

    /* Teks */
    --text-dark: #1A1C1E;
    --text-primary: #2D3748;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-white: #FFFFFF;

    /* Dimensi */
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 50%;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 2px 8px rgba(72, 128, 255, 0.06);

    /* Transisi */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Mode Variables --- */
[data-theme="dark"] {
    /* Warna utama tetap, sedikit disesuaikan agar kontras */
    --primary: #5B8FFF;
    --primary-light: rgba(91, 143, 255, 0.15);
    --primary-dark: #4A7AE8;
    --primary-gradient: linear-gradient(135deg, #5B8FFF 0%, #7C6CF0 100%);

    /* Warna status gelap */
    --success: #2DD4A8;
    --success-light: rgba(45, 212, 168, 0.12);
    --warning: #FBBF24;
    --warning-light: rgba(251, 191, 36, 0.12);
    --danger: #F87171;
    --danger-light: rgba(248, 113, 113, 0.12);
    --info: #60A5FA;
    --info-light: rgba(96, 165, 250, 0.12);

    /* Warna netral gelap */
    --bg-body: #0F1117;
    --bg-white: #1A1D27;
    --bg-sidebar: #141620;
    --border: #2A2D3A;
    --border-light: #22252F;

    /* Teks terang */
    --text-dark: #F1F3F8;
    --text-primary: #D1D5E0;
    --text-secondary: #9CA3B4;
    --text-muted: #6B7490;
    --text-white: #FFFFFF;

    /* Shadow gelap */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hardcoded color di table hover perlu override */
[data-theme="dark"] .table tbody tr:hover {
    background: rgba(91, 143, 255, 0.06);
}

/* Scrollbar gelap */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #3A3D4A;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #4A4D5A;
}

/* Notif dot border sesuai background */
[data-theme="dark"] .header-icon-btn .notif-dot {
    border-color: var(--bg-white);
}

/* Filter tag background */
[data-theme="dark"] .filter-tag {
    background: var(--bg-white);
}

/* Page-btn background */
[data-theme="dark"] .page-btn {
    background: var(--bg-white);
}

/* Badge secondary */
[data-theme="dark"] .badge-secondary {
    background: #2A2D3A;
    color: var(--text-secondary);
}

/* Login card override */
[data-theme="dark"] .login-card {
    background: var(--bg-white);
}

[data-theme="dark"] .login-page {
    background: linear-gradient(135deg, #0F1117 0%, #1A1D27 100%);
}

/* Search focus background */
[data-theme="dark"] .header-search input:focus {
    background: var(--bg-white);
}

/* Alert warna teks agar tetap kontras di dark mode */
[data-theme="dark"] .alert-success {
    background: rgba(45, 212, 168, 0.1);
    color: #6EE7B7;
    border-color: rgba(45, 212, 168, 0.2);
}

[data-theme="dark"] .alert-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #FCD34D;
    border-color: rgba(251, 191, 36, 0.2);
}

[data-theme="dark"] .alert-danger {
    background: rgba(248, 113, 113, 0.1);
    color: #FCA5A5;
    border-color: rgba(248, 113, 113, 0.2);
}

[data-theme="dark"] .alert-info {
    background: rgba(96, 165, 250, 0.1);
    color: #93C5FD;
    border-color: rgba(96, 165, 250, 0.2);
}

/* Select dropdown arrow untuk dark mode */
[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7490' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ============================================
   Tombol Toggle Dark Mode
   ============================================ */
.theme-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    font-size: 17px;
}

.theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}

/* Ikon bulan ditampilkan saat light, ikon matahari saat dark */
.theme-toggle .icon-moon {
    display: block;
}

.theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* Transisi halus saat ganti tema */
html[data-theme] {
    transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme] body,
html[data-theme] .sidebar,
html[data-theme] .header,
html[data-theme] .card,
html[data-theme] .stat-card,
html[data-theme] .modal {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* ==============================================
   LAYOUT: Sidebar + Header + Main
   ============================================== */

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition-slow), width var(--transition-slow);
    overflow: hidden;
}

/* Logo / Brand */
.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.sidebar-brand .brand-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.sidebar-brand .brand-sub {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

/* Menu navigasi sidebar */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    padding: 12px 12px 8px;
    margin-top: 8px;
}

.nav-label:first-child {
    margin-top: 0;
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    margin-bottom: 2px;
}

.nav-link span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(72, 128, 255, 0.3);
}

.nav-link.active i {
    color: var(--text-white);
}

/* Submenu indikator panah */
.nav-link .nav-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform var(--transition-fast);
}

.nav-item.open>.nav-link .nav-arrow {
    transform: rotate(90deg);
}

/* Submenu */
.nav-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    padding-left: 20px;
}

.nav-item.open>.nav-submenu {
    max-height: 500px;
}

.nav-submenu .nav-link {
    padding: 8px 14px;
    font-size: 13px;
}

.nav-submenu .nav-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--text-muted);
    flex-shrink: 0;
    transition: background var(--transition-fast);
}

.nav-submenu .nav-link:hover::before,
.nav-submenu .nav-link.active::before {
    background: var(--primary);
}

.nav-submenu .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: none;
}

/* Badge notifikasi di menu */
.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* --- Header / Topbar --- */
.header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 999;
    transition: left var(--transition-slow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Tombol toggle sidebar di mobile */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-body);
}

.header-greeting h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.header-greeting p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Pencarian di header */
.header-search {
    position: relative;
    width: 280px;
}

.header-search input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-body);
    transition: all var(--transition-fast);
    outline: none;
}

.header-search input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(72, 128, 255, 0.1);
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tombol ikon di header */
.header-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    font-size: 17px;
}

.header-icon-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}

/* Titik notifikasi merah */
.header-icon-btn .notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--radius-full);
    border: 2px solid white;
}

/* Profil pengguna di header */
.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.header-profile:hover {
    background: var(--bg-body);
}

.header-profile img,
.header-profile .avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.avatar-placeholder {
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.header-profile .profile-info {
    line-height: 1.3;
}

.header-profile .profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.header-profile .profile-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* Dropdown profil */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 100;
    overflow: hidden;
}

.header-profile:hover .profile-dropdown,
.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.profile-dropdown a:hover {
    background: var(--bg-body);
    color: var(--text-dark);
}

.profile-dropdown a i {
    width: 18px;
    font-size: 15px;
}

.profile-dropdown .dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

.profile-dropdown a.text-danger {
    color: var(--danger);
}

/* --- Konten Utama --- */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 24px 28px;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left var(--transition-slow);
}

/* Judul halaman */
.page-title {
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.page-title p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb span {
    color: var(--text-muted);
}

/* ==============================================
   KOMPONEN: Kartu Statistik
   ============================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.stat-card .stat-icon.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card .stat-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-card .stat-icon.orange {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card .stat-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.stat-card .stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.stat-change.up {
    background: var(--success-light);
    color: var(--success);
}

.stat-change.down {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card .stat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.stat-card .stat-footer span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Progress mini di dalam stat card */
.stat-progress {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 4px;
    margin-top: 14px;
    overflow: hidden;
}

.stat-progress .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s var(--transition-slow);
}

.stat-progress .progress-fill.blue {
    background: var(--primary);
}

.stat-progress .progress-fill.green {
    background: var(--success);
}

.stat-progress .progress-fill.orange {
    background: var(--warning);
}

.stat-progress .progress-fill.red {
    background: var(--danger);
}

/* ==============================================
   KOMPONEN: Card / Panel
   ============================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-header .card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 22px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Grid layout 2 kolom */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* ==============================================
   KOMPONEN: Tabel
   ============================================== */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-body);
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: #F8F9FC;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Info nama + sub-label di tabel */
.table .cell-info {
    display: flex;
    flex-direction: column;
}

.table .cell-info .cell-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==============================================
   KOMPONEN: Badge / Status
   ============================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-secondary {
    background: #F3F4F6;
    color: var(--text-secondary);
}

/* Dot indicator di badge */
.badge .dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.badge-success .dot {
    background: var(--success);
}

.badge-warning .dot {
    background: var(--warning);
}

.badge-danger .dot {
    background: var(--danger);
}

.badge-primary .dot {
    background: var(--primary);
}

/* ==============================================
   KOMPONEN: Button
   ============================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    white-space: nowrap;
}

.btn i {
    font-size: 15px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(72, 128, 255, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(72, 128, 255, 0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #009B85;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-body);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 14px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

.btn-block {
    width: 100%;
}

/* Grup tombol */
.btn-group {
    display: flex;
    gap: 8px;
}

/* ==============================================
   KOMPONEN: Form
   ============================================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(72, 128, 255, 0.12);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.error {
    border-color: var(--danger);
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

/* Input group (ikon + input) */
.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.input-group .form-control {
    padding-left: 40px;
}

/* Checkbox & Radio kustom */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ==============================================
   KOMPONEN: Modal
   ============================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-body);
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
}

/* Loading dan notifikasi inline di sebelah tombol Simpan */
.modal-footer .save-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-right: auto;
}

.save-status .spinner-sm {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
}

.save-status.success {
    color: var(--success);
}

.save-status.error {
    color: var(--danger);
}

/* ==============================================
   KOMPONEN: Alert
   ============================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-success {
    background: var(--success-light);
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-danger {
    background: var(--danger-light);
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-info {
    background: var(--info-light);
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ==============================================
   KOMPONEN: Tags / Filter
   ============================================== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==============================================
   KOMPONEN: Empty State
   ============================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 320px;
}

/* ==============================================
   KOMPONEN: Pagination
   ============================================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination .page-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: white;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination .page-btn:hover,
.pagination .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==============================================
   HALAMAN LOGIN
   ============================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

/* Dekorasi latar belakang login */
.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(72, 128, 255, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: var(--radius-full);
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.06) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: var(--radius-full);
}

.login-card {
    width: 420px;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease;
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand .brand-logo {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(72, 128, 255, 0.3);
}

.login-brand h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.login-brand p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ==============================================
   KOMPONEN: Pos Activity List (Daftar Aktivitas Pos)
   ============================================== */
.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item .activity-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.activity-item .activity-content {
    flex: 1;
}

.activity-item .activity-text {
    font-size: 13px;
    color: var(--text-primary);
}

.activity-item .activity-text strong {
    font-weight: 600;
}

.activity-item .activity-time {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==============================================
   KOMPONEN: Progress Ring (Lingkaran Progres)
   ============================================== */
.progress-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring svg {
    transform: rotate(-90deg);
    width: 120px;
    height: 120px;
}

.progress-ring .ring-bg {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 8;
}

.progress-ring .ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.progress-ring .ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-ring .ring-label .ring-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.progress-ring .ring-label .ring-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==============================================
   KOMPONEN: Tooltip
   ============================================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--text-dark);
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    pointer-events: none;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* ==============================================
   ANIMASI
   ============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Kelas animasi yang bisa diterapkan */
.animate-fadeIn {
    animation: fadeIn 0.4s ease;
}

.animate-fadeInUp {
    animation: fadeInUp 0.4s ease;
}

.animate-slideInRight {
    animation: slideInRight 0.4s ease;
}

/* Stagger animasi untuk daftar item */
.stagger-item {
    animation: fadeInUp 0.4s ease both;
}

.stagger-item:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.25s;
}

/* ==============================================
   OVERLAY SIDEBAR (MOBILE)
   ============================================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .header {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 0 16px;
    }

    .header-search {
        display: none;
    }

    .main-content {
        padding: 16px;
    }

    .login-card {
        width: 92%;
        padding: 28px;
    }

    .header-profile .profile-info {
        display: none;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .header-greeting h2 {
        font-size: 14px;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }
}

/* ==============================================
   UTILITAS
   ============================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.w-100 {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* ==============================================
   KOMPONEN: Pagination
   ============================================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: white;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(72, 128, 255, 0.25);
}

/* ==============================================
   KOMPONEN: Halaman Login
   ============================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Dekorasi background bulat blur */
.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
}

.login-page::before {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.login-page::after {
    width: 300px;
    height: 300px;
    background: #6C5CE7;
    bottom: -80px;
    right: -60px;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand .brand-logo {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 14px;
    box-shadow: 0 8px 20px rgba(72, 128, 255, 0.3);
}

.login-brand h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.login-brand p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ==============================================
   KOMPONEN: Progress Ring (SVG)
   ============================================== */
.progress-ring-container {
    display: flex;
    justify-content: center;
}

.progress-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring .ring-bg {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 10;
}

.progress-ring .ring-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s var(--transition-slow);
}

.progress-ring .ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ring-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.ring-text {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ==============================================
   KOMPONEN: Save Status (standalone, luar modal)
   ============================================== */
.save-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.save-status .spinner-sm {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    flex-shrink: 0;
}

.save-status.success {
    background: var(--success-light);
    color: var(--success);
}

.save-status.error {
    background: var(--danger-light);
    color: var(--danger);
}

/* ==============================================
   KOMPONEN: Spinner standalone
   ============================================== */
.spinner-sm {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    display: inline-block;
}

/* ==============================================
   SIDEBAR OVERLAY (hidden default, mobile)
   ============================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
}

/* ==============================================
   KOMPONEN: Tab Navigasi (kelompok_kamar)
   ============================================== */
/* Kontainer navigasi tab */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}

/* Tombol tab individual */
.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary);
}

/* Kondisi aktif tab */
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Badge jumlah data di tab */
.tab-count {
    background: var(--bg-body);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* Badge aktif berubah warna utama */
.tab-btn.active .tab-count {
    background: var(--primary);
    color: #fff;
}

/* Sembunyikan konten tab non-aktif */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Indikator bar kapasitas terisi vs total */
.capacity-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

/* Track latar belakang bar kapasitas */
.capacity-track {
    width: 60px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

/* Fill bar kapasitas yang terisi */
.capacity-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .3s;
}

/* ==============================================
   KOMPONEN: Kartu Hasil Pencarian Maba (pos)
   ============================================== */
/* Kartu informasi maba hasil pencarian */
.maba-result-card {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    animation: fadeInUp 0.4s ease;
}

/* Border biru saat maba ditemukan */
.maba-result-card.found {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(72, 128, 255, 0.12);
}

/* Border hijau saat maba sudah tiba */
.maba-result-card.sudah-tiba {
    border-color: var(--success);
}

/* Header kartu maba: avatar + nama */
.maba-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
}

/* Avatar inisial maba */
.maba-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* Avatar laki-laki: gradient biru */
.maba-avatar.laki {
    background: var(--primary-gradient);
}

/* Avatar perempuan: gradient pink */
.maba-avatar.perempuan {
    background: linear-gradient(135deg, #EC4899, #F472B6);
}

/* Grid informasi biodata maba */
.maba-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* Baris info individual */
.info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Label info kecil */
.info-item .info-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Nilai info tebal */
.info-item .info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ==============================================
   KOMPONEN: Zona Pencarian (pos)
   ============================================== */
/* Area pencarian dashed border */
.search-zone {
    background: var(--bg-white);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: all var(--transition-normal);
}

/* Border solid saat fokus input di dalam search zone */
.search-zone:focus-within {
    border-color: var(--primary);
    border-style: solid;
    box-shadow: 0 0 0 4px rgba(72, 128, 255, 0.08);
}

/* Input teks di dalam search zone */
.search-zone input {
    width: 100%;
    max-width: 480px;
    padding: 14px 20px 14px 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

/* Fokus input di search zone */
.search-zone input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(72, 128, 255, 0.12);
}

/* ==============================================
   KOMPONEN: Selector Sesi (pos3)
   ============================================== */
/* Kontainer tombol pilihan sesi */
.sesi-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

/* Tombol sesi individual */
.sesi-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.sesi-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Sesi yang sedang aktif/dipilih */
.sesi-btn.aktif {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(72, 128, 255, 0.25);
}

/* ==============================================
   KOMPONEN: Upload Zone (maba_import)
   ============================================== */
/* Area drag-drop upload file */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 32px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

/* Hover dan saat drag file di atas area */
.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Sembunyikan native file input, overlay di atas area */
.upload-zone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Ikon lingkaran di tengah upload zone */
.upload-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Tag nama kolom CSV */
.col-tag {
    display: inline-block;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 11px;
    font-family: monospace;
    color: var(--primary);
    margin: 2px;
}

/* ==============================================
   KOMPONEN: Skrining Dokter (kesehatan_dokter)
   ============================================== */
/* Banner halaman rahasia */
.secret-banner {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.secret-banner i {
    font-size: 28px;
    color: #fbbf24;
}

.secret-banner h2 {
    font-size: 17px;
    font-weight: 700;
}

.secret-banner p {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Judul seksi formulir skrining */
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    padding: 14px 22px;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badge angka seksi (A, B, C, dst.) */
.section-title .section-badge {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grup opsi radio inline */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Label radio dengan border */
.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.radio-group label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Teks radio yang terpilih */
.radio-group input:checked+span {
    font-weight: 600;
    color: var(--primary);
}

/* Border label radio yang terpilih */
.radio-group label:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Tabel penyakit kulit */
.skin-table {
    width: 100%;
    border-collapse: collapse;
}

.skin-table th,
.skin-table td {
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    font-size: 13px;
}

.skin-table th {
    background: var(--bg-body);
    font-weight: 600;
    text-align: left;
}

/* Kartu kesimpulan dengan border utama */
.conclusion-card {
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Header kesimpulan warna utama */
.conclusion-card .section-title {
    background: var(--primary);
    color: #fff;
}

/* Badge di header kesimpulan semi-transparan */
.conclusion-card .section-title .section-badge {
    background: rgba(255, 255, 255, .2);
}

/* Opsi pilihan kesimpulan (Layak, Layak Bersyarat, Tidak Layak) */
.conclusion-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Label kartu opsi kesimpulan */
.conclusion-options label {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.conclusion-options label:hover {
    border-color: var(--primary);
}

.conclusion-options label i {
    font-size: 22px;
}

/* Opsi terpilih default: hijau */
.conclusion-options label:has(input:checked) {
    border-color: var(--success);
    background: var(--success-light);
    color: var(--success);
}

/* Opsi terpilih peringatan: kuning */
.conclusion-options label.warn:has(input:checked) {
    border-color: var(--warning);
    background: var(--warning-light);
    color: var(--warning);
}

/* Opsi terpilih bahaya: merah */
.conclusion-options label.bad:has(input:checked) {
    border-color: var(--danger);
    background: var(--danger-light);
    color: var(--danger);
}

/* ==============================================
   RESPONSIF: Breakpoint utama
   ============================================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Sidebar tersembunyi di mobile, muncul saat .show */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 1000;
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    /* Overlay aktif di mobile */
    .sidebar-overlay {
        display: block;
    }

    /* Toggle button muncul */
    .sidebar-toggle {
        display: flex !important;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .header {
        left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-title h1 {
        font-size: 18px;
    }

    .page-title p {
        font-size: 12px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .header-search {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Responsif grid info maba 2 kolom di tablet */
    .maba-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Opsi kesimpulan jadi kolom di mobile */
    .conclusion-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {

    /* Grid info maba 1 kolom di HP kecil */
    .maba-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Cetak: sembunyikan elemen non-cetak */
@media print {

    .sidebar,
    .header,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 16px !important;
    }
}