/* ============================================
   Phase 102 — Scheduled Tasks owner UI
   Token-only colours via --sys-* (system.css).
   F-10 redesign: card-grouped form, segmented preset,
   toggle switches, sticky save bar, dark-mode parity.

   Phase 103 audit (2026-05-02) — these pages render under
   _LayoutChat, which does NOT load Pages/System/system.css.
   The same tokens are therefore defined locally (scoped to the
   roots used by these pages) so var(--st-*) resolves on the
   chat shell, the modal, and the admin dashboard alike.
   ============================================ */

.st-page,
#scheduledTaskCreateModal {
    --st-accent: #3b82f6;
    --st-accent-soft: rgba(59, 130, 246, 0.10);
    --st-bg: #f5f7fa;
    --st-surface: #ffffff;
    --st-text: #1a1a2e;
    --st-text-secondary: #64748b;
    --st-border: #e2e8f0;
    --st-radius: 10px;
    --st-radius-sm: 6px;
    --st-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --st-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --st-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --st-transition: 0.2s ease;

    --st-success:    #16a34a;
    --st-success-bg: rgba(22, 163, 74, 0.10);
    --st-success-fg: #15803d;
    --st-warning:    #f59e0b;
    --st-warning-bg: rgba(245, 158, 11, 0.12);
    --st-warning-fg: #b45309;
    --st-danger:     #dc2626;
    --st-danger-bg:  rgba(220, 38, 38, 0.10);
    --st-danger-fg:  #b91c1c;
    --st-info-bg:    rgba(59, 130, 246, 0.08);
}

[data-theme="dark"] .st-page,
[data-theme="dark"] #scheduledTaskCreateModal {
    --st-bg: #0d1116;
    --st-surface: #131920;
    --st-text: #f0f1f1;
    --st-text-secondary: #a1aeb7;
    --st-border: #263240;
    --st-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --st-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    --st-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);

    --st-success:    #22c55e;
    --st-success-bg: rgba(34, 197, 94, 0.18);
    --st-success-fg: #4ade80;
    --st-warning:    #fbbf24;
    --st-warning-bg: rgba(251, 191, 36, 0.18);
    --st-warning-fg: #fcd34d;
    --st-danger:     #f87171;
    --st-danger-bg:  rgba(248, 113, 113, 0.18);
    --st-danger-fg:  #fca5a5;
    --st-info-bg:    rgba(59, 130, 246, 0.14);
}

.st-page {
    padding: 16px 24px 32px;
    max-width: 1400px;
}

.st-page .st-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 12px;
    column-gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--st-border);
}

.st-page .st-header > div:first-child {
    min-width: 0;
}

.st-page .st-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.st-page .st-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--st-text);
    margin: 0;
}

.st-page .st-header .st-subtitle {
    font-size: 13px;
    color: var(--st-text-secondary);
    margin-top: 4px;
    max-width: 720px;
}

.st-page .st-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.st-page .st-quota {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--st-text-secondary);
    white-space: nowrap;
}

.st-page .st-quota::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f0c9"; /* bars - quota indicator */
    font-size: 11px;
    color: var(--st-accent);
}

/* ===== Toast / inline alert =====
   Auto-detects intent from copy: anything starting with "Failed",
   "Error", or containing the word "error" gets the danger styling.
   Falls back to the neutral info appearance. The .st-toast--error /
   .st-toast--success modifier classes can also be applied explicitly. */
.st-page .st-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--st-info-bg);
    border: 1px solid var(--st-border);
    border-left: 3px solid var(--st-accent);
    border-radius: var(--st-radius);
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--st-text);
    margin-bottom: 16px;
}

.st-page .st-toast::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f05a"; /* circle-info */
    color: var(--st-accent);
    font-size: 14px;
    line-height: 1.45;
    flex-shrink: 0;
}

.st-page .st-toast--success {
    background: var(--st-success-bg);
    border-color: var(--st-success-bg);
    border-left-color: var(--st-success);
    color: var(--st-success-fg);
}

.st-page .st-toast--success::before {
    content: "\f058"; /* circle-check */
    color: var(--st-success);
}

.st-page .st-toast--error {
    background: var(--st-danger-bg);
    border-color: var(--st-danger-bg);
    border-left-color: var(--st-danger);
    color: var(--st-danger-fg);
}

.st-page .st-toast--error::before {
    content: "\f06a"; /* circle-exclamation */
    color: var(--st-danger);
}

/* Filter chip strip */
.st-filter-strip {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    font-size: 13px;
    color: var(--st-text-secondary);
    box-shadow: var(--st-shadow-sm);
}

.st-filter-strip::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f0b0"; /* filter */
    color: var(--st-text-secondary);
    font-size: 12px;
    margin-right: 4px;
}

