.is-soft-deleted {
    text-decoration: line-through;
    opacity: 0.65;
}

[data-metro-preview-blocked="1"] {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Typography, link/button colors, and focus rings are owned by metro.css
   design tokens (--metro-*). Do not hardcode palette colors here. */

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--metro-success, #057a55);
}

.invalid {
    outline: 1px solid var(--metro-danger, #c81e1e);
}

.validation-message {
    color: var(--metro-danger, #c81e1e);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* One-time / reusable checklist designer */
.checklist-designer-section {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
}

.checklist-designer-section:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.35);
}

.cld-section-toolbar {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cld-section-toolbar-actions {
    display: flex;
    gap: 0.15rem;
    flex-shrink: 0;
}

.cld-grip {
    padding-top: 0.35rem;
    opacity: 0.45;
    cursor: grab;
}

.checklist-designer-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.65rem 0.5rem;
    border-radius: 0.375rem;
    background: var(--bs-tertiary-bg);
    margin-bottom: 0.5rem;
}

.checklist-designer-item:last-child {
    margin-bottom: 0;
}

.cld-attachment-toggles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.cld-attachment-toggles .btn-check:checked + .btn-outline-secondary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.checklist-designer-empty {
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
}

/* Work order type workflow flowchart (admin) */
.wo-workflow-graph-canvas {
    min-height: 6rem;
}

.wo-workflow-graph-track {
    min-width: min-content;
}

.wo-workflow-graph-edge {
    color: var(--bs-secondary-color);
    padding: 0 0.35rem;
    font-size: 1.25rem;
}

.wo-workflow-graph-node-card {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.wo-workflow-graph-node-card--interactive {
    cursor: pointer;
}

.wo-workflow-graph-node:hover .wo-workflow-graph-node-card {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12) !important;
}

.wo-workflow-graph-node--selected .wo-workflow-graph-node-card {
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.45) !important;
    transform: translateY(-2px);
}

/* Work order type status step wizard */
.wo-status-wizard-timeline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.wo-status-wizard-timeline__seg {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wo-status-wizard-timeline__seg--active {
    background: rgba(var(--bs-primary-rgb), 0.12);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    font-weight: 600;
    transform: translateY(-1px);
}

.wo-status-wizard-timeline__edge {
    width: 1.25rem;
    height: 2px;
    background: var(--bs-border-color);
    flex-shrink: 0;
}

.wo-status-wizard-hint {
    line-height: 1.35;
}

.wo-status-wizard-body {
    min-height: 16rem;
    animation: wo-status-wizard-fade 0.22s ease;
}

@keyframes wo-status-wizard-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.wo-status-wizard-readiness {
    background: var(--bs-body-bg);
}

.wo-status-wizard-readiness--ready {
    border-color: var(--bs-success) !important;
    background: rgba(var(--bs-success-rgb), 0.08);
}

.wo-status-wizard-preview__bar {
    background: var(--bs-tertiary-bg);
}

/* Work order type workflow dry-run test */
.wo-workflow-process-chart-canvas {
    min-height: 7rem;
}

.wo-workflow-process-track {
    min-width: min-content;
}

.wo-workflow-process-node {
    transition: transform 0.2s ease;
}

.wo-workflow-process-node-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease, outline-color 0.2s ease;
}

.wo-workflow-process-node--path .wo-workflow-process-node-card {
    box-shadow: 0 0 0 2px rgba(var(--bs-success-rgb), 0.35) !important;
}

.wo-workflow-process-node--current .wo-workflow-process-node-card {
    box-shadow: 0 0 0 3px rgba(var(--bs-success-rgb), 0.55) !important;
    transform: translateY(-3px);
}

.wo-workflow-process-node--start:not(.wo-workflow-process-node--current) .wo-workflow-process-node-card {
    outline: 2px dashed rgba(var(--bs-secondary-rgb), 0.45);
    outline-offset: 2px;
}

.wo-workflow-process-edge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    color: var(--bs-secondary-color);
    position: relative;
    padding: 0 0.25rem;
}

.wo-workflow-process-edge__line {
    height: 3px;
    width: 100%;
    background: var(--bs-border-color);
    border-radius: 2px;
    transition: background-color 0.2s ease, height 0.2s ease;
}

.wo-workflow-process-edge i {
    margin-top: -0.65rem;
    font-size: 0.85rem;
}

.wo-workflow-process-edge__label {
    font-size: 0.65rem;
    line-height: 1;
    margin-top: 0.15rem;
    max-width: 4.5rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wo-workflow-process-edge--default .wo-workflow-process-edge__line { background: var(--bs-secondary-color); }
.wo-workflow-process-edge--allowed .wo-workflow-process-edge__line { background: var(--bs-info); }
.wo-workflow-process-edge--decision .wo-workflow-process-edge__line { background: var(--bs-primary); }
.wo-workflow-process-edge--implied .wo-workflow-process-edge__line { background: var(--bs-border-color); opacity: 0.7; }

.wo-workflow-process-edge--path .wo-workflow-process-edge__line {
    background: var(--bs-success) !important;
    height: 4px;
}
.wo-workflow-process-edge--path {
    color: var(--bs-success);
}

.wo-workflow-process-legend {
    display: inline-block;
    width: 0.85rem;
    height: 0.35rem;
    border-radius: 2px;
    margin-right: 0.25rem;
    vertical-align: middle;
}
.wo-workflow-process-legend--default { background: var(--bs-secondary-color); }
.wo-workflow-process-legend--allowed { background: var(--bs-info); }
.wo-workflow-process-legend--decision { background: var(--bs-primary); }
.wo-workflow-process-legend--path { background: var(--bs-success); }

.wo-workflow-process-branch {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    font-size: 0.8rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.wo-workflow-process-branch--decision {
    border-color: rgba(var(--bs-primary-rgb), 0.35);
}
.wo-workflow-process-branch--allowed {
    border-color: rgba(var(--bs-info-rgb), 0.35);
}
.wo-workflow-process-branch--path {
    border-color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), 0.1);
    box-shadow: 0 0 0 1px rgba(var(--bs-success-rgb), 0.25);
}

