/* =====================================================================
   Knight East Payment Gateway — Design System
   Primary    : #C5A059 (Gold / Emas)  — premium, sukses, "East"
   Dark BG    : #0F2547 (Navy Blue)    — aman, tepercaya, profesional
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary:          #C5A059;    /* Gold */
    --primary-dark:     #A8873C;    /* Gold Darker */
    --primary-light:    #D4B375;    /* Gold Lighter */
    --primary-glow:     rgba(197, 160, 89, 0.18);

    --navy:             #0F2547;    /* Navy Blue (main dark) */
    --navy-mid:         #162E58;    /* Navy Mid */
    --navy-light:       #1E3A6E;    /* Navy Light (sidebar hover) */
    --navy-surface:     #0C1E3A;    /* Deepest navy (sidebar bg) */

    /* UI Colors */
    --bg-main:          #F4F6FA;    /* Page background (near white) */
    --card-bg:          #FFFFFF;
    --text-main:        #0F2547;    /* Navy text on light bg */
    --text-light:       #FFFFFF;
    --text-muted:       #64748B;
    --border:           #DDE3EE;
    --border-gold:      rgba(197, 160, 89, 0.35);
    --glass:            rgba(255, 255, 255, 0.8);

    /* Status Colors (unchanged — semantic) */
    --green:            #10B981;
    --red:              #EF4444;
    --amber:            #F59E0B;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────────── */
.sidebar {
    width: 260px;
    background: var(--navy-surface);
    color: var(--text-light);
    padding: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(197, 160, 89, 0.15);
    position: relative;
}

/* Gold accent line on the right edge */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.logo-area {
    padding: 28px 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
}

.logo-area img {
    height: 32px;
}

/* Nav */
.nav-links {
    list-style: none;
    flex-grow: 1;
    padding: 0 12px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.nav-link i {
    width: 18px;
    font-size: 14px;
}

.nav-link:hover {
    background: var(--navy-light);
    color: var(--text-light);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--navy-surface);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.35);
}

.nav-link.active i {
    color: var(--navy-surface);
}

/* Section labels */
.nav-links > div {
    padding: 10px 14px 4px;
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-top: 8px;
}

/* ── SIDEBAR BADGES ──────────────────────────────────────────────────── */
.badge {
    background: var(--red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* ── USER INFO (bottom sidebar) ──────────────────────────────────────── */
.user-info-sidebar {
    margin-top: auto;
    padding: 16px 24px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── MAIN CONTENT ─────────────────────────────────────────────────────── */
.main-content {
    flex-grow: 1;
    padding: 32px;
    overflow-y: auto;
    background: var(--bg-main);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header h1 {
    color: var(--navy);
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 2px;
}

/* ── STAT CARDS ──────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(15, 37, 71, 0.06);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
    border-radius: 4px 0 0 4px;
}

.stat-card:hover {
    box-shadow: 0 8px 24px rgba(15, 37, 71, 0.10);
}

.stat-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--navy);
}

.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── DATA CARD / TABLE WRAPPER ───────────────────────────────────────── */
.data-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(15, 37, 71, 0.05);
}

.section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15, 37, 71, 0.05);
}

/* ── TABLE ───────────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 14px;
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 2px solid var(--border);
    background: rgba(15, 37, 71, 0.03);
}

td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(197, 160, 89, 0.04);
}

.table-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(15, 37, 71, 0.04);
}

/* ── STATUS BADGES ───────────────────────────────────────────────────── */
.status-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-paid,
.status-completed {
    background: #D1FAE5;
    color: #065F46;
}

.status-rejected {
    background: #FEE2E2;
    color: #991B1B;
}

.status-waiting_merchant_fund,
.status-waiting {
    background: #FFEDD5;
    color: #C2410C;
    border: 1px solid #FED7AA;
}

/* ── ACTION BUTTONS ──────────────────────────────────────────────────── */
.btn-approve {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.15s;
}

.btn-approve:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-reject {
    background: #FEE2E2;
    color: #991B1B;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
    transition: all 0.15s;
}

.btn-reject:hover {
    background: var(--red);
    color: white;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--navy-surface);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(197, 160, 89, 0.4);
}

.btn-secondary {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ── PREMIUM MODAL SYSTEM ────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 37, 71, 0.65);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 25px 60px rgba(15, 37, 71, 0.3);
    border: 1px solid rgba(197, 160, 89, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-banner {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 32px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.modal-banner::before {
    content: '';
    position: absolute;
    bottom: -20px; right: -20px;
    width: 100px; height: 100px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.1;
}

.modal-banner i {
    font-size: 40px;
    margin-bottom: 16px;
    background: rgba(197, 160, 89, 0.2);
    border: 1.5px solid rgba(197, 160, 89, 0.4);
    color: var(--primary);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    display: inline-block;
}

.modal-form-container {
    padding: 32px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-main);
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.modal-footer button {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--navy-surface);
    border: none;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.25);
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.35);
}

.btn-modal-secondary {
    background: var(--bg-main);
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-modal-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ── SETTINGS PAGE ────────────────────────────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 28px;
}

.payment-method-card {
    background: var(--bg-main);
    padding: 24px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    transition: all 0.2s;
}

.payment-method-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.12);
}

/* ── BANK ITEMS ──────────────────────────────────────────────────────── */
.bank-item {
    background: #fff;
    border: 1.5px solid var(--border);
    padding: 16px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.bank-item:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.12);
}

.bank-info h4 {
    font-weight: 700;
    color: var(--navy);
    font-size: 14px;
    margin-bottom: 2px;
}

.bank-info p {
    font-size: 13px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.bank-info span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── TOGGLE SWITCH (QRIS) ─────────────────────────────────────────────── */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input { display: none; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #CBD5E1;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: '';
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

input:checked + .slider { background: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }

/* ── HEADER ACTIONS ──────────────────────────────────────────────────── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── LOGOUT BUTTON ───────────────────────────────────────────────────── */
.logout-btn {
    color: rgba(255,255,255,0.4) !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    margin-top: 12px;
}

.logout-btn:hover {
    color: #EF4444 !important;
}

/* ── SCROLLBAR ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── QRIS SLOT CARDS (VIVID & TACTILE) ─────────────────────────────── */
.qris-slot-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.qris-slot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 37, 71, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

/* ── QUICK PILL PRESETS ─────────────────────────────────────────────── */
.quick-pill {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.quick-pill:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f2547;
    transform: translateY(-1px);
}