/* =====================================================================
   TEMA HANGAT — krem-cokelat (pondasi SIPOOL Hangat)
   Dimuat hanya saat tema = hangat. Semua aturan di bawah .tema-hangat.
   ===================================================================== */
.tema-hangat {
    --bg: #f5efe8;
    --sidebar: #fbf7f3;
    --sidebar-2: #f3ece5;
    --sidebar-text: #3a2f27;
    --card: #fff;
    --border: #ece4dc;
    --divider: #f1eae3;
    --thead: #fbf7f3;
    --text: #2f2620;
    --text-2: #3a2f27;
    --muted: #8a7d73;
    --primary: #6e5847;
    --primary-dark: #5c4d40;
    --primary-soft: #f5efe8;
    --chip: #f5efe8;
    --chip-stroke: #5e4a3a;
    --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;
}
.tema-hangat body { font-family: "Figtree", "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14.5px; background: var(--bg); color: var(--text); }
/* Warna tautan memakai aturan dasar (a { color: var(--primary) }) agar tidak menimpa warna tombol */
.tema-hangat .btn-primary, .tema-hangat .btn-danger, .tema-hangat .btn-warning, .tema-hangat .btn-info, .tema-hangat .btn-success { color: #fff; }
.tema-hangat a.btn:hover { text-decoration: none; }
:where(.tema-hangat .chip-ikon) { background: var(--chip); color: var(--chip-stroke); }

/* ---------- Sidebar terang ---------- */
.tema-hangat .sidebar { width: var(--sidebar-w); background: var(--sidebar); color: var(--sidebar-text); border-right: 1px solid var(--border); }
.tema-hangat .sidebar-brand { gap: .75rem; padding: 1.1rem 1rem 1rem 1.2rem; border-bottom: 0; min-height: 76px; }
.tema-hangat .brand-logo, .tema-hangat .sidebar .brand-mark { width: 44px; height: 44px; border-radius: 10px; }
.tema-hangat .brand-mark { background: var(--primary); color: #fff; }
.tema-hangat .brand-mark .icon { width: 22px; height: 22px; }
.tema-hangat .brand-logo { background: #fff; border: 1px solid var(--border); object-fit: contain; }
.tema-hangat .brand-info { min-width: 0; flex: 1; }
.tema-hangat .sidebar .brand-text { color: var(--text); font-size: 17px; font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tema-hangat .brand-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tema-hangat .sidebar .icon-btn { background: transparent; border-color: transparent; color: var(--muted); }
.tema-hangat .sidebar .icon-btn:hover { background: #fff; border-color: var(--border); color: var(--text); }
.tema-hangat .sidebar .close-btn { border-color: transparent; }

.tema-hangat .sidebar-search { padding: 0 1rem .7rem; }
.tema-hangat .cari-fitur { display: flex; align-items: center; gap: .55rem; height: 46px; padding: 0 .8rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); cursor: text; }
.tema-hangat .cari-fitur:focus-within { border-color: #cdbdaf; box-shadow: var(--focus); }
.tema-hangat .cari-fitur input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); }
.tema-hangat .cari-fitur input::-webkit-search-cancel-button { display: none; }
.tema-hangat .cari-fitur kbd { font: 600 11.5px/1 inherit; font-family: inherit; color: var(--muted); background: var(--sidebar); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; white-space: nowrap; }
.tema-hangat .search-mini { display: none; }

.tema-hangat .sidebar-nav { padding: .3rem .8rem 1rem; }
.tema-hangat .nav-link { gap: .8rem; padding: .7rem .85rem; border-radius: 12px; color: var(--text-2); font-size: 15.5px; font-weight: 500; margin-bottom: 3px; }
.tema-hangat .nav-link .icon { width: 21px; height: 21px; color: #6b5a4c; }
.tema-hangat .nav-link:hover { background: #fff; color: var(--text); }
.tema-hangat .nav-link.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(60, 40, 20, .08); }
.tema-hangat .nav-link.active .icon { color: var(--primary); }
.tema-hangat .nav-link.active-parent { color: var(--text); font-weight: 600; }
.tema-hangat .caret { width: 16px; height: 16px; color: var(--muted); }
.tema-hangat .submenu-inner { padding-left: 1.55rem; position: relative; }
.tema-hangat .submenu-inner::before { content: ""; position: absolute; left: 1.45rem; top: 4px; bottom: 6px; width: 1px; background: var(--border); }
.tema-hangat .sub-link { color: #6b5a4c; font-size: 14.5px; padding: .5rem .75rem .5rem 1rem; border-radius: 10px; }
.tema-hangat .sub-link .icon { width: 17px; height: 17px; }
.tema-hangat .sub-link:hover { background: #fff; color: var(--text); }
.tema-hangat .sub-link.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(60, 40, 20, .08); }
.tema-hangat .nav-link.cari-cocok, .tema-hangat .sub-link.cari-cocok { outline: 2px solid #cdbdaf; outline-offset: -2px; background: #fff; }
.tema-hangat .nav-empty { padding: 1rem .8rem; color: var(--muted); text-align: center; font-size: 14px; }

.tema-hangat .sidebar-foot { border-top: 1px solid var(--border); padding: .95rem 1.2rem; color: var(--muted); font-size: 13.5px; }
.tema-hangat .foot-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tema-hangat .foot-links { margin-top: .25rem; }
.tema-hangat .foot-links a { color: var(--muted); }
.tema-hangat .foot-links .foot-logout { color: var(--text); font-weight: 700; display: inline-flex; align-items: center; gap: .25rem; }
.tema-hangat .foot-logout .icon { width: 15px; height: 15px; }
.tema-hangat .foot-mini { display: none; position: relative; }
.tema-hangat .avatar { background: #8b7260; }

/* ---------- Area utama ---------- */
.tema-hangat .main { margin-left: var(--sidebar-w); }
.tema-hangat .topbar-mobile { display: none; }
.tema-hangat .content { padding: 28px; }
.tema-hangat .footer { background: transparent; border-top: 0; color: var(--muted); padding: 0 28px 20px; }
.tema-hangat .page-head h1 { color: var(--text); }

/* ---------- Komponen ---------- */
.tema-hangat .card { border-radius: var(--radius-lg); border-color: var(--border); box-shadow: var(--shadow); }
.tema-hangat .card-header { border-bottom-color: var(--divider); padding: 1rem 1.2rem; }
.tema-hangat .card-header h3 { font-size: 16.5px; }
.tema-hangat .card-header h3 .icon { color: var(--primary); }
.tema-hangat .card-body { padding: 1.2rem; }
.tema-hangat .card-footer { background: var(--thead); border-top-color: var(--divider); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.tema-hangat .btn { border-radius: 10px; font-weight: 600; }
.tema-hangat .btn-primary { background: var(--primary); }
.tema-hangat .btn-primary:hover { background: var(--primary-dark); filter: none; }
.tema-hangat .btn-light { background: #fff; border-color: var(--border); color: var(--text-2); }
.tema-hangat .btn-info { background: #8b7260; }
.tema-hangat .form-control { border-color: #e2d8ce; border-radius: 10px; min-height: 40px; }
.tema-hangat .form-control:focus { border-color: #b9a593; box-shadow: var(--focus); }
.tema-hangat .form-control[readonly], .tema-hangat .form-control:disabled { background: var(--thead); }
.tema-hangat .table th { background: var(--thead); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); }
.tema-hangat .table th, .tema-hangat .table td { border-bottom-color: var(--divider); }
.tema-hangat .table tbody tr:hover { background: #fcfaf8; }
.tema-hangat .table tfoot td { background: var(--thead); }
.tema-hangat .badge-primary { background: var(--chip); color: var(--chip-stroke); }
.tema-hangat .pagination a, .tema-hangat .pagination span { border-color: var(--border); border-radius: 10px; }
.tema-hangat .pagination .active { background: var(--primary); border-color: var(--primary); }
.tema-hangat .stat { border-radius: var(--radius-lg); border-color: var(--border); padding: 1.1rem 1.2rem; }
.tema-hangat .stat-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--chip); color: var(--chip-stroke); }
.tema-hangat .stat-icon .icon { width: 24px; height: 24px; }
.tema-hangat .stat-label { font-size: 14px; color: var(--muted); }
.tema-hangat .stat-value { font-size: 24px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tema-hangat .stat > div:last-child { min-width: 0; }

.tema-hangat .summary-box { background: var(--thead); border-color: var(--border); border-radius: var(--radius); }
.tema-hangat .check-item { border-color: var(--border); border-radius: 10px; }
.tema-hangat .check-item input { accent-color: var(--primary); }
.tema-hangat .logo-preview { background: var(--thead); border-color: #e2d8ce; }
.tema-hangat .welcome { background: linear-gradient(120deg, #98806e 0%, #6e5847 55%, #5c4d40 100%); }
.tema-hangat .ac-item:hover, .tema-hangat .ac-item.active { background: var(--primary-soft); }
.tema-hangat .tema-opsi:has(input:checked) { box-shadow: 0 0 0 3px rgba(110, 88, 71, .15); }
.tema-hangat .sub-link.active, .tema-hangat .nav-link.active { text-decoration: none; }

/* ---------- Dashboard hangat ---------- */
.tema-hangat .hero { position: relative; overflow: hidden; border-radius: 24px; padding: 34px 30px; min-height: 175px; color: #fff;
    background: linear-gradient(120deg, #98806e 0%, #6e5847 55%, #5c4d40 100%); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.6rem; }
.tema-hangat .hero::before, .tema-hangat .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.tema-hangat .hero::before { width: 320px; height: 320px; right: -80px; top: -150px; }
.tema-hangat .hero::after { width: 220px; height: 220px; left: 38%; bottom: -150px; }
.tema-hangat .hero > * { position: relative; z-index: 1; }
.tema-hangat .hero-salam { font-size: 14.5px; opacity: .85; }
.tema-hangat .hero-nama { font-size: 28px; font-weight: 800; margin: .15rem 0 .3rem; line-height: 1.2; }
.tema-hangat .hero-tgl { font-size: 14px; opacity: .85; }
.tema-hangat .hero-box { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; padding: 1rem 1.3rem; text-align: right; min-width: 260px; }
.tema-hangat .hero-box-label { font-size: 13px; opacity: .85; }
.tema-hangat .hero-box-angka { font-size: 28px; font-weight: 800; line-height: 1.25; }
.tema-hangat .hero-box-ket { font-size: 12.5px; opacity: .8; }

.tema-hangat .seksi { font-size: 18px; font-weight: 700; margin: 0 0 .9rem; color: var(--text); }
.tema-hangat .quick-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.tema-hangat .quick-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; min-height: 118px; padding: 1rem .7rem; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); color: var(--text); text-align: center; font-size: 15px; font-weight: 700; transition: transform .15s, box-shadow .15s; }
.tema-hangat .quick-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(60, 40, 20, .08); text-decoration: none; }
.tema-hangat .quick-tile .chip-ikon, .tema-hangat .stat .chip-ikon { width: 52px; height: 52px; }
.tema-hangat .quick-tile .chip-ikon .icon { width: 24px; height: 24px; }
.tema-hangat .grid.stats { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 1.6rem; }
.tema-hangat .list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.tema-hangat .list-card { border-radius: var(--radius-lg); }
.tema-hangat .list-head { border-bottom-color: var(--divider); }
.tema-hangat .list-head .chip-ikon { width: 42px; height: 42px; border-radius: 12px; }
.tema-hangat .list-head h3 { font-size: 16.5px; }
.tema-hangat .list-row { border-bottom-color: var(--divider); }

/* ---------- Mode mini (desktop) ---------- */
@media (min-width: 993px) {
    html.tema-hangat.sidebar-mini .sidebar { width: var(--sidebar-mini); }
    html.tema-hangat.sidebar-mini .main { margin-left: var(--sidebar-mini); }
    html.tema-hangat.sidebar-mini .sidebar-brand { flex-direction: column; padding: 1rem .5rem .6rem; gap: .5rem; }
    html.tema-hangat.sidebar-mini .brand-info, html.tema-hangat.sidebar-mini .cari-fitur, html.tema-hangat.sidebar-mini .foot-full { display: none; }
    html.tema-hangat.sidebar-mini .sidebar-search { padding: 0 .5rem .6rem; display: flex; justify-content: center; }
    html.tema-hangat.sidebar-mini .search-mini { display: inline-flex; width: 46px; height: 46px; border-radius: 12px; background: #fff; border-color: var(--border); }
    html.tema-hangat.sidebar-mini .sidebar-nav { padding: .3rem .5rem; }
    html.tema-hangat.sidebar-mini .nav-link { justify-content: center; padding: .75rem; }
    html.tema-hangat.sidebar-mini [data-tooltip]:hover::after { content: attr(data-tooltip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); background: #3a2f27; color: #fff; padding: .4rem .65rem; border-radius: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; z-index: 70; }
    html.tema-hangat.sidebar-mini .search-mini { position: relative; }
    html.tema-hangat.sidebar-mini .nav-item.has-sub > .nav-link[data-tooltip]:hover::after { display: none; }
    html.tema-hangat.sidebar-mini .nav-item > .submenu { background: #fff; border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(60, 40, 20, .14); border-radius: 14px; min-width: 230px; }
    html.tema-hangat.sidebar-mini .submenu-inner { padding: .45rem; }
    html.tema-hangat.sidebar-mini .submenu-inner::before { display: none; }
    html.tema-hangat.sidebar-mini .submenu-title { color: var(--text); border-bottom-color: var(--divider); }
    html.tema-hangat.sidebar-mini .sub-link { padding-left: .75rem; }
    html.tema-hangat.sidebar-mini .sidebar-foot { padding: .8rem .5rem; display: flex; justify-content: center; }
    html.tema-hangat.sidebar-mini .foot-mini { display: block; }
    html.tema-hangat.sidebar-mini .foot-pop { display: none; position: absolute; left: calc(100% + 12px); bottom: 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 30px rgba(60, 40, 20, .14); padding: .8rem; min-width: 210px; z-index: 70; color: var(--text); }
    html.tema-hangat.sidebar-mini .foot-mini:hover .foot-pop { display: block; }
    html.tema-hangat.sidebar-mini .foot-pop::before { content: ""; position: absolute; left: -14px; top: 0; bottom: 0; width: 14px; }
    html.tema-hangat.sidebar-mini .foot-pop strong { display: block; }
    html.tema-hangat.sidebar-mini .foot-pop small { display: block; color: var(--muted); margin-bottom: .5rem; }
    html.tema-hangat.sidebar-mini .foot-pop a { display: flex; align-items: center; gap: .45rem; padding: .45rem .5rem; border-radius: 8px; color: var(--text-2); }
    html.tema-hangat.sidebar-mini .foot-pop a:hover { background: var(--bg); text-decoration: none; }
}

/* ---------- Responsif ---------- */
@media (max-width: 1400px) { .tema-hangat .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .tema-hangat .list-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 992px) {
    .tema-hangat .main { margin-left: 0; }
    .tema-hangat .topbar-mobile { display: flex; align-items: center; gap: .65rem; height: 58px; padding: 0 16px; background: var(--sidebar); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
    .tema-hangat .topbar-mobile .icon-btn { background: #fff; }
    .tema-hangat .topbar-mobile .brand-logo, .tema-hangat .topbar-mobile .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
    .tema-hangat .topbar-mobile .brand-mark { display: grid; place-items: center; }
    .tema-hangat .topbar-mobile .brand-mark .icon { width: 17px; height: 17px; }
    .tema-hangat .topbar-mobile .brand-text { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tema-hangat .collapse-btn { display: none; }
    .tema-hangat .content { padding: 20px 16px; }
    .tema-hangat .footer { padding: 0 16px 16px; }
    .tema-hangat .hero { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
    .tema-hangat .hero-box { text-align: left; min-width: 0; width: 100%; }
    .tema-hangat .sidebar { box-shadow: 0 0 40px rgba(60, 40, 20, .2); }
}
@media (max-width: 576px) {
    .tema-hangat .content { padding: 14px 12px; }
    .tema-hangat .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .tema-hangat .grid.stats { grid-template-columns: minmax(0, 1fr); }
    .tema-hangat .hero-nama { font-size: 23px; }
    .tema-hangat .page-head h1 { font-size: 19px; }
}

/* ---------- Login hangat ---------- */
.tema-hangat .auth-body { background: var(--bg); }
.tema-hangat .auth-card { max-width: 400px; border-radius: 24px; padding: 0; overflow: hidden; box-shadow: 0 20px 50px rgba(60, 40, 20, .12); border: 1px solid var(--border); }
.tema-hangat .auth-hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #98806e 0%, #6e5847 55%, #5c4d40 100%); color: #fff; padding: 1.6rem 1.6rem 1.4rem; display: flex; align-items: center; gap: .85rem; }
.tema-hangat .auth-hero::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; right: -60px; top: -90px; background: rgba(255, 255, 255, .07); }
.tema-hangat .auth-hero .brand-logo, .tema-hangat .auth-hero .brand-mark { width: 48px; height: 48px; border-radius: 12px; background: #fff; color: var(--primary); display: grid; place-items: center; margin: 0; flex: 0 0 auto; }
.tema-hangat .auth-hero h2 { margin: 0; font-size: 18px; }
.tema-hangat .auth-hero p { margin: 0; opacity: .85; font-size: 13px; }
.tema-hangat .auth-form { padding: 1.5rem 1.6rem 1.7rem; }
.tema-hangat .auth-form h3 { margin: 0; font-size: 20px; }
.tema-hangat .auth-form > p { color: var(--muted); margin: .25rem 0 1.2rem; }
.tema-hangat .auth-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 1.6rem 1.2rem; }

/* ---------- Cetak ---------- */
@media print {
    .tema-hangat .main { margin: 0 !important; }
    .tema-hangat .topbar-mobile, .tema-hangat .page-head { display: none !important; }
    .tema-hangat body { background: #fff; }
}
