/* ============================================================
   Capital Pro Management — Premium Dark Financial Theme
   ============================================================ */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #0f1623;
    --bg-card: #161e2e;
    --bg-card-hover: #1a2335;
    --bg-input: #0d1320;
    --border-color: #1e293b;
    --border-hover: #2a3a55;
    --text-primary: #e8eef7;
    --text-secondary: #8b9bb4;
    --text-muted: #5a6a85;
    --accent: #00d4aa;
    --accent-dim: #00a884;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --navy: #0f1a2e;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dim); }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 500px; margin: 0 auto; padding: 0 20px; }

/* ===== NAVBAR (Public + Client) ===== */
.navbar {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-brand .logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #0a0e17; font-weight: 800;
}
.navbar-nav {
    display: flex; align-items: center; gap: 8px; list-style: none;
}
.navbar-nav a {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
    color: var(--text-primary);
    background: var(--bg-card);
}
.nav-toggle {
    display: none;
    background: none; border: none; color: var(--text-primary);
    font-size: 1.5rem; cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #0a0e17;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,212,170,0.3); color: #0a0e17; }
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-success { background: var(--success); color: #0a0e17; }
.btn-success:hover { background: #16a34a; color: #0a0e17; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.card:hover { border-color: var(--border-hover); }
.card-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-weight: 500;
}
.card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== STAT GRID ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}
.stat-icon.green { background: rgba(34,197,94,0.12); color: var(--success); }
.stat-icon.red { background: rgba(239,68,68,0.12); color: var(--danger); }
.stat-icon.blue { background: rgba(59,130,246,0.12); color: var(--info); }
.stat-icon.accent { background: rgba(0,212,170,0.12); color: var(--accent); }
.stat-icon.orange { background: rgba(245,158,11,0.12); color: var(--warning); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}
.form-control, .form-select, textarea.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,212,170,0.1);
}
.form-control::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.form-text-error { font-size: 0.8rem; color: var(--danger); margin-top: 6px; }

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid;
}
.alert-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: #4ade80; }
.alert-danger { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #f87171; }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.alert-info { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: #60a5fa; }

/* ===== BADGES ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-pending { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-approved { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-rejected { background: rgba(239,68,68,0.15); color: var(--danger); }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-color); }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}
table.data-table th {
    text-align: left;
    padding: 14px 18px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
table.data-table td {
    padding: 14px 18px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--bg-card-hover); }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ===== LANDING PAGE ===== */
.hero {
    padding: 80px 0 60px;
    background: radial-gradient(ellipse at top, rgba(0,212,170,0.08), transparent 60%),
                radial-gradient(ellipse at bottom right, rgba(59,130,246,0.06), transparent 50%);
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero p.lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 32px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.section { padding: 70px 0; border-top: 1px solid var(--border-color); }
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}
.section-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
    font-size: 1.05rem;
}

/* How It Works steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}
.step-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.step-number {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #0a0e17;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 700;
    margin: 0 auto 20px;
}
.step-card h4 { margin-bottom: 10px; font-size: 1.1rem; }
.step-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* About section */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-text { font-size: 1.05rem; color: var(--text-secondary); }
.about-text p { margin-bottom: 16px; }
.trader-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0,212,170,0.1);
    border: 1px solid rgba(0,212,170,0.2);
    border-radius: 20px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Plans grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: var(--transition);
    position: relative;
}
.plan-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.plan-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(0,212,170,0.1);
}
.plan-card .plan-tag {
    position: absolute;
    top: -12px; right: 20px;
    background: var(--accent);
    color: #0a0e17;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.plan-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.plan-price {
    font-size: 2.2rem; font-weight: 800; margin-bottom: 4px;
}
.plan-price small { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.plan-features { list-style: none; margin: 20px 0; }
.plan-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex; align-items: flex-start; gap: 10px;
}
.plan-features li::before {
    content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0;
}
.plan-disclaimer {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* Support section */
.support-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    background: var(--bg-secondary);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer p { color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(ellipse at top, rgba(0,212,170,0.06), transparent 60%);
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
}
.auth-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.auth-card .auth-sub { color: var(--text-secondary); margin-bottom: 28px; font-size: 0.9rem; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.85rem; color: var(--text-muted); }

/* ===== DASHBOARD LAYOUT ===== */
.dash-layout {
    display: flex;
    min-height: 100vh;
}
.dash-sidebar {
    width: 250px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}
.dash-sidebar .sidebar-brand {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}
.dash-sidebar .sidebar-brand .logo-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #0a0e17; font-weight: 800;
}
.sidebar-nav { list-style: none; padding: 0 12px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    transition: var(--transition);
}
.sidebar-nav a:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-nav a.active { background: rgba(0,212,170,0.1); color: var(--accent); }
.sidebar-nav .nav-icon { width: 20px; text-align: center; font-size: 1.1rem; }
.sidebar-section-label {
    padding: 20px 16px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.dash-main {
    margin-left: 250px;
    flex: 1;
    padding: 24px 32px;
    min-width: 0;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.dash-header h1 { font-size: 1.6rem; }
.dash-header .header-meta { color: var(--text-muted); font-size: 0.85rem; }

/* Sidebar toggle (mobile) */
.sidebar-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center; justify-content: center;
}
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}
.chart-container h3 { font-size: 1.1rem; margin-bottom: 4px; }
.chart-container .chart-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }
.chart-canvas-wrap { position: relative; height: 300px; }

/* ===== INFO ROW ===== */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--text-muted); font-size: 0.85rem; }
.info-row .info-value { font-weight: 600; font-size: 0.9rem; }

/* ===== WALLET BOX ===== */
.wallet-box {
    background: var(--bg-input);
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
}
.wallet-box .wallet-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.wallet-box .wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    word-break: break-all;
    background: var(--bg-secondary);
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

/* ===== UTILITY ===== */
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.flex { display: flex; } .flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.hidden { display: none; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }

/* Notification banner */
.notif-banner {
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex; align-items: flex-start; gap: 12px;
}
.notif-banner .notif-icon { color: var(--info); font-size: 1.2rem; flex-shrink: 0; }
.notif-banner .notif-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.notif-banner .notif-msg { font-size: 0.85rem; color: var(--text-secondary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .about-section { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .dash-sidebar {
        transform: translateX(-100%);
    }
    .dash-sidebar.open { transform: translateX(0); }
    .dash-main { margin-left: 0; padding: 20px 16px; }
    .sidebar-toggle { display: inline-flex; }
    .sidebar-overlay.show { display: block; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p.lead { font-size: 1rem; }
    .section { padding: 50px 0; }
    .section-title { font-size: 1.5rem; }
    .navbar-nav { display: none; }
    .navbar-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--bg-secondary);
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-toggle { display: block; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .auth-card { padding: 28px 24px; }
    .support-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.6rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
    .footer-inner { flex-direction: column; text-align: center; }
}
