/* =========================
ROOT THEME (LIGHT ERP)
========================= */
:root{
    --bg:#E5E4E2;
    --bg-soft:#ffffff;
    --border:#d1d5db;
    --text:#111827;
    --text-muted:#6b7280;
    --accent:#111827;
    --topbar-height:80px;

}

/* =========================
GLOBAL
========================= */
body{
    margin:0;
    font-family:system-ui;
    background:var(--bg);
    color:var(--text);
}

/* =========================
PAGE OFFSET
========================= */
.page-content{
    margin-top:80px;
}




.sidenav.logo h2{
    font-size:10px;   /* 🔥 kecilkan title */
    margin:0;
    line-height:1.2;
}

.sidenav.logo small{
    font-size:10px;   /* 🔥 kecilkan subtitle */
    display:block;
    margin-top:-2px;  /* 🔥 rapatkan sikit */
    color:#9ca3af;
}

.sidenav.logo i{
    font-size:10px;
    margin-right:4px;
}




/* =========================
TOPBAR (DESKTOP)
========================= */
.topbar{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:80px;

    background:var(--bg-soft);
    border-bottom:1px solid var(--border);

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:0 18px; /* 🔥 better spacing */
    z-index:9999;

    /* 🔥 upgraded shadow (lebih premium) */
    box-shadow:0 4px 12px rgba(0,0,0,0.08);

    /* 🔥 smooth feel */
    transition:all 0.2s ease;
}

/* =========================
LEFT / RIGHT GROUP SUPPORT
========================= */
.topbar-left{
    display:flex;
    align-items:center;
    gap:10px;
}

.topbar-right{
    display:flex;
    align-items:center;
    gap:12px;
}

/* =========================
LOGO
========================= */
.topbar .logo{
    text-align:left;
    line-height:1.05;
    display:flex;
    align-items:center;
}

.topbar h2{
    margin:0;
    font-size:18px; /* 🔥 slightly refined */
    font-weight:600; /* 🔥 stronger hierarchy */
    color:var(--text);
    letter-spacing:0.3px;
}

.topbar small{
    font-size:11px; /* 🔥 cleaner ERP scale */
    color:var(--text-muted);
    display:block;
    margin-top:-2px;
}

/* =========================
MOBILE TOGGLE (UPGRADED)
========================= */
.mobile-toggle{
    display:none;

    width:38px;
    height:38px;
    border-radius:10px;

    align-items:center;
    justify-content:center;

    font-size:16px;
    cursor:pointer;

    color:#111827;
    background:#f3f4f6;

    transition:0.2s;
}

.mobile-toggle:hover{
    background:#e5e7eb;
    transform:scale(1.05);
}

.mobile-toggle:active{
    transform:scale(0.95);
}

/* =========================
TOPBAR ACTIONS (FUTURE READY)
========================= */
.topbar-actions{
    display:flex;
    align-items:center;
    gap:10px;
}

.topbar-actions i{
    font-size:14px;
    color:#6b7280;
    cursor:pointer;

    padding:6px;
    border-radius:6px;
    transition:0.2s;
}

.topbar-actions i:hover{
    background:#f3f4f6;
    color:#111827;
}

/* =========================
MOBILE MODE
========================= */
@media(max-width:992px){

    .mobile-toggle{
        display:flex;
    }

    .topbar{
        height:70px; /* 🔥 sedikit compact */
        padding:0 12px;
    }

    .topbar h2{
        font-size:15px;
    }

    .topbar small{
        font-size:10px;
    }

    .topbar .logo img{
        height:38px !important;
    }

    /* 🔥 optional: hide extra actions */
    .topbar-actions{
        display:none;
    }
    
}



/* =========================
USER PROFILE TOPBAR
========================= */

/* =========================
GRID WRAPPER
========================= */

.profile-container{
    display:block; /* 🔥 bukan grid lagi */
}


