:root {
    --admin-bg: #050505;
    --sidebar-bg: #0d0d0d;
    --card-bg: #111111;
    --input-bg: #161616;
    --border: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --primary-accent: #BBEB01;
    --primary-accent-hover: #a3cc01;
    --success: #2ebd85;
    --danger: #f6465d;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background: var(--admin-bg);
    color: var(--text-primary);
    width: 100%;
    height: 100%;
    /* Allow native scrolling on mobile/tablet */
    overflow-x: hidden;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
}

/* Mobile Sidebar behavior */
@media (max-width: 992px) {
    .admin-sidebar {
        display: none; /* Hide for now, can add toggle later */
    }
}

.sidebar-logo {
    padding: 0 24px 30px;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
    text-transform: uppercase;
}

.sidebar-logo span {
    color: var(--primary-accent);
    font-size: 0.7rem;
    display: block;
    letter-spacing: 4px;
    margin-top: -5px;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.nav-section {
    font-size: 0.65rem;
    font-weight: 800;
    color: #444;
    margin: 24px 0 8px 12px;
    letter-spacing: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(187, 235, 1, 0.15) 0%, rgba(187, 235, 1, 0.02) 100%);
    color: var(--primary-accent);
    border-color: rgba(187, 235, 1, 0.1);
    box-shadow: inset 0 0 20px rgba(187, 235, 1, 0.05);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.admin-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.admin-user .info {
    display: flex;
    flex-direction: column;
}

.admin-user .name {
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-user .role {
    font-size: 0.65rem;
    color: var(--primary-accent);
    font-weight: 800;
}

.btn-logout {
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 5px;
}

.btn-logout:hover {
    color: var(--danger);
}

/* --- Main Content --- */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Fix scrolling for Tablet/Mobile */
    overflow-y: visible; 
}

.admin-header {
    height: 70px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (max-width: 768px) {
    .admin-header { padding: 0 20px; }
    .header-search { display: none !important; }
}

.header-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--input-bg);
    padding: 10px 18px;
    border-radius: 12px;
    width: 350px;
    border: 1px solid var(--border);
}

.header-search i { color: #444; }
.header-search input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    width: 100%;
    font-size: 0.85rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.status-indicator {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator .dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Common UI Components --- */
.btn-launch {
    background: var(--primary-accent);
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-launch:hover {
    background: var(--primary-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(187, 235, 1, 0.2);
}

.btn-launch:active { transform: translateY(0); }

/* --- Dashboard Content --- */
.dashboard-content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 768px) {
    .dashboard-content { padding: 20px; }
}

.welcome-section h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 20px;
    transition: var(--transition);
}

.stat-card:hover { border-color: var(--primary-accent); }

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

.stat-header i { font-size: 1.2rem; color: #444; }

.stat-value {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.secondary-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

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

.data-table-card, .revenue-chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
}

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

.card-header h3 { font-size: 1.1rem; font-weight: 800; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 16px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #1a1a1a;
}

.user-row { display: flex; align-items: center; gap: 10px; }
.user-row img { width: 28px; height: 28px; border-radius: 50%; }

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
}

.status-badge.active { background: rgba(46, 189, 133, 0.1); color: var(--success); }

/* --- Forms & Inputs --- */
.input-field {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    outline: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.input-field:focus { border-color: var(--primary-accent); }

.login-field {
    text-align: left;
    margin-bottom: 20px;
    width: 100%;
}

.login-field label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Disabled & Coming Soon States --- */
.disabled-link {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.disabled-link:hover {
    background: none !important;
    color: var(--text-secondary) !important;
}

.coming-soon-card {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.coming-soon-overlay {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

.coming-soon-overlay i {
    font-size: 2.5rem;
    color: var(--primary-accent);
    margin-bottom: 15px;
    opacity: 0.5;
}

.coming-soon-overlay h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #fff;
}

.coming-soon-overlay p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 300px;
}

/* --- Mobile Menu & Responsive Fixes --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex; /* Override display: none */
    }

    .admin-sidebar.active {
        left: 0;
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-brand {
        justify-content: space-between;
    }
}

@media (max-width: 500px) {
    .admin-sidebar {
        width: 100%;
    }
}

/* --- Fix for "Damaged" items --- */
.nav-link i {
    color: inherit;
    opacity: 0.8;
}

.nav-link.active i {
    opacity: 1;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breadcrumb b {
    color: #fff;
    margin-left: 5px;
}


