/* ============================================
   MOBILE OPTIMIZED - BIRU ZIDSTORE STYLE
   ============================================ */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;
    --secondary: #dbeafe;
    --bg: #f0f4ff;
    --white: #ffffff;
    --text: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --success: #16a34a;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #bfdbfe;
    --shadow: 0 2px 12px rgba(30, 64, 175, 0.10);
    --radius: 12px;
    --radius-sm: 8px;
    --menu-width: 280px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: -apple-system, 'Segoe UI', system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 13px;
    padding: 8px 10px 20px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ===== SIDE NAVIGATION ===== */
.side-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

.side-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-nav {
    position: fixed;
    top: 0;
    left: calc(var(--menu-width) * -1);
    width: var(--menu-width);
    height: 100%;
    background: var(--white);
    z-index: 999;
    box-shadow: 4px 0 30px rgba(0,0,0,0.15);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.side-nav.open {
    left: 0;
}

.side-nav .nav-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.side-nav .nav-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-nav .nav-header .brand .logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.side-nav .nav-header .brand .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.side-nav .nav-header .brand h2 {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

.side-nav .nav-header .brand span {
    font-size: 10px;
    color: var(--text-secondary);
    display: block;
}

.side-nav .nav-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.2s;
}

.side-nav .nav-close:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.side-nav .nav-close:active {
    transform: scale(0.9);
}

.side-nav .nav-menu-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 12px;
}

.side-nav .nav-menu {
    list-style: none;
}

.side-nav .nav-menu li {
    margin-bottom: 2px;
}

.side-nav .nav-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
}

.side-nav .nav-menu li a:active {
    transform: scale(0.97);
}

.side-nav .nav-menu li a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.side-nav .nav-menu li a:hover {
    background: var(--primary-bg);
}

.side-nav .nav-menu li a.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.side-nav .nav-menu li a.active i {
    color: var(--primary);
}

.side-nav .nav-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 16px;
}

.side-nav .nav-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    flex-shrink: 0;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.top-bar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.top-bar-brand .logo {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.top-bar-brand h1 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.top-bar-brand span {
    font-size: 10px;
    color: var(--text-secondary);
    display: block;
    font-weight: 400;
}

.top-bar .menu-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: 0.2s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    margin-left: 6px;
}

.top-bar .menu-btn:active {
    transform: scale(0.92);
    background: var(--primary-bg);
}

.top-bar .menu-btn:hover {
    background: var(--primary-bg);
}

/* ===== HERO ===== */
.hero-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: #fff;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(30, 64, 175, 0.2);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 18px;
    font-weight: 800;
    margin-top: 6px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
    line-height: 1.5;
}

/* ===== INFO PANEL ===== */
.info-panel {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--primary-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.info-panel .info-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.info-panel .info-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.info-panel .info-text {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.info-panel .info-text small {
    font-size: 10px;
    color: var(--text-muted);
}

/* ===== CARDS ===== */
.card-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 10px;
}

.card-panel .card-head {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.card-panel .card-head .title {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-panel .card-head .title i {
    font-size: 13px;
}

.card-panel .card-body {
    padding: 12px 14px;
}

/* ===== FORM ===== */
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-light);
    font-size: 13px;
}

.form-input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 38px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 13px;
}

.form-hint {
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-secondary);
}

.btn-primary {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
}

.btn-outline:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-outline.success {
    border-color: var(--success);
    color: var(--success);
}

.btn-outline.success:hover {
    background: #f0fdf4;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-0 { margin-bottom: 0; }
.gap-1 { gap: 4px; }

/* ===== RESULT ===== */
.result-wrap {
    background: var(--primary-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    min-height: 100px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text);
    transition: 0.2s;
}

.result-wrap.success {
    background: #f0fdf4;
    border-color: #86efac;
}

.result-wrap.error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.result-wrap.warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.result-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 12px 8px;
}

.result-placeholder i {
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
    color: #cbd5e1;
}

.result-placeholder p {
    font-size: 12px;
}

/* ===== QUOTA ITEMS ===== */
.quota-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
}

.quota-item:last-child {
    margin-bottom: 0;
}

.quota-item .q-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.quota-item .q-name .q-sub {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 11px;
}

.quota-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.quota-grid .q-cell {
    background: var(--primary-bg);
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.quota-grid .q-cell .label {
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.quota-grid .q-cell .value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-top: 0;
}

.quota-grid .q-cell .value.success { color: var(--success); }
.quota-grid .q-cell .value.danger { color: var(--danger); }
.quota-grid .q-cell .value.primary { color: var(--primary); }

/* ===== CACHE BADGE ===== */
.cache-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 9px;
    font-weight: 700;
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
    margin-bottom: 8px;
}

/* ===== LIMIT BADGE ===== */
.limit-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 9px;
    font-weight: 700;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    margin-bottom: 8px;
}

/* ===== DB STATUS ===== */
.db-status {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--primary-bg);
    border: 1px solid var(--border);
    margin-top: 8px;
}

.db-status .online { color: var(--success); }
.db-status .offline { color: var(--danger); }

/* ===== FOOTER ===== */
.footer-bottom {
    text-align: center;
    padding: 12px 0 4px;
    color: var(--text-secondary);
    font-size: 10px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}

.footer-bottom strong {
    color: var(--primary);
}

/* ===== LOADER ===== */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(3px);
}

.loader-overlay.active {
    display: flex;
}

.loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

/* ===== TOAST ===== */
.toast-msg {
    position: fixed;
    z-index: 1001;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(70px);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: calc(100% - 24px);
    text-align: center;
}

.toast-msg.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-msg.success { background: var(--success); }
.toast-msg.error { background: var(--danger); }
.toast-msg.warning { background: var(--warning); }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    body { padding: 6px 8px 16px; }
    .quota-grid { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 16px; }
    .top-bar-brand h1 { font-size: 13px; }
    .top-bar-brand span { font-size: 9px; }
    .side-nav { width: 260px; }
    .top-bar .menu-btn { width: 36px; height: 36px; font-size: 16px; }
}

@media (max-width: 360px) {
    .quota-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 14px; }
    .hero-card { padding: 12px 14px; }
    .side-nav { width: 240px; }
}