.st-filter-strip .form-check {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.st-filter-strip .form-check-label {
    color: var(--st-text);
    font-weight: 500;
    cursor: pointer;
}

.st-filter-strip .btn {
    margin-left: auto;
}

/* ===== Kendo grid styling — match extractionFieldSpec.css verbatim ===== */
.scheduled-tasks-grid {
    border: none;
    border-radius: var(--st-radius);
    overflow: hidden;
}

.scheduled-tasks-grid .k-grid-header {
    background: var(--st-surface);
    border-bottom: 1px solid var(--st-border);
}

.scheduled-tasks-grid .k-grid-header .k-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--st-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    background: var(--st-surface);
    border-color: var(--st-border);
}

.scheduled-tasks-grid .k-grid-content {
    background-color: var(--st-surface);
}

.scheduled-tasks-grid .k-grid-content td {
    padding: 9px 14px;
    vertical-align: middle;
    border-color: var(--st-border);
    font-size: 13.5px;
    color: var(--st-text);
}

.scheduled-tasks-grid .k-grid-content tr:hover {
    background-color: var(--st-accent-soft);
    transition: background-color 0.15s ease;
}

.scheduled-tasks-grid .k-pager {
    border-color: var(--st-border);
    background: var(--st-surface);
    padding: 8px 14px;
}

[data-theme="dark"] .scheduled-tasks-grid .k-grid-header,
[data-theme="dark"] .scheduled-tasks-grid .k-grid-header .k-header,
[data-theme="dark"] .scheduled-tasks-grid .k-grid-content,
[data-theme="dark"] .scheduled-tasks-grid .k-pager {
    background: var(--st-surface);
    border-color: var(--st-border);
    color: var(--st-text);
}

[data-theme="dark"] .scheduled-tasks-grid .k-grid-content td {
    border-color: var(--st-border);
    color: var(--st-text);
}

/* ===== Empty state ===== */
.st-empty-state {
    background: var(--st-surface);
    border: 1px dashed var(--st-border);
    border-radius: var(--st-radius);
    padding: 48px 24px;
    text-align: center;
    margin: 24px auto 16px;
    max-width: 560px;
}

.st-empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--st-accent-soft);
    color: var(--st-accent);
    font-size: 26px;
    margin-bottom: 16px;
}

.st-empty-state-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--st-text);
    margin: 0 0 8px 0;
}

.st-empty-state-body {
    font-size: 13.5px;
    color: var(--st-text-secondary);
    line-height: 1.5;
    margin: 0 0 20px 0;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.st-empty-state-body strong {
    color: var(--st-text);
}

.st-empty-state-action {
    display: inline-flex;
    align-items: center;
}

/* ===== Status pills ===== */
.st-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: 1px solid var(--st-border);
}

.st-pill.st-active,
.st-pill.st-succeeded {
    background: var(--st-success-bg);
    color: var(--st-success-fg);
    border-color: var(--st-success-bg);
}

.st-pill.st-paused {
    background: var(--st-warning-bg);
    color: var(--st-warning-fg);
    border-color: var(--st-warning-bg);
}

.st-pill.st-archived,
.st-pill.st-skipped {
    background: var(--st-bg);
    color: var(--st-text-secondary);
    border-color: var(--st-border);
}

.st-pill.st-failed {
    background: var(--st-danger-bg);
    color: var(--st-danger-fg);
    border-color: var(--st-danger-bg);
}

.st-pill.st-running {
    background: var(--st-accent-soft);
    color: var(--st-accent);
    border-color: var(--st-accent-soft);
}

/* ===== Action buttons in row ===== */
.st-row-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    align-items: center;
}

.st-row-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* ===== Detail page cards ===== */
.st-detail-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    box-shadow: var(--st-shadow-sm);
    padding: 20px 22px;
    margin-bottom: 16px;
}

.st-detail-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--st-text);
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--st-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.st-detail-meta {
    font-size: 13.5px;
    color: var(--st-text-secondary);
    line-height: 1.7;
    margin: 0;
}

.st-detail-meta > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: baseline;
    padding: 4px 0;
}

.st-detail-meta dt {
    font-weight: 600;
    color: var(--st-text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex: 0 0 150px;
    margin: 0;
}

.st-detail-meta dd {
    color: var(--st-text);
    margin: 0;
    flex: 1 1 200px;
    min-width: 0;
    word-break: break-word;
}

.st-detail-meta dd code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    background: var(--st-bg);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--st-border);
}

.st-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--st-border);
}

.st-detail-actions form {
    display: inline-block;
    margin: 0;
}

/* Visible-on-white outline button overrides — Bootstrap's default
   btn-outline-info / btn-outline-secondary / btn-outline-danger render
   almost invisibly against the white .content-page background on
   _LayoutChat. Force a solid border + readable text colour. */
.st-detail-actions .btn,
.st-row-actions .btn {
    font-weight: 500;
    border-width: 1px;
    box-shadow: var(--st-shadow-sm);
}

.st-detail-actions .btn-outline-info,
.st-row-actions .btn-outline-info,
.st-detail-actions .btn-outline-secondary,
.st-row-actions .btn-outline-secondary {
    background: var(--st-surface) !important;
    color: var(--st-text) !important;
    border-color: var(--st-border) !important;
}