.wo-workflow-test-timing--gates {
    background: rgba(var(--bs-warning-rgb), 0.08);
    border: 1px solid rgba(var(--bs-warning-rgb), 0.25);
}
.wo-workflow-test-timing--req {
    background: rgba(var(--bs-primary-rgb), 0.08);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.25);
}
.wo-workflow-test-timing--after {
    background: rgba(var(--bs-success-rgb), 0.08);
    border: 1px solid rgba(var(--bs-success-rgb), 0.25);
}

.wo-workflow-test-walk,
.wo-workflow-test-result {
    background: var(--bs-body-bg);
}

.wo-workflow-test-record__bar {
    background: var(--bs-tertiary-bg);
}

.wo-workflow-test-history {
    background: var(--bs-body-bg);
}

.wo-workflow-test-journey-track {
    min-width: min-content;
    gap: 0;
}

.wo-workflow-test-journey-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 5.5rem;
    max-width: 7.5rem;
    transition: transform 0.2s ease;
}

.wo-workflow-test-journey-node--current {
    transform: translateY(-2px);
}

.wo-workflow-test-journey-dot {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(var(--bs-success-rgb), 0.15);
    color: var(--bs-success);
    border: 2px solid rgba(var(--bs-success-rgb), 0.45);
}

.wo-workflow-test-journey-node--current .wo-workflow-test-journey-dot {
    background: var(--bs-success);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(var(--bs-success-rgb), 0.25);
}

.wo-workflow-test-journey-label {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    max-width: 100%;
}

.wo-workflow-test-journey-edge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    color: var(--bs-success);
    padding: 0 0.15rem;
    margin-bottom: 1.1rem;
}

.wo-workflow-test-journey-edge__line {
    height: 3px;
    width: 100%;
    background: var(--bs-success);
    border-radius: 2px;
}

.wo-workflow-test-journey-edge i {
    margin-top: -0.55rem;
    font-size: 0.75rem;
}

.wo-workflow-test-timeline {
    position: relative;
    padding-left: 0.25rem;
}

.wo-workflow-test-timeline__item {
    display: flex;
    gap: 0.75rem;
    position: relative;
    padding-bottom: 1rem;
}

.wo-workflow-test-timeline__item:last-child {
    padding-bottom: 0;
}

.wo-workflow-test-timeline__item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 0.85rem;
    top: 1.75rem;
    bottom: 0;
    width: 2px;
    background: var(--bs-border-color);
}

.wo-workflow-test-timeline__marker {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-tertiary-bg);
    z-index: 1;
}

.wo-workflow-test-timeline__item--started .wo-workflow-test-timeline__marker {
    color: var(--bs-secondary);
}
.wo-workflow-test-timeline__item--applied .wo-workflow-test-timeline__marker {
    color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), 0.12);
}
.wo-workflow-test-timeline__item--blocked .wo-workflow-test-timeline__marker {
    color: var(--bs-danger);
    background: rgba(var(--bs-danger-rgb), 0.12);
}
.wo-workflow-test-timeline__item--completed .wo-workflow-test-timeline__marker {
    color: #fff;
    background: var(--bs-success);
}

.wo-workflow-test-timeline__body {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.wo-workflow-test-confidence {
    background: rgba(var(--bs-primary-rgb), 0.04);
    margin-left: -1rem;
    margin-right: -1rem;
    margin-bottom: -1rem;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-bottom: 1rem !important;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Workflow dry-run mock capture / upload */
.workflow-test-mock-photo__viewport {
    min-height: 9rem;
    background:
        linear-gradient(145deg, #3d4f5f 0%, #1a2634 55%, #0d1520 100%);
    overflow: hidden;
}

.workflow-test-mock-photo__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.45;
}

.workflow-test-mock-photo__hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.workflow-test-mock-photo__thumb {
    height: 9rem;
    background:
        linear-gradient(160deg, #6b8f71 0%, #4a6741 40%, #2f3d32 100%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.25), transparent 45%);
}

.workflow-test-mock-file__chip {
    background: var(--bs-body-bg);
}

.workflow-test-mock-checklist__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background: var(--bs-body-bg);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.workflow-test-mock-checklist__item:hover {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.04);
}

.workflow-test-mock-checklist__item--done {
    border-color: rgba(var(--bs-success-rgb), 0.45);
    background: rgba(var(--bs-success-rgb), 0.08);
}

.workflow-test-mock-checklist__box {
    width: 1.35rem;
    height: 1.35rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--bs-success);
}

.workflow-test-mock-checklist__item--done .workflow-test-mock-checklist__box {
    border-color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), 0.15);
}

.wo-workflow-test-record__summary {
    line-height: 1.35;
}

.wizard-flow-graph-canvas,
.wizard-flow-graph-track,
.wizard-flow-graph-edge,
.wizard-flow-graph-node-card,
.wizard-flow-graph-node:hover .wizard-flow-graph-node-card,
.wizard-flow-graph-node--selected .wizard-flow-graph-node-card {
    /* reuse workflow graph styling */
}

.wizard-flow-graph-canvas { overflow-x: auto; padding-bottom: 0.5rem; }
.wizard-flow-graph-track { display: flex; flex-wrap: nowrap; align-items: center; gap: 0; min-width: min-content; }
.wizard-flow-graph-edge { color: var(--bs-secondary); padding: 0 0.35rem; font-size: 1.1rem; }
.wizard-flow-graph-node-card { transition: box-shadow 0.15s ease, transform 0.15s ease; }
.wizard-flow-graph-node:hover .wizard-flow-graph-node-card { box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12) !important; }
.wizard-flow-graph-node--selected .wizard-flow-graph-node-card {
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.45) !important;
    transform: translateY(-2px);
}