/* =========================
LEFT (WHATSAPP STYLE CARD)
========================= */
.profile-card{
    background:#71797E;
    border-radius:14px;
    padding:18px;
    color:#fff;
    text-align:center;
  
  
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)),
        url('/assets/images/page_bg.jpg');

    background-size: cover;        /* penuh cover */
    background-position: center;   /* center nicely */
    background-repeat: no-repeat;  /* tak repeat */

    border-radius:12px; /* optional UI cantik */
    overflow:hidden;
    
}

.profile-card.expanded{
    width:320px;
    min-width:320px;
    max-width:320px;
}

.profile-card.collapsed{
    width:90px;
    min-width:90px;
    max-width:90px;
    padding:15px 8px;
}

.profile-card img{
    width:180px;
    height:180px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #374151;
}

.profile-username{
    font-size:13px;
    color:#9ca3af;
    margin-top:8px;
}

.profile-role{
    font-size:12px;
    color:#d1d5db;
}

/* =========================
SIDEBAR MODE
========================= */
.profile-card{
    position:relative;
    width:100%;
    transition:0.3s;
}

/* TOGGLE BUTTON */
.sidebar-toggle{
    position:absolute;
    top:10px;
    left:10px;
    cursor:pointer;
    color:#9ca3af;
    font-size:14px;
}

/* AVATAR */
.profile-card .avatar{
    width:180px;
    height:180px;
    transition:0.3s;
}

/* COLLAPSED STATE */
.profile-card.collapsed{
    width:90px;
    padding:15px 8px;
}

/* hide text bila collapse */
.profile-card.collapsed .profile-username,
.profile-card.collapsed .profile-role,
.profile-card.collapsed .badge{
    display:none;
}

/* kecilkan avatar */
.profile-card.collapsed .avatar{
    width:50px;
    height:50px;
}

/* action jadi vertical */
.profile-card.collapsed .action-bar{
    flex-direction:column;
}

/* button center */
.profile-card.collapsed .btn{
    width:100%;
    padding:8px 0;
}

.label{
    font-size:11px;
    color:#9ca3af;
}

.value{
    font-size:12px;
    font-weight:600;
    color:#2F4F4F;
    text-align:right;
}

.status-badge{
    padding:4px 10px;
    font-size:11px;
    border-radius:6px;
    font-weight:600;
    display:inline-block;
}

.status-badge.active{
    background:#16a34a;
    color:#fff;
}

.status-badge.inactive{
    background:#dc2626;
    color:#fff;
}

/* =========================
BUTTON
========================= */
.action-bar{
    margin-top:12px;
    display:flex;
    gap:8px;
    justify-content:center;
}

.btn{
    font-size:12px;
    padding:7px 10px;
    border-radius:8px;
    color:#fff;
    border:none;
}

/* .btn.edit{background:#2563eb;}
.btn.pass{background:#f59e0b;}
.btn.logout{background:#ef4444;}  */



.user-role{
    font-size:11px;
    color:var(--text-muted);
}


.user-avatar{
    width:42px;
    height:42px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid #111827;
}

.user-box{
    display:flex;
    align-items:center;
    gap:10px;
    margin-left:auto;
    margin-right:50px; /* 🔥 IMPORTANT: bagi jarak dari kanan */
    max-width:300px; /* 🔥 limit supaya tak lari */
}

/* INFO CONTAINER */
.user-info{
    display:flex;
    flex-direction:column;
    line-height:1.1;

    min-width:0; /* 🔥 WAJIB untuk ellipsis */
}

/* USER NAME */
.user-name{
    font-size:14px;
    font-weight:500;
    letter-spacing:0.5px;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis; /* 🔥 potong nama panjang */
}

/* ROLE */
.user-info small{
    font-size:12px;
    color:var(--text-muted);

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}


/* =========================
FIELDSET LOGIN
========================= */
.login-fieldset{
    border:1px solid #d1d5db;
    border-radius:12px;
    padding:10px 10px 10px 10px;
}