.st-detail-actions .btn-outline-info:hover,
.st-row-actions .btn-outline-info:hover {
    background: var(--st-accent-soft) !important;
    color: var(--st-accent) !important;
    border-color: var(--st-accent) !important;
}

.st-detail-actions .btn-outline-secondary:hover,
.st-row-actions .btn-outline-secondary:hover {
    background: var(--st-bg) !important;
    color: var(--st-text) !important;
    border-color: var(--st-text-secondary) !important;
}

.st-detail-actions .btn-outline-danger,
.st-row-actions .btn-outline-danger {
    background: var(--st-surface) !important;
    color: var(--st-danger-fg) !important;
    border-color: var(--st-danger) !important;
}

.st-detail-actions .btn-outline-danger:hover,
.st-row-actions .btn-outline-danger:hover {
    background: var(--st-danger) !important;
    color: #fff !important;
    border-color: var(--st-danger) !important;
}

.st-detail-actions .btn-outline-warning,
.st-row-actions .btn-outline-warning {
    background: var(--st-surface) !important;
    color: var(--st-warning-fg) !important;
    border-color: var(--st-warning) !important;
}

.st-detail-actions .btn-outline-warning:hover,
.st-row-actions .btn-outline-warning:hover {
    background: var(--st-warning) !important;
    color: #fff !important;
    border-color: var(--st-warning) !important;
}

.st-detail-actions .btn-outline-success,
.st-row-actions .btn-outline-success {
    background: var(--st-surface) !important;
    color: var(--st-success-fg) !important;
    border-color: var(--st-success) !important;
}

.st-detail-actions .btn-outline-success:hover,
.st-row-actions .btn-outline-success:hover {
    background: var(--st-success) !important;
    color: #fff !important;
    border-color: var(--st-success) !important;
}

.st-detail-actions .btn-outline-primary,
.st-row-actions .btn-outline-primary {
    background: var(--st-surface) !important;
    color: var(--st-accent) !important;
    border-color: var(--st-accent) !important;
}

.st-detail-actions .btn-outline-primary:hover,
.st-row-actions .btn-outline-primary:hover {
    background: var(--st-accent) !important;
    color: #fff !important;
    border-color: var(--st-accent) !important;
}

/* Group destructive actions visually — push Archive/Delete to the right
   so they don't sit shoulder-to-shoulder with primary actions. */
.st-detail-actions .st-action-spacer {
    flex: 1 1 auto;
}

/* ===== Run detail page sections ===== */
.st-run-section {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    box-shadow: var(--st-shadow-sm);
    padding: 16px 20px;
    margin-bottom: 14px;
}

.st-run-section h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--st-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--st-border);
}

.st-run-section pre {
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: 6px;
    padding: 12px;
    font-size: 12.5px;
    color: var(--st-text);
    max-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.st-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--st-danger-bg);
    border: 1px solid var(--st-danger-bg);
    border-left: 3px solid var(--st-danger);
    border-radius: var(--st-radius);
    padding: 14px 16px;
    margin-bottom: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--st-danger-fg);
}

.st-error-banner::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f071"; /* triangle-exclamation */
    color: var(--st-danger);
    font-size: 16px;
    flex-shrink: 0;
}

.st-error-banner strong {
    color: var(--st-danger-fg);
    font-weight: 700;
}

.st-cost-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    font-size: 13px;
    color: var(--st-text);
}

.st-cost-row > div {
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 12px 14px;
}

.st-cost-row strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--st-text);
    font-variant-numeric: tabular-nums;
}

.st-cost-row .st-cost-label {
    color: var(--st-text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

/* ============================================
   CreateEdit form (F-10 redesign)
   ============================================ */

.st-form-page {
    max-width: 1080px;
    padding-bottom: 96px;   /* room for sticky save bar */
}

.st-form-page .st-breadcrumb {
    margin-bottom: 8px;
}

.st-form-page .st-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--st-text-secondary);
    text-decoration: none;
    transition: color var(--st-transition);
}

.st-form-page .st-breadcrumb a:hover {
    color: var(--st-accent);
}

.st-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ----- Card chrome (matches Detail.cshtml visual language) ----- */
.st-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    box-shadow: var(--st-shadow-sm);
    overflow: hidden;
}

.st-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--st-border);
    background: var(--st-surface);
    width: 100%;
    text-align: left;
}

button.st-card-header {
    border: none;
    cursor: pointer;
    transition: background-color var(--st-transition);
}

button.st-card-header:hover {
    background-color: var(--st-accent-soft);
}

.st-card-header > i {
    font-size: 16px;
    color: var(--st-accent);
    margin-top: 4px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.st-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--st-text);
    margin: 0;
    line-height: 1.3;
}

.st-card-subtitle {
    font-size: 12.5px;
    color: var(--st-text-secondary);
    margin: 3px 0 0 0;
    line-height: 1.5;
}

