/* Forms (#424): sections, setting rows, fields, the forms with parts of their own, the platform pages. */

/* ---- Forms (#424) ----------------------------------------------------------
   The shared form layout for settings pages and forms: a breadcrumb above the
   header (QcbBreadcrumb), sections as white cards (QcbFormSection) stacked in a
   .qcb-form-stack, one short label per setting with its explanation in the hint
   (QcbSettingRow), and the save button under the last section (.qcb-form-savebar).
   The form column itself is QcbPage Width="Form" (#422). The page-specific rules
   that used to sit in each page's own <style> block follow the shared ones.
   --------------------------------------------------------------------------- */

/* Where the page sits. On the warm grey ground, so gray-600 and darker (#422):
   the current page is dark and bold, as the chosen tab is. */
.qcb-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.375rem;
    margin: 0 0 0.375rem;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    color: var(--qcb-gray-600);
}

.qcb-breadcrumb li + li::before {
    content: "\203A" / "";
    margin-inline-end: 0.375rem;
    color: var(--qcb-gray-600);
}

.qcb-breadcrumb a {
    color: var(--qcb-gray-700);
    text-decoration: none;
}

.qcb-breadcrumb a:hover {
    color: var(--qcb-gray-900);
    text-decoration: underline;
}

.qcb-breadcrumb [aria-current="page"] {
    color: var(--qcb-gray-900);
    font-weight: 600;
}

/* The sections and the save bar, one under the other. On an EditForm the <form>
   is the stack. */
.qcb-form-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qcb-form-stack > .qcb-form-card,
.qcb-form-col > .qcb-form-card {
    margin: 0;
}

/* A section: a white card with an optional title row. */
.qcb-form-sec {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qcb-form-sec-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.qcb-form-sec-titlerow {
    display: flex;
    align-items: center;
    min-width: 0;
}

.qcb-form-sec-title {
    margin: 0;
    font-family: var(--qcb-font-body);
    line-height: 1.3;
    color: var(--qcb-gray-900);
}

.qcb-form-sec-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* The sections set the spacing; the old inner groups keep none of their own. */
.qcb-form-sec > .qcb-form-group,
.qcb-form-sec > .qcb-form-section,
.qcb-form-sec > .qcb-form-hint {
    margin: 0;
}

/* One setting (QcbSettingRow): the job page's settings row (#332, .qcb-setting in
   ui-job-page.css), the label on the left and the control on the right, with what it
   needs once it is on under it. Inside a section the card gives the padding, and
   the settings are divided by a hairline. ui-job-page.css loads after this file, so
   these overrides are scoped to the section to win. */
.qcb-form-sec .qcb-setting {
    padding: 0;
}

.qcb-form-sec .qcb-setting-item + .qcb-setting-item {
    padding-top: 1rem;
    border-top: 1px solid var(--qcb-gray-100);
}

.qcb-form-sec .qcb-setting-label {
    font-weight: 500;
}

/* A switch stays beside its label down to phone width; wider controls (the Slack
   and Teams buttons) still go under it. */
.qcb-form-sec .qcb-setting-text {
    flex-basis: 11rem;
}

.qcb-form-sec label.qcb-setting-label {
    cursor: pointer;
}

.qcb-form-sec .qcb-setting-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin-top: 0.875rem;
}

/* A setting with nothing to show under it draws no gap. */
.qcb-form-sec .qcb-setting-detail:not(:has(*)) {
    display: none;
}

.qcb-setting-detail > .qcb-form-label,
.qcb-setting-detail > .qcb-form-hint,
.qcb-setting-detail > .qcb-alert {
    margin: 0;
}

.qcb-setting-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* An empty list inside a section takes the section's width. */
.qcb-form-sec .qcb-empty-state--inline {
    max-width: none;
    margin: 0;
    padding: 1.5rem 1rem;
}

/* A field with something beside it stays a row inside a form group, where an older
   rule turns a div around a field into a block. */
.qcb-form-group > div.qcb-field-with-button,
.qcb-form-group > div.qcb-time-input-row,
.qcb-form-group > div.qcb-inline-row {
    display: flex;
}

