@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    /* ── Light Mode Palette (ComXXX Styled) ── */
    --bg-dark: #f4f6f9;
    --bg-panel: #ffffff; /* Light sidebar */
    --bg-card: #ffffff;
    
    --border-glass: #e2e8f0;
    --border-glass-focus: #FF2A7A;
    
    --accent-purple: #7209B7;
    --accent-pink: #FF2A7A;
    --accent-cyan: #FF2A7A;
    --accent-green: #00897b;
    --accent-red: #e53935;
    
    --text-main: #263238; /* Blue-gray 900 */
    --text-muted: #546e7a; /* Blue-gray 600 */
    --text-light: #90a4ae; /* Blue-gray 400 */
    --text-dark: #263238;
    
    --sidebar-border: 1px solid #e2e8f0;
    --sidebar-text: #546e7a;
    --sidebar-text-hover: #FF2A7A;
    --sidebar-active-bg: rgba(255, 42, 122, 0.08);
    --sidebar-active-text: #FF2A7A;
    
    --input-bg: #ffffff;
    --input-bg-focus: #ffffff;
    
    --banner-gradient: linear-gradient(135deg, #7209B7 0%, #FF2A7A 100%);
    --gradient-primary: linear-gradient(135deg, #FF2A7A 0%, #7209B7 100%);
    --gradient-primary-hover: linear-gradient(135deg, #e01b63 0%, #5d0499 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 42, 122, 0.02) 0%, rgba(114, 9, 183, 0.02) 100%);
    
    --shadow-glow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 10px 20px -3px rgba(38, 50, 56, 0.05), 0 4px 6px -4px rgba(38, 50, 56, 0.05);
    --shadow-neon: 0 4px 18px rgba(255, 42, 122, 0.15);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme {
    /* ── Dark Mode Palette (ComXXX Styled) ──────────────────────────── */
    --bg-dark: #0D0D0D;
    --bg-panel: #1A1A1A; /* Dark sidebar */
    --bg-card: #1A1A1A;
    
    --border-glass: #2A2A2A;
    --border-glass-focus: #FF2A7A;
    
    --accent-purple: #7209B7;
    --accent-pink: #FF2A7A;
    --accent-cyan: #FF2A7A;
    --accent-green: #34d399;
    --accent-red: #fb7185;
    
    --text-main: #FFFFFF;
    --text-muted: #888888;
    --text-light: #64748b;
    --text-dark: #0D0D0D;
    
    --sidebar-border: 1px solid #2A2A2A;
    --sidebar-text: #888888;
    --sidebar-text-hover: #FF2A7A;
    --sidebar-active-bg: rgba(255, 42, 122, 0.12);
    --sidebar-active-text: #FF2A7A;
    
    --input-bg: rgba(0, 0, 0, 0.25);
    --input-bg-focus: rgba(0, 0, 0, 0.4);
    
    --banner-gradient: linear-gradient(135deg, #2a050c 0%, #0D0D0D 60%, #2a050c 100%);
    --gradient-primary: linear-gradient(135deg, #FF2A7A 0%, #7209B7 100%);
    --gradient-primary-hover: linear-gradient(135deg, #e01b63 0%, #5d0499 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 42, 122, 0.05) 0%, rgba(114, 9, 183, 0.05) 100%);
    
    --shadow-glow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-neon: 0 0 25px rgba(255, 42, 122, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* ── Navigation Sidebar ──────────────────────────────────────── */
.sidebar {
    width: 260px;
    background: var(--bg-panel);
    border-right: var(--sidebar-border);
    padding: 30px 15px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.sidebar-logo {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.8px;
    text-transform: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 30px;
    width: 100%;
}

.sidebar-logo span {
    color: var(--accent-pink) !important;
    background: linear-gradient(135deg, #7209B7 0%, #FF2A7A 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 42, 122, 0.25);
}

.sidebar-logo .logo-icon {
    font-size: 14px;
    color: #7209B7 !important;
    margin-left: 5px;
    transform: rotate(-10deg);
    text-shadow: 0 0 15px rgba(255, 58, 80, 0.6);
    animation: logo-pulse 2.2s infinite ease-in-out;
}

@keyframes logo-pulse {
    0%, 100% { transform: scale(1) rotate(-10deg); opacity: 0.95; }
    50% { transform: scale(1.15) rotate(-5deg); opacity: 1; filter: drop-shadow(0 0 6px #7209B7); }
}

/* Sidebar User Profile Card (Dandelion Pro Style) */
.sidebar-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px 25px;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border-glass);
    width: 100%;
}

.user-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(2, 136, 209, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}
.user-avatar:hover {
    transform: scale(1.05);
}

.user-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    text-align: center;
}

.user-status {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--accent-green);
    display: inline-block;
}

/* Navigation Categories & Items */
.menu-section-header {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 1.2px;
    margin: 20px 0 8px 12px;
    text-align: left;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    margin-bottom: 6px;
    border-radius: 99px; /* Rounded pill shape */
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.nav-item:hover {
    background: rgba(2, 136, 209, 0.04);
    color: var(--sidebar-text-hover);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 700;
}

/* ── Main Content Area ───────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    position: relative;
    transition: var(--transition-smooth);
    width: calc(100% - 260px);
}

/* Curved Header Wave Banner (Dandelion Pro Style) */
.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 230px;
    background: var(--banner-gradient);
    z-index: 0;
    pointer-events: none;
    border-radius: 0 0 35px 35px; /* curved wave effect */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* Header Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 20px;
    position: relative;
    z-index: 1;
}

.header h1 {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff; /* Always white on the gradient banner */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dynamic Theme Toggle Button */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%; /* Circle toggle */
    color: #ffffff;
    padding: 10px;
    cursor: pointer;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.theme-toggle-btn:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

/* Menu Toggle Button for Mobile */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: #ffffff;
    padding: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
}
.menu-toggle:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.3);
}

/* Action Buttons */
.btn {
    padding: 12px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 99px; /* Pill-shaped buttons */
    color: #ffffff !important;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-neon);
}
.btn:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.35);
}
.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-main) !important;
    box-shadow: none;
}
.btn-secondary:hover {
    background: rgba(2, 136, 209, 0.05);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.logout-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 99px; /* Pill shape */
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(5px);
}
.logout-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
    transform: translateY(-2px);
}

/* ── Content Containers ──────────────────────────────────────── */
.stats-grid, .form-container, .table-container, .progress-section {
    position: relative;
    z-index: 1;
}

/* Dashboard Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-card);
    z-index: 1;
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 12px 24px -10px rgba(2, 136, 209, 0.15);
}

.stat-label {
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}
.stat-value {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    position: relative;
    z-index: 2;
}

/* Table Containers & Lists */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    overflow-x: auto;
    box-shadow: var(--shadow-card);
    margin-top: 25px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
th {
    padding: 14px 18px;
    background: rgba(2, 136, 209, 0.02);
    border-bottom: 2px solid var(--border-glass);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}
td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-main);
    font-size: 13.5px;
    vertical-align: middle;
    transition: background-color 0.2s;
}
tr:hover td {
    background: rgba(2, 136, 209, 0.01);
}
tr:last-child td {
    border-bottom: none;
}

