/* =====================================================================
   SIPOOL - Tema Hangat (krem & cokelat)
   Dimuat setelah style.css hanya saat tema = hangat.
   Komponen memakai kelas yang sama; di sini hanya variabel & layout.
   ===================================================================== */
.tema-hangat {
    --primary: #6e5847;
    --primary-dark: #5c4d40;
    --primary-soft: #f5efe8;
    --sidebar: #fbf7f3;
    --sidebar-text: #3a2f27;
    --sidebar-muted: #8a7d73;
    --sidebar-hover: rgba(110, 88, 71, .07);
    --bg: #f5efe8;
    --card: #ffffff;
    --border: #ece4dc;
    --divider: #f1eae3;
    --text: #2f2620;
    --text-2: #3a2f27;
    --muted: #8a7d73;
    --thead: #fbf7f3;
    --chip: #f5efe8;
    --chip-stroke: #5e4a3a;
    --surface-2: #fbf7f3;
    --input-bg: #ffffff;
    --row-hover: #fdfbf8;
    --faint: #d6cbc0;
    --nav-icon: #4a3d33;
    --border-strong: #d9cdc1;
    --link: #6e5847;
    --link-hover: #5c4d40;
    --tooltip: #3a2f27;
    --sidebar-active: #ffffff;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 2px rgba(60, 40, 20, .05);
    --focus: 0 0 0 3px rgba(110, 88, 71, .15);
    --sidebar-w: 280px;
    --sidebar-mini: 76px;
    --font: "Figtree", "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.tema-hangat body { font-size: 14.5px; }
.tema-hangat .table tbody tr:hover { background: var(--row-hover); }
.tema-hangat .avatar { background: #8b7260; }
.tema-hangat .btn-light:hover { background: var(--surface-2); }
.tema-hangat 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='%238a7d73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.tema-hangat .table th { text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ---------- Sidebar terang ---------- */
.tema-hangat .sidebar { border-right: 1px solid var(--border); }
.tema-hangat .brand { padding: 22px 18px 16px; min-height: 0; border-bottom: 0; gap: 12px; }
.tema-hangat .brand-logo { width: 44px; height: 44px; border-radius: 10px; }
.tema-hangat .brand-name { color: var(--text); font-size: 17px; font-weight: 700; }
.tema-hangat .brand-sub { color: var(--muted); font-size: 12.5px; }
.tema-hangat .collapse-btn { width: 32px; height: 32px; color: var(--muted); }
.tema-hangat .collapse-btn:hover { background: var(--sidebar-hover); color: var(--text); }

.nav-search { padding: 0 12px 10px; }
.nav-search-mini { display: none; }
.nav-search-box { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 8px 0 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); cursor: text; transition: border-color .15s, box-shadow .15s; }
.nav-search-box:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.nav-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--text); }
.nav-search-box input::placeholder { color: var(--muted); }
.nav-search-box input::-webkit-search-cancel-button { display: none; }
.nav-search-box kbd { font: inherit; font-size: 11.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; background: var(--surface-2); white-space: nowrap; }

.tema-hangat .nav { padding: 6px 10px 12px; gap: 4px; }
.tema-hangat .nav-link { padding: 11px 14px; gap: 14px; border-radius: 12px; font-size: 15.5px; font-weight: 500; color: var(--text-2); }
.tema-hangat .nav-link .icon { width: 21px; height: 21px; color: var(--nav-icon); }
.tema-hangat .nav-link:hover { background: var(--sidebar-hover); color: var(--text); }
.tema-hangat .nav-link.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(60, 40, 20, .08), 0 0 0 1px rgba(236, 228, 220, .7); font-weight: 600; }
.tema-hangat .nav-link.parent-active { color: var(--text); font-weight: 600; }
.tema-hangat .caret { opacity: .55; width: 18px; height: 18px; }
.tema-hangat .submenu-inner { padding-left: 26px; }
.tema-hangat .sub-link { color: var(--text-2); font-size: 14.5px; padding: 9px 12px; border-radius: 10px; }
.tema-hangat .sub-link .icon { color: var(--muted); }
.tema-hangat .sub-link:hover { background: var(--sidebar-hover); color: var(--text); }
.tema-hangat .sub-link.active { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(60, 40, 20, .06); }
.tema-hangat .sub-link.active .icon { color: var(--primary); }
.nav-empty { padding: 14px; color: var(--muted); font-size: 13.5px; text-align: center; }
.nav-link.cari-cocok, .sub-link.cari-cocok { outline: 2px solid rgba(110, 88, 71, .25); outline-offset: -2px; }