/* A shared list (#423) inside a section is narrower than on a list page: a name
   wraps between words, not inside one ("Night ly reloa d" at 400px); the table
   scrolls sideways in its wrapper for the rest. */
.qcb-form-sec .jl-name {
    overflow-wrap: break-word;
}

/* The switch is a real checkbox with role="switch"; keyboard focus shows on the
   track, as it does on every other control. */
.qcb-switch input:focus-visible + .qcb-slider {
    outline: 2px solid var(--qcb-teal-700);
    outline-offset: 2px;
}

/* Save at the bottom of the column, outside the cards. */
.qcb-form-savebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* The note beside the buttons sits on the warm ground: gray-600 (#422). */
.qcb-form-savebar .qcb-form-hint {
    margin: 0;
    color: var(--qcb-gray-600);
}

/* A warning there, such as defaults not saved yet (#436): amber-700 is 4.18:1 on the
   warm ground, below the 4.5:1 small text needs, so the darker amber-800 (5.9:1). */
.qcb-form-savebar .qcb-form-hint.qcb-form-hint--warning {
    color: var(--qcb-amber-800);
}

/* A field with its button beside it, which goes under the field on a phone. */
.qcb-field-with-button {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.qcb-field-with-button > .qcb-form-input {
    flex: 1 1 16rem;
    width: auto;
    min-width: 0;
}

/* Fields side by side, one under the other on a phone. */
.qcb-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.qcb-form-row > .qcb-form-group {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
}

.qcb-form-row > .qcb-form-group--narrow {
    flex: 0 1 9rem;
}

.qcb-form-input.qcb-form-input--number {
    max-width: 8rem;
}

/* Toggle chips in a form: days, months, events, outcomes. A button with
   aria-pressed, so the state is announced; the colour follows it. */
.qcb-choice-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.qcb-choice-chip {
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qcb-choice-chip:hover:not([aria-pressed="true"]):not(:disabled) {
    border-color: var(--qcb-teal-600);
    color: var(--qcb-teal-700);
}

.qcb-choice-chip[aria-pressed="true"] {
    background: var(--qcb-action-bg);
    border-color: var(--qcb-action-bg);
    color: var(--qcb-on-fill);
}

.qcb-choice-chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qcb-choice-chip--sm {
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
}

/* The variants of one choice ("with warnings" under Completed). */
.qcb-choice-chips--addon {
    margin-top: 0.5rem;
    padding-left: 0.9rem;
    border-left: 2px solid var(--qcb-gray-200);
}

.qcb-choice-chips-label {
    font-size: 0.78rem;
    color: var(--qcb-gray-600);
}

/* A segmented control as wide as its labels, rather than the full row. */
.qcb-segmented--inline {
    display: inline-flex;
    align-self: flex-start;
}

.qcb-segmented--inline .qcb-segmented-btn {
    flex: 0 0 auto;
}

/* Steps or background next to a field (the email OAuth guide). */
.qcb-info-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    font-size: 0.875rem;
}

.qcb-info-box > i {
    flex-shrink: 0;
    font-size: 1.25rem;
    color: var(--qcb-teal-700);
}

.qcb-info-box ol {
    margin: 0.5rem 0 0.5rem 1rem;
    padding: 0;
}

.qcb-info-box li {
    margin-bottom: 0.25rem;
}

/* Read-only facts in a section: a label and its value per row (Subscription). */
.qcb-facts {
    display: grid;
    grid-template-columns: minmax(8rem, 12rem) 1fr;
    gap: 0.75rem 1.5rem;
    margin: 0;
    font-size: 0.875rem;
}

.qcb-facts dt {
    font-weight: 500;
    color: var(--qcb-gray-600);
}

.qcb-facts dd {
    margin: 0;
    min-width: 0;
    color: var(--qcb-gray-900);
}

@media (max-width: 640px) {
    .qcb-facts {
        grid-template-columns: 1fr;
        gap: 0.125rem;
    }

    .qcb-facts dd + dt {
        margin-top: 0.625rem;
    }

}

/* Text in a card that says yes or no: the darker shades, for 4.5:1 on white. */
.qcb-text-success {
    color: var(--qcb-green-700);
}

.qcb-text-danger {
    color: var(--qcb-red-700);
}

/* Field errors under a field, one per line. */
.qcb-field-errors {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8125rem;
    color: var(--qcb-red-700);
}

.qcb-form-input.qcb-form-input--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
}

/* A question in the page, before an action that cannot be taken back (IP allowlist). */
.qcb-confirm-alert > div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qcb-confirm-alert p {
    margin: 0;
}

.qcb-confirm-alert-title {
    margin: 0;
    font-family: var(--qcb-font-body);
    font-size: 0.9375rem;
    font-weight: 700;
    color: inherit;
}

.qcb-confirm-alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* IP allowlist: the count or the errors under the list. */
.qcb-ip-allowlist-status {
    margin-top: 0.5rem;
}

/* Subscription: the status badges beside the date, the plan's buttons, the
   cancellation notice's text, and the invoice table's last column. */
.qcb-facts-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.qcb-form-sec-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.qcb-alert-text {
    margin: 0.25rem 0 0;
}

.qcb-table th.qcb-invoice-actions {
    width: 120px;
    text-align: center;
}

/* One message under a field that blocks the save. */
.qcb-field-error {
    margin: 0;
}

/* ---- UI follow-ups (#432-#435) ----------------------------------------------
   Alert settings (#433): the Slack and Teams buttons wrap inside their section
   at phone width instead of running past its edge.
   Project page (#435): the sub-headings inside the Retention and Immutability
   sections. Sentence case in gray-700, 10.3:1 on white; the job editor's small
   grey uppercase .qcb-form-section-title they had was 2.5:1.
   --------------------------------------------------------------------------- */
.qcb-form-sec .qcb-setting-control:has(> .qcb-setting-buttons) {
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
}

.qcb-form-sec-subtitle {
    margin: 0 0 0.5rem;
    font-family: var(--qcb-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--qcb-gray-700);
}
/* ---- End of UI follow-ups (#432-#435) ---- */

/* ---- Webhook form (moved from WebhookCreateEdit's own <style> block) ---- */

/* The signing secret, shown once after a create. */
.wh-secret-callout {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 1.1rem;
}

.wh-secret-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--qcb-amber-700);
}

