/*
 * ZeroixDark — Tema UI untuk manage_ptero_users.html & manage_ptero_servers.html
 * Dipasang SETELAH <style> bawaan halaman, jadi hanya menimpa tampilan (HTML & JS tidak berubah).
 */
:root {
    --bg-color: #070b14;
    --card-bg: rgba(15, 23, 42, 0.72);
    --card-solid: #111827;
    --input-bg: rgba(2, 6, 23, 0.55);
    --border-color: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.22);
    --primary-soft: rgba(13, 148, 136, 0.12);
    --primary-line: rgba(45, 212, 191, 0.28);
    --radius: 14px;
}

/* ---------- Dasar halaman ---------- */
html { background: var(--bg-color); }
body {
    max-width: 1100px;
    padding: 28px 24px 60px;
    box-sizing: border-box;
    background:
        radial-gradient(800px 400px at 10% -10%, rgba(13, 148, 136, 0.14), transparent 60%),
        radial-gradient(600px 300px at 100% 0%, rgba(45, 212, 191, 0.06), transparent 60%),
        var(--bg-color);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(45, 212, 191, 0.3); }

/* ---------- Header ---------- */
.btn-back {
    margin-bottom: 0;
    padding: 9px 16px 9px 12px;
    font-size: 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-sub);
    border: 1px solid var(--border-color);
    box-shadow: none;
}
.btn-back svg { width: 16px; height: 16px; }
.btn-back:hover { background: var(--primary-soft); color: #5eead4; border-color: var(--primary-line); box-shadow: none; transform: none; }

h2 {
    border-left: none;
    padding-left: 0;
    margin: 8px 0 6px;
    gap: 14px;
    font-size: 26px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: -0.5px;
}
h2 svg {
    width: 22px; height: 22px;
    padding: 11px;
    box-sizing: content-box;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.25), rgba(13, 148, 136, 0.08));
    border: 1px solid var(--primary-line);
    fill: #5eead4;
    flex-shrink: 0;
}
.sub-title { margin: 0 0 28px 60px; font-size: 14px; }

/* ---------- Kartu ---------- */
.box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 26px;
    margin-bottom: 22px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.box-header { border-bottom: 1px solid var(--border-color); padding-bottom: 16px; margin-bottom: 22px; }
.box-header h3 { font-size: 13px; font-weight: 700; letter-spacing: 1px; gap: 10px; }
.box-header h3 svg {
    width: 16px; height: 16px;
    padding: 7px;
    box-sizing: content-box;
    border-radius: 10px;
    background: var(--primary-soft);
    fill: #5eead4;
}

/* ---------- Form ---------- */
label { font-size: 11px; font-weight: 600; letter-spacing: 0.6px; margin-bottom: 8px; color: var(--text-sub); }
input, select, .custom-select-trigger {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: rgba(148, 163, 184, 0.5); }
input:hover, .custom-select-trigger:hover { border-color: var(--border-strong); box-shadow: none; background: var(--input-bg); }
input:focus, select:focus, .custom-select-trigger.active {
    border-color: rgba(45, 212, 191, 0.6);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
    background: rgba(2, 6, 23, 0.75);
}
.grid-2, .grid-3 { gap: 14px; margin-bottom: 16px; }
.input-group, .select-wrapper, .custom-select-wrapper { margin-bottom: 16px; }
input[type="checkbox"], .custom-checkbox { min-height: 0; width: 16px; height: 16px; padding: 0; }

/* ---------- Tombol ---------- */
.btn-tambah {
    margin-top: 10px;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, #14b8a6, #0d9488 55%, #0f766e);
    box-shadow: 0 10px 25px -10px rgba(13, 148, 136, 0.7), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.btn-tambah:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(13, 148, 136, 0.8), 0 1px 0 rgba(255, 255, 255, 0.15) inset; filter: brightness(1.05); }
.btn-tambah:active { transform: translateY(0); }

.btn-sapu, .btn-hapus { border-radius: 10px; padding: 8px 14px; font-size: 12px; font-weight: 600; }
.btn-sapu:hover, .btn-hapus:hover { transform: none; box-shadow: none; }

.action-group { gap: 8px; }
.btn-action-small { width: 34px; height: 34px; border-radius: 10px; }
.btn-action-small:hover { transform: none !important; box-shadow: none !important; }

/* ---------- Pencarian ---------- */
.search-container { margin-bottom: 18px; }
.search-container input { padding-left: 42px; background: var(--input-bg); border-color: var(--border-color); }
.search-container svg { left: 15px; }

/* ---------- Tabel ---------- */
.table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(2, 6, 23, 0.3);
}
table { margin-top: 0; border-collapse: separate; border-spacing: 0; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
th {
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-sub);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 0;
}
tr:last-child td { border-bottom: none; }
tr:hover { background: transparent; }
tr:hover td { background: rgba(45, 212, 191, 0.035); }

/* ---------- Badge & label ---------- */
.badge { border-radius: 999px; padding: 5px 11px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; }
.badge-admin { border-radius: 999px; }
.reseller-tag { border-radius: 999px; padding: 3px 9px; }
.expiry-timer { border-radius: 10px; }

/* ---------- Modal ---------- */
.system-modal-overlay { background: rgba(2, 6, 23, 0.78); }
.system-modal-popup, .select-picker-popup {
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--border-strong);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}
.system-modal-header { font-size: 17px; letter-spacing: 0.4px; }
.system-btn { border-radius: 12px; font-size: 13px; text-transform: none; letter-spacing: 0.2px; box-shadow: none; }
.btn-primary-action, .btn-danger-action, .btn-warning-action, .btn-success-action { box-shadow: none; }
.system-btn:hover { transform: translateY(-1px); box-shadow: none !important; filter: brightness(1.08); }
.modal-input { border-radius: 12px; background: var(--input-bg); border-color: var(--border-color); }
.info-detail-system { border-radius: 14px; background: rgba(2, 6, 23, 0.45); border-color: var(--border-color); }
.select-picker-item { border-radius: 12px; }

/* ---------- Scrollbar ---------- */
.table-wrap::-webkit-scrollbar, .select-picker-list::-webkit-scrollbar, .system-modal-popup::-webkit-scrollbar { height: 8px; width: 8px; }
.table-wrap::-webkit-scrollbar-thumb, .select-picker-list::-webkit-scrollbar-thumb, .system-modal-popup::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.2); border-radius: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }

/* ---------- HP ---------- */
@media (max-width: 640px) {
    body { padding: 18px 16px 40px; }
    h2 { font-size: 21px; gap: 12px; }
    h2 svg { width: 18px; height: 18px; padding: 9px; border-radius: 12px; }
    .sub-title { margin-left: 0; margin-bottom: 22px; font-size: 13px; }
    .box { padding: 18px 16px; border-radius: 18px; }
    .box-header { padding-bottom: 14px; margin-bottom: 18px; }
    th, td { padding: 12px 14px; }
}

/* ---------- Lite mode ---------- */
body.lite-mode { background: var(--bg-color); }
body.lite-mode .box { background: var(--card-solid); }
