/* ==========================================================================
   Crontab Management Dashboard - Styles
   ========================================================================== */

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

/* --- Wrapper --- */
.crontab-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Header --- */
.crontab-header {
    margin-bottom: 20px;
}
.crontab-header h1 {
    font-size: 1.6em;
    font-weight: 700;
    color: #1a1a2e;
}
.header-accent { color: #2563eb; }

/* --- Tab Bar --- */
.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tab-btn {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover { color: #2563eb; }
.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}
.tab-icon { margin-right: 6px; }

/* --- Tab Panels --- */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Stat Cards --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
}
.stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #1e293b;
}
.stat-success { color: #16a34a; }
.stat-danger { color: #dc2626; }

/* --- Panel Layout --- */
.panel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.panel-col-wide { grid-column: span 1; }
.panel-col-narrow { grid-column: span 1; }

@media (max-width: 900px) {
    .panel-row {
        grid-template-columns: 1fr;
    }
}

/* --- Card Panel --- */
.card-panel {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}
.panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 16px;
}
.panel-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: -10px 0 14px 0;
}

/* --- Chart Container --- */
.chart-container {
    position: relative;
    height: 250px;
}

/* --- Toolbar --- */
.panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.toolbar-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-secondary:hover:not(:disabled) { background: #cbd5e1; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
}
.btn-icon:hover { background: #f1f5f9; color: #2563eb; }

/* --- Filters --- */
.filter-select, .filter-input {
    padding: 7px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #334155;
}
.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

/* --- Tables --- */
.table-scroll { overflow-x: auto; }
.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.compact-table th, .compact-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}
.compact-table th {
    font-weight: 600;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.compact-table tbody tr:hover { background: #f8fafc; }

/* --- Status Badges --- */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.status-dot.success { background: #16a34a; }
.status-dot.failed { background: #dc2626; }
.status-dot.running { background: #f59e0b; animation: pulse 1.5s infinite; }
.status-dot.active { background: #16a34a; }
.status-dot.inactive { background: #94a3b8; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.status-badge.success { background: #dcfce7; color: #166534; }
.status-badge.failed { background: #fee2e2; color: #991b1b; }
.status-badge.running { background: #fef3c7; color: #92400e; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Health Grid --- */
.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.health-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.health-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.health-card-icon.ok { background: #dcfce7; }
.health-card-icon.error { background: #fee2e2; }
.health-card-icon.idle { background: #f1f5f9; }
.health-card-info { flex: 1; min-width: 0; }
.health-card-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.health-card-detail {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* --- Log Viewer --- */
.log-viewer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow: auto;
    max-height: 600px;
    min-height: 200px;
    white-space: pre-wrap;
    word-break: break-all;
}
.log-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

/* --- Toggle --- */
.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

/* --- Gantt Timeline --- */
.gantt-wrapper {
    position: relative;
    overflow-x: auto;
    padding-bottom: 8px;
}
.gantt-time-axis {
    display: flex;
    margin-left: 160px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
    position: relative;
    user-select: none;
}
.gantt-tick {
    flex: 1;
    text-align: center;
    font-size: 10px;
    color: #94a3b8;
    padding: 4px 0;
    min-width: 0;
    border-left: 1px solid #f1f5f9;
    font-weight: 500;
}
.gantt-tick:first-child { border-left: none; }
.gantt-row {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    min-height: 28px;
}
.gantt-label {
    width: 160px;
    min-width: 160px;
    font-size: 12px;
    color: #334155;
    padding-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.gantt-bar-track {
    flex: 1;
    height: 24px;
    background: #f8fafc;
    border-radius: 4px;
    position: relative;
    min-width: 0;
    border: 1px solid #f1f5f9;
}
.gantt-pip {
    position: absolute;
    top: 2px;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: #3b82f6;
    transition: opacity 0.15s;
    cursor: default;
}
.gantt-pip:hover {
    opacity: 0.7;
    z-index: 2;
}
.gantt-pip.overlap {
    background: #f59e0b;
}
.gantt-pip.dense {
    width: 2px;
}
.gantt-now-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ef4444;
    z-index: 5;
    pointer-events: none;
}
.gantt-now-label {
    font-size: 10px;
    color: #ef4444;
    font-weight: 600;
    text-align: right;
    margin-top: 4px;
}
.gantt-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* --- Upcoming Runs --- */
.upcoming-runs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.upcoming-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    transition: background 0.15s;
}
.upcoming-item:hover { background: #f1f5f9; }
.upcoming-item.is-next {
    border-color: #3b82f6;
    background: #eff6ff;
}
.upcoming-time {
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
    min-width: 50px;
}
.upcoming-name {
    color: #475569;
    font-weight: 500;
}
.upcoming-relative {
    color: #94a3b8;
    font-size: 11px;
    white-space: nowrap;
}
.upcoming-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0 2px 0;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.upcoming-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* --- Timeline / Heatmap --- */
.timeline-date {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    min-width: 120px;
    text-align: center;
}
.heatmap-wrapper {
    overflow-x: auto;
}
.heatmap-header {
    display: grid;
    grid-template-columns: 180px repeat(24, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}
.heatmap-header .heatmap-cell {
    text-align: center;
    font-size: 10px;
    color: #64748b;
    padding: 4px 0;
    font-weight: 600;
}
.heatmap-row {
    display: grid;
    grid-template-columns: 180px repeat(24, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}
.heatmap-label {
    font-size: 12px;
    color: #334155;
    padding: 6px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.heatmap-cell {
    min-height: 30px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    cursor: default;
    transition: transform 0.15s;
}
.heatmap-cell:hover { transform: scale(1.1); z-index: 1; }
.heatmap-cell.empty { background: #f1f5f9; }
.heatmap-cell.success { background: #86efac; color: #166534; }
.heatmap-cell.failed { background: #fca5a5; color: #991b1b; }
.heatmap-cell.mixed { background: #fde68a; color: #92400e; }
.heatmap-cell.scheduled { background: #bfdbfe; color: #1e40af; }
.heatmap-cell.overlap { background: #c4b5fd; color: #5b21b6; }

.heatmap-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #64748b;
}
.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}
.legend-none { background: #f1f5f9; border: 1px solid #e2e8f0; }
.legend-success { background: #86efac; }
.legend-failed { background: #fca5a5; }
.legend-scheduled { background: #bfdbfe; }
.legend-mixed { background: #fde68a; }
.legend-overlap { background: #c4b5fd; }

/* --- Modals --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-box-sm { max-width: 400px; }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
}
.modal-close:hover { color: #334155; }
.modal-body { padding: 20px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
textarea.form-control { resize: vertical; }
.form-hint { font-size: 11px; color: #94a3b8; margin-top: 3px; }

/* --- Schedule Builder --- */
.schedule-builder {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}
.schedule-type-row {
    margin-bottom: 12px;
}
.schedule-type-row select {
    font-weight: 500;
}
.schedule-options {
    padding: 10px 0 0 0;
}
.schedule-options label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}
.inline-fields {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.inline-fields span {
    font-size: 13px;
    color: #64748b;
}
.inline-fields > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.inline-fields > div > label {
    font-size: 11px;
    margin-bottom: 0;
}
.form-control-sm {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 70px;
}
.schedule-preview {
    margin-top: 10px;
    padding: 8px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 12px;
    color: #1e40af;
    display: none;
}
.schedule-preview.visible { display: block; }
.schedule-preview .preview-cron {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* --- Toast --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastIn 0.3s ease;
    max-width: 350px;
}
.toast.toast-success { background: #16a34a; }
.toast.toast-error { background: #dc2626; }
.toast.toast-info { background: #2563eb; }
.toast.toast-out { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* --- Pagination --- */
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}
.pagination-bar .btn {
    min-width: 36px;
    text-align: center;
}
.pagination-bar .page-info {
    font-size: 13px;
    color: #64748b;
}

/* --- DataTables Overrides --- */
.dataTables_wrapper { font-size: 13px; }
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
}
table.dataTable thead th { border-bottom: 2px solid #e2e8f0; }
table.dataTable tbody tr:hover { background: #f8fafc !important; }
table.dataTable.no-footer { border-bottom: 1px solid #e2e8f0; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .crontab-wrapper { padding: 12px; }
    .crontab-header h1 { font-size: 1.3em; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-value { font-size: 1.4em; }
    .panel-toolbar { flex-direction: column; align-items: flex-start; }
    .toolbar-filters, .toolbar-actions { width: 100%; }
    .heatmap-header, .heatmap-row { grid-template-columns: 120px repeat(24, 1fr); }
    .heatmap-label { font-size: 10px; }
}

@media (max-width: 480px) {
    .tab-btn { padding: 8px 12px; font-size: 12px; }
    .stats-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */
[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .crontab-header h1 { color: #e2e8f0; }
[data-theme="dark"] .header-accent { color: #60a5fa; }

[data-theme="dark"] .tab-bar { border-bottom-color: #1e293b; }
[data-theme="dark"] .tab-btn { color: #94a3b8; }
[data-theme="dark"] .tab-btn:hover { color: #60a5fa; }
[data-theme="dark"] .tab-btn.active { color: #60a5fa; border-bottom-color: #60a5fa; }

[data-theme="dark"] .stat-card { background: #1e293b; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
[data-theme="dark"] .stat-value { color: #e2e8f0; }
[data-theme="dark"] .stat-label { color: #94a3b8; }

[data-theme="dark"] .card-panel { background: #1e293b; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
[data-theme="dark"] .panel-title { color: #e2e8f0; }

[data-theme="dark"] .compact-table th { color: #94a3b8; }
[data-theme="dark"] .compact-table td { border-bottom-color: #334155; }
[data-theme="dark"] .compact-table tbody tr:hover { background: #334155; }

[data-theme="dark"] .health-card { background: #334155; border-color: #475569; }
[data-theme="dark"] .health-card-name { color: #e2e8f0; }
[data-theme="dark"] .health-card-detail { color: #94a3b8; }
[data-theme="dark"] .health-card-icon.ok { background: #166534; }
[data-theme="dark"] .health-card-icon.error { background: #991b1b; }
[data-theme="dark"] .health-card-icon.idle { background: #334155; }

[data-theme="dark"] .filter-select, [data-theme="dark"] .filter-input {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}
[data-theme="dark"] .btn-secondary { background: #334155; color: #e2e8f0; }
[data-theme="dark"] .btn-secondary:hover:not(:disabled) { background: #475569; }
[data-theme="dark"] .btn-icon { border-color: #475569; color: #94a3b8; }
[data-theme="dark"] .btn-icon:hover { background: #334155; color: #60a5fa; }

[data-theme="dark"] .log-viewer { background: #0c1222; color: #94a3b8; }
[data-theme="dark"] .log-meta { color: #94a3b8; }

[data-theme="dark"] .panel-subtitle { color: #64748b; }
[data-theme="dark"] .timeline-date { color: #e2e8f0; }
[data-theme="dark"] .heatmap-header .heatmap-cell { color: #94a3b8; }
[data-theme="dark"] .heatmap-label { color: #e2e8f0; }
[data-theme="dark"] .heatmap-cell.empty { background: #334155; }
[data-theme="dark"] .legend-none { background: #334155; border-color: #475569; }

[data-theme="dark"] .gantt-time-axis { border-bottom-color: #334155; }
[data-theme="dark"] .gantt-tick { color: #64748b; border-left-color: #1e293b; }
[data-theme="dark"] .gantt-label { color: #e2e8f0; }
[data-theme="dark"] .gantt-bar-track { background: #0f172a; border-color: #1e293b; }

[data-theme="dark"] .upcoming-item { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .upcoming-item:hover { background: #334155; }
[data-theme="dark"] .upcoming-item.is-next { background: #1e3a5f; border-color: #2563eb; }
[data-theme="dark"] .upcoming-time { color: #e2e8f0; }
[data-theme="dark"] .upcoming-name { color: #94a3b8; }
[data-theme="dark"] .upcoming-relative { color: #64748b; }
[data-theme="dark"] .upcoming-divider { color: #64748b; }
[data-theme="dark"] .upcoming-divider::after { background: #334155; }

[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .modal-box { background: #1e293b; }
[data-theme="dark"] .modal-header { border-bottom-color: #334155; }
[data-theme="dark"] .modal-header h3 { color: #e2e8f0; }
[data-theme="dark"] .modal-close { color: #64748b; }
[data-theme="dark"] .modal-close:hover { color: #e2e8f0; }
[data-theme="dark"] .modal-footer { border-top-color: #334155; }

[data-theme="dark"] .form-group label { color: #94a3b8; }
[data-theme="dark"] .form-control {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}
[data-theme="dark"] .schedule-builder {
    background: #0f172a;
    border-color: #334155;
}
[data-theme="dark"] .schedule-options label { color: #94a3b8; }
[data-theme="dark"] .inline-fields span { color: #94a3b8; }
[data-theme="dark"] .schedule-preview {
    background: #1e3a5f;
    border-color: #2563eb;
    color: #93c5fd;
}
[data-theme="dark"] .schedule-preview .preview-cron { color: #94a3b8; }

[data-theme="dark"] .toggle-label { color: #94a3b8; }
[data-theme="dark"] .pagination-bar .page-info { color: #94a3b8; }

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

/* Status badges in dark */
[data-theme="dark"] .status-badge.success { background: #166534; color: #86efac; }
[data-theme="dark"] .status-badge.failed { background: #991b1b; color: #fca5a5; }
[data-theme="dark"] .status-badge.running { background: #92400e; color: #fde68a; }