.login-fieldset legend{
    display:table;          /* ðŸ”¥ KEY FIX */
    margin:0 auto;          /* center betul */
    padding:0 12px;

    font-size:11px;
    font-weight:600;
    color:#6b7280;

    text-align:center;
}


/* =========================
LOGO (OUTSIDE TOPBAR OPTION)
========================= */
.logo{
    text-align:center;
}

.logo h3{
    font-size:12px;
    color:var(--accent);
    font-weight:bold;
    margin:0;
}

.logo small{
    font-size:10px;
    color:var(--text-muted);
    display:block;
    margin-top:-2px;   /* ðŸ”¥ rapatkan Garvis */
}

.msg-error{
    font-size:12px;
    margin-top:10px;
    color:#dc2626; /* red-600 (ERP style soft red) */
    font-weight:300;
    padding:8px 10px;
    border-radius:8px;
    background:#fef2f2;
    border:1px solid #fecaca;
}

.msg-success{
    font-size:12px;
    margin-top:10px;
    color:#1d4ed8; /* blue-700 */
    font-weight:300;
    padding:8px 10px;
    border-radius:8px;
    background:#eff6ff;
    border:1px solid #bfdbfe;
}


.info-fieldset{
    padding:12px;
    background:transparent;
    min-width:0;
    position:relative;
}

/* =========================
LEGEND AS FULL WIDTH TAB HEADER
========================= */
.info-fieldset legend{
    width:100%;
    padding:10px 14px;
    margin:0;

    background:#e5e7eb;  /* grey tab */
    border-bottom:1px solid #d1d5db;

    font-size:13px;
    font-weight:600;
    color:#111827;

    border-top-left-radius:10px;
    border-top-right-radius:10px;

    display:flex;
    align-items:center;
    gap:6px;
}

/* remove default fieldset spacing weirdness */
.info-fieldset legend + *{
    margin-top:10px;
}


/* =========================
SIDENAV (FIX LEFT - ERP CLEAN)
========================= */
.sidenav{
    position:fixed;
    top:var(--topbar-height);
    left:0;

    height:calc(100vh - var(--topbar-height));

    background:#000;
    color:#fff;

    padding:18px 10px;
    padding-top:20px;

    display:flex;
    flex-direction:column;
    align-items:center;

    box-shadow:4px 0 15px rgba(0,0,0,0.3);
    z-index:999;

    transition:width 0.3s ease, padding 0.3s ease;
    overflow-y:auto;
    overflow-x:hidden;

    box-sizing:border-box;
}

.sidebar_logo{
    position:relative; /* penting untuk overlay */

    background-image:url('/seknet/assets/images/page_bg.jpg');
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;

    border-radius:12px;
    overflow:hidden;

    padding:15px 10px;
    margin-bottom:12px;
    height:auto;        /* 🔥 penting */
    min-height:unset;   /* elak constraint */
    max-height:none;    /* buang limit kalau ada */

    display:block;      /* pastikan normal flow */
    width:100%;        /* 🔥 wajib supaya ikut full sidebar */
    flex-shrink:0;     /* 🔥 jangan bagi dia compress */

    height:auto;
    max-height:none;
}

.sidebar_logo::before{
    content:"";
    position:absolute;
    inset:0;

    background:linear-gradient(
        rgba(0,0,0,0.4),
        rgba(0,0,0,0.7)
    );

    z-index:1;
}

.sidebar_logo > *{
    position:relative;
    z-index:2;
}

.sidenav.logo h2{
    font-size:10px;   /* 🔥 kecilkan title */
    margin:0;
    line-height:1.2;
}

.sidenav.logo small{
    font-size:10px;   /* 🔥 kecilkan subtitle */
    display:block;
    margin-top:-2px;  /* 🔥 rapatkan sikit */
    color:#9ca3af;
}

.sidenav.logo i{
    font-size:10px;
    margin-right:4px;
}


