/* ============================================================================
 * scheduler-ui.css — Scheduler & Notices windows + nav-bell badge.
 *
 * All colour comes from the app's live accent tokens (--accent, --accent-soft,
 * --accent-strong, --accent-contrast, --accent-ring) set at runtime by
 * ui-polish.js. Surface tokens (--darker-background, --text-color, etc.) come
 * from the active theme. Zero hardcoded colours.
 * ========================================================================== */

/* ── nav bell badge ─────────────────────────────────────────────────────────── */
.notice-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9px;
    background: #e5484d;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
    pointer-events: none;
    box-shadow: 0 0 0 2px var(--primary-color, #1f1e1c);
}
/* never show a stale zero — belt-and-suspenders: both attribute and class */
.notice-badge[hidden],
.notice-menu-badge[hidden],
.notice-badge.badge-hidden,
.notice-menu-badge.badge-hidden { display: none !important; }

/* also hide when the badge is empty in case the hidden attr races with a paint */
.notice-badge:empty,
.notice-menu-badge:empty { display: none !important; }

/* sidebar "Notices" badge in account-menu */
.notice-menu-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e5484d;
    color: #fff;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
}

/* ── Schedule attention animation ─────────────────────────────────────────── */
@keyframes bell-ring {
    0%   { transform: rotate(0); }
    15%  { transform: rotate(14deg); }
    30%  { transform: rotate(-11deg); }
    45%  { transform: rotate(8deg); }
    60%  { transform: rotate(-6deg); }
    75%  { transform: rotate(3deg); }
    100% { transform: rotate(0); }
}
#open-schedule-btn.bell-ring {
    animation: bell-ring 0.9s var(--ui-ease, ease);
    transform-origin: 50% 4px;
    color: var(--accent, #b7795c);
}

/* ── window surface (inside .content-viewer) ──────────────────────────────────
   The modal chrome (.content-viewer) already has padding; the surface just
   provides the scroll container.                                             */