.wh-secret-head i {
    color: var(--qcb-amber-600);
}

.wh-secret-warn {
    margin: 0;
    font-size: 0.85rem;
    color: var(--qcb-amber-700);
}

.wh-secret-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wh-secret-value {
    flex: 1;
    padding: 0.5rem 0.7rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--qcb-gray-900);
    word-break: break-all;
    background: var(--qcb-surface);
    border: 1px solid var(--qcb-amber-200);
    border-radius: var(--qcb-radius-control);
}

.wh-optional {
    font-weight: 400;
    color: var(--qcb-gray-500);
}

/* The destination picker. The card is a <label>, and ui-base.css makes every label
   bold, so the description sets its weight back. */
.wh-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.wh-channel {
    display: flex;
    flex: 1 1 15rem;
    align-items: flex-start;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.7rem 0.85rem;
    background: var(--qcb-surface);
    border: 1px solid var(--qcb-gray-200);
    border-radius: var(--qcb-radius-card);
    cursor: pointer;
}

.wh-channel:hover {
    border-color: var(--qcb-teal-600);
}

.wh-channel--active {
    border-color: var(--qcb-teal-600);
    box-shadow: 0 0 0 1px var(--qcb-teal-600) inset;
}

.wh-channel input {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.wh-channel-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.wh-channel-title {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--qcb-gray-900);
}

.wh-channel-desc {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--qcb-gray-600);
}

/* The custom header editor. */
.wh-headers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.wh-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.wh-header-key {
    flex: 1 1 10rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
}

.wh-header-row > .qcb-form-input {
    width: auto;
    min-width: 0;
}

