/* Dashboard New Theme - Matching Landing Page */

@import './variables.css';

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    bottom: -150px;
    left: -100px;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 12, 16, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.brand-text {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hamburger Menu Button */
.menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.menu-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
}

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

.nav-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
}

.nav-profile:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.nav-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 70px);
    background: rgba(10, 12, 16, 0.7);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    padding: 20px 15px;
    z-index: 90;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

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

.menu-item:hover {
    background: var(--bg-card);
    color: var(--text);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: 70px;
    padding: 30px;
    min-height: calc(100vh - 70px);
    position: relative;
    z-index: 1;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.welcome-text h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.welcome-text h1 span {
    color: var(--primary);
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.welcome-icon {
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.3;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Section Title */
.section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
}

/* Actions Section */
.actions-section {
    margin-bottom: 30px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.action-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.action-card:hover .action-icon {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Recent Section */
.recent-section {
    margin-bottom: 30px;
}

.recent-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.video-item:last-child {
    border-bottom: none;
}

.video-item:hover {
    background: var(--bg-card-hover);
}

.video-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.video-info {
    flex: 1;
}

.video-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.video-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.video-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-completed {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-uploading {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.empty-state {
    padding: 50px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 95;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    /* Sidebar Overlay */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 94;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (min-width: 993px) {
    .sidebar {
        transform: translateX(0) !important;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 15px;
    }
    
    .nav-profile span {
        display: none;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .welcome-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Common Page Utilities */
.page-section {
    margin-bottom: 30px;
}

.page-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.page-title i {
    color: var(--primary);
    margin-right: 12px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.content-card:hover {
    background: var(--bg-card-hover);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 12, 16, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(10, 12, 16, 0.8);
    box-shadow: 0 0 0 3px rgba(235, 22, 22, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    cursor: pointer;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--primary-glow);
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

/* Loading State */
.loading-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.loading-state i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
    color: var(--primary);
}

.loading-state p {
    font-size: 0.95rem;
}

/* ==================== PAGE HEADER (shared) ==================== */
.page-header {
    margin-bottom: 28px;
}
.page-header h1 {
    font-size: 1.6rem; font-weight: 700; color: var(--text, #fff);
    margin-bottom: 6px; display: flex; align-items: center; gap: 12px;
}
.page-header h1 i { color: var(--primary, #eb1616); font-size: 1.4rem; }
.page-header p { color: var(--text-muted, #888); font-size: 0.92rem; }
