

/* assets/style.css */



/* DEFAULT THEME CLASS */
body.theme-dark {
    --bg-main: linear-gradient(180deg,#051014,#081318);
    --text-color: #eafaf1;
    --glass-bg: rgba(255,255,255,0.03);
}

body.theme-light {
    --bg-main: #f7fdf9;
    --text-color: #1b2b1f;
    --glass-bg: rgba(0,0,0,0.06);
}

/* Reset and root */
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;background: var(--bg-main);color: var(--text-color);-webkit-font-smoothing:antialiased}
a{color:inherit}

/* GLASS */
.glass{background: var(--glass-bg);border:1px solid rgba(255,255,255,0.04);backdrop-filter: blur(8px);border-radius:12px;box-shadow:0 8px 30px rgba(0,0,0,0.6)}

/* NEON ACCENT */
:root{
  --accent1: #0db14b; /* neon green */
  --accent2: #ffe600; /* yellow */
  --muted: #9fb7a6;
  --glass-bg: rgba(255,255,255,0.02);
}

/* LOADER */
#loader{position:fixed;z-index:99999;left:0;top:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg, rgba(3,7,10,0.75), rgba(3,7,10,0.9))}
.spinner{width:64px;height:64px;border-radius:50%;background:conic-gradient(var(--accent1),var(--accent2),#0ff);animation:spin 1.1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* LOGIN LAYOUT */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}
.login-card{width:100%;max-width:420px;padding:28px; text-align:center}
.logo{width:84px;margin:0 auto 8px;display:block}
.brand{font-size:20px;margin:6px 0;color:var(--accent1);font-weight:700}
.login-form label{display:block;text-align:left;color:var(--muted);font-size:13px;margin-top:12px}
.login-form input{width:100%;padding:12px;border-radius:10px;border:none;background:rgba(0,0,0,0.35);color:#fff;margin-top:6px;outline:none}
.btn-primary{width:100%;padding:12px;border-radius:10px;border:0;background:linear-gradient(90deg,var(--accent1),var(--accent2));color:#071014;font-weight:700;margin-top:14px;cursor:pointer;box-shadow:0 8px 20px rgba(13,177,75,0.12)}
.alert{padding:10px;background:rgba(255,0,0,0.08);color:#ffd6d6;border-radius:8px;margin:10px 0}

/* TOPBAR */
.topbar{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;position:sticky;top:0;z-index:40}
.topbar .page-title{font-weight:700}
.icon-btn{background:transparent;border:0;color:var(--muted);font-size:20px;cursor:pointer}
.theme-toggle{cursor:pointer;margin-right:10px;padding:6px;border-radius:8px;background:rgba(255,255,255,0.02)}

/* SIDEBAR */
.sidebar{width:240px;padding:18px;height:calc(100vh - 0);position:fixed;left:0;top:64px;overflow:auto}
.sidebar-top{text-align:center;margin-bottom:12px}
.sidebar-logo{width:64px;display:block;margin:0 auto 8px}
.sidebar-title{font-weight:700;color:var(--accent1)}
.sidebar-nav{padding-top:6px}
.sidebar.show {
    left: 0 !important;
    transform: translateX(0) !important;
}
.menu-list{list-style:none;padding-left:0;margin:0}
.menu-list ul {
    padding-left: 20px;
    margin-top: 6px;
}
.menu-item{margin-bottom:6px}
.menu-item > a{display:flex;align-items:center;padding:10px;border-radius:10px;color:#eafaf1;text-decoration:none}
.menu-icon{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;margin-right:12px;background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));border-radius:8px}
.menu-item a:hover{background:linear-gradient(90deg,rgba(13,177,75,0.06),rgba(255,230,0,0.04));transform:translateX(6px);transition:all .14s ease}

/* MAIN content */
.content{margin-left:260px;padding:20px}
.page-inner{max-width:1100px;margin:0 auto}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:14px}
.card{padding:16px;border-radius:12px}

/* GLOBAL CARD WRAPPER (responsif) */
.card-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 16px auto;
}

/* Card */
.card-custom {
    padding: 16px;
    background: var(--glass-bg);
    border-radius: 12px;
    border:1px solid rgba(255,255,255,0.05);
    box-shadow:0 8px 20px rgba(0,0,0,0.25);
}

/* bottom nav (mobile) */
/* ======================= BOTTOM NAV ======================= */
.bottom-nav{
    position:fixed;
    bottom:12px;
    left:12px;
    right:12px;
    height:64px;
    display:flex;
    justify-content:space-around;
    align-items:center;
    padding:8px;
    border-radius:14px;
    box-shadow:0 8px 25px rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    z-index:90;
    transition: background .25s, color .25s;
}

.bottom-nav .nav-item.active .nav-icon i,
.bottom-nav .nav-item.active .nav-icon span {
    color: var(--accent1) !important;
}

/* LIGHT MODE */
body.theme-light .bottom-nav {
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(0,0,0,0.08);
    color:#0c1e14;
}

body.theme-light .bottom-nav .nav-item {
    color:#0c1e14;
}

body.theme-light .bottom-nav .nav-icon i,
body.theme-light .bottom-nav .nav-icon span {
    color:#0c1e14 !important;
}

/* DARK MODE */
body.theme-dark .bottom-nav {
    background: rgba(10,20,15,0.35);
    border: 1px solid rgba(255,255,255,0.05);
    color: #d9ffe6;
}

body.theme-dark .bottom-nav .nav-item {
    color:#d9ffe6;
}

body.theme-dark .bottom-nav .nav-icon i,
body.theme-dark .bottom-nav .nav-icon span {
    color:#d9ffe6 !important;
}

/* Item default */
.bottom-nav .nav-item{
    flex:1;
    text-align:center;
    font-size:12px;
    text-decoration:none;
    transition:opacity .2s ease;
}

.bottom-nav .nav-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    margin-bottom:3px;
}


/* profile table */
.profile-table{width:100%;max-width:700px;border-collapse:collapse;margin-top:12px}
.profile-table th{width:200px;padding:8px;color:var(--muted);text-align:left}
.profile-table td{padding:8px}

/* footer */
.footer{text-align:center;padding:18px;color:var(--muted)}

/* responsive */
@media(max-width:900px){
  .cards{grid-template-columns:repeat(2,1fr)}
  .content{margin-left:0;padding-bottom:120px}
  .sidebar{
    position:fixed;
    left:-300px;
    top:64px;
    height:calc(100vh - 64px);
    transition:left .25s ease;
    z-index:200;
  }
  .sidebar.show{
    left:0;
  }
}

/* COLLAPSE SUBMENU */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease-out;
    padding-left: 12px;
}

