/*
 * ZEROMIKH UNIFIED STYLESHEET
 * Status: FINAL (Solid Colored Stats - Sharp & Clean)
 * Updated: Removed Neon Effect for sharper look
 */

/* =================================================================
   1. UNIVERSAL RESET
   ================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; font-family: 'Inter', 'Plus Jakarta Sans', sans-serif; }

body { 
    background: var(--bg-fallback);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text); 
    margin: 0; 
    padding: 15px; 
    min-height: 100vh;
    font-size: 13px; 
    overflow-x: hidden; 
    overflow-y: auto;
}

/* =================================================================
   2. VARIABEL WARNA (DARK MODE DEFAULT)
   ================================================================= */
:root {
    /* --- DARK BASE --- */
    --bg-gradient: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --bg-fallback: #0f172a;
    
    /* --- INPUTS --- */
    --bg-input: #0f172a; 
    --border-input: #334155; 
    --shadow-input: none; 

    /* --- COMPONENTS --- */
    --card: #1e293b; 
    --text: #f1f5f9; 
    --text-m: #94a3b8; 
    --border: #334155;

    /* --- ACCENTS --- */
    --primary: #818cf8; 
    --primary-s: rgba(129,140,248,0.1);
    --primary-glow: rgba(129, 140, 248, 0.15);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    
    --green: #10b981;
    --red: #ef4444;
    --orange: #f59e0b;
    --purple: #a855f7;
    --blue: #3b82f6;
    --pink: #ec4899;

    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

    /* --- AUTH SPECIFIC (DARK) --- */
    --auth-bg: #0B1120;
    --auth-card: #151E32;
    --auth-border: #2A3B55;
    --auth-input-bg: #edf2f7; 
    --auth-input-text: #0f172a; 
    --auth-btn: #6366f1;
}