.wh-header-val {
    flex: 2 1 12rem;
}

.wh-header-secret-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    font-weight: 400;
    color: var(--qcb-gray-600);
    white-space: nowrap;
    cursor: pointer;
}

.wh-header-secret {
    letter-spacing: 0.15em;
}

.wh-add-header {
    margin-top: 0.5rem;
}

/* The scope picker. */
.wh-scope-sub {
    margin-top: 0.75rem;
}

.wh-scope-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--qcb-gray-600);
}

.wh-scope-filter.qcb-form-input {
    max-width: 280px;
    margin-bottom: 0.5rem;
}

.wh-scope-select {
    max-width: 640px;
}

.wh-scope-select .multi-select,
.wh-scope-select .dropdown,
.wh-scope-select .form-select {
    width: 100%;
}

.wh-scope-hint {
    margin-top: 0.35rem;
}

.wh-scope-covers {
    font-size: 0.85rem;
}

.wh-scope-modes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.25rem 0 0.85rem;
}

.wh-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--qcb-gray-700);
    cursor: pointer;
}

.wh-radio input {
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.wh-radio-desc {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--qcb-gray-500);
}

.wh-job-list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    max-height: 220px;
    padding: 0.35rem;
    overflow-y: auto;
    border: 1px solid var(--qcb-gray-200);
    border-radius: var(--qcb-radius-card);
}

.wh-job-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.84rem;
    font-weight: 400;
    border-radius: var(--qcb-radius-control);
    cursor: pointer;
}

.wh-job-item:hover {
    background: var(--qcb-gray-50);
}

.wh-job-name {
    font-weight: 500;
    color: var(--qcb-gray-900);
}

.wh-job-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    color: var(--qcb-gray-500);
}

.wh-job-proj {
    margin-left: auto;
    font-size: 0.76rem;
    color: var(--qcb-gray-500);
    white-space: nowrap;
}

/* Loading and not found. */
.wh-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--qcb-gray-600);
}

.wh-empty i {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 1.8rem;
}

.wh-empty-title {
    font-weight: 700;
    color: var(--qcb-gray-700);
}

.wh-empty-text {
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

/* ---- Blackout windows (moved from the page's and BlackoutWindowsPanel's own
   <style> blocks) ---- */
.bw-rules {
    margin: 0;
    padding-left: 1.1rem;
}

.bw-rules li {
    margin-bottom: 0.4rem;
}

.bw-job-group + .bw-job-group {
    margin-top: 1.25rem;
}

.bw-job-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    margin-bottom: 0.5rem;
}

.bw-job-note {
    font-size: 0.8125rem;
    color: var(--qcb-gray-600);
}

/* The editor, under the panel's list. */
.bw-editor {
    padding-top: 1.25rem;
    border-top: 1px solid var(--qcb-border);
}

.bw-editor-title {
    margin: 0 0 0.75rem;
    font-family: var(--qcb-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--qcb-gray-900);
}

.bw-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.bw-preview {
    margin-top: 0.5rem;
}

/* Something that is fine, in a form (the project's data file binding). */
.qcb-alert-success {
    border: 1px solid var(--qcb-green-100);
}

/* A notice with its button: the text takes the room, the button goes under it on
   a phone. */
.qcb-alert--with-action {
    flex-wrap: wrap;
    align-items: center;
}

.qcb-alert--with-action > span {
    flex: 1 1 14rem;
}

.qcb-binding-checking {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--qcb-gray-600);
}

/* The provider's logo beside a connection's name in a picker. */
.qcb-select-icon {
    width: 20px;
    height: 20px;
}

.qcb-select-icon--lg {
    width: 24px;
    height: 24px;
}

/* Storage provider forms: the tall text areas for a key file, and the gap
   between a checkbox and its words (were style attributes). */
.qcb-form-input.qcb-form-input--json {
    height: 300px;
}

.qcb-form-input.qcb-form-input--key {
    height: 180px;
}

.qcb-check-label-gap {
    margin-left: 0.5rem;
}