/* =========================
SIDEBAR HEADER ROW
========================= */
.sidebar-header{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:10px;

    width:100%;
    padding:10px 8px;
    margin-bottom:10px;
}

/* toggle button */
.sidebar-toggle{
    width:34px;
    height:34px;
    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:8px;
    cursor:pointer;

    color:#9ca3af;
    background:#1f2937;

    transition:0.2s;
}

.sidebar-toggle:hover{
    background:#374151;
    color:#fff;
}

/* logo styling */
.sidebar-header .logo h6{
    margin:0;
    font-size:13px;
    font-weight:600;
    color:#fff;
}

.sidebar-header .logo small{
    font-size:7px;
    display:block;
    margin-top:-4px;
    color:#9ca3af;
    letter-spacing:0.3px;
}

/* =========================
STATE: EXPANDED
========================= */
.sidenav.expanded{
    width:320px;
    min-width:320px;
}

/* =========================
STATE: COLLAPSED
========================= */
.sidenav.collapsed{
    width:90px;
    min-width:90px;

    align-items:center;
    padding:18px 6px;
}





/* normal */
.sidebar-toggle{
    width:40px;
    height:40px;

    display:flex;
    align-items:center;
    justify-content:center;

    flex-shrink:0;
    transition:0.3s;
}

/* COLLAPSED MODE */
.sidenav.collapsed .sidebar-header{
    justify-content:center;
}

.sidenav.collapsed .sidebar-toggle{
    margin:0;   /* 🔥 penting */
    left:50%;
    transform:translateX(-50%);
}

.sidenav.collapsed .logo{
    display:none; /* optional tapi clean UI */
}





/* =========================
TOGGLE BUTTON
========================= */
.sidebar-toggle{
    position:absolute;
    top:10px;
    right:10px;
    cursor:pointer;
    color:#9ca3af;
    font-size:14px;
    z-index:10;
}



/* =========================
AVATAR
========================= */
.sidenav .avatar{
    width:160px;
    height:160px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #374151;

    margin-top:40px;
    margin-bottom:10px;

    transition:0.3s ease;
}

.sidenav.collapsed .avatar{
    width:50px;
    height:50px;

    margin-top:38px;
    margin-bottom:8px;
}

/* =========================
TEXT ELEMENTS
========================= */
.sidenav .profile-username,
.sidenav .profile-role,
.sidenav .badge,
.sidenav .action-bar,
.sidenav .status-badge{
    transition:all 0.2s ease;
}

/* =========================
HIDE WHEN COLLAPSED (CLEAN)
========================= */
/* 🔥 COLLAPSED MODE CLEAN UI */
.sidenav.collapsed .logo small,
.sidenav.collapsed .status-wrap{
    display:none;
}

/* center icon mode */
.sidenav.collapsed .menu-item{
    justify-content:center;
}

/* avatar shrink */
.sidenav.collapsed .avatar{
    width:50px;
    height:50px;
}

.sidenav.collapsed .profile-username,
.sidenav.collapsed .profile-role,
.sidenav.collapsed .action-bar,
.sidenav.collapsed .badge,
.sidenav.collapsed .status-badge{
    opacity:0;
    visibility:hidden;
    pointer-events:none;

    max-height:0;
    margin:0;
    padding:0;

    overflow:hidden;
}

/* scrollbar style */
.sidenav::-webkit-scrollbar{
    width:6px;
}

.sidenav::-webkit-scrollbar-thumb{
    background:#374151;
    border-radius:10px;
}

.sidenav::-webkit-scrollbar-thumb:hover{
    background:#4b5563;
}

/* =========================
ERP MENU SECTION (UNIFIED STYLE)
========================= */
.menu-section{
    width:100%;
    margin-top:12px;
}

/* =========================
MENU TITLE
========================= */
.menu-title{
    font-size:11px;
    color:#6b7280;
    margin:14px 0 6px;
    padding-left:6px;
    letter-spacing:1px;
}