.menu-link.has-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-link .arrow {
    transition: transform .25s ease;
    margin-left: 8px;
    font-size: 12px;
    opacity: .7;
}

.menu-link.active .arrow {
    transform: rotate(180deg);
}


/* Icon wrappers */
.menu-icon-wrapper { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; margin-right:12px; border-radius:8px; background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); }

.menu-icon-fa { font-size:16px; color:var(--accent1); }
.menu-icon-mi { font-size:18px; color:var(--accent1); line-height:36px; }
.menu-icon-emoji { font-size:18px; }

/* adjust if icon-only (collapsed sidebar) */
.menu-link .menu-text { flex:1; }


.bottom-nav .nav-icon {
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    height:24px;
    margin-bottom:4px;
}

.bn-fa { font-size:18px; }
.bn-mi { font-size:20px; line-height:24px; }
.bn-emoji { font-size:18px; }


@media(max-width:600px){
	.cards{grid-template-columns:1fr}
	  .sidebar{
		transform: translateX(-100%);
	  }
	  .sidebar.show{
		transform: translateX(0);
	  }
	  .bottom-nav{display:flex}
	  .content { margin-left:0 }
	  .card-wrapper {
			max-width: 92%;
		}
	
	.modal-box {
        max-height: 90vh;     /* tetap scrollable */
        margin: 20px 10px;    /* beri jarak atas/bawah & kiri/kanan */
        width: 95%;           /* lebih full-width di mobile */
    }
}