/* The provider's own form sits in the "Settings" section, with its buttons last. */
.qcb-storage-buttons {
    margin-top: 1.5rem;
}

/* A warning in a field's hint line (a trigger job that no longer exists). */
.qcb-form-hint.qcb-form-hint--warning {
    color: var(--qcb-amber-700);
}

/* ---- Schedule (moved from ScheduleCreateEdit's own <style> block) ---- */

/* The trigger job list's option: badge, name, id. */
.qcb-trigger-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.25;
}

.qcb-trigger-opt-name {
    font-weight: 500;
    color: var(--qcb-text);
}

.qcb-trigger-opt-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    color: var(--qcb-gray-500);
}

/* The day-of-month grid. */
.qcb-monthday-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.qcb-monthday-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--qcb-gray-700);
    background: var(--qcb-surface);
    border: 1px solid var(--qcb-gray-300);
    border-radius: var(--qcb-radius-card);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qcb-monthday-btn--wide {
    width: auto;
    padding: 0 0.85rem;
}

.qcb-monthday-btn:hover:not(.qcb-monthday-btn--active):not(:disabled) {
    border-color: var(--qcb-teal-600);
    color: var(--qcb-teal-700);
}

.qcb-monthday-btn--active {
    background: var(--qcb-action-bg);
    border-color: var(--qcb-action-bg);
    color: var(--qcb-on-fill);
}

/* "Every [n] hour(s)". */
.qcb-inline-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.qcb-inline-row-text {
    font-size: 0.875rem;
    color: var(--qcb-gray-700);
}

.qcb-form-input.qcb-form-input--narrow {
    width: 80px;
    text-align: center;
}

/* The time field and its clock button. */
.qcb-time-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qcb-time-input-row > .qcb-form-input {
    flex: 1;
    width: auto;
    min-width: 0;
}

/* On a phone every .qcb-btn is full width; the clock button stays beside the field. */
.qcb-time-input-row > .qcb-btn {
    flex: 0 0 auto;
    width: auto;
}

.qcb-schedule-loading {
    display: flex;
    justify-content: center;
    padding: 4rem 0;
}

/* The recurrence rule, for support, under Advanced. */
.qcb-rrule-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.6rem 0 0;
    padding: 0.65rem 1rem;
}

.qcb-rrule-preview__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--qcb-brand-green);
}

.qcb-rrule-preview__value {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--qcb-text);
    word-break: break-all;
}

/* What the schedule does, in a sentence, and its next runs. */
.qcb-schedule-summary {
    padding: 1rem 1.25rem;
}

.qcb-schedule-summary__headline {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--qcb-gray-800);
}

.qcb-schedule-summary__headline i {
    line-height: 1.4;
    color: var(--qcb-brand-green);
}

.qcb-schedule-summary__next {
    margin-top: 0.85rem;
}

.qcb-schedule-summary__next-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--qcb-gray-600);
}

.qcb-schedule-summary__zone {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.qcb-schedule-summary__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin: 0.4rem 0 0;
    padding: 0;
    font-size: 0.875rem;
    color: var(--qcb-gray-700);
    list-style: none;
}

.qcb-schedule-summary__list li {
    padding: 0.15rem 0.6rem;
    background: var(--qcb-gray-50);
    border: 1px solid var(--qcb-gray-200);
    border-radius: 999px;
}

.qcb-schedule-summary__empty {
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
    color: var(--qcb-gray-600);
}

.qcb-schedule-summary__advanced {
    margin-top: 0.85rem;
}

.qcb-schedule-summary__advanced > summary {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--qcb-gray-600);
    cursor: pointer;
    user-select: none;
}

.qcb-schedule-summary__advanced > summary:hover {
    color: var(--qcb-teal-700);
}

/* ---- Platform (#425) --------------------------------------------------------
   The Platform pages on the shell: Tenants, the tenant form, Platform users, the
   platform user form, Platform settings, System maintenance and Release notes.
   They use the shared list (#423) and form layout (#424); only what is theirs is
   here. Text on the warm grey ground is gray-600 or darker (#422).
   --------------------------------------------------------------------------- */

