/* =============================================================================
   YouTube Watcher Dashboard - Styles
   Gemini-inspired dark theme with glassmorphism
   ============================================================================= */

:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-elevated: #1a1a1a;
    --bg-card: rgba(26, 26, 26, 0.8);
    --bg-hover: rgba(255, 255, 255, 0.05);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);

    /* Accent colors */
    --accent-blue: #4285f4;
    --accent-purple: #a855f7;
    --accent-green: #22c55e;
    --accent-yellow: #eab308;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;

    /* Gradients */
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-green: linear-gradient(135deg, #22c55e 0%, #10b981 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.15);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Inline Controls */
.input-sm {
    height: 1.75rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.825rem;
    line-height: 1.25rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    color-scheme: dark;
    /* Force calendar picker to dark mode */
}

.input-sm:focus {
    outline: 2px solid var(--accent-purple);
    border-color: transparent;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* =============================================================================
   Header
   ============================================================================= */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--accent-purple);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: pulse 2s infinite;
}

.status-indicator.running .status-dot {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.status-indicator.idle .status-dot {
    background: var(--accent-blue);
}

.status-indicator.error .status-dot {
    background: var(--accent-red);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--gradient-purple);
    color: white;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(168, 85, 247, 0.25);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
}

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

.btn-ghost:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

/* =============================================================================
   Main Content
   ============================================================================= */

.main {
    padding: var(--space-xl);
    max-width: 1600px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-hover);
}

.stat-icon.videos-icon {
    color: var(--accent-purple);
}

.stat-icon.channels-icon {
    color: var(--accent-blue);
}

.stat-icon.time-icon {
    color: var(--accent-green);
}

.stat-icon.next-icon {
    color: var(--accent-cyan);
}

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

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

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

/* Content Grid */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.content-grid .panel {
    width: 100%;
}

/* Database Filter Tabs */
.database-filters {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-xs);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.db-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.db-filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.db-filter-btn.active {
    background: var(--gradient-purple);
    color: white;
    box-shadow: var(--shadow-sm), 0 0 15px rgba(168, 85, 247, 0.15);
}

.db-filter-btn svg {
    opacity: 0.7;
}

.db-filter-btn.active svg {
    opacity: 1;
}

.database-date-filters {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-left: auto;
    padding-left: var(--space-md);
}

.database-date-filters input[type="date"] {
    width: 130px;
}

.channel-link {
    color: var(--accent-blue);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.channel-link:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* Panels */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    /* overflow: hidden; Removed to allow tooltips to show */
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--accent-purple);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-hover);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

