/* =============================================
   YOUTUBE UPLOADER - MAIN STYLES
   =============================================
   
   PENJELASAN:
   File CSS ini menggunakan:
   - CSS Variables (Custom Properties) untuk theme
   - Flexbox & Grid untuk layout
   - Modern effects: glassmorphism, gradients, transitions
   ============================================= */

/* =============================================
   CSS VARIABLES - Definisi warna dan ukuran
   ============================================= */
:root {
    /* Color Palette - Dark Theme */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --bg-card: rgba(30, 30, 30, 0.8);

    /* Accent Colors */
    --accent-red: #ff0000;
    --accent-red-hover: #cc0000;
    --accent-blue: #3ea6ff;
    --accent-green: #2ecc71;
    --accent-orange: #f39c12;
    --accent-purple: #9b59b6;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #717171;

    /* Border & Shadow */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(255, 0, 0, 0.2);

    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* =============================================
   RESET & BASE STYLES
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-primary);
}

/* =============================================
   AUTH PAGE STYLES - Login/Register
   ============================================= */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at top, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(62, 166, 255, 0.1) 0%, transparent 50%),
        var(--bg-primary);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-red);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

/* Tab Switcher */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-md);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--accent-red);
    color: var(--text-primary);
}

/* Form Styles */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: var(--accent-red);
    font-size: 13px;
    margin-bottom: 16px;
    min-height: 20px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-red) 0%, #cc0000 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.auth-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 24px;
}

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-logo svg {
    width: 32px;
    height: 32px;
    color: var(--accent-red);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(255, 0, 0, 0.1);
    color: var(--accent-red);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item span {
    font-size: 14px;
    font-weight: 500;
}

/* User Profile in Sidebar */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-purple));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content>.page-section {
    flex: 1;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.red {
    background: rgba(255, 0, 0, 0.1);
    color: var(--accent-red);
}

.stat-icon.blue {
    background: rgba(62, 166, 255, 0.1);
    color: var(--accent-blue);
}

.stat-icon.green {
    background: rgba(46, 204, 113, 0.1);
    color: var(--accent-green);
}

.stat-icon.orange {
    background: rgba(243, 156, 18, 0.1);
    color: var(--accent-orange);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Content Cards */
.content-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
}

.data-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: var(--bg-tertiary) !important;
}

.data-table tbody tr:hover td {
    background-color: var(--bg-tertiary) !important;
}

.data-table td {
    background-color: transparent;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--accent-green);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--accent-orange);
}

.badge-error {
    background: rgba(255, 0, 0, 0.1);
    color: var(--accent-red);
}

.badge-info {
    background: rgba(62, 166, 255, 0.1);
    color: var(--accent-blue);
}

/* Button Variants */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--text-muted);
}

.btn-danger {
    background: rgba(255, 0, 0, 0.1);
    color: var(--accent-red);
}

.btn-danger:hover {
    background: var(--accent-red);
    color: var(--text-primary);
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* =============================================
   DASHBOARD FOOTER
   ============================================= */

.dashboard-footer {
    margin-top: auto;
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    flex-shrink: 0;
}

.dashboard-footer p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

/* =============================================
   RESPONSIVE - Mobile Friendly
   ============================================= */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--accent-red);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {

    /* Show mobile menu button */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Sidebar hidden by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        z-index: 100;
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Main content full width */
    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-top: 70px;
        /* Space for mobile menu button */
    }

    /* Smaller headers */
    .page-title {
        font-size: 22px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    /* Single column stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    /* Card adjustments */
    .content-card {
        border-radius: var(--radius-sm);
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .card-header .btn {
        width: 100%;
        justify-content: center;
    }

    .card-body {
        padding: 16px;
    }

    /* Responsive table - horizontal scroll */
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .data-table th,
    .data-table td {
        padding: 12px 10px;
        min-width: 100px;
    }

    .data-table td:first-child {
        min-width: 150px;
    }

    /* Action buttons stacked */
    .action-buttons {
        flex-direction: column;
        gap: 6px;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
    }

    /* Modal full width on mobile */
    .modal-content {
        max-width: 100%;
        margin: 16px;
        max-height: calc(100vh - 32px);
    }

    .modal-header {
        padding: 16px;
    }

    #userForm .form-group {
        padding: 0 16px;
    }

    #userForm .form-group:first-of-type {
        padding-top: 16px;
    }

    #userForm .modal-footer {
        padding: 0 16px 16px;
        flex-direction: column;
    }

    #userForm .modal-footer .btn {
        width: 100%;
    }

    /* Larger touch targets */
    .btn {
        padding: 12px 20px;
        min-height: 44px;
    }

    .form-input {
        padding: 14px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    /* Auth page adjustments */
    .auth-container {
        padding: 16px;
    }

    .auth-card {
        padding: 24px;
    }

    .logo {
        font-size: 20px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .page-header {
        margin-bottom: 16px;
    }

    .page-title {
        font-size: 20px;
    }

    /* Hide some table columns on very small screens */
    .data-table .hide-mobile {
        display: none;
    }

    /* User avatar smaller */
    .user-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }

    .badge {
        padding: 3px 8px;
        font-size: 11px;
    }
}

