/* Admin Dashboard Global Styles - Modern Premium Dark Mode */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;900&family=Cinzel:wght@600;800&display=swap');

:root {
    --bg-darker: #050508;
    --bg-panel: rgba(10, 15, 25, 0.7);
    --border-color: rgba(255, 255, 255, 0.05);
    --accent-cyan: #00f2ea;
    --accent-purple: #9d00ff;
    --accent-gold: #C5A059;
    --text-main: #e0e5ff;
    --text-muted: #8b95c9;
    --danger: #ef4444;
    --success: #22c55e;
    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
}

/* Base App Layout */
.admin-layout {
    display: flex;
    width: 100%;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin 0.3s ease;
}

/* Sidebar Styles */
.admin-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(5, 5, 8, 0.95);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand a {
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand-text .highlight {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 242, 234, 0.5);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
    list-style: none;
}

.nav-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin: 20px 0 10px 10px;
    font-weight: 700;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link svg {
    color: var(--text-muted);
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(0, 242, 234, 0.1);
    color: var(--accent-cyan);
}

.nav-link:hover svg,
.nav-link.active svg {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 5px rgba(0, 242, 234, 0.5));
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 15px rgba(157, 0, 255, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.user-role {
    font-size: 0.8rem;
    color: var(--accent-gold);
}

/* Header Styles */
.admin-header {
    height: var(--header-height);
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.btn-outline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-outline-header:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 242, 234, 0.05);
}

.header-user {
    position: relative;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.avatar:hover {
    border-color: var(--accent-cyan);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: 130%;
    right: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
}

.dropdown-header strong {
    color: #fff;
    font-size: 1rem;
}

.dropdown-header span {
    color: var(--accent-gold);
    font-size: 0.8rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Page Content */
.content-wrapper {
    padding: 40px;
    flex: 1;
}

/* Stats Widgets */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 242, 234, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.stat-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    color: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    transition: color 0.3s;
}

.stat-card:hover .stat-icon {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 242, 234, 0.3));
}

.stat-title {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Cinzel', serif;
}

.stat-subtitle {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Charts Area */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.chart-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.panel-title {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.chart-container {
    position: relative;
    width: 100%;
}

/* Global Buttons & Forms */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 242, 234, 0.3);
}

.data-table-wrapper {
    overflow-x: auto;
    background: var(--bg-panel);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 2px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 18px 25px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 18px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.badge-admin {
    background: rgba(197, 160, 89, 0.15);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

.badge-user {
    background: rgba(0, 242, 234, 0.1);
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .content-wrapper {
        padding: 20px;
    }

    .header-right .btn-outline-header {
        display: none;
    }
}