.st-card-body {
    padding: 20px 22px;
}

/* Collapsible advanced card */
.st-card-collapsible .st-collapse-chevron {
    margin-left: auto;
    color: var(--st-text-secondary);
    transition: transform var(--st-transition);
    align-self: center;
}

.st-card-collapsible[data-open="true"] .st-collapse-chevron {
    transform: rotate(180deg);
}

.st-collapse[hidden] {
    display: none;
}

/* ----- Form controls ----- */
.st-form .form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--st-text);
    margin-bottom: 6px;
    display: block;
}

.st-optional {
    font-weight: 400;
    color: var(--st-text-secondary);
    font-size: 12.5px;
    margin-left: 4px;
}

.st-form .help-text {
    font-size: 12px;
    color: var(--st-text-secondary);
    margin-top: 6px;
    margin-bottom: 0;
    line-height: 1.5;
}

.st-form .form-control,
.st-form .form-select,
.st-form .st-input {
    border: 1px solid var(--st-border);
    border-radius: 8px;
    padding: 9px 12px;
    background: var(--st-surface);
    color: var(--st-text);
    font-size: 13.5px;
    transition: border-color var(--st-transition), box-shadow var(--st-transition);
}

.st-form .form-control:focus,
.st-form .form-select:focus,
.st-form .st-input:focus {
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px var(--st-accent-soft);
    outline: none;
}

/* Mount the _PromptInput partial inside the form cleanly */
.st-form .scheduled-task-prompt {
    border: 1px solid var(--st-border);
    background: var(--st-bg);
    border-radius: var(--st-radius);
    padding: 10px 12px;
    transition: border-color var(--st-transition);
}

.st-form .scheduled-task-prompt:focus-within {
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px var(--st-accent-soft);
}

.st-form .cp-rich-input {
    min-height: 100px;
}

/* ----- Placeholder chip strip ----- */
.st-placeholder-section {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
}

.st-placeholder-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--st-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.st-placeholder-label i {
    color: var(--st-accent);
}

.st-placeholder-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.st-placeholder-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--st-accent-soft);
    color: var(--st-accent);
    border: 1px solid var(--st-accent-soft);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    cursor: pointer;
    transition: background-color var(--st-transition), transform var(--st-transition);
    user-select: none;
}

.st-placeholder-chip:hover {
    background: var(--st-accent);
    color: #fff;
    transform: translateY(-1px);
}

.st-placeholder-chip:active {
    transform: translateY(0);
}

/* ----- Toast for placeholder insertion ----- */
.st-mini-toast {
    position: fixed;
    bottom: 96px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--st-text);
    color: var(--st-surface);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--st-shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.st-mini-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ----- Schedule preset segmented control ----- */
.st-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    margin-bottom: 18px;
}

.st-segmented-option {
    flex: 1 1 auto;
    min-width: 110px;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.st-segmented-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.st-segmented-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    color: var(--st-text-secondary);
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    transition: background-color var(--st-transition), color var(--st-transition), border-color var(--st-transition);
}

.st-segmented-content i {
    font-size: 13px;
    opacity: 0.85;
}

.st-segmented-option:hover .st-segmented-content {
    background: var(--st-surface);
    color: var(--st-text);
}

.st-segmented-option.is-active .st-segmented-content,
.st-segmented-option input[type="radio"]:checked + .st-segmented-content {
    background: var(--st-surface);
    color: var(--st-accent);
    border-color: var(--st-accent);
    box-shadow: var(--st-shadow-sm);
    font-weight: 600;
}

.st-segmented-option:focus-within .st-segmented-content {
    outline: 2px solid var(--st-accent);
    outline-offset: 2px;
}