@media(min-width:901px){
    .sidebar {
        left: 0 !important;
        transform: none !important;
    }
    .sidebar.show {
        left: 0 !important;
        transform: none !important;
    }
}

/* --- THEME LIGHT SIDEBAR FIX --- */
body.theme-light .sidebar {
    background: #c9f7d8; /* hijau pastel */
    color: #0a2f17;
}

body.theme-light .menu-item > a {
    color: #0a2f17;
    background: rgba(0, 128, 0, 0.10); /* hijau transparan */
}

body.theme-light .menu-item a:hover {
    background: rgba(0, 128, 0, 0.20);
    transform: translateX(6px);
}

body.theme-light .menu-icon {
    background: rgba(0, 128, 0, 0.15);
    color: #0a2f17 !important;
}

body.theme-light .sidebar-title {
    color: #0a2f17;
}

body.theme-light .sidebar-bottom .logout-link {
    color: #0a2f17;
}

body.theme-light .sidebar-nav .menu-list ul {
    border-left: 2px solid rgba(0,128,0,0.25);
}


.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-table th,
.profile-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.profile-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.profile-table td:first-child {
    font-weight: bold;
    color: #333;
}

@media(max-width: 600px) {
    .profile-table th, .profile-table td {
        font-size: 14px;
        padding: 8px;
    }
}


.notif-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notif-item {
    padding: 6px 0;
}

.notif-item strong {
    color: var(--accent);
}

hr {
    border: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 6px 0;
}

/* Overlay */
/* ========== OVERLAY ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

/* Saat modal dibuka */
.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ========== MODAL BOX BASE ========== */
.modal-box {
    width: 95%;
	max-height: 90vh; /* <--- batasi tinggi modal */
    overflow-y: auto;  /* <--- tambahkan scroll jika konten tinggi */
    max-width: 460px;
    padding: 20px 22px;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,.22);
    transform: translateY(25px);
    opacity: 0;
    transition: .3s ease;
    backdrop-filter: blur(16px);
}

/* Animasi muncul */
.modal-overlay.show .modal-box {
    transform: translateY(0px);
    opacity: 1;
}

/* ========== LIGHT MODE ========== */
body:not(.theme-dark) .modal-box {
    background: rgba(255, 255, 255, .8);
    color: #222;
}

/* Input Light */
body:not(.theme-dark) .modal-box input,
body:not(.theme-dark) .modal-box select,
body:not(.theme-dark) .modal-box textarea {
    background: rgba(255,255,255,0.9);
    color: #222;
    border: 1px solid #ccc;
}

/* ========== DARK MODE ========== */
body.theme-dark .modal-box {
    background: rgba(30, 30, 30, .75);
    color: #eee;
}

/* Input Dark */
body.theme-dark .modal-box input,
body.theme-dark .modal-box select,
body.theme-dark .modal-box textarea {
    background: rgba(50,50,50,.85);
    color: #eee;
    border: 1px solid #666;
}

/* Label */
.modal-box label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

/* Form group */
.modal-box .form-group {
    margin-bottom: 14px;
}

/* Input universal */
.modal-box input,
.modal-box select,
.modal-box textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 12px;
}

/* ========== BUTTONS ========== */
.modal-actions {
    text-align: center;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(45deg, #22c55e, #b4ff3f);
    padding: 10px 20px;
    border-radius: 14px;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.btn-cancel {
    background: #ccc;
    padding: 10px 20px;
    border-radius: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    color: #333;
}

/* Tombol Cancel Dark */
body.theme-dark .btn-cancel {
    background: #444;
    color: #eee;
}

/* ===========================
   FIX: OPTION TEXT TIDAK MUNCUL
   =========================== */

/* Default (Light Mode) */
select option {
    color: #000 !important;
    background: #fff !important;
}

/* Dark Mode */
body.theme-dark select option {
    color: #fff !important;
    background: #1c1c1c !important;
}

/* Pastikan placeholder terlihat */
select:invalid {
    color: #888 !important;
}