.container { max-width: 1100px; margin: auto; }
::selection { background: var(--purple); color: #ffffff; }

/* Scrollbar Custom (Dark) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =================================================================
   3. AUTH PAGE (LOGIN/REGISTER)
   ================================================================= */
body.auth-page {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background: var(--auth-bg) !important;
    display: flex; align-items: center; justify-content: center; padding: 15px;
    overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; z-index: 10;
}

body.auth-page .container { 
    display: flex; justify-content: center; align-items: center;
    width: 100%; min-height: 100%; padding: 20px 0;
}

.auth-card {
    background: var(--auth-card) !important;
    padding: 30px 25px;
    max-width: 380px; width: 100%; border-radius: 20px; 
    border: 1px solid var(--auth-border); 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    text-align: center; position: relative; overflow: hidden;
    transition: all 0.3s ease;
}

.auth-card .logo { font-size: 26px; font-weight: 800; margin-bottom: 0px; color: #ffffff; letter-spacing: -0.5px; line-height: 1; display: block; width: 100%; text-align: center; }
.auth-card .logo span { color: var(--auth-btn); }
.logo-subtitle { font-size: 16px; font-weight: 700; margin-top: 6px; margin-bottom: 25px; background: linear-gradient(90deg, #6366f1, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: block; width: 100%; text-align: center; }

/* Input Group Compact */
.input-group {
    position: relative;
    margin-bottom: 10px; 
    width: 100%;
}

/* Input Deep Dark */
.auth-card input {
    background: #020617 !important; 
    border: 1px solid var(--border-input); 
    color: #fff !important;
    height: 48px; 
    padding: 0 16px; 
    border-radius: 12px; width: 100%; 
    font-weight: 600; font-size: 14px; outline: none; transition: all 0.2s;
}
.auth-card input:focus { border-color: var(--auth-btn); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); }

/* Button Main Compact */
.auth-card .btn-main { 
    background: #5865F2; 
    color: white; 
    border: none; 
    height: 48px; 
    border-radius: 12px; 
    font-weight: 700; 
    font-size: 15px; 
    width: 100%; 
    margin-top: 10px; 
    cursor: pointer; 
    box-shadow: 0 5px 15px -3px rgba(88, 101, 242, 0.4); 
    transition: 0.3s; 
}
.auth-card .btn-main:hover { filter: brightness(1.1); transform: translateY(-2px); }

.link-auth { display: block; margin-top: 20px; color: #94a3b8; text-decoration: none; font-size: 13px; font-weight: 500; cursor: pointer; }
.link-auth:hover { color: white; }
.link-auth span { color: var(--auth-btn); font-weight: 600; }

.auth-card label { display: none; } 
.auth-card .msg { padding: 12px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 20px; text-align: left; line-height: 1.4; }
.auth-card .msg-err { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.auth-card .msg-ok { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }

/* Autofill Fix */
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #020617 inset !important; -webkit-text-fill-color: white !important; }

/* =================================================================
   4. DASHBOARD COMPONENTS
   ================================================================= */
.sticky-header { 
    position: sticky; top: 0; z-index: 99; 
    background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); 
    padding-top: 10px; padding-bottom: 5px; margin-bottom: 20px; 
    margin-left: -15px; margin-right: -15px; padding-left: 15px; padding-right: 15px; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; gap: 10px; }
.top-nav .logo { font-size: 20px; font-weight: 800; white-space: nowrap; letter-spacing: -0.5px; line-height: 1; color: white; } 
.top-nav .logo span { color: var(--primary); }
.say-hi { font-size: 11px; font-weight: 800; margin-top: 4px; background: linear-gradient(45deg, var(--primary), var(--purple), var(--pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-actions { display: flex; gap: 4px; align-items: center; }
.btn-nav { background:var(--card); border:1px solid var(--border); padding:5px 8px; border-radius:8px; cursor:pointer; color:var(--text); font-weight:700; text-decoration:none; font-size:10px; white-space: nowrap; display: flex; align-items: center; transition: 0.2s; }

.card { background: var(--card); border-radius: 20px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.stat-card { background: var(--card); padding: 12px 10px; border-radius: 12px; border: 1px solid var(--border); text-align: center; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; user-select: none; }
.stat-card:hover, .stat-clickable:hover { transform: translateY(-5px); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2); }
.stat-card:active { transform: scale(0.98); }
.stat-card small { color: var(--text-m); font-size: 9px; font-weight: 700; text-transform: uppercase; display: block; }

/* [MODIFIED] Menghapus warna putih statis */
.stat-card div { 
    font-size: 16px; 
    font-weight: 800; 
    margin-top: 2px; 
    /* color: #fff;  <-- DIHAPUS agar warna custom di bawah bisa masuk */
}

.stat-card.s-balance { grid-column: span 2; border-bottom: 3px solid var(--green) !important; color: var(--green); display: flex; justify-content: space-between; align-items: center; text-align: left; cursor: default; }
.stat-card.s-balance:hover { transform: none; box-shadow: none; }
.s-total, .s-members { border-bottom: 3px solid var(--blue); }
.s-aktif { border-bottom: 3px solid var(--green); }
.s-omset { border-bottom: 3px solid var(--green); grid-column: span 2; }
.s-warn { border-bottom: 3px solid var(--orange); }
.s-exp { border-bottom: 3px solid var(--red); }
.s-subdom { border-bottom: 3px solid var(--purple) !important; }

.grid-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }

label { display: block; font-size: 10px; font-weight: 800; color: var(--text-m); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; margin-left: 2px; }

/* Input Dashboard */
body:not(.auth-page) input, 
body:not(.auth-page) select { 
    background: var(--bg-input); border: 1px solid var(--border-input); color: var(--text); padding: 12px 16px; border-radius: 12px; width: 100%; outline: none; margin-bottom: 8px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); font-weight: 600; box-shadow: var(--shadow-input);
}
body:not(.auth-page) input:hover, body:not(.auth-page) select:hover { border-color: var(--primary); background: #263346; }
body:not(.auth-page) input:focus, body:not(.auth-page) select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); background: #263346; transform: translateY(-1px); }
body:not(.auth-page) input::placeholder { color: #64748b; font-weight: 500; }
body:not(.auth-page) select option { background-color: var(--card); color: var(--text); padding: 10px; }

body:not(.auth-page) .btn-main { background: var(--primary-gradient); color: white; border: none; padding: 14px; border-radius: 12px; font-weight: 700; width: 100%; margin-top: 15px; cursor: pointer; transition: 0.3s; box-shadow: 0 8px 20px -5px rgba(99, 102, 241, 0.3); }
body:not(.auth-page) .btn-main:hover { transform: translateY(-2px); box-shadow: 0 12px 25px -5px rgba(99, 102, 241, 0.4); filter: brightness(1.1); }

#price-display { background: var(--primary-s); color: var(--primary); padding: 12px; border-radius: 12px; font-weight: 800; font-size: 14px; text-align: center; margin-top: 15px; border: 1px dashed var(--primary); }
#form-wrapper { display: block; transition: 0.3s; }
.toggle-icon { display: none; margin-left: auto; font-size: 18px; color: var(--text-m); }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th { text-align: left; font-size: 10px; color: var(--text-m); padding: 12px; border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text); }
th a:hover { color: var(--primary); text-decoration: underline; }

.badge { padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; display: inline-block; }
.bg-bs { background: rgba(56, 189, 248, 0.1); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.2); } 
.bg-pg { background: rgba(251, 146, 60, 0.1); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.2); } 
.bg-pending { background: rgba(250, 204, 21, 0.1); color: #facc15; border: 1px solid rgba(250, 204, 21, 0.2); } 
.bg-lunas { background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.2); } 
.dot { height: 8px; width: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

.btn-action { padding: 6px 12px; border-radius: 8px; border: none; font-size: 10px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; margin-left: 2px; transition: 0.2s; color: white; }
.btn-action:hover { filter: brightness(1.2); transform: translateY(-1px); }
.btn-renew, .btn-acc { background: var(--green); }
.btn-setup { background: var(--orange); }
.btn-download { background: var(--blue); }
.btn-pg, .btn-db, .btn-free { background: var(--purple); }
.btn-edit { background: var(--orange); }
.btn-del { background: var(--red); }
.btn-undo { background: var(--text-m); color: white; }

.tab-nav { display: flex; gap: 5px; border-bottom: 1px solid var(--border); margin-bottom: 15px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn { background: none; border: 1px solid transparent; color: var(--text-m); font-weight: 700; font-size: 11px; padding: 10px 14px; cursor: pointer; white-space: nowrap; border-radius: 10px; transition: 0.2s; flex-shrink: 0; }
.tab-btn.active { color: var(--primary); background: var(--primary-s); border-color: var(--primary); }
.tab-btn:hover { background: rgba(255,255,255,0.05); }
.tab-content { display: none; animation: fadeIn 0.3s ease-in-out; }
.tab-content.active { display: block; }
.badge-count { background: var(--red); color: white; padding: 2px 6px; border-radius: 10px; font-size: 9px; margin-left: 5px; }

.modal { display:none; position:fixed; z-index:999; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.6); align-items:center; justify-content:center; backdrop-filter: blur(4px); }
.modal-content { background:var(--card); padding:25px; border-radius:20px; width:90%; max-width:350px; border:1px solid var(--border); box-shadow: var(--card-shadow); color: var(--text); }
.alert { padding: 15px; border-radius: 15px; text-align: center; margin-bottom: 20px; font-weight: 700; background: var(--primary-s); color: var(--primary); border: 1px solid var(--primary); }

#simpleOverlay { display:none; position:fixed; z-index:9999; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.85); align-items:center; justify-content:center; color:white; text-align:center; }
.spinner { border: 4px solid rgba(255,255,255,0.1); border-top: 4px solid var(--primary); border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin: 0 auto 20px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }

.search-wrapper { display: flex; align-items: center; border: 1px solid var(--border); background: var(--bg-input); border-radius: 8px; flex: 1; max-width: 450px; height: 42px; padding-left: 15px; overflow: hidden; transition: border-color 0.2s; }
.search-wrapper:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow); }
.search-wrapper input { border: 0 !important; border-style: none !important; box-shadow: none !important; outline: none !important; background: transparent !important; color: var(--text); font-weight: bold; flex: 1; height: 100%; padding: 0; min-width: 50px; font-size: 13px; }
.search-btn { background: transparent; border: none; color: var(--text-m); height: 100%; padding: 0 15px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.search-btn:hover { color: var(--primary); background: rgba(255,255,255,0.05); }

.page-nav { display:flex; justify-content:center; gap:8px; margin-top:20px; }
.page-btn { padding:8px 14px; background:var(--card); border:1px solid var(--border); color:var(--text); border-radius:8px; text-decoration:none; font-weight:bold; font-size: 12px; transition: 0.2s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background:var(--primary); border-color:var(--primary); color:white; }

.link-sub { text-decoration: none; color: var(--text); transition: 0.3s; }
.link-sub:hover { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }

.wa-float { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: all 0.3s ease; }
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 42px; height: 42px; fill: #25d366; filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.3)); animation: wa-bounce 3s infinite ease-in-out; }

.progress-container { width: 100%; background-color: var(--primary-s); border-radius: 20px; height: 8px; overflow: hidden; position: relative; margin-top: 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--purple)); width: 0%; border-radius: 20px; transition: width 0.5s ease; position: relative; }
.progress-text { font-size: 10px; font-weight: 800; color: var(--primary); display: flex; justify-content: space-between; margin-bottom: 3px; letter-spacing: -0.2px; }

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wa-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(234, 88, 12, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); } }