.sidebar-footer { display: flex; align-items: center; gap: 10px; padding: 14px 18px 16px; border-top: 1px solid var(--border); }
.sidebar-footer .avatar { display: none; }
.sidebar-user { min-width: 0; }
.sidebar-user-name { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-name span { color: var(--muted); }
.sidebar-user-links { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.sidebar-user-links a { color: var(--muted); }
.sidebar-user-links a:hover { color: var(--text); }
.sidebar-user-links .link-strong { color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Main tanpa topbar (desktop) ---------- */
.tema-hangat .topbar-mobile { display: none; }
.tema-hangat .content { padding: 28px; }
.tema-hangat .page-head { margin-bottom: 20px; }
.tema-hangat .page-head h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.tema-hangat .app-footer { padding: 4px 28px 22px; }

/* ---------- Mode mini ---------- */
@media (min-width: 993px) {
    .tema-hangat.sidebar-mini .brand { flex-direction: column; padding: 18px 8px 10px; gap: 8px; }
    .tema-hangat.sidebar-mini .brand-logo { width: 40px; height: 40px; }
    .tema-hangat.sidebar-mini .nav-search { padding: 0 10px 6px; display: flex; justify-content: center; }
    .tema-hangat.sidebar-mini .nav-search-box { display: none; }
    .tema-hangat.sidebar-mini .nav-search-mini { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--muted); cursor: pointer; }
    .tema-hangat.sidebar-mini .nav-search-mini:hover { color: var(--text); }
    .tema-hangat.sidebar-mini .nav-link { padding: 11px; justify-content: center; }
        .tema-hangat.sidebar-mini .submenu { border-color: var(--border); box-shadow: 0 12px 30px rgba(60, 40, 20, .14); }
    .tema-hangat.sidebar-mini .sub-link:hover, .tema-hangat.sidebar-mini .sub-link.active { background: var(--bg); color: var(--text); box-shadow: none; }
    .tema-hangat.sidebar-mini .sidebar-footer { justify-content: center; padding: 14px 8px; position: relative; }
    .tema-hangat.sidebar-mini .sidebar-footer .avatar { display: inline-flex; cursor: pointer; }
    .tema-hangat.sidebar-mini .sidebar-user { position: absolute; left: calc(100% + 8px); bottom: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(60, 40, 20, .14); opacity: 0; visibility: hidden; transition: .15s; z-index: 60; }
    .tema-hangat.sidebar-mini .sidebar-user::before { content: ""; position: absolute; left: -12px; top: 0; bottom: 0; width: 12px; }
    .tema-hangat.sidebar-mini .sidebar-footer:hover .sidebar-user { opacity: 1; visibility: visible; }
}

/* ---------- Dashboard: hero ---------- */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 30px; border-radius: 24px; color: #fff; background: linear-gradient(120deg, #98806e 0%, #6e5847 55%, #5c4d40 100%); margin-bottom: 20px; min-height: 175px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.hero::before { width: 360px; height: 360px; right: -60px; top: -140px; }
.hero::after { width: 260px; height: 260px; right: 150px; bottom: -170px; }
.hero-text { position: relative; z-index: 1; min-width: 0; }
.hero-salam { font-size: 14.5px; opacity: .85; }
.hero-nama { font-size: 28px; font-weight: 800; color: #fff; margin: 4px 0 6px; letter-spacing: -.01em; }
.hero-sub { font-size: 14.5px; opacity: .85; }
.hero-box { position: relative; z-index: 1; text-align: right; padding: 18px 22px; min-width: 260px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(2px); }
.hero-box-label { font-size: 13.5px; opacity: .9; }
.hero-box-value { font-size: 28px; font-weight: 800; line-height: 1.25; margin: 2px 0; }
.hero-box-sub { font-size: 13.5px; opacity: .85; }

/* ---------- Dashboard: akses cepat ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.quick-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px 12px; min-height: 118px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; color: var(--text-2); font-weight: 600; font-size: 15px; text-align: center; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.quick-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: 0 6px 16px rgba(60, 40, 20, .07); color: var(--text); }
:where(.tema-hangat .chip-ikon) { background: var(--chip); color: var(--chip-stroke); }
.quick-tile .chip-ikon, .list-head .chip-ikon { width: 52px; height: 52px; border-radius: 12px; }
.quick-tile .chip-ikon .icon { width: 22px; height: 22px; }

/* ---------- Dashboard: statistik ---------- */
.tema-hangat .grid.stats { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tema-hangat .stat { padding: 20px; gap: 16px; border-radius: 16px; }
.tema-hangat .stat-icon { width: 52px; height: 52px; border-radius: 12px; }
.tema-hangat .stat-label { font-size: 14px; color: var(--muted); }
.tema-hangat .stat-value { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }

/* ---------- Dashboard: daftar ---------- */
.section-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 8px 0 14px; }
.list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.list-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px 6px; box-shadow: var(--shadow); }
.list-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--divider); }
.list-head .chip-ikon { width: 42px; height: 42px; border-radius: 10px; }
.list-head .chip-ikon .icon { width: 20px; height: 20px; }
.list-head-text { flex: 1; min-width: 0; }
.list-head-title { font-size: 16.5px; font-weight: 700; color: var(--text); }
.list-head-sub { font-size: 13.5px; color: var(--muted); }
.list-head-value { font-size: 17px; font-weight: 700; white-space: nowrap; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--divider); font-size: 15px; }
.list-row:last-child { border-bottom: 0; }
.list-row-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.list-row-main small { color: var(--muted); font-size: 13.5px; }
.list-row-side { white-space: nowrap; color: var(--text); }
.list-empty { padding: 22px 0; text-align: center; color: var(--muted); }

