/* ═══════════════════════════════════════════════════════════════════
   YouTube Dashboard - Styles
   Light-first design with full dark mode support
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Base Layout ─────────────────────────────────────────────────── */
.yt-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 20px;
}

/* ─── Tab Navigation ──────────────────────────────────────────────── */
.yt-tab-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.yt-tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}
.yt-tab-btn:hover {
    color: #1e293b;
    background: #f1f5f9;
}
.yt-tab-btn.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
    font-weight: 600;
}
.yt-tab-content {
    display: none;
}
.yt-tab-content.active {
    display: block;
}

/* ─── Loading State ───────────────────────────────────────────────── */
.yt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
}
.yt-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: yt-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes yt-spin {
    to { transform: rotate(360deg); }
}

/* ─── Not Configured State ────────────────────────────────────────── */
.yt-not-configured {
    text-align: center;
    padding: 60px 20px;
}
.yt-not-configured h2 {
    color: #334155;
    margin: 0 0 8px;
}
.yt-not-configured p {
    color: #64748b;
    margin: 0 0 20px;
}

/* ─── KPI Cards ───────────────────────────────────────────────────── */
.yt-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.yt-kpi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.yt-kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.yt-kpi-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.yt-kpi-trend {
    font-size: 12px;
    margin-top: 4px;
}
.yt-kpi-trend.positive { color: #16a34a; }
.yt-kpi-trend.negative { color: #dc2626; }

/* ─── Section Headings ────────────────────────────────────────────── */
.yt-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.yt-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* ─── Chart Containers ────────────────────────────────────────────── */
.yt-chart-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.yt-chart-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 12px;
}
.yt-chart-wrapper {
    position: relative;
    width: 100%;
}
.yt-chart-wrapper canvas {
    max-height: 350px;
}
.yt-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .yt-chart-row {
        grid-template-columns: 1fr;
    }
}

/* ─── Recent Videos Grid ──────────────────────────────────────────── */
.yt-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.yt-video-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
}
.yt-video-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.yt-video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}
.yt-video-card-body {
    padding: 10px 12px;
}
.yt-video-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}
.yt-video-card-meta {
    font-size: 12px;
    color: #64748b;
}
.yt-video-card-meta span {
    margin-right: 10px;
}