.wizard-builder-empty { border: 2px dashed var(--bs-border-color); border-radius: 8px; }

/* Wizard builder — step field list */
.wizard-builder .wb-fields-section {
    --wb-field-radius: 0.5rem;
    --wb-field-border: var(--bs-border-color);
    --wb-field-bg: var(--bs-body-bg, #fff);
    --wb-field-muted: var(--bs-secondary-color, #6c757d);
}

.wizard-builder .wb-fields-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.wizard-builder .wb-fields-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--wb-field-muted);
    text-transform: uppercase;
}

.wizard-builder .wb-fields-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.1);
}

.wizard-builder .wb-fields-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.25rem 1rem;
    margin-bottom: 0.65rem;
    text-align: center;
    color: var(--wb-field-muted);
    font-size: 0.85rem;
    border: 1px dashed var(--wb-field-border);
    border-radius: var(--wb-field-radius);
    background: rgba(var(--bs-secondary-rgb, 108, 117, 125), 0.04);
}

.wizard-builder .wb-fields-empty .bi {
    font-size: 1.35rem;
    opacity: 0.55;
}

.wizard-builder .wb-fields-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.wizard-builder .wb-field {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    min-height: 2.65rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--wb-field-border);
    border-radius: var(--wb-field-radius);
    background: var(--wb-field-bg);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.wizard-builder .wb-field:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.45);
    background: rgba(var(--bs-primary-rgb), 0.03);
}

.wizard-builder .wb-field.is-expanded {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 1px rgba(var(--bs-primary-rgb), 0.25);
    background: rgba(var(--bs-primary-rgb), 0.04);
}

.wizard-builder .wb-field-grip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    color: #adb5bd;
    cursor: grab;
    flex-shrink: 0;
}

.wizard-builder .wb-field:active .wb-field-grip { cursor: grabbing; }

.wizard-builder .wb-field-type {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #495057;
    background: #eef1f4;
    border-radius: 0.3rem;
    padding: 0.15rem 0.45rem;
    white-space: nowrap;
}

.wizard-builder .wb-field-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--bs-body-color, #212529);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wizard-builder .wb-field-required {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #b02a37;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 0.3rem;
    padding: 0.12rem 0.4rem;
    white-space: nowrap;
}

.wizard-builder .wb-field-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.wizard-builder .wb-field:hover .wb-field-actions,
.wizard-builder .wb-field.is-expanded .wb-field-actions,
.wizard-builder .wb-field-actions:focus-within {
    opacity: 1;
}

.wizard-builder .wb-field-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 0.35rem;
    background: transparent;
    color: #6c757d;
    line-height: 1;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.wizard-builder .wb-field-action:hover:not(:disabled) {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.wizard-builder .wb-field-action:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wizard-builder .wb-field-action--danger:hover:not(:disabled) {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.wizard-builder .wb-field-expand {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #adb5bd;
}

.wizard-builder .wb-field.is-expanded .wb-field-expand {
    color: var(--bs-primary);
}

.wizard-builder .wb-add-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px dashed rgba(var(--bs-primary-rgb), 0.45);
    border-radius: var(--wb-field-radius);
    background: rgba(var(--bs-primary-rgb), 0.03);
    color: var(--bs-primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wizard-builder .wb-add-field:hover {
    background: rgba(var(--bs-primary-rgb), 0.08);
    border-color: var(--bs-primary);
}

@media (max-width: 575.98px) {
    .wizard-builder .wb-field-actions {
        opacity: 1;
    }

    .wizard-builder .wb-field-required {
        display: none;
    }
}

.wizard-runner-stepper { gap: 0.5rem; }
.wizard-runner-stepper-item {
    display: flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.5rem;
    border-radius: 999px; background: var(--bs-light); color: var(--bs-secondary);
    max-width: 10rem; font-size: 0.8rem;
}
.wizard-runner-stepper-item.is-current { background: rgba(var(--bs-primary-rgb), 0.12); color: var(--bs-primary); font-weight: 600; }
.wizard-runner-stepper-item.is-done { background: rgba(var(--bs-success-rgb), 0.12); color: var(--bs-success); }
.wizard-runner-stepper-dot {
    width: 1.35rem; height: 1.35rem; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700;
    background: var(--bs-white); border: 1px solid currentColor;
}

.permit-wizard-stepper { gap: 0.5rem; }
.permit-wizard-stepper-item {
    display: flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.5rem;
    border-radius: 999px; background: var(--bs-light); color: var(--bs-secondary);
    max-width: 10rem; font-size: 0.8rem;
}
.permit-wizard-stepper-item.is-current { background: rgba(var(--bs-primary-rgb), 0.12); color: var(--bs-primary); font-weight: 600; }
.permit-wizard-stepper-item.is-done { background: rgba(var(--bs-success-rgb), 0.12); color: var(--bs-success); }
.permit-wizard-stepper-dot {
    width: 1.35rem; height: 1.35rem; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700;
    background: var(--bs-white); border: 1px solid currentColor;
}
.permit-wizard-stepper-label { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fire-page-header h2 { font-size: 1.5rem; }
.fire-empty-state { border: 1px dashed var(--bs-border-color); border-radius: 0.5rem; background: var(--bs-body-bg); }
.fire-kpi-card { transition: box-shadow 0.15s ease; }
.fire-kpi-card:hover { box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08) !important; }
.fire-dashboard-section-title {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.inspection-page-header h2 { font-size: 1.5rem; }
.inspection-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
}
.inspection-related-link {
    font-size: 0.875rem;
    text-decoration: none;
}
.inspection-related-link:hover { text-decoration: underline; }
.inspection-kpi-card .card-body { min-height: 5.5rem; }
.inspection-filter-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    max-width: 100%;
}
.inspection-filter-chips .btn {
    flex: 0 0 auto;
    min-height: 2.25rem;
}
@media (max-width: 768px) {
    .inspection-filter-chips .btn,
    .inspection-filter-chips .btn.btn-sm {
        min-height: var(--metro-touch-target-min, 48px);
    }
}
.inspection-cal-event-title { font-size: 0.8rem; font-weight: 600; line-height: 1.2; }
.inspection-cal-event-sub { font-size: 0.75rem; opacity: 0.85; }
.inspection-cal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.mobile-shell .inspection-cal-grid {
    min-width: 28rem;
}
.fire-station-chip {
    display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 50%;
    vertical-align: middle; margin-right: 0.35rem;
}

/* Daily Notes — station logbook journal */
.fire-daily-notes-toolbar-label {
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
}

.fire-daily-notes-page {
    position: relative;
    border: 1px solid rgba(139, 90, 43, 0.18);
    border-left: 5px solid #dc3545;
    border-radius: 0.85rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(
            transparent,
            transparent 1.55rem,
            rgba(220, 53, 69, 0.08) 1.55rem,
            rgba(220, 53, 69, 0.08) calc(1.55rem + 1px)
        ),
        #faf7f2;
    box-shadow:
        0 0.35rem 1.25rem rgba(67, 41, 16, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    overflow: hidden;
}

.fire-daily-notes-page--loading {
    min-height: 18rem;
}

.fire-daily-notes-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem 1.1rem;
    border-bottom: 1px solid rgba(139, 90, 43, 0.14);
    background: rgba(255, 255, 255, 0.55);
}

.fire-daily-notes-page-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(139, 90, 43, 0.12);
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(43, 33, 24, 0.78);
}

.fire-daily-notes-page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a94442;
}