/* A tenant's ID under its name: the ID is what support quotes, so it keeps its
   letters apart. */
.qcb-platform-id {
    font-family: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

/* "Mar 21, 2026  Passed": the mark sits beside the date and wraps under it on a
   phone rather than widening the column. */
.qcb-platform-date {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    white-space: nowrap;
}

/* A platform user's email with "You" beside it. */
.qcb-platform-name {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
}

/* "Deleting..." where the row's menu was, while a tenant is deleted. */
.qcb-platform-busy {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--qcb-gray-700);
    white-space: nowrap;
}

/* Quiet text inside a white card: a count beside a section title, a line saying
   nothing is set. */
.qcb-platform-muted {
    font-size: 0.8125rem;
    color: var(--qcb-gray-600);
}

/* The kinds of test email, one line that wraps. */
.qcb-platform-kinds {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--qcb-gray-700);
}

/* The #scheduler anchor the paused banner links to (#340) holds one section. */
.qcb-platform-anchor {
    scroll-margin-top: 5rem;
}

/* The maintenance window's facts: label and value side by side, one under the
   other on a phone. */
.qcb-platform-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.375rem 1.25rem;
    margin: 0;
    font-size: 0.875rem;
}

.qcb-platform-facts dt {
    font-weight: 600;
    color: var(--qcb-gray-700);
}

.qcb-platform-facts dd {
    margin: 0;
    color: var(--qcb-gray-900);
    overflow-wrap: anywhere;
}

/* A date and a time picker under one label ("Starts (UTC)"). Bootstrap's reboot
   floats a legend at heading size; here it is a field label. */
.qcb-platform-when {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.qcb-platform-when > legend {
    float: none;
    width: auto;
    margin: 0 0 0.375rem;
    padding: 0;
    font-size: 0.875rem;
}

.qcb-platform-when .qcb-form-row {
    gap: 0.75rem;
}

.qcb-platform-when .qcb-form-group {
    margin: 0;
}

/* The release notes editor, and its full screen: the whole window, above the top
   bar, with the text area taking what the bar leaves. */
.qcb-release-editor {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qcb-release-editor-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.qcb-release-editor-bar .qcb-form-label {
    margin: 0;
}

.qcb-release-editor-text {
    min-height: 40vh;
    font-family: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.8125rem;
    line-height: 1.5;
    resize: vertical;
}

.qcb-release-editor.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1080;
    padding: 1rem;
    background: var(--qcb-surface);
}

.qcb-release-editor.is-fullscreen .qcb-release-editor-text {
    flex: 1 1 auto;
    min-height: 0;
    resize: none;
}

body:has(.qcb-release-editor.is-fullscreen) {
    overflow: hidden;
}

/* ---- End of Platform (#425) ---- */

/* ---- Forms on the full width (#438, #444) -----------------------------------
   A form uses the content width. From about 1000px its section cards sit in two
   columns (QcbFormColumns), and each column stacks its own cards, so a short card
   leaves no empty block under it while the card beside it runs on (#444). The
   page puts each card in a column; the order in the markup (the left column top
   to bottom, then the right one) is the order on screen, so reading and Tab
   follow it. Nothing here moves a card out of its place in the markup. The save
   bar, a message and a section marked wide (an editor, a long table) sit outside
   the columns and run across both, so the save button stays at the end. Below
   1000px, and on a phone, the columns are one, the left one's cards first.
   --------------------------------------------------------------------------- */
.qcb-form-cols,
.qcb-form-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

/* A column with nothing in it (its cards are hidden for now) takes no room. */
.qcb-form-col:empty {
    display: none;
}

@media (min-width: 1000px) {
    .qcb-form-cols {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

/* In a section across the whole width a setting keeps its label near its control,
   and a field keeps a readable length, rather than running edge to edge. */
.qcb-form-sec--wide .qcb-setting-item,
.qcb-form-sec--wide > .qcb-form-group {
    max-width: 48rem;
}
/* ---- End of Forms on the full width (#438, #444) ---- */