/* ----- Schedule grid (Once / Time / EveryN / Weekly / Cron / TZ) ----- */
.st-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.st-schedule-grid .preset-fields {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.st-schedule-grid .preset-fields[hidden] {
    display: none;
}

.st-tz-row {
    margin-top: 4px;
}

/* Day-of-week pills (replaces checkboxes) */
.st-weekly-row {
    margin-top: 4px;
}

.st-day-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.st-day-pill {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.st-day-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.st-day-pill > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 7px 12px;
    border: 1px solid var(--st-border);
    border-radius: 8px;
    background: var(--st-surface);
    color: var(--st-text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    transition: background-color var(--st-transition), color var(--st-transition), border-color var(--st-transition);
}

.st-day-pill:hover > span {
    background: var(--st-accent-soft);
    color: var(--st-accent);
    border-color: var(--st-accent-soft);
}

.st-day-pill.is-checked > span,
.st-day-pill input[type="checkbox"]:checked + span {
    background: var(--st-accent);
    color: #fff;
    border-color: var(--st-accent);
}

/* ----- Cron input + inline validity icon ----- */
.st-cron-input-wrap {
    position: relative;
}

.st-cron-input {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    padding-right: 38px;
}

.st-cron-validity {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
}

.st-cron-validity.is-valid {
    color: var(--st-success);
}

.st-cron-validity.is-invalid {
    color: var(--st-danger);
}

/* ----- Cron preview block (card-inside-card) ----- */
.st-cron-preview {
    margin-top: 18px;
    padding: 16px 18px;
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.st-cron-preview-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: 13px;
    color: var(--st-text);
}

.st-cron-preview-row.st-cron-preview-runs {
    align-items: flex-start;
}

.st-cron-preview-label {
    flex: 0 0 130px;
    font-size: 11px;
    font-weight: 700;
    color: var(--st-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.st-cron-preview-value {
    color: var(--st-text);
    font-size: 13.5px;
    font-weight: 500;
}

.st-cron-pill {
    display: inline-block;
    background: var(--st-accent-soft);
    color: var(--st-accent);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    border: 1px solid var(--st-accent-soft);
}

.st-next-run-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.st-next-run-list li {
    font-size: 12.5px;
    color: var(--st-text);
    padding: 3px 0;
}

.st-next-run-list li:not(:last-child) {
    border-bottom: 1px dashed var(--st-border);
}

/* ----- Toggle switches (Output & email card) ----- */
.st-toggle-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--st-border);
}

.st-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    background: var(--st-bg);
    cursor: pointer;
    transition: border-color var(--st-transition), background-color var(--st-transition);
}

.st-toggle:hover {
    border-color: var(--st-accent);
}

.st-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.st-toggle-track {
    flex-shrink: 0;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: var(--st-border);
    position: relative;
    transition: background-color var(--st-transition);
    margin-top: 2px;
}

.st-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--st-surface);
    box-shadow: var(--st-shadow-sm);
    transition: transform var(--st-transition);
}

.st-toggle-input:checked + .st-toggle-track {
    background: var(--st-accent);
}

.st-toggle-input:checked + .st-toggle-track .st-toggle-thumb {
    transform: translateX(16px);
}

.st-toggle-input:focus-visible + .st-toggle-track {
    outline: 2px solid var(--st-accent);
    outline-offset: 2px;
}

.st-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.st-toggle-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--st-text);
}

.st-toggle-desc {
    font-size: 12px;
    color: var(--st-text-secondary);
    line-height: 1.4;
}

/* ----- Sticky save bar ----- */
.st-save-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 24px -8px 0 -8px;
    background: var(--st-surface);
    border-top: 1px solid var(--st-border);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    z-index: 50;
}

.st-save-bar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    max-width: 1080px;
    margin: 0 auto;
}

.st-save-bar .btn {
    padding: 8px 18px;
    font-size: 13.5px;
    font-weight: 500;
}

/* ----- Kendo ComboBox tweak — full width per CLAUDE.md feedback_kendo_combo_dropdowns.md ----- */
.st-form .k-combobox,
.st-form .k-dropdownlist {
    width: 100% !important;
}

.st-form .k-combobox .k-input-inner,
.st-form .k-dropdownlist .k-input-inner {
    border-color: var(--st-border) !important;
    background: var(--st-surface) !important;
    color: var(--st-text) !important;
    font-size: 13.5px;
    padding: 9px 12px;
}

.st-form .k-combobox.k-focus,
.st-form .k-dropdownlist.k-focus {
    box-shadow: 0 0 0 3px var(--st-accent-soft) !important;
    border-radius: 8px;
}

/* ============================================
   Dark mode overrides
   ============================================ */
[data-theme="dark"] .st-card,
[data-theme="dark"] .st-detail-card,
[data-theme="dark"] .st-run-section {
    background: var(--st-surface);
    border-color: var(--st-border);
}

[data-theme="dark"] .st-form .form-control,
[data-theme="dark"] .st-form .form-select,
[data-theme="dark"] .st-form .st-input {
    background: var(--st-surface);
    color: var(--st-text);
    border-color: var(--st-border);
}

[data-theme="dark"] .st-segmented {
    background: var(--st-bg);
    border-color: var(--st-border);
}

[data-theme="dark"] .st-segmented-option:hover .st-segmented-content,
[data-theme="dark"] .st-segmented-option.is-active .st-segmented-content,
[data-theme="dark"] .st-segmented-option input[type="radio"]:checked + .st-segmented-content {
    background: var(--st-surface);
}

[data-theme="dark"] .st-toggle {
    background: var(--st-bg);
    border-color: var(--st-border);
}

[data-theme="dark"] .st-day-pill > span {
    background: var(--st-bg);
    border-color: var(--st-border);
}

[data-theme="dark"] .st-placeholder-section,
[data-theme="dark"] .st-cron-preview {
    background: var(--st-bg);
    border-color: var(--st-border);
}

[data-theme="dark"] .st-mini-toast {
    background: var(--st-surface);
    color: var(--st-text);
    border: 1px solid var(--st-border);
}