/* =============================================
   MODAL STYLES
   ============================================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Form Input for Modal */
.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

select.form-input {
    cursor: pointer;
}

/* Additional Badge Colors */
.badge-primary {
    background: rgba(255, 0, 0, 0.1);
    color: var(--accent-red);
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-danger {
    background: rgba(255, 0, 0, 0.1);
    color: var(--accent-red);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--accent-blue);
    color: var(--text-primary);
}

.btn-icon.btn-danger:hover {
    background: var(--accent-red);
    color: var(--text-primary);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Modal Form Styles */
#userForm .form-group {
    padding: 0 24px;
}

#userForm .form-group:first-of-type {
    padding-top: 24px;
}

#userFormError {
    padding: 0 24px;
}

#userForm .modal-footer {
    padding: 0 24px 24px;
}

/* =============================================
   CHANNEL CARDS
   ============================================= */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.channel-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.channel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 0, 0, 0.3);
}

.channel-card-header {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 24px 24px 0;
}

.channel-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-red);
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

.channel-badge {
    position: absolute;
    bottom: -4px;
    right: calc(50% - 52px);
    width: 24px;
    height: 24px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid var(--bg-card);
}

.channel-card-body {
    padding: 20px 24px;
    text-align: center;
}

.channel-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.channel-id {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--accent-blue);
    padding: 4px 10px;
    background: rgba(62, 166, 255, 0.1);
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    transition: all var(--transition-fast);
}

.channel-id:hover {
    background: rgba(62, 166, 255, 0.2);
    color: var(--text-primary);
}

.channel-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.channel-stat {
    text-align: center;
}

.channel-stat .stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.channel-stat .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.channel-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.connected-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.connected-date svg {
    opacity: 0.7;
}

.channel-card-footer .btn {
    padding: 8px 14px;
    font-size: 13px;
}

.channel-card-footer .btn svg {
    width: 14px;
    height: 14px;
}

/* Mobile responsive for channel cards */
@media (max-width: 768px) {
    .channels-grid {
        grid-template-columns: 1fr;
    }

    .channel-card-footer {
        flex-direction: column;
        gap: 12px;
    }

    .channel-card-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* =============================================
   MONETIZATION STATUS
   ============================================= */
.channel-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.channel-monetization {
    margin-top: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.monetization-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.monetization-icon {
    font-size: 18px;
}

.monetization-icon.eligible {
    filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.5));
}

.monetization-icon.not-eligible {
    opacity: 0.7;
}

.monetization-icon.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.monetization-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.monetization-body {
    padding: 16px;
}

.monetization-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 8px;
}

.monetization-item {
    margin-bottom: 12px;
}

.monetization-item:last-child {
    margin-bottom: 0;
}

.monetization-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.monetization-value {
    font-weight: 600;
}

.monetization-value.met {
    color: var(--accent-green);
}

.monetization-value.not-met {
    color: var(--accent-orange);
}

