:root {
    --page: #f5f7fb;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --ink: #182033;
    --muted: #637083;
    --muted-2: #8b96a8;
    --line: #dfe5ee;
    --line-soft: #edf1f6;
    --blue: #1b66b1;
    --blue-dark: #15569a;
    --blue-soft: #e8f1fc;
    --green: #138a43;
    --green-soft: #e9f8ef;
    --shadow: 0 10px 26px rgba(31, 41, 55, 0.08);
    --radius: 6px;
}

/* External references and controlled inbound requests */
.integration-workspace-tabs {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metrics-grid.integration-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.integration-filter-bar {
    flex-wrap: wrap;
}

.integration-filter-bar .filter-search-field {
    flex: 1 1 260px;
}

.integration-filter-panel,
.integration-table-panel,
.external-provider-band {
    margin-bottom: 16px;
}

.external-provider-band {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.external-provider-band .materials-band-header {
    border-bottom: 1px solid var(--line-soft);
    padding: 18px 20px;
}

.compact-command-select {
    width: min(190px, 100%);
    min-width: 150px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-soft);
}

.detail-grid > div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 18px;
}

.detail-grid > div:nth-child(3n) {
    border-right: 0;
}

.detail-grid span,
.detail-grid strong {
    display: block;
    overflow-wrap: anywhere;
}

.detail-grid span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-note,
.integration-resolution-form,
.evidence-details {
    border-top: 1px solid var(--line-soft);
    padding: 18px 20px;
}

.detail-note p {
    margin: 7px 0 0;
    color: var(--muted);
}

.evidence-details summary {
    color: var(--ink);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.evidence-code-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.evidence-code-grid pre {
    max-height: 340px;
    margin: 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f7f9fb;
    padding: 12px;
    color: #26384a;
    font-size: 11px;
    white-space: pre-wrap;
    word-break: break-word;
}

.integration-resolution-form .form-command-bar {
    margin: 16px -20px -18px;
    box-shadow: none;
}

.integration-checkbox-field {
    display: flex;
    align-items: center;
    gap: 9px;
}

.integration-checkbox-field input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
}

.integration-checkbox-field span {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    text-transform: none;
}

.integration-acceptance-picker,
.integration-decision-form,
.mapping-deactivate-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.integration-decision-form {
    grid-template-columns: minmax(180px, 0.45fr) minmax(280px, 1fr) auto;
}

.integration-effect-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-soft);
}

.integration-effect-preview > div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    padding: 16px 20px;
}

.integration-effect-preview > div:last-child {
    border-right: 0;
}

.integration-effect-preview span,
.integration-effect-preview strong {
    display: block;
    overflow-wrap: anywhere;
}

.integration-effect-preview span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.integration-confirm-effect {
    justify-content: space-between;
}

.canonical-select-search {
    margin-bottom: 6px;
}

.integration-blockers ul {
    margin: 8px 0 0;
}

.status-pill.status-received,
.status-pill.status-needs_mapping {
    border-color: #e3ca88;
    background: #fff9e8;
    color: #76520d;
}

.status-pill.status-ready,
.status-pill.status-accepted {
    border-color: #9ec9ad;
    background: #eff9f2;
    color: #176b35;
}

.status-pill.status-rejected,
.status-pill.status-duplicate {
    border-color: #e3b1b1;
    background: #fff5f5;
    color: #a61b1b;
}

@media (max-width: 1100px) {
    .metrics-grid.integration-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid > div,
    .detail-grid > div:nth-child(3n) {
        border-right: 1px solid var(--line-soft);
    }

    .detail-grid > div:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .integration-workspace-tabs {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(142px, 1fr);
        overflow-x: auto;
    }

    .integration-workspace-tabs a,
    .integration-workspace-tabs a:last-child {
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .metrics-grid.integration-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid,
    .evidence-code-grid,
    .integration-acceptance-picker,
    .integration-decision-form,
    .mapping-deactivate-form,
    .integration-effect-preview {
        grid-template-columns: 1fr;
    }

    .detail-grid > div,
    .detail-grid > div:nth-child(2n),
    .detail-grid > div:nth-child(3n),
    .integration-effect-preview > div {
        border-right: 0;
    }

    .integration-effect-preview > div {
        border-bottom: 1px solid var(--line-soft);
    }

    .integration-confirm-effect {
        align-items: stretch;
        flex-direction: column;
    }

    .integration-confirm-effect .primary-button,
    .integration-decision-form .secondary-button,
    .mapping-deactivate-form .secondary-button {
        justify-content: center;
        width: 100%;
    }

    .integration-table-panel .wide-table-wrap table,
    .integration-table-panel .wide-table-wrap tbody,
    .integration-table-panel .wide-table-wrap tr,
    .integration-table-panel .wide-table-wrap td {
        display: block;
        width: 100%;
    }

    .integration-table-panel .wide-table-wrap thead {
        display: none;
    }

    .integration-table-panel .wide-table-wrap tbody tr {
        border-bottom: 1px solid var(--line);
        padding: 9px 12px;
    }

    .integration-table-panel .wide-table-wrap tbody td {
        display: grid;
        grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 7px 0;
        text-align: left;
        white-space: normal;
    }

    .integration-table-panel .wide-table-wrap tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .integration-table-panel .wide-table-wrap .row-action-cell .edit-button {
        justify-content: center;
        width: 100%;
    }

    .module-page-header .compact-command-select {
        width: 100%;
    }

    .integration-filter-bar .filter-search-field {
        flex: 0 0 auto;
    }
}

/* Booking-level Flash/BOR entry */
.bulk-boxoffice-settings,
.bulk-boxoffice-table-panel {
    overflow: visible;
}

.bulk-boxoffice-settings .panel-header,
.bulk-boxoffice-table-panel .panel-header {
    align-items: center;
}

.bulk-boxoffice-settings .panel-header p,
.bulk-boxoffice-table-panel .panel-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.boxoffice-mode-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
}

.boxoffice-mode-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-right: 1px solid var(--line);
    padding: 0 14px;
    color: #485668;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.boxoffice-mode-option:last-child {
    border-right: 0;
}

.boxoffice-mode-option:hover {
    background: #f4f6f8;
}

.boxoffice-mode-option.active {
    background: var(--nmf-deep-cinematic-black);
    color: var(--nmf-warm-ivory);
}

.bulk-boxoffice-alert {
    margin: 16px 20px 0;
}

.bulk-boxoffice-config {
    display: grid;
    grid-template-columns: minmax(220px, 0.35fr) minmax(360px, 1fr);
    gap: 16px;
    padding: 18px 20px 20px;
}

.bulk-boxoffice-config .form-field {
    min-width: 0;
}

.bulk-boxoffice-config .form-field > span {
    display: block;
    margin-bottom: 6px;
    color: #344257;
    font-size: 11px;
    font-weight: 800;
}

.bulk-boxoffice-config .form-control {
    width: 100%;
}

.bulk-boxoffice-note textarea {
    min-height: 64px;
}

.bulk-boxoffice-live-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.bulk-boxoffice-live-summary strong {
    color: var(--ink);
}

.bulk-boxoffice-panel-actions,
.bulk-boxoffice-date-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bulk-flash-copy-all,
.bulk-flash-copy-button {
    min-height: 34px;
    border: 1px solid #9db7a2;
    border-radius: 6px;
    padding: 0 12px;
    color: #234d2e;
    background: #f3faf4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.bulk-flash-copy-all:hover,
.bulk-flash-copy-button:hover {
    border-color: #6b9675;
    background: #e8f5eb;
}

.bulk-flash-copy-all:disabled,
.bulk-flash-copy-button:disabled {
    border-color: #d7dde4;
    color: #8994a3;
    background: #f5f6f8;
    cursor: default;
}

.bulk-flash-copy-all[hidden],
.bulk-flash-copy-button[hidden] {
    display: none;
}

.bulk-flash-copy-all [data-copy-flash-count],
.bulk-flash-copy-button [data-copy-flash-count] {
    min-width: 20px;
    margin-left: 5px;
    border-radius: 999px;
    padding: 2px 6px;
    color: #ffffff;
    background: #397248;
    text-align: center;
}

.bulk-boxoffice-copy-status {
    margin: 14px 20px 0;
    border-left: 3px solid #397248;
    padding: 10px 12px;
    color: #24482c;
    background: #f0f8f2;
    font-size: 12px;
    font-weight: 700;
}

.bulk-boxoffice-copy-status.error {
    border-left-color: #a63c32;
    color: #7e2e27;
    background: #fff3f1;
}

.bulk-boxoffice-table-wrap {
    max-height: min(68vh, 780px);
    overflow: auto;
}

.bulk-boxoffice-table {
    min-width: 1120px;
}

.bulk-boxoffice-table thead th {
    position: sticky;
    z-index: 3;
    top: 0;
    border-bottom: 1px solid #cbd2da;
    background: #f4f5f6;
    box-shadow: 0 1px 0 rgba(16, 24, 32, 0.08);
}

.bulk-boxoffice-table th:nth-child(1) { width: 128px; }
.bulk-boxoffice-table th:nth-child(2) { width: 130px; }
.bulk-boxoffice-table th:nth-child(3) { width: 88px; }
.bulk-boxoffice-table th:nth-child(4) { min-width: 220px; }
.bulk-boxoffice-table th:nth-child(5) { width: 132px; }
.bulk-boxoffice-table th:nth-child(6),
.bulk-boxoffice-table th:nth-child(7) { width: 154px; }
.bulk-boxoffice-table th:nth-child(8) { width: 140px; }

.bulk-boxoffice-table td {
    vertical-align: top;
}

.bulk-boxoffice-table td .form-control {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 7px 9px;
    text-align: right;
}

.bulk-boxoffice-table .field-error {
    display: block;
    max-width: 160px;
    margin-top: 4px;
    white-space: normal;
}

.bulk-boxoffice-date-row th {
    border-top: 1px solid #d8dde3;
    border-bottom: 1px solid #d8dde3;
    padding: 8px 14px;
    background: #eef1f4;
    color: #263246;
    font-size: 11px;
    text-align: left;
    text-transform: uppercase;
}

.bulk-boxoffice-table tr.flash-copy-row td {
    background: #f4faf5;
}

.status-flash-copied {
    border-color: #a6c9ae;
    color: #285f36;
    background: #eaf6ed;
}

.bulk-boxoffice-command-bar {
    position: sticky;
    z-index: 4;
    bottom: 12px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 14px 32px rgba(5, 6, 7, 0.14);
}

@media (max-width: 760px) {
    .bulk-boxoffice-page-header,
    .bulk-boxoffice-settings .panel-header,
    .bulk-boxoffice-table-panel .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-boxoffice-panel-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-flash-copy-all {
        justify-content: center;
        width: 100%;
    }

    .bulk-boxoffice-date-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .boxoffice-mode-switch,
    .bulk-boxoffice-config {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .boxoffice-mode-option {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .boxoffice-mode-option:last-child {
        border-bottom: 0;
    }

    .bulk-boxoffice-config {
        gap: 12px;
        padding: 14px;
    }

    .bulk-boxoffice-command-bar {
        bottom: 6px;
    }

    .bulk-boxoffice-command-bar .primary-button,
    .bulk-boxoffice-command-bar .secondary-button {
        justify-content: center;
        width: 100%;
    }
}

/* Contract Hub */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.sidebar-subheading {
    margin-top: 18px !important;
}

.contract-metrics-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.contract-filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(170px, 220px) minmax(190px, 240px) auto auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    border: 1px solid rgba(16, 24, 32, 0.12);
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(5, 6, 7, 0.06);
}

.party-filter-bar {
    grid-template-columns: minmax(240px, 1fr) auto auto;
}

.contract-search-field {
    position: relative;
}

.contract-search-field svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 11px;
    width: 16px;
    height: 16px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.contract-search-field .form-control {
    width: 100%;
    padding-left: 36px;
}

.table-primary-link {
    color: #704d0b;
    font-weight: 800;
}

.table-primary-link:hover {
    text-decoration: underline;
}

.contract-table td:nth-child(2) {
    min-width: 230px;
}

.contract-table td:nth-child(3) {
    min-width: 180px;
}

.due-date-overdue,
.row-overdue td:first-child {
    color: #a61b1b;
}

.row-overdue td {
    background: #fff7f5;
}

.status-pill.status-draft,
.status-pill.status-archived,
.status-pill.status-dismissed {
    border-color: #d5dbe4;
    color: #566172;
    background: #f5f7fa;
}

.status-pill.status-generated,
.status-pill.status-sent,
.status-pill.status-open {
    border-color: #e3c777;
    color: #76520d;
    background: #fff9e8;
}

.status-pill.status-signed,
.status-pill.status-active,
.status-pill.status-completed {
    border-color: #aad2b6;
    color: #176b35;
    background: #f1fbf4;
}

.status-pill.status-expired,
.status-pill.status-terminated {
    border-color: #efb4b4;
    color: #a61b1b;
    background: #fff5f5;
}

.contract-title-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contract-title-line h1 {
    margin: 0;
}

.contract-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
    align-items: start;
    gap: 16px;
}

.contract-detail-main,
.contract-detail-side {
    display: grid;
    min-width: 0;
    gap: 16px;
}

.contract-detail-layout .panel {
    min-width: 0;
    overflow: hidden;
}

.contract-metadata {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.contract-metadata div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 16px;
}

.contract-metadata dt,
.contract-metadata dd {
    margin: 0;
}

.contract-metadata dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.contract-metadata dd {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.hash-cell {
    max-width: 120px;
    color: var(--muted);
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
}

.icon-text-button,
.icon-only-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e0e9;
    border-radius: 6px;
    color: #4f390e;
    background: #ffffff;
    cursor: pointer;
}

.icon-text-button {
    min-height: 34px;
    gap: 6px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
}

.icon-only-button {
    width: 34px;
    height: 34px;
    padding: 0;
}

.icon-text-button:hover,
.icon-only-button:hover {
    border-color: var(--nmf-cinematic-gold);
    background: #fffaf0;
}

.contract-inline-tool {
    border-top: 1px solid var(--line-soft);
}

.contract-inline-tool summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    color: #5e420c;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
}

.contract-inline-tool summary::-webkit-details-marker {
    display: none;
}

.contract-inline-tool summary svg {
    width: 16px;
    height: 16px;
}

.inline-tool-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    align-items: end;
    gap: 14px;
    border-top: 1px solid var(--line-soft);
    padding: 16px;
    background: #fbfcfe;
}

.inline-tool-form .primary-button {
    justify-self: start;
}

.related-record-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.related-record-groups > div {
    min-height: 76px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 13px 16px;
}

.related-record-groups h3 {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 11px;
}

.record-chip {
    display: inline-block;
    margin: 0 5px 5px 0;
    border: 1px solid #dfd1a5;
    border-radius: 6px;
    padding: 4px 7px;
    color: #60440d;
    background: #fffaf0;
    font-size: 11px;
    font-weight: 700;
}

.empty-inline {
    color: var(--muted);
    font-size: 12px;
}

.contract-link-list {
    display: grid;
}

.contract-link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 16px;
}

.contract-link-list a:hover {
    background: #fffaf0;
}

.contract-link-list strong,
.contract-link-list small {
    display: block;
}

.contract-link-list small {
    margin-top: 3px;
    color: var(--muted);
}

.contract-notes {
    padding: 16px;
    color: #334155;
    font-size: 13px;
    line-height: 1.65;
}

.audit-timeline {
    margin: 0;
    padding: 8px 16px 14px;
    list-style: none;
}

.audit-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
}

.audit-timeline li:not(:last-child)::before {
    position: absolute;
    top: 25px;
    bottom: -9px;
    left: 6px;
    width: 1px;
    background: #dfe4ea;
    content: "";
}

.audit-marker {
    width: 13px;
    height: 13px;
    margin-top: 3px;
    border: 3px solid #f5e6b9;
    border-radius: 50%;
    background: #9b6d14;
}

.audit-timeline strong,
.audit-timeline p,
.audit-timeline small {
    display: block;
    margin: 0;
}

.audit-timeline strong {
    color: var(--ink);
    font-size: 12px;
}

.audit-timeline p {
    margin-top: 2px;
    color: #526071;
    font-size: 12px;
}

.audit-timeline small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.side-form,
.party-summary,
.side-readonly {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.side-form .primary-button,
.party-summary .secondary-button {
    width: 100%;
}

.reminder-stack {
    display: grid;
}

.reminder-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px;
}

.reminder-item.is-overdue {
    background: #fff7f5;
}

.reminder-date {
    display: grid;
    min-height: 45px;
    align-content: center;
    border: 1px solid #e3c777;
    border-radius: 6px;
    text-align: center;
    background: #fff9e8;
}

.is-overdue .reminder-date {
    border-color: #efb4b4;
    color: #a61b1b;
    background: #fff5f5;
}

.reminder-date strong,
.reminder-date span {
    display: block;
}

.reminder-date strong {
    font-size: 13px;
}

.reminder-date span {
    font-size: 10px;
}

.reminder-item > div:nth-child(2) strong {
    display: block;
    color: var(--ink);
    font-size: 12px;
}

.reminder-item p,
.reminder-item small {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.side-inline-tool .side-form {
    border-top: 1px solid var(--line-soft);
    background: #fbfcfe;
}

.side-empty-state {
    padding: 24px 12px;
}

.party-summary > strong,
.party-summary > span,
.party-summary > a:not(.secondary-button) {
    overflow-wrap: anywhere;
}

.party-summary > strong {
    color: var(--ink);
    font-size: 14px;
}

.party-summary > span,
.party-summary > a:not(.secondary-button) {
    color: var(--muted);
    font-size: 12px;
}

.contract-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    border-bottom: 1px solid #d8dee7;
}

.contract-tabs a {
    border-bottom: 3px solid transparent;
    padding: 10px 14px;
    color: #5f6b7a;
    font-size: 13px;
    font-weight: 700;
}