[data-theme="dark"] .st-save-bar {
    background: var(--st-surface);
    border-color: var(--st-border);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767.98px) {
    .st-page .st-header {
        flex-direction: column;
        gap: 12px;
    }

    .st-segmented {
        flex-direction: column;
        gap: 4px;
    }

    .st-segmented-option {
        min-width: 0;
    }

    .st-cron-preview-row {
        flex-direction: column;
        gap: 4px;
    }

    .st-cron-preview-label {
        flex-basis: auto;
    }

    .st-toggle-list {
        grid-template-columns: 1fr;
    }

    .st-save-bar-inner {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .st-save-bar .btn {
        flex: 1 1 auto;
    }
}

/* ============================================
   Phase 103 Plan 03-03 — Detail page conversation tabs
   ============================================ */

/* Tab strip — the Phase 103 Plan 03-03 "Open full chat thread" button
   is rendered as the last <li> of the .nav-tabs strip, pinned to the
   right via margin-left:auto. This replaces the old free-floating
   .st-tab-toolbar that sat above each tab pane. */
.st-page .nav-tabs {
    border-bottom: 1px solid var(--st-border);
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: nowrap;
}

.st-page .nav-tabs .st-tab-action {
    margin-left: auto;
    padding-left: 12px;
    padding-bottom: 6px;
}

.st-page .nav-tabs .nav-link {
    color: var(--st-text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-weight: 500;
    background: transparent;
}

.st-page .nav-tabs .nav-link:hover {
    color: var(--st-text);
    border-bottom-color: var(--st-border);
}

.st-page .nav-tabs .nav-link.active {
    color: var(--st-text);
    background: transparent;
    border-bottom-color: var(--st-accent, #3b82f6);
}

/* Legacy .st-tab-toolbar — kept for any pages that still mount the
   pre-Phase-103-audit tab toolbar above the tab pane. New code uses
   .st-tab-action inside .nav-tabs instead. */
.st-tab-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.st-conversation-message {
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--st-surface);
}

.st-conversation-message .st-message-meta {
    font-size: 12px;
    color: var(--st-text-secondary);
    margin-bottom: 6px;
}

.st-conversation-message .st-message-query {
    margin-bottom: 10px;
}

.st-conversation-message .st-message-query strong,
.st-conversation-message .st-message-response strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--st-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.st-conversation-message .st-message-query pre {
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 8px 10px;
    margin: 0;
    font-size: 13px;
    color: var(--st-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.st-conversation-message .st-message-response-body {
    color: var(--st-text);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
}

.st-conversation-message .st-message-response-body table {
    max-width: 100%;
    border-collapse: collapse;
}

.st-conversation-message .st-message-response-body th,
.st-conversation-message .st-message-response-body td {
    border: 1px solid var(--st-border);
    padding: 6px 8px;
    font-size: 13px;
}

.st-conversation-message.st-message-pending {
    color: var(--st-text-secondary);
    font-style: italic;
}

.st-message-pending em {
    color: var(--st-text-secondary);
}

/* ============================================
   Phase 103 Plan 03-01 — Create modal + rerun preview chips
   Token-only colours via --sys-* (system.css). No hardcoded hex.
   ============================================ */

#scheduledTaskCreateModal .modal-content {
    background: var(--st-surface);
    color: var(--st-text);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
}

#scheduledTaskCreateModal .modal-header,
#scheduledTaskCreateModal .modal-footer {
    border-color: var(--st-border);
}

#scheduledTaskCreateModal .modal-title {
    font-weight: 600;
    color: var(--st-text);
}

.st-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--st-text-secondary);
}

/* Phase 103 — modal inputs feel cramped at Bootstrap default. Bump to 40px
   and beef up the padding/font so they match the rest of the redesign. */
#scheduledTaskCreateModal .form-control,
#scheduledTaskCreateModal .form-select {
    min-height: 40px; padding: 8px 12px; font-size: 13.5px;
    border-radius: 8px;
}
#scheduledTaskCreateModal input[type=time].form-control,
#scheduledTaskCreateModal input[type=date].form-control,
#scheduledTaskCreateModal input[type=number].form-control {
    height: 40px;
}
#scheduledTaskCreateModal .k-picker-solid,
#scheduledTaskCreateModal .k-input-solid { min-height: 40px; border-radius: 8px; }

/* Phase 103 — visible Cancel button in the modal footer.
   btn-outline-secondary defaults to white-on-white inside the modal. */
.st-modal-cancel {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.12s ease;
}
.st-modal-cancel:hover,
.st-modal-cancel:focus {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
    outline: none;
}

/* Phase 103 — success celebration view shown after a task is saved.
   Replaces the old toast — gives the action a visible "landing." */