.panel-content {
    max-height: 400px;
    overflow-y: auto;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: var(--space-md);
    text-align: left;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.data-table th.sortable:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.data-table th .sort-icon {
    display: inline-block;
    width: 0.8em;
    margin-left: 4px;
    opacity: 0.3;
}

.data-table th.sorted-asc .sort-icon::after {
    content: "▲";
}

.data-table th.sorted-desc .sort-icon::after {
    content: "▼";
}

.data-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.channel-name {
    font-weight: 500;
}

.channel-url {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.70rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.pending {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Video List */
.video-list {
    padding: var(--space-sm);
}

.video-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

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

.video-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    color: var(--accent-purple);
}

.video-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: var(--space-xs);
}

.video-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.video-channel {
    color: var(--accent-blue);
}

/* Logs Panel */
.logs-panel {
    grid-column: 1 / -1;
    margin-top: var(--space-lg);
}

.logs-content {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.log-entries {
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.8;
}

.log-entry {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-xs) 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.log-timestamp {
    color: var(--text-muted);
    flex-shrink: 0;
}

.log-level {
    flex-shrink: 0;
    width: 60px;
    font-weight: 500;
}

.log-level.INFO {
    color: var(--accent-blue);
}

.log-level.WARNING {
    color: var(--accent-yellow);
}

.log-level.ERROR {
    color: var(--accent-red);
}

.log-level.DEBUG {
    color: var(--text-muted);
}

.log-message {
    color: var(--text-secondary);
    word-break: break-word;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    text-align: center;
}

.empty-state svg {
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* =============================================================================
   Schedule Panel
   ============================================================================= */

.schedule-panel {
    grid-column: 1 / -1;
    margin-bottom: var(--space-xl);
}

.schedule-content {
    max-height: none;
    padding: var(--space-lg);
}

.schedule-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 1024px) {
    .schedule-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

.schedule-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.schedule-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.schedule-item span:not(.schedule-label) {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.config-link {
    color: var(--accent-blue);
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
}

/* Tooltip */
.tooltip-container {
    position: relative;
}

.tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
    white-space: normal;
    min-width: 250px;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
}

.tooltip-container:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* =============================================================================
   Queue Panel
   ============================================================================= */

.queue-list {
    padding: var(--space-sm);
}

.queue-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

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

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

.queue-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    color: var(--accent-blue);
}

.queue-icon.priority {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

.queue-info {
    flex: 1;
    min-width: 0;
}

.queue-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: var(--space-xs);
}

.queue-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.priority-badge {
    padding: 2px var(--space-sm);
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border-radius: var(--radius-full);
    font-weight: 500;
}

.remove-queue-btn {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.queue-item:hover .remove-queue-btn {
    opacity: 1;
}

/* =============================================================================
   Enhanced Tables
   ============================================================================= */

.channel-url {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-blue);
    text-decoration: none;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-url:hover {
    text-decoration: underline;
}

.video-title {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-channel-btn {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

tr:hover .delete-channel-btn {
    opacity: 1;
}

.action-buttons {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.action-buttons .btn {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

tr:hover .action-buttons .btn {
    opacity: 1;
}

.queue-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.queue-actions .btn {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.queue-item:hover .queue-actions .btn {
    opacity: 1;
}

/* =============================================================================
   Modals
   ============================================================================= */

/* Tabs Navigation */
.tabs-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.7;
}

.tab-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    opacity: 1;
}

.view-panel {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modals */
.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;
    animation: fadeIn 0.2s ease;
}

.modal.show,
.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-group input[type="text"] {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.form-group input[type="text"]::placeholder {
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

/* Monolith Status */
.monolith-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.monolith-label {
    color: var(--text-tertiary);
}

.monolith-value {
    color: var(--accent-cyan);
    font-weight: 500;
}

/* =============================================================================
   Resizable Grid (RSS Content)
   ============================================================================= */

.resizable-grid {
    display: flex;
    flex-direction: row;
    gap: 0;
    position: relative;
}

.resizable-grid .resizable-panel {
    min-width: 200px;
    overflow: hidden;
}

.resizable-grid .resizable-panel:first-child {
    flex: 1 1 60%;
}

.resizable-grid .resizable-panel:last-child {
    flex: 1 1 40%;
}

/* Resizer Handle */
.resizer {
    width: 8px;
    background: transparent;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    z-index: 10;
    transition: background 0.2s ease;
}

.resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.resizer:hover::before,
.resizer.dragging::before {
    background: var(--accent-purple);
    height: 60px;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.resizer:hover,
.resizer.dragging {
    background: rgba(168, 85, 247, 0.05);
}

/* Prevent text selection during resize */
.resizing {
    user-select: none;
    cursor: col-resize !important;
}

.resizing * {
    cursor: col-resize !important;
}

/* ====================================
   Category Management Styles
   ==================================== */
.categories-header {
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: flex-end;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.category-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.category-item:hover {
    border-color: var(--border-hover);
}

.category-color-indicator {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.category-info .category-slug {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.category-info .category-description {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.category-actions {
    display: flex;
    gap: var(--space-sm);
}

.color-picker {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.color-picker input[type="color"] {
    width: 50px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.categories-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.category-checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-checkbox-item:hover {
    border-color: var(--border-hover);
}

.category-checkbox-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.category-checkbox-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.category-checkbox-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.category-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.modal-large {
    width: 600px;
    max-width: 90vw;
}

@media (max-width: 1024px) {
    .resizable-grid {
        flex-direction: column;
        gap: var(--space-xl);
    }

    .resizable-grid .resizable-panel {
        flex: none !important;
        width: 100% !important;
    }

    .resizer {
        display: none;
    }
}

/* Channel Info Column */
.channel-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

a.channel-name {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

a.channel-name:hover {
    color: var(--accent-purple);
}

/* Action Buttons in Tables */
.actions-cell {
    text-align: center;
    white-space: nowrap;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    margin: 0 2px;
}

.action-btn:hover:not(.disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.action-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.action-btn svg {
    display: block;
}

/* Content Viewer Modal */
.modal-large {
    width: 800px;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-large .modal-body {
    max-height: 60vh;
    overflow: hidden;
}

.content-viewer-textarea {
    width: 100%;
    height: 50vh;
    min-height: 300px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    padding: var(--space-md);
    resize: none;
    overflow: auto;
}

.content-viewer-textarea::placeholder {
    color: var(--text-muted);
}

/* Processing Queue Status Badges */
.status-badge.queue-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.status-badge.queue-processing {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.queue-completed {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
    text-decoration: underline;
}