/* ---------- Login ---------- */
.tema-hangat .auth-body { background: var(--bg); }
.tema-hangat .auth-card { border-radius: 24px; box-shadow: 0 20px 50px rgba(60, 40, 20, .10); }
.auth-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 26px 28px; color: #fff; background: linear-gradient(120deg, #98806e 0%, #6e5847 55%, #5c4d40 100%); }
.auth-hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -110px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.auth-hero img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: rgba(255, 255, 255, .9); padding: 4px; position: relative; z-index: 1; }
.auth-hero div { position: relative; z-index: 1; }
.auth-hero h1 { color: #fff; font-size: 20px; }
.auth-hero p { margin: 2px 0 0; opacity: .85; font-size: 13.5px; }
.tema-hangat .auth-form { padding: 24px 28px 28px; }
.auth-title { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.auth-desc { color: var(--muted); margin: 0 0 18px; }


/* ---------- Tombol bawah sidebar (hangat) ---------- */
.tema-hangat .sidebar-tools { border-top: 1px solid var(--border); padding: 10px 12px; }
.tema-hangat .tool-btn { height: 38px; padding: 0 8px; gap: 7px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.tema-hangat .tool-btn:hover { background: var(--sidebar-active); color: var(--text); border-color: var(--border-strong); }
.tema-hangat .tool-btn .icon { color: var(--nav-icon); }

/* =====================================================================
   MODE GELAP - tema Hangat (cokelat gelap)
   ===================================================================== */
.tema-hangat.mode-gelap {
    --bg: #16110e;
    --sidebar: #1c1612;
    --card: #231c17;
    --surface-2: #2a221c;
    --input-bg: #1c1612;
    --border: #372d25;
    --border-strong: #4a3d33;
    --divider: #2e251f;
    --row-hover: #2a221c;
    --thead: #2a221c;
    --text: #f3ece5;
    --text-2: #e5d9cd;
    --muted: #a8998b;
    --faint: #5a4b40;
    --primary: #9c7a62;
    --primary-dark: #b08d74;
    --primary-soft: rgba(176, 141, 116, .18);
    --chip: #2f261f;
    --chip-stroke: #dcc7b4;
    --nav-icon: #d6c3b1;
    --sidebar-text: #e5d9cd;
    --sidebar-hover: rgba(255, 255, 255, .05);
    --sidebar-active: #2c241d;
    --link: #d9b99e;
    --link-hover: #ecd2bc;
    --tooltip: #3a2f27;
    --focus: 0 0 0 3px rgba(176, 141, 116, .25);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.tema-hangat.mode-gelap .avatar { background: #7a604d; }
.tema-hangat.mode-gelap .nav-link.active, .tema-hangat.mode-gelap .sub-link.active { background: var(--sidebar-active); box-shadow: 0 0 0 1px var(--border); }
.tema-hangat.mode-gelap .hero, .tema-hangat.mode-gelap .auth-hero { background: linear-gradient(120deg, #6f5a4b 0%, #4f3f33 55%, #3b3027 100%); }
.tema-hangat.mode-gelap .quick-tile:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.tema-hangat.mode-gelap .auth-hero img { background: rgba(255, 255, 255, .85); }
.tema-hangat.mode-gelap .badge-primary { color: #e3c6ae; }
.tema-hangat.mode-gelap .badge-light { background: var(--surface-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) { .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .list-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 992px) {
    .tema-hangat .topbar-mobile { display: flex; height: 58px; padding: 0 12px; background: var(--sidebar); border-bottom: 1px solid var(--border); gap: 10px; }
    .topbar-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; }
    .topbar-app { font-weight: 700; font-size: 16px; color: var(--text); }
    .tema-hangat .collapse-btn { display: none; }
    .tema-hangat .content { padding: 20px 16px; }
    .tema-hangat .app-footer { padding: 4px 16px 18px; }
    .hero { flex-direction: column; align-items: stretch; padding: 26px 22px; }
    .hero-box { text-align: left; min-width: 0; }
}
@media (max-width: 576px) {
    .tema-hangat .content { padding: 14px 12px; }
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .quick-tile { min-height: 104px; font-size: 14px; }
    .hero-nama { font-size: 23px; }
    .tema-hangat .grid.stats { grid-template-columns: 1fr; }
    .list-row { font-size: 14px; flex-wrap: wrap; gap: 4px 12px; }
    .list-row-main { white-space: normal; }
}
