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

:root {
    --bg: #070a12;
    --bg-glow-1: rgba(247,147,26,0.10);
    --bg-glow-2: rgba(0,217,163,0.07);
    --card-bg: #10152580;
    --card-border: rgba(255,255,255,0.07);
    --card-border-hover: rgba(247,147,26,0.35);
    --primary: #F7931A;
    --primary-dark: #D97D0A;
    --success: #00D9A3;
    --danger: #FF5C6C;
    --warning: #FFB020;
    --text: #E9EDF4;
    --text-muted: #8993AC;
    --sidebar-bg: #050710;
    --border: rgba(255,255,255,0.08);
    --radius: 14px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background:
        radial-gradient(ellipse 900px 500px at 8% -5%, var(--bg-glow-1), transparent 60%),
        radial-gradient(ellipse 800px 600px at 100% 15%, var(--bg-glow-2), transparent 55%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

h1, h2, h3 { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -0.01em; }

a { text-decoration: none; color: inherit; }

.layout { display: flex; min-height: 100vh; position: relative; }
.layout::before {
    content: "\20BF";
    position: fixed;
    right: -60px;
    bottom: -120px;
    font-family: 'Sora', sans-serif;
    font-size: 620px;
    font-weight: 800;
    color: rgba(247,147,26,0.035);
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}
.layout::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='146' viewBox='0 0 84 146'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.025)' stroke-width='1'%3E%3Cpath d='M42 0 L84 24.3 L84 72.9 L42 97.2 L0 72.9 L0 24.3 Z'/%3E%3Cpath d='M42 48.6 L84 72.9 L84 121.5 L42 145.8 L0 121.5 L0 72.9 Z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* Sidebar */
.sidebar {
    width: 248px;
    background: linear-gradient(180deg, var(--sidebar-bg), #070a14);
    color: var(--text-muted);
    flex-shrink: 0;
    padding: 22px 0;
    border-right: 1px solid var(--border);
    position: relative;
    z-index: 1;
}
.sidebar .brand {
    padding: 0 22px 20px;
    font-family: 'Sora', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar .brand::before {
    content: "";
    display: inline-flex;
    width: 26px; height: 26px;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22hexGrad2%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%22100%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23F7931A%22/%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23FFB300%22/%3E%3C/linearGradient%3E%3ClinearGradient%20id%3D%22badgeGrad2%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%22100%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%2300D9A3%22/%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%2300B589%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d%3D%22M50%2C4%20L89.8%2C27%20L89.8%2C73%20L50%2C96%20L10.2%2C73%20L10.2%2C27%20Z%22%20fill%3D%22url%28%23hexGrad2%29%22/%3E%3Ctext%20x%3D%2246%22%20y%3D%2266%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-weight%3D%22900%22%20font-size%3D%2254%22%20fill%3D%22%230a0d16%22%20text-anchor%3D%22middle%22%3EB%3C/text%3E%3Ccircle%20cx%3D%2280%22%20cy%3D%2280%22%20r%3D%2217%22%20fill%3D%22url%28%23badgeGrad2%29%22%20stroke%3D%22%230a0d16%22%20stroke-width%3D%222%22/%3E%3Cpath%20d%3D%22M73%2C86%20L85%2C74%20M85%2C74%20L85%2C81%20M85%2C74%20L78%2C74%22%20stroke%3D%22%230a0d16%22%20stroke-width%3D%223.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20fill%3D%22none%22/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    border-radius: 7px;
    flex-shrink: 0;
}
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 500;
    border-left: 2px solid transparent;
    transition: background .15s, color .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.sidebar nav a.active {
    background: linear-gradient(90deg, rgba(247,147,26,0.12), transparent);
    color: #fff;
    border-left-color: var(--primary);
}

/* Main content */
.main { flex: 1; padding: 28px 34px; max-width: 100%; overflow-x: hidden; position: relative; z-index: 1; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.topbar h1 { font-size: 23px; margin: 0; color: #fff; font-weight: 700; }
.topbar .user-chip {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 26px; }
.card {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--card-border);
    transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--card-border-hover); transform: translateY(-1px); }
.card .label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.card .value { font-family: 'Sora', sans-serif; font-size: 25px; font-weight: 700; color: #fff; }
.card .value.success { color: var(--success); }
.card .value.danger { color: var(--danger); }
.card .value.primary { color: var(--primary); }

.panel {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    padding: 24px;
    margin-bottom: 24px;
}
.panel h2 { margin-top: 0; font-size: 17px; color: #fff; font-weight: 600; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: .04em;
}
tbody td { padding: 13px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:hover { background: rgba(255,255,255,0.02); }

.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .02em;
}
.badge.active, .badge.approved, .badge.paid, .badge.completed { background: rgba(0,217,163,0.14); color: var(--success); }
.badge.pending { background: rgba(255,176,32,0.14); color: var(--warning); }
.badge.rejected, .badge.blocked, .badge.cancelled { background: rgba(255,92,108,0.14); color: var(--danger); }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 600; color: var(--text); }
input, select, textarea {
    width: 100%;
    padding: 11px 14px;
    background: #0b0f1a;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(247,147,26,0.12); }
input::placeholder { color: #4b5468; }
input:disabled { opacity: 0.55; }

.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 9px;
    border: none;
    background: linear-gradient(135deg, var(--primary), #E08517);
    color: #0a0d16;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn.success { background: linear-gradient(135deg, var(--success), #00B589); color: #06110d; }
.btn.danger { background: linear-gradient(135deg, var(--danger), #E8455A); color: #fff; }
.btn.outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.outline:hover { border-color: var(--primary); color: var(--primary); }
.btn.small { padding: 7px 14px; font-size: 12.5px; }

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 700px 500px at 15% 10%, rgba(247,147,26,0.16), transparent 60%),
        radial-gradient(ellipse 650px 550px at 90% 85%, rgba(0,217,163,0.11), transparent 55%),
        #060911;
}
.auth-page::before {
    content: "\20BF";
    position: absolute;
    right: -80px;
    top: -100px;
    font-family: 'Sora', sans-serif;
    font-size: 480px;
    font-weight: 800;
    color: rgba(255,255,255,0.025);
    line-height: 1;
    pointer-events: none;
}
.auth-page::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='146' viewBox='0 0 84 146'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'%3E%3Cpath d='M42 0 L84 24.3 L84 72.9 L42 97.2 L0 72.9 L0 24.3 Z'/%3E%3Cpath d='M42 48.6 L84 72.9 L84 121.5 L42 145.8 L0 121.5 L0 72.9 Z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.auth-box {
    background: rgba(16,21,37,0.75);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 410px;
    padding: 38px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 25px 70px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}
.auth-box h1 { font-size: 23px; margin-bottom: 6px; color: #fff; display: flex; align-items: center; gap: 10px; }
.auth-box h1::before {
    content: "";
    display: inline-flex;
    width: 34px; height: 34px;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22hexGrad%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%22100%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23F7931A%22/%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23FFB300%22/%3E%3C/linearGradient%3E%3ClinearGradient%20id%3D%22badgeGrad%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%22100%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%2300D9A3%22/%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%2300B589%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d%3D%22M50%2C4%20L89.8%2C27%20L89.8%2C73%20L50%2C96%20L10.2%2C73%20L10.2%2C27%20Z%22%20fill%3D%22url%28%23hexGrad%29%22/%3E%3Ctext%20x%3D%2246%22%20y%3D%2266%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-weight%3D%22900%22%20font-size%3D%2254%22%20fill%3D%22%230a0d16%22%20text-anchor%3D%22middle%22%3EB%3C/text%3E%3Ccircle%20cx%3D%2280%22%20cy%3D%2280%22%20r%3D%2217%22%20fill%3D%22url%28%23badgeGrad%29%22%20stroke%3D%22%230a0d16%22%20stroke-width%3D%222%22/%3E%3Cpath%20d%3D%22M73%2C86%20L85%2C74%20M85%2C74%20L85%2C81%20M85%2C74%20L78%2C74%22%20stroke%3D%22%230a0d16%22%20stroke-width%3D%223.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20fill%3D%22none%22/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    border-radius: 9px;
    flex-shrink: 0;
}
.auth-box p.subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 26px; }
.auth-box .btn { width: 100%; padding: 13px; margin-top: 8px; font-size: 14.5px; }
.auth-box .switch-link { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-muted); }
.auth-box .switch-link a { color: var(--primary); }

.alert {
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 13.5px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert.success { background: rgba(0,217,163,0.1); color: var(--success); border-color: rgba(0,217,163,0.25); }
.alert.error { background: rgba(255,92,108,0.1); color: var(--danger); border-color: rgba(255,92,108,0.25); }
.alert.info { background: rgba(247,147,26,0.1); color: var(--primary); border-color: rgba(247,147,26,0.25); }

.text-muted { color: var(--text-muted); font-size: 13px; }
.mt-0 { margin-top: 0; }

@media (max-width: 800px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; padding: 10px 0; }
    .sidebar nav { display: flex; overflow-x: auto; }
    .sidebar nav a { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
    .sidebar nav a.active { border-left-color: transparent; border-bottom-color: var(--primary); }
    .main { padding: 18px; }
    .layout::before { font-size: 320px; right: -100px; bottom: -60px; }
}

/* Charts */
.chart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-panel { display: flex; flex-direction: column; }
.chart-wrap { position: relative; height: 220px; margin-top: 12px; }
.gauge-panel { align-items: center; text-align: center; }
.gauge-wrap { width: 190px; height: 190px; margin: 8px auto 4px; }
.gauge-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.gauge-value { font-family: 'Sora', sans-serif; font-size: 30px; font-weight: 700; color: #fff; }
.gauge-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.gauge-legend { margin-top: 14px; font-size: 13px; color: var(--text-muted); text-align: left; width: 100%; }
.gauge-legend div { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-primary { background: var(--primary); }
.dot-success { background: var(--success); }

@media (max-width: 900px) {
    .chart-grid { grid-template-columns: 1fr; }
}

/* Payment method selector */
.pay-method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0; }
.pay-method-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
    transition: border-color .15s, background .15s;
}
.pay-method-card:hover { border-color: rgba(247,147,26,0.3); }
.pay-method-card.active { border-color: var(--primary); background: rgba(247,147,26,0.08); }
.pay-method-icon {
    width: 38px; height: 38px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; flex-shrink: 0;
}
.pay-method-icon.btc-icon { background: linear-gradient(135deg, #F7931A, #FFB84D); color: #0a0d16; }
.pay-method-icon.usdt-icon { background: linear-gradient(135deg, #26A17B, #4FD1A5); color: #06110d; }
.pay-method-name { font-weight: 600; font-size: 14.5px; color: var(--text); }

.pay-details {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 8px;
}
.pay-details .qr-code { width: 180px; height: 180px; border-radius: 10px; margin-bottom: 14px; }
.pay-details label { text-align: left; }
.wallet-copy-row { display: flex; gap: 8px; }
.wallet-copy-row input { flex: 1; font-size: 12.5px; }
