/* ==========================================================================
   Vimeo Dashboard Styles
   ========================================================================== */

/* --- Reset & Base --- */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0; padding: 0;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
}

/* --- Container --- */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Header --- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-header h1 .vimeo-icon {
    width: 28px; height: 28px;
    color: #1ab7ea;
}
.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
}

/* --- Tabs --- */
.tab-nav {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
    font-family: inherit;
    margin-bottom: -2px;
}
.tab-btn:hover {
    color: #1ab7ea;
    background: rgba(26, 183, 234, 0.05);
}
.tab-btn.active {
    color: #1ab7ea;
    border-bottom-color: #1ab7ea;
    font-weight: 600;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* --- Cards --- */
.card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}
.card-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0;
}

/* --- Stat Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1ab7ea;
    line-height: 1.2;
}
.stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}
.stat-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* --- Storage Bar --- */
.storage-bar-container {
    margin: 12px 0;
}
.storage-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}
.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1ab7ea, #1e40af);
    border-radius: 6px;
    transition: width 0.6s ease;
}
.storage-bar-fill.warning { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.storage-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* --- Grid Layouts --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}
.btn-primary { background: #1ab7ea; color: #fff; }
.btn-primary:hover { background: #0ea5e0; }
.btn-secondary { background: #e2e8f0; color: #475569; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: #22c55e; color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 4px; }
.btn-icon { padding: 6px; min-width: 32px; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- Forms --- */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #1ab7ea;
    box-shadow: 0 0 0 3px rgba(26, 183, 234, 0.15);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-help { font-size: 12px; color: #64748b; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-inline { display: flex; gap: 8px; align-items: flex-end; }

/* --- Tables --- */
.data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table.dataTable {
    width: 100% !important;
    border-collapse: collapse;
}
table.dataTable thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0;
}
table.dataTable tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    vertical-align: middle;
}
table.dataTable tbody tr:hover {
    background: #f8fafc;
}

/* --- Video Thumbnail Cell --- */
.video-thumb-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
}
.video-thumb {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    background: #e2e8f0;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}
.video-thumb:hover { opacity: 0.8; }
.video-info {
    min-width: 0;
}
.video-name {
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
    display: block;
}
.video-name a {
    color: inherit;
    text-decoration: none;
}
.video-name a:hover { color: #1ab7ea; }
.video-meta {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* --- Privacy Badge --- */
.privacy-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}
.privacy-anybody { background: #dcfce7; color: #166534; }
.privacy-unlisted { background: #fef3c7; color: #92400e; }
.privacy-password { background: #dbeafe; color: #1e40af; }
.privacy-disable, .privacy-nobody { background: #fee2e2; color: #991b1b; }
.privacy-users { background: #e0e7ff; color: #3730a3; }

/* --- Status Badge --- */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.status-available { background: #dcfce7; color: #166534; }
.status-uploading { background: #fef3c7; color: #92400e; }
.status-transcoding, .status-transcode_starting { background: #dbeafe; color: #1e40af; }
.status-quota_exceeded { background: #fee2e2; color: #991b1b; }

/* --- Loading --- */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #1ab7ea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { color: #64748b; margin: 0 0 8px; }
.empty-state p { margin: 0; font-size: 14px; }

/* --- Error --- */
.error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}
.error-msg a { color: #991b1b; font-weight: 600; }

/* --- Success --- */
.success-msg {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* --- Toolbar --- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.search-box {
    position: relative;
}
.search-box input {
    padding: 8px 12px 8px 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    width: 260px;
    font-family: inherit;
    background: #fff;
}
.search-box input:focus {
    outline: none;
    border-color: #1ab7ea;
    box-shadow: 0 0 0 3px rgba(26, 183, 234, 0.15);
}
.search-box .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 16px; height: 16px;
}
.filter-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    font-family: inherit;
    color: #1e293b;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
}
.pagination button {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #475569;
    font-family: inherit;
    transition: all 0.2s;
}
.pagination button:hover:not(:disabled) { background: #f1f5f9; border-color: #1ab7ea; color: #1ab7ea; }
.pagination button.active { background: #1ab7ea; color: #fff; border-color: #1ab7ea; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-info { font-size: 13px; color: #64748b; margin: 0 12px; }

/* --- Folder/Showcase Cards --- */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.folder-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.folder-card:hover {
    border-color: #1ab7ea;
    box-shadow: 0 4px 12px rgba(26, 183, 234, 0.1);
    transform: translateY(-2px);
}
.folder-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.folder-card-meta {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 12px;
}
.folder-card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}
.folder-card:hover .folder-card-actions { opacity: 1; }

/* --- Upload Area --- */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    margin-bottom: 20px;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: #1ab7ea;
    background: rgba(26, 183, 234, 0.05);
}
.upload-zone-icon { font-size: 48px; color: #94a3b8; margin-bottom: 12px; }
.upload-zone h3 { margin: 0 0 4px; color: #475569; }
.upload-zone p { margin: 0; color: #94a3b8; font-size: 14px; }

.upload-progress {
    margin-top: 16px;
}
.upload-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1ab7ea, #22c55e);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.upload-progress-text {
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.upload-queue {
    margin-top: 16px;
}
.upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
}
.upload-item-info { flex: 1; min-width: 0; }
.upload-item-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-size { font-size: 12px; color: #64748b; }
.upload-item-status { font-size: 12px; font-weight: 600; }
.upload-item-status.uploading { color: #1ab7ea; }
.upload-item-status.complete { color: #22c55e; }
.upload-item-status.error { color: #ef4444; }

/* --- Modal / Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.2s;
}
.modal-overlay.visible .modal {
    transform: scale(1);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.modal-title { font-size: 18px; font-weight: 700; margin: 0; color: #0f172a; }
.modal-close {
    background: none; border: none;
    font-size: 24px; color: #94a3b8;
    cursor: pointer; padding: 0; line-height: 1;
}
.modal-close:hover { color: #ef4444; }
.modal-body { padding: 20px 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}
.modal-sm { max-width: 480px; }
.modal-lg { max-width: 1000px; }

/* --- Confirm Overlay --- */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.confirm-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.confirm-box h3 { margin: 0 0 12px; font-size: 18px; color: #0f172a; }
.confirm-box p { margin: 0 0 20px; color: #64748b; font-size: 14px; }
.confirm-actions { display: flex; gap: 8px; justify-content: center; }

/* --- Video Player Modal --- */
.player-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.player-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Video Detail Panel --- */
.video-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.detail-value {
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 12px;
    word-break: break-word;
}

/* --- Tag Chips --- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.tag-chip .remove-tag {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
    margin-left: 2px;
}
.tag-chip .remove-tag:hover { opacity: 1; color: #ef4444; }

/* --- Charts --- */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}
.chart-container-sm { height: 200px; }

/* --- Recent Videos List --- */
.recent-video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.recent-video-item:last-child { border-bottom: none; }
.recent-video-thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    background: #e2e8f0;
    flex-shrink: 0;
}
.recent-video-info { flex: 1; min-width: 0; }
.recent-video-name {
    font-weight: 600;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.recent-video-meta {
    font-size: 11px;
    color: #94a3b8;
}
.recent-video-plays {
    font-size: 13px;
    font-weight: 600;
    color: #1ab7ea;
    white-space: nowrap;
}

/* --- Showcase Thumb --- */
.showcase-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    background: #e2e8f0;
    margin: -20px -20px 12px;
    width: calc(100% + 40px);
}

/* --- Settings --- */
.settings-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}
.settings-section:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

/* --- Rate Limit Indicator --- */
.rate-limit {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}
.rate-limit-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
}
.rate-limit-dot.warning { background: #f59e0b; }
.rate-limit-dot.danger { background: #ef4444; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .video-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .container { padding: 12px; }
    .page-header h1 { font-size: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left, .toolbar-right { justify-content: flex-start; }
    .search-box input { width: 100%; }
    .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        flex-wrap: nowrap;
    }
    .tab-btn { padding: 8px 14px; font-size: 13px; flex-shrink: 0; }
    .video-thumb-cell { min-width: 200px; }
    .video-thumb { width: 80px; height: 45px; }
    .folder-grid { grid-template-columns: 1fr; }
    .modal { max-height: 95vh; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 22px; }
    .tab-nav { gap: 0; }
    .tab-btn { padding: 8px 10px; font-size: 12px; flex-shrink: 0; }
    .page-header { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */
[data-theme="dark"] body { background: #0f172a !important; color: #e2e8f0 !important; }
[data-theme="dark"] .container { color: #e2e8f0 !important; }
[data-theme="dark"] .page-header h1 { color: #f1f5f9 !important; }

[data-theme="dark"] .card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .card-title { color: #f1f5f9 !important; }

[data-theme="dark"] .stat-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .stat-label { color: #94a3b8 !important; }

[data-theme="dark"] .tab-nav { border-color: #334155 !important; }
[data-theme="dark"] .tab-btn { color: #94a3b8 !important; }
[data-theme="dark"] .tab-btn:hover { color: #1ab7ea !important; background: rgba(26, 183, 234, 0.1) !important; }
[data-theme="dark"] .tab-btn.active { color: #1ab7ea !important; }

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .form-label { color: #cbd5e1 !important; }

[data-theme="dark"] .btn-secondary { background: #334155 !important; color: #cbd5e1 !important; }
[data-theme="dark"] .btn-secondary:hover { background: #475569 !important; }

[data-theme="dark"] table.dataTable thead th {
    background: #0f172a !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] table.dataTable tbody td {
    color: #e2e8f0 !important;
    border-color: #1e293b !important;
}
[data-theme="dark"] table.dataTable tbody tr:hover { background: #1e293b !important; }

[data-theme="dark"] .video-name { color: #f1f5f9 !important; }
[data-theme="dark"] .video-name a:hover { color: #1ab7ea !important; }

[data-theme="dark"] .search-box input {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .filter-select {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .folder-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .folder-card:hover { border-color: #1ab7ea !important; }
[data-theme="dark"] .folder-card-name { color: #f1f5f9 !important; }

[data-theme="dark"] .upload-zone {
    background: #1e293b !important;
    border-color: #475569 !important;
}
[data-theme="dark"] .upload-zone:hover,
[data-theme="dark"] .upload-zone.drag-over {
    border-color: #1ab7ea !important;
    background: rgba(26, 183, 234, 0.05) !important;
}
[data-theme="dark"] .upload-zone h3 { color: #cbd5e1 !important; }
[data-theme="dark"] .upload-item {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .modal { background: #1e293b !important; }
[data-theme="dark"] .modal-header { border-color: #334155 !important; }
[data-theme="dark"] .modal-footer { border-color: #334155 !important; }
[data-theme="dark"] .modal-title { color: #f1f5f9 !important; }

[data-theme="dark"] .confirm-box { background: #1e293b !important; }
[data-theme="dark"] .confirm-box h3 { color: #f1f5f9 !important; }
[data-theme="dark"] .confirm-box p { color: #94a3b8 !important; }

[data-theme="dark"] .detail-value { color: #e2e8f0 !important; }
[data-theme="dark"] .detail-label { color: #94a3b8 !important; }

[data-theme="dark"] .storage-bar { background: #334155 !important; }

[data-theme="dark"] .error-msg {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}
[data-theme="dark"] .success-msg {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #86efac !important;
}

[data-theme="dark"] .header-badge { background: rgba(26, 183, 234, 0.15) !important; color: #7dd3fc !important; }
[data-theme="dark"] .tag-chip { background: rgba(26, 183, 234, 0.15) !important; color: #7dd3fc !important; }

[data-theme="dark"] .recent-video-item { border-color: #334155 !important; }
[data-theme="dark"] .recent-video-name { color: #f1f5f9 !important; }

[data-theme="dark"] .pagination button {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .pagination button:hover:not(:disabled) {
    background: #334155 !important;
    border-color: #1ab7ea !important;
    color: #1ab7ea !important;
}
[data-theme="dark"] .pagination button.active {
    background: #1ab7ea !important;
    color: #fff !important;
}

[data-theme="dark"] .settings-section { border-color: #334155 !important; }

/* DataTables dark mode overrides */
[data-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    color: #94a3b8 !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #94a3b8 !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #1ab7ea !important;
    color: #fff !important;
    border-color: #1ab7ea !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #334155 !important;
    color: #1ab7ea !important;
    border-color: #334155 !important;
}