@media (max-width: 768px) {
    #form-wrapper { display: none; overflow: hidden; padding-top: 10px; border-top: 1px solid var(--border); }
    #form-wrapper.show { display: block; animation: fadeIn 0.3s; }
    .card-header-mobile { cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding-bottom: 0px; margin-bottom: 0px; }
    .toggle-icon { display: block; transition: 0.3s; }
    .toggle-icon.rotate { transform: rotate(180deg); }
}

/* Floating Toast */
.floating-alert {
    position: fixed; top: 30px; left: 50%; transform: translateX(-50%); z-index: 99999;
    background: #1e293b; color: white; border-left: 5px solid var(--primary);
    padding: 12px 25px; border-radius: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    font-weight: 600; font-size: 13px; text-align: center; min-width: 300px; max-width: 90%;
    animation: slideDownFade 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideDownFade { 0% { top: -100px; opacity: 0; } 100% { top: 30px; opacity: 1; } }

.form-view { width: 100%; transition: opacity 0.3s ease, transform 0.3s ease; }
.hidden { display: none !important; }

/* =================================================================
   8. CUSTOM STATISTIC COLORS (SOLID & TEGAS)
   ================================================================= */

/* 1. Saldo & Aktif (HIJAU SOLID) */
.s-balance div, 
.s-aktif div,
.s-omset div {
    color: var(--green);
    /* Tidak pakai text-shadow agar tegas */
}

/* 2. Total (BIRU SOLID) */
.s-total div, 
.s-members div {
    color: var(--blue);
}

/* 3. H-7 / Warning (ORANGE SOLID) */
.s-warn div {
    color: var(--orange);
}

/* 4. Expired (MERAH SOLID) */
.s-exp div {
    color: var(--red);
}

/* 5. Subdomain (UNGU SOLID) */
.s-subdom div {
    color: var(--purple);
}

/* Efek Hover: Sedikit lebih terang (Brightness) */
.stat-card:hover div {
    filter: brightness(1.3);
    transition: 0.3s;
}