@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   DESIGN TOKENS & SYSTEM ROOT
   ========================================================================== */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Theme Base */
    --bg-obsidian: #050608;
    --bg-panel: rgba(255, 255, 255, 0.05);
    --bg-panel-solid: #0d0e12;
    --bg-panel-hover: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.35);

    /* Cyberpunk Neon Palette */
    --neon-blue: #00f0ff;      /* Electric Blue */
    --neon-pink: #ff007f;      /* Neon Pink */
    --neon-purple: #9d00ff;    /* Radiant Purple */
    
    --neon-blue-glow: rgba(0, 240, 255, 0.35);
    --neon-pink-glow: rgba(255, 0, 127, 0.35);
    --neon-purple-glow: rgba(157, 0, 255, 0.35);
    
    --accent-cyan: var(--neon-blue);
    --accent-teal: var(--neon-purple);
    
    --text-primary: #cbd5e1;
    --text-highlight: #ffffff;
    --text-muted: #64748b;

    /* Status Colors */
    --status-success: #10b981;
    --status-success-glow: rgba(16, 185, 129, 0.2);
    --status-warning: #f59e0b;
    --status-warning-glow: rgba(245, 158, 11, 0.2);
    --status-danger: var(--neon-pink);
    --status-danger-glow: var(--neon-pink-glow);
    --status-info: #3b82f6;
    --status-info-glow: rgba(59, 130, 246, 0.2);

    /* Transitions & Shadows */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --shadow-neon: 0 0 15px var(--neon-blue-glow);
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    --glass-blur: blur(15px);
}

/* ==========================================================================
   BASE & RESET STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-obsidian);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--text-highlight);
    text-shadow: 0 0 8px var(--neon-blue-glow);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-highlight);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-obsidian);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-panel-solid);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-teal);
}

/* ==========================================================================
   GLASSMORPHIC CONTAINERS & COMPONENT STYLES
   ========================================================================== */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 240, 255, 0.15); /* Thin electric blue border */
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(0, 240, 255, 0.45);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6), 0 0 20px var(--neon-blue-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    gap: 8px;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-obsidian);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--text-highlight);
    box-shadow: var(--shadow-neon);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-panel-solid);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-panel-hover);
    color: var(--text-highlight);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--status-danger);
    color: var(--text-highlight);
}

.btn-danger:hover {
    background: #ff5c5c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.4);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* ==========================================================================
   INPUTS & PRESET MODERN FORM ELEMENTS
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-highlight);
    transition: var(--transition-fast);
}

.form-control {
    width: 100%;
    background: rgba(11, 12, 16, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-highlight);
    font-family: var(--font-primary);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.15);
    background: rgba(11, 12, 16, 0.8);
}

/* Modern Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-panel-solid);
    border: 1px solid var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-primary);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-teal);
    border-color: var(--accent-cyan);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: var(--accent-cyan);
}

/* ==========================================================================
   APP SHELL / LAYOUT (Sidebar, Navbar)
   ========================================================================== */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(19, 26, 36, 0.95);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(102, 252, 241, 0.3);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-primary);
    border-radius: 8px;
    font-weight: 500;
    gap: 12px;
    font-size: 14px;
}

.sidebar-link:hover, .sidebar-item.active .sidebar-link {
    background: var(--bg-panel-hover);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
    padding-left: 13px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(11, 12, 16, 0.4);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-weight: bold;
    font-family: var(--font-heading);
    border: 1px solid var(--accent-cyan);
}

.user-info h5 {
    font-size: 13px;
    font-weight: 600;
}

.user-info span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-navbar {
    height: 70px;
    background: rgba(11, 12, 16, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.navbar-title h2 {
    font-size: 20px;
    font-weight: 700;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quick-search {
    position: relative;
}

.quick-search input {
    background: rgba(31, 40, 51, 0.5);
    border: 1px solid var(--border-color);
    padding: 8px 16px 8px 36px;
    border-radius: 20px;
    color: var(--text-highlight);
    font-size: 13px;
    width: 220px;
    transition: var(--transition-smooth);
}

.quick-search input:focus {
    width: 300px;
    outline: none;
    border-color: var(--accent-cyan);
}

.content-body {
    padding: 32px;
    flex: 1;
}

/* ==========================================================================
   DASHBOARD STAT CARDS & METRICS
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-teal);
}

.metric-card.success::before { background: var(--status-success); }
.metric-card.warning::before { background: var(--status-warning); }
.metric-card.danger::before { background: var(--status-danger); }
.metric-card.cyan::before { background: var(--accent-cyan); }

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-highlight);
    margin-bottom: 6px;
}

.metric-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-change.up { color: var(--status-success); }
.metric-change.down { color: var(--status-danger); }

/* ==========================================================================
   TABLES & BADGES (PREMIUM VIEW)
   ========================================================================== */
.table-container {
    overflow-x: auto;
    width: 100%;
}

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

.custom-table th {
    background: rgba(11, 12, 16, 0.4);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    color: var(--accent-cyan);
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition-fast);
}

.custom-table tbody tr {
    transition: var(--transition-fast);
}

.custom-table tbody tr:hover {
    background: rgba(102, 252, 241, 0.03);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: var(--status-success-glow); color: var(--status-success); border: 1px solid rgba(46, 204, 113, 0.3); }
.badge-warning { background: var(--status-warning-glow); color: var(--status-warning); border: 1px solid rgba(243, 156, 18, 0.3); }
.badge-danger { background: var(--status-danger-glow); color: var(--status-danger); border: 1px solid rgba(231, 76, 60, 0.3); }
.badge-info { background: var(--status-info-glow); color: var(--status-info); border: 1px solid rgba(52, 152, 219, 0.3); }

/* ==========================================================================
   ALERTS / NOTIFICATIONS
   ========================================================================== */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border: 1px solid transparent;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert-success {
    background: var(--status-success-glow);
    color: var(--status-success);
    border-color: rgba(46, 204, 113, 0.3);
}

.alert-danger {
    background: var(--status-danger-glow);
    color: var(--status-danger);
    border-color: rgba(231, 76, 60, 0.3);
}

/* ==========================================================================
   ANIMATIONS & FLOATING FOCUS EFFECTS
   ========================================================================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* Custom Chart Style */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* Grid layout for Split Sections */
.split-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 992px) {
    .split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-logo {
        display: none;
    }
    .sidebar-link span {
        display: none;
    }
    .sidebar-footer .user-info {
        display: none;
    }
    .main-wrapper {
        margin-left: 70px;
    }
    .top-navbar {
        padding: 0 16px;
    }
}