.fire-daily-notes-page-date {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem 0.85rem;
}

.fire-daily-notes-page-weekday {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.1;
    color: #3d2914;
}

.fire-daily-notes-page-calendar-date {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    color: rgba(61, 41, 20, 0.72);
}

.fire-daily-notes-byline {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: min(100%, 16rem);
    padding: 0.75rem 0.95rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(139, 90, 43, 0.12);
}

.fire-daily-notes-author-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: linear-gradient(145deg, #dc3545, #a71d2a);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 0.15rem 0.45rem rgba(220, 53, 69, 0.28);
}

.fire-daily-notes-author-avatar--sm {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.78rem;
}

.fire-daily-notes-byline-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.fire-daily-notes-author-name {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: #2b2118;
}

.fire-daily-notes-timestamp {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.15rem;
    font-size: 0.92rem;
    color: rgba(43, 33, 24, 0.78);
}

.fire-daily-notes-body {
    padding: 1.1rem 1.5rem 0.75rem;
}

.fire-daily-notes-empty-page {
    margin-bottom: 1.25rem;
    padding: 1.25rem 0.5rem 0.5rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-style: italic;
    color: rgba(43, 33, 24, 0.52);
}

.fire-daily-notes-entries {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    margin-bottom: 1.5rem;
}

.fire-daily-notes-station-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.fire-daily-notes-station-section {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(139, 90, 43, 0.14);
}

.fire-daily-notes-station-section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.fire-daily-notes-station-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #3d2914;
}

.fire-daily-notes-station-heading .bi {
    color: #a94442;
}

.fire-daily-notes-station-count {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(43, 33, 24, 0.62);
}

.fire-daily-notes-empty-page--station {
    margin-bottom: 0;
    padding: 0.35rem 0 0.15rem;
    font-size: 0.95rem;
}

.fire-daily-notes-compose-hint {
    margin-top: 0.35rem;
    padding: 0.95rem 0.15rem 0.35rem;
    border-top: 1px solid rgba(139, 90, 43, 0.12);
    font-size: 0.92rem;
    font-style: italic;
    color: rgba(43, 33, 24, 0.58);
}

.fire-daily-notes-entry {
    padding-bottom: 1.15rem;
    border-bottom: 1px dashed rgba(139, 90, 43, 0.16);
}

.fire-daily-notes-entry:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.fire-daily-notes-entry-byline {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.fire-daily-notes-entry-meta .fire-daily-notes-author-name {
    font-size: 0.95rem;
}

.fire-daily-notes-entry-meta .fire-daily-notes-timestamp {
    margin-top: 0.05rem;
    font-size: 0.82rem;
}

.fire-daily-notes-entry-text {
    padding-left: 0.15rem;
    color: #2b2118;
    font-size: 1rem;
    line-height: 1.65;
    white-space: pre-wrap;
    font-family: Georgia, "Times New Roman", serif;
}

.fire-daily-notes-compose {
    margin-top: 0.35rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(139, 90, 43, 0.12);
}

.fire-daily-notes-compose-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    margin-bottom: 0.65rem;
}

.fire-daily-notes-compose-author {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.fire-daily-notes-compose-author .fire-daily-notes-author-name {
    font-size: 0.95rem;
}

.fire-daily-notes-textarea {
    width: 100%;
    min-height: 18rem;
    padding: 0.35rem 0.15rem 0.75rem;
    border: 0;
    background: transparent;
    resize: vertical;
    color: #2b2118;
    font-size: 1rem;
    line-height: 1.65;
    font-family: Georgia, "Times New Roman", serif;
}

.fire-daily-notes-textarea:focus {
    outline: none;
    box-shadow: none;
}

.fire-daily-notes-textarea::placeholder {
    color: rgba(43, 33, 24, 0.42);
    font-style: italic;
}

.fire-daily-notes-textarea--compose {
    min-height: 8rem;
}

.fire-daily-notes-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(139, 90, 43, 0.12);
    background: rgba(255, 255, 255, 0.45);
}

