:root {
    --background: #f8fafb;
    --surface: #fff;
    --surface-muted: #f1f4f6;
    --ink: #131d2d;
    --ink-muted: #59677b;
    --brand: #007c76;
    --brand-dark: #125353;
    --brand-soft: #e6f4f2;
    --border: #dde4e9;
    --shadow: none;
}

body { background: var(--background); font-size: 15px; }
.login-form form > label { margin-bottom: .5rem; }
.login-form form > input + label { margin-top: 1.25rem; }
.login-form form > button { margin-top: 1.25rem; }
.login-form > .muted { margin-top: 1rem; }
.app-shell { grid-template-columns: 14.75rem minmax(0, 1fr); }
.app-workspace { grid-template-columns: minmax(0, 1fr); width: 100%; }
.app-sidebar { background: #1b2930; padding: 1.75rem .8rem; }
.brand { font-size: 1.4rem; }
.brand-mark { background: transparent; border: 1px solid #7ca29e; border-radius: .25rem; }
.brand-symbol, .nav-symbol { flex: 0 0 auto; filter: brightness(0) invert(1); }
.brand-symbol { width: 2rem; height: 2rem; }
.nav-symbol { width: 1.25rem; height: 1.25rem; opacity: .92; }
.kpi-symbol { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; filter: invert(34%) sepia(81%) saturate(1313%) hue-rotate(139deg) brightness(87%) contrast(101%); }
.kpi-symbol-warning { filter: invert(43%) sepia(81%) saturate(1266%) hue-rotate(5deg) brightness(88%) contrast(102%); }
.brand small { font-size: .8rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.primary-navigation { gap: .55rem; margin-top: 3.4rem; }
.primary-navigation a { min-height: 3.25rem; padding: .8rem 1.1rem; font-size: .96rem; }
.primary-navigation a.active { background: #076862; border-color: #16847d; }
.main-content { width: min(100% - 3.5rem, 94rem); padding-top: 2.5rem; }
.app-header { min-height: 4.5rem; background: #fff; backdrop-filter: none; }
.app-footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem; }
.user-tools { display: flex; align-items: center; gap: 1rem; }
.user-tools form { margin: 0; }
.operator-badge { background: transparent; border: 0; font-size: .95rem; }
.operator-badge small { font-size: .75rem; }
.button-link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: .5rem 0; text-decoration: underline; text-underline-offset: .2rem; }
.button-link:disabled { color: #75818c; cursor: wait; }
.button { border-radius: .3rem; font-size: .92rem; min-height: 2.9rem; font-weight: 600; }
.button-danger { color: #a02836; background: #fff3f4; border-color: #ecc2c7; }
.button-danger:hover { background: #f9dfe3; }
.page-heading { align-items: flex-start; gap: 1.4rem; margin-bottom: 2rem; }
.page-heading h1 { font-size: clamp(1.9rem, 2.7vw, 2.9rem); line-height: 1.12; letter-spacing: -.055em; font-weight: 750; }
.page-introduction { font-size: 1rem; max-width: 55rem; margin-top: .9rem; }
.page-actions { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; max-width: 29rem; }
.page-actions .live-button { font-size: .8rem; min-height: 2rem; }
.eyebrow { font-size: .76rem; letter-spacing: .065em; }
.kpi-grid { gap: 0; padding: 1.3rem 0; border-block: 1px solid var(--border); margin: 0 0 2rem; }
.kpi-card { border: 0; border-right: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: .8rem 1.6rem; min-height: 5rem; background: transparent; }
.kpi-card:last-child { border: 0; }
.kpi-card strong { font-size: 2.4rem; font-weight: 650; margin-bottom: .4rem; }
.kpi-card:nth-child(3) strong { color: #b96808; }
.kpi-card span:last-child { font-size: .93rem; }
.section-card { border-radius: .4rem; box-shadow: none; min-width: 0; }
.section-heading h2, h2 { font-size: 1.35rem; letter-spacing: -.025em; }
.section-heading { padding: 1.2rem 1.3rem; }
.cockpit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18.5rem; gap: 1.4rem; align-items: start; }
.cockpit-grid .section-card { border: 0; background: transparent; }
.cockpit-grid .section-heading { padding: .3rem 0 1rem; }
.priority-panel { border-left: 1px solid var(--border); padding-left: 1.4rem; }
.priority-panel h2 { margin-bottom: 1.2rem; }
.priority-card { padding: 1.15rem; background: #fff6eb; border: 1px solid #f3debf; border-radius: .35rem; margin-bottom: 1rem; }
.priority-card p { margin: .8rem 0 .3rem; }
.priority-card > span { display: block; color: var(--ink-muted); }
.priority-card .button { display: flex; margin-top: 1rem; }
.priority-footnote { color: var(--ink-muted); border-top: 1px solid var(--border); padding-top: 1rem; font-size: .85rem; }
.supervision-toolbar { padding: .3rem 0 1rem; grid-template-columns: minmax(12rem, 1.8fr) minmax(8rem, 1fr); background: transparent; border: 0; gap: .75rem; }
.filter-search { grid-column: 1 / -1; }
.filter-reset { align-self: end; }
.filter-field label { font-size: .79rem; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 550; }
.filter-field input, .filter-field select { margin-top: 0; }
.filter-summary { padding: .3rem 0 .5rem; min-height: 2.3rem; background: transparent; }
.filter-summary strong { min-width: 1.5rem; height: 1.5rem; font-size: .8rem; }
.registration-main { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.02rem; letter-spacing: .03em; white-space: nowrap; }
.receptions-table .reference-secondary { font-size: .76rem; font-weight: 400; overflow-wrap: anywhere; }
.receptions-table { min-width: 0; width: 100%; }
.receptions-table th { font-size: .8rem; text-transform: none; background: #f0f3f6; letter-spacing: 0; }
.receptions-table th, .receptions-table td { padding: 1rem .7rem; vertical-align: top; }
.receptions-table td { font-size: .9rem; }
.receptions-table td small { display: block; margin-top: .25rem; color: var(--ink-muted); }
.receptions-table .detail-link { white-space: normal; font-size: .88rem; line-height: 1.4; }
.badge { font-size: .75rem; font-weight: 500; border-radius: .25rem; padding: .3rem .5rem; }
.badge-neutral { color: #45566a; background: #edf1f5; border-color: #e0e5eb; }
.badge-warning { color: #9c5800; background: #fff2da; border-color: #ead3a9; }
.muted { color: var(--ink-muted); }
.error-text { color: #a02836; }
.break-word { overflow-wrap: anywhere; }
.notice { padding: 1rem 1.2rem; margin-block: 1rem; background: #eef4f6; border: 1px solid #d7e2e7; border-radius: .35rem; }
.notice-error { color: #902834; background: #fff1f2; border-color: #eebfc7; }
.notice-success { color: #186258; background: #eaf6f2; border-color: #c5e3d9; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(17rem, 1fr); gap: 1.3rem; align-items: start; margin-bottom: 1.3rem; }
.form-card, .guidance-card { padding: 1.6rem; margin-bottom: 1.3rem; }
.form-card > h2, .guidance-card > h2 { margin-top: 0; }
.form-card .section-heading { padding: 0 0 1rem; }
.form-card .table-scroll { margin-top: 1.3rem; }
.form-card .receptions-table { min-width: 36rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 1.2rem; font-weight: 650; margin-bottom: 1.2rem; padding: 0; }
label { display: block; font-size: .88rem; font-weight: 550; margin-bottom: 1rem; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #bbc7d2; border-radius: .3rem; padding: .7rem .8rem; min-height: 2.8rem; width: 100%; margin-top: .4rem; }
input:disabled, select:disabled, textarea:disabled { background: #f0f3f5; color: #677383; }
input[readonly] { background: #f5f7f9; }
input[type=checkbox] { width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0; accent-color: var(--brand); }
input[type=file] { line-height: 1.7; font-size: .88rem; }
textarea { resize: vertical; }
.checkbox-label { display: flex; align-items: center; gap: .7rem; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 1rem; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-two { grid-column: 1 / -1; }
.form-footer { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1.1rem; flex-wrap: wrap; }
.profile-guide dt { font-weight: 650; padding-top: 1rem; }
.profile-guide dd { margin: .3rem 0 1rem; color: var(--ink-muted); line-height: 1.6; }
.operations-card, .history-card { padding: 1.5rem; margin-top: 1.4rem; }
.operations-card .section-heading { padding: 0 0 1rem; }
.checklist-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.2rem; border-block: 1px solid var(--border); padding: 1.2rem 0; margin-bottom: 1.3rem; }
.checklist-grid > div { min-width: 0; }
.checklist-grid > div > strong { display: block; margin-bottom: .7rem; }
.checklist-grid p, .checklist-grid > div > span { color: var(--ink-muted); font-size: .87rem; }
.checklist { list-style: none; padding: 0; margin: .8rem 0 0; }
.checklist li { display: flex; gap: .5rem; justify-content: space-between; padding-block: .35rem; font-size: .86rem; border-bottom: 1px solid var(--border); }
.checklist li strong { font-weight: 500; }
.action-grid { display: flex; flex-wrap: wrap; gap: .65rem; }
.operation-form { margin-top: 1.5rem; border: 1px solid #b9d9d6; background: #f6fbfa; padding: 1.25rem; border-radius: .35rem; }
.anomaly-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.anomaly-list > article { margin: 0; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.history-list li > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.history-list span { font-size: .8rem; color: var(--ink-muted); }
.history-list p { font-size: .9rem; margin-bottom: 0; }
.documents-layout { display: grid; grid-template-columns: minmax(18rem, .9fr) minmax(0, 1.5fr); gap: 1.3rem; align-items: start; }
.dossier-picker { list-style: none; padding: 0; margin: 0; max-height: 36rem; overflow-y: auto; }
.dossier-picker button { display: block; text-align: left; width: 100%; border: 0; border-bottom: 1px solid var(--border); padding: 1rem; background: #fff; cursor: pointer; font: inherit; }
.dossier-picker button:hover, .dossier-picker button.selected { background: var(--brand-soft); }
.dossier-picker button span { display: block; color: var(--ink-muted); font-size: .85rem; margin-top: .2rem; }
.document-library { list-style: none; margin: 0; padding: 0; }
.document-library li { display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.document-library span, .document-library small { display: block; color: var(--ink-muted); margin-top: .3rem; }
.connections-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 1fr); gap: 1.3rem; align-items: start; }
.integration-row { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.integration-row > div { flex: 1; min-width: 12rem; }
.integration-row p { font-size: .9rem; color: var(--ink-muted); margin: .4rem 0 0; }
.integration-row > a { font-size: .88rem; font-weight: 550; }
.code-block { display: block; overflow: auto; padding: 1rem; background: #f0f3f6; border: 1px solid var(--border); border-radius: .3rem; font-size: .82rem; overflow-wrap: anywhere; }
.api-routes dt { margin-top: 1rem; font-weight: 550; }
.api-routes dd { margin: .4rem 0; font-size: .8rem; overflow-wrap: anywhere; }
details { margin-top: 1rem; }
summary { cursor: pointer; color: var(--brand); font-weight: 550; }
.secret-panel textarea { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.login-page { display: grid; min-height: 100vh; grid-template-columns: 1fr 1fr; }
.login-story { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 5rem); background: #1b2930; color: #fff; }
.login-story .brand { display: block; }
.login-story .brand small { display: block; margin-top: .4rem; color: #bdcece; }
.login-story h1 { font-size: clamp(2.5rem, 4.5vw, 4.5rem); letter-spacing: -.05em; line-height: 1.07; }
.login-story .eyebrow { color: #8fd9cb; }
.login-story p { max-width: 30rem; color: #c6d3d7; line-height: 1.8; }
.login-form { width: min(100%, 34rem); padding: 3rem; margin: auto; }
.login-form h2 { font-size: 2rem; }
.login-form form { margin-top: 2rem; }
.login-form .button { width: 100%; margin-top: .4rem; }
.login-form > p { color: var(--ink-muted); }

@media (min-width: 68.75rem) {
    .main-content { padding-top: 1.8rem; }
    .page-heading { margin-bottom: 1.2rem; }
    .page-introduction { margin-top: .6rem; }
    .kpi-grid { padding-block: .9rem; margin-bottom: 1.4rem; }
    .kpi-card { padding-block: .5rem; }
    .cockpit-grid .receptions-table td { padding-block: .65rem; }
    .supervision-toolbar { grid-template-columns: minmax(10rem, 1.4fr) minmax(7rem, 1fr) minmax(7rem, 1fr) auto; gap: .6rem; }
    .filter-search { grid-column: auto; }
    .filter-reset { font-size: .8rem; padding-inline: .65rem; min-height: 2.75rem; }
}
@media (max-width: 82rem) { .cockpit-grid { grid-template-columns: 1fr; } .priority-panel { border-left: 0; padding: 1.3rem 0 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } .priority-panel h2, .priority-footnote { grid-column: 1 / -1; margin: 0; } .page-heading { flex-wrap: wrap; } .page-actions { justify-content: flex-start; max-width: none; } }
@media (max-width: 60rem) {
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar { position: static; display: block; height: auto; padding: 1rem; }
    .primary-navigation { display: flex; flex-direction: row; flex-wrap: wrap; margin: 1rem 0 0; gap: .35rem; }
    .primary-navigation a { min-height: 2.7rem; padding: .5rem .8rem; }
    .sidebar-context { display: none; }
    .main-content { width: calc(100% - 2rem); padding-top: 1.5rem; }
    .form-layout, .connections-grid, .documents-layout { grid-template-columns: 1fr; }
    .checklist-grid { grid-template-columns: 1fr 1fr; }
    .form-card .table-scroll { overflow-x: auto; padding: 0; }
    .form-card .receptions-table { display: table; width: 100%; min-width: 36rem; }
    .form-card .receptions-table thead { position: static; display: table-header-group; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
    .form-card .receptions-table tbody { display: table-row-group; }
    .form-card .receptions-table tr { display: table-row; padding: 0; border: 0; box-shadow: none; }
    .form-card .receptions-table td { display: table-cell; padding: 1rem .7rem; border-bottom: 1px solid var(--border); }
    .form-card .receptions-table td::before { content: none; }
}
@media (max-width: 42rem) {
    .main-content { width: calc(100% - 1.25rem); }
    .app-header { padding-inline: .6rem; }
    .user-tools { width: 100%; justify-content: space-between; gap: .5rem; }
    .operator-badge { margin: 0; padding: 0; }
    .page-heading h1 { font-size: 2rem; }
    .page-actions { width: 100%; }
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 1rem 0; }
    .kpi-card { padding: .6rem .8rem; }
    .kpi-symbol { width: 1.75rem; height: 1.75rem; }
    .nav-symbol { display: none; }
    .kpi-card:nth-child(2) { border: 0; }
    .kpi-card strong { font-size: 2rem; }
    .kpi-card span:last-child { font-size: .85rem; }
    .priority-panel, .form-grid, .three-columns, .checklist-grid, .anomaly-list { grid-template-columns: 1fr; }
    .form-card, .guidance-card, .operations-card, .history-card { padding: 1.1rem; }
    .history-list li > div, .document-library li { align-items: flex-start; flex-direction: column; gap: .5rem; }
    .action-grid .button { width: 100%; }
    .form-footer .button { flex: 1; }
    .login-page { grid-template-columns: 1fr; }
    .login-story { padding: 1.5rem; min-height: 18rem; gap: 1rem; }
    .login-story h1 { font-size: 2.3rem; }
    .login-story > p, .login-story div > p:last-child { display: none; }
    .login-form { padding: 2rem 1.5rem; }
}