.action-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-smooth);
}
.edit-btn {
    background: rgba(2, 136, 209, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(2, 136, 209, 0.15);
    margin-right: 6px;
}
.edit-btn:hover {
    background: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(2, 136, 209, 0.2);
}
.delete-btn {
    background: rgba(225, 57, 53, 0.08);
    color: var(--accent-red);
    border: 1px solid rgba(225, 57, 53, 0.15);
}
.delete-btn:hover {
    background: var(--accent-red);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(225, 57, 53, 0.2);
}

.thumbnail {
    width: 70px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}
.thumbnail:hover {
    transform: scale(1.08);
}

.avatar {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}
.avatar:hover {
    transform: scale(1.08);
}

/* ── Forms & Inputs ─────────────────────────────────────────── */
.form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 30px;
    max-width: 800px;
    box-shadow: var(--shadow-card);
}
.form-section {
    margin-bottom: 30px;
}
.form-section h3 {
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    margin-bottom: 20px;
    font-size: 16.5px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 10px;
}
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
}
input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition-smooth);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: var(--input-bg-focus);
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.15);
}
textarea {
    min-height: 110px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 13.5px;
}
.alert-success {
    background: rgba(0, 137, 123, 0.08);
    border: 1px solid rgba(0, 137, 123, 0.2);
    color: var(--accent-green);
}
.alert-danger {
    background: rgba(229, 57, 53, 0.08);
    border: 1px solid rgba(229, 57, 53, 0.2);
    color: var(--accent-red);
}

/* ── Login Page Layout ──────────────────────────────────────── */
.login-body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, rgba(2, 136, 209, 0.02) 100%);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-container {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-card);
}
.login-container h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-main);
}

/* ── Scraper Specific Styles ────────────────────────────────── */
.progress-section {
    margin-top: 30px;
}