.monetization-value.info {
    color: var(--accent-blue);
    font-size: 11px;
    font-weight: 500;
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-fill.complete {
    background: linear-gradient(90deg, var(--accent-green), #27ae60);
}

.progress-hint {
    display: block;
    margin-top: 4px;
    color: var(--accent-orange);
    font-size: 11px;
}

/* Monetization Status Badge */
.monetization-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.monetization-status.eligible {
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.monetization-status.not-eligible {
    background: rgba(243, 156, 18, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

/* Mobile responsive for monetization */
@media (max-width: 480px) {
    .channel-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        padding: 12px;
    }

    .channel-stat .stat-number {
        font-size: 16px;
    }

    .channel-stat .stat-label {
        font-size: 10px;
    }

    .monetization-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* =============================================
   CHANNELS TABLE ROW LAYOUT
   ============================================= */
.channels-table {
    width: 100%;
}

.channel-row-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-row-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.channel-row-info strong {
    display: block;
    font-size: 14px;
}

.channel-row-link {
    font-size: 11px;
    color: var(--accent-blue);
    text-decoration: none;
}

.channel-row-link:hover {
    text-decoration: underline;
}

.channel-stat-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.channel-date-cell {
    font-size: 13px;
    color: var(--text-muted);
}

.channel-status-cell .badge {
    white-space: nowrap;
}

/* Responsive channels table */
@media (max-width: 1024px) {

    .channels-table th:nth-child(4),
    .channels-table td:nth-child(4) {
        display: none;
        /* Hide Views column on tablet */
    }
}

@media (max-width: 768px) {

    .channels-table th:nth-child(3),
    .channels-table td:nth-child(3),
    .channels-table th:nth-child(6),
    .channels-table td:nth-child(6) {
        display: none;
        /* Hide Videos and Connected on mobile */
    }

    .channel-row-avatar {
        width: 32px;
        height: 32px;
    }

    .channel-row-info strong {
        font-size: 13px;
    }
}

/* =============================================
   FILE MANAGER STYLES
   ============================================= */

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-red);
    color: var(--text-primary);
}

/* Upload Dropzone */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent-red);
    background: rgba(255, 0, 0, 0.05);
}

.upload-dropzone .dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Asset Grid */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.asset-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.asset-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.asset-preview {
    width: 100%;
    height: 120px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.asset-preview img,
.asset-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asset-preview .icon {
    font-size: 48px;
    opacity: 0.5;
}

.asset-info {
    padding: 12px;
}

.asset-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.asset-size {
    font-size: 11px;
    color: var(--text-muted);
}

.asset-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.asset-item:hover .asset-actions {
    opacity: 1;
}

.asset-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.asset-action-btn:hover {
    background: var(--accent-red);
}

/* Google Drive Browser */
.drive-list {
    max-height: 400px;
    overflow-y: auto;
}

.drive-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.drive-item:hover {
    background: var(--bg-tertiary);
}

.drive-item.selected {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--accent-red);
}

.drive-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.drive-item-icon img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.drive-item-info {
    flex: 1;
    min-width: 0;
}

.drive-item-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drive-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.breadcrumb-item:hover {
    background: var(--bg-primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .asset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 45%;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* =============================================
   FILE MANAGER STYLES
   ============================================= */

/* Main Grid Container */
#assetFileGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 24px;
    min-height: 200px;
}

#assetFileGrid .empty-state {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Asset Card */
.asset-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: all var(--transition-fast);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
}

.asset-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-red);
    z-index: 2;
}

/* Preview Area (Image/Video/Icon) */
.asset-preview {
    flex: 1;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.asset-preview img,
.asset-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.asset-item:hover .asset-preview img,
.asset-item:hover .asset-preview video {
    transform: scale(1.05);
}

.asset-preview .icon {
    font-size: 48px;
}

/* File Info Overlay */
.asset-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
    z-index: 2;
}

.asset-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 2px;
}

.asset-size {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

/* Action Buttons (Delete) */
.asset-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 3;
}

.asset-item:hover .asset-actions {
    opacity: 1;
    transform: translateY(0);
}

.asset-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.asset-action-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: scale(1.1);
}

/* Upload Area Styles */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all var(--transition-normal);
    cursor: pointer;
    margin-bottom: 24px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent-red);
    background: rgba(255, 0, 0, 0.05);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--text-muted);
    transition: color 0.3s;
}

.upload-area:hover .upload-icon {
    color: var(--accent-red);
}

.upload-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.upload-text p {
    color: var(--text-muted);
    font-size: 13px;
}

.browse-link {
    color: var(--accent-blue);
    text-decoration: underline;
    cursor: pointer;
}

/* Tab Filter Buttons */
.asset-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.tab-btn.active {
    background: rgba(255, 0, 0, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Stats Row */
.asset-stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.asset-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.asset-stat-value {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.asset-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Page Section Layout Fix */
.page-section {
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* Fix for sections that appear behind sidebar */
#assets.page-section,
#users.page-section,
#settings.page-section,
#autogen.page-section {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    margin-left: 260px;
    padding: 24px;
    width: calc(100% - 260px);
    box-sizing: border-box;
    min-height: 100vh;
}

/* Mobile responsive fix */
@media (max-width: 768px) {

    #assets.page-section,
    #users.page-section,
    #settings.page-section,
    #autogen.page-section {
        margin-left: 0;
        width: 100%;
        padding: 16px;
        padding-top: 70px;
    }
}

/* =============================================
   TABS COMPONENT
   ============================================= */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--accent-red);
    color: var(--text-primary);
}

/* Tab content */
.autogen-tab-content {
    display: none;
}

.autogen-tab-content:first-of-type {
    display: block;
}