/* =========================
MAIN MENU ITEM
========================= */
.menu-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:9px 10px;
    border-radius:10px;
    cursor:pointer;
    color:#e5e7eb;
    transition:0.2s;
    font-size:12px; /* 🔥 base unify */
}

/* ICON */
.menu-item i{
    width:18px;
    font-size:14px;
    text-align:center;
    color:#fff;
}

/* TEXT */
.menu-item span{
    font-size:12px; /* 🔥 unified */
}

/* HOVER */
.menu-item:hover{
    background:#0b1220;
}

/* ACTIVE */
.menu-item.active{
    background:#0f172a;
    border-left:3px solid #ffffff;
}

/* =========================
SUB MENU (TREE STYLE)
========================= */
.sub-menu{
    margin-left:32px;
    margin-top:4px;
    display:none;
    flex-direction:column;
    gap:6px;
    border-left:1px dashed #374151;
    padding-left:10px;
}

/* SUB ITEM */
.sub-menu .menu-item{
    padding:6px 8px;
    border-radius:6px;
    font-size:12px; /* 🔥 SAME SIZE */
}

/* SUB TEXT */
.sub-menu .menu-item span{
    font-size:12px;
    color:#9ca3af;
    transition:0.2s ease;
}

/* SUB HOVER */
.sub-menu .menu-item:hover{
    background:#0b1220;
}

.sub-menu .menu-item:hover span{
    color:#ffffff;
}

/* SHOW SUBMENU WHEN ACTIVE */
.menu-item.active + .sub-menu{
    display:flex;
}

/* =========================
ARROW INDICATOR
========================= */
.menu-item.has-sub::after{
    content:"▸";
    margin-left:auto;
    font-size:10px;
    opacity:0.6;
    transition:transform 0.2s ease, opacity 0.2s ease;
}

.menu-item.active::after{
    transform:rotate(90deg);
    opacity:1;
}


/* =========================
COLLAPSED MODE MENU
========================= */
.sidenav.collapsed .menu-item span,
.sidenav.collapsed .menu-title,
.sidenav.collapsed .sub-menu{
    display:none;
}

.sidenav.collapsed .menu-item{
    justify-content:center;
    padding:10px 0;
}

/* =========================
PAGE CONTENT SHIFT
========================= */
.page-content{
    margin-left:320px;
    padding:15px;
    padding-top:var(--topbar-height);
    transition:margin-left 0.3s ease;
    box-sizing:border-box;
}

.sidenav.collapsed ~ .page-content{
    margin-left:90px;
}

/* =========================
HOVER IMPROVEMENT
========================= */
.sidenav:hover{
    box-shadow:6px 0 20px rgba(0,0,0,0.35);
}



/* =========================
KPI SECTION (SCHOOL DASHBOARD)
========================= */
.stats-grid{
    display:grid;
    grid-template-columns: repeat(5,1fr);
    gap:10px;
    padding:15px 20px 5px 20px;
}

.stat-box{
    background:#fff;
    border:1px solid var(--border);
    border-radius:12px;
    padding:12px 10px;
    text-align:center;
    box-shadow:0 1px 4px rgba(0,0,0,0.04);
    transition:0.15s;
}

.stat-box:hover{
    transform:translateY(-1px);
}

/* NUMBER */
.stat-box h2{
    font-size:26px;   /* 🔥 kecikkan dari 34 */
    margin:0;
    font-weight:700;
}

/* LABEL */
.stat-box small{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    font-size:12px;
    margin-top:4px;
}

/* ICON */
.stat-box small i{
    font-size:11px;
    opacity:0.7;
}