.st-modal-success {
    text-align: center;
    padding: 36px 24px 20px;
    animation: stSuccessFadeIn 280ms ease-out;
}
.st-success-burst {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.st-success-emoji {
    font-size: 64px;
    display: inline-block;
    animation: stSuccessPop 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}
.st-success-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #f59e0b;
    opacity: 0;
    animation: stSuccessSpark 700ms ease-out 120ms forwards;
}
.st-success-spark-1 { top: 8px;  left: 50%;  background: #3b82f6; --tx: 0;     --ty: -28px; }
.st-success-spark-2 { top: 22%;  left: 86%;  background: #ef4444; --tx: 28px;  --ty: -18px; }
.st-success-spark-3 { top: 70%;  left: 90%;  background: #10b981; --tx: 30px;  --ty: 16px; }
.st-success-spark-4 { top: 86%;  left: 50%;  background: #f59e0b; --tx: 0;     --ty: 28px; }
.st-success-spark-5 { top: 70%;  left: 10%;  background: #8b5cf6; --tx: -30px; --ty: 16px; }
.st-success-spark-6 { top: 22%;  left: 14%;  background: #ec4899; --tx: -28px; --ty: -18px; }
.st-success-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--st-text, #0f172a);
    margin: 0 0 8px;
}
.st-success-body {
    color: var(--st-text-secondary, #475569);
    font-size: 14px;
    margin: 0 0 22px;
    line-height: 1.5;
}
.st-success-nextrun {
    margin-top: 6px;
    color: var(--st-text, #0f172a);
    font-weight: 600;
}
.st-success-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.st-success-view {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.st-success-view:hover { color: #1d4ed8; text-decoration: underline; }
@@keyframes stSuccessFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@@keyframes stSuccessPop {
    0%   { transform: scale(0.4) rotate(-12deg); }
    60%  { transform: scale(1.18) rotate(8deg); }
    100% { transform: scale(1) rotate(0); }
}
@@keyframes stSuccessSpark {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.6); }
    40%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1); }
}

/* Phase 103 — day-of-week pill picker for the Weekly preset.
   Mirrors the create-form's .st-day-pill but scoped to the modal so we don't
   collide with the existing form-page weekly row. */
.st-modal-day-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.st-modal-day-pill {
    display: inline-flex; align-items: center; cursor: pointer;
    padding: 0 14px; height: 32px; border-radius: 999px;
    background: var(--st-surface);
    border: 1px solid var(--st-border-strong, #d6d9e0);
    color: var(--st-text-secondary); font-size: 12.5px; font-weight: 500;
    transition: all 0.12s; user-select: none;
    margin: 0;
}
.st-modal-day-pill input { display: none; }
.st-modal-day-pill:hover { border-color: #94a3b8; color: var(--st-text); }
.st-modal-day-pill.on,
.st-modal-day-pill:has(input:checked) {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.4);
    color: #3730a3;
}
[data-theme="dark"] .st-modal-day-pill.on,
[data-theme="dark"] .st-modal-day-pill:has(input:checked) {
    background: rgba(79, 70, 229, 0.2); color: #c7d2fe;
}

/* Phase 103 — live "Next 5 runs" preview pane. Sits between schedule and
   recipients to give immediate feedback as the user changes the cadence. */
.st-modal-next-runs {
    background: var(--st-surface-2, #f8fafc);
    border: 1px solid var(--st-border);
    border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
}
.st-modal-next-runs-head {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--st-text-secondary);
    margin-bottom: 8px;
}
.st-modal-next-runs-head i { color: #4f46e5; font-size: 12px; }
.st-modal-next-runs-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.st-modal-next-runs-list li {
    display: flex; align-items: center; gap: 10px;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 7px; padding: 6px 10px;
    font-size: 12.5px; color: var(--st-text);
}
.st-modal-next-runs-list li.empty {
    background: transparent; border: 0; padding: 0;
    color: var(--st-text-secondary); font-style: italic; font-size: 12px;
}
.st-modal-next-runs-list .nbr {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--st-surface-2, #f8fafc);
    border: 1px solid var(--st-border);
    display: inline-grid; place-items: center;
    font-size: 10px; font-weight: 600; color: var(--st-text-secondary);
}
.st-modal-next-runs-list .when {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-variant-numeric: tabular-nums;
}

/* Phase 103 — Cc/Bcc reveal toggle. Hidden behind a small text button under
   the To field so the modal isn't visually overloaded. */
.st-modal-cc-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: 4px; flex-wrap: wrap;
}
.st-modal-cc-toggle {
    font-size: 12px; color: #4f46e5; text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
}
.st-modal-cc-toggle:hover { color: #3730a3; text-decoration: underline; }
.st-modal-cc-toggle i { font-size: 10px; }

/* Phase 103 — explainer banner under the modal title. Sets context so the
   form below feels obvious instead of a wall of inputs. */
.st-modal-intro {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--st-border);
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.06), transparent);
}
.st-modal-intro-ic {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(79, 70, 229, 0.1); color: #4f46e5;
    display: grid; place-items: center; flex-shrink: 0;
}
[data-theme="dark"] .st-modal-intro-ic { background: rgba(79, 70, 229, 0.2); color: #c7d2fe; }
.st-modal-intro-ic i { font-size: 15px; }
.st-modal-intro-title {
    font-size: 14px; font-weight: 600; color: var(--st-text);
    margin-bottom: 2px;
}
.st-modal-intro-body {
    font-size: 12.5px; color: var(--st-text-secondary); line-height: 1.5;
}

.st-modal-quota-blocked {
    text-align: center;
    padding: 32px 16px;
}

.st-modal-quota-blocked .st-quota-icon {
    font-size: 36px;
    color: var(--st-warning, #f59e0b);
    margin-bottom: 12px;
}

.st-modal-quota-blocked h5 {
    color: var(--st-text);
    margin-bottom: 8px;
}

.st-modal-quota-blocked p {
    color: var(--st-text-secondary);
    margin-bottom: 16px;
}

.st-modal-tab-content {
    padding-top: 16px;
}

.st-modal-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    width: 100%;
}

.st-modal-presets .btn-check + .btn {
    flex: 1 1 auto;
    min-width: 80px;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--st-text-secondary) !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    box-shadow: none !important;
    transition: background-color var(--st-transition), color var(--st-transition), border-color var(--st-transition) !important;
}

.st-modal-presets .btn-check + .btn:hover {
    background: var(--st-surface) !important;
    color: var(--st-text) !important;
}

.st-modal-presets .btn-check:checked + .btn {
    background: var(--st-surface) !important;
    color: var(--st-accent) !important;
    border-color: var(--st-accent) !important;
    font-weight: 600 !important;
    box-shadow: var(--st-shadow-sm) !important;
}

#scheduledTaskCreateModal .modal-body small.text-muted {
    color: var(--st-text-secondary) !important;
    font-size: 11.5px;
}

#scheduledTaskCreateModal .nav-tabs {
    border-bottom: 1px solid var(--st-border);
    margin-bottom: 0;
}

#scheduledTaskCreateModal .nav-tabs .nav-link {
    color: var(--st-text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-weight: 500;
    background: transparent;
}

#scheduledTaskCreateModal .nav-tabs .nav-link.active {
    color: var(--st-text);
    border-bottom-color: var(--st-accent);
    background: transparent;
}

#scheduledTaskCreateModal .form-check-input:checked {
    background-color: var(--st-accent);
    border-color: var(--st-accent);
}