.contract-tabs a.active {
    border-bottom-color: var(--nmf-cinematic-gold);
    color: #5e420c;
}

.row-action-form {
    display: inline-flex;
    margin: 0;
}

.compact-empty-state {
    padding: 30px 16px;
}

.dashboard-reminder-panel {
    margin-top: 16px;
}

.page-kicker {
    margin: 0 0 4px !important;
    color: #8a6112 !important;
    font-size: 11px !important;
    font-weight: 800;
    text-transform: uppercase;
}

.generation-version-bar {
    display: grid;
    grid-template-columns: minmax(260px, 520px) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 16px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.generation-version-bar .form-field {
    margin: 0;
}

.generation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    align-items: start;
    gap: 16px;
}

.generation-fields {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.generation-section {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
}

.generation-section > summary {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    color: var(--ink);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    list-style: none;
}

.generation-section > summary::-webkit-details-marker {
    display: none;
}

.generation-section[open] > summary {
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}

.generation-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    padding: 16px;
}

.generation-budget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.generation-field {
    min-width: 0;
    margin: 0;
}

.generation-field textarea {
    resize: vertical;
}

.generation-checkbox-field {
    display: flex;
    min-height: 42px;
    align-items: center;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fbfcfe;
}

.checkbox-control {
    display: grid;
    width: 100%;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.checkbox-control .form-checkbox {
    width: 17px;
    height: 17px;
    margin: 0;
}

.required-mark {
    margin-left: 3px;
    color: #b42318;
}

.generation-field.has-error .form-control,
.generation-checkbox-field.has-error {
    border-color: #d92d20;
}

.field-error,
.generation-error {
    display: block;
    margin-top: 4px;
    color: #b42318 !important;
    font-size: 11px;
}

.form-error-summary {
    margin-bottom: 14px;
    border-left: 3px solid #d92d20;
    padding: 10px 12px;
    color: #912018;
    background: #fff5f4;
    font-size: 12px;
}

.form-error-summary ul {
    margin: 0;
    padding-left: 18px;
}

.generation-summary {
    position: sticky;
    top: 16px;
}

.generation-template-meta {
    display: grid;
    margin: 0;
}

.generation-template-meta div {
    border-bottom: 1px solid var(--line-soft);
    padding: 10px 14px;
}

.generation-template-meta dt,
.generation-template-meta dd {
    margin: 0;
}

.generation-template-meta dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.generation-template-meta dd {
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.generation-submit {
    width: calc(100% - 28px);
    min-height: 42px;
    gap: 8px;
    margin: 14px;
}

.generation-submit svg,
.file-format-link svg {
    width: 17px;
    height: 17px;
}

.generation-status-completed {
    border-color: #aad2b6;
    color: #176b35;
    background: #f1fbf4;
}

.generation-status-pending {
    border-color: #e3c777;
    color: #76520d;
    background: #fff9e8;
}

.generation-status-failed {
    border-color: #efb4b4;
    color: #a61b1b;
    background: #fff5f5;
}

.file-format-link {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    margin: 2px 4px 2px 0;
    border: 1px solid #d8e0e9;
    border-radius: 5px;
    padding: 0 7px;
    color: #5e420c;
    background: #ffffff;
    font-size: 10px;
    font-weight: 800;
}

.operational-metadata {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.signed-copy-form ul,
.rights-selector ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.signed-copy-form > .form-field:last-of-type,
.related-document-form > .form-field:last-of-type {
    grid-column: 1 / -1;
}

.prefill-warning-list {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.prefill-warning-list > div {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    border-left: 3px solid #c48717;
    padding: 9px 11px;
    color: #6f4b0a;
    background: #fff9e8;
    font-size: 12px;
}

.prefill-warning-list svg {
    width: 16px;
    height: 16px;
}

.prefill-badge {
    max-width: 52%;
    overflow: hidden;
    border: 1px solid #b9d7dd;
    border-radius: 5px;
    padding: 2px 5px;
    color: #176579 !important;
    background: #eef9fb;
    font-size: 9px !important;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.field-help {
    color: var(--muted) !important;
    font-size: 10px !important;
}

.representative-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.representative-row {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0;
    background: #fbfcfe;
}

.representative-row legend {
    margin-left: 10px;
    padding: 0 5px;
    color: #516071;
    font-size: 11px;
    font-weight: 800;
}

.representative-row .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
}

.inline-checkbox-field {
    align-content: center;
}

.representative-delete {
    border-top: 1px solid var(--line-soft);
    padding-top: 8px;
}

.operational-terms-form {
    max-width: 1120px;
}

.rights-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 16px;
}

.rights-choice {
    display: grid;
    min-height: 40px;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    color: #354155;
    background: #fbfcfe;
    font-size: 12px;
    font-weight: 700;
}

.rights-choice input {
    width: 17px;
    height: 17px;
    margin: 0;
}

.rights-meta-grid {
    border-top: 1px solid var(--line-soft);
}

.template-filter-bar {
    display: grid;
    grid-template-columns: minmax(190px, 280px) auto auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 16px;
}

.template-list-panel td strong,
.template-list-panel td small {
    display: block;
}

.template-list-panel td small {
    margin-top: 3px;
    color: var(--muted);
}

.template-list-panel code,
.template-detail-grid code {
    overflow-wrap: anywhere;
    color: #4e3a12;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
}

.template-status-draft,
.template-status-retired {
    border-color: #d5dbe4;
    color: #566172;
    background: #f5f7fa;
}

.template-status-in_review {
    border-color: #e3c777;
    color: #76520d;
    background: #fff9e8;
}

.template-status-approved {
    border-color: #9fcbd4;
    color: #176579;
    background: #eef9fb;
}

.template-status-published {
    border-color: #aad2b6;
    color: #176b35;
    background: #f1fbf4;
}

.template-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
    align-items: start;
    gap: 16px;
}

.template-detail-main {
    display: grid;
    min-width: 0;
    gap: 16px;
}

.template-actions-panel {
    position: sticky;
    top: 16px;
}

.template-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.template-detail-grid > div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 13px 15px;
}

.template-detail-grid .detail-wide {
    grid-column: 1 / -1;
}

.template-detail-grid dt,
.template-detail-grid dd {
    margin: 0;
}

.template-detail-grid dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.template-detail-grid dd {
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.audit-list {
    display: grid;
    padding: 8px 16px 14px;
}

.audit-list article {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--line-soft);
    padding: 11px 0;
}

.audit-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #b9d7dd;
    border-radius: 6px;
    color: #176579;
    background: #eef9fb;
}

.audit-icon svg {
    width: 15px;
    height: 15px;
}

.audit-list strong,
.audit-list p,
.audit-list small {
    display: block;
    margin: 0;
}

.audit-list p {
    margin-top: 3px;
    color: #526071;
    font-size: 12px;
}

.audit-list small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.template-action-buttons {
    display: grid;
    gap: 8px;
}

.template-action-buttons .primary-button,
.template-action-buttons .secondary-button {
    width: 100%;
}

@media (max-width: 1180px) {
    .contract-metrics-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .contract-filter-bar {
        grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, 200px)) auto;
    }

    .contract-filter-bar .secondary-button {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .contract-detail-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .contract-metadata {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .generation-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .representative-grid,
    .rights-selector,
    .template-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .contract-detail-layout {
        grid-template-columns: 1fr;
    }

    .contract-detail-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contract-detail-side .contract-side-panel:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .generation-layout {
        grid-template-columns: 1fr;
    }

    .generation-summary {
        position: static;
        grid-row: 1;
    }

    .template-detail-layout {
        grid-template-columns: 1fr;
    }

    .template-actions-panel {
        position: static;
        grid-row: 1;
    }
}

@media (max-width: 760px) {
    .contract-metrics-grid,
    .contract-filter-bar,
    .party-filter-bar,
    .inline-tool-form,
    .contract-metadata,
    .related-record-groups,
    .contract-detail-side,
    .operational-metadata,
    .representative-grid,
    .rights-selector,
    .template-filter-bar,
    .template-detail-grid {
        grid-template-columns: 1fr;
    }

    .template-filter-bar .secondary-button {
        width: 100%;
    }

    .template-list-panel .table-wrap {
        overflow: visible;
    }

    .template-list-panel .module-table,
    .template-list-panel .module-table tbody,
    .template-list-panel .module-table tr,
    .template-list-panel .module-table td {
        display: block;
        width: 100%;
    }

    .template-list-panel .module-table thead {
        display: none;
    }

    .template-list-panel .module-table tr {
        border-bottom: 1px solid var(--line-soft);
        padding: 8px 0;
    }

    .template-list-panel .module-table td {
        display: grid;
        min-width: 0;
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 7px 14px;
        overflow-wrap: anywhere;
    }

    .template-list-panel .module-table td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
    }

    .template-list-panel .module-table td > small {
        grid-column: 2;
    }

    .template-list-panel .module-table .status-pill {
        justify-self: start;
    }

    .template-list-panel .module-table .row-action {
        display: block;
        text-align: right;
    }

    .template-list-panel .module-table .row-action::before {
        display: none;
    }

    .generation-version-bar,
    .generation-field-grid,
    .generation-budget-grid {
        grid-template-columns: 1fr;
    }

    .generation-version-bar .secondary-button {
        width: 100%;
    }

    .generation-section > summary {
        min-height: 48px;
        padding: 0 12px;
    }

    .generation-field-grid {
        padding: 12px;
    }

    .contract-filter-bar .secondary-button,
    .contract-filter-bar .primary-button {
        width: 100%;
    }

    .contract-title-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .contract-detail-side .contract-side-panel:nth-child(2) {
        grid-column: auto;
        grid-row: auto;
    }

    .contract-metadata div,
    .related-record-groups > div {
        border-right: 0;
    }

    .contract-tabs {
        overflow-x: auto;
    }

    .contract-tabs a {
        flex: 0 0 auto;
    }

    .reminder-item {
        grid-template-columns: 46px minmax(0, 1fr) auto;
    }

    .contract-table,
    .contract-table tbody,
    .contract-table tr,
    .contract-table td {
        display: block;
        width: 100%;
    }

    .contract-table thead {
        display: none;
    }

    .contract-table tr {
        border-bottom: 1px solid var(--line-soft);
        padding: 8px 0;
    }

    .contract-table td,
    .contract-table td:nth-child(2),
    .contract-table td:nth-child(3) {
        display: grid;
        min-width: 0;
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 7px 14px;
    }

    .contract-table td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
    }

    .contract-table td > small {
        grid-column: 2;
    }

    .contract-table .status-pill {
        justify-self: start;
    }

    .contract-table .row-action-cell {
        display: block;
        text-align: left;
    }

    .contract-table .row-action-cell::before {
        display: none;
    }

    .contract-table .edit-button {
        width: 100%;
    }
}

/* Physical inventory and shipments */
.workspace-tabs.fulfillment-workspace-tabs {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
}

.metrics-grid.inventory-metrics {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.metrics-grid.inventory-metrics .metric {
    background: #ffffff;
}

.inventory-filter-panel {
    margin-bottom: 16px;
}

.inventory-filter-bar {
    flex-wrap: wrap;
    border-bottom: 0;
}

.inventory-filter-bar label {
    min-width: 158px;
    flex: 1 1 158px;
}

.inventory-filter-bar label:nth-of-type(2),
.inventory-filter-bar label:nth-of-type(3) {
    flex-basis: 220px;
}

.materials-band {
    margin-bottom: 22px;
}

.materials-band-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
    padding: 0 2px 10px;
}