/* ─── Videos Tab: DataTable Overrides ─────────────────────────────── */
.yt-video-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.yt-video-filters select,
.yt-video-filters input {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
}
.yt-video-table-thumb {
    width: 120px;
    border-radius: 4px;
}
.yt-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.yt-status-public { background: #dcfce7; color: #16a34a; }
.yt-status-unlisted { background: #fef9c3; color: #ca8a04; }
.yt-status-private { background: #fee2e2; color: #dc2626; }

/* ─── Analytics Tab ───────────────────────────────────────────────── */
.yt-date-range-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.yt-range-btn {
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    color: #334155;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.yt-range-btn:hover {
    background: #f1f5f9;
}
.yt-range-btn.active {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
.yt-custom-range {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.yt-custom-range input[type="date"] {
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
}

/* ─── Playlists Tab ───────────────────────────────────────────────── */
.yt-playlist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.yt-playlist-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: box-shadow 0.15s;
}
.yt-playlist-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.yt-playlist-thumb {
    width: 100px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    background: #f1f5f9;
    flex-shrink: 0;
}
.yt-playlist-info {
    flex: 1;
    min-width: 0;
}
.yt-playlist-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}
.yt-playlist-meta {
    font-size: 12px;
    color: #64748b;
}
.yt-playlist-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.yt-playlist-expanded {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    margin-top: -12px;
    padding: 12px 16px;
}
.yt-playlist-video-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}
.yt-playlist-video-row:last-child {
    border-bottom: none;
}
.yt-playlist-video-thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 3px;
    background: #e2e8f0;
    flex-shrink: 0;
}
.yt-playlist-video-title {
    flex: 1;
    font-size: 13px;
    color: #1e293b;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Comments Tab ────────────────────────────────────────────────── */
.yt-comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.yt-comment-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
}
.yt-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.yt-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #e2e8f0;
}
.yt-comment-author {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.yt-comment-date {
    font-size: 12px;
    color: #94a3b8;
    margin-left: auto;
}
.yt-comment-text {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}
.yt-comment-video-link {
    font-size: 12px;
    color: #dc2626;
    text-decoration: none;
}
.yt-comment-video-link:hover {
    text-decoration: underline;
}
.yt-comment-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
.yt-comment-likes {
    font-size: 12px;
    color: #64748b;
}
.yt-comment-reply-count {
    font-size: 12px;
    color: #64748b;
}
.yt-comment-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.yt-comment-replies {
    margin-top: 10px;
    padding-left: 46px;
}
.yt-comment-reply-item {
    padding: 10px 0;
    border-top: 1px solid #f1f5f9;
}
.yt-reply-form {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    padding-left: 46px;
}
.yt-reply-form textarea {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 38px;
    color: #1e293b;
    background: #fff;
}
.yt-comment-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ─── Settings Tab ────────────────────────────────────────────────── */
.yt-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .yt-settings-grid {
        grid-template-columns: 1fr;
    }
}
.yt-settings-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}
.yt-settings-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.yt-form-group {
    margin-bottom: 14px;
}
.yt-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 4px;
}
.yt-form-group input[type="text"],
.yt-form-group input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    box-sizing: border-box;
}
.yt-form-group input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220,38,38,0.15);
}
.yt-form-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
}
.yt-oauth-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
}
.yt-oauth-status.connected {
    background: #dcfce7;
    color: #16a34a;
}
.yt-oauth-status.disconnected {
    background: #fee2e2;
    color: #dc2626;
}
.yt-cache-stats {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}
.yt-quota-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}
.yt-quota-fill {
    height: 100%;
    background: #dc2626;
    border-radius: 4px;
    transition: width 0.3s;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
.yt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
}
.yt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.yt-btn-primary {
    background: #dc2626;
    color: #fff;
}
.yt-btn-primary:hover:not(:disabled) {
    background: #b91c1c;
}
.yt-btn-secondary {
    background: #64748b;
    color: #fff;
}
.yt-btn-secondary:hover:not(:disabled) {
    background: #475569;
}
.yt-btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #334155;
}
.yt-btn-outline:hover:not(:disabled) {
    background: #f1f5f9;
}
.yt-btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}
.yt-btn-success {
    background: #16a34a;
    color: #fff;
}
.yt-btn-success:hover:not(:disabled) {
    background: #15803d;
}
.yt-btn-danger {
    background: #dc2626;
    color: #fff;
}
.yt-btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

/* ─── Modal / Overlay ─────────────────────────────────────────────── */
.yt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.yt-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.yt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.yt-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
}
.yt-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.yt-modal-close:hover {
    color: #1e293b;
}
.yt-modal-body {
    padding: 20px;
}
.yt-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ─── Video Edit Form ─────────────────────────────────────────────── */
.yt-edit-video-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.yt-edit-video-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.yt-edit-video-thumb {
    width: 180px;
    border-radius: 6px;
    flex-shrink: 0;
}
.yt-edit-video-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
}
.yt-edit-textarea {
    width: 100%;
    min-height: 100px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.5;
}
.yt-edit-textarea:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220,38,38,0.15);
}
.yt-edit-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    box-sizing: border-box;
}
.yt-edit-select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220,38,38,0.15);
}
.yt-edit-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .yt-edit-row {
        grid-template-columns: 1fr;
    }
    .yt-edit-video-preview {
        flex-direction: column;
    }
    .yt-edit-video-thumb {
        width: 100%;
    }
}
.yt-char-count {
    font-weight: 400;
    font-size: 11px;
    color: #94a3b8;
    margin-left: 6px;
}
.yt-form-hint-inline {
    font-weight: 400;
    font-size: 11px;
    color: #94a3b8;
}
.yt-edit-yt-link {
    font-size: 12px;
    color: #dc2626;
    text-decoration: none;
}
.yt-edit-yt-link:hover {
    text-decoration: underline;
}
.yt-modal.yt-modal-wide {
    max-width: 680px;
}