.prog-card {
    border: none;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
}
.prog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.prog-card.c-total   { background: linear-gradient(135deg, #ec407a 0%, #f48fb1 100%); }
.prog-card.c-done    { background: linear-gradient(135deg, #00897b 0%, #4db6ac 100%); }
.prog-card.c-skipped { background: linear-gradient(135deg, #7b1fa2 0%, #ce93d8 100%); }
.prog-card.c-errors  { background: linear-gradient(135deg, #e53935 0%, #ef9a9a 100%); }
.prog-card.c-remain  { background: linear-gradient(135deg, #0288d1 0%, #4fc3f7 100%); }

.prog-card-lbl {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.8) !important;
}
.prog-card-val {
    font-size: 34px;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1.1;
    color: #ffffff !important;
}
.prog-card-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
}

.prog-card svg {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    opacity: 0.22;
    color: #ffffff;
    pointer-events: none;
    transition: var(--transition-smooth);
}
.prog-card:hover svg {
    transform: translateY(-50%) scale(1.1) rotate(5deg);
    opacity: 0.3;
}

.pbar-wrap {
    margin-top: 25px;
    background: rgba(2, 136, 209, 0.05);
    border-radius: 99px;
    height: 8px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}
.pbar-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: var(--gradient-primary);
    transition: width 0.4s ease-out;
}
.pbar-labels {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-muted);
}

.scraper-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 99px;
    margin-top: 15px;
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
    color: var(--text-main);
}
.scraper-badge.running {
    color: var(--accent-cyan);
    background: rgba(2, 136, 209, 0.05);
    border-color: rgba(2, 136, 209, 0.2);
}
.scraper-badge.done {
    color: var(--accent-green);
    background: rgba(0, 137, 123, 0.05);
    border-color: rgba(0, 137, 123, 0.2);
}
.scraper-badge.error {
    color: var(--accent-red);
    background: rgba(229, 57, 53, 0.05);
    border-color: rgba(229, 57, 53, 0.2);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ticker {
    margin-top: 14px;
    background: rgba(2, 136, 209, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 14px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.ticker.visible { display: flex; }
.ticker-lbl {
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.ticker-title {
    color: var(--text-main);
    font-weight: 500;
}

/* Terminal Console (Force Dark for Dev Experience) */
.console-container {
    margin-top: 25px;
    background: #0b0f19;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 10px;
    margin-bottom: 14px;
}
.console-title {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cpulse {
    width: 6px; height: 6px;
    background: #38bdf8;
    border-radius: 50%;
}
.cpulse.running {
    animation: pulse-dot 1.2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50%      { opacity: 1;   transform: scale(1.2); }
}

.console-output {
    width: 100%;
    height: 260px;
    background: transparent !important;
    border: none !important;
    color: #34d399 !important; /* Emerald green terminal text */
    font-family: 'Courier New', Courier, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    resize: vertical;
    outline: none !important;
    box-shadow: none !important;
}

/* ── Mobile Sidebar Drawer Overlay ──────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(38, 50, 56, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
}

/* ── Media Queries & Responsive Layout ──────────────────────── */
@media (max-width: 1024px) {
    .menu-toggle {
        display: inline-flex;
    }
    
    .sidebar {
        left: -260px;
    }
    
    .sidebar.active {
        left: 0;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 30px 20px;
    }
}

@media (max-width: 640px) {
    .header h1 {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .section-title .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Demo Banner & Button Styles ────────────────────────────── */
.demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: #f44336; /* red */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    z-index: 10001; /* above sidebar's 1000 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    gap: 8px;
}
.demo-banner i {
    font-size: 15px;
}
body.has-demo-banner .sidebar {
    top: 40px !important;
    height: calc(100vh - 40px) !important;
}
body.has-demo-banner .main-content {
    margin-top: 40px !important;
}
.btn-demo {
    background: rgba(38, 50, 56, 0.08) !important;
    border: 1px solid rgba(38, 50, 56, 0.15) !important;
    color: #263238 !important;
    font-weight: 600 !important;
    transition: all var(--transition-smooth);
}
.btn-demo:hover {
    background: rgba(38, 50, 56, 0.12) !important;
    border-color: rgba(38, 50, 56, 0.25) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}
.dark-theme .btn-demo {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}
.dark-theme .btn-demo:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}
body.has-demo-banner input:not([type="hidden"]),
body.has-demo-banner textarea,
body.has-demo-banner select,
body.has-demo-banner button[type="submit"],
body.has-demo-banner .action-btn.delete-btn,
body.has-demo-banner .action-btn.edit-btn,
body.has-demo-banner .btn:not(.btn-secondary):not(.logout-btn),
body.has-demo-banner a[href="add-video.php"],
body.has-demo-banner a[href="delete-video.php"] {
    cursor: not-allowed !important;
}
