/* 
    FluxPay Carbon Design System v3.1
    Aesthetic: Industrial Carbon / High-Performance Fintech
    Focus: Performance, Precision, and Sophistication
*/

:root {
    /* Carbon Palette - Deep & Solid */
    --bg-base: #000000;
    --bg-surface: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #0c0c0e;
    --bg-button: #1a1a1c;
    
    --accent-primary: #ffffff;
    --accent-hover: #e4e4e7;
    --accent-soft: rgba(255, 255, 255, 0.1);
    
    /* Text Hierarchy */
    --text-1: #ffffff;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --text-muted: #3f3f46;
    
    /* Border & Glass */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-active: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(24px);
    
    /* Status Colors - Carbon Desaturated */
    --status-success: #34d399;
    --status-warning: #fbbf24;
    --status-error: #f87171;

    /* Theme Accents (New) */
    --accent-glow: #1e1b4b;
    --accent-indigo: #312e81;
    --accent-violet: #4c1d95;
    
    /* Transitions */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-standard: 0.3s var(--ease-standard);
    --transition-slow: 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    
    /* Spacing */
    --side-padding: 32px;
}

/* Base resets & styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: var(--bg-base);
    color: var(--text-1);
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg-base);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle Scanline Overlay & Depth */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(30, 27, 75, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(76, 29, 149, 0.03) 0%, transparent 50%),
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.005), rgba(128, 128, 128, 0.005), rgba(64, 64, 64, 0.005));
    background-size: 100% 100%, 100% 100%, 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.1;
}

.bg-glow-top {
    position: absolute;
    top: -10%; left: 50%; transform: translateX(-50%);
    width: 100%; height: 60%;
    background: radial-gradient(circle at top, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.1;
    color: var(--text-1);
}

h1 { font-size: clamp(3rem, 8vw, 6.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: 1.5rem; }

p { color: var(--text-2); line-height: 1.6; }

/* Layout Components */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--side-padding);
}

/* Dashboard Layout Structure */
.app-layout {
    display: flex;
    min-height: 100vh;
    padding: 24px;
    gap: 24px;
    background: var(--bg-base);
}

.sidebar {
    width: 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    z-index: 100;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 24px; left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 64px);
    max-width: 1300px;
    height: 72px;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.nav-link-item, .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    color: var(--text-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-standard);
    cursor: pointer;
}

.nav-link-item:hover, .nav-link:hover, .nav-link-item.active, .nav-link.active {
    color: #fff;
    background: var(--bg-elevated);
}

.nav-link.active {
    border-right: 3px solid var(--accent-primary);
    border-radius: 14px 4px 4px 14px;
}

/* Cards & Units */
.surface-card, .glass-card, .bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-standard);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.surface-card:hover, .bento-item:hover {
    border-color: var(--border-active);
    background: var(--bg-elevated);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.05);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
}

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

.data-table th {
    padding: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
    padding: 20px;
    font-size: 14px;
    color: var(--text-2);
    border-bottom: 1px solid var(--border-subtle);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.01); }

/* Form Elements */
.form-group { margin-bottom: 24px; }

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.form-control, .form-input {
    width: 100%;
    height: 56px;
    background: #000;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 0 20px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition-standard);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s var(--ease-standard);
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-primary);
    color: #000;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.2);
}

.btn-secondary {
    background: var(--bg-button);
    border-color: var(--border-subtle);
    color: var(--text-1);
}

.btn-secondary:hover {
    background: #27272a;
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
}

.btn-ghost:hover {
    color: #fff;
    background: var(--bg-elevated);
}

/* Status Indicators */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-online { background: rgba(255, 255, 255, 0.1); color: #fff; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Bottom Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    height: 72px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-subtle);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 12px;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(6, 1fr); }
    .settings-grid-premium { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .app-layout { padding: 12px; flex-direction: column; padding-bottom: 90px; }
    .sidebar { display: none; }
    .mobile-nav { display: flex; }
    .navbar { width: calc(100% - 24px); top: 12px; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-item { grid-column: span 1 !important; }
    h1 { font-size: 3.5rem; }
    .container { padding: 0 20px; }
    .main-content { gap: 16px; }
}
