/* ============================================================
   style.css — Core Dark Futuristic Theme
   Elite 2K26 Finance Management System
   ============================================================ */

/* ── CSS Variables ── */
:root {
    --neon-cyan:   #00f5ff;
    --neon-blue:   #0080ff;
    --neon-gold:   #ffd700;
    --neon-pink:   #ff00aa;
    --bg-primary:  #050a14;
    --bg-secondary:#080e1c;
    --bg-card:     #0b1224;
    --glass-bg:    rgba(10, 20, 40, 0.75);
    --glass-border:rgba(0, 245, 255, 0.15);
    --text-primary:#e8f4ff;
    --text-muted:  #6a8aaa;
    --text-dim:    #3a5570;
    --sidebar-w:   260px;
    --gradient-main: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%);
    --gradient-gold: linear-gradient(135deg, var(--neon-gold) 0%, #ff8800 100%);
    --gradient-card: linear-gradient(145deg, rgba(0,245,255,0.07) 0%, rgba(0,80,160,0.05) 100%);
    --shadow-neon:  0 0 20px rgba(0,245,255,0.2), 0 4px 24px rgba(0,20,60,0.6);
    --radius-card:  16px;
    --radius-btn:   10px;
    --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a { color: var(--neon-cyan); text-decoration: none; }
a:hover { color: #fff; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--neon-blue); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

/* ── Layout ── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(5, 10, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 1.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}
.sidebar-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35rem;
    font-weight: 900;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}
.sidebar-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 2px;
    text-transform: uppercase;
}
.sidebar-icon { font-size: 1.5rem; margin-bottom: 0.25rem; display: block; filter: drop-shadow(0 0 8px var(--neon-cyan)); }

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-nav a .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--gradient-main);
    transform: scaleY(0);
    transition: transform var(--transition);
    border-radius: 0 2px 2px 0;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--neon-cyan);
    background: rgba(0,245,255,0.06);
    padding-left: 1.85rem;
}
.sidebar-nav a:hover::before,
.sidebar-nav a.active::before { transform: scaleY(1); }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
}
.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color var(--transition);
}
.sidebar-footer a:hover { color: #ff5757; }

/* ── Main Content ── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ── Top Bar ── */
.topbar {
    height: 64px;
    background: rgba(5,10,20,0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--neon-cyan);
    border-radius: 2px;
    transition: all var(--transition);
}
.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-user {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.topbar-user span { color: var(--neon-gold); font-weight: 600; }
.topbar-badge {
    font-size: 0.68rem;
    background: var(--gradient-main);
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ── Page Body ── */
.page-body {
    padding: 2rem;
    flex: 1;
}

/* ── Cards ── */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-neon);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
    box-shadow: 0 0 30px rgba(0,245,255,0.18), 0 8px 32px rgba(0,20,60,0.7);
    transform: translateY(-2px);
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-main);
    opacity: 0.5;
}

/* ── Stat Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    pointer-events: none;
}
.stat-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 24px rgba(0,245,255,0.15);
    transform: translateY(-3px);
}
.stat-card .stat-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}
.stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}
.stat-card .stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.stat-card .stat-value.cyan  { color: var(--neon-cyan); text-shadow: 0 0 20px rgba(0,245,255,0.4); }
.stat-card .stat-value.gold  { color: var(--neon-gold); text-shadow: 0 0 20px rgba(255,215,0,0.4); }
.stat-card .stat-value.blue  { color: #5bb8ff; text-shadow: 0 0 20px rgba(0,120,255,0.4); }
.stat-card .stat-value.pink  { color: var(--neon-pink); text-shadow: 0 0 20px rgba(255,0,170,0.4); }
.stat-card .stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* ── Charts Grid ── */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* ── Section Header ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--gradient-main);
    border-radius: 2px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-btn);
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.btn-primary {
    background: var(--gradient-main);
    color: #000;
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0,245,255,0.35);
    transform: translateY(-1px);
}
.btn-gold {
    background: var(--gradient-gold);
    color: #000;
}
.btn-gold:hover {
    box-shadow: 0 6px 20px rgba(255,215,0,0.3);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0,245,255,0.15);
}
.btn-danger {
    background: rgba(255,60,60,0.15);
    border: 1px solid rgba(255,60,60,0.35);
    color: #ff6b6b;
}
.btn-danger:hover {
    background: rgba(255,60,60,0.3);
    box-shadow: 0 0 12px rgba(255,60,60,0.25);
}
.btn-success {
    background: rgba(0,255,150,0.15);
    border: 1px solid rgba(0,255,150,0.35);
    color: #00ff96;
}
.btn-success:hover {
    background: rgba(0,255,150,0.25);
    box-shadow: 0 0 12px rgba(0,255,150,0.2);
}
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.75rem; }