/* ─── Toast Notifications ─────────────────────────────────────────── */
.yt-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.yt-toast {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: yt-toast-in 0.3s ease;
    max-width: 360px;
}
.yt-toast.success { background: #16a34a; }
.yt-toast.error { background: #dc2626; }
.yt-toast.info { background: #2563eb; }
.yt-toast.fadeout {
    animation: yt-toast-out 0.3s ease forwards;
}
@keyframes yt-toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes yt-toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

/* ─── DataTables Overrides ────────────────────────────────────────── */
#yt-videos-table_wrapper .dataTables_filter input {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
}
#yt-videos-table_wrapper .dataTables_length select {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 8px;
}
table.dataTable tbody tr:hover {
    background: #f8fafc !important;
}

/* ─── Empty State ─────────────────────────────────────────────────── */
.yt-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}
.yt-empty-state p {
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .yt-tab-nav {
    border-bottom-color: #334155;
}
[data-theme="dark"] .yt-tab-btn {
    color: #94a3b8;
}
[data-theme="dark"] .yt-tab-btn:hover {
    color: #e2e8f0;
    background: #1e293b;
}
[data-theme="dark"] .yt-tab-btn.active {
    color: #f87171;
    border-bottom-color: #f87171;
}

[data-theme="dark"] .yt-loading { color: #94a3b8; }
[data-theme="dark"] .yt-spinner { border-color: #334155; border-top-color: #f87171; }

[data-theme="dark"] .yt-not-configured h2 { color: #e2e8f0; }
[data-theme="dark"] .yt-not-configured p { color: #94a3b8; }

[data-theme="dark"] .yt-kpi-card {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .yt-kpi-value { color: #e2e8f0; }
[data-theme="dark"] .yt-kpi-label { color: #94a3b8; }

[data-theme="dark"] .yt-section-title { color: #e2e8f0; }

[data-theme="dark"] .yt-chart-container {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .yt-chart-title { color: #e2e8f0; }

[data-theme="dark"] .yt-video-card {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .yt-video-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .yt-video-card-title { color: #e2e8f0; }
[data-theme="dark"] .yt-video-card-meta { color: #94a3b8; }
[data-theme="dark"] .yt-video-thumb { background: #0f172a; }

[data-theme="dark"] .yt-video-filters select,
[data-theme="dark"] .yt-video-filters input {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-theme="dark"] .yt-status-public { background: #14532d; color: #86efac; }
[data-theme="dark"] .yt-status-unlisted { background: #422006; color: #fde68a; }
[data-theme="dark"] .yt-status-private { background: #450a0a; color: #fca5a5; }

[data-theme="dark"] .yt-range-btn {
    background: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}
[data-theme="dark"] .yt-range-btn:hover {
    background: #334155;
    color: #e2e8f0;
}
[data-theme="dark"] .yt-range-btn.active {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
[data-theme="dark"] .yt-custom-range input[type="date"] {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-theme="dark"] .yt-playlist-item {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .yt-playlist-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
[data-theme="dark"] .yt-playlist-title { color: #e2e8f0; }
[data-theme="dark"] .yt-playlist-meta { color: #94a3b8; }
[data-theme="dark"] .yt-playlist-thumb { background: #0f172a; }
[data-theme="dark"] .yt-playlist-expanded {
    background: #0f172a;
    border-color: #334155;
}
[data-theme="dark"] .yt-playlist-video-row { border-bottom-color: #1e293b; }
[data-theme="dark"] .yt-playlist-video-title { color: #e2e8f0; }
[data-theme="dark"] .yt-playlist-video-thumb { background: #1e293b; }

[data-theme="dark"] .yt-comment-item {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .yt-comment-author { color: #e2e8f0; }
[data-theme="dark"] .yt-comment-date { color: #64748b; }
[data-theme="dark"] .yt-comment-text { color: #cbd5e1; }
[data-theme="dark"] .yt-comment-video-link { color: #f87171; }
[data-theme="dark"] .yt-comment-likes,
[data-theme="dark"] .yt-comment-reply-count { color: #94a3b8; }
[data-theme="dark"] .yt-comment-avatar { background: #334155; }
[data-theme="dark"] .yt-comment-reply-item { border-top-color: #334155; }
[data-theme="dark"] .yt-reply-form textarea {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}

[data-theme="dark"] .yt-settings-card {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .yt-settings-card h3 {
    color: #e2e8f0;
    border-bottom-color: #334155;
}
[data-theme="dark"] .yt-form-group label { color: #cbd5e1; }
[data-theme="dark"] .yt-form-group input {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
[data-theme="dark"] .yt-form-group input:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 2px rgba(248,113,113,0.2);
}
[data-theme="dark"] .yt-form-hint { color: #64748b; }
[data-theme="dark"] .yt-oauth-status.connected { background: #14532d; color: #86efac; }
[data-theme="dark"] .yt-oauth-status.disconnected { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .yt-cache-stats { color: #94a3b8; }
[data-theme="dark"] .yt-quota-bar { background: #334155; }

[data-theme="dark"] .yt-btn-outline {
    border-color: #475569;
    color: #cbd5e1;
}
[data-theme="dark"] .yt-btn-outline:hover:not(:disabled) {
    background: #334155;
}

[data-theme="dark"] .yt-modal {
    background: #1e293b;
}
[data-theme="dark"] .yt-modal-header {
    border-bottom-color: #334155;
}
[data-theme="dark"] .yt-modal-header h3 { color: #e2e8f0; }
[data-theme="dark"] .yt-modal-close { color: #64748b; }
[data-theme="dark"] .yt-modal-close:hover { color: #e2e8f0; }
[data-theme="dark"] .yt-modal-body { color: #cbd5e1; }
[data-theme="dark"] .yt-modal-footer { border-top-color: #334155; }

[data-theme="dark"] .yt-empty-state { color: #64748b; }

/* Video Edit dark mode */
[data-theme="dark"] .yt-edit-video-preview { border-bottom-color: #334155; }
[data-theme="dark"] .yt-edit-video-stats { color: #94a3b8; }
[data-theme="dark"] .yt-edit-textarea {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
[data-theme="dark"] .yt-edit-textarea:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 2px rgba(248,113,113,0.2);
}
[data-theme="dark"] .yt-edit-select {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
[data-theme="dark"] .yt-edit-select:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 2px rgba(248,113,113,0.2);
}
[data-theme="dark"] .yt-edit-yt-link { color: #f87171; }
[data-theme="dark"] .yt-char-count { color: #64748b; }
[data-theme="dark"] .yt-form-hint-inline { color: #64748b; }

/* DataTables dark mode */
[data-theme="dark"] table.dataTable {
    color: #e2e8f0 !important;
}
[data-theme="dark"] table.dataTable thead th {
    background: #0f172a !important;
    color: #94a3b8 !important;
    border-bottom-color: #334155 !important;
}
[data-theme="dark"] table.dataTable tbody tr {
    background: #1e293b !important;
}
[data-theme="dark"] table.dataTable tbody tr:hover {
    background: #334155 !important;
}
[data-theme="dark"] table.dataTable tbody td {
    border-bottom-color: #334155 !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_info {
    color: #94a3b8 !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #94a3b8 !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #dc2626 !important;
    color: #fff !important;
    border-color: #dc2626 !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .yt-container {
        padding: 10px 12px;
    }
    .yt-tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        flex-wrap: nowrap;
    }
    .yt-tab-btn {
        padding: 8px 14px;
        font-size: 13px;
        flex-shrink: 0;
    }
    .yt-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .yt-kpi-value {
        font-size: 22px;
    }
    .yt-video-grid {
        grid-template-columns: 1fr;
    }
    .yt-settings-grid {
        grid-template-columns: 1fr;
    }
    .yt-modal {
        max-width: 95%;
    }
}