#stModalForm label.form-label {
    color: var(--st-text);
    font-weight: 500;
    font-size: 13px;
}

#stModalForm .form-control,
#stModalForm .form-select {
    background: var(--st-input-bg, var(--st-surface));
    color: var(--st-text);
    border-color: var(--st-border);
}

#stModalForm .form-control:focus,
#stModalForm .form-select:focus {
    border-color: var(--st-primary, #3b82f6);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

#stModalForm .invalid-feedback {
    display: block;
    min-height: 0;
}

#stModalForm .invalid-feedback:empty {
    display: none;
}

/* ── Read-only rerun preview ───────────────────────────────────── */

.st-rerun-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.st-rerun-section {
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 12px 14px;
    background: var(--st-surface);
}

.st-rerun-heading {
    font-size: 12px;
    font-weight: 600;
    color: var(--st-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.st-rerun-prompt {
    background: var(--st-input-bg, var(--st-surface));
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm, 4px);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--st-text);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    max-height: 240px;
    overflow-y: auto;
}

.st-rerun-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.st-rerun-meta li {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.st-rerun-meta-key {
    color: var(--st-text-secondary);
    min-width: 80px;
}

.st-rerun-meta-val {
    color: var(--st-text);
    font-weight: 500;
}

.st-rerun-preview-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--st-text-secondary);
}

.st-rerun-preview-empty i {
    font-size: 28px;
    color: var(--st-warning, #f59e0b);
    margin-bottom: 8px;
}

/* ── Generic chip + KPI tile (reusable) ────────────────────────── */

.st-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.st-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--st-input-bg, var(--st-surface));
    border: 1px solid var(--st-border);
    color: var(--st-text);
    font-size: 12px;
    line-height: 1.4;
}

.st-chip strong {
    color: var(--st-text-secondary);
    font-weight: 600;
}

.kpi-tile {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-tile .kpi-tile-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--st-text-secondary);
}

.kpi-tile .kpi-tile-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--st-text);
}

[data-theme="dark"] #scheduledTaskCreateModal .modal-content {
    background: var(--st-surface);
    color: var(--st-text);
}

[data-theme="dark"] .st-rerun-prompt,
[data-theme="dark"] .st-chip {
    background: var(--st-input-bg, var(--st-surface));
    color: var(--st-text);
}

/* Phase 103 Plan 03-01 — info-banner variant for the IN-9 force-test-run nudge. */
.st-info-banner {
    background: var(--st-info-bg, var(--st-surface));
    border: 1px solid var(--st-border);
    color: var(--st-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.st-info-banner > div {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.st-info-banner strong {
    color: var(--st-text);
}

.st-info-banner span {
    color: var(--st-text-secondary);
}