/* ── Table ── */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
thead tr {
    background: rgba(0,245,255,0.06);
    border-bottom: 1px solid var(--glass-border);
}
thead th {
    padding: 0.9rem 1rem;
    text-align: left;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
tbody tr {
    border-bottom: 1px solid rgba(0,245,255,0.05);
    transition: background var(--transition);
}
tbody tr:hover { background: rgba(0,245,255,0.04); }
tbody tr:last-child { border-bottom: none; }
tbody td {
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    vertical-align: middle;
}
.td-muted { color: var(--text-muted); font-size: 0.82rem; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.75rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge-paid {
    background: rgba(0,255,150,0.15);
    color: #00ff96;
    border: 1px solid rgba(0,255,150,0.3);
}
.badge-pending {
    background: rgba(255,165,0,0.15);
    color: #ffaa00;
    border: 1px solid rgba(255,165,0,0.3);
}

/* ── Forms ── */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-control {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    transition: all var(--transition);
    outline: none;
    width: 100%;
}
.form-control:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0,245,255,0.1);
    background: rgba(0,245,255,0.04);
}
.form-control option { background: var(--bg-card); color: var(--text-primary); }
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
.form-group-wrap { margin-bottom: 0; }

/* ── Search Bar ── */
.search-bar {
    position: relative;
    flex: 1;
    max-width: 320px;
}
.search-bar input {
    padding-left: 2.4rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.4rem;
    outline: none;
    transition: all var(--transition);
}
.search-bar input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0,245,255,0.1);
}
.search-bar .search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,5,15,0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 0 40px rgba(0,245,255,0.12);
    transform: translateY(20px);
    transition: transform var(--transition);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 1px;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color var(--transition);
    padding: 0.25rem;
    line-height: 1;
}
.modal-close:hover { color: #ff5757; }

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0;
}
.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.65rem 1.2rem;
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: -1px;
}
.tab-btn.active {
    color: var(--neon-cyan);
    border-bottom-color: var(--neon-cyan);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Alert / Toast ── */
.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.85rem 1.2rem;
    font-size: 0.84rem;
    color: var(--text-primary);
    min-width: 260px;
    box-shadow: var(--shadow-neon);
    animation: slideInRight 0.35s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.toast.success { border-color: rgba(0,255,150,0.4); }
.toast.error   { border-color: rgba(255,60,60,0.4); }

/* ── Sidebar Overlay (mobile) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,5,15,0.7);
    z-index: 99;
}

/* ── Reports Section ── */
.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
}
.report-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: var(--gradient-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}
.report-btn .report-icon { font-size: 2rem; }
.report-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0,245,255,0.2);
    color: var(--neon-cyan);
    transform: translateY(-3px);
}
.report-btn.excel-btn .report-icon { filter: drop-shadow(0 0 8px #00ff96); }
.report-btn.pdf-btn   .report-icon { filter: drop-shadow(0 0 8px #ff6060); }
.report-btn.img-btn   .report-icon { filter: drop-shadow(0 0 8px var(--neon-gold)); }

/* ── Report Preview Section ── */
#reportPreview {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2rem;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 40px rgba(0,0,0,0.5);
    }
    .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
    .sidebar-overlay.active { opacity: 1; pointer-events: auto; }

    .main-content { margin-left: 0; }
    .hamburger { display: flex; }

    .page-body { padding: 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }

    .topbar { padding: 0 1rem; }

    table { font-size: 0.8rem; }
    thead th, tbody td { padding: 0.7rem 0.75rem; }

    .form-row { grid-template-columns: 1fr; }

    .report-actions { flex-direction: column; }
    .report-btn { width: 100%; flex-direction: row; justify-content: center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card .stat-value { font-size: 1.3rem; }
    .section-header { flex-direction: column; align-items: flex-start; }
}