.fire-daily-notes-char-count {
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.fire-daily-notes-save-btn {
    min-width: 8.5rem;
}

.fire-daily-notes-index-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.fire-daily-notes-index-subtitle {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.fire-daily-notes-index-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0.85rem 0.85rem;
}

.fire-daily-notes-index-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    background: rgba(var(--bs-body-bg-rgb, 255, 255, 255), 0.92);
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.fire-daily-notes-index-item:hover {
    border-color: rgba(220, 53, 69, 0.18);
    background: rgba(220, 53, 69, 0.04);
}

.fire-daily-notes-index-item.is-selected {
    border-color: rgba(220, 53, 69, 0.35);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12), rgba(220, 53, 69, 0.04));
    box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.08);
}

.fire-daily-notes-index-item-date {
    display: flex;
    flex-direction: column;
    min-width: 3.5rem;
}

.fire-daily-notes-index-item-weekday {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.fire-daily-notes-index-item-day {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 700;
    color: #2b2118;
}

.fire-daily-notes-index-item-meta {
    min-width: 0;
}

.fire-daily-notes-index-author,
.fire-daily-notes-index-empty-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.84rem;
}

.fire-daily-notes-index-author {
    color: rgba(43, 33, 24, 0.82);
}

.fire-daily-notes-index-empty-label {
    color: var(--bs-secondary-color);
    font-style: italic;
}

.fire-daily-notes-index-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(220, 53, 69, 0.12);
    color: #a71d2a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fire-daily-notes-index-icon {
    color: #dc3545;
    font-size: 1rem;
}

.fire-daily-notes-index-empty {
    padding: 1rem 0.85rem 0.35rem;
    font-size: 0.88rem;
    color: var(--bs-secondary-color);
}

.fire-daily-notes-widget-byline {
    padding-top: 0.55rem;
    border-top: 1px dashed rgba(139, 90, 43, 0.18);
}

.fire-daily-notes-widget-author {
    font-weight: 700;
    color: #2b2118;
}

.fire-daily-notes-widget-timestamp {
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.fire-setup-wizard .list-group-item-action { border-left: 3px solid transparent; }
.fire-setup-wizard .list-group-item-action.is-current { border-left-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), 0.06); }

/* Settings hub (Fire + System Settings/Types share these rules) */
.settings-hub-section-nav {
    position: sticky;
    top: 0.75rem;
    z-index: 2;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    background: rgba(var(--bs-body-bg-rgb, 255, 255, 255), 0.95);
    border: 1px solid var(--bs-border-color);
    backdrop-filter: blur(8px);
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
}
.settings-hub-nav-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid var(--bs-border-color);
}
.settings-hub-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    background: transparent;
    color: var(--bs-secondary-color);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.settings-hub-nav-group:hover {
    background: rgba(var(--bs-primary-rgb), 0.06);
    color: var(--bs-body-color);
}
.settings-hub-nav-group.active {
    background: rgba(var(--bs-primary-rgb), 0.1);
    border-color: rgba(var(--bs-primary-rgb), 0.25);
    color: var(--bs-primary);
}
.settings-hub-nav-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: rgba(var(--bs-secondary-rgb, 108, 117, 125), 0.12);
    color: var(--bs-secondary-color);
}
.settings-hub-nav-group.active .settings-hub-nav-group-count {
    background: rgba(var(--bs-primary-rgb), 0.15);
    color: var(--bs-primary);
}
.settings-hub-nav-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.settings-hub-nav-sections.has-groups {
    min-height: 2rem;
}
.settings-hub-nav-section {
    border: 0;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    background: rgba(var(--bs-secondary-rgb, 108, 117, 125), 0.08);
    color: var(--bs-body-color);
    transition: background 0.15s ease, color 0.15s ease;
}
.settings-hub-nav-section:hover {
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
}
.settings-hub-section-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.fire-settings-quickstart {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.06), rgba(var(--bs-primary-rgb), 0.02));
}
.fire-settings-quickstart-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.65rem;
    background: var(--bs-body-bg);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.fire-settings-quickstart-link:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.35);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
    color: inherit;
}
.fire-settings-card,
.fire-settings-card-link {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.fire-settings-card:hover,
.fire-settings-card-link:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.35) !important;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
    color: inherit;
}
.fire-settings-card-main:hover { color: inherit; }
.settings-hub-card-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
}
.settings-hub-sublink-item {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}
.fire-settings-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    flex-shrink: 0;
}
.fire-settings-quickstart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
    flex-shrink: 0;
}
.fire-settings-sublinks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.8125rem;
}
.fire-settings-sublinks a {
    color: var(--bs-primary);
    text-decoration: none;
}
.fire-settings-sublinks a:hover { text-decoration: underline; }

