/* ============================================
   COU ADMIN PANEL - CENTRALIZED STYLES
   Dark Theme (COU-171)
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Backgrounds */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1b26;
    --bg-tertiary: #1f2028;
    --bg-sidebar: #16171f;
    --bg-hover: #252736;
    --bg-active: rgba(99, 102, 241, 0.15);
    
    /* Text colors */
    --text-primary: #e4e4e7;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Accent colors */
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-subtle: rgba(99, 102, 241, 0.2);
    
    /* Borders */
    --border-color: #2d2e3a;
    --border-subtle: #252630;
    
    /* Status colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

/* ============================================
   ENVIRONMENT-SPECIFIC THEMING (COU-328)
   Production: Uses default colors (neutral dark blue-gray)
   Test: Warm red/orange tint to indicate non-production
   ============================================ */
body.env-test {
    --bg-primary: #14100f;
    --bg-secondary: #1f1a19;
    --bg-tertiary: #241f1d;
    --bg-sidebar: #1a1514;
    --bg-hover: #2d2523;
}

/* Test environment badge - hidden by default, shown only in test */
.env-badge {
    display: none;
    font-size: 0.7rem;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    margin-top: 0.5rem;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

body.env-test .env-badge {
    display: inline-block;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.sidebar-logo {
    width: 70px;
    height: 70px;
    margin-bottom: 0.5rem;
    border-radius: 12px;
}

.sidebar-brand-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--bg-active);
    color: var(--accent);
    border-left-color: var(--accent);
}

.sidebar-nav .nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 1.5rem;
}

.sidebar-nav .nav-settings {
    margin-top: auto;
}

/* Sidebar user info (COU-512) */
.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 1.5rem;
    border-top: 1px solid var(--border-color);
    gap: 8px;
}

.sidebar-user-name {
    color: var(--text-secondary);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.sidebar-user-handle {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.sidebar-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    flex-shrink: 0;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.sidebar-logout:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-wrapper {
    margin-left: 250px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.container {
    padding: 20px;
    max-width: 100%;
}

main {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

/* ============================================
   MOBILE SIDEBAR TOGGLE
   ============================================ */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: var(--accent-hover);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 999;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar-backdrop.open {
        display: block;
    }
    
    .main-wrapper {
        margin-left: 0;
        padding-top: 60px;
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
}

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

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

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

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning);
    color: #1a1b26;
}

.btn-warning:hover {
    background: #d97706;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stat-card.blue { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); }
.stat-card.green { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.stat-card.orange { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); }
.stat-card.teal { background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%); }
.stat-card.yellow { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    opacity: 0.9;
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

tbody tr:hover {
    background-color: var(--bg-hover);
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.content-type {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.content-type.text { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.content-type.photo { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.content-type.video { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.content-type.voice { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.content-type.document { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.content-type.sticker { background: rgba(250, 204, 21, 0.2); color: #fde047; }

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.enabled,
.status-badge.completed,
.status-badge.active,
.status-approved { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.status-badge.disabled,
.status-badge.failed,
.status-badge.cancelled,
.status-archived { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.status-badge.pending,
.status-badge.draft,
.status-draft { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.status-badge.running,
.status-badge.sending,
.status-deployed { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

.status-badge.published { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.provider-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.provider-badge.provider-openai {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.provider-badge.provider-n8n {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.family-tag {
    background: var(--accent-subtle);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.badge-completed { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-progress { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-pending { background: var(--bg-hover); color: var(--text-muted); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    transition: all 0.2s;
}

.pagination a:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.pagination .current {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.pagination .disabled {
    color: var(--text-muted);
    pointer-events: none;
}

/* ============================================
   FORMS & FILTERS
   ============================================ */
.filters {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.filters select,
.filters input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-right: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-subtle);
}

.filters button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.filters button:hover {
    background: var(--accent-hover);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-subtle);
}

textarea.form-control {
    resize: vertical;
    font-family: monospace;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-subtle);
}

.help-text {
    color: var(--text-muted);
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

/* ============================================
   LINKS & MISC
   ============================================ */
.text-preview {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

.media-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

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

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

.member-info {
    font-weight: 500;
    color: var(--text-primary);
}

.photo-thumbnail {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    object-fit: cover;
}

.photo-link {
    display: inline-block;
}

.photo-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* ============================================
   CONTENT STATISTICS WIDGET
   ============================================ */
.content-stats-widget {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.content-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.content-stat-card {
    padding: 0.75rem;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.content-stat-card .stat-icon {
    font-size: 1.5rem;
}

.content-stat-card .stat-count {
    font-size: 1.5rem;
    font-weight: bold;
}

.content-stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.content-stat-card .stat-percent {
    font-size: 0.75rem;
    opacity: 0.8;
}

.content-stat-card.text { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.content-stat-card.photo { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.content-stat-card.video { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.content-stat-card.video_note { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.content-stat-card.voice { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.content-stat-card.other { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }

/* ============================================
   FAMILY ACTIVITY WIDGET
   ============================================ */
.family-activity-widget {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.widget-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.period-tabs {
    display: flex;
    gap: 0.5rem;
}

.period-tabs a {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.period-tabs a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.period-tabs a.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.widget-summary {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.family-table-container {
    max-height: 280px;
    overflow-y: auto;
}

.family-activity-table {
    width: 100%;
    border-collapse: collapse;
}

.family-activity-table th,
.family-activity-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.family-activity-table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
}

.family-activity-table tbody tr:hover {
    background-color: var(--bg-hover);
}

.family-activity-table .inactive-family {
    color: var(--text-muted);
}

.family-activity-table .inactive-family a {
    color: var(--text-muted);
}

.family-link {
    color: var(--accent);
    text-decoration: none;
}

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

.widget-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ============================================
   TABS
   ============================================ */
.tabs,
.settings-tabs,
.pipeline-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover,
.pipeline-tabs a:hover {
    color: var(--accent);
}

.tab-btn.active,
.pipeline-tabs a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.pipeline-tabs a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.tab-content,
.tab-pane {
    display: none;
}

.tab-content.active,
.tab-pane.active {
    display: block;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
}

.modal.hidden {
    display: none;
}

.modal h3 {
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 600;
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
}

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

.modal-header h2,
.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ============================================
   TOGGLE SWITCHES
   ============================================ */
.toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-hover);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background-color: white;
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress-bar,
.progress-container {
    height: 20px;
    background: var(--bg-hover);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transition: width 0.3s;
    border-radius: 4px;
}

.progress-bar-fill.low { background: #10b981; }
.progress-bar-fill.medium { background: #f59e0b; }
.progress-bar-fill.high { background: #ef4444; }

/* ============================================
   WARNING BANNERS
   ============================================ */
.warning-banner {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fbbf24;
}

.warning-banner a {
    color: var(--accent);
}

.warning-banner .icon {
    font-size: 1.5rem;
}

/* ============================================
   CODE & PRE
   ============================================ */
code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    color: var(--accent);
}

.json-preview {
    background: #0d1117;
    color: #c9d1d9;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.json-key { color: #79c0ff; }
.json-string { color: #a5d6ff; }
.json-number { color: #7ee787; }
.json-boolean { color: #ff7b72; }
.json-null { color: #8b949e; }

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

.feature-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

