* {
    box-sizing: border-box;
}

:root {
    --primary: #FF8C00;
    --primary-glow: rgba(255, 140, 0, 0.4);
    --secondary: #0096C7;
    --blue-accent: #40C4FF;
    --bg-black: #000000;
    --bg-dark: #020d1c;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius-bubble: 24px;
    --sidebar-width: 175px; /* Narrowed by 1/3 from 260px */
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-main);
    margin: 0;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(0, 0, 0, 0.85); /* Changed from blue-tinted to pure black */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1rem 1.5rem 1rem; /* Reduced horizontal padding */
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3.5rem;
}

.sidebar-logo img {
    height: 42px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.sidebar-logo span {
    display: none; /* Removed OCWH Admin text */
}

.nav-menu {
    list-style: none;
    padding: 0;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px; /* Reduced gap */
    padding: 0.8rem 1rem; /* Reduced lateral padding */
    color: var(--primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem; /* Slightly smaller font */
    transition: all 0.3s;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--blue-accent);
    background: rgba(64, 196, 255, 0.05);
}

.nav-link.active {
    background: rgba(64, 196, 255, 0.1);
    color: var(--blue-accent);
    box-shadow: 0 4px 15px -5px rgba(64, 196, 255, 0.2);
    border: 1px solid rgba(64, 196, 255, 0.2);
}

.nav-link i {
    font-size: 1.1rem;
}

.logout-top-right {
    position: absolute;
    top: 2rem;
    right: 3rem;
    z-index: 100;
}

.logout-top {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    z-index: 1000;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: #ff4d4d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 77, 77, 0.1);
    transform: translateY(-2px);
    border-color: #ff4d4d33;
}

/* Main Layout */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 3rem 4rem;
    width: calc(100% - var(--sidebar-width));
    position: relative;
}

@media (max-width: 768px) {
    .logout-top {
        top: 1rem;
        right: 1.5rem;
    }
    
    .btn-logout span {
        display: none;
    }
    
    .btn-logout {
        padding: 0.7rem;
        gap: 0;
        border-radius: 10px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 2rem 1rem;
    }
    .sidebar-logo span, .nav-link span {
        display: none;
    }
    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
        padding: 2rem;
    }
}

/* Bubble Card Aesthetic */
.bubble-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-bubble);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bubble-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 140, 0, 0.3);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

/* Page Headers */
.header-row {
    display: flex;
    flex-direction: column; /* Centering the title */
    align-items: center;
    text-align: center;
    margin-bottom: 3.5rem;
}

.header-row h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary) 10%, var(--blue-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-bubble {
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 8px 20px -5px var(--primary-glow);
    transform: scale(1.02);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.amount { font-weight: 600; }
.amount.pos { color: #10b981; }
.amount.neg { color: #ef4444; }

/* Dashboard Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns for desktop */
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem !important; /* Slightly more compact */
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 2rem;
}

@media (max-width: 1200px) {
    .dashboard-row { grid-template-columns: 1fr; }
}

/* Utils */
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-blue { color: var(--blue-accent); }
.bg-blue-glow { box-shadow: 0 0 30px -10px rgba(64, 196, 255, 0.2); }
