/* ============ SHELL ============ */
.dash-body { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand { font-size: 1.3rem; font-weight: 800; padding: 0 0.5rem 1.5rem; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.75rem; border-radius: 8px;
    color: var(--text-dim); text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.nav-link i { width: 18px; text-align: center; }
.nav-link:hover { background: var(--panel-2); color: var(--text); }
.nav-link.active { background: rgba(240,165,0,0.12); color: var(--gold); font-weight: 700; }
.nav-logout-link { color: #ff8a97; margin-top: 1rem; }

.sidebar-toggle {
    display: none;
    position: fixed; top: 1rem; left: 1rem; z-index: 50;
    background: var(--panel); border: 1px solid var(--border); color: var(--text);
    width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
}

.dash-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.dash-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 2rem; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.topbar-title h1 { margin: 0; font-size: 1.3rem; }
.topbar-platform { font-size: 0.8rem; color: var(--text-dim); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.wallet-chip {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(240,165,0,0.1); border: 1px solid rgba(240,165,0,0.25);
    color: var(--gold); font-weight: 700; font-size: 0.85rem;
    padding: 0.5rem 0.9rem; border-radius: 8px;
}
.topbar-bell { position: relative; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; }
.bell-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; }
.topbar-user { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #000;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem;
}

.dash-main { padding: 2rem; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ============ STAT CARDS ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
}
.stat-card .icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-card .value { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.stat-card .label { font-size: 0.8rem; color: var(--text-dim); }
.icon-gold { background: rgba(240,165,0,0.12); color: var(--gold); }
.icon-green { background: rgba(16,185,129,0.12); color: #10b981; }
.icon-blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.icon-purple { background: rgba(99,102,241,0.12); color: #6366f1; }
.icon-orange { background: rgba(245,158,11,0.12); color: #f59e0b; }
.icon-red { background: rgba(239,68,68,0.12); color: #ef4444; }
.icon-pink { background: rgba(236,72,153,0.12); color: #ec4899; }

/* ============ CARD / PANEL ============ */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
.card-head h2 { margin: 0; font-size: 1.05rem; }
.card-head .hint { font-size: 0.8rem; color: var(--text-dim); }

/* ============ ACTION GRID ============ */
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.action-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
    text-decoration: none; color: var(--text); transition: border-color 0.2s, transform 0.2s;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.action-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.action-card i.main-icon { font-size: 1.3rem; color: var(--gold); }
.action-card .title { font-weight: 700; }
.action-card .desc { font-size: 0.8rem; color: var(--text-dim); }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data-table th {
    text-align: left; color: var(--text-dim); font-weight: 600; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.03em; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border);
}
table.data-table td { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--panel-2); }
.cell-sub { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }

/* ============ BADGES ============ */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.65rem; border-radius: 50px; font-size: 0.75rem; font-weight: 700; }
.badge-success { background: rgba(16,185,129,0.14); color: #34d399; }
.badge-warning { background: rgba(245,158,11,0.14); color: #fbbf24; }
.badge-danger { background: rgba(239,68,68,0.14); color: #f87171; }
.badge-info { background: rgba(59,130,246,0.14); color: #60a5fa; }
.badge-muted { background: rgba(154,159,174,0.14); color: var(--text-dim); }
.badge-gold { background: rgba(240,165,0,0.14); color: var(--gold); }

/* ============ FILTER BAR ============ */
.filter-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-bar input, .filter-bar select {
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.6rem 0.9rem; color: var(--text); font-family: inherit; font-size: 0.88rem;
}
.filter-bar input { flex: 1; min-width: 180px; }
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--gold); }

/* ============ SERVICES ============ */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.service-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.service-card.inactive { opacity: 0.55; }
.service-card .plat-tag { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.service-card h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.service-cost { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.75rem; }
.service-card label { display: block; font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.service-card input[type="number"] {
    width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.5rem 0.75rem; color: var(--text); font-family: inherit; margin-bottom: 0.6rem;
}
.service-benefit { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.9rem; }
.service-benefit.positive { color: #34d399; }
.service-benefit.negative { color: #f87171; }
.service-actions { display: flex; gap: 0.5rem; }
.btn-mini { flex: 1; padding: 0.55rem; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); font-weight: 600; font-size: 0.82rem; cursor: pointer; text-align: center; }
.btn-mini.primary { background: var(--gold); color: #000; border-color: var(--gold); }
.btn-mini.danger { color: #f87171; border-color: rgba(239,68,68,0.3); }

/* ============ PROGRESS ============ */
.progress-row { margin-bottom: 0.9rem; }
.progress-row .row-label { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 0.35rem; }
.progress-track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; }

/* ============ SETTINGS ============ */
.settings-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
.tabs { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tab-btn { background: none; border: none; color: var(--text-dim); padding: 0.7rem 1rem; font-weight: 600; font-size: 0.88rem; cursor: pointer; border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--gold); border-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.4rem; }
.form-row input, .form-row textarea, .form-row select {
    width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.7rem; color: var(--text); font-family: inherit; font-size: 0.92rem;
}
.form-row textarea { min-height: 90px; resize: vertical; }
.form-row.mono textarea { font-family: 'Courier New', monospace; font-size: 0.85rem; }
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.theme-swatch { border-radius: 10px; padding: 0.75rem; text-align: center; cursor: pointer; border: 2px solid transparent; }
.theme-swatch.selected { border-color: var(--gold); }
.theme-swatch .dot { width: 100%; height: 32px; border-radius: 6px; margin-bottom: 0.4rem; }
.theme-swatch span { font-size: 0.72rem; color: var(--text-dim); }
.color-row { display: flex; gap: 0.75rem; }
.color-row .form-row { flex: 1; }
.lock-note { font-size: 0.75rem; color: var(--gold); margin-top: 0.3rem; }

.preview-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; position: sticky; top: 90px; }
.preview-header { padding: 2rem 1.25rem; text-align: center; color: #fff; }
.preview-logo { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; margin: 0 auto 0.75rem; font-weight: 800; font-size: 1.3rem; }
.preview-name { font-weight: 800; font-size: 1.1rem; }
.preview-desc { font-size: 0.8rem; opacity: 0.85; margin-top: 0.4rem; }
.preview-cta { display: inline-block; margin-top: 1rem; padding: 0.6rem 1.4rem; border-radius: 8px; font-weight: 700; font-size: 0.85rem; }
.preview-body { padding: 1.25rem; }
.preview-body .hint-title { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; margin-bottom: 0.5rem; }

/* ============ PLANS ============ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.plan-card { background: var(--panel); border: 2px solid var(--border); border-radius: 14px; padding: 1.5rem; text-align: center; position: relative; cursor: pointer; transition: box-shadow 0.15s; }
.plan-card.current { border-color: #10b981; }
.plan-card.recommended { border-color: var(--gold); }
.plan-card.selected { box-shadow: 0 0 0 2px var(--gold); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 0.25rem 0.9rem; border-radius: 50px; font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.plan-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.plan-name { font-weight: 800; font-size: 1.05rem; margin-bottom: 0.5rem; }
.plan-price { font-size: 1.6rem; font-weight: 900; margin-bottom: 1rem; }
.plan-price small { font-size: 0.7rem; font-weight: 400; color: var(--text-dim); }
.plan-features { list-style: none; padding: 0; margin: 0 0 1.25rem; text-align: left; font-size: 0.85rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 0.5rem; }
.plan-features i { width: 16px; }
.plan-features .yes i { color: #34d399; }
.plan-features .no i { color: #f87171; }
.plan-btn { width: 100%; padding: 0.75rem; border-radius: 8px; border: none; font-weight: 700; cursor: pointer; }
.plan-btn.disabled { background: var(--panel-2); color: var(--text-dim); cursor: not-allowed; }

/* ============ WITHDRAWALS ============ */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.method-option { border: 2px solid var(--border); border-radius: 10px; padding: 1rem 0.5rem; text-align: center; cursor: pointer; }
.method-option.selected { border-color: var(--gold); background: rgba(240,165,0,0.06); }
.method-option i { font-size: 1.3rem; margin-bottom: 0.4rem; color: var(--gold); }
.method-option span { display: block; font-size: 0.78rem; }

/* ============ MISC ============ */
.chart-placeholder { height: 220px; display: flex; align-items: flex-end; gap: 0.6rem; padding: 1rem 0.5rem; }
.chart-bar { flex: 1; background: linear-gradient(180deg, var(--gold), rgba(240,165,0,0.2)); border-radius: 4px 4px 0 0; position: relative; }
.chart-bar span { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 0.68rem; color: var(--text-dim); }
.upgrade-lock { position: relative; }
.upgrade-lock::after {
    content: ''; position: absolute; inset: 0; backdrop-filter: blur(3px); background: rgba(11,13,18,0.55);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.upgrade-lock-badge {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
    background: var(--panel); border: 1px solid var(--gold); color: var(--gold); padding: 0.6rem 1.1rem;
    border-radius: 50px; font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}

@media (max-width: 960px) {
    .settings-layout { grid-template-columns: 1fr; }
    .preview-panel { position: static; }
}
@media (max-width: 780px) {
    .sidebar { position: fixed; left: -260px; z-index: 40; transition: left 0.25s; box-shadow: 0 0 40px rgba(0,0,0,0.5); }
    .sidebar.open { left: 0; }
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .dash-topbar { padding: 1rem 1rem 1rem 4.5rem; }
    .dash-main { padding: 1.25rem; }
}