.sc-surface {
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    max-height: 72vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ── outer wrapper ───────────────────────────────────────────────────────────── */
.sc-win {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 2px 0 8px;
}

/* ── hero ────────────────────────────────────────────────────────────────────── */
.sc-hero { margin-bottom: 16px; }
.sc-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.sc-hero-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-color);
}
.sc-active-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    background: var(--secondary-color, rgba(255,255,255,0.04));
    color: var(--text-color);
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.sc-active-pill:hover { background: var(--secondary-hover-color, rgba(255,255,255,0.08)); }
.sc-active-pill .material-symbols-rounded { font-size: 15px; color: var(--subheading-color, #aaa39b); transition: color 0.14s ease; }
/* Highlighted when the "Active only" filter is on */
.sc-active-pill.is-active {
    border-color: var(--accent, #b7795c);
    background: var(--accent-soft, rgba(183,121,92,0.14));
    color: var(--accent, #b7795c);
}
.sc-active-pill.is-active .material-symbols-rounded { color: var(--accent, #b7795c); }
.sc-hero-sub {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--subheading-color, #aaa39b);
}

/* ── notification banner ─────────────────────────────────────────────────────── */
.sc-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--accent-ring, rgba(183,121,92,0.3));
    background: var(--accent-soft, rgba(183,121,92,0.1));
    font-size: 13px;
    margin-bottom: 14px;
    color: var(--text-color);
    flex-wrap: wrap;
}
.sc-banner.sc-success {
    border-color: rgba(52,199,89,0.3);
    background: rgba(52,199,89,0.08);
}
.sc-banner-icon { font-size: 18px; color: var(--accent, #b7795c); flex-shrink: 0; }
.sc-banner.sc-success .sc-banner-icon { color: #34c759; }
.sc-banner-text { flex: 1; min-width: 0; }

/* ── composer ────────────────────────────────────────────────────────────────── */
.sc-composer {
    position: relative !important;
    overflow: hidden !important;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 6px 6px 6px 16px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    border-radius: 16px;
    background: var(--secondary-color, rgba(255,255,255,0.04));
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    margin-bottom: 16px;
    min-height: 48px;
}
.sc-composer:focus-within {
    border-color: var(--accent, #b7795c);
    background: var(--darker-background, rgba(0,0,0,0.14));
    box-shadow: 0 0 0 3px var(--accent-soft, rgba(183,121,92,0.12));
}
.sc-textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--text-color);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    min-height: 22px;
    max-height: 150px;
    padding: 8px 0;
    overflow-y: auto;
}
.sc-textarea::placeholder { color: var(--placeholder-color, #938d86); }

.sc-composer-btns {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding-bottom: 0;
    flex-shrink: 0;
}
/* Composer buttons sit a touch smaller so the pill stays compact and balanced */
.sc-composer .sc-icon-btn { width: 34px; height: 34px; }
.sc-composer .sc-icon-btn .material-symbols-rounded { font-size: 20px; }

/* ── icon buttons (mic, send, delete) ───────────────────────────────────────── */
.sc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--subheading-color, #aaa39b);
    transition: background 0.14s ease, color 0.14s ease, transform 0.1s ease;
    flex-shrink: 0;
}
.sc-icon-btn:hover { background: var(--secondary-color, rgba(255,255,255,0.06)); color: var(--text-color); }
.sc-icon-btn:active { transform: scale(0.92); }
.sc-icon-btn .material-symbols-rounded { font-size: 21px; }

.sc-icon-btn.sc-send {
    background: var(--accent, #b7795c);
    color: var(--accent-contrast, #fff);
}
.sc-icon-btn.sc-send:hover { background: var(--accent-strong, #975d46); color: var(--accent-contrast, #fff); }
.sc-icon-btn.sc-send:disabled {
    background: var(--secondary-color, rgba(255,255,255,0.06));
    color: var(--subheading-color, #aaa39b);
    cursor: default;
}
.sc-icon-btn.sc-del { width: 30px; height: 30px; opacity: 0.55; }
.sc-icon-btn.sc-del:hover { opacity: 1; }
.sc-icon-btn.sc-del .material-symbols-rounded { font-size: 18px; }

/* recording state — see STT overlay section below */

/* ── thinking indicator ───────────────────────────────────────────────────────── */
.sc-thinking {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--subheading-color, #aaa39b);
    padding: 4px 2px 14px;
}
.sc-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent, #b7795c);
    animation: scPulse 1s infinite ease-in-out;
}
.sc-dot:nth-child(2) { animation-delay: 0.15s; }
.sc-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes scPulse { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }

/* feedback error */
.sc-feedback.sc-err {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #e5484d;
    padding: 4px 2px 12px;
}
.sc-feedback.sc-err .material-symbols-rounded { font-size: 17px; flex-shrink: 0; }

/* ── section label ────────────────────────────────────────────────────────────── */
.sc-section-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--subheading-color, #aaa39b);
    margin: 4px 0 10px;
}

/* ── suggestion cards ────────────────────────────────────────────────────────── */
.sc-suggest-list { display: flex; flex-direction: column; }
.sc-suggest {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 0;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    padding: 11px 4px;
    font-family: inherit;
    transition: background 0.13s ease;
}
.sc-suggest:first-child { border-radius: 12px 12px 0 0; }
.sc-suggest:last-child  { border-radius: 0 0 12px 12px; border-bottom: none; }
.sc-suggest:hover       { background: var(--secondary-color, rgba(255,255,255,0.04)); }
.sc-suggest-emoji       { font-size: 20px; flex-shrink: 0; line-height: 1; }
.sc-suggest-body        { flex: 1; min-width: 0; }
.sc-suggest-title       { display: block; font-size: 14px; font-weight: 600; }
.sc-suggest-desc        { display: block; font-size: 12.5px; color: var(--subheading-color, #aaa39b); margin-top: 2px; line-height: 1.4; }
.sc-suggest-add {
    font-size: 20px;
    color: var(--subheading-color, #aaa39b);
    flex-shrink: 0;
    transition: color 0.13s ease, transform 0.13s ease;
}
.sc-suggest:hover .sc-suggest-add { color: var(--accent, #b7795c); transform: rotate(90deg); }

/* ── job rows ────────────────────────────────────────────────────────────────── */
.sc-jobs { display: flex; flex-direction: column; gap: 6px; }
.sc-job-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    background: var(--secondary-color, rgba(255,255,255,0.03));
}
.sc-job-row.sc-paused { opacity: 0.5; }
.sc-job-icon {
    font-size: 20px;
    color: var(--accent, #b7795c);
    background: var(--accent-soft, rgba(183,121,92,0.12));
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sc-job-info { flex: 1; min-width: 0; }
.sc-job-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-job-meta  { font-size: 11.5px; color: var(--subheading-color, #aaa39b); margin-top: 2px; }
.sc-job-err   { color: #e5484d; }

/* toggle switch */
.sc-toggle { position: relative; width: 38px; height: 22px; flex-shrink: 0; cursor: pointer; }
.sc-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.sc-toggle-track {
    position: absolute;
    inset: 0;
    background: rgba(128,128,128,0.3);
    border-radius: 22px;
    transition: background 0.18s ease;
}
.sc-toggle-track::before {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    top: 3px; left: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.18s ease;
}
.sc-toggle input:checked + .sc-toggle-track { background: var(--accent, #b7795c); }
.sc-toggle input:checked + .sc-toggle-track::before { transform: translateX(16px); }

.sc-empty {
    color: var(--subheading-color, #aaa39b);
    font-size: 13px;
    text-align: center;
    padding: 18px 4px;
}

/* ── generic text buttons ────────────────────────────────────────────────────── */
.sc-btn {
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    background: var(--secondary-color, rgba(255,255,255,0.04));
    color: var(--text-color);
    padding: 7px 13px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.14s ease, background 0.14s ease;
}
.sc-btn:hover { border-color: var(--accent-ring, rgba(183,121,92,0.35)); }
.sc-btn-primary {
    background: var(--accent, #b7795c);
    color: var(--accent-contrast, #fff);
    border-color: var(--accent, #b7795c);
}
.sc-btn-primary:hover { background: var(--accent-strong, #975d46); border-color: var(--accent-strong, #975d46); }

/* ── notices window ──────────────────────────────────────────────────────────── */

/* Remove old toolbar rule — replaced by new header */
.sc-notices-toolbar { display: none; }

/* Polished notices window wrapper */
.sc-notices-win { padding-bottom: 4px; }

.sc-notices-header {
    margin-bottom: 4px;
}
.sc-notices-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.sc-notices-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
/* Icon-only refresh — a clean rounded square, transparent until hovered */
.sc-notices-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--subheading-color, #aaa39b);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.14s ease, color 0.14s ease;
}
.sc-notices-action-btn:hover {
    background: var(--secondary-hover-color, rgba(255,255,255,0.07));
    color: var(--text-color);
}
.sc-notices-action-btn:active { background: var(--secondary-hover-color, rgba(255,255,255,0.12)); }
.sc-notices-action-btn .material-symbols-rounded { font-size: 19px; }

/* Mark-all — transparent ghost pill, only a subtle bg shift on hover */
.sc-notices-ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    height: 36px;
    padding: 0 13px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
}
.sc-notices-ghost-btn:hover { background: var(--secondary-hover-color, rgba(255,255,255,0.07)); }
.sc-notices-ghost-btn:active { background: var(--secondary-hover-color, rgba(255,255,255,0.12)); }
.sc-notices-ghost-btn .material-symbols-rounded { font-size: 17px; color: var(--subheading-color, #aaa39b); }

.sc-notices-divider {
    height: 1px;
    background: var(--border-color, rgba(255,255,255,0.08));
    margin: 12px 0 14px;
}

.sc-notices-list { display: flex; flex-direction: column; gap: 8px; }
.sc-notice-card {
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--secondary-color, rgba(255,255,255,0.03));
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.sc-notice-card.sc-unread {
    border-color: var(--accent, #b7795c);
    background: var(--accent-soft, rgba(183,121,92,0.07));
}
.sc-notice-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--subheading-color, #aaa39b);
    margin-bottom: 5px;
}
.sc-notice-kind {
    background: var(--accent-soft, rgba(183,121,92,0.12));
    color: var(--accent, #b7795c);
    padding: 1px 7px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 11px;
}
.sc-notice-time { margin-left: auto; }
.sc-notice-del  { flex-shrink: 0; }
.sc-notice-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
}
.sc-notice-body {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-color);
    opacity: 0.9;
    max-height: 80px;
    overflow: hidden;
    transition: max-height 0.2s ease;
}
.sc-notice-card.sc-expanded .sc-notice-body { max-height: 1000px; }
.sc-notice-body p  { margin: 0 0 5px; }
.sc-notice-body pre {
    white-space: pre-wrap;
    background: rgba(0,0,0,0.2);
    padding: 8px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
}
.sc-notice-open { margin-top: 10px; }

/* ── tools-used strip inside a scheduled-task chat ──────────────────────────── */
.scheduled-task-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent, #b7795c);
    background: var(--accent-soft, rgba(183,121,92,0.12));
    padding: 3px 9px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.scheduled-tools {
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    padding: 10px 12px;
    margin: 4px 0 12px;
    background: var(--secondary-color, rgba(255,255,255,0.03));
}
.scheduled-tools-head {
    display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; font-weight: 700;
    color: var(--subheading-color, #aaa39b); margin-bottom: 8px;
}
.scheduled-tools-head .icon { font-size: 15px; color: var(--accent, #b7795c); }
.sched-tool-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; padding: 3px 0;
    color: var(--text-color);
}
.sched-tool-row .icon       { font-size: 16px; color: var(--accent, #b7795c); }
.sched-tool-row.failed .icon { color: #e5484d; }
.sched-tool-name { font-weight: 600; }
.sched-tool-q    { color: var(--subheading-color, #aaa39b); font-style: italic; }

/* ── live STT overlay (stt-input.js) ─────────────────────────────────────────
   Floats just above the composer / near the mic button while recording.
   Fades in/out via .stt-overlay-visible.                                    */
#stt-live-overlay {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    max-width: min(560px, calc(100vw - 32px));
    width: max-content;
    background: var(--darker-background, #1a1918);
    border: 1px solid var(--border-color, rgba(255,255,255,0.14));
    border-radius: 14px;
    padding: 10px 16px 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    font-size: 14px;
    line-height: 1.5;
}
#stt-live-overlay::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5484d;
    flex-shrink: 0;
    margin-top: 5px;
    animation: sttLivePulse 1s infinite ease-in-out;
}
@keyframes sttLivePulse {
    0%, 100% { opacity: 0.4; transform: scale(0.75); }
    50%       { opacity: 1;   transform: scale(1); }
}
#stt-live-overlay.stt-overlay-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.stt-overlay-final  { color: var(--text-color); }
.stt-overlay-interim { color: var(--subheading-color, #aaa39b); font-style: italic; }

/* mic button pulse ring while live */
.stt-recording {
    color: #e5484d !important;
    background: rgba(229,72,77,0.14) !important;
    animation: sttPulse 1.2s infinite ease-in-out;
}
@keyframes sttPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(229,72,77,0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(229,72,77,0); }
}
.stt-transcribing { opacity: 0.55; pointer-events: none; }

/* ── Legacy modal CSS isolation ──────────────────────────────────────────────
   These controls live inside .data-window, whose historical button rule used
   to force a 100px blue button. Keep Scheduler and Notices self-contained even
   if legacy window CSS is reintroduced later. */
.data-window .content .sc-surface button.sc-suggest {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 64px;
    padding: 11px 4px !important;
    text-align: left !important;
    background: transparent !important;
    color: var(--text-color) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08)) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    white-space: normal !important;
}
.data-window .content .sc-surface button.sc-suggest:hover {
    background: var(--secondary-hover-color, rgba(255,255,255,0.07)) !important;
    border-color: var(--border-color, rgba(255,255,255,0.08)) !important;
}
.data-window .content .sc-surface button.sc-suggest:first-child { border-radius: 10px 10px 0 0 !important; }
.data-window .content .sc-surface button.sc-suggest:last-child { border-bottom: 0 !important; border-radius: 0 0 10px 10px !important; }
.data-window .content .sc-surface .sc-suggest-body { flex: 1 1 auto !important; min-width: 0 !important; overflow: visible !important; }
.data-window .content .sc-surface .sc-suggest-title,
.data-window .content .sc-surface .sc-suggest-desc { overflow-wrap: normal !important; word-break: normal !important; }

.data-window .content .sc-surface button.sc-icon-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: var(--subheading-color, #aaa39b) !important;
    box-shadow: none !important;
    transform: none !important;
}
.data-window .content .sc-surface button.sc-icon-btn:hover { background: var(--secondary-hover-color, rgba(255,255,255,0.07)) !important; color: var(--text-color) !important; }
.data-window .content .sc-surface button.sc-icon-btn.sc-send { background: var(--accent, #b7795c) !important; color: var(--accent-contrast, #fff) !important; }
.data-window .content .sc-surface button.sc-icon-btn.sc-send:disabled { background: var(--secondary-color, rgba(255,255,255,0.06)) !important; color: var(--subheading-color, #aaa39b) !important; }

.data-window .content .sc-surface button.sc-active-pill {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 5px 12px !important;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12)) !important;
    border-radius: 999px !important;
    background: var(--secondary-color, rgba(255,255,255,0.04)) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
    transform: none !important;
}
.data-window .content .sc-surface button.sc-active-pill.is-active { border-color: var(--accent, #b7795c) !important; background: var(--accent-soft, rgba(183,121,92,0.14)) !important; color: var(--accent, #b7795c) !important; }

.data-window .content .sc-surface button.sc-notices-action-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--subheading-color, #aaa39b) !important;
    box-shadow: none !important;
    transform: none !important;
}
.data-window .content .sc-surface button.sc-notices-ghost-btn {
    width: auto !important;
    min-width: 0 !important;
    height: 36px !important;
    padding: 0 13px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
    transform: none !important;
}
.data-window .content .sc-surface button.sc-notices-action-btn:hover,
.data-window .content .sc-surface button.sc-notices-ghost-btn:hover { background: var(--secondary-hover-color, rgba(255,255,255,0.07)) !important; }

.data-window .content .sc-surface button.sc-btn {
    width: auto !important;
    min-width: 0 !important;
    background: var(--secondary-color, rgba(255,255,255,0.04)) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
    transform: none !important;
}
.data-window .content .sc-surface button.sc-btn.sc-btn-primary { background: var(--accent, #b7795c) !important; color: var(--accent-contrast, #fff) !important; }

/* ── smart pre-schedule flow (plan → setup → test → confirm) ──────────────────
   Rendered inside #sc-feedback by scheduler-ui.js when a task needs tool /
   credential setup, clarifying answers, or a confirmation test run.          */
.sc-flow-host { display: block; padding: 2px 0 6px; }
.sc-flow {
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 14px;
    background: var(--secondary-color, rgba(255,255,255,0.03));
    padding: 14px;
}
.sc-flow-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.sc-flow-ico { font-size: 22px; color: var(--accent, #b7795c); flex-shrink: 0; }
.sc-flow-ico.sc-flow-fail { color: #e5484d; }
.sc-flow-title { font-size: 14.5px; font-weight: 700; color: var(--text-color); }
.sc-flow-sub { font-size: 12.5px; color: var(--subheading-color, #aaa39b); margin-top: 2px; line-height: 1.45; }

.sc-flow-note {
    font-size: 13px; line-height: 1.5; color: var(--text-color);
    background: var(--accent-soft, rgba(183,121,92,0.1));
    border: 1px solid var(--accent-ring, rgba(183,121,92,0.25));
    border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
}
.sc-flow-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sc-flow-actions .sc-btn:disabled { opacity: 0.5; cursor: default; }

/* requirement / question cards */
.sc-req-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.sc-req {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 11px 12px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    background: var(--darker-background, rgba(0,0,0,0.12));
}
.sc-req-ico { font-size: 20px; color: var(--accent, #b7795c); flex-shrink: 0; margin-top: 1px; }
.sc-req-body { flex: 1; min-width: 0; }
.sc-req-title { font-size: 13.5px; font-weight: 600; color: var(--text-color); }
.sc-req-detail { font-size: 12.5px; color: var(--subheading-color, #aaa39b); margin: 3px 0 9px; line-height: 1.45; }
.sc-req-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-req-act { padding: 6px 12px; font-size: 12.5px; }

.sc-q { padding: 4px 2px 0; }
.sc-q-label { font-size: 13px; font-weight: 600; color: var(--text-color); margin-bottom: 6px; }
.sc-q-input {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    background: var(--darker-background, rgba(0,0,0,0.14));
    color: var(--text-color); border-radius: 10px; padding: 9px 12px;
    font-family: inherit; font-size: 14px; outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.sc-q-input:focus { border-color: var(--accent, #b7795c); box-shadow: 0 0 0 3px var(--accent-soft, rgba(183,121,92,0.12)); }
.sc-q-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.sc-chip {
    border: 1px solid var(--border-color, rgba(255,255,255,0.14));
    background: var(--secondary-color, rgba(255,255,255,0.04));
    color: var(--text-color); border-radius: 999px; padding: 6px 13px;
    font-size: 13px; font-family: inherit; cursor: pointer;
    transition: background 0.13s ease, border-color 0.13s ease, color 0.13s ease;
}
.sc-chip:hover { background: var(--secondary-hover-color, rgba(255,255,255,0.08)); }
.sc-chip.active {
    border-color: var(--accent, #b7795c);
    background: var(--accent-soft, rgba(183,121,92,0.14));
    color: var(--accent, #b7795c);
    font-weight: 600;
}

/* test-run preview */
.sc-flow-preview {
    font-size: 13px; line-height: 1.55; color: var(--text-color);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1)); border-radius: 10px;
    padding: 10px 12px; margin-bottom: 12px; max-height: 260px; overflow: auto;
    background: var(--darker-background, rgba(0,0,0,0.12));
}
.sc-flow-preview p { margin: 0 0 6px; }
.sc-flow-preview h1, .sc-flow-preview h2, .sc-flow-preview h3 { font-size: 14px; margin: 8px 0 4px; }
.sc-flow-preview ul, .sc-flow-preview ol { margin: 0 0 6px; padding-left: 20px; }
.sc-flow-preview a { color: var(--accent, #b7795c); word-break: break-word; }

/* inline connector setup (mounts mcp-ui.js form) */
.sc-back-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px; border: none; cursor: pointer;
    background: transparent; color: var(--subheading-color, #aaa39b); flex-shrink: 0;
    transition: background 0.14s ease, color 0.14s ease;
}
.sc-back-btn:hover { background: var(--secondary-hover-color, rgba(255,255,255,0.07)); color: var(--text-color); }
.sc-connector-mount { margin-top: 4px; }

/* ── Mobile responsiveness & Scheduler dictate bar overlay fixes ──────────── */
.sc-composer.stt-active .sc-textarea,
.sc-composer.stt-active .sc-composer-btns {
    opacity: 0 !important;
    pointer-events: none !important;
}

.sc-composer .stt-recording-bar {
    position: absolute !important;
    inset: 0 !important;
    z-index: 15 !important;
    border-radius: 14px !important;
    height: 100% !important;
    background: var(--darker-background, #1b1b20) !important;
}

@media (max-width: 768px) {
    .sc-surface {
        max-height: 78vh !important;
        padding-bottom: 16px !important;
    }
    .sc-hero-sub {
        font-size: 12.5px !important;
    }
    .sc-composer {
        padding: 4px 4px 4px 12px !important;
        border-radius: 14px !important;
    }
    .sc-textarea {
        font-size: 14px !important;
    }
    .sc-suggest-item {
        padding: 10px 12px !important;
    }
    .sc-composer .stt-recording-bar {
        padding: 0 8px 0 12px !important;
        gap: 6px !important;
    }
}

@media (max-width: 480px) {
    .sc-composer .stt-rec-status {
        display: none !important;
    }
}