.materials-band-header span {
    color: #76520d;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.materials-band-header h2,
.physical-material-entry h2 {
    margin: 3px 0 0;
    font-size: 18px;
}

.materials-band-header p,
.physical-material-entry p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.material-grid.material-grid-digital {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.material-grid.material-grid-technical {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.physical-material-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
}

.wizard-stepper.shipment-wizard-stepper {
    grid-template-columns: repeat(4, minmax(126px, 1fr));
}

.shipment-lines-editor {
    display: grid;
    margin: 20px 24px 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.shipment-line-head,
.shipment-line-row {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(220px, 1.7fr) minmax(100px, 0.6fr) minmax(120px, 0.7fr) minmax(180px, 1.1fr) minmax(94px, 0.45fr);
    align-items: start;
}

.shipment-line-head {
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    background: var(--panel-soft);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.shipment-line-head span,
.shipment-line-row > label,
.shipment-line-na {
    min-width: 0;
    padding: 10px;
}

.shipment-line-head span,
.shipment-line-row > label,
.shipment-line-row > .shipment-line-na {
    border-right: 1px solid var(--line-soft);
}

.shipment-line-head span:last-child,
.shipment-line-row > label:last-child {
    border-right: 0;
}

.shipment-line-row {
    border-bottom: 1px solid var(--line-soft);
}

.shipment-line-row:last-child {
    border-bottom: 0;
}

.shipment-line-row label {
    display: grid;
    gap: 5px;
}

.shipment-line-row label > span {
    display: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.shipment-line-delete {
    justify-items: center;
}

.shipment-line-delete .form-checkbox {
    margin-top: 8px;
}

.shipment-line-na {
    color: var(--muted);
    text-align: center;
}

.shipment-line-error {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-soft);
    padding: 8px 10px;
}

.shipment-line-add {
    margin: 0 24px 20px;
}

.review-summary-grid.shipment-review-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shipment-detail-grid,
.shipment-evidence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shipment-detail-grid > div,
.shipment-evidence-grid > div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 16px;
}

.shipment-detail-grid span,
.shipment-detail-grid strong,
.shipment-evidence-grid span,
.shipment-evidence-grid strong {
    display: block;
    overflow-wrap: anywhere;
}

.shipment-detail-grid span,
.shipment-evidence-grid span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.shipment-detail-grid strong,
.shipment-evidence-grid strong {
    margin-top: 4px;
    font-size: 13px;
}

.detail-note {
    padding: 14px 16px;
}

.detail-note p {
    margin: 5px 0 0;
    color: var(--muted);
}

.shipment-transition-form {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(190px, 1fr) minmax(240px, 1.4fr) auto;
    align-items: end;
    border-radius: 0;
    box-shadow: none;
}

.shipment-transition-form .form-field {
    min-width: 0;
}

.effect-grid.shipment-lifecycle-effects {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.audit-row {
    display: grid;
    grid-template-columns: 145px minmax(180px, 0.7fr) minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 10px 0;
}

.audit-row:last-child {
    border-bottom: 0;
}

.audit-row span,
.audit-row small {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 1100px) {
    .metrics-grid.inventory-metrics {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }

    .shipment-transition-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shipment-transition-form .primary-button {
        align-self: stretch;
    }

    .material-grid.material-grid-digital {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .workspace-tabs.fulfillment-workspace-tabs {
        grid-template-columns: repeat(5, 160px);
        overflow-x: auto;
    }

    .metrics-grid.inventory-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-filter-bar .form-control {
        height: 44px;
        min-height: 44px;
        padding: 0 12px;
    }

    .registry-filter-bar.inventory-filter-bar label {
        flex: 0 0 auto;
    }

    .inventory-table-panel .wide-table-wrap {
        overflow: visible;
    }

    .inventory-table-panel table,
    .inventory-table-panel tbody,
    .inventory-table-panel tr,
    .inventory-table-panel td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .inventory-table-panel thead {
        display: none;
    }

    .inventory-table-panel tr {
        border-bottom: 1px solid var(--line);
        padding: 8px 0;
    }

    .inventory-table-panel tr:last-child {
        border-bottom: 0;
    }

    .inventory-table-panel td {
        display: grid;
        grid-template-columns: minmax(94px, 0.42fr) minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 6px 14px;
        overflow-wrap: anywhere;
    }

    .inventory-table-panel td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .inventory-table-panel td.row-action-cell,
    .inventory-table-panel td[colspan] {
        display: block;
    }

    .inventory-table-panel td.row-action-cell::before,
    .inventory-table-panel td[colspan]::before {
        display: none;
    }

    .inventory-table-panel .row-action-cell .edit-button {
        width: 100%;
    }

    .review-summary-grid.shipment-review-summary,
    .shipment-detail-grid,
    .shipment-evidence-grid,
    .effect-grid.shipment-lifecycle-effects {
        grid-template-columns: 1fr;
    }

    .wizard-stepper.shipment-wizard-stepper {
        grid-template-columns: repeat(4, 132px);
    }

    .shipment-lines-editor {
        margin-right: 14px;
        margin-left: 14px;
        overflow: visible;
        border: 0;
        border-radius: 0;
        gap: 10px;
    }

    .shipment-line-head {
        display: none;
    }

    .shipment-line-row {
        grid-template-columns: 1fr;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: #ffffff;
    }

    .shipment-line-row > label,
    .shipment-line-row > .shipment-line-na {
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .shipment-line-row > label:last-of-type {
        border-bottom: 0;
    }

    .shipment-line-row label > span {
        display: block;
    }

    .shipment-line-delete {
        justify-items: start;
    }

    .shipment-line-delete .form-checkbox {
        margin-top: 0;
    }

    .shipment-line-add {
        margin-right: 14px;
        margin-left: 14px;
    }

    .shipment-line-add .secondary-button,
    .shipment-transition-form .primary-button {
        width: 100%;
    }

    .shipment-transition-form,
    .audit-row {
        grid-template-columns: 1fr;
    }

    .material-grid.material-grid-digital,
    .material-grid.material-grid-technical {
        grid-template-columns: 1fr;
    }

    .materials-band-header,
    .physical-material-entry {
        align-items: stretch;
        flex-direction: column;
    }

    .physical-material-entry .primary-button {
        width: 100%;
    }

    .audit-row {
        gap: 4px;
    }
}

/* Rights and royalties */
.workspace-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.workspace-tabs a {
    min-width: 0;
    padding: 12px 16px;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.workspace-tabs a:last-child {
    border-right: 0;
}

.workspace-tabs a.active {
    background: #fff8dd;
    box-shadow: inset 0 -3px 0 var(--gold);
    color: #5d430f;
}

.royalty-filter-bar {
    margin-bottom: 16px;
}

.royalty-filter-bar label {
    min-width: min(360px, 100%);
}

.status-danger-text {
    color: #a9362c !important;
    font-weight: 800;
}

.metric-status-text {
    font-size: 17px !important;
    line-height: 1.15;
}

.data-form-panel {
    padding: 22px;
}

.data-form-panel .form-actions {
    margin-top: 18px;
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.attention-grid > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 18px;
    border-right: 1px solid var(--line);
}

.attention-grid > div:last-child {
    border-right: 0;
}

.attention-grid span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.attention-grid strong {
    font-size: 24px;
}

.compact-action-form {
    align-items: end;
    padding: 18px 20px;
}

.compact-action-form.form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.compact-action-form .form-actions {
    padding: 0;
    border: 0;
}

.inline-audit-action {
    position: relative;
    min-width: 86px;
}

.inline-audit-action summary {
    color: #7a2d28;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    list-style: none;
}

.inline-audit-action form {
    display: grid;
    min-width: 220px;
    gap: 7px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #d7b8b4;
    border-radius: 6px;
    background: #fffafa;
}

.inline-audit-action .form-control {
    min-width: 0;
    font-size: 12px;
}

.danger-zone-panel {
    border-color: #dfc1bd;
}

.danger-zone-panel .compact-action-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.statement-command-panel .header-actions {
    justify-content: flex-start;
    padding: 18px 20px;
    border-top: 1px solid var(--line);
}

.inline-command-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-command-form .form-control {
    min-width: 260px;
}

.calculation-bridge {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--line);
}

.calculation-bridge > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 15px 18px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.calculation-bridge > div:nth-child(4n) {
    border-right: 0;
}

.calculation-bridge dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.calculation-bridge dd {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.calculation-bridge .calculation-total {
    background: #edf8f0;
    color: #145f31;
}

.wizard-stepper.finance-wizard-stepper.royalty-wizard-stepper {
    grid-template-columns: repeat(5, minmax(142px, 1fr));
}

@media (max-width: 1100px) {
    .attention-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .attention-grid > div:nth-child(3) {
        border-right: 0;
    }

    .calculation-bridge {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calculation-bridge > div:nth-child(2n) {
        border-right: 0;
    }

    .wizard-stepper.finance-wizard-stepper.royalty-wizard-stepper {
        grid-template-columns: repeat(3, minmax(142px, 1fr));
    }
}

@media (max-width: 760px) {
    .workspace-tabs {
        grid-template-columns: 1fr;
    }

    .workspace-tabs a,
    .workspace-tabs a:last-child {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .workspace-tabs a:last-child {
        border-bottom: 0;
    }

    .royalty-filter-bar label {
        min-width: 0;
        width: 100%;
    }

    .attention-grid,
    .calculation-bridge,
    .compact-action-form.form-grid,
    .danger-zone-panel .compact-action-form {
        grid-template-columns: 1fr;
    }

    .attention-grid > div,
    .attention-grid > div:nth-child(3),
    .calculation-bridge > div,
    .calculation-bridge > div:nth-child(2n) {
        border-right: 0;
    }

    .inline-command-form {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .inline-command-form .form-control {
        min-width: 0;
        width: 100%;
    }

    .wizard-stepper.finance-wizard-stepper.royalty-wizard-stepper {
        grid-template-columns: repeat(5, 132px);
    }
}

/* Modern operations UI refresh */
:root {
    --page: #f4f7fb;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --ink: #142033;
    --muted: #667389;
    --muted-2: #96a1b2;
    --line: #dce3ed;
    --line-soft: #edf2f7;
    --blue: #1769e0;
    --blue-dark: #0f4fa8;
    --blue-soft: #eaf2ff;
    --green: #159447;
    --green-soft: #e8f8ee;
    --amber: #d98000;
    --amber-soft: #fff4df;
    --shadow: 0 14px 38px rgba(20, 32, 51, 0.08);
    --shadow-soft: 0 1px 2px rgba(20, 32, 51, 0.06);
    --radius: 8px;
}

body {
    background: linear-gradient(180deg, #f7faff 0%, #f1f5fa 46%, #eef3f8 100%);
    color: var(--ink);
}

.app-frame {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--page);
    box-shadow: none;
}

.app-frame .global-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-template-columns: 36px 230px minmax(260px, 1fr) auto;
    height: 60px;
    border-bottom: 1px solid rgba(220, 227, 237, 0.9);
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.app-frame .brand strong {
    font-size: 15px;
    letter-spacing: 0;
}

.brand-mark {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background:
        linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.78) 47% 58%, transparent 60%),
        linear-gradient(135deg, #0f766e, #1769e0 62%, #6b4fe0);
    box-shadow: 0 6px 16px rgba(23, 105, 224, 0.22);
}

.search-box {
    justify-self: stretch;
    width: min(100%, 640px);
    height: 38px;
    border-color: #d8e0eb;
    border-radius: 7px;
    padding: 0 12px;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-box:focus-within {
    border-color: #a9c7f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.1);
}

.notification-button,
.app-launcher {
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 7px;
}

.notification-button:hover,
.app-launcher:hover,
.logout-button:hover {
    border-color: #d8e0eb;
    background: #f8fafc;
}

.notification-button span {
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    background: #ef4444;
    font-size: 9px;
}

.user-menu {
    height: 36px;
    border-color: #d8e0eb;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.logout-button,
.secondary-button,
.primary-button,
.view-button,
.edit-button {
    border-radius: 7px;
}

.app-body {
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: calc(100vh - 60px);
}

.sidebar {
    position: static;
    align-self: stretch;
    height: auto;
    overflow: visible;
    padding: 22px 12px 14px;
    border-right: 0;
    background: linear-gradient(180deg, #11243b 0%, #0e2135 52%, #0b1a2a 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.sidebar-section {
    gap: 5px;
}

.sidebar-section p {
    margin: 12px 8px 8px;
    color: #9fb1c7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.side-item {
    min-height: 40px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 0 10px;
    color: #e6edf7;
    font-size: 13px;
    font-weight: 650;
}

.side-item svg {
    width: 18px;
    height: 18px;
    color: #c6d3e4;
}

.side-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.side-item.active,
.side-item.active-soft {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(23, 105, 224, 0.94), rgba(42, 91, 193, 0.88));
    box-shadow: 0 10px 26px rgba(12, 39, 86, 0.28);
}

.side-item.active svg,
.side-item.active-soft svg {
    color: #ffffff;
}

.side-item.active::before,
.side-item.active-soft::before {
    position: absolute;
    left: -12px;
    width: 3px;
    height: 24px;
    border-radius: 999px;
    background: #6ee7ff;
    content: "";
}

.side-item.disabled {
    color: #718298;
}

.side-item.disabled svg {
    color: #718298;
}

.side-item.disabled:hover {
    border-color: transparent;
    background: transparent;
}

.side-item small {
    border-color: rgba(255, 255, 255, 0.12);
    color: #8fa1b7;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-divider {
    margin: 18px 8px;
    background: rgba(255, 255, 255, 0.1);
}

.collapse-button {
    min-height: 44px;
    margin: auto 2px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #d4deeb;
    font-size: 12px;
}

.collapse-button svg {
    color: #9fb1c7;
}

.content-shell {
    min-height: calc(100vh - 60px);
    background:
        radial-gradient(circle at 78% 0%, rgba(255, 255, 255, 0.95) 0, rgba(244, 247, 251, 0) 360px),
        var(--page);
}

.command-ribbon {
    position: sticky;
    top: 60px;
    z-index: 20;
    align-items: center;
    min-height: 76px;
    gap: 10px;
    border-bottom: 1px solid rgba(220, 227, 237, 0.9);
    padding: 14px 26px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
}

.command-button {
    display: inline-flex;
    min-width: auto;
    height: 42px;
    grid-template-rows: none;
    gap: 8px;
    border-color: #dbe4ee;
    border-radius: 7px;
    padding: 0 14px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    color: #17243a;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.command-button svg {
    width: 18px;
    height: 18px;
    color: var(--blue);
    stroke-width: 2;
}

.command-button:hover {
    border-color: #a9c7f6;
    background: #f8fbff;
    box-shadow: 0 8px 18px rgba(23, 105, 224, 0.08);
}

.command-button[disabled] {
    background: #f5f7fa;
    box-shadow: none;
}

.page {
    width: min(100%, 1440px);
    padding: 24px 26px 34px;
}

.workspace-header {
    min-height: 52px;
    margin-bottom: 18px;
    gap: 16px;
}

.workspace-header h1 {
    color: #111b2e;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
}

.workspace-header p {
    color: #6b778d;
    font-size: 13px;
}

.metrics-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric {
    min-height: 96px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    border-color: #dde5ef;
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--shadow-soft);
}

.metric:nth-child(2) svg {
    color: #159447;
    background: var(--green-soft);
}

.metric:nth-child(3) svg {
    color: #d98000;
    background: var(--amber-soft);
}

.metric:nth-child(4) svg {
    color: #7c3aed;
    background: #f3ebff;
}

.metric:nth-child(5) svg {
    color: #0f766e;
    background: #e6f6f3;
}

.metric svg {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    padding: 9px;
}

.metric span {
    color: #4e5b70;
    font-size: 12px;
}

.metric strong {
    margin: 5px 0 0;
    font-size: 30px;
    font-weight: 800;
}

.metric small {
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.workspace-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 18px;
}

.panel,
.form-card {
    border-color: #dce4ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.panel-header,
.form-card-header {
    min-height: 58px;
    border-bottom-color: #e8edf4;
    padding: 14px 16px;
}

.panel-header h2,
.form-card-header h2 {
    color: #17243a;
    font-size: 16px;
    font-weight: 800;
}

.view-button,
.edit-button {
    min-height: 32px;
    border-color: #dbe4ee;
    background: #ffffff;
    color: #1c2c45;
    font-size: 12px;
}

table {
    background: #ffffff;
}

th,
td {
    padding: 12px 16px;
}

th {
    color: #5f6d82;
    background: #f7f9fc;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
}

td {
    color: #1c2c45;
    font-size: 13px;
}

tbody tr:hover td {
    background: #fbfdff;
}

td small {
    color: #6e7b90;
    font-size: 11px;
}

.film-thumb {
    width: 34px;
    height: 46px;
    border-radius: 5px;
    background: linear-gradient(145deg, #10233b, #1769e0 58%, #ff9f1a);
    box-shadow: 0 8px 16px rgba(20, 32, 51, 0.14);
}

.film-cell strong {
    font-size: 13px;
}

.status-pill {
    min-height: 24px;
    border-radius: 7px;
    padding: 0 9px;
    font-size: 11px;
}

.table-footer {
    min-height: 50px;
    padding: 10px 16px;
    font-size: 12px;
}

.pager button,
.row-more {
    border-radius: 7px;
}

.action-list {
    gap: 10px;
    padding: 12px;
}

.action-tile,
.report-link,
.compact-row,
.property-card {
    border-color: #dfe6ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.action-tile {
    min-height: 62px;
    grid-template-columns: 38px minmax(0, 1fr) 14px;
    padding: 10px 11px;
}

.action-tile:hover,
.report-link:hover,
.compact-row:hover,
.property-card:hover {
    border-color: #a9c7f6;
    background: #fbfdff;
}

.action-tile > svg:first-child,
.report-link > svg:first-child,
.compact-row > svg:first-child,
.property-card > svg:first-child {
    border-radius: 8px;
}

.action-tile strong,
.report-link span {
    font-size: 13px;
}

.action-tile small {
    color: #6b778d;
    font-size: 11px;
}

.module-form {
    gap: 16px;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 16px 18px;
    padding: 18px;
}

.form-field {
    gap: 7px;
}

.form-field span {
    color: #34445c;
    font-size: 12px;
}

.form-control {
    min-height: 40px;
    border-color: #d9e1ec;
    border-radius: 7px;
    padding: 8px 10px;
    color: #17243a;
    background: #ffffff;
    font-size: 13px;
}

.form-control:hover {
    border-color: #c5d1df;
}

.form-control:focus {
    border-color: #8ab8f8;
    box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.11);
}

.form-choice-list,
.selected-token-bar,
.creator-option-list {
    border-color: #d9e1ec;
    border-radius: 7px;
}

.selected-token {
    border-radius: 999px;
    background: #eaf2ff;
}

.creator-option {
    border-radius: 6px;
}

.form-command-bar {
    z-index: 15;
    border-color: #dce4ee;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 -8px 28px rgba(20, 32, 51, 0.08);
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--blue);
    padding: 0 14px;
    color: #ffffff;
    background: var(--blue);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.primary-button:hover {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
}

.secondary-button {
    min-height: 38px;
    border-color: #dbe4ee;
    padding: 0 14px;
    box-shadow: var(--shadow-soft);
    font-size: 13px;
}

.message,
.alert {
    border-radius: 8px;
}

.empty-state {
    padding: 46px 18px;
}

.empty-state svg {
    width: 42px;
    height: 42px;
    color: var(--muted-2);
}

@media (max-width: 1180px) {
    .app-body {
        grid-template-columns: 216px minmax(0, 1fr);
    }

    .metrics-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-frame .global-bar {
        position: static;
        grid-template-columns: 36px minmax(0, 1fr);
        height: auto;
        gap: 10px;
        padding: 10px 12px;
    }

    .app-frame .search-box,
    .app-frame .global-actions {
        grid-column: 1 / -1;
    }

    .app-launcher,
    .global-actions {
        display: flex;
    }

    .app-body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 12px;
    }

    .collapse-button {
        display: none;
    }

    .command-ribbon {
        top: 0;
        min-height: 62px;
        padding: 10px 12px;
    }

    .command-button {
        height: 38px;
        padding: 0 12px;
    }

    .page {
        padding: 16px 12px 24px;
    }

    .workspace-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .workspace-header h1 {
        font-size: 24px;
    }

    .metrics-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Finance operations */
.metrics-grid.finance-metrics {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.review-summary-grid.finance-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.finance-choice-list {
    display: grid;
    max-height: 390px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
}

.finance-choice-list li {
    border-bottom: 1px solid var(--line-soft);
}

.finance-choice-list li:last-child {
    border-bottom: 0;
}

.finance-choice-list label {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.45;
    cursor: pointer;
}

.finance-choice-list input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
}

.wizard-stepper.finance-wizard-stepper {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.form-command-bar.finance-action-form {
    align-items: end;
    gap: 14px;
}

.form-command-bar.finance-action-form .form-field {
    flex: 1;
}

.form-grid.finance-document-form {
    padding: 16px;
}

.form-grid.finance-document-form .form-command-bar {
    margin: 0 -16px -16px;
    box-shadow: none;
}

.panel.finance-action-panel .panel-header {
    border-bottom: 1px solid var(--line-soft);
}

.finance-party-list {
    display: grid;
    margin: 0;
}

.finance-party-list > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 11px 15px;
}

.finance-party-list > div:last-child {
    border-bottom: 0;
}

.finance-party-list dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.finance-party-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.finance-inline-reason {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 15px;
}

.finance-inline-reason textarea {
    min-height: 76px;
}

.panel.finance-danger-panel {
    border-left: 4px solid #b42318;
}

.finance-hash {
    font-family: Consolas, monospace;
    letter-spacing: 0;
}

.timeline-list {
    display: grid;
}

.timeline-item {
    display: grid;
    grid-template-columns: minmax(140px, 0.8fr) minmax(180px, 1.4fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 11px 15px;
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-item.current {
    border-left: 3px solid #c29a35;
    background: #fff9e9;
}

.timeline-item span,
.timeline-item strong,
.timeline-item small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.timeline-item span {
    color: var(--muted);
    font-size: 11px;
}

.timeline-item strong {
    font-size: 12px;
}

.timeline-item small {
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.status-pill.status-calculated,
.status-pill.status-approved {
    border-color: #b3c6db;
    background: #edf5fc;
    color: #174a75;
}

.status-pill.status-invoiced,
.status-pill.status-issued,
.status-pill.status-credited {
    border-color: #b7d5bd;
    background: #edf8ef;
    color: #235f31;
}

.status-pill.status-reversed {
    border-color: #e5b5b0;
    background: #fdf0ef;
    color: #8f241b;
}

.status-pill.status-registered,
.status-pill.status-watch {
    border-color: #e5cb7c;
    background: #fff8df;
    color: #7a5700;
}

.status-pill.status-standard {
    border-color: #b7d5bd;
    background: #edf8ef;
    color: #235f31;
}

.status-pill.status-hold,
.status-pill.status-voided {
    border-color: #e5b5b0;
    background: #fdf0ef;
    color: #8f241b;
}

.finance-page .alert.warning-list:not(.confirmation-blockers) {
    border-color: #e5cb7c;
    background: #fff8df;
    color: #6d4f00;
}

@media (max-width: 1100px) {
    .metrics-grid.finance-metrics,
    .review-summary-grid.finance-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .metrics-grid.finance-metrics,
    .review-summary-grid.finance-summary-grid,
    .finance-two-column,
    .finance-inline-reason {
        grid-template-columns: 1fr;
    }

    .wizard-stepper.finance-wizard-stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-command-bar.finance-action-form {
        align-items: stretch;
        flex-direction: column;
    }

    .finance-inline-reason .secondary-button,
    .form-command-bar.finance-action-form .primary-button {
        justify-content: center;
        width: 100%;
    }

    .finance-party-list > div {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .finance-page .wide-table-wrap table,
    .finance-page .wide-table-wrap tbody,
    .finance-page .wide-table-wrap tr,
    .finance-page .wide-table-wrap td {
        display: block;
        width: 100%;
    }

    .finance-page .wide-table-wrap thead {
        display: none;
    }

    .finance-page .wide-table-wrap tbody tr {
        border-bottom: 1px solid var(--line);
        padding: 9px 14px;
    }

    .finance-page .wide-table-wrap tbody tr:last-child {
        border-bottom: 0;
    }

    .finance-page .wide-table-wrap tbody td {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        border: 0;
        padding: 6px 0;
        overflow-wrap: anywhere;
    }

    .finance-page .wide-table-wrap tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .finance-page .wide-table-wrap .row-action-cell::before {
        content: "Действие";
    }

    .finance-page .wide-table-wrap .row-action-cell .edit-button {
        justify-content: center;
        width: 100%;
    }

    .finance-page .wide-table-wrap tfoot {
        display: block;
        border-top: 1px solid var(--line);
        background: #f7f9fc;
        padding: 10px 14px;
    }

    .finance-page .wide-table-wrap tfoot tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .finance-page .wide-table-wrap tfoot th {
        display: none;
        border: 0;
        padding: 0;
    }

    .finance-page .wide-table-wrap tfoot th:first-child,
    .finance-page .wide-table-wrap tfoot th:last-child {
        display: block;
    }

    .finance-page .wide-table-wrap tfoot th:last-child {
        text-align: right;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .timeline-item small {
        text-align: left;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: #111827;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.icon-sprite {
    display: none;
}

svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.app-frame {
    min-height: calc(100vh - 24px);
    margin: 12px auto;
    width: min(1720px, calc(100vw - 10px));
    overflow: hidden;
    border: 1px solid #202938;
    border-radius: 8px;
    background: var(--page);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.global-bar {
    display: grid;
    grid-template-columns: 34px 250px minmax(260px, 1fr) auto;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 14px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.app-launcher,
.notification-button,
.logout-button,
.row-more {
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.app-launcher {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: var(--radius);
}

.app-launcher:hover,
.notification-button:hover,
.logout-button:hover,
.row-more:hover {
    background: var(--panel-soft);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background:
        linear-gradient(135deg, transparent 48%, rgba(255, 255, 255, 0.75) 49% 58%, transparent 59%),
        linear-gradient(135deg, #1493b8, #1d5ea8);
}

.brand strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-box {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(100%, 520px);
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 10px;
    background: #fbfcfe;
    color: var(--muted);
}

.search-box svg {
    width: 15px;
    height: 15px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
}

.global-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.notification-button {
    position: relative;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: var(--radius);
}

.notification-button span {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    width: 13px;
    height: 13px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--blue);
    font-size: 9px;
    font-weight: 700;
}

.user-menu {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 12px;
    background: #ffffff;
    font-size: 13px;
}

.logout-button {
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 11px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 13px;
    color: var(--ink);
    background: #ffffff;
    cursor: pointer;
    font-weight: 700;
}

.secondary-button:hover {
    background: var(--panel-soft);
}

.app-body {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: calc(100vh - 70px);
}

.sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 8px 10px;
    background: #fbfcfe;
    border-right: 1px solid var(--line);
}

.sidebar-section {
    display: grid;
    gap: 4px;
}

.sidebar-section p {
    margin: 8px 6px 6px;
    color: #39475c;
    font-size: 11px;
}

.side-item {
    position: relative;
    display: grid;
    grid-template-columns: 19px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 33px;
    border-radius: 5px;
    padding: 0 7px;
    color: #2d3748;
    font-size: 12px;
}

.side-item svg {
    width: 15px;
    height: 15px;
}

.side-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-item.active {
    color: var(--blue-dark);
    background: var(--blue-soft);
    font-weight: 700;
}

.side-item.active::before {
    position: absolute;
    left: -8px;
    width: 3px;
    height: 24px;
    border-radius: 2px;
    background: var(--blue);
    content: "";
}

.side-item.active-soft {
    color: var(--blue-dark);
    background: var(--blue-soft);
    font-weight: 700;
}

.side-item:hover {
    background: var(--panel-soft);
}

.side-item.disabled {
    color: #9aa4b3;
    cursor: default;
}

.side-item.disabled:hover {
    background: transparent;
}

.side-item small {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 4px;
    color: #7b8798;
    font-size: 8px;
    line-height: 1.4;
}

.sidebar-divider {
    height: 1px;
    margin: 13px 6px;
    background: var(--line);
}

.collapse-button {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    margin-top: auto;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 12px 6px 0;
    background: transparent;
    color: #4b5565;
    cursor: pointer;
    font-size: 11px;
}

.content-shell {
    min-width: 0;
    background: radial-gradient(circle at 80% 0%, #ffffff 0, var(--page) 300px);
}

.command-ribbon {
    display: flex;
    gap: 8px;
    min-height: 96px;
    padding: 12px 16px;
    overflow-x: auto;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.command-button {
    display: grid;
    grid-template-rows: 35px 20px;
    place-items: center;
    min-width: 84px;
    height: 64px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.command-button svg {
    width: 25px;
    height: 25px;
    color: #174a88;
    stroke-width: 1.7;
}

.command-button:hover {
    border-color: #bfd4ef;
    background: #f7fbff;
}

.command-button[disabled] {
    color: #9aa4b3;
    cursor: default;
}

.command-button[disabled] svg {
    color: #9aa4b3;
}

.page {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 18px 16px 24px;
}

.workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.workspace-header h1 {
    margin: 0 0 3px;
    font-size: 26px;
    line-height: 1.1;
}

.workspace-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}

.metric {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 9px;
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metric svg {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    padding: 7px;
    color: var(--blue);
    background: var(--blue-soft);
}

.metric span,
.metric small {
    display: block;
    color: var(--muted);
}

.metric span {
    font-size: 11px;
    font-weight: 700;
}

.metric strong {
    display: inline-block;
    margin-right: 8px;
    font-size: 30px;
    line-height: 1;
}

.metric small {
    margin-top: 1px;
    font-size: 9px;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 196px;
    gap: 14px;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 45px;
    border-bottom: 1px solid var(--line-soft);
    padding: 10px 13px;
}

.panel-header h2 {
    margin: 0;
    font-size: 14px;
}

.view-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 10px;
    background: #ffffff;
    color: #263246;
    font-size: 11px;
    font-weight: 600;
}

.view-button svg {
    width: 13px;
    height: 13px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
}

th {
    color: #4e5b70;
    background: #fbfcfe;
    font-size: 10px;
    font-weight: 700;
}

td {
    color: #182033;
    font-size: 12px;
}

td small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.film-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 250px;
}

.film-thumb {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 38px;
    place-items: center;
    border-radius: 4px;
    color: #ffffff;
    background: linear-gradient(135deg, #163b7a, #d3652b);
    font-size: 11px;
    font-weight: 800;
}

.film-cell strong {
    display: block;
    max-width: 330px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    border: 1px solid #bfe8c9;
    border-radius: 5px;
    padding: 0 8px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 10px;
    font-weight: 700;
}

.row-more {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 5px;
}

.row-more svg {
    width: 14px;
    height: 14px;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 8px 12px;
    color: var(--muted);
    font-size: 10px;
}

.pager {
    display: flex;
    gap: 4px;
}

.pager button {
    min-width: 28px;
    height: 26px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
    color: #354155;
    cursor: pointer;
    font-size: 11px;
}

.pager button.active {
    border-color: var(--blue);
    color: #ffffff;
    background: var(--blue);
}

.action-panel {
    align-self: start;
}

.action-list {
    display: grid;
    gap: 8px;
    padding: 9px;
}

.action-tile,
.report-link {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 7px 8px;
    background: #fbfcfe;
}

.action-tile:hover,
.report-link:hover {
    border-color: #bfd4ef;
    background: #f7fbff;
}

.action-tile > svg:first-child,
.report-link > svg:first-child {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    padding: 6px;
    color: var(--blue);
    background: var(--blue-soft);
}

.row-action-cell {
    width: 1%;
    white-space: nowrap;
}

.edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 10px;
    background: #ffffff;
    color: #263246;
    font-size: 11px;
    font-weight: 700;
}

.edit-button:hover {
    border-color: #bfd4ef;
    background: #f7fbff;
}

.action-tile strong,
.action-tile small,
.report-link span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-tile strong,
.report-link span {
    font-size: 11px;
    font-weight: 700;
}

.action-tile small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.action-arrow {
    width: 13px;
    height: 13px;
    color: #4c5b70;
}

.report-link {
    grid-template-columns: 24px minmax(0, 1fr) 14px;
    min-height: 36px;
    background: #ffffff;
}

.report-link > svg:first-child {
    width: 22px;
    height: 22px;
    padding: 2px;
    background: transparent;
    color: #536173;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 42px 16px;
    color: var(--muted);
    text-align: center;
}

.module-page-header {
    margin-bottom: 16px;
}

.record-count {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.list-filter-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 16px;
}

.list-search-box {
    flex: 1 1 320px;
    max-width: 560px;
}

.status-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--line-soft);
    padding: 12px 16px;
}

.role-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.empty-state.compact {
    min-height: 96px;
    padding: 24px 16px;
}

.message-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 720px) {
    .list-filter-bar > .secondary-button {
        flex: 1 1 auto;
    }

    .list-search-box {
        flex-basis: 100%;
        max-width: none;
    }
}

/* Phase 4A rights confirmation and availability */
.rights-release-panel {
    margin-bottom: 20px;
}

.rights-summary-grid {
    margin: 0 0 18px;
}

.effect-grid.rights-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rights-evidence-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    margin-top: 20px;
}

.rights-evidence-grid > div {
    min-width: 0;
}

.rights-evidence-grid h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.rights-message-list {
    padding: 13px 15px;
    margin-top: 12px;
    border-left: 3px solid;
    background: #f7f8fa;
}

.rights-message-list strong {
    display: block;
    margin-bottom: 6px;
}

.rights-message-list p {
    margin: 3px 0;
    font-size: 13px;
}

.rights-blockers {
    border-color: #b33a3a;
    background: #fff5f4;
    color: #762626;
}

.rights-warnings {
    border-color: #b27a13;
    background: #fff9e9;
    color: #72500e;
}

.rights-command-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 18px;
    margin-top: 20px;
    border-top: 1px solid var(--line);
}

.rights-command-row > div {
    display: grid;
    gap: 3px;
}

.rights-command-row span {
    color: var(--muted);
    font-size: 13px;
}

.rights-history {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.rights-history summary {
    cursor: pointer;
    font-weight: 700;
}

.rights-history .timeline-list {
    margin-top: 12px;
    border: 1px solid var(--line-soft);
}

.rights-history .timeline-list article {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
}

.rights-history .timeline-dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--gold-strong);
}

.rights-history article > div {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.rights-history article small {
    display: block;
    color: var(--muted);
}

.rights-history article p {
    margin: 2px 0 0;
    font-size: 12px;
}

.rights-lock-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.rights-lock-note svg {
    width: 17px;
    height: 17px;
    color: var(--gold-strong);
}

.rights-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    align-items: end;
}

.rights-filter-grid label {
    min-width: 0;
}

.rights-metrics {
    margin-bottom: 20px;
}

.rights-registry-table td:nth-child(1) {
    min-width: 220px;
}

.rights-registry-table td:nth-child(6) {
    min-width: 250px;
}

.rights-evidence-table td:last-child {
    min-width: 210px;
}

.rights-state-ready,
.rights-snapshot-current {
    border-color: #2f7c5b;
    background: #eaf7f0;
    color: #205b42;
}

.rights-state-blocked,
.rights-state-conflict,
.rights-snapshot-drifted {
    border-color: #b33a3a;
    background: #fff0ef;
    color: #842c2c;
}

.rights-state-expiring,
.rights-snapshot-legacy {
    border-color: #b27a13;
    background: #fff7df;
    color: #73500d;
}

.rights-snapshot-none {
    border-color: #6d7480;
    background: #f0f2f5;
    color: #4c535d;
}

.rights-conflict-panel {
    border-top: 3px solid #b33a3a;
}

.rights-results-panel .panel-header,
.rights-conflict-panel .panel-header {
    align-items: flex-start;
    gap: 16px;
}

.rights-panel-count {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .rights-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .effect-grid.rights-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .rights-evidence-grid,
    .rights-filter-grid {
        grid-template-columns: 1fr;
    }

    .effect-grid.rights-summary-grid {
        grid-template-columns: 1fr;
    }

    .rights-results-panel .panel-header,
    .rights-conflict-panel .panel-header {
        flex-direction: column;
    }

    .rights-command-row {
        align-items: stretch;
        flex-direction: column;
    }

    .rights-command-row form,
    .rights-command-row button {
        width: 100%;
    }
}

.message {
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 10px 12px;
    background: #ffffff;
    color: var(--ink);
    font-size: 13px;
}

.message.success {
    border-color: #bfe8c9;
    color: var(--green);
    background: var(--green-soft);
}

.module-form {
    display: grid;
    gap: 12px;
}

.form-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 16px;
}

.form-card-header svg {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    padding: 8px;
    color: var(--blue);
    background: var(--blue-soft);
}

.form-card-header h2,
.form-card-header p {
    margin: 0;
}

.form-card-header h2 {
    font-size: 16px;
}

.form-card-header p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 14px 18px;
    padding: 16px;
}

.form-field {
    display: grid;
    gap: 6px;
}

.form-field span {
    color: #354155;
    font-size: 12px;
    font-weight: 700;
}

.field-label-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.field-action-link {
    background: transparent;
    border: 0;
    color: var(--blue);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 0;
    text-decoration: none;
    white-space: nowrap;
}

.field-action-link:hover {
    text-decoration: underline;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-control {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 7px 9px;
    background: #ffffff;
    color: var(--ink);
    font-size: 13px;
}

.form-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 7px;
    background: #ffffff;
}

.form-choice-list div {
    display: contents;
}

.form-choice-list label {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 5px 9px;
    background: #f7f9fc;
    color: #354155;
    font-size: 12px;
    font-weight: 700;
}

.form-choice-list input {
    margin: 0;
}

.form-choice-list label:has(input:checked) {
    border-color: #b9d7f6;
    background: #e8f2ff;
    color: #17456f;
}

textarea.form-control {
    resize: vertical;
}

.enhanced-select-hidden {
    display: none;
}

.creator-picker {
    display: grid;
    gap: 8px;
}

.selected-token-bar {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 36px;
    padding: 6px;
}

.selected-token-bar.is-empty {
    display: none;
}

.selected-token {
    align-items: center;
    background: #e8f2ff;
    border: 1px solid #b9d7f6;
    border-radius: 999px;
    color: #17456f;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    max-width: 100%;
    padding: 5px 8px;
}

.selected-token span {
    color: #17456f;
    font-size: 13px;
    line-height: 1;
}

.searchable-select-search {
    margin: 0;
}

.creator-option-list {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: grid;
    max-height: 210px;
    overflow-y: auto;
    padding: 4px;
}

.creator-option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: var(--ink);
    cursor: pointer;
    display: grid;
    font-size: 13px;
    grid-template-columns: 22px 1fr;
    min-height: 30px;
    padding: 5px 7px;
    text-align: left;
}

.creator-option:hover {
    background: #f3f7fb;
}

.creator-option.is-selected {
    background: #e8f2ff;
    color: #17456f;
    font-weight: 700;
}

.creator-option-check {
    color: var(--blue);
    font-weight: 800;
}

.creator-option-empty {
    color: var(--muted);
    font-size: 12px;
    padding: 8px;
}

.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(27, 102, 177, 0.12);
    outline: 0;
}

.field-error {
    color: #b42318;
    font-size: 11px;
}

.form-command-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
}

.inline-formset {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.inline-formset-head,
.inline-formset-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr);
    gap: 12px;
    align-items: start;
}

.inline-formset-head {
    color: #4e5b70;
    font-size: 10px;
    font-weight: 700;
}

.inline-formset-row {
    border-top: 1px solid var(--line-soft);
    padding-top: 8px;
}

.inline-delete {
    display: flex;
    min-height: 34px;
    align-items: center;
}

.fixed-week-cell {
    display: flex;
    align-items: center;
    min-height: 34px;
}

.fixed-week-label {
    color: #263246;
    font-size: 13px;
    font-weight: 700;
}

.inline-row-error {
    grid-column: 1 / -1;
    font-size: 11px;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.wide-table-wrap {
    overflow-x: auto;
}

.booking-schedule-grid {
    display: grid;
    gap: 0;
    padding: 16px;
}

.booking-schedule-head,
.booking-schedule-row {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.15fr)
        minmax(132px, 0.75fr)
        minmax(112px, 0.65fr)
        minmax(240px, 1.35fr)
        minmax(220px, 1.25fr)
        minmax(74px, 0.5fr);
    gap: 10px;
    align-items: start;
}

.booking-schedule-head {
    color: #5f6d82;
    font-size: 11px;
    font-weight: 800;
    padding-bottom: 8px;
}

.booking-schedule-row {
    border-top: 1px solid var(--line-soft);
    padding: 10px 0;
}

.booking-schedule-row label {
    display: grid;
    gap: 5px;
}

.booking-schedule-row label > span {
    display: none;
    color: #5f6d82;
    font-size: 11px;
    font-weight: 800;
}

.booking-schedule-row textarea {
    min-height: 38px;
}

.transaction-grid {
    display: grid;
    overflow-x: auto;
    padding: 16px;
}

.transaction-grid-head,
.transaction-grid-row {
    display: grid;
    gap: 10px;
    min-width: 1080px;
    align-items: start;
}

.release-version-grid .transaction-grid-head,
.release-version-grid .transaction-grid-row {
    grid-template-columns:
        minmax(220px, 1.5fr)
        minmax(140px, 0.9fr)
        minmax(86px, 0.5fr)
        minmax(132px, 0.8fr)
        minmax(132px, 0.8fr)
        minmax(210px, 1.3fr)
        minmax(74px, 0.5fr);
}

.release-preview-grid .transaction-grid-head,
.release-preview-grid .transaction-grid-row {
    min-width: 720px;
    grid-template-columns:
        minmax(150px, 0.8fr)
        minmax(220px, 1.2fr)
        minmax(280px, 1.6fr)
        minmax(74px, 0.4fr);
}

.playweek-grid .transaction-grid-head,
.playweek-grid .transaction-grid-row {
    grid-template-columns:
        minmax(70px, 0.4fr)
        minmax(132px, 0.8fr)
        minmax(132px, 0.8fr)
        minmax(132px, 0.8fr)
        minmax(140px, 0.9fr)
        minmax(210px, 1.25fr)
        minmax(190px, 1.15fr)
        minmax(74px, 0.5fr);
}

.transaction-grid-head {
    color: #5f6d82;
    font-size: 11px;
    font-weight: 800;
    padding-bottom: 8px;
}

.transaction-grid-row {
    border-top: 1px solid var(--line-soft);
    padding: 10px 0;
}

.transaction-grid-row label {
    display: grid;
    gap: 5px;
}

.transaction-grid-row label > span {
    display: none;
    color: #5f6d82;
    font-size: 11px;
    font-weight: 800;
}

.transaction-grid-row .delete-check > span,
.booking-schedule-row .delete-check > span {
    display: inline;
}

.transaction-grid-row textarea {
    min-height: 38px;
}

.inline-add-command {
    display: flex;
    border-top: 1px solid var(--line-soft);
    padding: 12px 16px 16px;
}

.inline-add-command .secondary-button svg {
    width: 16px;
    height: 16px;
}

.release-version-card-header {
    flex-wrap: wrap;
}

.form-card-header .header-action-button {
    flex: 0 0 auto;
    gap: 7px;
    margin-left: auto;
}

.form-card-header .header-action-button svg {
    width: 16px;
    height: 16px;
    border-radius: 0;
    padding: 0;
    color: currentColor;
    background: transparent;
}

.release-version-empty-state {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 16px;
    border: 1px dashed #c6d1df;
    border-radius: 7px;
    padding: 10px 12px;
    color: #526177;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
}

.release-version-empty-state[hidden] {
    display: none;
}

.release-version-empty-state svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: var(--blue);
}

.snapshot-card .form-card-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.snapshot-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0 16px 16px;
}

.snapshot-summary-grid > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    border-top: 1px solid var(--line-soft);
    padding: 14px 12px;
}

.snapshot-summary-grid span,
.snapshot-summary-grid small {
    color: #5f6d82;
    font-size: 11px;
}

.snapshot-summary-grid strong,
.snapshot-summary-grid small {
    overflow-wrap: anywhere;
}

.delete-check {
    display: flex;
    gap: 6px;
    align-items: center;
    color: #4e5b70;
    font-size: 12px;
}

.import-error-list {
    display: grid;
    gap: 8px;
    padding: 16px;
}

@media (max-width: 960px) {
    .release-version-card-header .header-action-button {
        flex: 1 1 100%;
        margin-left: 0;
    }

    .booking-schedule-head {
        display: none;
    }

    .booking-schedule-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .booking-schedule-row label > span {
        display: inline;
    }

    .transaction-grid-head {
        display: none;
    }

    .transaction-grid-row,
    .release-version-grid .transaction-grid-row,
    .playweek-grid .transaction-grid-row {
        grid-template-columns: 1fr;
        min-width: 0;
        gap: 12px;
    }

    .transaction-grid-row label > span {
        display: inline;
    }

    .snapshot-card .form-card-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .snapshot-card .status-pill {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .snapshot-summary-grid {
        grid-template-columns: 1fr;
    }
}

.empty-state svg {
    width: 34px;
    height: 34px;
    color: var(--blue);
}

.public-shell {
    min-height: 100vh;
    background: #f6f3ee;
}

.public-shell .global-bar {
    grid-template-columns: minmax(180px, 1fr) auto;
    height: 58px;
    padding: 0 clamp(16px, 4vw, 58px);
    border-bottom: 1px solid #ded8cf;
    background: rgba(255, 252, 247, 0.96);
}

.public-shell .page {
    width: min(1180px, 100%);
    padding: 0 clamp(16px, 4vw, 42px) 42px;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #463b32;
    font-size: 13px;
    font-weight: 700;
}

.public-hero {
    display: flex;
    align-items: flex-end;
    min-height: 220px;
    padding: 48px 0 32px;
    color: #211b18;
}

.public-kicker {
    margin: 0 0 8px;
    color: #8b3f25;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.public-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: 76px;
    line-height: 0.95;
}

.public-film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}

.public-film-card {
    display: grid;
    overflow: hidden;
    border: 1px solid #ded8cf;
    border-radius: 6px;
    background: #fffdf8;
    box-shadow: 0 12px 26px rgba(44, 34, 25, 0.08);
}

.public-film-card:hover {
    border-color: #bd6f43;
    transform: translateY(-2px);
}

.public-film-card img,
.public-poster-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background:
        linear-gradient(145deg, rgba(34, 27, 24, 0.2), rgba(139, 63, 37, 0.18)),
        linear-gradient(135deg, #221b18, #82563d 58%, #d8b86e);
}

.public-poster-placeholder {
    display: grid;
    place-items: center;
    color: #fff8ed;
}

.public-poster-placeholder span {
    font-size: 72px;
    font-weight: 900;
}

.public-film-card-body {
    display: grid;
    gap: 5px;
    min-height: 112px;
    padding: 13px;
}

.public-film-card-body strong,
.public-film-card-body small {
    display: block;
}

.public-film-card-body strong {
    color: #221b18;
    font-size: 17px;
    line-height: 1.15;
}

.public-film-card-body small {
    color: #71655b;
    font-size: 12px;
    line-height: 1.35;
}

.public-empty {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
    border: 1px solid #ded8cf;
    border-radius: 6px;
    padding: 32px;
    background: #fffdf8;
    color: #71655b;
}

.public-empty strong {
    color: #221b18;
    font-size: 22px;
}

.public-film-detail {
    padding-top: 34px;
}

.public-film-head {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    gap: clamp(22px, 5vw, 54px);
    align-items: end;
    padding-bottom: 34px;
}

.public-detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    border: 1px solid #ded8cf;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 22px 45px rgba(44, 34, 25, 0.18);
}

.public-film-copy h1 {
    margin: 10px 0 8px;
    color: #221b18;
    font-size: 72px;
    line-height: 0.98;
}

.public-back-link {
    color: #8b3f25;
    font-size: 13px;
    font-weight: 800;
}

.public-original-title,
.public-tagline {
    margin: 0 0 12px;
    color: #71655b;
}

.public-tagline {
    max-width: 760px;
    color: #463b32;
    font-size: 20px;
    line-height: 1.35;
}

.public-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
}

.public-facts div {
    min-width: 112px;
    border: 1px solid #ded8cf;
    border-radius: 6px;
    padding: 9px 11px;
    background: #fffdf8;
}

.public-facts dt {
    color: #8b3f25;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.public-facts dd {
    margin: 3px 0 0;
    color: #221b18;
    font-size: 14px;
    font-weight: 700;
}

.public-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
    gap: 22px;
}

.public-main-column,
.public-side-column,
.public-trailer-list,
.public-material-list,
.public-release-list {
    display: grid;
    gap: 14px;
}

.public-section {
    border-top: 1px solid #ded8cf;
    padding-top: 16px;
}

.public-section h2 {
    margin: 0 0 12px;
    color: #221b18;
    font-size: 20px;
}

.public-rich-text {
    color: #463b32;
    font-size: 15px;
    line-height: 1.65;
}

.public-rich-text p {
    margin: 0 0 12px;
}

.public-creator-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.public-creator-list div {
    border: 1px solid #ded8cf;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fffdf8;
}

.public-creator-list dt {
    color: #8b3f25;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.public-creator-list dd {
    margin: 4px 0 0;
    color: #221b18;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.public-info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.public-info-list-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
}

.public-info-list div {
    border: 1px solid #ded8cf;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fffdf8;
}

.public-info-list dt {
    color: #8b3f25;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.public-info-list dd {
    margin: 4px 0 0;
    color: #221b18;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.public-trailer {
    display: grid;
    gap: 10px;
    border: 1px solid #ded8cf;
    border-radius: 6px;
    padding: 12px;
    background: #fffdf8;
}

.public-trailer strong,
.public-trailer small {
    display: block;
}

.public-trailer small {
    margin-top: 3px;
    color: #71655b;
}

.public-trailer video {
    width: 100%;
    max-height: 440px;
    border-radius: 5px;
    background: #221b18;
}

.public-material-list a,
.public-release-list span {
    border: 1px solid #ded8cf;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fffdf8;
    color: #463b32;
    font-size: 13px;
    font-weight: 700;
}

.login-shell {
    display: grid;
    min-height: calc(100vh - 110px);
    place-items: center;
}

.login-panel {
    width: min(430px, 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.login-panel h1 {
    margin: 0 0 8px;
}

.login-panel p {
    margin: 0 0 22px;
    color: var(--muted);
}

.form-stack {
    display: grid;
    gap: 16px;
}

.form-stack label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.form-stack input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 8px 10px;
    color: var(--ink);
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--blue);
    border-radius: 5px;
    padding: 0 13px;
    color: #ffffff;
    background: var(--blue);
    cursor: pointer;
    font-weight: 700;
}

.header-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.material-grid,
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.compact-list {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.compact-row,
.property-card {
    display: grid;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fbfcfe;
}

.compact-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    min-height: 50px;
    padding: 8px;
}

.compact-row svg,
.property-card > svg:first-child {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    padding: 6px;
    color: var(--blue);
    background: var(--blue-soft);
}

.compact-row strong,
.compact-row small,
.property-card strong,
.property-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-row strong,
.property-card strong {
    font-size: 12px;
}

.compact-row small,
.property-card small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.property-card {
    grid-template-columns: 40px minmax(0, 1fr) 16px;
    gap: 10px;
    min-height: 76px;
    padding: 12px;
}

.property-card:hover {
    border-color: #bfd4ef;
    background: #f7fbff;
}

.alert {
    margin-bottom: 16px;
    border: 1px solid #fecdca;
    border-radius: 5px;
    padding: 12px;
    color: #b42318;
    background: #fffbfa;
}

@media (max-width: 1100px) {
    .app-body {
        grid-template-columns: 140px minmax(0, 1fr);
    }

    .global-bar {
        grid-template-columns: 34px 210px minmax(220px, 1fr) auto;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-frame {
        width: 100vw;
        min-height: 100vh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    .global-bar,
    .app-body {
        grid-template-columns: 1fr;
        height: auto;
    }

    .app-launcher,
    .global-actions {
        display: none;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .command-ribbon {
        min-height: 86px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .material-grid,
    .property-grid {
        grid-template-columns: 1fr;
    }

    .public-film-head,
    .public-detail-grid {
        grid-template-columns: 1fr;
    }

    .public-info-list-wide {
        grid-template-columns: 1fr;
    }

    .public-shell .global-bar {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 16px;
    }

    .public-nav {
        justify-content: flex-start;
    }

    .public-hero h1,
    .public-film-copy h1 {
        font-size: 42px;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

/* Modern operations UI final cascade */
body {
    background: linear-gradient(180deg, #f7faff 0%, #f1f5fa 46%, #eef3f8 100%);
}

.app-frame {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--page);
    box-shadow: none;
}

.app-frame .global-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-template-columns: 36px 230px minmax(260px, 1fr) auto;
    height: 60px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(220, 227, 237, 0.9);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.app-body {
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: calc(100vh - 60px);
}

.sidebar {
    position: static;
    align-self: stretch;
    height: auto;
    overflow: visible;
    padding: 22px 12px 14px;
    border-right: 0;
    background: linear-gradient(180deg, #11243b 0%, #0e2135 52%, #0b1a2a 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.sidebar-section p {
    color: #9fb1c7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.side-item {
    min-height: 40px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 0 10px;
    color: #e6edf7;
    font-size: 13px;
    font-weight: 650;
}

.side-item svg {
    width: 18px;
    height: 18px;
    color: #c6d3e4;
}

.side-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.side-item.active,
.side-item.active-soft {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(23, 105, 224, 0.94), rgba(42, 91, 193, 0.88));
    box-shadow: 0 10px 26px rgba(12, 39, 86, 0.28);
}

.side-item.active svg,
.side-item.active-soft svg {
    color: #ffffff;
}

.side-item.active::before,
.side-item.active-soft::before {
    position: absolute;
    left: -12px;
    width: 3px;
    height: 24px;
    border-radius: 999px;
    background: #6ee7ff;
    content: "";
}

.side-item.disabled,
.side-item.disabled svg {
    color: #718298;
}

.side-item.disabled:hover {
    border-color: transparent;
    background: transparent;
}

.side-item small {
    border-color: rgba(255, 255, 255, 0.12);
    color: #8fa1b7;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-divider,
.collapse-button {
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-divider {
    background: rgba(255, 255, 255, 0.1);
}

.collapse-button {
    color: #d4deeb;
}

.content-shell {
    min-height: calc(100vh - 60px);
    background:
        radial-gradient(circle at 78% 0%, rgba(255, 255, 255, 0.95) 0, rgba(244, 247, 251, 0) 360px),
        var(--page);
}

.command-ribbon {
    position: sticky;
    top: 60px;
    z-index: 20;
    align-items: center;
    min-height: 76px;
    gap: 10px;
    padding: 14px 26px;
    border-bottom: 1px solid rgba(220, 227, 237, 0.9);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
}

.command-button {
    display: inline-flex;
    min-width: auto;
    height: 42px;
    grid-template-rows: none;
    gap: 8px;
    border-color: #dbe4ee;
    border-radius: 7px;
    padding: 0 14px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    color: #17243a;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.command-button svg {
    width: 18px;
    height: 18px;
    color: var(--blue);
    stroke-width: 2;
}

.command-button:hover {
    border-color: #a9c7f6;
    background: #f8fbff;
    box-shadow: 0 8px 18px rgba(23, 105, 224, 0.08);
}

.page {
    width: min(100%, 1440px);
    padding: 24px 26px 34px;
}

.workspace-header {
    min-height: 52px;
    margin-bottom: 18px;
    gap: 16px;
}

.workspace-header h1 {
    color: #111b2e;
    font-size: 28px;
    font-weight: 800;
}

.metrics-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric {
    min-height: 96px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    border-color: #dde5ef;
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--shadow-soft);
}

.metric svg {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    padding: 9px;
}

.metric strong {
    margin: 5px 0 0;
    font-size: 30px;
    font-weight: 800;
}

.workspace-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 18px;
}

.panel,
.form-card,
.compact-row,
.property-card,
.action-tile,
.report-link {
    border-color: #dce4ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.panel-header,
.form-card-header {
    min-height: 58px;
    border-bottom-color: #e8edf4;
    padding: 14px 16px;
}

.panel-header h2,
.form-card-header h2 {
    color: #17243a;
    font-size: 16px;
    font-weight: 800;
}

th,
td {
    padding: 12px 16px;
}

th {
    color: #5f6d82;
    background: #f7f9fc;
    font-size: 11px;
    text-transform: none;
}

td {
    color: #1c2c45;
    font-size: 13px;
}

tbody tr:hover td {
    background: #fbfdff;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 16px 18px;
    padding: 18px;
}

.form-control {
    min-height: 40px;
    border-color: #d9e1ec;
    border-radius: 7px;
    padding: 8px 10px;
    color: #17243a;
    background: #ffffff;
    font-size: 13px;
}

.form-command-bar {
    z-index: 15;
    border-color: #dce4ee;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 -8px 28px rgba(20, 32, 51, 0.08);
}

.primary-button {
    border-color: var(--blue);
    color: #ffffff;
    background: var(--blue);
}

.primary-button:hover {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
}

@media (max-width: 1180px) {
    .app-body {
        grid-template-columns: 216px minmax(0, 1fr);
    }

    .metrics-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-frame .global-bar {
        position: static;
        grid-template-columns: 36px minmax(0, 1fr);
        height: auto;
        gap: 10px;
        padding: 10px 12px;
    }

    .app-frame .search-box,
    .app-frame .global-actions {
        grid-column: 1 / -1;
    }

    .app-launcher,
    .global-actions {
        display: flex;
    }

    .app-body,
    .metrics-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 12px;
    }

    .collapse-button {
        display: none;
    }

    .command-ribbon {
        top: 0;
        min-height: 62px;
        padding: 10px 12px;
    }

    .page {
        padding: 16px 12px 24px;
    }
}

.command-back-button {
    border-color: #c8d6e8;
    background: #f8fafc;
    color: #24344e;
}

.command-back-button::after {
    width: 1px;
    height: 26px;
    margin-left: 6px;
    background: #dce4ee;
    content: "";
}

.command-back-icon {
    transform: rotate(180deg);
}

.command-back-button:hover {
    border-color: #a9c7f6;
    background: #eef5ff;
}

/* New Magic Films brand cascade */
:root {
    --nmf-deep-cinematic-black: #050607;
    --nmf-theatre-black: #0c0c0c;
    --nmf-cinematic-gold: #c9a24d;
    --nmf-gold-highlight: #fce490;
    --nmf-gold-shadow: #8a5c12;
    --nmf-warm-ivory: #f6e8c4;
    --nmf-silver-mist: #c8c8c8;
    --nmf-projection-blue-black: #101820;
    --nmf-black: #050505;
    --nmf-gold: #D89C24;
    --nmf-gold-light: #FFF1A8;
    --nmf-gold-dark: #8C5B11;
    --nmf-cream: #FFF8DC;
    --nmf-font-display: "Cinzel", "Trajan Pro", Georgia, serif;
    --nmf-font-sans: "Aptos", Arial, Helvetica, sans-serif;
    --nmf-font-body: Calibri, "Aptos", Arial, sans-serif;

    --page: #f4f6f8;
    --panel: #ffffff;
    --panel-soft: #f8f9fb;
    --ink: #101820;
    --muted: #627080;
    --muted-2: #8b96a3;
    --line: rgba(16, 24, 32, 0.14);
    --line-soft: rgba(16, 24, 32, 0.08);
    --blue: var(--nmf-cinematic-gold);
    --blue-dark: var(--nmf-gold-shadow);
    --blue-soft: rgba(201, 162, 77, 0.14);
    --amber: var(--nmf-cinematic-gold);
    --amber-soft: rgba(252, 228, 144, 0.22);
    --shadow: 0 16px 42px rgba(5, 6, 7, 0.12);
    --shadow-soft: 0 1px 2px rgba(5, 6, 7, 0.07);
    --radius: 8px;
}

html,
body {
    font-family: var(--nmf-font-body);
}

body {
    background:
        linear-gradient(180deg, rgba(16, 24, 32, 0.05) 0%, rgba(244, 246, 248, 0) 280px),
        #f4f6f8;
    color: var(--nmf-projection-blue-black);
}

.app-frame {
    background: #f4f6f8;
}

.app-body,
.content-shell,
.page {
    min-width: 0;
}

.app-frame .global-bar,
.public-shell .global-bar {
    border-bottom: 1px solid rgba(201, 162, 77, 0.28);
    background:
        radial-gradient(circle at 22% 0%, rgba(201, 162, 77, 0.16), transparent 34%),
        linear-gradient(90deg, var(--nmf-deep-cinematic-black) 0%, var(--nmf-projection-blue-black) 100%);
    color: var(--nmf-warm-ivory);
    box-shadow: 0 12px 32px rgba(5, 6, 7, 0.22);
}

.app-frame .global-bar {
    grid-template-columns: 36px 270px minmax(260px, 1fr) auto;
    height: 72px;
}

.public-shell .global-bar {
    min-height: 76px;
}

.brand {
    min-width: 0;
    color: var(--nmf-warm-ivory);
    text-decoration: none;
}

.brand-logo {
    display: block;
    flex: 0 0 auto;
    width: auto;
    object-fit: contain;
}

.brand-logo-app {
    height: 50px;
    max-width: 92px;
}

.brand-logo-public {
    height: 54px;
    max-width: 98px;
}

.brand-product {
    display: inline-flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 30px;
    border-left: 1px solid rgba(201, 162, 77, 0.45);
    padding-left: 12px;
    color: var(--nmf-warm-ivory);
    font-family: var(--nmf-font-sans);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-product-name {
    line-height: 1;
}

.brand-version {
    color: rgba(255, 248, 220, 0.64);
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.brand-mark {
    background: var(--nmf-cinematic-gold);
    box-shadow: none;
}

.app-launcher,
.notification-button,
.logout-button,
.user-menu {
    color: var(--nmf-warm-ivory);
}

.app-launcher:hover,
.notification-button:hover,
.logout-button:hover {
    border-color: rgba(201, 162, 77, 0.42);
    background: rgba(246, 232, 196, 0.08);
}

.notification-button span {
    border-color: var(--nmf-projection-blue-black);
    background: var(--nmf-cinematic-gold);
    color: var(--nmf-deep-cinematic-black);
}

.user-menu,
.logout-button {
    border-color: rgba(201, 162, 77, 0.28);
    background: rgba(246, 232, 196, 0.08);
}

.search-box {
    border-color: rgba(201, 162, 77, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: var(--nmf-warm-ivory);
}

.search-box svg,
.search-box input,
.search-box input::placeholder {
    color: rgba(246, 232, 196, 0.72);
}

.search-box:focus-within {
    border-color: var(--nmf-cinematic-gold);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(201, 162, 77, 0.18);
}

.sidebar {
    border-right: 1px solid rgba(201, 162, 77, 0.2);
    background:
        linear-gradient(180deg, var(--nmf-projection-blue-black) 0%, var(--nmf-deep-cinematic-black) 100%);
    color: var(--nmf-warm-ivory);
    box-shadow: 10px 0 28px rgba(5, 6, 7, 0.14);
}

.sidebar-section p,
.side-item small {
    color: rgba(246, 232, 196, 0.56);
}

.side-item {
    color: rgba(246, 232, 196, 0.82);
}

.side-item svg {
    color: var(--nmf-silver-mist);
}

.side-item:hover {
    background: rgba(246, 232, 196, 0.08);
    color: var(--nmf-warm-ivory);
}

.side-item.active,
.side-item.active-soft {
    border-color: rgba(201, 162, 77, 0.54);
    background:
        linear-gradient(90deg, rgba(201, 162, 77, 0.2), rgba(201, 162, 77, 0.08));
    color: var(--nmf-warm-ivory);
    box-shadow: inset 3px 0 0 var(--nmf-cinematic-gold);
}

.side-item.active svg,
.side-item.active-soft svg {
    color: var(--nmf-gold-highlight);
}

.side-item.disabled {
    color: rgba(246, 232, 196, 0.38);
}

.sidebar-divider {
    background: rgba(201, 162, 77, 0.18);
}

.collapse-button {
    border-color: rgba(201, 162, 77, 0.24);
    background: rgba(246, 232, 196, 0.06);
    color: rgba(246, 232, 196, 0.78);
}

.command-ribbon {
    top: 72px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    border-bottom: 1px solid rgba(201, 162, 77, 0.22);
    background:
        linear-gradient(90deg, rgba(5, 6, 7, 0.97), rgba(16, 24, 32, 0.95));
    box-shadow: 0 10px 24px rgba(5, 6, 7, 0.16);
}

.command-button {
    flex: 0 1 auto;
    border-color: rgba(201, 162, 77, 0.32);
    background: rgba(246, 232, 196, 0.07);
    color: var(--nmf-warm-ivory);
}

.command-button svg {
    color: var(--nmf-gold-highlight);
}

.command-button:hover {
    border-color: rgba(252, 228, 144, 0.72);
    background: rgba(201, 162, 77, 0.18);
    color: #fff8df;
}

.command-button[disabled] {
    border-color: rgba(200, 200, 200, 0.14);
    background: rgba(200, 200, 200, 0.06);
    color: rgba(246, 232, 196, 0.38);
}

.command-back-button {
    border-color: rgba(252, 228, 144, 0.48);
    background: rgba(201, 162, 77, 0.18);
    color: var(--nmf-warm-ivory);
}

.command-back-button::after {
    background: rgba(201, 162, 77, 0.28);
}

.command-back-button:hover {
    border-color: var(--nmf-gold-highlight);
    background: rgba(201, 162, 77, 0.28);
}

.workspace-header h1,
.panel-header h2,
.form-card-header h2,
.property-card h3,
.action-tile strong {
    color: var(--nmf-projection-blue-black);
    font-family: var(--nmf-font-sans);
}

.panel,
.form-card,
.compact-row,
.property-card,
.action-tile,
.report-link,
.metric {
    border-color: rgba(16, 24, 32, 0.12);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(5, 6, 7, 0.08);
}

.panel-header,
.form-card-header {
    border-bottom-color: rgba(16, 24, 32, 0.1);
    background: linear-gradient(90deg, rgba(201, 162, 77, 0.12), rgba(255, 255, 255, 0));
}

.metric svg {
    background: rgba(201, 162, 77, 0.16);
    color: var(--nmf-gold-shadow);
}

.primary-button,
.form-command-bar .primary-button,
button[type="submit"].primary-button {
    border-color: var(--nmf-cinematic-gold);
    background: linear-gradient(180deg, var(--nmf-gold-highlight), var(--nmf-cinematic-gold));
    color: var(--nmf-deep-cinematic-black);
    box-shadow: 0 10px 20px rgba(138, 92, 18, 0.2);
}

.primary-button:hover,
.form-command-bar .primary-button:hover,
button[type="submit"].primary-button:hover {
    border-color: var(--nmf-gold-shadow);
    background: linear-gradient(180deg, #ffeaa0, #bd9340);
    color: var(--nmf-deep-cinematic-black);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--nmf-cinematic-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 77, 0.18);
}

th {
    background: rgba(16, 24, 32, 0.04);
    color: #536171;
}

tbody tr:hover td {
    background: rgba(201, 162, 77, 0.07);
}

tbody tr.is-recent td {
    background: rgba(201, 162, 77, 0.14);
}

tbody tr.is-recent td:first-child {
    box-shadow: inset 4px 0 0 var(--nmf-cinematic-gold);
    font-weight: 800;
}

a {
    color: #7b560f;
}

.import-section {
    margin-top: 16px;
}

.import-metadata {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.import-metadata div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 16px;
}

.import-metadata dt,
.import-metadata dd {
    margin: 0;
}

.import-metadata dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.import-metadata dd {
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.mapping-form {
    display: flex;
    min-width: 320px;
    align-items: center;
    gap: 8px;
}

.mapping-form .form-control {
    min-width: 220px;
}

.code-cell {
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.import-result-cell {
    min-width: 260px;
}

.row-message {
    display: block;
    margin: 2px 0;
    font-size: 11px;
}

.row-error,
.message.error {
    color: #a61b1b;
}

.row-warning,
.message.warning {
    color: #8a5b00;
}

.message.error {
    border-color: #efb4b4;
    background: #fff5f5;
}

.message.warning {
    border-color: #ead49a;
    background: #fffaf0;
}

.status-pill.status-error,
.status-pill.status-validation_failed,
.status-pill.status-failed {
    border-color: #efb4b4;
    color: #a61b1b;
    background: #fff5f5;
}

.status-pill.status-warning,
.status-pill.status-uploaded,
.status-pill.status-pending {
    border-color: #ead49a;
    color: #8a5b00;
    background: #fffaf0;
}

.status-pill.status-applied {
    border-color: #b7ddc1;
    color: #176b35;
    background: #f1fbf4;
}

.status-pill.status-issued,
.status-pill.status-submitted,
.status-pill.status-uploaded,
.status-pill.status-pending {
    border-color: #ead49a;
    color: #7b5407;
    background: #fffaf0;
}

.status-pill.status-validated,
.status-pill.status-valid,
.status-pill.status-completed,
.status-pill.status-applied {
    border-color: #b7ddc1;
    color: #176b35;
    background: #f1fbf4;
}

.status-pill.status-in_review {
    border-color: #a8c9df;
    color: #155478;
    background: #f2f8fc;
}

.status-pill.status-expired,
.status-pill.status-cancelled {
    border-color: #cbd2dc;
    color: #596474;
    background: #f5f7f9;
}

.booking-request-metadata {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-request-metadata .code-cell {
    word-break: break-all;
}

.metric-status-text {
    font-size: 18px !important;
    line-height: 1.15;
}

.booking-import-command .form-command-bar {
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .booking-request-metadata {
        grid-template-columns: 1fr;
    }
}

.primary-button[disabled] {
    border-color: #cbd2dc;
    background: #e5e9ef;
    color: #7b8491;
    box-shadow: none;
    cursor: not-allowed;
}

.applied-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 760px) {
    .import-metadata {
        grid-template-columns: 1fr;
    }

    .mapping-form {
        display: grid;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .mapping-form .form-control {
        min-width: 0;
    }

    .responsive-import-table,
    .responsive-import-table tbody,
    .responsive-import-table tr,
    .responsive-import-table td {
        display: block;
        width: 100%;
    }

    .responsive-import-table thead {
        display: none;
    }

    .responsive-import-table tr {
        border-bottom: 1px solid var(--line-soft);
        padding: 8px 0;
    }

    .responsive-import-table td {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 6px 12px;
        overflow-wrap: anywhere;
    }

    .responsive-import-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 700;
    }

    .responsive-import-table .import-result-cell {
        min-width: 0;
    }
}

/* New Magic Films public website refresh */
.public-shell {
    background:
        linear-gradient(180deg, #050505 0, #101820 430px, #070809 100%);
    color: var(--nmf-cream);
}

.public-shell .global-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 78px;
    border-bottom: 1px solid rgba(216, 156, 36, 0.34);
    background: rgba(5, 5, 5, 0.94);
    backdrop-filter: blur(16px);
}

.public-shell .page {
    width: min(1240px, 100%);
    padding: 0 clamp(16px, 4vw, 56px) 64px;
}

.public-shell .brand {
    gap: 14px;
}

.brand-logo-public {
    height: 62px;
    max-width: 150px;
}

.public-shell .brand-product {
    border-left-color: rgba(216, 156, 36, 0.55);
    color: var(--nmf-cream);
}

.public-nav a {
    border: 1px solid rgba(216, 156, 36, 0.24);
    border-radius: 999px;
    color: rgba(255, 248, 220, 0.82);
    padding: 8px 13px;
    text-decoration: none;
}

.public-nav a:hover {
    border-color: rgba(255, 241, 168, 0.66);
    color: #ffffff;
}

.public-hero {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 360px);
    gap: 36px;
    min-height: 330px;
    padding: 62px 0 42px;
}

.public-hero-copy,
.public-film-copy,
.public-hero-brand {
    min-width: 0;
}

.public-hero-copy {
    max-width: 780px;
}

.public-kicker,
.public-section-kicker {
    color: var(--nmf-gold);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.public-hero h1,
.public-film-copy h1 {
    color: #ffffff;
    font-family: var(--nmf-font-sans);
    font-weight: 900;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.public-hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: 64px;
    line-height: 0.95;
}

.public-hero-copy p:last-child {
    max-width: 620px;
    margin: 18px 0 0;
    color: rgba(255, 248, 220, 0.76);
    font-size: 17px;
    line-height: 1.55;
}

.public-hero-brand {
    align-items: center;
    border: 1px solid rgba(216, 156, 36, 0.36);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 190px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(216, 156, 36, 0.18), rgba(255, 248, 220, 0.04)),
        rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 0 0 1px rgba(255, 241, 168, 0.08);
}

.public-hero-brand span {
    color: var(--nmf-gold-light);
    font-family: var(--nmf-font-sans);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.ops-landing-actions {
    display: flex;
    margin-top: 26px;
}

.ops-landing .public-hero-copy > p:not(.public-kicker):not(.ops-landing-actions) {
    max-width: 620px;
    margin: 18px 0 0;
    color: rgba(255, 248, 220, 0.76);
    font-size: 17px;
    line-height: 1.55;
}

.ops-landing-actions .primary-button {
    min-width: 142px;
    min-height: 44px;
    padding: 0 24px;
    text-decoration: none;
}

.public-film-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
}

.public-film-card {
    border: 1px solid rgba(216, 156, 36, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.public-film-card:hover {
    border-color: rgba(255, 241, 168, 0.78);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
    transform: translateY(-3px);
}

.public-film-card img,
.public-poster-placeholder {
    border-bottom: 1px solid rgba(216, 156, 36, 0.18);
    background:
        linear-gradient(145deg, rgba(5, 5, 5, 0.2), rgba(216, 156, 36, 0.2)),
        linear-gradient(135deg, #050505, #101820 55%, #8c5b11);
}

.public-poster-placeholder {
    color: var(--nmf-cream);
}

.public-film-card-body {
    gap: 8px;
    min-height: 142px;
    padding: 15px;
}

.public-film-card-body strong {
    color: #ffffff;
    font-size: 18px;
    text-transform: uppercase;
}

.public-film-card-body small {
    color: rgba(255, 248, 220, 0.68);
}

.public-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.public-card-badges span {
    border: 1px solid rgba(216, 156, 36, 0.38);
    border-radius: 999px;
    color: var(--nmf-gold-light);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 7px;
}

.public-empty {
    border-color: rgba(216, 156, 36, 0.26);
    background: rgba(255, 255, 255, 0.045);
    color: rgba(255, 248, 220, 0.72);
}

.public-empty strong {
    color: #ffffff;
}

.public-film-detail {
    padding-top: 36px;
}

.public-film-head {
    align-items: center;
    border-bottom: 1px solid rgba(216, 156, 36, 0.24);
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    margin-bottom: 30px;
    min-height: 480px;
    padding: 34px 0 44px;
}

.public-detail-media {
    position: relative;
}

.public-detail-media::before {
    border: 1px solid rgba(216, 156, 36, 0.5);
    border-radius: 8px;
    content: "";
    inset: 14px -14px -14px 14px;
    position: absolute;
}

.public-detail-poster {
    position: relative;
    z-index: 1;
    border-color: rgba(216, 156, 36, 0.42);
    border-radius: 8px;
    box-shadow: 0 28px 75px rgba(0, 0, 0, 0.52);
}

.public-film-copy h1 {
    margin: 8px 0 10px;
    font-size: 68px;
    line-height: 0.96;
}

.public-back-link {
    color: var(--nmf-gold-light);
    text-decoration: none;
}

.public-back-link:hover {
    text-decoration: underline;
}

.public-original-title {
    color: rgba(255, 248, 220, 0.62);
    font-size: 18px;
}

.public-tagline {
    max-width: 760px;
    color: var(--nmf-cream);
    font-size: 22px;
}

.public-facts {
    gap: 9px;
    margin-top: 28px;
}

.public-facts div,
.public-creator-list div,
.public-info-list div,
.public-trailer,
.public-material-list a,
.public-release-list span {
    border-color: rgba(216, 156, 36, 0.22);
    background: rgba(255, 255, 255, 0.055);
}

.public-facts dt,
.public-creator-list dt,
.public-info-list dt {
    color: var(--nmf-gold);
}

.public-facts dd,
.public-creator-list dd,
.public-info-list dd {
    color: var(--nmf-cream);
}

.public-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    gap: 26px;
}

.public-section {
    border-top: 1px solid rgba(216, 156, 36, 0.22);
    padding-top: 20px;
}

.public-section h2 {
    color: #ffffff;
    font-family: var(--nmf-font-sans);
    font-size: 24px;
    text-transform: uppercase;
}

.public-rich-text {
    color: rgba(255, 248, 220, 0.78);
    font-size: 16px;
}

.public-trailer strong,
.public-material-list a,
.public-release-list span {
    color: var(--nmf-cream);
}

.public-trailer small {
    color: rgba(255, 248, 220, 0.62);
}

.public-trailer video {
    background: #050505;
}

.public-material-list a {
    text-decoration: none;
}

.public-material-list a:hover {
    border-color: rgba(255, 241, 168, 0.7);
    color: #ffffff;
}

@media (max-width: 760px) {
    .app-frame .global-bar {
        grid-template-columns: 36px minmax(0, 1fr);
        height: auto;
    }

    .brand-logo-app,
    .brand-logo-public {
        height: 42px;
        max-width: 78px;
    }

    .brand-product {
        min-height: 24px;
        padding-left: 9px;
        font-size: 10px;
    }

    .command-ribbon {
        top: 0;
        background: linear-gradient(180deg, var(--nmf-deep-cinematic-black), var(--nmf-projection-blue-black));
    }

    .sidebar {
        padding: 12px;
    }

    .sidebar .sidebar-section:first-of-type,
    .sidebar-divider {
        display: none;
    }

    .sidebar .sidebar-section:last-of-type {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .sidebar .sidebar-section:last-of-type p {
        grid-column: 1 / -1;
        margin: 0 0 2px;
    }

    .sidebar .sidebar-section:last-of-type .side-item {
        min-height: 42px;
        margin: 0;
        padding: 9px 10px;
    }

    .sidebar .sidebar-section:last-of-type .side-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .command-ribbon {
        flex-wrap: nowrap;
        min-height: 64px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .command-ribbon::-webkit-scrollbar {
        display: none;
    }

    .command-button {
        flex: 0 0 auto;
    }

    .public-shell .global-bar {
        grid-template-columns: 1fr;
        gap: 10px;
        height: auto;
        padding: 12px 16px;
    }

    .brand-logo-public {
        height: 46px;
        max-width: 110px;
    }

    .public-nav {
        justify-content: flex-start;
    }

    .public-hero,
    .public-film-head,
    .public-detail-grid,
    .public-info-list-wide {
        grid-template-columns: minmax(0, 1fr);
    }

    .public-hero {
        min-height: 0;
        padding: 34px 0 28px;
    }

    .public-hero-brand {
        min-height: 110px;
    }

    .public-hero h1,
    .public-film-copy h1 {
        font-size: 30px;
    }

    .public-film-head {
        min-height: 0;
    }

    .public-film-copy {
        order: -1;
    }

    .public-detail-media {
        width: min(360px, 100%);
        margin: 0 auto;
    }

    .public-detail-media::before {
        display: none;
    }
}

.metrics-grid.contract-metrics-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

@media (max-width: 1180px) {
    .metrics-grid.contract-metrics-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
.metrics-grid.contract-metrics-grid {
    grid-template-columns: 1fr;
}
}

/* Phase 4A planning and wizard workspace */
.primary-button svg,
.secondary-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.plan-metrics,
.plan-detail-metrics {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.plan-metrics {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.draft-list {
    display: grid;
}

.draft-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 18px;
}

.draft-row:last-child {
    border-bottom: 0;
}

.draft-row strong,
.draft-row small,
.plan-venues-panel td strong,
.plan-venues-panel td small,
.plan-list-header + .wide-table-wrap td strong,
.plan-list-header + .wide-table-wrap td small {
    display: block;
    overflow-wrap: anywhere;
}

.draft-row small,
.plan-venues-panel td small,
.plan-list-header + .wide-table-wrap td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.row-actions,
.plan-row-action-group,
.compact-status-command,
.inline-add-venue-form,
.plan-list-header,
.plan-list-header > div,
.plan-venues-header,
.plan-venues-header > div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.plan-list-header,
.plan-venues-header {
    justify-content: space-between;
}

.icon-button.danger-command {
    width: 36px;
    height: 36px;
    border: 1px solid #e3b1b1;
    border-radius: 6px;
    background: #fff7f7;
    color: #a61b1b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.compact-filter-form {
    display: flex;
    align-items: end;
    gap: 8px;
}

.compact-filter-form label {
    display: grid;
    gap: 4px;
}

.compact-filter-form label > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.title-status-line {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.title-status-line h1 {
    margin: 0;
}

.plan-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-status-command .form-control,
.inline-add-venue-form .form-control {
    min-width: 180px;
}

.plan-row-action-group {
    display: grid;
    min-width: 92px;
    justify-content: stretch;
    white-space: nowrap;
}

.plan-row-action-group > a,
.plan-row-action-group > form,
.plan-row-action-group button {
    width: 100%;
}

.plan-venues-panel table {
    min-width: 1080px;
}

.compact-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.status-pill.status-target,
.status-pill.status-expected,
.status-pill.status-on_hold {
    border-color: #b9c4d1;
    background: #f4f7fa;
    color: #34475a;
}

.status-pill.status-negotiation,
.status-pill.status-requested {
    border-color: #e3ca88;
    background: #fff9e8;
    color: #76520d;
}

.status-pill.status-agreed {
    border-color: #9ec9ad;
    background: #eff9f2;
    color: #176b35;
}

.status-pill.status-declined,
.status-pill.status-cancelled {
    border-color: #e3b1b1;
    background: #fff5f5;
    color: #a61b1b;
}

.status-pill.status-converted,
.status-pill.status-closed {
    border-color: #aeb9c8;
    background: #202d3a;
    color: #ffffff;
}

.warning-list {
    display: grid;
    gap: 6px;
}

.warning-list span {
    display: block;
}

.wizard-stepper {
    display: grid;
    grid-template-columns: repeat(6, minmax(118px, 1fr));
    margin-bottom: 16px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.wizard-stepper.programming-wizard-stepper {
    grid-template-columns: repeat(7, minmax(118px, 1fr));
}

.programming-wizard-layout .form-choice-list {
    align-content: flex-start;
    max-height: 320px;
    overflow-y: auto;
}

.programming-choice-field {
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.programming-choice-field legend {
    margin: 0 0 6px;
    padding: 0;
    color: #354155;
    font-size: 12px;
    font-weight: 700;
}

.programming-schedule-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 20px 24px 0;
    border: 1px solid var(--line-soft);
}

.programming-schedule-summary > div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    padding: 12px 14px;
}

.programming-schedule-summary > div:last-child {
    border-right: 0;
}

.programming-schedule-summary span,
.programming-schedule-summary strong {
    display: block;
    overflow-wrap: anywhere;
}

.programming-schedule-summary span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.programming-schedule-summary strong {
    margin-top: 3px;
    font-size: 13px;
}

.programming-venue-list {
    margin: 16px 24px 24px;
    border-top: 1px solid var(--line);
}

.programming-venue-block {
    border-bottom: 1px solid var(--line);
}

.programming-venue-block > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0 10px;
}

.programming-venue-block h3,
.programming-venue-block p {
    margin: 0;
}

.programming-venue-block h3 {
    font-size: 15px;
}

.programming-venue-block p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.programming-screen-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(0, 3fr);
    gap: 14px;
    border-top: 1px solid var(--line-soft);
    padding: 12px 0;
}

.programming-screen-name {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    padding-top: 21px;
}

.programming-screen-name svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: #8c681c;
    stroke-width: 2;
}

.programming-screen-name span,
.programming-screen-name strong,
.programming-screen-name small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.programming-screen-name strong {
    font-size: 13px;
}

.programming-screen-name small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.programming-day-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 9px;
}

.programming-day-fields label {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.programming-day-fields label > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.programming-time-input {
    min-width: 0;
}

.programming-review-list {
    border-top: 1px solid var(--line-soft);
}

.programming-review-row {
    display: grid;
    grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 0;
}

.programming-review-row.has-warning {
    border-left: 3px solid #c98417;
    padding-left: 10px;
}

.programming-review-row span,
.programming-review-row strong,
.programming-review-row small {
    display: block;
    overflow-wrap: anywhere;
}

.programming-review-row span,
.programming-review-row small {
    color: var(--muted);
    font-size: 10px;
}

.programming-review-row strong {
    margin-top: 2px;
    font-size: 12px;
}

.programming-row-errors {
    grid-column: 1 / -1;
    color: #a61b1b;
}

.programming-complete-state {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 24px 0;
    border-left: 3px solid #27844a;
    padding: 12px 14px;
    color: #176b35;
    background: #eff9f2;
}

.programming-complete-state svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.programming-complete-state strong,
.programming-complete-state span {
    display: block;
}

.programming-complete-state span {
    margin-top: 2px;
    font-size: 11px;
}

.programming-result-list {
    display: grid;
    margin: 12px 24px 20px;
    border-top: 1px solid var(--line-soft);
}

.programming-result-list .compact-row {
    color: inherit;
    text-decoration: none;
}

.programming-review-command {
    flex-wrap: wrap;
}

.effect-confirmation {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
}

.programming-derived-note,
.programming-locked-note {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: #405067;
    font-size: 12px;
}

.programming-derived-note {
    margin: -4px 24px 20px;
}

.programming-derived-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: #27844a;
    stroke-width: 2;
}

.programming-selection-group {
    min-width: 0;
    margin: 20px 24px;
    border-top: 1px solid var(--line);
}

.programming-selection-group > header {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0 10px;
}

.programming-selection-group h3,
.programming-selection-group p {
    margin: 0;
}

.programming-selection-group h3 {
    font-size: 15px;
}

.programming-selection-group p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.programming-chain-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    border-top: 1px solid var(--line-soft);
}

.programming-chain-choice {
    display: grid;
    min-width: 0;
    grid-template-columns: 20px 20px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 12px;
    cursor: pointer;
}

.programming-chain-choice:hover,
.programming-cinema-choice:hover {
    background: #fffbed;
}

.programming-chain-choice svg,
.programming-screen-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #8c681c;
    stroke-width: 2;
}

.programming-chain-choice span,
.programming-chain-choice strong,
.programming-chain-choice small,
.programming-cinema-choice span,
.programming-cinema-choice strong,
.programming-cinema-choice small,
.programming-cinema-choice em {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.programming-chain-choice strong,
.programming-cinema-choice strong {
    font-size: 12px;
}

.programming-chain-choice small,
.programming-cinema-choice small,
.programming-cinema-choice em {
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
}

.programming-venue-search {
    width: min(320px, 100%);
}

.programming-venue-search > span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.programming-cinema-options {
    border-top: 1px solid var(--line-soft);
}

.programming-cinema-choice {
    display: grid;
    min-width: 0;
    grid-template-columns: 22px minmax(180px, 1.35fr) repeat(3, minmax(130px, 1fr)) 64px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 11px 8px;
    cursor: pointer;
}

.programming-cinema-choice > span:not(.programming-cinema-primary) > small {
    margin-bottom: 2px;
    font-weight: 800;
    text-transform: uppercase;
}

.programming-cinema-choice em {
    margin-top: 2px;
}

.programming-screen-editor {
    min-width: 0;
    border-top: 1px solid var(--line-soft);
}

.programming-screen-editor.is-incompatible {
    color: var(--muted);
    background: #f7f8fa;
}

.programming-screen-toolbar {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.programming-screen-toggle {
    display: grid;
    min-width: 170px;
    grid-template-columns: 20px 20px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.programming-screen-toggle span,
.programming-screen-toggle strong,
.programming-screen-toggle small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.programming-screen-toggle strong {
    font-size: 13px;
}

.programming-screen-toggle small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.programming-screen-bulk {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 8px;
}

.programming-screen-bulk > label {
    display: grid;
    width: 112px;
    gap: 4px;
}

.programming-screen-bulk > label > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.programming-screen-bulk .form-control {
    height: 38px;
}

.programming-screen-bulk .secondary-button {
    min-height: 38px;
    white-space: normal;
}

.programming-screen-total {
    min-width: 58px;
    padding-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    text-align: right;
}

.programming-screen-total strong {
    color: var(--ink);
    font-size: 15px;
}

.programming-screen-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    padding: 0 0 14px 49px;
}

.programming-screen-days[hidden] {
    display: none;
}

.programming-day-editor {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: #ffffff;
}

.programming-day-editor > header {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--line-soft);
    padding: 8px 10px;
    background: #f8fafb;
}

.programming-day-editor > header strong,
.programming-day-editor > header small {
    display: block;
}

.programming-day-editor > header strong {
    font-size: 11px;
    text-transform: capitalize;
}

.programming-day-editor > header small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.programming-count-stepper {
    display: grid;
    grid-template-columns: 28px 52px 28px;
    align-items: stretch;
}

.programming-count-stepper button {
    display: grid;
    width: 28px;
    min-height: 36px;
    place-items: center;
    border: 1px solid #c8d0da;
    background: #ffffff;
    color: var(--ink);
    font-size: 17px;
    cursor: pointer;
}

.programming-count-stepper button:first-child {
    border-radius: 4px 0 0 4px;
}

.programming-count-stepper button:last-child {
    border-radius: 0 4px 4px 0;
}

.programming-count-stepper label span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.programming-count-stepper input {
    width: 52px;
    height: 36px;
    border: 1px solid #c8d0da;
    border-right: 0;
    border-left: 0;
    text-align: center;
}

.programming-time-slots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 8px;
    padding: 10px;
}

.programming-time-slots label {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.programming-time-slots label > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
}

.programming-time-slot {
    width: 100%;
    min-width: 0;
    height: 38px;
}

.programming-day-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-top: 1px solid var(--line-soft);
    padding: 7px 10px;
}

.programming-day-actions .view-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.programming-confirmation-list {
    border-top: 1px solid var(--line-soft);
}

.programming-confirmation-row {
    min-width: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 0;
}

.programming-confirmation-row.has-warning {
    border-left: 3px solid #c98417;
    padding-left: 10px;
}

.programming-confirmation-row > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.programming-confirmation-row > header strong,
.programming-confirmation-row > header small {
    display: block;
}

.programming-confirmation-row > header small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.programming-confirmation-values {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.programming-confirmation-values span,
.programming-confirmation-values strong,
.programming-confirmation-values small,
.programming-row-warnings small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.programming-confirmation-values span,
.programming-confirmation-values small,
.programming-row-warnings small {
    color: var(--muted);
    font-size: 9px;
}

.programming-confirmation-values span {
    font-weight: 800;
    text-transform: uppercase;
}

.programming-confirmation-values strong {
    margin-top: 3px;
    font-size: 11px;
}

.programming-row-warnings {
    margin-top: 8px;
    color: #76520d;
}

.wizard-step {
    display: grid;
    min-width: 118px;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border-right: 1px solid var(--line-soft);
    padding: 11px 12px;
    color: var(--muted);
    text-decoration: none;
}

.wizard-step:last-child {
    border-right: 0;
}

.wizard-step > span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #c6ced8;
    border-radius: 50%;
    background: #f6f8fa;
    font-size: 12px;
    font-weight: 800;
}

.wizard-step > span svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.wizard-step strong {
    overflow-wrap: anywhere;
    font-size: 12px;
}

.wizard-step.current {
    background: #fff9e7;
    color: #66470d;
    box-shadow: inset 0 -3px 0 var(--nmf-cinematic-gold);
}

.wizard-step.current > span {
    border-color: var(--nmf-cinematic-gold);
    background: var(--nmf-gold-highlight);
    color: var(--nmf-deep-cinematic-black);
}

.wizard-step.complete {
    color: #176b35;
}

.wizard-step.complete > span {
    border-color: #9ec9ad;
    background: #eff9f2;
}

.wizard-step.locked {
    color: #929ba6;
}

.wizard-layout {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 16px;
}

.wizard-surface {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.wizard-section-header {
    border-bottom: 1px solid var(--line-soft);
    padding: 20px 24px 16px;
}

.wizard-section-header > span {
    color: #76520d;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.wizard-section-header h2 {
    margin: 4px 0;
    font-size: 22px;
}

.wizard-section-header p {
    margin: 0;
    color: var(--muted);
}

.wizard-form-grid,
.review-summary-grid,
.wizard-review-section,
.wizard-surface > .alert {
    margin: 20px 24px;
}

.wizard-form-grid select[multiple] {
    min-height: 190px;
}

.wizard-command-bar {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line-soft);
    padding: 14px 24px;
    background: #f8fafb;
}

.wizard-command-bar > div {
    display: flex;
    gap: 8px;
}

.wizard-context {
    position: sticky;
    top: 156px;
    min-width: 0;
    border-left: 3px solid var(--nmf-cinematic-gold);
    padding: 4px 0 4px 16px;
}

.wizard-context h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.wizard-context dl,
.wizard-context dt,
.wizard-context dd {
    margin: 0;
}

.wizard-context dl {
    display: grid;
}

.wizard-context dl > div {
    border-bottom: 1px solid var(--line-soft);
    padding: 9px 0;
}

.wizard-context dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.wizard-context dd {
    margin-top: 3px;
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 700;
}

.wizard-save-state,
.side-effect-preview p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wizard-save-state {
    color: #176b35;
    font-size: 12px;
    font-weight: 700;
}

.wizard-save-state svg,
.side-effect-preview svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.review-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-soft);
    border-left: 1px solid var(--line-soft);
}

.review-summary-grid > div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 14px;
}

.review-summary-grid span,
.review-summary-grid strong,
.review-summary-grid small {
    display: block;
    overflow-wrap: anywhere;
}

.review-summary-grid span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.review-summary-grid strong {
    margin-top: 4px;
    font-size: 14px;
}

.review-summary-grid small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.wizard-review-section h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.venue-preview-list {
    display: grid;
    border-top: 1px solid var(--line-soft);
}

.venue-preview-row {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 11px 0;
}

.venue-preview-row.has-warning {
    border-left: 3px solid #c98417;
    padding-left: 10px;
}

.venue-preview-row span,
.venue-preview-row strong,
.venue-preview-row small {
    display: block;
    overflow-wrap: anywhere;
}

.venue-preview-row span,
.venue-preview-row small {
    color: var(--muted);
    font-size: 10px;
}

.venue-preview-row strong {
    margin-top: 2px;
    font-size: 12px;
}

.inherited-values-panel .review-summary-grid {
    margin: 0;
    border: 0;
}

.inherited-values-panel .review-summary-grid > div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

@media (max-width: 1180px) {
    .plan-metrics,
    .plan-detail-metrics {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }

    .wizard-layout {
        grid-template-columns: minmax(0, 1fr) 220px;
    }

    .plan-summary-grid {
        grid-template-columns: 1fr;
    }

    .venue-preview-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .programming-review-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .plan-metrics,
    .plan-detail-metrics,
    .review-summary-grid {
        grid-template-columns: 1fr;
    }

    .wizard-page-header,
    .plan-list-header,
    .plan-venues-header,
    .draft-row,
    .inline-add-venue-form,
    .compact-filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .compact-status-command {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: stretch;
    }

    .wizard-stepper {
        grid-template-columns: repeat(6, 126px);
    }

    .wizard-stepper.programming-wizard-stepper {
        grid-template-columns: repeat(7, 132px);
    }

    .wizard-layout {
        grid-template-columns: 1fr;
    }

    .wizard-context {
        position: static;
        order: -1;
        border-top: 1px solid var(--line-soft);
        border-left-width: 3px;
        padding: 12px 14px;
        background: #ffffff;
    }

    .wizard-context dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 12px;
    }

    .wizard-section-header,
    .wizard-form-grid,
    .review-summary-grid,
    .wizard-review-section,
    .wizard-surface > .alert {
        margin-right: 14px;
        margin-left: 14px;
    }

    .wizard-section-header {
        margin: 0;
        padding: 18px 14px 14px;
    }

    .wizard-command-bar {
        align-items: stretch;
        flex-direction: column-reverse;
        padding: 12px 14px;
    }

    .wizard-command-bar > div {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wizard-command-bar .primary-button,
    .wizard-command-bar .secondary-button {
        justify-content: center;
    }

    .venue-preview-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .programming-schedule-summary,
    .programming-review-row,
    .programming-screen-row {
        grid-template-columns: 1fr;
    }

    .programming-schedule-summary {
        margin-right: 14px;
        margin-left: 14px;
    }

    .programming-schedule-summary > div {
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .programming-schedule-summary > div:last-child {
        border-bottom: 0;
    }

    .programming-venue-list,
    .programming-result-list,
    .programming-complete-state {
        margin-right: 14px;
        margin-left: 14px;
    }

    .programming-screen-name {
        padding-top: 0;
    }

    .programming-day-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .programming-derived-note,
    .programming-selection-group {
        margin-right: 14px;
        margin-left: 14px;
    }

    .programming-selection-group > header,
    .programming-screen-toolbar,
    .programming-screen-bulk {
        align-items: stretch;
        flex-direction: column;
    }

    .programming-venue-search,
    .programming-screen-bulk > label,
    .programming-screen-bulk .secondary-button {
        width: 100%;
    }

    .programming-cinema-choice {
        grid-template-columns: 22px minmax(0, 1fr);
        align-items: start;
    }

    .programming-cinema-choice > span:not(.programming-cinema-primary) {
        grid-column: 2;
    }

    .programming-screen-days {
        grid-template-columns: 1fr;
        padding-left: 0;
    }

    .programming-screen-total {
        text-align: left;
    }

    .programming-confirmation-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .programming-review-command > .programming-locked-note,
    .programming-review-command > .effect-confirmation,
    .programming-review-command > .primary-button {
        width: 100%;
    }

    .programming-review-command {
        flex-direction: column;
    }

    .programming-review-command > .primary-button {
        justify-content: center;
    }

    .compact-status-command .form-control,
    .inline-add-venue-form .form-control {
        width: 100%;
        min-width: 0;
    }

    .plan-venues-panel table,
    .plan-venues-panel tbody,
    .plan-venues-panel tr,
    .plan-venues-panel td {
        display: block;
        width: 100%;
    }

    .plan-venues-panel thead {
        display: none;
    }

    .plan-venues-panel tbody tr {
        border-bottom: 1px solid var(--line);
        padding: 10px 14px;
    }

    .plan-venues-panel tbody tr:last-child {
        border-bottom: 0;
    }

    .plan-venues-panel tbody td {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        border: 0;
        padding: 6px 0;
        overflow-wrap: anywhere;
    }

    .plan-venues-panel tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .plan-venues-panel .plan-row-actions {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        justify-content: stretch;
        white-space: normal;
    }

    .plan-venues-panel .plan-row-action-group {
        display: grid;
        min-width: 0;
        gap: 6px;
        grid-column: 2;
    }

    .plan-venues-panel .plan-row-actions::before {
        grid-row: 1 / span 3;
    }
}

/* Booking confirmation and fulfillment */
.workspace-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #6d5518;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.registry-filter-bar {
    display: flex;
    align-items: end;
    gap: 10px;
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 16px;
    background: var(--panel-soft);
}

.registry-filter-bar label {
    display: grid;
    min-width: 190px;
    gap: 5px;
}

.registry-filter-bar label > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.confirmation-blockers {
    border-left: 4px solid #b42318;
}

.operational-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 15px 22px 17px 38px;
    color: var(--ink);
    font-size: 13px;
}

.confirmation-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.effect-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-soft);
    border-left: 1px solid var(--line-soft);
}

.effect-grid > div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 16px;
}

.effect-grid span,
.effect-grid strong {
    display: block;
    overflow-wrap: anywhere;
}

.effect-grid span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.effect-grid strong {
    margin-top: 5px;
    font-size: 13px;
}

.confirmation-command-bar {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.table-subline {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

a.status-pill {
    text-decoration: none;
}

.fulfillment-create-panel .form-command-bar {
    border-top: 1px solid var(--line-soft);
    box-shadow: none;
}

@media (max-width: 960px) {
    .confirmation-summary-grid,
    .effect-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .registry-filter-bar,
    .panel-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .registry-filter-bar label,
    .registry-filter-bar .secondary-button {
        width: 100%;
        min-width: 0;
    }

    .confirmation-summary-grid,
    .effect-grid {
        grid-template-columns: 1fr;
    }

    .confirmation-command-bar {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .confirmation-command-bar .primary-button,
    .confirmation-command-bar .secondary-button {
        justify-content: center;
        width: 100%;
    }
}

.reporting-filter-bar {
    display: grid;
    grid-template-columns: minmax(150px, 0.6fr) minmax(180px, 0.8fr) minmax(260px, 1.8fr) auto;
}

.reporting-filter-bar label {
    min-width: 0;
}

.reporting-negative {
    color: #b42318;
}

.reporting-warning {
    color: #9a6700;
}

.reporting-method-panel .panel-header p {
    max-width: 960px;
}

.task-queue-table tbody tr td:first-child {
    border-left: 3px solid transparent;
}

.task-queue-table tbody tr.task-priority-critical td:first-child {
    border-left-color: #b42318;
}

.task-queue-table tbody tr.task-priority-high td:first-child {
    border-left-color: #dc6803;
}

.task-queue-table tbody tr.task-priority-medium td:first-child {
    border-left-color: #d4a72c;
}

.status-critical {
    border-color: #fecdca;
    background: #fee4e2;
    color: #b42318;
}

.status-high {
    border-color: #ffd6ae;
    background: #fff1e6;
    color: #b54708;
}

.status-medium {
    border-color: #f4e49a;
    background: #fff8db;
    color: #7a5d00;
}

.status-low {
    border-color: #b7ddb8;
    background: #edf7ed;
    color: #236b2c;
}

@media (max-width: 900px) {
    .reporting-filter-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .mobile-stack-table,
    .mobile-stack-table tbody,
    .mobile-stack-table tr,
    .mobile-stack-table td {
        display: block;
        width: 100%;
    }

    .mobile-stack-table thead {
        display: none;
    }

    .mobile-stack-table tbody tr {
        border-bottom: 1px solid var(--line);
        padding: 9px 14px;
    }

    .mobile-stack-table tbody tr:last-child {
        border-bottom: 0;
    }

    .mobile-stack-table tbody td {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        border: 0;
        padding: 6px 0;
        overflow-wrap: anywhere;
    }

    .mobile-stack-table tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .mobile-stack-table .row-action-cell::before {
        content: "Действие";
    }

    .mobile-stack-table .row-action-cell .edit-button {
        justify-content: center;
        width: 100%;
    }
}

.report-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.report-tab {
    min-width: 0;
    padding: 12px 14px;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.report-tab:last-child {
    border-right: 0;
}

.report-tab:hover,
.report-tab.active {
    background: #fff8db;
    color: var(--ink);
}

.report-tab.active {
    box-shadow: inset 0 -3px 0 var(--gold);
}

.performance-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.performance-filter-grid label,
.schedule-form-grid label {
    min-width: 0;
}

.saved-view-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--line);
}

.saved-view-links > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.saved-view-links a {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.saved-view-links a:hover,
.saved-view-links a.active {
    border-color: var(--gold);
    background: #fff8db;
}

.report-action-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 0;
}

.report-save-form,
.report-export-command {
    min-width: 0;
    padding: 20px;
}

.report-save-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: end;
    gap: 14px;
    border-right: 1px solid var(--line);
}

.report-save-form label > span,
.schedule-form-grid label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.report-save-form .checkbox-line {
    align-self: center;
    margin-top: 20px;
}

.report-save-form .checkbox-line span {
    display: inline;
    margin: 0;
}

.report-export-command {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.report-export-command > svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--gold-strong);
    stroke-width: 1.7;
}

.report-export-command div {
    display: grid;
    gap: 3px;
}

.report-export-command span {
    color: var(--muted);
    font-size: 12px;
}

.export-filter-snapshot > div,
.reporting-method-panel .effect-grid > div {
    min-width: 0;
}

.export-column-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.export-column-list > span {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    padding: 13px 18px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.export-column-list > span:nth-child(4n) {
    border-right: 0;
}

.export-column-list > span:nth-last-child(-n + 4) {
    border-bottom: 0;
}

.export-column-list strong {
    color: var(--gold-strong);
}

.export-column-list small {
    grid-column: 2;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.command-review-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
}

.command-review-panel h2,
.command-review-panel p {
    margin: 4px 0 0;
}

.schedule-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.schedule-form-grid .checkbox-field {
    align-self: center;
}

.schedule-form-grid .checkbox-field input {
    width: 20px;
    height: 20px;
}

.table-command-group {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.table-command-group form {
    margin: 0;
}

.table-command-group button {
    cursor: pointer;
}

.mono-wrap {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
    .performance-filter-grid,
    .schedule-form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-action-grid {
        grid-template-columns: 1fr;
    }

    .report-save-form {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 760px) {
    .report-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-tab:nth-child(2) {
        border-right: 0;
    }

    .report-tab:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .performance-filter-grid,
    .schedule-form-grid,
    .report-save-form {
        grid-template-columns: 1fr;
    }

    .report-save-form .checkbox-line {
        margin-top: 0;
    }

    .report-export-command {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .report-export-command .primary-button {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .export-column-list {
        grid-template-columns: 1fr;
    }

    .export-column-list > span,
    .export-column-list > span:nth-child(4n),
    .export-column-list > span:nth-last-child(-n + 4) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .export-column-list > span:last-child {
        border-bottom: 0;
    }

    .command-review-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .command-review-panel .primary-button {
        justify-content: center;
        width: 100%;
    }

    .table-command-group {
        flex-direction: column;
        width: 100%;
    }

    .table-command-group .edit-button {
        width: 100%;
    }
}

/* Keep integration tabs horizontally scannable after the shared mobile rules. */
@media (max-width: 760px) {
    .workspace-tabs.integration-workspace-tabs {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(142px, 1fr);
        overflow-x: auto;
    }

    .workspace-tabs.integration-workspace-tabs a,
    .workspace-tabs.integration-workspace-tabs a:last-child {
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }
}

/* Phase 4A S08 bulk booking review */
.plan-venue-commands,
.bulk-booking-start-form,
.bulk-booking-venue > header,
.bulk-booking-venue > header > div,
.bulk-booking-result-list a,
.bulk-booking-confirmation label {
    display: flex;
    min-width: 0;
    align-items: center;
}

.plan-venue-commands {
    justify-content: flex-end;
    gap: 8px;
}

.bulk-booking-start-form {
    margin: 0;
}

.bulk-selection-count {
    display: grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid rgb(17 17 17 / 22%);
    border-radius: 4px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 800;
}

.bulk-select-cell {
    width: 42px;
    text-align: center;
}

.bulk-select-cell .form-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
}

.bulk-booking-review-form,
.bulk-booking-review-head,
.bulk-booking-venue-list,
.bulk-booking-result-list {
    min-width: 0;
}

.bulk-booking-review-head {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.review-summary-grid.bulk-booking-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    border: 0;
}

.review-summary-grid.bulk-booking-summary > div:last-child {
    border-right: 0;
}

.bulk-booking-venue-list {
    display: grid;
    gap: 12px;
    margin: 14px 0;
}

.bulk-booking-venue {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.bulk-booking-venue.is-blocked {
    border-left: 4px solid #b42318;
}

.bulk-booking-venue > header {
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 16px;
    background: #f8fafb;
}

.bulk-booking-venue > header > div {
    gap: 10px;
}

.bulk-booking-venue > header strong,
.bulk-booking-venue > header small,
.bulk-booking-resolved-grid span,
.bulk-booking-resolved-grid strong,
.bulk-booking-resolved-grid small,
.bulk-booking-result-list strong,
.bulk-booking-result-list small {
    display: block;
    overflow-wrap: anywhere;
}

.bulk-booking-venue > header small,
.bulk-booking-resolved-grid span,
.bulk-booking-resolved-grid small,
.bulk-booking-result-list small {
    color: var(--muted);
    font-size: 10px;
}

.bulk-booking-row-number {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border: 1px solid #cfb76f;
    border-radius: 4px;
    background: #fff8db;
    color: #674c0f;
    font-size: 11px;
    font-weight: 800;
}

.bulk-booking-blockers {
    display: grid;
    gap: 4px;
    border-bottom: 1px solid #efc7c3;
    padding: 11px 16px;
    background: #fff6f5;
    color: #852019;
    font-size: 12px;
}

.bulk-booking-blockers a {
    width: fit-content;
    margin-top: 3px;
    color: #6c1813;
    font-weight: 800;
}

.bulk-booking-resolved-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-bottom: 1px solid var(--line-soft);
}

.bulk-booking-resolved-grid > div {
    min-width: 0;
    border-right: 1px solid var(--line-soft);
    padding: 12px 14px;
}

.bulk-booking-resolved-grid > div:last-child {
    border-right: 0;
}

.bulk-booking-resolved-grid span {
    font-weight: 800;
    text-transform: uppercase;
}

.bulk-booking-resolved-grid strong {
    margin-top: 4px;
    font-size: 12px;
}

.bulk-booking-resolved-grid small {
    margin-top: 3px;
}

.bulk-booking-override-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 16px 16px;
}

.bulk-booking-override-grid .form-field {
    min-width: 0;
}

.bulk-booking-override-grid .form-field > span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.bulk-booking-override-grid .form-control {
    width: 100%;
    min-width: 0;
}

.bulk-booking-override-grid .bulk-booking-reason {
    grid-column: 1 / -1;
}

.bulk-booking-effects {
    margin: 14px 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.bulk-booking-effects h2 {
    margin: 0 0 10px;
    font-size: 15px;
}

.bulk-booking-effects p {
    margin: 7px 0;
    font-size: 12px;
}

.bulk-booking-confirmation {
    border: 1px solid #d5c170;
    border-radius: 6px;
    padding: 14px 16px;
    background: #fffbed;
}

.bulk-booking-confirmation label {
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
}

.bulk-booking-confirmation .form-checkbox {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.bulk-booking-command-bar {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.bulk-booking-complete {
    overflow: hidden;
}

.bulk-booking-complete .bulk-booking-summary {
    margin: 20px 24px;
    border-top: 1px solid var(--line-soft);
    border-left: 1px solid var(--line-soft);
}

.bulk-booking-result-list {
    margin: 0 24px 24px;
    border-top: 1px solid var(--line-soft);
}

.bulk-booking-result-list a {
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 4px;
    color: var(--ink);
    text-decoration: none;
}

.bulk-booking-result-list a:hover {
    background: #fffbed;
}

@media (max-width: 1180px) {
    .bulk-booking-resolved-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bulk-booking-resolved-grid > div:nth-child(2n) {
        border-right: 0;
    }

    .bulk-booking-resolved-grid > div:last-child {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line-soft);
    }
}

@media (max-width: 760px) {
    .plan-venue-commands,
    .bulk-booking-page-header,
    .bulk-booking-venue > header {
        align-items: stretch;
        flex-direction: column;
    }

    .plan-venue-commands,
    .bulk-booking-start-form,
    .bulk-booking-start-form .primary-button {
        width: 100%;
    }

    .bulk-booking-start-form .primary-button {
        justify-content: center;
    }

    .plan-venues-panel tbody td.bulk-select-cell {
        grid-template-columns: 92px 18px;
    }

    .plan-venues-panel table {
        min-width: 0;
    }

    .plan-venues-panel tbody td.bulk-select-cell.is-empty {
        display: none;
    }

    .review-summary-grid.bulk-booking-summary,
    .bulk-booking-resolved-grid,
    .bulk-booking-override-grid {
        grid-template-columns: 1fr;
    }

    .review-summary-grid.bulk-booking-summary > div,
    .bulk-booking-resolved-grid > div,
    .bulk-booking-resolved-grid > div:nth-child(2n),
    .bulk-booking-resolved-grid > div:last-child {
        grid-column: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
        border-top: 0;
    }

    .review-summary-grid.bulk-booking-summary > div:last-child,
    .bulk-booking-resolved-grid > div:last-child {
        border-bottom: 0;
    }

    .bulk-booking-override-grid .bulk-booking-reason {
        grid-column: auto;
    }

    .bulk-booking-command-bar > div {
        grid-template-columns: 1fr;
    }

    .bulk-booking-confirmation label {
        align-items: flex-start;
    }

    .bulk-booking-complete .bulk-booking-summary,
    .bulk-booking-result-list {
        margin-right: 14px;
        margin-left: 14px;
    }
}