@media print {
    #fire-schedule-report, #fire-scheduler-report, #fire-reports-report { break-inside: avoid; }
    .scheduler-shift-block { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Legislative approval flow & routing (admin) */
.legislative-flow-graph.wo-workflow-graph {
    min-height: 7rem;
}

.legislative-routing-section {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.125rem;
}

.legislative-routing-section-label {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.legislative-routing-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
}

.legislative-routing-badge--when {
    background: rgba(var(--bs-info-rgb), 0.15);
    color: var(--bs-info-text-emphasis, var(--bs-info));
}

.legislative-routing-badge--then {
    background: rgba(var(--bs-success-rgb), 0.15);
    color: var(--bs-success);
}

.legislative-routing-preview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.legislative-routing-rule-card .legislative-flow-graph {
    margin-bottom: 0;
}

/* Legislative rich-text rendering: memo/agenda/minutes preview HTML from the server */
.legislative-memo {
    line-height: 1.6;
    color: var(--bs-body-color);
}

.legislative-memo :first-child {
    margin-top: 0;
}

.legislative-memo :last-child {
    margin-bottom: 0;
}

.legislative-memo p {
    margin-bottom: 0.75rem;
}

.legislative-memo h1,
.legislative-memo h2,
.legislative-memo h3,
.legislative-memo h4 {
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legislative-memo ul,
.legislative-memo ol {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.legislative-memo blockquote {
    border-left: 3px solid var(--bs-border-color);
    padding: 0.25rem 0 0.25rem 0.75rem;
    color: var(--bs-secondary-color);
    margin: 0.75rem 0;
}

.legislative-memo table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
}

.legislative-memo table td,
.legislative-memo table th {
    border: 1px solid var(--bs-border-color);
    padding: 0.35rem 0.5rem;
}

/* Agenda document letterhead (also covered in legislative.css for staff pages) */
.legislative-memo .pearl-agenda .agenda-doc-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--bs-primary, #1a3a5c);
}

.legislative-memo .pearl-agenda .agenda-city-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex: 0 0 auto;
}

.legislative-memo .pearl-agenda .agenda-city-name {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
}

.legislative-memo .pearl-agenda .agenda-body-name {
    margin-top: 2px;
    font-size: .92rem;
    color: var(--bs-secondary-color);
}

.legislative-memo .pearl-agenda .agenda-status-label {
    margin-left: auto;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bs-primary, #1a3a5c);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    padding: 5px 12px;
}

.legislative-memo .pearl-agenda .agenda-section-header {
    margin: 1.35rem 0 .55rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--bs-border-color);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.legislative-memo .pearl-agenda .agenda-meeting-when {
    margin: 0;
    font-size: 1rem;
}

.legislative-memo .pearl-agenda .agenda-meeting-location,
.legislative-memo .pearl-agenda .consent-preamble,
.legislative-memo .pearl-agenda .agenda-comment {
    color: var(--bs-secondary-color);
}

/* Legislative agenda-lines editor grid */
.legislative-agenda-lines {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legislative-agenda-grid {
    font-size: 0.9rem;
}

.legislative-agenda-grid thead th {
    position: sticky;
    top: 0;
    background: var(--bs-body-bg);
    z-index: 1;
}

.legislative-agenda-grid tbody tr {
    cursor: pointer;
}

.legislative-agenda-grid tbody tr.table-active {
    --bs-table-active-bg: rgba(var(--bs-primary-rgb), 0.1);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-header td {
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(var(--bs-secondary-rgb), 0.08);
    border-top: 2px solid var(--bs-border-color);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-header--consent td {
    --bs-table-bg: rgba(var(--bs-success-rgb), 0.14);
    background: rgba(var(--bs-success-rgb), 0.14);
    border-top-color: rgba(var(--bs-success-rgb), 0.45);
    color: var(--bs-success-text-emphasis, inherit);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-header--general-business td {
    --bs-table-bg: rgba(var(--bs-primary-rgb), 0.14);
    background: rgba(var(--bs-primary-rgb), 0.14);
    border-top-color: rgba(var(--bs-primary-rgb), 0.45);
    color: var(--bs-primary-text-emphasis, inherit);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-header--public-hearing td {
    --bs-table-bg: rgba(var(--bs-warning-rgb), 0.18);
    background: rgba(var(--bs-warning-rgb), 0.18);
    border-top-color: rgba(var(--bs-warning-rgb), 0.5);
    color: var(--bs-warning-text-emphasis, inherit);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child {
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

/* Match header tint on every cell so Bootstrap table vars / striping cannot wash it out. */
.legislative-agenda-grid tbody tr.agenda-lines-section-child--consent {
    --bs-table-bg: rgba(var(--bs-success-rgb), 0.12);
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: rgba(var(--bs-success-rgb), 0.12);
    --bs-table-hover-bg: rgba(var(--bs-success-rgb), 0.18);
    --bs-table-bg-type: transparent;
    box-shadow: inset 4px 0 0 var(--bs-success);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--consent > * {
    --bs-table-bg: rgba(var(--bs-success-rgb), 0.12);
    background-color: rgba(var(--bs-success-rgb), 0.12);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--general-business {
    --bs-table-bg: rgba(var(--bs-primary-rgb), 0.12);
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: rgba(var(--bs-primary-rgb), 0.12);
    --bs-table-hover-bg: rgba(var(--bs-primary-rgb), 0.18);
    --bs-table-bg-type: transparent;
    box-shadow: inset 4px 0 0 var(--bs-primary);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--general-business > * {
    --bs-table-bg: rgba(var(--bs-primary-rgb), 0.12);
    background-color: rgba(var(--bs-primary-rgb), 0.12);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--public-hearing {
    --bs-table-bg: rgba(var(--bs-warning-rgb), 0.16);
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: rgba(var(--bs-warning-rgb), 0.16);
    --bs-table-hover-bg: rgba(var(--bs-warning-rgb), 0.22);
    --bs-table-bg-type: transparent;
    box-shadow: inset 4px 0 0 var(--bs-warning);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--public-hearing > * {
    --bs-table-bg: rgba(var(--bs-warning-rgb), 0.16);
    background-color: rgba(var(--bs-warning-rgb), 0.16);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--pending > * {
    box-shadow: inset 0 0 0 1px rgba(var(--bs-warning-rgb), 0.45);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child td.agenda-lines-section-child__desc,
.legislative-agenda-grid tbody tr.agenda-lines-section-child .agenda-lines-section-child__desc {
    padding-left: 1.25rem;
    position: relative;
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child .agenda-lines-section-child__desc::before {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 2px;
    border-radius: 1px;
    background: rgba(var(--bs-primary-rgb), 0.35);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--consent .agenda-lines-section-child__desc::before {
    background: rgba(var(--bs-success-rgb), 0.55);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--general-business .agenda-lines-section-child__desc::before {
    background: rgba(var(--bs-primary-rgb), 0.55);
}

.legislative-agenda-grid tbody tr.agenda-lines-section-child--public-hearing .agenda-lines-section-child__desc::before {
    background: rgba(var(--bs-warning-rgb), 0.65);
}

.legislative-agenda-grid .agenda-lines-section-select {
    min-width: 11.5rem;
    max-width: 16rem;
    width: auto;
    font-size: 0.75rem;
}

@keyframes agenda-row-move-up {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes agenda-row-move-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.legislative-agenda-grid tbody tr.agenda-lines-row--moving {
    position: relative;
    z-index: 1;
    opacity: 0.88;
    box-shadow: inset 0 0 0 2px rgba(var(--bs-primary-rgb), 0.35);
}

.legislative-agenda-grid tbody tr.agenda-lines-row--moving-up {
    animation: agenda-row-move-up 0.55s ease-in-out infinite;
}

.legislative-agenda-grid tbody tr.agenda-lines-row--moving-down {
    animation: agenda-row-move-down 0.55s ease-in-out infinite;
}

.legislative-agenda-grid .agenda-lines-move-btn--busy {
    pointer-events: none;
}

.legislative-agenda-grid .agenda-lines-move-spinner {
    width: 0.85rem;
    height: 0.85rem;
    border-width: 0.12em;
    vertical-align: -0.1em;
}

.legislative-agenda-grid tbody tr.agenda-lines-acknowledgements td {
    background: var(--bs-tertiary-bg, #f8f9fa);
    border-top: 0;
    padding-top: 0.35rem;
    padding-bottom: 0.75rem;
}

.legislative-agenda-grid tbody tr.agenda-lines-acknowledgements textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.leg-confirmed-section {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bs-body-bg);
}

.leg-confirmed-section__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: rgba(var(--bs-secondary-rgb), 0.06);
}

.leg-confirmed-section__title {
    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leg-confirmed-section__count {
    margin-left: auto;
    font-size: 0.75rem;
}

.leg-confirmed-section__header .btn {
    white-space: nowrap;
}

.leg-confirmed-section__body {
    padding: 0.75rem;
}

.leg-confirmed-section__item {
    background: var(--bs-body-bg);
}

.leg-confirmed-section--consent {
    border-color: rgba(var(--bs-success-rgb), 0.35);
    background: rgba(var(--bs-success-rgb), 0.06);
}

.leg-confirmed-section--consent .leg-confirmed-section__header {
    background: rgba(var(--bs-success-rgb), 0.14);
    border-bottom-color: rgba(var(--bs-success-rgb), 0.25);
}

.leg-confirmed-section--consent .leg-confirmed-section__item {
    background: rgba(var(--bs-success-rgb), 0.12);
    border-color: rgba(var(--bs-success-rgb), 0.28) !important;
}

.leg-confirmed-section--general-business {
    border-color: rgba(var(--bs-primary-rgb), 0.35);
    background: rgba(var(--bs-primary-rgb), 0.06);
}

.leg-confirmed-section--general-business .leg-confirmed-section__header {
    background: rgba(var(--bs-primary-rgb), 0.14);
    border-bottom-color: rgba(var(--bs-primary-rgb), 0.25);
}

.leg-confirmed-section--general-business .leg-confirmed-section__item {
    background: rgba(var(--bs-primary-rgb), 0.12);
    border-color: rgba(var(--bs-primary-rgb), 0.28) !important;
}

.leg-confirmed-section--public-hearing {
    border-color: rgba(var(--bs-warning-rgb), 0.4);
    background: rgba(var(--bs-warning-rgb), 0.08);
}

.leg-confirmed-section--public-hearing .leg-confirmed-section__header {
    background: rgba(var(--bs-warning-rgb), 0.18);
    border-bottom-color: rgba(var(--bs-warning-rgb), 0.3);
}

.leg-confirmed-section--public-hearing .leg-confirmed-section__item {
    background: rgba(var(--bs-warning-rgb), 0.16);
    border-color: rgba(var(--bs-warning-rgb), 0.35) !important;
}

.leg-confirmed-section--other .leg-confirmed-section__header {
    background: rgba(var(--bs-secondary-rgb), 0.08);
}

.asset-attribute-schema-builder .border {
    border-color: var(--bs-border-color) !important;
}

.planning-weather-banner__date-control {
    flex-shrink: 0;
    width: min(100%, 10.5rem);
}

.planning-weather-banner__hero-icon {
    flex-shrink: 0;
    line-height: 1;
    color: var(--bs-primary);
    font-size: 3rem;
}

.planning-weather-banner__hero-icon img {
    display: block;
    object-fit: contain;
}

.planning-weather-banner__periods {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.planning-weather-banner__period {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.planning-weather-banner__period--bordered {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.planning-weather-banner__period-icon {
    flex-shrink: 0;
    width: 3rem;
    color: var(--bs-secondary);
    font-size: 1.75rem;
    line-height: 1;
}

.planning-weather-banner__period-icon img {
    display: block;
    object-fit: contain;
}

.planning-weather-banner__period-body {
    padding-top: 0.15rem;
}

.metro-staff-home .planning-weather-banner {
    margin-bottom: 0.75rem !important;
}

.metro-staff-home .planning-weather-banner .card-body {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
}

.metro-staff-home .planning-weather-banner__hero-icon {
    font-size: 2rem;
}

.metro-staff-home .planning-weather-banner__hero-icon img {
    width: 48px;
    height: 48px;
}

.metro-staff-home .planning-weather-banner__period-icon {
    width: 2.25rem;
    font-size: 1.35rem;
}

.metro-staff-home .planning-weather-banner__period-icon img {
    width: 36px;
    height: 36px;
}

.metro-staff-home .planning-weather-banner__periods {
    gap: 0.35rem;
}

.scheduler-shift-block {
    cursor: pointer;
}

.scheduler-shift-roster {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.4rem;
    row-gap: 0.12rem;
    align-items: baseline;
}

.scheduler-shift-person-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheduler-shift-person-rank {
    white-space: nowrap;
    opacity: 0.92;
    font-variant-numeric: tabular-nums;
}

.scheduler-shift-block--selected {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

.scheduler-shift-block--drop-target {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

.scheduler-shift-block--alert {
    box-shadow: inset 0 0 0 2px rgba(220, 53, 69, 0.65);
}

.scheduler-assignment-draggable[draggable]:not([draggable="false"]),
.scheduler-personnel-draggable[draggable]:not([draggable="false"]) {
    cursor: grab;
    border-radius: 0.25rem;
    padding-inline: 0.15rem;
}

.scheduler-assignment-draggable[draggable]:not([draggable="false"]):active,
.scheduler-personnel-draggable[draggable]:not([draggable="false"]):active {
    cursor: grabbing;
    opacity: 0.75;
}

a.scheduler-personnel-draggable:hover {
    color: inherit;
}

.roster-available-pool {
    min-height: 8rem;
    background: var(--bs-light-bg-subtle, #f8f9fa);
}

.roster-slot-card {
    min-height: 6.5rem;
    background: var(--metro-surface, #fff);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.roster-slot-card--drop-target {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.2);
}

.roster-slot-card--filled {
    border-color: var(--bs-border-color);
}

.roster-coverage-matrix .btn-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
}

.fire-assignment-board .min-h-chips {
    min-height: 3.25rem;
}

/* Applied via metroAsap.setFireAssignmentDragging (JS) — not Blazor state — so the drag is not cancelled.
   Never apply pointer-events:none to the drag source (.is-dragging) — that cancels HTML5 DnD in Chromium. */
.fire-assignment-board--dragging .fire-assignment-person-chip:not(.is-dragging) {
    pointer-events: none;
}

.fire-roster-board--dragging .scheduler-personnel-draggable:not(.is-dragging) {
    pointer-events: none;
}

.fire-assignment-pool,
.fire-assignment-shift-column,
.fire-assignment-station-shift-zone {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.85rem;
    background: var(--bs-light-bg-subtle, #f8f9fa);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    min-height: 8rem;
}

.fire-assignment-station-panel {
    border: 2px solid var(--bs-primary-border-subtle, rgba(13, 110, 253, 0.25));
    border-radius: 0.65rem;
    padding: 1rem;
    background: var(--metro-surface, #fff);
}

.fire-assignment-drop-target--active {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.18);
    background: rgba(var(--bs-primary-rgb), 0.04);
}

.fire-assignment-person-chip {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.45rem 0.65rem;
    background: var(--metro-surface, #fff) !important;
    color: var(--bs-body-color) !important;
    border: 1px solid var(--bs-border-color) !important;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.fire-assignment-person-chip--ghost {
    position: fixed;
    z-index: 10000;
    margin: 0;
    pointer-events: none;
    opacity: 0.92;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    cursor: grabbing;
}

.scheduler-move-confirm-modal {
    z-index: 2110;
}

/* Personnel station-move confirm must sit above .metro-slide-panel (2100). */
.personnel-station-move-confirm-modal {
    z-index: 2110;
}

.personnel-station-move-confirm-backdrop {
    z-index: 2105;
}

.scheduler-move-confirm-backdrop {
    z-index: 2105;
}

.scheduler-assign-confirm-modal,
.scheduler-assign-candidate-modal {
    position: fixed;
    inset: 0;
    z-index: 2120;
}

.scheduler-assign-confirm-backdrop {
    z-index: 2115;
}

.scheduler-detail-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2090;
    background: rgba(15, 23, 42, 0.28);
    pointer-events: auto;
}

.scheduler-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2100;
    width: min(420px, 100vw);
    height: 100%;
    overflow: auto;
    pointer-events: auto;
}

/* Dark mode is owned entirely by metro.css (:root[data-theme="dark"] tokens).
   The old html[data-bs-theme="dark"] overrides here conflicted with those
   tokens (gray #1a1d21 surfaces vs the metro black-based dark theme). */

/* -- Senior portal accessibility modes ------------------------------------ */
.senior-large-text {
    font-size: 1.15rem !important;
}

.senior-large-text h1, .senior-large-text .h1 { font-size: 2.1rem !important; }
.senior-large-text h2, .senior-large-text .h2 { font-size: 1.8rem !important; }
.senior-large-text h3, .senior-large-text .h3 { font-size: 1.55rem !important; }
.senior-large-text h4, .senior-large-text .h4 { font-size: 1.35rem !important; }
.senior-large-text .btn { font-size: 1.05rem !important; padding: .5rem 1rem !important; }
.senior-large-text .form-control, .senior-large-text .form-select { font-size: 1.05rem !important; }
.senior-large-text .small, .senior-large-text small { font-size: 0.95rem !important; }
.senior-large-text .badge { font-size: 0.85rem !important; }

.senior-high-contrast {
    --bs-body-bg: #000 !important;
    --bs-body-color: #fff !important;
    background-color: #000 !important;
    color: #fff !important;
}

.senior-high-contrast .card {
    background-color: #111 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

.senior-high-contrast .btn-primary {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

.senior-high-contrast .btn-outline-secondary {
    color: #fff !important;
    border-color: #fff !important;
}

.senior-high-contrast a { color: #ffe066 !important; }
.senior-high-contrast .text-muted { color: #ccc !important; }
.senior-high-contrast .nav-link { color: #fff !important; }
.senior-high-contrast .nav-link.active { background-color: #444 !important; color: #fff !important; }

/* Shared slide-in panel pattern (used by Personnel, VacationRequests, etc.) */
.metro-slide-panel-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 2000;
}
.metro-slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    z-index: 2100;
    border-radius: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.metro-slide-panel > .card-header,
.metro-slide-panel > .card-footer {
    flex-shrink: 0;
}

.metro-slide-panel > .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .settings-hub-grid,
    .settings-hub-panel .row.g-3 {
        --bs-gutter-y: 0.75rem;
    }

    .settings-hub-grid > [class*="col-"],
    .settings-hub-panel .row.g-3 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .wizard-runner-stepper {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-flow-graph-canvas {
        max-width: 100%;
    }
}