/* =========================
SCHOOL KPI COLORS (SOFT & EDUCATION STYLE)
========================= */
.total{ background:#eef2ff; color:#3730a3; }
.attendance{ background:#ecfeff; color:#155e75; }
.present{ background:#ecfdf5; color:#166534; }
.absent{ background:#fef2f2; color:#991b1b; }
.late{ background:#fffbeb; color:#92400e; }
.teacher{ background:#f3f4f6; color:#111827; }
.class{ background:#eef2ff; color:#1e3a8a; }
.subject{ background:#f0f9ff; color:#075985; }
.cctv{ background:#f5f3ff; color:#5b21b6; }
.announcement{ background:#fff7ed; color:#9a3412; }

/* =========================
MENU GRID (SCHOOL NAVIGATION)
========================= */
/* =========================
MENU GRID
========================= */
.menu-grid{
    display:grid;
    grid-template-columns: repeat(4,1fr);
    gap:20px;
    padding:10px 20px 20px 20px; /* ðŸ”¥ atas kecil */
}

.menu-btn{
    background:var(--bg-soft);
    border:1px solid var(--border);
    border-radius:20px;
    padding:85px 20px;
    text-align:center;
    cursor:pointer;
    transition:0.2s;
    box-shadow:0 4px 10px rgba(0,0,0,0.05);
}

.menu-btn:hover{
    background:#f3f4f6;
}

.menu-btn:active{
    transform:scale(0.95);
}

.menu-btn i{
    font-size:100px;
    color:var(--accent);
}

.menu-btn span{
    display:block;
    margin-top:20px;
    font-size:24px;
}


#status {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: white;
}

#video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
}

button {
    position: relative;
    z-index: 10;
}

.camera-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
    z-index: 2;
}

.face-box {
    position: relative;
    z-index: 10;
    text-align: center;
}


.face-guide {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 320px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(0, 255, 120, 0.8);
    border-radius: 18px;
    z-index: 5;
    box-shadow: 0 0 25px rgba(0,255,120,0.4);
}

.face-guide::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    animation: pulseScan 1.5s infinite;
    border: 2px solid rgba(0,255,120,0.5);
}

@keyframes pulseScan {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.2;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

#status {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: #00ff88;
    font-size: 18px;
    font-weight: bold;
    background: rgba(0,0,0,0.6);
    padding: 10px 18px;
    border-radius: 12px;
    letter-spacing: 1px;
}

.scanning-active .face-guide {
    border-color: #00ffcc;
    box-shadow: 0 0 35px rgba(0,255,200,0.6);
}



/* =========================
LARGE SCREEN / KIOSK (TV)
========================= */
@media(min-width:1400px){
    .stats-grid{
        grid-template-columns: repeat(6,1fr);
    }

    .menu-grid{
        grid-template-columns: repeat(5,1fr);
    }

    .stat-box h2{
        font-size:30px;
    }
}

/* =========================
DESKTOP / LAPTOP
========================= */
@media(max-width:1200px){
    .stats-grid{
        grid-template-columns: repeat(5,1fr);
    }

    .menu-grid{
        grid-template-columns: repeat(4,1fr);
    }
}

/* =========================
TABLET LANDSCAPE
========================= */
@media(max-width:1024px){
    .stats-grid{
        grid-template-columns: repeat(3,1fr);
        gap:12px;
    }

    .menu-grid{
        grid-template-columns: repeat(3,1fr);
        gap:14px;
    }

    .stat-box{
        padding:14px 10px;
    }
}




/* =========================
MOBILE
========================= */
@media(max-width:992px){

    .sidenav{
        position:fixed;
        top:calc(var(--topbar-height) - 1px); /* 🔥 rapat betul-betul (fix gap 1px) */
        left:0;
    
        height:calc(100vh - var(--topbar-height) + 1px); /* 🔥 balance balik */
    
        width:280px;
        min-width:280px;
    
        transform:translateX(-100%); /* hidden by default */
        transition:transform 0.3s ease;
    
        z-index:9999;
        
        padding:18px 10px;
        padding-top:20px;
    
        display:flex;
        flex-direction:column;
        align-items:center;
    
        box-shadow:0 1px 1px rgba(0,0,0,0.01); /* 🔥 keep original */
        border-top:1px solid rgba(255,255,255,0.05); /* 🔥 keep original */
    
        box-sizing:border-box;
    }



    /* bila toggle */
    .sidenav.active{
        transform:translateX(0);
    }

    /* disable desktop collapse logic */
    .sidenav.collapsed{
        width:280px !important;
    }

    /* page jangan shift */
    .page-content{
        margin-left:0 !important;
        padding-top:var(--topbar-height);
    }
  
  
    .mobile-toggle{
        display:flex;
    }

    .topbar-actions{
        display:none; /* clean mobile */
    }

    .user-info{
        display:none; /* avatar only */
    }

    .user-avatar{
        width:38px;
        height:38px;
    }

    .topbar-left .logo img{
        height:38px !important;
    }

    .topbar h2{
        font-size:15px;
    }
    .topbar h3{
        font-size:10px;
    }
    
    .sidebar-toggle{
        display:none !important;
    }
    
       /* 🔥 paksa submenu hidup balik */
    .sidenav .sub-menu{
        display:none;
    }

    .sidenav .menu-item.active + .sub-menu{
        display:flex;
    }

    /* 🔥 IGNORE collapsed behavior */
    .sidenav.collapsed .sub-menu{
        display:none;
    }

    .sidenav.collapsed .menu-item.active + .sub-menu{
        display:flex;
    }
    
     /* 🔥 FORCE ignore collapsed untuk submenu */
    .sidenav.collapsed .sub-menu{
        display:none;
    }

    .sidenav.collapsed .menu-item.active + .sub-menu{
        display:flex;
    }
    
    .sub-menu{
        max-height:0;
        overflow:hidden;
        transition:max-height 0.25s ease;
    }
    
    .menu-item.active + .sub-menu{
        max-height:300px;
    }

}



/* =========================
LOGIN
========================= */
.login-box{
    max-width:400px;
    margin:100px auto;
    background:var(--bg-soft);
    padding:35px;
    border-radius:15px;
    border:1px solid var(--border);
}

.company-logo{
    height:80px;
    width:auto;
    border-radius:5px;
    margin-bottom:5px;
}

/* REMOVE GAP DEFAULT h6 */
.company-title{
    margin:0;
    padding:0;
    font-size:18px;
    line-height:1.2;
}

/* ROC RAPAT */
.company-roc{
    font-size:10px;
    color:var(--text-muted);
    margin-left:6px;
    font-weight:400;
}


/* INPUT */
.form-control{
    border-radius:10px;
    background:#fff;
    border:1px solid var(--border);
    color:#000;
    padding:12px;
}

.form-control:focus{
    border-color:#000;
    box-shadow:none;
}

/* BUTTON */
.btn-login{
    border-radius:10px;
    background:#000;
    color:#fff;
    border:none;
    width:100%;
    padding:12px;
    font-weight:bold;
}

.btn-login:hover{
    background:#333;
}

.password-box{
    position:relative;
}

.password-box input{
    padding-right:45px;
}

.toggle-password{
    position:absolute;
    right:12px;
    top:38%;
    cursor:pointer;
    color:#6b7280;
    font-size:16px;
}

.forgot-link{
        text-decoration:none;
        color:var(--text-muted);
        font-size:13px;
    }
    
    .forgot-link:hover{
        text-decoration:underline;
        color:var(--text);
    }

/* =========================
FOOTER (OUTSIDE TOPBAR OPTION)
========================= */
.footer-text{
    text-align:center;
    margin-top:20px;
    margin-bottom:-20px;
    color:var(--text-muted);
}

.footer-text .logo{
    text-align:center;
}

.footer-text .logo h3{
    font-size:16px;
    color:var(--text-muted);
    font-weight:bold;
    margin:0;
}

.footer-text .logo small{
    font-size:6.8px;
    color:var(--text-muted);
    display:block;
    margin-top:-2px;   /* ðŸ”¥ rapatkan Garvis */
}

@media(max-width:768px){

    .logo h2{
        font-size:14px !important;   /* kecilkan nama */
    }

    .logo small{
        font-size:10px !important;   /* kecilkan ROC */
    }

    .logo img{
        height:40px !important;      /* kecilkan logo sikit */
    }
    
    .footer-text .logo h3{
        font-size:16px;
    }
    
    .footer-text .logo small{
        font-size:6.8px !important;
    }  
    
    .company-logo{
        height:60px;
    }

    .company-title{
        font-size:16px;
    }

    .company-roc{
        font-size:9px;
    }
    
    /* =========================
    LOGIN
    ========================= */
    .login-box{
        max-width:330px;
        margin:100px auto;
        background:var(--bg-soft);
        padding:35px;
        border-radius:15px;
        border:1px solid var(--border);
    }

    .page-content{
        margin-top:60px !important;
    }

    /* =========================
    TOPBAR BASE
    ========================= */
    .topbar{
        position:fixed;
        top:0;
        left:0;
        width:100%;
    
        background:var(--bg-soft);
        border-bottom:1px solid var(--border);
    
        display:flex;
        align-items:center;
        justify-content:space-between; /* ðŸ”¥ IMPORTANT */
    
        padding:0 15px;
        z-index:9999;
        
        /* ðŸ”¥ SHADOW */
        box-shadow:0 4px 10px rgba(0,0,0,0.08);
    }
    
    /* LEFT SIDE */
    .topbar-left{
        display:flex;
        align-items:center;
    }
    
    /* RIGHT SIDE */
    .topbar-right{
        display:flex;
        align-items:center;
    }
    
    .user-info{
        display:none; /* ðŸ”¥ MOBILE: show avatar only */
    }

    .user-avatar{
        width:38px;
        height:38px;
    }
    
    /* LOGO */
    .topbar .logo{
        text-align:left;
    }
    
    .topbar h2{
        margin:0;
        font-size:22px;
    }
    
    .topbar small{
        font-size:10px;
        color:var(--text-muted);
        display:block;
        margin-top:-2px;   /* ðŸ”¥ rapatkan Garvis */
    }
    
    /* BUTTON */
    .kiosk-btn{
        background:var(--accent);
        color:#fff;
        border:none;
        padding:8px 14px;
        border-radius:8px;
        font-weight:bold;
        cursor:pointer;
    }


    /* =========================
    KPI (3 COLUMN MOBILE)
    ========================= */
    .stats-grid{
        grid-template-columns:repeat(3,1fr);
        gap:10px;
        padding:10px 10px 5px 10px; /* ðŸ”¥ bawah kecil */
    }

    .stat-box{
        padding:5px 10px;
        border-radius:12px;
    }

    .stat-box h2{
        font-size:28px;
    }

    .stat-box small{
        font-size:12px;
    }

    /* =========================
    MENU (3 COLUMN ICON GRID)
    ========================= */
    .menu-grid{
        grid-template-columns:repeat(3,1fr);
        gap:10px;
        padding:5px 10px 10px 10px; /* ðŸ”¥ atas kecil */
    }

    .menu-btn{
        padding:25px 10px;
        border-radius:12px;
    }

    .menu-btn i{
        font-size:35px;
    }

    .menu-btn span{
        font-size:10px;
        margin-top:8px;
    }
}

/* =========================
DESKTOP COMPACT ERP MODE
========================= */
@media(min-width:1200px){

    .stats-grid{
        grid-template-columns: repeat(6,1fr);
        gap:15px;
    }

    .stat-box{
        padding:25px;
    }

    .stat-box h2{
        font-size:28px;
    }

    .stat-box small{
        font-size:13px;
    }

    .menu-grid{
        grid-template-columns: repeat(4,1fr);
        gap:15px;
    }

    .menu-btn{
        padding:40px 10px;
    }

    .menu-btn i{
        font-size:50px;
    }

    .menu-btn span{
        font-size:14px;
    }

    .logo h2{
        font-size:26px;
    }

    .logo small{
        font-size:12px;
    }
}