:root {
    /* Keyora Design System V1 – semantic tokens for all application components. */
    --color-primary-900: #05265c;
    --color-primary-700: #075fc0;
    --color-primary-100: #e8f3ff;
    --color-surface: #ffffff;
    --color-canvas: #f7f9fc;
    --color-text: #081936;
    --color-text-muted: #64748b;
    --color-border: #e1e8f2;
    --color-success: #047857;
    --color-warning: #9a4d16;
    --color-danger: #b42318;
    --focus-ring: 0 0 0 3px rgba(6,114,216,.32);
    --radius-card: 12px;
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
    --bg: #f7f9fc;
    --ink: #081936;
    --muted: #64748b;
    --panel: #ffffff;
    --line: #e1e8f2;
    --line-soft: #edf2f7;
    --accent: #0672d8;
    --accent-dark: #05265c;
    --accent-soft: #e8f3ff;
    --accent-2: #d97706;
    --success: #047857;
    --danger: #b42318;
    --shadow-soft: 0 12px 34px rgba(8, 25, 54, .032);
    --shadow-panel: 0 18px 46px rgba(8, 25, 54, .04);
}

:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.shell-menu-toggle { display: none; }
.global-search input { width: min(360px, 25vw); min-height: 40px; }
.key-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.key-timeline li { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--line-soft); }
.key-timeline li::before { content: ''; grid-column: 1; width: 10px; height: 10px; margin: 5px 0 0 132px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.key-timeline time { grid-column: 1; grid-row: 1; color: var(--muted); font-size: 13px; }
.key-timeline li > div { grid-column: 2; grid-row: 1; }.key-timeline p { margin: 3px 0 0; }

* { box-sizing: border-box; }
body {
    margin: 0;
    background: linear-gradient(180deg, #fbfdff 0%, var(--bg) 260px);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 268px;
    flex: 0 0 268px;
    background: linear-gradient(180deg, #041c44 0%, #07275b 56%, #06336c 100%);
    color: #f7fbf8;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 800; font-size: 22px; margin-bottom: 32px; }
.brand span {
    overflow: hidden;
    white-space: nowrap;
}
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; background: #fff; }
.login-brand {
    max-width: 240px;
    margin-bottom: 28px;
}
.login-brand img {
    width: 64px;
    height: 64px;
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 18px 45px rgba(6, 114, 216, .14);
}
.brand-icon {
    width: 38px; height: 38px; border-radius: 8px;
    background: #e9b44c; color: #10251f;
    display: grid; place-items: center;
}
nav { display: grid; gap: 7px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; color: #dce7f7; }
nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-group {
    display: grid;
    gap: 6px;
}
.nav-group-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 6px;
    align-items: center;
}
.nav-subtoggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #b8d8ff;
    font-size: 18px;
    line-height: 1;
}
.nav-subtoggle:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
}
.settings-nav.is-closed .subnav {
    display: none;
}
.subnav {
    display: grid;
    gap: 4px;
    margin: -2px 0 6px 38px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,.18);
}
.subnav a {
    padding: 8px 10px;
    color: #b8d8ff;
    font-size: 13px;
}
.subnav-label {
    padding: 4px 10px 2px;
    color: rgba(255,255,255,.58);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.nav-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: rgba(255,255,255,.12);
    display: grid;
    place-items: center;
    color: #b8d8ff;
    font-size: 16px;
    font-weight: 800;
}
.nav-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.main { flex: 1; padding: 30px clamp(22px, 3vw, 42px); min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: 28px; font-weight: 800; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.userbox { display: flex; align-items: center; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
}
.card { padding: 16px; }
.card span { color: var(--muted); }
.card strong { display: block; font-size: 26px; margin-top: 6px; }
.panel { padding: 18px; margin-bottom: 16px; }
.panel.compact { padding: 16px; }
.panel h2 { margin-top: 0; font-size: 19px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.list-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}
.list-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: var(--muted);
    font-weight: 700;
}
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.pagination span {
    color: var(--muted);
    font-weight: 700;
}
.data-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.edit-row {
    display: none;
}
.edit-row:target {
    display: table-row;
}
.edit-row td {
    background: #f8fbff;
}
.button, button {
    border: 0;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    padding: 9px 13px;
    font-weight: 700;
    cursor: pointer;
}
.button.big { padding: 12px 16px; font-size: 15px; }
.button:hover, button:hover { filter: brightness(.96); }
.button.secondary { background: var(--accent-2); }
.button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.button.danger { background: var(--danger); }
.field-help {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-left: 5px;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
}
.field-help::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    z-index: 20;
    width: min(280px, 72vw);
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow-panel);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}
.field-help::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    z-index: 21;
    width: 9px;
    height: 9px;
    background: var(--ink);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    transition: opacity .15s ease;
}
.field-help:hover::after,
.field-help:focus::after,
.field-help:hover::before,
.field-help:focus::before {
    opacity: 1;
}
.field-help:hover::after,
.field-help:focus::after {
    transform: translateX(-50%) translateY(0);
}
.notice {
    background: #e8f3ff;
    color: var(--accent-dark);
    border: 1px solid #b9d8f6;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-weight: 700;
}
.notice.bad { background: #fdecec; color: var(--danger); border-color: #f5c2c0; }
.notice small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 600;
}
.secret-box,
.code-sample {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.45;
    overflow-x: auto;
    white-space: nowrap;
}
.code-sample {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.api-backup-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.api-backup-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 16px;
}
.api-backup-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
}
.doc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 62%, #fff), #fff 58%),
        var(--panel);
    box-shadow: var(--shadow-soft);
}
.doc-hero h2 {
    margin: 0;
    font-size: 30px;
}
.doc-hero p {
    max-width: 760px;
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.6;
}
.doc-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.doc-steps,
.doc-rule-grid,
.api-doc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.doc-steps article,
.doc-rule-grid article,
.api-doc-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 16px;
    box-shadow: var(--shadow-soft);
}
.doc-steps span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
}
.doc-steps strong,
.doc-rule-grid strong,
.api-doc-grid strong {
    display: block;
    margin-bottom: 6px;
}
.doc-steps p,
.doc-rule-grid p,
.api-doc-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.doc-section h3 {
    margin: 16px 0 8px;
    font-size: 15px;
}
.doc-table code,
.api-doc-grid code {
    display: inline-block;
    max-width: 100%;
    padding: 3px 6px;
    border-radius: 6px;
    background: #f2f6fb;
    color: var(--accent-dark);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.api-doc-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.api-doc-grid article {
    display: grid;
    gap: 6px;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 8px; overflow: hidden; font-size: 13px; }
th, td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 12px; background: #e8f3ff; color: var(--accent); font-weight: 700; }
.badge.warn { background: #fff2df; color: #9a4d16; }
.badge.bad { background: #fdecec; color: var(--danger); }
.badge.muted { background: #edf2f7; color: var(--muted); }
.empty {
    padding: 26px;
    border: 1px dashed #b8c7d9;
    border-radius: 8px;
    background: #f9fbfe;
    color: var(--muted);
}
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }
form { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid.triple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline input { width: auto; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.inline-form input { min-width: 180px; }
label { display: grid; gap: 6px; font-weight: 700; }
label small { color: var(--muted); font-weight: 500; }
.permanent-option {
    align-self: end;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.issue-form {
    align-items: start;
}
.issue-form .return-choice {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(260px, 1.1fr);
    gap: 12px;
    align-items: end;
}
.issue-form .permanent-option {
    min-height: 43px;
    margin-bottom: 23px;
}
.issue-form button.wide {
    width: 100%;
}
.signature-pad {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.inline-form .signature-pad {
    min-width: 260px;
    max-width: 340px;
    padding: 8px;
}
.signature-pad-title {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}
.signature-pad canvas {
    width: 100%;
    height: 150px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
}
.inline-form .signature-pad canvas {
    height: 92px;
}
.signature-pad-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(6, 114, 216, .14);
    border-color: #8ec5f4;
}
textarea { min-height: 76px; resize: vertical; }
select[multiple] { min-height: 118px; }
.record-list { display: grid; gap: 14px; }
.compact-edit-list {
    gap: 8px;
}
.edit-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfdff;
    overflow: hidden;
}
.edit-panel summary {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    min-height: 48px;
    padding: 10px 13px;
    cursor: pointer;
    list-style: none;
}
.edit-panel summary::-webkit-details-marker {
    display: none;
}
.edit-panel summary span:first-child {
    display: grid;
    gap: 2px;
}
.edit-panel summary strong {
    color: var(--ink);
}
.edit-panel summary small {
    color: var(--muted);
}
.edit-panel[open] summary {
    border-bottom: 1px solid var(--line-soft);
    background: #f8fbff;
}
.edit-panel .split-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.record-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfdff;
}
.row-main {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}
.split-card {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfdff;
}
.split-card.single-purpose {
    grid-template-columns: minmax(0, 1fr) auto;
}
.key-card { align-items: start; }
.key-side {
    border-left: 4px solid var(--accent);
    padding: 12px 14px;
    background: #f2f7fd;
    border-radius: 8px;
}
.key-side h3 { margin: 0; font-size: 24px; }
.key-side p { margin: 5px 0 12px; color: var(--muted); }
.key-side form, .key-side .button { margin-top: 10px; }
.key-detail-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}
.key-detail-hero h2 { margin: 0 0 6px; font-size: 34px; }
.matrix-row {
    display: grid;
    grid-template-columns: minmax(180px, .6fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.matrix-row div { display: grid; gap: 4px; }
.matrix-row span { color: var(--muted); }
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.steps div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfdff;
}
.steps strong {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    margin-bottom: 10px;
}
.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.settings-tile {
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(6,114,216,.16), transparent 56%) top left / 100% 3px no-repeat,
        #fcfdff;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.settings-tile:hover {
    border-color: #9cc8f2;
    background:
        linear-gradient(90deg, rgba(6,114,216,.28), transparent 56%) top left / 100% 3px no-repeat,
        #f5faff;
}
.settings-tile strong { font-size: 18px; }
.settings-tile span { color: var(--muted); }
.settings-priority {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    margin: 22px 0 26px;
    padding: 19px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.settings-priority .eyebrow { margin-bottom: 6px; }
.settings-priority h3 { margin: 0; font-size: 21px; }
.settings-priority p:not(.eyebrow) { max-width: 700px; margin: 6px 0 0; color: var(--muted); }
.settings-workspace { display: grid; gap: 36px; max-width: 920px; margin-top: 30px; }
.settings-workspace-group { display: grid; gap: 10px; }
.settings-workspace-heading { display: grid; gap: 4px; max-width: 700px; }
.settings-workspace-heading h3 { margin: 0; font-size: 18px; }
.settings-workspace-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-link-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border-top: 1px solid var(--line);
}
.settings-link-list .settings-tile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 13px 6px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.settings-link-list .settings-tile strong { color: var(--text-strong); font-size: 15px; }
.settings-link-list .settings-tile span { line-height: 1.4; }
.settings-link-list .settings-tile::after {
    content: "→";
    color: var(--accent);
    font-size: 18px;
    transition: transform .15s ease;
}
.settings-link-list .settings-tile:hover { background: var(--surface-hover); border-color: var(--line); }
.settings-link-list .settings-tile:hover::after { transform: translateX(3px); }
.module-settings-form {
    display: grid;
    gap: 14px;
}
.module-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.module-toggle {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 112px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfdff;
}
.module-toggle input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}
.module-toggle strong,
.module-toggle small {
    display: block;
}
.module-toggle small {
    margin-top: 6px;
    color: var(--muted);
    font-weight: 560;
    line-height: 1.4;
}
.page-intro {
    color: var(--muted);
    margin: -4px 0 18px;
}
.quick-issue {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid #b9d8f6;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(6,114,216,.12), transparent 42%) top left / 100% 4px no-repeat,
        #fff;
    box-shadow: 0 18px 46px rgba(6, 114, 216, .075);
}
.quick-issue-copy {
    display: flex;
    align-items: center;
    gap: 16px;
}
.quick-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 27px;
    font-weight: 800;
}
.quick-issue h2 { margin: 0 0 6px; font-size: 28px; }
.quick-issue p { margin: 0; color: var(--muted); }
.quick-issue-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.risk-control-room {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.risk-control-room a {
    min-height: 118px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(8, 25, 54, .035);
}
.risk-control-room a:hover {
    transform: translateY(-1px);
    border-color: #9cc8f2;
}
.risk-control-room span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.risk-control-room strong {
    display: block;
    margin: 8px 0 5px;
    font-size: 34px;
    line-height: 1;
}
.risk-control-room small {
    color: var(--muted);
    line-height: 1.35;
}
.risk-control-room .is-critical {
    border-color: #f2b8b5;
    background: #fff8f8;
}
.risk-control-room .is-critical strong {
    color: var(--danger);
}
.risk-control-room .is-warning {
    border-color: #f1d996;
    background: #fffaf0;
}
.risk-control-room .is-warning strong {
    color: #8a5a00;
}
.risk-control-room .is-muted {
    background: #f8fafc;
}
.loss-report-list {
    gap: 12px;
}
.loss-report-body {
    display: grid;
    gap: 14px;
    padding: 14px;
    border-top: 1px solid var(--line-soft);
    background: #fbfdff;
}
.loss-report-meta,
.risk-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.loss-report-meta div,
.risk-summary div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.loss-report-meta span,
.risk-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.loss-report-meta strong,
.risk-summary strong {
    display: block;
    margin-top: 5px;
    font-size: 22px;
    line-height: 1.12;
    overflow-wrap: anywhere;
}
.loss-report-meta small,
.risk-summary small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.loss-note {
    margin: 0;
    padding: 12px;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: #f2f7fd;
    color: var(--ink);
}
.loss-risk {
    display: grid;
    gap: 12px;
}
.loss-risk.critical .risk-summary div:first-child {
    border-color: #f2b8b5;
    background: #fff8f8;
}
.loss-risk.critical .risk-summary div:first-child strong {
    color: var(--danger);
}
.loss-risk.warning .risk-summary div:first-child {
    border-color: #f1d996;
    background: #fffaf0;
}
.loss-risk.warning .risk-summary div:first-child strong {
    color: #8a5a00;
}
.risk-signal-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.risk-detail-grid {
    display: grid;
    grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
    gap: 14px;
}
.risk-detail-grid > div,
.risk-open-issues {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.risk-detail-grid h3,
.risk-open-issues h3 {
    margin: 0 0 10px;
    font-size: 16px;
}
.risk-detail-grid ol {
    margin: 0;
    padding-left: 20px;
    color: var(--ink);
}
.risk-detail-grid li + li {
    margin-top: 7px;
}
.risk-resolution {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.risk-resolution div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.risk-resolution span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.risk-resolution p {
    margin: 0;
    overflow-wrap: anywhere;
}
.loss-close-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.loss-close-form input {
    min-width: 0;
}
.loss-close-form button {
    grid-column: 1 / -1;
    justify-self: end;
}
.barcode {
    display: block;
    width: 100%;
    height: 54px;
    fill: #050b18;
    background: #fff;
}
.scan-entry-panel {
    display: grid;
    gap: 18px;
}
.scan-entry-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.scan-entry-form input {
    min-height: 58px;
    font-size: 24px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.scan-help-grid,
.scan-code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}
.scan-help-grid div,
.scan-code-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.scan-help-grid strong,
.scan-code-card strong {
    display: block;
    margin: 8px 0 4px;
    font-size: 18px;
}
.scan-help-grid span,
.scan-code-card span,
.scan-code-card small {
    color: var(--muted);
    line-height: 1.4;
}
.scan-code-card {
    display: grid;
    gap: 8px;
    scroll-margin-top: 18px;
}
.scan-code-card:target {
    border-color: #d8b36f;
    box-shadow: 0 0 0 3px rgba(216,179,111,.28);
}
.scan-code-card a {
    color: #0b7bdc;
    font-weight: 800;
    text-decoration: none;
}
.nfc-url {
    display: block;
    max-width: 100%;
    padding: 7px 8px;
    border: 1px solid #d8e1ed;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.scan-workbench {
    display: grid;
    gap: 18px;
}
.scan-focus-card {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.scan-focus-card h3 {
    margin: 0 0 6px;
    font-size: 24px;
}
.scan-focus-card p {
    margin: 0 0 12px;
    color: var(--muted);
}
.scan-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.scan-meta-grid > span:not(.badge) {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.scan-action-box {
    padding: 28px 30px 24px;
    border: 1px solid #dbe5f0;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fbff 0%, #f4f8fc 100%);
}
.scan-action-box h3 {
    margin: 0 0 18px;
    color: var(--ink);
    font-size: 22px;
    letter-spacing: -.015em;
}
.scan-action-box p {
    margin: 0 0 14px;
    color: var(--muted);
}
.scan-handover-form {
    display: grid;
    width: min(100%, 1040px);
    gap: 24px;
}
.scan-handover-section {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.scan-handover-section:first-of-type {
    padding-top: 0;
    border-top: 0;
}
.scan-handover-section-head {
    display: grid;
    gap: 3px;
}
.scan-handover-section-head strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 750;
}
.scan-handover-section-head span,
.scan-handover-additional summary small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}
.scan-handover-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    align-items: end;
}
.scan-handover-fields-core {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 880px;
}
.scan-handover-fields-confirmation {
    grid-template-columns: minmax(280px, 1fr);
    max-width: 500px;
}
.scan-handover-fields-vehicle {
    grid-template-columns: minmax(250px, 1fr) minmax(280px, 1.15fr);
    max-width: 760px;
}
.scan-handover-fields > label {
    min-width: 0;
}
.scan-handover-fields > label > input,
.scan-handover-fields > label > select {
    box-sizing: border-box;
    min-height: 50px;
}
.scan-handover-check {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-height: 58px;
    padding: 12px 16px;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    background: rgba(255,255,255,.78);
    line-height: 1.35;
}
.scan-handover-check > input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
}
.scan-handover-check > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}
.scan-handover-check strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 720;
}
.scan-handover-check small {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
}
.scan-handover-permanent {
    grid-column: 1 / -1;
}
.scan-handover-additional {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.scan-handover-additional > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 62px;
    padding: 12px 0;
    cursor: pointer;
    list-style: none;
}
.scan-handover-additional > summary::-webkit-details-marker {
    display: none;
}
.scan-handover-additional > summary > span:first-child {
    display: grid;
    gap: 3px;
}
.scan-handover-additional > summary > span:last-child {
    color: var(--accent);
    font-size: 18px;
    transition: transform .16s ease;
}
.scan-handover-additional[open] > summary > span:last-child {
    transform: rotate(180deg);
}
.scan-handover-additional > .scan-handover-fields {
    padding: 2px 0 18px;
}
.scan-handover-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #dbe5f0;
}
.scan-handover-actions .button,
.scan-handover-actions button {
    min-width: 190px;
}
@media (max-width: 760px) {
    .scan-action-box {
        padding: 22px 18px 20px;
        border-radius: 13px;
    }
    .scan-handover-fields,
    .scan-handover-fields-core,
    .scan-handover-fields-confirmation,
    .scan-handover-fields-vehicle {
        grid-template-columns: 1fr;
        max-width: none;
    }
    .scan-handover-permanent {
        grid-column: auto;
    }
    .scan-handover-actions {
        justify-content: stretch;
    }
    .scan-handover-actions .button,
    .scan-handover-actions button {
        width: 100%;
    }
}
.scan-copy-link {
    color: inherit;
    text-decoration: none;
}
.scan-copy-link:hover {
    border-color: #d8b36f;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.print-label-body {
    margin: 0;
    background: #eef2f7;
    color: #0f172a;
    font-family: Arial, sans-serif;
}
.label-sheet {
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 40px;
}
.label-print-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid #d8e1ed;
    border-radius: 8px;
    background: #fff;
}
.label-print-head img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}
.label-print-head h1 {
    margin: 0 0 4px;
    font-size: 28px;
}
.label-print-head p {
    margin: 0;
    color: #64748b;
}
.label-print-head button {
    margin-left: auto;
}
.label-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.key-label {
    min-height: 150px;
    padding: 12px;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    background: #fff;
    break-inside: avoid;
}
.label-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}
.key-label p {
    min-height: 32px;
    margin: 5px 0 8px;
    color: #334155;
    font-size: 12px;
    line-height: 1.25;
}
.label-code {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .08em;
    text-align: center;
}
.label-nfc {
    margin-top: 5px;
    padding: 4px 5px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #f8fafc;
    color: #475569;
    font-size: 8.5px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.key-label small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    text-align: center;
}
.search-panel { padding: 12px; }
.search-panel .toolbar { margin: 0; }
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.metric-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "icon label" "icon value";
    column-gap: 12px;
    align-items: center;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(8, 25, 54, .035);
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.metric-card:hover,
.action-list a:hover,
.settings-tile:hover {
    transform: translateY(-1px);
}
.metric-card.primary { border-color: #9cc8f2; background: #f5fbff; }
.metric-card.alert { border-color: #f2b8b5; background: #fff8f8; }
.metric-icon {
    grid-area: icon;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
}
.metric-card small { grid-area: label; color: var(--muted); font-weight: 700; }
.metric-card strong { grid-area: value; font-size: 28px; line-height: 1; }
.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 22px;
    margin-bottom: 18px;
}
.dashboard-hero h2 {
    margin: 0 0 6px;
    font-size: 28px;
}
.dashboard-hero p {
    margin: 0;
    color: var(--muted);
}
.dashboard-scan {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}
.scan-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: 22px;
    min-height: 246px;
    padding: 26px 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(8, 25, 54, .035);
}
.scan-copy h3 {
    margin: 0 0 26px;
    font-size: 20px;
}
.legend-list {
    display: grid;
    gap: 12px;
    max-width: 260px;
}
.legend-list span {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}
.legend-list strong {
    color: var(--ink);
}
.dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--muted);
}
.dot.ok { background: #0f766e; }
.dot.warn { background: #d8b36f; }
.dot.bad { background: var(--danger); }
.donut {
    --value: 0;
    --ring: var(--accent);
    width: 178px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    position: relative;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #fff 0 55%, transparent 56%),
        conic-gradient(var(--ring) calc(var(--value) * 1%), #16181d 0 88%, #edf2f7 0);
}
.donut.thin {
    background:
        radial-gradient(circle at center, #fff 0 58%, transparent 59%),
        conic-gradient(var(--ring) calc(var(--value) * 1%), #edf2f7 0);
}
.donut::after {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    border: 1px solid rgba(8,25,54,.08);
}
.donut strong,
.donut span {
    position: relative;
    z-index: 1;
}
.donut strong {
    align-self: end;
    font-size: 34px;
    line-height: 1;
}
.donut span {
    align-self: start;
    margin-top: 6px;
    color: var(--muted);
}
.dashboard-tabs {
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 8px 0 18px;
    border-bottom: 1px solid var(--line-soft);
}
.dashboard-tabs a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}
.dashboard-tabs a.is-active {
    color: var(--ink);
}
.dashboard-tabs a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: #e11d48;
}
.dashboard-tabs span {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--ink);
    font-size: 12px;
}

.management-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.management-hero > div:first-child,
.management-plan,
.cockpit-kpi,
.cockpit-card,
.cockpit-panel {
    border: 1px solid color-mix(in srgb, var(--line) 88%, var(--text-soft) 12%);
    border-radius: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 98%, var(--surface-subtle) 2%), var(--surface-solid));
    box-shadow: 0 18px 46px rgba(8, 25, 54, .045);
}

.management-hero > div:first-child {
    padding: 26px 30px;
}

.management-hero h2 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.03;
}

.management-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.management-plan {
    display: grid;
    gap: 7px;
    align-content: center;
    padding: 24px;
}

.management-plan span,
.cockpit-kpi span,
.cockpit-kpi small,
.activity-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.management-plan strong {
    color: var(--ink);
    font-size: 38px;
    line-height: 1;
}

.management-plan small {
    color: var(--muted);
    font-weight: 750;
}

.cockpit-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cockpit-kpi {
    position: relative;
    min-height: 132px;
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 18px;
    overflow: hidden;
}

.cockpit-kpi strong {
    color: var(--ink);
    font-size: 30px;
    line-height: 1;
}

.cockpit-kpi > i {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    background: var(--accent);
}

.cockpit-kpi.primary {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.cockpit-kpi.warn > i {
    background: #d8b36f;
}

.cockpit-kpi.alert {
    border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
    background: color-mix(in srgb, var(--surface-solid) 94%, var(--danger) 6%);
}

.cockpit-kpi.alert > i {
    background: var(--danger);
}

.cockpit-scan,
.cockpit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.cockpit-scan {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cockpit-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 154px;
    gap: 18px;
    align-items: center;
    min-height: 260px;
    padding: 24px;
}

.cockpit-card h3 {
    margin: 0 0 18px;
    font-size: 20px;
}

.cockpit-meter {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.cockpit-meter div,
.cockpit-bars a div {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-subtle);
}

.cockpit-meter i,
.cockpit-bars a i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #0f766e);
}

.cockpit-panel {
    padding: 0;
    overflow: hidden;
}

.cockpit-panel > .toolbar,
.cockpit-panel > h2 {
    padding: 16px 18px;
    margin: 0;
    border-bottom: 1px solid var(--line-soft);
}

.cockpit-panel table {
    margin: 0;
    border: 0;
}

.cockpit-bars,
.quality-list,
.activity-grid {
    display: grid;
    gap: 10px;
    padding: 16px 18px 18px;
}

.cockpit-bars a {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1.4fr) auto;
    gap: 12px;
    align-items: center;
    color: var(--ink);
    font-weight: 800;
}

.cockpit-bars strong {
    color: var(--muted);
    font-size: 12px;
}

.quality-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface-solid);
}

.quality-list a.needs-work {
    border-color: color-mix(in srgb, #d8b36f 45%, var(--line));
    background: color-mix(in srgb, var(--surface-solid) 90%, #d8b36f 10%);
}

.quality-list strong {
    min-width: 34px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface-subtle);
    text-align: center;
}

.activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-grid div {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-solid);
}

.activity-grid .wide {
    grid-column: 1 / -1;
}

.activity-grid span {
    display: block;
    margin-bottom: 8px;
}

.activity-grid strong {
    font-size: 26px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: 18px;
    margin-bottom: 18px;
}
.inventory-bars {
    display: grid;
    gap: 16px;
}
.inventory-row {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
}
.inventory-row span {
    color: var(--muted);
    font-weight: 700;
}
.inventory-row div {
    height: 9px;
    border-radius: 999px;
    background: #edf2f7;
    overflow: hidden;
}
.inventory-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #d8b36f);
}
.inventory-row strong {
    text-align: right;
}
.inventory-layout {
    display: grid;
    grid-template-columns: minmax(250px, .35fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.inventory-runs {
    position: sticky;
    top: 18px;
}
.inventory-run-link {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-solid);
    color: inherit;
}
.inventory-run-link.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}
.inventory-run-link span,
.inventory-run-link small {
    color: var(--muted);
}
.inventory-run-link em {
    justify-self: start;
    font-style: normal;
}
.inventory-main {
    display: grid;
    gap: 18px;
}
.inventory-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0;
}
.inventory-summary div {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-solid);
}
.inventory-summary span {
    display: block;
    color: var(--muted);
    font-weight: 700;
}
.inventory-summary strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
}
.inventory-summary i {
    display: block;
    height: 8px;
    margin-top: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f766e, #d8b36f);
}
.inventory-scan-panel .scan-entry-form {
    margin-top: 0;
}
.action-list.single {
    grid-template-columns: 1fr;
}
.workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 16px;
}
.action-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.action-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfdff;
    font-weight: 700;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.action-list span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
}
.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.mini-stats div {
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fcfdff;
}
.mini-stats strong { display: block; font-size: 24px; }
.mini-stats span { color: var(--muted); font-size: 13px; }
.protocol {
    width: min(900px, calc(100% - 40px));
    margin: 30px auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 32px;
}
.protocol img { width: 120px; height: 120px; object-fit: contain; }
.protocol-brand {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 22px;
    align-items: center;
    border-bottom: 4px solid var(--brand-accent, var(--accent));
    padding-bottom: 18px;
    margin-bottom: 24px;
}
.protocol-brand img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}
.protocol-brand p {
    margin: 0 0 4px;
    color: var(--brand-accent, var(--accent));
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}
.protocol-brand h1 {
    margin: 0;
    color: var(--brand-primary, var(--ink));
}
.protocol-brand span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}
.protocol .signature-image {
    width: min(360px, 100%);
    height: auto;
    max-height: 120px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin: 70px 0 28px;
}
.signature-grid span {
    display: block;
    border-bottom: 1px solid var(--ink);
    height: 48px;
}
.signature-grid p { margin: 8px 0 0; color: var(--muted); }
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, .95fr) minmax(340px, 460px);
    align-items: center;
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 4vw, 56px);
    background:
        radial-gradient(circle at 12% 8%, rgba(6, 114, 216, .10), transparent 28%),
        #f6f9fd;
    gap: clamp(28px, 5vw, 72px);
}
.login-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    min-height: auto;
    color: var(--ink);
    padding: 0;
    background: transparent;
}
.login-hero h1 {
    margin: 0;
    max-width: 660px;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.06;
    letter-spacing: 0;
}
.login-hero p {
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
}
.login-hero .eyebrow {
    color: var(--accent);
}
.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 880px;
    margin-top: 22px;
}
.login-feature-grid div {
    min-height: 96px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: rgba(255,255,255,.075);
    backdrop-filter: blur(8px);
}
.login-feature-grid strong {
    display: block;
    margin-bottom: 7px;
    color: #fff;
}
.login-feature-grid span {
    color: #c8dcf5;
    line-height: 1.38;
    font-size: 15px;
}
.login-panel {
    display: grid;
    place-items: center;
}
.login-panel .panel {
    width: min(460px, 100%);
    padding: clamp(26px, 4vw, 36px);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow-panel);
}
.login-panel h2 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 34px); letter-spacing: 0; }
.login-panel .subline { margin: 0 0 22px; color: var(--muted); }
.login-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 18px;
}
.login-proof span {
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
}
.error { color: var(--danger); font-weight: 700; }
.compact-login {
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
}
.compact-login .login-panel {
    width: min(500px, 100%);
}
.reset-panel .panel {
    display: grid;
    gap: 14px;
}
.reset-panel .brand {
    justify-self: start;
}
.auth-link {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 800;
}
.auth-link a {
    color: var(--accent);
    text-decoration: none;
}

.reset-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
    gap: 24px;
    padding: 24px;
    background:
        linear-gradient(180deg, #eef4fb 0%, #f8fbff 44%, #ffffff 100%);
}
.reset-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 48px);
    padding: clamp(28px, 4vw, 52px);
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(3,18,43,.98), rgba(5,38,92,.88) 54%, rgba(7,95,143,.58)),
        url("/assets/img/keyora-error.png") center right / cover no-repeat;
    color: #fff;
    box-shadow: 0 28px 78px rgba(8,25,54,.18);
    overflow: hidden;
}
.reset-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3,18,43,.82), rgba(3,18,43,.38) 58%, rgba(3,18,43,.12));
    pointer-events: none;
}
.reset-hero > * {
    position: relative;
    z-index: 1;
}
.reset-hero .brand {
    width: fit-content;
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.1);
    color: #fff;
    backdrop-filter: blur(12px);
}
.reset-hero .brand img {
    background: #fff;
}
.reset-hero-copy {
    max-width: 640px;
}
.reset-hero-copy .eyebrow {
    color: #8fd3ff;
}
.reset-hero-copy h1 {
    max-width: 680px;
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.03;
}
.reset-hero-copy p {
    max-width: 600px;
    margin: 0;
    color: #d9eaff;
    font-size: 18px;
    line-height: 1.55;
}
.reset-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}
.reset-proof span {
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    color: #ecf7ff;
    font-size: 12px;
    font-weight: 850;
    backdrop-filter: blur(10px);
}
.reset-card {
    display: grid;
    place-items: center;
}
.reset-card .panel {
    width: min(470px, 100%);
    padding: clamp(24px, 4vw, 38px);
    border-color: rgba(185,216,246,.86);
    background: rgba(255,255,255,.94);
    box-shadow: 0 28px 78px rgba(8,25,54,.12);
}
.reset-card h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.08;
}
.reset-card .subline {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}
.reset-card form {
    display: grid;
    gap: 14px;
}
.reset-card form button {
    justify-self: start;
    min-width: 168px;
}
.reset-card .notice {
    margin: 2px 0 4px;
}

.site-body {
    background: #f7f9fc;
}
.site-body main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}
.site-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 16px 0;
    background: rgba(247,249,252,.9);
    backdrop-filter: blur(14px);
}
.site-nav .brand {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--ink);
}
.site-nav .brand img {
    width: 40px;
    height: 40px;
}
.site-nav nav {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.site-nav nav a {
    min-height: 36px;
    padding: 8px 11px;
    color: var(--muted);
    font-weight: 750;
}
.site-nav nav a:hover {
    background: #fff;
    color: var(--ink);
}
.site-nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.site-nav-actions .button {
    white-space: nowrap;
}
.site-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: clamp(28px, 5vw, 62px);
    align-items: center;
    min-height: calc(100vh - 76px);
    padding: 48px 0 72px;
}
.site-hero-copy h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.02;
    letter-spacing: 0;
}
.hero-lead {
    max-width: 680px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.55;
}
.site-actions,
.site-proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}
.site-proof span {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 850;
}
.product-preview {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 30px 70px rgba(8,25,54,.12);
}
.preview-top {
    display: flex;
    gap: 7px;
    margin-bottom: 18px;
}
.preview-top span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #cbd5e1;
}
.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.preview-stat {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
}
.preview-stat small {
    display: block;
    color: var(--muted);
    font-weight: 800;
}
.preview-stat strong {
    display: block;
    margin-top: 7px;
    font-size: 28px;
}
.preview-stat.alert { border-color: #f4c7c3; background: #fff8f8; }
.preview-stat.ok { border-color: #b8e3d9; background: #f4fffc; }
.preview-list {
    display: grid;
    gap: 8px;
}
.preview-list div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
}
.preview-list span {
    color: var(--muted);
}
.preview-list em {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}
.product-screens {
    position: relative;
    min-width: 0;
}
.hero-screens {
    display: grid;
    align-items: end;
    min-height: 520px;
}
.product-shot {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(8,25,54,.12);
}
.product-shot img {
    display: block;
    width: 100%;
    height: auto;
}
.product-shot figcaption,
.workflow-shot figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid var(--line-soft);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.product-shot.is-main {
    width: min(100%, 720px);
}
.product-shot.is-floating {
    position: absolute;
    right: 0;
    bottom: 18px;
    width: min(58%, 430px);
    box-shadow: 0 24px 54px rgba(8,25,54,.2);
}
.product-gallery {
    padding-top: 58px;
}
.product-gallery-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(230px, .62fr);
    gap: 14px;
    align-items: start;
}
.product-gallery-grid .product-shot {
    box-shadow: var(--shadow-panel);
}
.product-shot.is-phone {
    justify-self: center;
    max-width: 310px;
}
.site-section {
    padding: 70px 0;
    border-top: 1px solid var(--line);
}
.intro-band,
.split-band,
.mobile-band,
.site-cta {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 34px;
    align-items: center;
}
.site-section h2,
.site-cta h2 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.08;
}
.site-section p,
.site-cta p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}
.section-head {
    max-width: 820px;
    margin-bottom: 26px;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.feature-grid div,
.demo-flow div,
.audience-grid a,
.proof-grid div,
.trust-grid div,
.price-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.feature-grid div {
    min-height: 168px;
    padding: 20px;
}
.feature-grid.tight {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.feature-grid strong {
    display: block;
    margin-bottom: 10px;
    font-size: 19px;
}
.feature-grid span {
    color: var(--muted);
    line-height: 1.45;
}
.split-band {
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(6,114,216,.09), transparent 52%),
        #fff;
}
.check-list {
    display: grid;
    gap: 10px;
}
.check-list span {
    padding: 13px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fcfdff;
    font-weight: 750;
}
.check-list span::before {
    content: "+";
    margin-right: 9px;
    color: var(--success);
    font-weight: 900;
}
.value-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0 0 70px;
    border-top: 0;
}
.value-strip div {
    min-height: 142px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.value-strip strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}
.value-strip span {
    color: var(--muted);
    line-height: 1.45;
}
.mobile-band {
    padding: 58px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, #ffffff 0%, #f7fbff 48%, #edf7ff 100%);
    box-shadow: var(--shadow-soft);
}
.mobile-copy p {
    max-width: 680px;
}
.check-list.light span {
    border-color: var(--line-soft);
    background: #fff;
    color: var(--ink);
}
.phone-preview {
    display: flex;
    justify-content: center;
}
.phone-shell {
    width: min(100%, 340px);
    min-height: 610px;
    padding: 18px;
    border: 1px solid #c8d7e8;
    border-radius: 28px;
    background:
        linear-gradient(180deg, #071936 0%, #0b2e63 100%);
    box-shadow: 0 28px 68px rgba(8,25,54,.18);
}
.phone-status {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #dbeafe;
    text-align: center;
    font-size: 12px;
}
.phone-status span {
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,.28);
}
.phone-screen-card {
    display: grid;
    gap: 5px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    color: #fff;
}
.phone-screen-card.is-primary {
    background: #fff;
    color: var(--ink);
}
.phone-screen-card small,
.phone-signature small {
    color: #8fd3ff;
    font-weight: 800;
    text-transform: uppercase;
}
.phone-screen-card.is-primary small {
    color: var(--accent);
}
.phone-screen-card strong {
    font-size: 30px;
    line-height: 1;
}
.phone-screen-card span {
    color: inherit;
    opacity: .76;
}
.phone-action-list {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}
.phone-action-list span {
    padding: 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 750;
}
.phone-signature {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 8px;
    background: #fff;
}
.phone-signature span {
    height: 72px;
    border: 1px dashed #b7c6d8;
    border-radius: 8px;
    background:
        linear-gradient(135deg, transparent 0 42%, rgba(6,114,216,.22) 43% 45%, transparent 46% 100%),
        #fbfdff;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.price-card {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 380px;
    padding: 24px;
}
.price-card.featured {
    border-color: #8ec5f4;
    box-shadow: 0 24px 56px rgba(6,114,216,.12);
}
.price-card h3 {
    margin: 0;
    font-size: 42px;
}
.price-card small {
    color: var(--muted);
    font-weight: 750;
}
.price-card ul {
    display: grid;
    gap: 10px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}
.price-card li {
    color: #243449;
}
.price-card li::before {
    content: "+";
    margin-right: 8px;
    color: var(--success);
    font-weight: 900;
}
.demo-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.demo-workflow {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
    gap: 18px;
    align-items: stretch;
}
.demo-workflow .demo-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.demo-flow div {
    min-height: 190px;
    padding: 20px;
}
.workflow-shot {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-panel);
}
.workflow-shot img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 474px;
    object-fit: cover;
    object-position: left top;
}
.demo-flow b,
.feature-grid b {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #e8f3ff;
    color: #05265c;
    font-size: 14px;
}
.demo-flow strong,
.audience-grid strong,
.proof-grid strong,
.trust-grid strong {
    display: block;
    margin-bottom: 9px;
    font-size: 18px;
}
.demo-flow span,
.audience-grid span,
.proof-grid span,
.trust-grid span {
    color: var(--muted);
    line-height: 1.45;
}
.audience-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.audience-grid a {
    min-height: 150px;
    padding: 18px;
    color: var(--ink);
    text-decoration: none;
}
.audience-grid a:hover {
    border-color: #8ec5f4;
    transform: translateY(-1px);
}
.proof-grid,
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.proof-grid div,
.trust-grid div {
    min-height: 160px;
    padding: 20px;
}
.proof-grid a {
    display: inline-flex;
    margin-top: 16px;
    color: #0b7bdc;
    font-weight: 800;
    text-decoration: none;
}
.site-subhero {
    margin: 22px 0 18px;
    padding: clamp(38px, 6vw, 72px);
    border: 1px solid rgba(255,255,255,.54);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(3,18,43,.95), rgba(5,38,92,.78)),
        url("/assets/img/keyora-hero.png") center right / cover no-repeat;
    color: #fff;
    box-shadow: 0 28px 78px rgba(8,25,54,.18);
}
.site-subhero h1 {
    max-width: 860px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.02;
}
.site-subhero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.55;
}
.site-subhero .eyebrow {
    color: #8fd3ff;
}
.comparison-table {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.comparison-table div {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--line-soft);
}
.comparison-table div:last-child {
    border-bottom: 0;
}
.comparison-table strong {
    color: var(--ink);
}
.comparison-table span {
    color: var(--muted);
}
.comparison-table span:last-child {
    color: #0f5132;
    font-weight: 750;
}
.comparison-table.market-table div {
    grid-template-columns: 160px repeat(4, minmax(0, 1fr));
}
.comparison-table.market-table div:first-child {
    background: #f8fbff;
}
.comparison-table.market-table div:first-child span {
    color: var(--ink);
    font-weight: 800;
}
.comparison-table.market-table div span:last-child {
    color: #0f5132;
    font-weight: 800;
}
.price-calculator {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 18px;
    align-items: end;
    margin-top: 18px;
    padding: 22px;
    border: 1px solid #b9d8f6;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-panel);
}
.price-calculator h3 {
    margin: 0 0 8px;
    font-size: 28px;
}
.price-calculator p {
    margin: 0;
}
.calc-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.calc-controls label {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
}
.calc-controls input {
    margin-top: 7px;
}
.price-calculator output {
    min-width: 190px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #05265c;
    color: #fff;
    font-weight: 900;
    text-align: center;
}
.site-cta {
    margin: 18px 0 70px;
    padding: 34px;
    border: 1px solid #b9d8f6;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-panel);
}
.site-cta .button {
    justify-self: end;
}

/* Public website visual layer */
.site-body {
    background:
        linear-gradient(180deg, #eef4fb 0%, #f7f9fc 36%, #ffffff 100%);
}
.site-nav {
    width: min(1220px, calc(100% - 36px));
    padding: 14px 18px;
    margin-top: 12px;
    border: 1px solid rgba(225,232,242,.86);
    border-radius: 8px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 16px 42px rgba(8,25,54,.075);
}
.site-body main {
    width: min(1220px, calc(100% - 36px));
}
.site-hero {
    position: relative;
    min-height: calc(100vh - 168px);
    margin: 18px 0 22px;
    padding: clamp(34px, 5vw, 64px);
    border: 1px solid rgba(255,255,255,.54);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(3,18,43,.94) 0%, rgba(5,38,92,.78) 43%, rgba(5,38,92,.24) 68%, rgba(5,38,92,.08) 100%),
        url("/assets/img/keyora-hero.png") center right / cover no-repeat;
    box-shadow: 0 28px 78px rgba(8,25,54,.18);
    overflow: hidden;
}
.site-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(3,18,43,.18));
    pointer-events: none;
}
.site-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 660px;
}
.site-hero-copy .eyebrow {
    color: #8fd3ff;
}
.site-hero-copy h1 {
    color: #fff;
    text-shadow: 0 18px 52px rgba(0,0,0,.25);
}
.hero-lead {
    color: #dbeafe;
}
.site-actions .button.ghost {
    border-color: rgba(255,255,255,.36);
    background: rgba(255,255,255,.1);
    color: #fff;
}
.site-proof span {
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.12);
    color: #ecf7ff;
    backdrop-filter: blur(10px);
}
.product-preview {
    position: relative;
    z-index: 1;
    align-self: end;
    margin-top: 150px;
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 28px 70px rgba(0,0,0,.2);
}
.preview-label {
    position: absolute;
    top: -14px;
    right: 16px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 12px 28px rgba(15,118,110,.28);
}
.site-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: -4px 0 28px;
}
.site-trust div {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.site-trust strong {
    display: block;
    font-size: 26px;
    color: var(--accent-dark);
}
.site-trust span {
    color: var(--muted);
    font-weight: 750;
}
.intro-band {
    padding: 64px 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(6,114,216,.09), transparent 52%),
        #fff;
    box-shadow: var(--shadow-soft);
}
.feature-grid div {
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.feature-grid div:hover {
    transform: translateY(-3px);
    border-color: #9cc8f2;
    box-shadow: 0 22px 52px rgba(8,25,54,.075);
}
.feature-grid b {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: var(--accent-dark);
    color: #fff;
    font-size: 13px;
}
.split-band {
    background:
        linear-gradient(90deg, rgba(3,18,43,.96), rgba(5,38,92,.92)),
        #05265c;
    color: #fff;
    box-shadow: 0 24px 66px rgba(8,25,54,.16);
}
.split-band .eyebrow,
.split-band p {
    color: #c8dcf5;
}
.check-list span {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
}
.pricing-grid {
    align-items: stretch;
}
.price-card {
    position: relative;
    overflow: hidden;
}
.price-card.featured {
    transform: translateY(-10px);
    border-color: #0672d8;
    background:
        linear-gradient(180deg, #f8fcff 0%, #ffffff 52%);
}
.plan-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 850;
}
.site-cta {
    background:
        linear-gradient(90deg, #05265c, #075f8f);
    color: #fff;
    border-color: transparent;
}
.site-cta .eyebrow,
.site-cta p {
    color: #d9eaff;
}
.site-cta h2 {
    color: #fff;
}
.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto;
    padding: 24px 0 34px;
    color: var(--muted);
    font-weight: 750;
}
.site-footer a {
    color: var(--accent-dark);
}
.site-footer a:hover {
    color: var(--accent);
}
.legal-page {
    max-width: 920px;
    margin: 46px auto 70px;
    padding: clamp(24px, 5vw, 54px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-panel);
}
.legal-page h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.05;
}
.legal-page h2 {
    margin: 28px 0 8px;
    font-size: 20px;
}
.legal-page p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.58;
}
.legal-page a {
    color: var(--accent);
    font-weight: 800;
}
.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0 6px;
}
.legal-grid div {
    padding: 18px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fbfdff;
}
.legal-grid h2 {
    margin-top: 0;
}
.request-hero {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(360px, .72fr);
    gap: 28px;
    align-items: center;
    margin: 22px 0 36px;
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid rgba(255,255,255,.52);
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(3,18,43,.97), rgba(5,38,92,.84)),
        url("/assets/img/keyora-hero.png") center right / cover no-repeat;
    color: #fff;
    box-shadow: 0 28px 78px rgba(8,25,54,.18);
}
.request-hero h1 {
    max-width: 820px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(38px, 5.4vw, 68px);
    line-height: 1.02;
}
.request-hero p {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.55;
}
.request-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}
.request-proof span {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    color: #ecf7ff;
    font-size: 12px;
    font-weight: 850;
}
.request-card {
    display: grid;
    gap: 14px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 8px;
    background: rgba(255,255,255,.94);
    color: var(--ink);
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
}
.request-card h2 {
    margin: -4px 0 0;
    font-size: 28px;
}
.request-card .eyebrow {
    color: var(--accent);
}
.request-card .notice {
    margin-bottom: 0;
}
.form-note {
    margin: 0;
    color: var(--muted) !important;
    font-size: 13px !important;
}
.request-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    border-top: 0;
    padding-top: 0;
}
.request-steps div {
    min-height: 150px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.request-steps strong {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--accent-dark);
    color: #fff;
}
.request-steps span {
    display: block;
    font-weight: 850;
}
.request-steps p {
    color: var(--muted);
}
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    width: min(760px, calc(100% - 32px));
    padding: 16px;
    border: 1px solid rgba(185,216,246,.86);
    border-radius: 8px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 24px 68px rgba(8,25,54,.22);
    transform: translateX(-50%);
    backdrop-filter: blur(14px);
}
.cookie-banner[hidden] {
    display: none;
}
.cookie-banner strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}
.cookie-banner p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}
.error-page {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
    gap: clamp(24px, 5vw, 58px);
    align-items: center;
    min-height: min(720px, calc(100vh - 170px));
    margin: 46px auto 70px;
    padding: clamp(24px, 5vw, 56px);
    border: 1px solid rgba(185,216,246,.82);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(3,18,43,.97), rgba(5,38,92,.9) 58%, rgba(7,95,143,.78)),
        #05265c;
    color: #fff;
    box-shadow: 0 28px 78px rgba(8,25,54,.2);
    overflow: hidden;
}
.error-copy {
    position: relative;
    z-index: 1;
}
.error-copy .eyebrow {
    color: #8fd3ff;
}
.error-copy h1 {
    margin: 0 0 14px;
    max-width: 660px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.03;
}
.error-copy p {
    max-width: 580px;
    color: #d9eaff;
    font-size: 18px;
    line-height: 1.55;
}
.error-page .button.ghost {
    border-color: rgba(255,255,255,.36);
    background: rgba(255,255,255,.1);
    color: #fff;
}
.error-visual {
    position: relative;
}
.error-visual::before {
    content: "";
    position: absolute;
    inset: 12% -4% -6% 12%;
    border-radius: 999px;
    background: rgba(143,211,255,.16);
    filter: blur(28px);
}
.error-visual img {
    position: relative;
    display: block;
    width: 100%;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(0,0,0,.28);
}
.static-error-main {
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto;
    padding-top: 24px;
}

/* Enterprise refinement layer */
body {
    font-size: 14px;
}
.sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,.035), transparent 26%),
        linear-gradient(180deg, #031a3e 0%, #062451 52%, #073264 100%);
    border-right: 1px solid rgba(255,255,255,.08);
    box-shadow: 18px 0 46px rgba(8,25,54,.08);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.28) transparent;
}
.brand {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
nav a {
    min-height: 42px;
    font-size: 14px;
    font-weight: 650;
}
nav a:hover,
.nav-group-head:hover > a {
    background: rgba(255,255,255,.105);
}
.nav-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    background: rgba(255,255,255,.105);
}
.subnav {
    margin-left: 34px;
}
.subnav a {
    min-height: 30px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 12.5px;
    color: #c5dcf7;
}
.subnav-label {
    padding-top: 8px;
}
.main {
    max-width: 1680px;
    padding-top: 26px;
}
.topbar {
    min-height: 72px;
    padding: 4px 0 18px;
    border-bottom: 1px solid rgba(219,228,239,.8);
}
.topbar h1 {
    letter-spacing: 0;
}
.userbox {
    padding: 8px 10px 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 10px 26px rgba(8,25,54,.028);
}
.account-link {
    color: #0f213d;
    font-weight: 750;
    text-decoration: none;
}
.account-link:hover {
    color: var(--accent);
}
.panel,
.card,
.metric-card,
.scan-card,
.settings-tile,
.split-card,
.record-row,
.matrix-row {
    border-color: rgba(197,210,226,.72);
}
.panel {
    position: relative;
    overflow: hidden;
}
.panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(6,114,216,.45), rgba(15,118,110,.18), transparent 52%);
    pointer-events: none;
}
.panel h2,
.toolbar h2 {
    margin-bottom: 0;
    letter-spacing: 0;
}
.toolbar {
    min-height: 38px;
}
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid transparent;
    box-shadow: 0 8px 18px rgba(6,114,216,.12);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.button:hover,
button:hover {
    filter: none;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(6,114,216,.16);
}
.button.ghost {
    background: #fff;
    box-shadow: none;
}
.button.ghost:hover {
    border-color: #9cc8f2;
    background: #f5fbff;
}
.button.danger {
    box-shadow: 0 8px 18px rgba(180,35,24,.12);
}
input,
select,
textarea {
    min-height: 39px;
    border-color: #d7e1ee;
    background: #fbfdff;
    font-size: 13.5px;
}
textarea {
    line-height: 1.45;
}
label {
    align-content: start;
    color: #172946;
    font-size: 13px;
}
table {
    border: 1px solid var(--line-soft);
    box-shadow: none;
}
th {
    background: #f8fafc;
    color: #718197;
    font-size: 11px;
    font-weight: 800;
}
td {
    color: #1c2d47;
}
tr:hover td {
    background: #fbfdff;
}
.badge {
    border: 1px solid rgba(6,114,216,.16);
}
.badge.warn {
    border-color: rgba(217,119,6,.22);
}
.badge.bad {
    border-color: rgba(180,35,24,.22);
}
.empty {
    background:
        linear-gradient(90deg, rgba(6,114,216,.08), transparent 45%) top left / 100% 2px no-repeat,
        #fbfdff;
}
.settings-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.settings-tile {
    min-height: 104px;
    align-content: start;
    box-shadow: 0 10px 26px rgba(8,25,54,.026);
}
.settings-tile strong {
    font-size: 16px;
}
.settings-tile span {
    font-size: 13px;
}
.record-row,
.split-card,
.matrix-row {
    box-shadow: 0 8px 22px rgba(8,25,54,.022);
}
.split-card:hover,
.record-row:hover,
.matrix-row:hover,
.settings-tile:hover {
    border-color: #b7cbe1;
}
.key-side {
    border-left: 0;
    border-top: 3px solid var(--accent);
    background:
        linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
}
.key-side h3 {
    font-size: 22px;
}
.panel > form.form-grid,
.panel > form.form-grid.triple {
    padding: 4px 0 2px;
}
.panel > form.form-grid button,
.panel > form.form-grid.triple button {
    align-self: end;
}
.form-grid.triple label.wide {
    grid-column: span 2;
}
.form-grid.triple label.wide textarea {
    min-height: 58px;
}
.record-list .split-card {
    align-items: stretch;
}
.record-list .split-card .form-grid {
    gap: 10px;
}
.key-detail-hero {
    background:
        linear-gradient(90deg, rgba(6,114,216,.08), transparent 48%),
        #fff;
}
.quick-issue,
.dashboard-hero {
    background:
        linear-gradient(90deg, rgba(6,114,216,.08), transparent 54%),
        #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
}
.dashboard-hero h2 {
    font-size: 26px;
}
.scan-card {
    min-height: 226px;
    box-shadow: var(--shadow-soft);
}
.donut {
    width: 164px;
}
.dashboard-tabs {
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 0 14px;
    box-shadow: 0 8px 22px rgba(8,25,54,.022);
}
.dashboard-tabs a {
    padding-top: 13px;
}
.inventory-row div {
    height: 8px;
}
.login-page {
    background:
        linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}
.login-hero {
    box-shadow: none;
}
.login-feature-grid div {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.login-panel .panel::before {
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

/* Fine-grained workspace layer */
:root {
    --workspace: #f4f6f9;
    --workspace-2: #eef2f6;
    --surface: rgba(255,255,255,.88);
    --surface-solid: #ffffff;
    --surface-subtle: #f8fafc;
    --surface-hover: #f3f7fb;
    --text-strong: #101827;
    --text-soft: #5f6c7d;
    --focus-ring: rgba(47, 128, 237, .18);
    --nav-bg: #111827;
    --nav-bg-2: #171d28;
    --nav-text: #c4cad5;
    --nav-muted: #858d9c;
    --nav-active: #2f80ed;
    --donut-hole: #ffffff;
    --donut-track: #e7edf5;
    --action-bg: #ffffff;
    --danger-soft: #fdecec;
    --warn-soft: #fff2df;
    --ok-soft: #e7f7f1;
}

body.theme-light {
    color-scheme: light;
}

body {
    background: linear-gradient(180deg, var(--workspace) 0%, var(--workspace-2) 100%);
}

.shell {
    background: transparent;
}

.sidebar {
    width: 252px;
    flex-basis: 252px;
    background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%);
    color: var(--nav-text);
    padding: 14px 10px;
    box-shadow: none;
}

.brand {
    min-height: 44px;
    margin: 0 4px 18px;
    padding: 0 8px 14px;
    font-size: 17px;
    font-weight: 760;
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

nav {
    gap: 2px;
}

nav a,
.subnav a {
    position: relative;
    min-height: 34px;
    border-radius: 7px;
    color: var(--nav-text);
    font-size: 13px;
    font-weight: 560;
}

nav a:hover,
.nav-group-head:hover > a,
.subnav a:hover {
    background: rgba(255,255,255,.055);
    color: #fff;
}

nav a.is-active,
.subnav a.is-active,
.account-link.is-active {
    color: #fff;
    background: rgba(47,128,237,.17);
}

nav a.is-active::before,
.subnav a.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 2px;
    border-radius: 999px;
    background: var(--nav-active);
}

.nav-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    border-radius: 6px;
    background: rgba(255,255,255,.07);
    color: var(--nav-text);
    font-size: 13px;
}

.nav-subtoggle {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: rgba(255,255,255,.045);
    color: var(--nav-muted);
}

.subnav {
    margin: 0 0 4px 28px;
    padding-left: 8px;
    border-color: rgba(255,255,255,.09);
}

.subnav a {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 12px;
}

.subnav-label {
    color: var(--nav-muted);
    font-size: 10px;
    letter-spacing: .06em;
}

.main {
    max-width: none;
    padding: 18px 22px 28px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 58px;
    margin: -18px -22px 18px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--workspace) 88%, transparent);
    backdrop-filter: blur(14px);
}

.topbar h1 {
    font-size: 18px;
    font-weight: 760;
    color: var(--text-strong);
}

.eyebrow {
    color: var(--text-soft);
    font-size: 10.5px;
    letter-spacing: .06em;
}

.context-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.context-line span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-soft);
    background: var(--surface);
    font-size: 11px;
    font-weight: 650;
}

.userbox {
    padding: 4px;
    gap: 6px;
    border-color: var(--line);
    background: var(--surface);
    box-shadow: none;
}

.account-link {
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 7px;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 680;
}

.panel,
.card,
.metric-card,
.scan-card,
.settings-tile,
.record-row,
.split-card,
.matrix-row,
.edit-panel {
    background: var(--surface-solid);
    border-color: var(--line);
    box-shadow: none;
}

.panel {
    padding: 14px;
    margin-bottom: 10px;
}

.panel::before {
    display: none;
}

.panel h2,
.toolbar h2 {
    font-size: 15px;
    font-weight: 760;
    color: var(--text-strong);
}

.page-intro {
    margin: 2px 0 14px;
    font-size: 13px;
    color: var(--text-soft);
}

.toolbar {
    min-height: 30px;
    margin-bottom: 10px;
}

.button,
button {
    min-height: 31px;
    border-radius: 7px;
    padding: 6px 10px;
    box-shadow: none;
    font-size: 12.5px;
    font-weight: 720;
}

.button:hover,
button:hover {
    transform: none;
    box-shadow: none;
}

.button.ghost {
    background: var(--surface-solid);
    color: var(--accent);
    border-color: var(--line);
}

.button.ghost:hover,
button.ghost:hover {
    background: var(--surface-hover);
}

.permanent-option,
.edit-row td,
.key-side,
.steps div,
.mini-stats div,
.metric-card,
.metric-card.primary,
.metric-card.alert,
.preview-card,
.preview-stat,
.preview-stat.alert,
.preview-stat.ok,
.search-panel,
.workbench,
.data-actions,
.login-proof span {
    background: var(--surface-subtle);
    border-color: var(--line);
    color: var(--text-strong);
}

.key-side {
    border-top-color: var(--accent);
}

.permanent-option {
    color: var(--text-soft);
}

.permanent-option input[type="checkbox"],
.inline input[type="checkbox"] {
    accent-color: var(--accent);
}

input,
select,
textarea {
    min-height: 33px;
    border-color: var(--line);
    border-radius: 7px;
    background: var(--surface-subtle);
    color: var(--text-strong);
    font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--focus-ring);
    border-color: var(--accent);
}

label {
    color: var(--text-strong);
    font-size: 12.5px;
    font-weight: 680;
}

table {
    border: 0;
    border-radius: 7px;
    background: var(--surface-solid);
    font-size: 13px;
}

th,
td {
    padding: 8px 10px;
    border-color: var(--line-soft);
}

th {
    background: var(--surface-subtle);
    color: var(--text-soft);
    font-size: 10.5px;
    font-weight: 780;
}

td {
    color: var(--text-strong);
}

tr:nth-child(even) td {
    background: color-mix(in srgb, var(--surface-subtle) 58%, transparent);
}

tr:hover td {
    background: var(--surface-hover);
}

.badge {
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 720;
    background: var(--accent-soft);
}

.badge.warn {
    background: var(--warn-soft);
    color: #d8b36f;
    border-color: color-mix(in srgb, #d8b36f 32%, transparent);
}

.badge.bad,
.notice.bad {
    background: var(--danger-soft);
    color: #ff8f86;
    border-color: color-mix(in srgb, #ff8f86 32%, transparent);
}

.badge.muted {
    background: var(--surface-subtle);
    color: var(--text-soft);
    border-color: var(--line);
}

.notice {
    display: flex;
    align-items: center;
    min-height: 38px;
    border-radius: 7px;
    padding: 9px 11px;
    font-size: 13px;
    box-shadow: none;
}

.notice::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 9px;
    border-radius: 999px;
    background: currentColor;
}

.notice:not(.bad) {
    background: var(--ok-soft);
    color: color-mix(in srgb, var(--success) 72%, var(--text-strong));
    border-color: color-mix(in srgb, var(--success) 28%, var(--line));
}

.empty {
    padding: 18px;
    border-radius: 7px;
    background: var(--surface-subtle);
    color: var(--text-soft);
}

.empty strong {
    color: var(--text-strong);
}

.settings-tile {
    min-height: 82px;
    padding: 13px;
    background: var(--surface-solid);
}

.settings-tile:hover,
.split-card:hover,
.record-row:hover,
.matrix-row:hover {
    background: var(--surface-hover);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.dashboard-hero,
.quick-issue {
    padding: 15px;
    background: var(--surface-solid);
    border-color: var(--line);
    box-shadow: none;
}

.dashboard-hero h2 {
    font-size: 20px;
}

.dashboard-tabs {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: none;
}

.dashboard-tabs a.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.scan-card {
    background: var(--surface-solid);
}

.legend-list strong,
.inventory-row strong,
.donut strong {
    color: var(--text-strong);
}

.donut,
.donut.thin {
    background:
        radial-gradient(circle at center, var(--donut-hole) 0 58%, transparent 59%),
        conic-gradient(var(--ring) calc(var(--value) * 1%), var(--donut-track) 0);
}

.donut::after {
    border-color: color-mix(in srgb, var(--line) 72%, transparent);
}

.donut span {
    color: var(--text-soft);
}

.inventory-row div {
    background: var(--donut-track);
}

.action-list a,
.mini-stats div {
    background: var(--action-bg);
    border-color: var(--line);
    color: var(--text-strong);
}

.action-list a:hover {
    background: var(--surface-hover);
}

.action-list span {
    background: var(--accent-soft);
    color: var(--accent);
}

form.is-submitting button[type="submit"],
form.is-submitting button:not([type]) {
    opacity: .72;
    cursor: progress;
}

/* Enterprise finish layer */
:root {
    --control-height: 30px;
    --control-height-lg: 34px;
    --control-pad-x: 10px;
    --radius-control: 6px;
    --radius-surface: 7px;
    --hairline: color-mix(in srgb, var(--line) 78%, transparent);
}

.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    min-height: var(--control-height);
    width: auto;
    max-width: 100%;
    padding: 5px var(--control-pad-x);
    border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
    border-radius: var(--radius-control);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 94%, #fff 6%), color-mix(in srgb, var(--accent) 82%, #071827 18%));
    color: #fff;
    box-shadow: none;
    font-size: 12px;
    font-weight: 660;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
    text-decoration: none;
}

.button.big,
.site-actions .button.big,
.site-cta .button,
.error-page .button,
.login-panel .button,
.quick-issue-actions .button.big {
    min-height: var(--control-height-lg);
    padding: 7px 12px;
    border-radius: var(--radius-control);
    font-size: 12.5px;
    font-weight: 700;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
    transform: none;
    filter: none;
    border-color: color-mix(in srgb, var(--accent) 58%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 98%, #fff 2%), color-mix(in srgb, var(--accent) 88%, #071827 12%));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.button:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
input[type="reset"]:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 42%, transparent);
    outline-offset: 2px;
}

.button.ghost,
button.ghost,
.site-actions .button.ghost,
.error-page .button.ghost {
    border-color: var(--hairline);
    background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
    color: color-mix(in srgb, var(--accent) 82%, var(--text-strong));
}

.button.ghost:hover,
button.ghost:hover,
.site-actions .button.ghost:hover,
.error-page .button.ghost:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    background: var(--surface-hover);
    color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.button.secondary,
button.secondary {
    border-color: color-mix(in srgb, var(--accent-2) 38%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 88%, #fff 12%), color-mix(in srgb, var(--accent-2) 76%, #071827 24%));
}

.button.danger,
button.danger {
    border-color: color-mix(in srgb, var(--danger) 38%, transparent);
    background: color-mix(in srgb, var(--surface-solid) 90%, var(--danger) 10%);
    color: color-mix(in srgb, var(--danger) 86%, var(--text-strong));
}

.button.danger:hover,
button.danger:hover {
    border-color: color-mix(in srgb, var(--danger) 48%, transparent);
    background: color-mix(in srgb, var(--surface-solid) 82%, var(--danger) 18%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 10%, transparent);
}

.nav-subtoggle {
    min-height: 28px;
    width: 28px;
    padding: 0;
    border-color: rgba(255,255,255,.09);
    background: rgba(255,255,255,.045);
    color: var(--nav-muted);
}

.nav-subtoggle:hover {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.075);
    color: #fff;
    box-shadow: none;
}

.toolbar,
.quick-issue-actions,
.site-actions,
.data-actions,
.pagination,
.userbox {
    gap: 7px;
}

.toolbar {
    align-items: center;
}

.panel,
.card,
.metric-card,
.scan-card,
.settings-tile,
.record-row,
.split-card,
.matrix-row,
.edit-panel,
.scan-code-card,
.scan-action-box,
.preview-card,
.price-card,
.trust-grid div,
.proof-grid div,
.feature-grid div,
.audience-grid a {
    border-width: 1px;
    border-color: var(--hairline);
    border-radius: var(--radius-surface);
    box-shadow: none;
}

.panel {
    padding: 12px;
    margin-bottom: 9px;
}

.panel.compact {
    padding: 11px;
}

.dashboard-hero,
.quick-issue,
.site-subhero,
.site-cta,
.split-band,
.error-page {
    border-radius: var(--radius-surface);
    border-color: var(--hairline);
    box-shadow: none;
}

.dashboard-hero,
.quick-issue {
    padding: 13px;
    align-items: center;
}

.dashboard-hero h2,
.quick-issue h2 {
    font-size: 19px;
    font-weight: 720;
}

.key-detail-hero h2 {
    font-size: 28px;
    font-weight: 720;
}

.metric-card,
.card,
.settings-tile,
.scan-help-grid div,
.scan-code-card,
.mini-stats div {
    padding: 11px;
}

.metric-card strong,
.card strong,
.risk-control-room strong,
.mini-stats strong {
    font-size: 22px;
    font-weight: 720;
}

.risk-control-room a {
    min-height: 92px;
    padding: 12px;
    border-color: var(--hairline);
    box-shadow: none;
}

.scan-card {
    min-height: 184px;
    padding: 18px;
}

.scan-entry-form input {
    min-height: 44px;
    font-size: 18px;
}

input,
select,
textarea {
    min-height: 31px;
    padding: 6px 9px;
    border-radius: var(--radius-control);
    border-color: var(--hairline);
}

textarea {
    min-height: 58px;
}

.permanent-option {
    min-height: 35px;
    padding: 7px 9px;
    border-radius: var(--radius-control);
}

form,
.form-grid,
.form-grid.triple,
.record-list,
.compact-edit-list {
    gap: 8px;
}

.panel > form.form-grid button,
.panel > form.form-grid.triple button,
.issue-form button.wide,
form button.wide {
    width: auto;
    justify-self: start;
}

.inline-form {
    gap: 6px;
    flex-wrap: wrap;
}

.inline-form input,
.inline-form select {
    min-width: 150px;
}

th,
td {
    padding: 7px 9px;
}

th {
    font-size: 10px;
    font-weight: 720;
}

.badge {
    min-height: 20px;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 650;
}

.edit-panel summary {
    min-height: 40px;
    padding: 8px 10px;
}

.record-row,
.split-card {
    padding: 11px;
}

.key-side {
    padding: 10px;
    border-top-width: 2px;
}

.key-side h3 {
    font-size: 18px;
    font-weight: 720;
}

.empty {
    padding: 14px;
    border-radius: var(--radius-surface);
}

.login-panel .panel {
    padding: 20px;
}

.login-panel h2 {
    font-size: 24px;
    font-weight: 720;
}

.cookie-banner .button,
.cookie-banner button {
    min-height: var(--control-height);
}

/* Section hierarchy and alignment polish */
.main > .panel,
.main > section.panel,
.main > .dashboard-hero,
.main > section.dashboard-hero,
.main > .quick-issue,
.main > section.quick-issue {
    margin-bottom: 14px;
}

.main > .panel + .panel,
.main > section.panel + section.panel,
.main > .panel + section.panel,
.main > section.panel + .panel {
    margin-top: 10px;
}

.panel {
    overflow: visible;
}

.panel > .toolbar:first-child,
.panel > h2:first-child {
    min-height: 34px;
    margin: -12px -12px 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--hairline);
    border-radius: var(--radius-surface) var(--radius-surface) 0 0;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 84%, transparent), color-mix(in srgb, var(--surface-solid) 96%, transparent));
}

.panel > h2:first-child {
    display: flex;
    align-items: center;
}

.panel > .toolbar:first-child h2 {
    margin: 0;
}

.panel > .toolbar:first-child .button,
.panel > .toolbar:first-child button {
    align-self: center;
}

.panel:has(> form) {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34%) top left / 100% 2px no-repeat,
        var(--surface-solid);
}

.panel:has(> .list-toolbar),
.panel:has(> .record-list),
.panel:has(> .table-wrap),
.panel:has(> table) {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--text-soft) 12%, transparent), transparent 34%) top left / 100% 2px no-repeat,
        color-mix(in srgb, var(--surface-solid) 98%, var(--surface-subtle));
}

.panel:has(> .list-toolbar) > .toolbar:first-child,
.panel:has(> .record-list) > .toolbar:first-child,
.panel:has(> .table-wrap) > .toolbar:first-child,
.panel:has(> table) > h2:first-child {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 92%, transparent), color-mix(in srgb, var(--surface-solid) 98%, transparent));
}

.panel > form.form-grid,
.panel > form.form-grid.triple {
    align-items: end;
}

.panel > form.form-grid > button:last-child,
.panel > form.form-grid.triple > button:last-child {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 154px;
}

.panel > form.form-grid > label.wide + button:last-child,
.panel > form.form-grid.triple > label.wide + button:last-child {
    margin-top: 2px;
}

.row-main {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(160px, 1fr) auto;
    align-items: end;
}

.row-main button,
.record-row > form:not(.row-main) button,
.record-row > button {
    justify-self: end;
}

.row-main button {
    grid-column: -2 / -1;
}

.record-row {
    align-items: center;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 92%, transparent), color-mix(in srgb, var(--surface-subtle) 70%, transparent));
}

.record-row + .record-row,
.edit-panel + .edit-panel {
    margin-top: 0;
}

.record-row form {
    align-items: end;
}

.list-toolbar {
    padding: 9px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-surface);
    background: var(--surface-subtle);
}

.list-toolbar input,
.list-toolbar select {
    background: var(--surface-solid);
}

.list-count,
.pagination span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
}

.pagination {
    padding-top: 4px;
}

.split-card {
    align-items: start;
}

.split-card > .form-grid,
.split-card > form.form-grid {
    align-items: end;
}

.form-grid.triple label.wide {
    grid-column: 1 / -1;
}

.form-grid.triple label.wide textarea,
.form-grid.triple label.wide input {
    width: 100%;
}

.key-side {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.key-side .button,
.key-side button,
.key-side form {
    margin-top: 0;
}

.key-side form {
    display: flex;
    justify-content: flex-start;
}

.key-side p {
    margin-bottom: 4px;
}

.key-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.form-actions.wide {
    grid-column: 1 / -1;
}

.danger-zone {
    margin: 12px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line) 70%);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-solid) 92%, var(--danger) 8%);
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.status-actions form {
    margin: 0;
}

.form-grid > button,
.form-grid.triple > button,
.edit-panel > form > button,
.split-card form > button {
    width: auto;
    min-width: 132px;
    justify-self: start;
    align-self: end;
}

.edit-panel > form.form-grid,
.edit-panel > form.form-grid.triple {
    padding: 12px;
    align-items: end;
}

.edit-panel > form.form-grid > button:last-child,
.edit-panel > form.form-grid.triple > button:last-child {
    grid-column: 1 / -1;
}

/* Stronger section separation */
.main > .panel,
.main > section.panel {
    position: relative;
    border-color: color-mix(in srgb, var(--line) 88%, var(--text-soft) 12%);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 98%, var(--surface-subtle) 2%), var(--surface-solid));
    box-shadow:
        0 1px 0 rgba(255,255,255,.72) inset,
        0 10px 24px rgba(15, 23, 42, .035);
}

.main > .panel::after,
.main > section.panel::after {
    content: "";
    position: absolute;
    top: 11px;
    bottom: 11px;
    left: 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: color-mix(in srgb, var(--accent) 42%, transparent);
    opacity: .75;
    pointer-events: none;
}

.main > .panel + .panel,
.main > section.panel + section.panel,
.main > .panel + section.panel,
.main > section.panel + .panel {
    margin-top: 18px;
}

.panel > .toolbar:first-child,
.panel > h2:first-child {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 96%, var(--accent) 4%), color-mix(in srgb, var(--surface-solid) 97%, transparent));
    border-bottom-color: color-mix(in srgb, var(--line) 86%, var(--accent) 14%);
}

.panel:has(> form) > .toolbar:first-child,
.panel:has(> form) > h2:first-child {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 42%, var(--surface-subtle)), color-mix(in srgb, var(--surface-solid) 98%, transparent));
}

.panel:has(> .list-toolbar),
.panel:has(> .record-list),
.panel:has(> .table-wrap),
.panel:has(> table) {
    border-color: color-mix(in srgb, var(--line) 82%, var(--text-soft) 18%);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 94%, var(--surface-subtle) 6%), var(--surface-solid));
}

.panel:has(> .list-toolbar)::after,
.panel:has(> .record-list)::after,
.panel:has(> .table-wrap)::after,
.panel:has(> table)::after {
    background: color-mix(in srgb, var(--text-soft) 34%, transparent);
}

.panel:has(> .list-toolbar) > .toolbar:first-child,
.panel:has(> .record-list) > .toolbar:first-child,
.panel:has(> .table-wrap) > .toolbar:first-child,
.panel:has(> table) > h2:first-child {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 98%, var(--text-soft) 2%), color-mix(in srgb, var(--surface-solid) 98%, transparent));
    border-bottom-color: color-mix(in srgb, var(--line) 82%, var(--text-soft) 18%);
}

.panel > form.form-grid,
.panel > form.form-grid.triple,
.panel > .list-toolbar,
.panel > .record-list,
.panel > .table-wrap,
.panel > table {
    margin-left: 2px;
}

.record-row,
.list-toolbar {
    border-color: color-mix(in srgb, var(--line) 82%, var(--text-soft) 18%);
}

@media (max-width: 900px) {
    html,
    body.site-body {
        overflow-x: hidden;
    }
    .shell { display: block; }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 30;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 12px 12px 10px;
    }
    .brand {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    .sidebar nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }
    .sidebar nav a,
    .sidebar .nav-group {
        flex: 0 0 auto;
    }
    .sidebar nav a {
        white-space: nowrap;
    }
    .sidebar .nav-group {
        display: block;
    }
    .sidebar .nav-group-head {
        display: flex;
    }
    .sidebar .nav-subtoggle,
    .sidebar .subnav {
        display: none;
    }
    .dashboard-hero,
    .dashboard-scan,
    .dashboard-grid,
    .management-hero,
    .cockpit-kpis,
    .cockpit-scan,
    .cockpit-grid,
    .risk-control-room { display: grid; grid-template-columns: 1fr; }
    .cockpit-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }
    .cockpit-card .donut {
        justify-self: center;
    }
    .main {
        padding: 16px;
    }
    .topbar {
        position: static;
        margin: 0 0 16px;
        padding: 0 0 14px;
        background: transparent;
        backdrop-filter: none;
    }
    .cockpit-bars a,
    .cockpit-meter {
        grid-template-columns: 1fr;
    }
    .scan-entry-form,
    .scan-focus-card,
    .scan-help-grid,
    .scan-code-grid,
    .label-grid {
        grid-template-columns: 1fr;
    }
    .scan-card { grid-template-columns: 1fr; justify-items: center; padding: 22px; }
    .scan-copy { width: 100%; }
    .dashboard-tabs { gap: 16px; overflow-x: auto; }
    .grid, .form-grid, .metric-grid, .workbench, .action-list, .issue-form .return-choice, .loss-report-meta, .risk-summary, .risk-detail-grid, .risk-resolution, .loss-close-form, .inventory-layout, .inventory-summary { grid-template-columns: 1fr; }
    .issue-form .permanent-option {
        align-items: center;
        min-height: 0;
        margin-bottom: 0;
        padding: 11px 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
    }
    .issue-form .signature-pad {
        width: 100%;
        max-width: none;
    }
    .issue-form .signature-pad canvas {
        min-height: 170px;
    }
    .issue-form button.wide,
    .panel > form.form-grid button,
    .panel > form.form-grid.triple button {
        width: 100%;
        justify-self: stretch;
    }
    .inventory-runs { position: static; }
    .signature-pad-actions { grid-template-columns: 1fr; }
    .inline-form .signature-pad { max-width: none; width: 100%; }
    .list-toolbar { grid-template-columns: 1fr; }
    .pagination { justify-content: flex-start; flex-wrap: wrap; }
    .edit-panel summary { grid-template-columns: 1fr; }
    .form-grid.triple, .steps, .settings-grid, .module-settings-grid, .split-card, .signature-grid, .matrix-row { grid-template-columns: 1fr; }
    .settings-priority { grid-template-columns: 1fr; align-items: start; }
    .quick-issue, .quick-issue-copy { display: grid; }
    .api-backup-grid {
        grid-template-columns: 1fr;
    }
    .doc-hero,
    .doc-steps,
    .doc-rule-grid,
    .api-doc-grid {
        grid-template-columns: 1fr;
    }
    .doc-hero-actions {
        justify-content: flex-start;
    }
    .secret-box,
    .code-sample {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .key-detail-hero { display: grid; }
    .record-row { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .site-body main,
    .site-nav {
        width: min(100% - 28px, 1180px);
    }
    .site-nav {
        position: relative;
        grid-template-columns: 1fr auto;
        overflow: hidden;
    }
    .site-nav nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
    }
    .site-hero,
    .intro-band,
    .split-band,
    .mobile-band,
    .value-strip,
    .pricing-grid,
    .demo-workflow,
    .product-gallery-grid,
    .site-cta {
        grid-template-columns: 1fr;
    }
    .site-hero {
        min-height: auto;
        padding: 28px 0 44px;
        margin-top: 14px;
        padding: 28px 20px;
        overflow: hidden;
        background:
            linear-gradient(180deg, rgba(3,18,43,.96) 0%, rgba(5,38,92,.84) 58%, rgba(5,38,92,.34) 100%),
            url("/assets/img/keyora-hero.png") center right / cover no-repeat;
    }
    .site-hero-copy h1 {
        font-size: 31px;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    .hero-lead {
        overflow-wrap: anywhere;
    }
    .product-preview {
        margin-top: 20px;
    }
    .hero-screens {
        min-height: 0;
        margin-top: 20px;
    }
    .product-shot.is-floating {
        position: static;
        width: 100%;
        margin-top: 12px;
    }
    .product-shot.is-main {
        width: 100%;
    }
    .product-shot.is-phone {
        max-width: 270px;
    }
    .site-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-preview {
        min-width: 0;
    }
    .preview-grid,
    .feature-grid,
    .feature-grid.tight,
    .demo-flow,
    .demo-workflow .demo-flow,
    .audience-grid,
    .proof-grid,
    .trust-grid,
    .price-calculator,
    .calc-controls {
        grid-template-columns: 1fr;
    }
    .comparison-table div {
        grid-template-columns: 1fr;
    }
    .comparison-table.market-table div {
        grid-template-columns: 1fr;
    }
    .price-calculator output {
        min-width: 0;
        width: 100%;
    }
    .preview-list div {
        grid-template-columns: 1fr;
    }
    .site-section {
        padding: 44px 0;
    }
    .split-band,
    .mobile-band,
    .site-cta {
        padding: 22px;
    }
    .value-strip {
        padding: 0 0 44px;
    }
    .phone-shell {
        width: min(100%, 330px);
        min-height: 560px;
    }
    .site-cta .button {
        justify-self: start;
    }
    .legal-grid,
    .request-hero,
    .request-steps,
    .cookie-banner,
    .error-page,
    .reset-page {
        grid-template-columns: 1fr;
    }
    .request-hero {
        padding: 24px;
    }
    .request-card {
        padding: 18px;
    }
    .reset-page {
        display: grid;
        padding: 14px;
    }
    .reset-hero {
        min-height: 420px;
        padding: 24px;
    }
    .reset-hero-copy h1 {
        font-size: 38px;
    }
    .reset-card {
        align-items: start;
    }
    .error-page {
        min-height: auto;
        margin: 28px auto 44px;
        padding: 24px;
    }
    .cookie-banner {
        align-items: stretch;
    }
    .login-page { display: block; padding: 14px; }
    .login-hero { min-height: auto; margin-bottom: 14px; padding: 24px; }
    .login-feature-grid { grid-template-columns: 1fr; }
    .issue-form .permanent-option { margin-bottom: 0; }
}
@media (max-width: 900px) {
    .shell-menu-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; margin: 0 0 var(--space-2); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--accent-dark); }
    .sidebar { position: fixed; z-index: 50; left: 0; transform: translateX(-105%); transition: transform .18s ease; box-shadow: 18px 0 40px rgba(8,25,54,.22); }
    .navigation-open .sidebar { transform: translateX(0); }
    .main { padding: 20px 16px; }
    .topbar { align-items: flex-start; }
    .userbox { flex-wrap: wrap; justify-content: flex-end; }
    .global-search { order: 3; width: 100%; }
    .global-search input { width: 100%; }
    .key-timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 22px; position: relative; }
    .key-timeline li::before { position: absolute; left: 0; top: 19px; margin: 0; }.key-timeline time, .key-timeline li > div { grid-column: 1; grid-row: auto; }
}

/* Keyora customer shell: ruhig, hell und auf häufige Aufgaben reduziert. */
body.customer-shell {
    color-scheme: light;
    --workspace: #f6f8fb;
    --workspace-2: #eef3f8;
    --bg: #f6f8fb;
    --ink: #0b1633;
    --muted: #65738a;
    --panel: #ffffff;
    --surface: rgba(255,255,255,.9);
    --surface-solid: #ffffff;
    --surface-subtle: #f8fafd;
    --surface-hover: #eef6ff;
    --line: #dfe7f1;
    --line-soft: #eef2f7;
    --accent: #075fc0;
    --accent-dark: #05265c;
    --accent-soft: #e9f3ff;
    --text-strong: #081936;
    --text-soft: #65738a;
    --nav-bg: #ffffff;
    --nav-bg-2: #ffffff;
    --nav-text: #394966;
    --nav-muted: #7c8aa0;
    --nav-active: #075fc0;
    --shadow-soft: 0 10px 30px rgba(8,25,54,.035);
    --shadow-panel: 0 18px 48px rgba(8,25,54,.045);
    background: linear-gradient(180deg, #fbfdff 0%, #f6f8fb 280px, #eef3f8 100%);
}

.customer-shell .shell {
    background: transparent;
}

.customer-shell .sidebar {
    width: 236px;
    flex-basis: 236px;
    padding: 22px 14px;
    background: rgba(255,255,255,.94);
    border-right: 1px solid var(--line);
    box-shadow: 14px 0 34px rgba(8,25,54,.03);
}

.customer-shell .brand {
    min-height: 48px;
    margin: 0 4px 24px;
    padding: 0 8px 16px;
    color: var(--accent-dark);
    border-bottom: 1px solid var(--line-soft);
    font-size: 18px;
    letter-spacing: -.02em;
}

.customer-shell .brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
}

.customer-shell nav {
    gap: 6px;
}

.customer-shell nav a {
    min-height: 42px;
    padding: 10px 12px;
    color: var(--nav-text);
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 14px;
}

.customer-shell nav a:hover,
.customer-shell nav a.is-active {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.customer-shell nav a.is-active {
    border-color: #cfe4ff;
    font-weight: 560;
}

.customer-shell nav a.is-active::before,
.customer-shell .subnav a.is-active::before {
    display: none;
}

.customer-shell .nav-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
    background: #f1f5fb;
    color: var(--accent);
}

.customer-shell .main {
    padding: 28px clamp(22px, 3.6vw, 54px) 44px;
}

.customer-shell .topbar {
    min-height: 68px;
    margin: -28px clamp(-54px, -3.6vw, -22px) 28px;
    padding: 16px clamp(22px, 3.6vw, 54px);
    border-bottom: 1px solid rgba(223,231,241,.9);
    background: rgba(251,253,255,.86);
}

.customer-shell .topbar h1 {
    color: var(--text-strong);
    font-size: clamp(21px, 2vw, 29px);
    letter-spacing: -.035em;
}

.customer-shell .eyebrow {
    color: var(--text-soft);
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    font-weight: 680;
}

.customer-shell .context-line span,
.customer-shell .context-line a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 680;
}

.customer-shell .userbox {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.customer-shell .global-search input {
    min-height: 44px;
    width: min(420px, 30vw);
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--line);
}

.customer-shell .panel,
.customer-shell .card,
.customer-shell .metric-card,
.customer-shell .scan-card,
.customer-shell .settings-tile,
.customer-shell .split-card,
.customer-shell .record-row,
.customer-shell .edit-panel {
    border-color: rgba(217,226,238,.95);
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow-soft);
}

.customer-shell .panel {
    padding: clamp(18px, 2vw, 26px);
    margin-bottom: 18px;
}

.customer-shell .dashboard-hero,
.customer-shell .workflow-hero,
.customer-shell .key-detail-hero {
    border: 1px solid rgba(217,226,238,.95);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(7,95,192,.12), transparent 38%),
        linear-gradient(135deg, #fff 0%, #f6f9ff 100%);
    box-shadow: var(--shadow-panel);
}

.customer-shell .dashboard-hero h2,
.customer-shell .workflow-hero h2 {
    margin-bottom: 8px;
    color: #071637;
    font-size: clamp(28px, 3.2vw, 44px);
    letter-spacing: -.05em;
}

.customer-shell .dashboard-hero p,
.customer-shell .workflow-hero p,
.customer-shell .page-intro {
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.55;
}

.customer-shell .quick-issue-actions {
    align-items: center;
    gap: 10px;
}

.customer-shell .button,
.customer-shell button {
    min-height: 42px;
    border-radius: 999px;
    padding: 10px 17px;
    font-size: 14px;
    font-weight: 590;
}

.customer-shell .button.big {
    min-height: 50px;
    padding-inline: 24px;
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 12px 26px rgba(7,95,192,.18);
}

.customer-shell .button.ghost,
.customer-shell button.ghost,
.customer-shell .secondary {
    background: #fff;
    color: var(--accent-dark);
    border-color: var(--line);
}

.customer-shell form > button:not(.ghost):not(.danger),
.customer-shell .panel > button:not(.ghost):not(.danger) {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.customer-shell .panel h2,
.customer-shell .toolbar h2 {
    color: var(--text-strong);
    font-size: clamp(18px, 1.5vw, 22px);
    letter-spacing: -.025em;
}

.customer-shell .action-list a,
.customer-shell .record-row {
    min-height: 64px;
    border-radius: 18px;
    background: #fff;
}

.customer-shell .customer-analysis {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.customer-shell .customer-analysis > summary,
.customer-shell .expert-panel > summary,
.customer-shell .more-actions > summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 560;
}

.customer-shell .expert-panel > summary {
    margin-bottom: 14px;
}

.customer-shell .more-actions {
    position: relative;
}

.customer-shell .more-actions > summary {
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    list-style: none;
}

.customer-shell .more-actions > summary::-webkit-details-marker {
    display: none;
}

.customer-shell .more-actions > div {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + 8px);
    display: grid;
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(8,25,54,.12);
}

.customer-shell .more-actions a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-strong);
}

.customer-shell input,
.customer-shell select,
.customer-shell textarea {
    min-height: 44px;
    border-radius: 13px;
    background: #fff;
    font-size: 14px;
}

.customer-shell textarea {
    min-height: 112px;
}

.customer-shell label {
    color: var(--text-strong);
    font-size: 13px;
}

.customer-shell table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.customer-shell th {
    background: #f8fafd;
    color: var(--text-soft);
}

.customer-shell th,
.customer-shell td {
    padding: 13px 14px;
}

.customer-shell tr:hover td {
    background: #f8fbff;
}

.customer-shell .badge {
    border-radius: 999px;
    background: #eef5ff;
    color: var(--accent-dark);
    border-color: #d5e8ff;
}

.customer-shell .badge.warn {
    background: #fff7e8;
    color: #9a4d16;
    border-color: #ffe0a8;
}

.customer-shell .badge.bad,
.customer-shell .notice.bad {
    background: #fff0ee;
    color: #b42318;
    border-color: #ffd3ce;
}

.customer-shell .badge.muted {
    background: #f2f5f9;
    color: var(--text-soft);
}

.customer-shell .compact-edit-list .edit-panel summary {
    min-height: 70px;
    padding: 16px 18px;
    grid-template-columns: minmax(0, 1.3fr) auto auto;
}

.customer-shell .key-side {
    background: #f8fbff;
    border-top-color: var(--line);
}

.customer-shell .user-card label:has(select[name="company_id"]),
.customer-shell .user-card label:has(select[name="tenant_id"]) {
    display: none;
}

.customer-shell .loss-report-panel[open],
.customer-shell .edit-panel[open] {
    box-shadow: var(--shadow-panel);
}

/* Risk reports keep the key, incident and workflow state distinct.  They use
   the standard edit-panel layout rather than the two-column drawer layout. */
.customer-shell .loss-report-panel > summary {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
}

.customer-shell .loss-report-summary-main {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.customer-shell .loss-report-summary-main strong,
.customer-shell .loss-report-summary-main small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.customer-shell .loss-report-summary-tags {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.customer-shell .loss-report-summary-state {
    justify-self: end;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .customer-shell .loss-report-panel > summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .customer-shell .loss-report-summary-tags {
        justify-content: flex-start;
    }

    .customer-shell .loss-report-summary-state {
        justify-self: start;
    }
}

@media (max-width: 900px) {
    .customer-shell .sidebar {
        width: min(86vw, 320px);
        flex-basis: min(86vw, 320px);
    }
    .customer-shell .main {
        padding: 18px 14px 30px;
    }
    .customer-shell .topbar {
        margin: -18px -14px 18px;
        padding: 14px;
    }
    .customer-shell .global-search input {
        width: 100%;
    }
    .customer-shell .dashboard-hero,
    .customer-shell .workflow-hero {
        grid-template-columns: 1fr;
        border-radius: 24px;
        padding: 22px;
    }
    .customer-shell .quick-issue-actions {
        display: grid;
        width: 100%;
    }
    .customer-shell .quick-issue-actions .button,
    .customer-shell .quick-issue-actions button,
    .customer-shell .more-actions > summary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .customer-shell .more-actions > div {
        position: static;
        margin-top: 8px;
    }
    .customer-shell .table-wrap table,
    .customer-shell .panel > table,
    .customer-shell table {
        min-width: 0;
    }
    .customer-shell table,
    .customer-shell thead,
    .customer-shell tbody,
    .customer-shell tr,
    .customer-shell th,
    .customer-shell td {
        display: block;
        width: 100%;
    }
    .customer-shell tr {
        padding: 12px;
        border-bottom: 1px solid var(--line);
        background: #fff;
    }
    .customer-shell th {
        display: none;
    }
    .customer-shell td {
        border: 0;
        padding: 5px 0;
        overflow-wrap: anywhere;
    }
    .customer-shell .compact-edit-list .edit-panel summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 560px) {
    .customer-shell .dashboard-hero h2,
    .customer-shell .workflow-hero h2 {
        font-size: 30px;
    }
}

/* UX Sprint 1 – Premium customer experience. No new functions, only calmer product feel. */
body.customer-shell {
    --workspace: #f8fafc;
    --workspace-2: #f1f5f9;
    --panel-glass: rgba(255,255,255,.78);
    --panel-glass-strong: rgba(255,255,255,.88);
    --premium-shadow: 0 24px 70px rgba(8,25,54,.07);
    --premium-shadow-soft: 0 16px 44px rgba(8,25,54,.045);
    --premium-radius: 30px;
    --premium-radius-card: 24px;
    background:
        radial-gradient(circle at 78% 4%, rgba(7,95,192,.10), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, #f7f9fc 42%, #f1f5f9 100%);
    letter-spacing: -.008em;
}

.customer-shell * {
    transition:
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease,
        color .18s ease;
}

.customer-shell .main > section,
.customer-shell .main > details,
.customer-shell .main > .notice {
    width: min(100%, 1180px);
    margin-left: auto;
    margin-right: auto;
}

.customer-shell .sidebar {
    width: 264px;
    flex-basis: 264px;
    padding: 28px 18px;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(18px);
}

.customer-shell .brand {
    margin-bottom: 34px;
    padding-bottom: 22px;
}

.customer-shell .brand img {
    width: 40px;
    height: 40px;
}

.customer-shell nav {
    gap: 10px;
}

.customer-shell nav a {
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 14.5px;
}

.customer-shell nav a:hover {
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 28px rgba(8,25,54,.055);
    transform: translateX(2px);
}

.customer-shell nav a.is-active {
    background:
        linear-gradient(135deg, rgba(255,255,255,.95), rgba(232,243,255,.82));
    border-color: rgba(7,95,192,.20);
    box-shadow: 0 16px 42px rgba(7,95,192,.12);
}

.customer-shell nav a.is-active .nav-icon {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(7,95,192,.24);
}

.customer-shell .nav-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 13px;
}

.customer-shell .main {
    padding: 34px clamp(26px, 4vw, 64px) 64px;
}

.customer-shell .topbar {
    min-height: 96px;
    margin: -34px clamp(-64px, -4vw, -26px) 34px;
    padding: 22px clamp(26px, 4vw, 64px);
    background: rgba(248,250,252,.84);
    backdrop-filter: blur(22px);
}

.customer-shell .topbar h1 {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 560;
    letter-spacing: -.055em;
}

.customer-shell .topbar .eyebrow {
    margin-bottom: 6px;
    font-size: 13px;
    color: #64748b;
}

.customer-shell .context-line {
    margin-top: 10px;
}

.customer-shell .context-line span,
.customer-shell .context-line a {
    border-color: rgba(216,226,239,.74);
    background: rgba(255,255,255,.70);
}

.customer-shell .global-search {
    flex: 1 1 520px;
    display: flex;
    justify-content: center;
}

.customer-shell .global-search input {
    width: min(580px, 42vw);
    min-height: 58px;
    padding: 0 26px;
    border: 1px solid rgba(207,221,238,.85);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(16px);
    box-shadow:
        0 22px 55px rgba(8,25,54,.06),
        inset 0 1px 0 rgba(255,255,255,.72);
    font-size: 16px;
}

.customer-shell .global-search input:focus {
    border-color: rgba(7,95,192,.34);
    box-shadow:
        0 30px 80px rgba(7,95,192,.12),
        0 0 0 4px rgba(7,95,192,.10);
}

.customer-shell .panel,
.customer-shell .card,
.customer-shell .metric-card,
.customer-shell .scan-card,
.customer-shell .settings-tile,
.customer-shell .split-card,
.customer-shell .record-row,
.customer-shell .edit-panel {
    border-color: rgba(212,224,238,.72);
    border-radius: var(--premium-radius-card);
    background: var(--panel-glass);
    backdrop-filter: blur(18px);
    box-shadow: var(--premium-shadow-soft);
}

.customer-shell .panel {
    padding: clamp(24px, 2.4vw, 34px);
    margin-bottom: 28px;
}

.customer-shell .dashboard-hero,
.customer-shell .workflow-hero,
.customer-shell .key-detail-hero {
    padding: clamp(34px, 4vw, 58px);
    border-radius: var(--premium-radius);
    background:
        radial-gradient(circle at 86% 18%, rgba(7,95,192,.16), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,.88), rgba(236,245,255,.72));
    backdrop-filter: blur(20px);
    box-shadow: var(--premium-shadow);
}

.customer-shell .dashboard-hero h2,
.customer-shell .workflow-hero h2 {
    max-width: 760px;
    color: #07142f;
    font-size: clamp(42px, 5vw, 72px);
    line-height: .98;
    letter-spacing: -.075em;
}

.customer-shell .workflow-hero h2 {
    font-size: clamp(34px, 4vw, 56px);
}

.customer-shell .dashboard-hero p,
.customer-shell .workflow-hero p {
    max-width: 620px;
    margin-top: 16px;
    color: #66758e;
    font-size: 17px;
}

.customer-shell .quick-issue-actions {
    gap: 14px;
}

.customer-shell .button,
.customer-shell button {
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14.5px;
}

.customer-shell .button.big {
    min-height: 58px;
    padding-inline: 28px;
    box-shadow: 0 18px 40px rgba(7,95,192,.20);
}

.customer-shell .button:hover,
.customer-shell button:hover {
    transform: translateY(-1px);
}

.customer-shell .button.ghost,
.customer-shell button.ghost,
.customer-shell .secondary {
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(14px);
}

.customer-shell .quiet-label {
    color: #7b879a;
    font-size: 14px;
}

.customer-shell .customer-analysis,
.customer-shell .customer-secondary {
    margin-top: 4px;
    margin-bottom: 30px;
}

.customer-shell .customer-analysis > summary,
.customer-shell .customer-secondary > summary,
.customer-shell .expert-panel > summary {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 999px;
    color: #52627a;
    background: rgba(255,255,255,.54);
}

.customer-shell .customer-analysis > summary:hover,
.customer-shell .customer-secondary > summary:hover,
.customer-shell .expert-panel > summary:hover {
    color: var(--accent);
    background: rgba(255,255,255,.86);
}

.customer-shell input,
.customer-shell select,
.customer-shell textarea {
    min-height: 52px;
    border-color: rgba(212,224,238,.9);
    border-radius: 17px;
    background: rgba(255,255,255,.78);
}

.customer-shell input:focus,
.customer-shell select:focus,
.customer-shell textarea:focus {
    border-color: rgba(7,95,192,.36);
    box-shadow: 0 0 0 4px rgba(7,95,192,.10);
}

.customer-shell label {
    display: grid;
    gap: 9px;
    color: #101b31;
    font-size: 13.5px;
    font-weight: 520;
}

.customer-shell .form-grid {
    gap: 22px;
}

.customer-shell .toolbar {
    margin-bottom: 18px;
}

.customer-shell .toolbar h2,
.customer-shell .panel h2 {
    font-size: clamp(22px, 2.1vw, 30px);
    letter-spacing: -.045em;
}

.customer-shell .page-intro {
    margin-bottom: 24px;
}

.customer-shell table {
    border-color: rgba(212,224,238,.72);
}

.customer-shell th,
.customer-shell td {
    padding: 16px 18px;
}

.customer-shell .compact-edit-list .edit-panel summary {
    min-height: 88px;
    padding: 20px 22px;
}

.customer-shell .empty {
    border-radius: 22px;
    background: rgba(255,255,255,.66);
}

@media (max-width: 1100px) {
    .customer-shell .topbar {
        align-items: stretch;
    }
    .customer-shell .global-search {
        order: 3;
        width: 100%;
    }
    .customer-shell .global-search input {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .customer-shell .sidebar {
        width: min(88vw, 340px);
    }
    .customer-shell .main {
        padding: 18px 14px 42px;
    }
    .customer-shell .topbar {
        min-height: 0;
        margin: -18px -14px 22px;
        padding: 16px 14px 18px;
    }
    .customer-shell .topbar h1 {
        font-size: 30px;
    }
    .customer-shell .dashboard-hero,
    .customer-shell .workflow-hero {
        padding: 28px 22px;
    }
    .customer-shell .dashboard-hero h2,
    .customer-shell .workflow-hero h2 {
        font-size: clamp(38px, 12vw, 54px);
        line-height: 1.02;
    }
}

@media (max-width: 560px) {
    .customer-shell .button,
    .customer-shell button,
    .customer-shell .button.big {
        width: 100%;
    }
}

/* UX Sprint 1 pass 2 – reduce visual noise and prevent premium layouts from overflowing. */
.customer-shell .topbar > div:first-child,
.customer-shell .userbox,
.customer-shell .global-search,
.customer-shell .dashboard-hero > div,
.customer-shell .workflow-hero > div,
.customer-shell .split-card,
.customer-shell .form-grid,
.customer-shell .key-side {
    min-width: 0;
}

.customer-shell .topbar {
    gap: clamp(20px, 3vw, 34px);
}

.customer-shell .topbar > div:first-child {
    flex: 0 0 clamp(340px, 31vw, 410px);
}

.customer-shell .userbox {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(0, auto) auto;
    align-items: center;
    gap: 14px;
}

.customer-shell .userbox .global-search {
    width: 100%;
    justify-content: stretch;
}

.customer-shell .userbox .global-search input {
    width: 100%;
}

.customer-shell .account-link {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-shell .dashboard-hero,
.customer-shell .workflow-hero {
    align-items: center;
    overflow: clip;
}

.customer-shell .dashboard-hero h2,
.customer-shell .workflow-hero h2 {
    overflow-wrap: anywhere;
    hyphens: auto;
}

.customer-shell .topbar h1 {
    overflow-wrap: normal;
    hyphens: auto;
}

.customer-shell .split-card.user-card {
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr);
}

.customer-shell .user-card .form-grid.triple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-shell .user-card input,
.customer-shell .user-card select,
.customer-shell .user-card textarea {
    width: 100%;
    min-width: 0;
}

.customer-shell .key-side,
.customer-shell .record-row,
.customer-shell .compact-edit-list .edit-panel summary {
    overflow-wrap: anywhere;
}

@media (max-width: 1300px) {
    .customer-shell .topbar {
        flex-direction: column;
    }

    .customer-shell .topbar > div:first-child,
    .customer-shell .userbox {
        width: 100%;
        flex: none;
    }

    .customer-shell .topbar h1 {
        overflow-wrap: anywhere;
    }

    .customer-shell .userbox {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .customer-shell .split-card.user-card,
    .customer-shell .user-card .form-grid.triple {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .customer-shell .topbar h1 {
        font-size: clamp(26px, 9vw, 34px);
    }

    .customer-shell .userbox {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .customer-shell .userbox .global-search {
        grid-column: 1 / -1;
    }

    .customer-shell .account-link {
        max-width: 210px;
    }

    .customer-shell .dashboard-hero,
    .customer-shell .workflow-hero {
        gap: 20px;
    }

    .customer-shell .dashboard-hero h2,
    .customer-shell .workflow-hero h2 {
        font-size: clamp(34px, 10vw, 42px);
        letter-spacing: -.06em;
    }

}

/* Product Experience Sprint 2 – unified premium customer surface. */
body.customer-shell {
    --surface-page: #f6f9fc;
    --surface-card: rgba(255,255,255,.86);
    --surface-card-solid: #fff;
    --surface-subtle: rgba(241,246,252,.72);
    --border-subtle: rgba(201,216,235,.72);
    --border-hairline: rgba(218,228,240,.7);
    --text-quiet: #65738a;
    --text-heading: #07142f;
    --blue-primary: #075fc0;
    --blue-soft: #eaf4ff;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --shadow-panel: 0 22px 60px rgba(8,25,54,.055);
    --shadow-hover: 0 28px 72px rgba(8,25,54,.085);
}

.customer-shell .nav-icon svg {
    width: 19px;
    height: 19px;
    display: block;
}

.customer-shell .section-tabs {
    width: min(100%, 1180px);
    margin: -14px auto 30px;
    padding: 6px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border: 1px solid var(--border-hairline);
    border-radius: 999px;
    background: rgba(255,255,255,.68);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(8,25,54,.035);
    scrollbar-width: none;
}

.customer-shell .section-tabs::-webkit-scrollbar {
    display: none;
}

.customer-shell .section-tabs a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 9px 16px;
    border-radius: 999px;
    color: #52627a;
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    white-space: nowrap;
}

.customer-shell .section-tabs a:hover {
    color: var(--blue-primary);
    background: rgba(234,244,255,.72);
}

.customer-shell .section-tabs a.is-active {
    color: #fff;
    background: linear-gradient(135deg, #075fc0, #0b74de);
    box-shadow: 0 10px 24px rgba(7,95,192,.22);
}

.customer-shell .main > .panel,
.customer-shell .main > .card,
.customer-shell .main > .split-card,
.customer-shell .main > .record-list,
.customer-shell .main > .empty,
.customer-shell .main > .notice {
    width: min(100%, 1180px);
    margin-left: auto;
    margin-right: auto;
}

.customer-shell .panel,
.customer-shell .card,
.customer-shell .split-card,
.customer-shell .edit-panel,
.customer-shell .empty,
.customer-shell .notice {
    border: 1px solid var(--border-hairline);
    background: var(--surface-card);
    box-shadow: var(--shadow-panel);
}

.customer-shell .panel:hover,
.customer-shell .card:hover,
.customer-shell .split-card:hover,
.customer-shell .edit-panel:hover {
    box-shadow: var(--shadow-hover);
}

.customer-shell .toolbar {
    gap: 16px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-hairline);
}

.customer-shell .toolbar h2,
.customer-shell .panel h2 {
    color: var(--text-heading);
}

.customer-shell .toolbar .badge,
.customer-shell .toolbar .quiet-label {
    margin-left: auto;
}

.customer-shell .page-intro,
.customer-shell .panel p,
.customer-shell .card p,
.customer-shell .empty,
.customer-shell small {
    color: var(--text-quiet);
}

.customer-shell .empty {
    padding: 22px 24px;
    border-style: dashed;
    border-radius: var(--radius-lg);
}

.customer-shell .empty strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-heading);
}

.customer-shell .badge,
.customer-shell .status-badge {
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid rgba(185,207,232,.72);
    border-radius: 999px;
    background: rgba(235,245,255,.82);
    color: #145aa3;
    font-size: 11px;
    font-weight: 560;
    letter-spacing: -.01em;
    text-transform: none;
}

.customer-shell .badge.warn,
.customer-shell .badge.danger,
.customer-shell .is-warning {
    border-color: rgba(245,185,113,.45);
    background: #fff4e8;
    color: #9a4d16;
}

.customer-shell .badge.success,
.customer-shell .is-success {
    border-color: rgba(100,188,145,.42);
    background: #edf9f2;
    color: #1e7552;
}

.customer-shell .panel > table,
.customer-shell .table-wrap table,
.customer-shell table {
    width: 100%;
    border: 0;
    border-collapse: separate;
    border-spacing: 0 9px;
    background: transparent;
}

.customer-shell thead th,
.customer-shell table tr:first-child th {
    padding: 0 14px 6px;
    border: 0;
    color: #758299;
    font-size: 11px;
    font-weight: 560;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.customer-shell tbody tr,
.customer-shell table tr:not(:first-child) {
    background: rgba(255,255,255,.74);
    box-shadow: inset 0 0 0 1px var(--border-hairline);
}

.customer-shell tbody tr:hover,
.customer-shell table tr:not(:first-child):hover {
    background: rgba(255,255,255,.94);
    box-shadow: inset 0 0 0 1px rgba(7,95,192,.18), 0 12px 30px rgba(8,25,54,.045);
}

.customer-shell td {
    border: 0;
    color: #1b2940;
    vertical-align: middle;
}

.customer-shell td:first-child {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    font-weight: 560;
}

.customer-shell td:last-child {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.customer-shell td .button,
.customer-shell td button,
.customer-shell .inline-form .button,
.customer-shell .inline-form button {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12.5px;
}

.customer-shell .form-grid,
.customer-shell form.form-grid,
.customer-shell .panel > form {
    align-items: end;
}

.customer-shell .panel > form:not(.inline-form),
.customer-shell .split-card > form:not(.inline-form) {
    margin-top: 18px;
}

.customer-shell label > small {
    font-weight: 560;
    line-height: 1.45;
}

.customer-shell details {
    border-radius: var(--radius-md);
}

.customer-shell details > summary {
    cursor: pointer;
    color: #45566f;
    font-weight: 560;
}

.customer-shell details[open] > summary {
    color: var(--blue-primary);
}

.customer-shell .record-list {
    display: grid;
    gap: 12px;
}

.customer-shell .record-row,
.customer-shell .action-list a {
    border-color: var(--border-hairline);
    background: rgba(255,255,255,.78);
    border-radius: var(--radius-lg);
}

.customer-shell .record-row:hover,
.customer-shell .action-list a:hover {
    transform: translateY(-1px);
    border-color: rgba(7,95,192,.22);
}

.customer-shell .key-timeline {
    position: relative;
    gap: 0;
}

.customer-shell .key-timeline li {
    grid-template-columns: 150px 32px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 20px 0;
    border-color: var(--border-hairline);
}

.customer-shell .key-timeline li::before {
    grid-column: 2;
    margin: 4px 0 0;
    width: 11px;
    height: 11px;
    background: var(--blue-primary);
    box-shadow: 0 0 0 6px var(--blue-soft);
}

.customer-shell .key-timeline time {
    grid-column: 1;
    color: #66758e;
    font-size: 13px;
}

.customer-shell .key-timeline li > div {
    grid-column: 3;
}

.customer-shell .key-timeline strong {
    color: var(--text-heading);
}

.customer-shell .key-timeline p {
    color: #28364d;
}

.customer-shell :focus-visible {
    outline: 3px solid rgba(7,95,192,.18);
    outline-offset: 3px;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .customer-shell .topbar,
    .customer-shell .section-tabs,
    .customer-shell .dashboard-hero,
    .customer-shell .workflow-hero,
    .customer-shell .panel,
    .customer-shell .card {
        background: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .customer-shell *,
    .customer-shell *::before,
    .customer-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 900px) {
    .customer-shell .section-tabs {
        margin: -8px 0 20px;
        width: 100%;
        border-radius: 20px;
        flex-wrap: wrap;
        overflow-x: visible;
        justify-content: flex-start;
    }

    .customer-shell .section-tabs a {
        flex: 0 1 auto;
    }

    .customer-shell .panel > table,
    .customer-shell .table-wrap table,
    .customer-shell table {
        border-spacing: 0 12px;
    }

    .customer-shell table,
    .customer-shell thead,
    .customer-shell tbody,
    .customer-shell tr,
    .customer-shell th,
    .customer-shell td {
        display: block;
    }

    .customer-shell thead,
    .customer-shell table tr:first-child:has(th) {
        display: none;
    }

    .customer-shell tbody tr,
    .customer-shell table tr:not(:first-child) {
        padding: 14px;
        border-radius: var(--radius-lg);
    }

    .customer-shell td {
        padding: 8px 0;
    }

    .customer-shell td:first-child,
    .customer-shell td:last-child {
        border-radius: 0;
    }

    .customer-shell .key-timeline li {
        grid-template-columns: 24px minmax(0, 1fr);
        padding: 18px 0;
    }

    .customer-shell .key-timeline time {
        grid-column: 2;
        grid-row: 1;
    }

    .customer-shell .key-timeline li::before {
        grid-column: 1;
        grid-row: 1 / span 2;
        margin-top: 7px;
    }

    .customer-shell .key-timeline li > div {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .customer-shell .section-tabs a {
        min-height: 36px;
        padding: 8px 12px;
        font-size: 12.5px;
    }

    .customer-shell .panel,
    .customer-shell .card,
    .customer-shell .split-card {
        border-radius: 22px;
    }
}

/* Sprint 2 polish: keep compact controls and mobile actions calm */
.customer-shell input[type="checkbox"],
.customer-shell input[type="radio"] {
    width: 1.05rem;
    height: 1.05rem;
    min-width: 1.05rem;
    min-height: 1.05rem;
    padding: 0;
    border-radius: .35rem;
    box-shadow: none;
    accent-color: var(--accent);
}

.customer-shell input[type="radio"] {
    border-radius: 999px;
}

.customer-shell .toolbar,
.customer-shell .quick-issue-actions,
.customer-shell .data-actions {
    min-width: 0;
    flex-wrap: wrap;
}

.customer-shell .quick-issue-actions > *,
.customer-shell .toolbar > *,
.customer-shell .data-actions > * {
    min-width: 0;
}

@media (max-width: 720px) {
    .customer-shell {
        overflow-x: hidden;
    }

    .customer-shell .quick-issue-actions .button,
    .customer-shell .quick-issue-actions button,
    .customer-shell .data-actions .button,
    .customer-shell .data-actions button {
        max-width: 100%;
    }
}

/* Premium polish: lighter enterprise typography and calmer primary actions. */
body.customer-shell {
    --font-weight-regular: 400;
    --font-weight-medium: 520;
    --font-weight-semibold: 620;
    --font-weight-strong: 690;
    --heading-letter-spacing: -.028em;
    --heading-line-height: 1.04;
    --hero-action-gap: .65rem;
    --button-height: 42px;
    --button-radius: 16px;
    --button-radius-pill: 999px;
    --shadow-panel: 0 18px 46px rgba(8,25,54,.042);
    --shadow-hover: 0 24px 62px rgba(8,25,54,.06);
    --text-heading: #0a1833;
    --text-quiet: #6d7a8f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: var(--font-weight-regular);
    letter-spacing: -.003em;
}

.customer-shell .topbar h1 {
    font-weight: 560;
    letter-spacing: var(--heading-letter-spacing);
    line-height: var(--heading-line-height);
}

.customer-shell .eyebrow,
.customer-shell .context-line span,
.customer-shell .context-line a,
.customer-shell .badge,
.customer-shell .status-badge,
.customer-shell .quiet-label {
    font-weight: var(--font-weight-medium);
}

.customer-shell .brand {
    font-weight: var(--font-weight-semibold);
}

.customer-shell nav {
    gap: 8px;
}

.customer-shell nav a {
    min-height: 40px;
    padding: 9px 11px;
    font-weight: var(--font-weight-medium);
    letter-spacing: -.006em;
}

.customer-shell nav a:hover {
    background: rgba(234,244,255,.56);
}

.customer-shell nav a.is-active {
    border-color: rgba(190,216,246,.86);
    background: linear-gradient(180deg, rgba(248,252,255,.96), rgba(234,244,255,.82));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 10px 26px rgba(7,95,192,.08);
    color: #0d3f80;
    font-weight: var(--font-weight-semibold);
}

.customer-shell .nav-icon {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border-radius: 10px;
    background: rgba(239,246,255,.72);
}

.customer-shell .nav-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.62;
}

.customer-shell .section-tabs a {
    font-weight: var(--font-weight-medium);
}

.customer-shell .section-tabs a.is-active {
    font-weight: var(--font-weight-semibold);
}

.customer-shell .dashboard-hero,
.customer-shell .workflow-hero,
.customer-shell .key-detail-hero {
    border-radius: 24px;
    background:
        radial-gradient(circle at 86% 22%, rgba(7,95,192,.075), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(247,250,254,.84) 100%);
    box-shadow: 0 16px 46px rgba(8,25,54,.038);
}

.customer-shell .dashboard-hero h2,
.customer-shell .workflow-hero h2,
.customer-shell .panel h2,
.customer-shell .toolbar h2 {
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--heading-letter-spacing);
    line-height: var(--heading-line-height);
}

.customer-shell .dashboard-hero h2,
.customer-shell .workflow-hero h2 {
    color: #0a1833;
    font-size: clamp(28px, 3vw, 41px);
}

.customer-shell .button,
.customer-shell button {
    min-height: var(--button-height);
    border-radius: var(--button-radius-pill);
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 590;
    letter-spacing: -.008em;
    white-space: nowrap;
}

.customer-shell .button.big {
    min-height: calc(var(--button-height) + 2px);
    padding-inline: 20px;
    box-shadow: 0 10px 24px rgba(7,95,192,.15);
}

.customer-shell .more-actions > summary {
    min-height: var(--button-height);
    padding: 9px 14px;
    color: #49627d;
    font-weight: var(--font-weight-semibold);
    background: rgba(255,255,255,.58);
    border-color: rgba(211,224,240,.9);
}

.customer-shell .more-actions > div {
    border-radius: 16px;
}

.customer-shell .panel h2,
.customer-shell .toolbar h2 {
    font-size: clamp(17px, 1.4vw, 21px);
    font-weight: 560;
}

.customer-shell .action-list {
    gap: 14px;
}

.customer-shell .action-list a {
    min-height: 74px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 14px 16px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,.66);
}

.customer-shell .action-list a > span:first-child {
    width: 28px;
    height: 28px;
    border-radius: 12px;
    background: rgba(251,146,60,.10);
    color: #b36220;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
}

.customer-shell .action-list a strong {
    font-size: clamp(16px, 1.35vw, 19px);
    font-weight: 560;
    letter-spacing: -.018em;
    line-height: 1.26;
}

.customer-shell .action-list a small {
    align-self: center;
    color: var(--blue-primary);
    font-size: 12.5px;
    font-weight: var(--font-weight-semibold);
}

.customer-shell .card strong,
.customer-shell .metric-card strong {
    font-weight: var(--font-weight-semibold);
    letter-spacing: -.035em;
}

.customer-shell td:first-child,
.customer-shell details > summary,
.customer-shell label {
    font-weight: var(--font-weight-medium);
}

/* Pilot-readiness: keep legacy customer forms/lists visually inside the premium shell. */
.customer-shell .badge,
.customer-shell .status-badge {
    font-weight: 560;
    letter-spacing: -.006em;
}

.customer-shell thead th,
.customer-shell table tr:first-child th {
    color: #7a879b;
    font-weight: 560;
    letter-spacing: .032em;
}

.customer-shell td:first-child,
.customer-shell .record-row strong,
.customer-shell .edit-panel summary strong,
.customer-shell details > summary {
    font-weight: 560;
}

.customer-shell input,
.customer-shell select,
.customer-shell textarea {
    border-radius: 14px;
    font-weight: 400;
}

.customer-shell .form-grid,
.customer-shell form.form-grid {
    gap: 16px;
}

.customer-shell .form-grid.triple {
    gap: 16px 18px;
}

.customer-shell .panel > form:not(.inline-form),
.customer-shell .split-card > form:not(.inline-form) {
    margin-top: 20px;
}

.customer-shell .record-row,
.customer-shell .edit-panel summary,
.customer-shell .matrix-row {
    min-height: 66px;
}

.customer-shell .table-wrap {
    border-radius: 20px;
}

@media (max-width: 760px) {
    .customer-shell .action-list a {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .customer-shell .action-list a small {
        grid-column: 2;
    }
}

/* Product Sprint 3 – "Heute" replaces the dashboard with a calm workday surface. */
body.customer-shell {
    --today-width: 1180px;
    --today-gap: clamp(26px, 3vw, 42px);
    --today-line: rgba(205,220,238,.72);
    --today-panel: rgba(255,255,255,.74);
    --today-panel-strong: rgba(255,255,255,.9);
    --today-blue: #075fc0;
    --today-blue-soft: rgba(7,95,192,.08);
    --today-ink: #07162f;
    --today-muted: #69788f;
    --today-radius: 26px;
    --today-shadow: 0 18px 52px rgba(8,25,54,.045);
}

.customer-shell .topbar {
    border-color: rgba(214,226,240,.78);
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.customer-shell .topbar h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: var(--font-weight-semibold);
    color: var(--today-ink);
}

.customer-shell .context-line {
    color: var(--today-muted);
    font-size: 13px;
    font-weight: var(--font-weight-regular);
}

.customer-shell .global-search.spotlight-search {
    max-width: min(48vw, 640px);
}

.customer-shell .global-search-frame {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.customer-shell .global-search-frame input {
    width: 100%;
    min-height: 46px;
    padding: 0 86px 0 18px;
    border: 1px solid rgba(199,215,235,.76);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 14px 36px rgba(8,25,54,.045);
    color: #17243a;
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.customer-shell .global-search-frame input:focus {
    border-color: rgba(7,95,192,.42);
    background: #fff;
    box-shadow: 0 18px 44px rgba(7,95,192,.10);
}

.customer-shell .global-search-frame kbd {
    position: absolute;
    right: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(205,218,235,.82);
    border-radius: 999px;
    background: rgba(247,250,254,.9);
    color: #6d7c91;
    font: 500 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -.01em;
}

.customer-shell .global-search-frame.large input {
    min-height: 60px;
    padding-left: 24px;
    font-size: clamp(16px, 2vw, 20px);
}

.customer-shell .today-status,
.customer-shell .today-workspace,
.customer-shell .search-stage,
.customer-shell .search-hints {
    width: min(100%, var(--today-width));
    margin-left: auto;
    margin-right: auto;
}

.customer-shell .today-status {
    margin-top: 2px;
    margin-bottom: clamp(24px, 3.4vw, 42px);
}

.customer-shell .today-greeting {
    margin: 0 0 8px;
    color: var(--today-muted);
    font-size: 15px;
    font-weight: var(--font-weight-regular);
    letter-spacing: -.01em;
}

.customer-shell .today-state {
    max-width: 820px;
    margin: 0;
    color: var(--today-ink);
    font-size: clamp(30px, 4.4vw, 50px);
    font-weight: 540;
    letter-spacing: -.046em;
    line-height: 1.03;
}

.customer-shell .today-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(235px, 285px);
    gap: var(--today-gap);
    align-items: start;
}

.customer-shell .today-main-column {
    display: grid;
    gap: clamp(30px, 4vw, 50px);
    min-width: 0;
}

.customer-shell .today-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.customer-shell .today-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.customer-shell .today-section-head span {
    order: 2;
    color: #8190a5;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    letter-spacing: .035em;
    text-transform: uppercase;
}

.customer-shell .today-section-head h2 {
    margin: 0;
    color: var(--today-ink);
    font-size: clamp(19px, 1.9vw, 26px);
    font-weight: 560;
    letter-spacing: -.034em;
    line-height: 1.1;
}

.customer-shell .today-task-list,
.customer-shell .today-activity-list {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.customer-shell .today-task a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px 18px;
    align-items: center;
    min-height: 92px;
    padding: 18px 20px;
    border: 1px solid var(--today-line);
    border-radius: var(--today-radius);
    background: var(--today-panel-strong);
    box-shadow: var(--today-shadow);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.customer-shell .today-task a:hover {
    transform: translateY(-2px);
    border-color: rgba(7,95,192,.22);
    background: #fff;
    box-shadow: 0 22px 62px rgba(8,25,54,.07);
}

.customer-shell .today-task-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 15px;
    background: var(--today-blue-soft);
    color: var(--today-blue);
    font-size: 18px;
    font-weight: var(--font-weight-medium);
}

.customer-shell .today-task.is-critical .today-task-icon,
.customer-shell .today-task.is-urgent .today-task-icon {
    background: rgba(245,146,67,.12);
    color: #a45719;
}

.customer-shell .today-task-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.customer-shell .today-task-copy small {
    color: #78879c;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    letter-spacing: .025em;
    text-transform: uppercase;
}

.customer-shell .today-task-copy strong {
    color: #12213a;
    font-size: clamp(16px, 1.7vw, 21px);
    font-weight: 560;
    letter-spacing: -.026em;
    line-height: 1.22;
}

.customer-shell .today-task-copy em {
    color: var(--today-muted);
    font-size: 14px;
    font-style: normal;
    line-height: 1.45;
}

.customer-shell .today-task-action,
.customer-shell .today-link {
    color: var(--today-blue);
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    white-space: nowrap;
}

.customer-shell .today-link {
    display: inline-flex;
    margin-top: 14px;
}

.customer-shell .today-empty {
    display: grid;
    gap: 5px;
    padding: 26px;
    border: 1px dashed rgba(190,207,228,.9);
    border-radius: var(--today-radius);
    background: rgba(255,255,255,.56);
}

.customer-shell .today-empty strong {
    color: var(--today-ink);
    font-size: 20px;
    font-weight: 560;
}

.customer-shell .today-empty span {
    color: var(--today-muted);
    line-height: 1.5;
}

.customer-shell .today-empty.slim {
    padding: 18px 20px;
}

.customer-shell .today-quickstart {
    padding: clamp(20px, 2.4vw, 28px);
    border: 1px solid rgba(211,224,240,.72);
    border-radius: calc(var(--today-radius) + 2px);
    background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(247,251,255,.74));
    box-shadow: 0 16px 44px rgba(8,25,54,.042);
}

.customer-shell .today-quick-actions {
    display: grid;
    grid-template-columns: minmax(190px, max-content) minmax(150px, max-content) minmax(120px, max-content) auto;
    gap: 10px;
    align-items: center;
}

.customer-shell .today-quick-actions .button {
    justify-content: center;
}

.customer-shell .today-quick-actions .button.big {
    min-height: 46px;
    padding-inline: 22px;
}

.customer-shell .today-more-actions {
    position: relative;
    justify-self: start;
    border: 0;
}

.customer-shell .today-more-actions > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid rgba(211,224,240,.9);
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    color: #4d617a;
    font-weight: var(--font-weight-medium);
    list-style: none;
}

.customer-shell .today-more-actions > summary::-webkit-details-marker {
    display: none;
}

.customer-shell .today-more-actions > div {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--today-line);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 22px 54px rgba(8,25,54,.12);
}

.customer-shell .today-more-actions a {
    padding: 9px 10px;
    border-radius: 12px;
    color: #2a3a52;
    font-size: 13px;
    text-decoration: none;
}

.customer-shell .today-more-actions a:hover {
    background: rgba(234,244,255,.72);
    color: var(--today-blue);
}

.customer-shell .today-activity-list li {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 2px 13px;
    padding: 3px 0 16px;
    border-bottom: 1px solid rgba(219,229,241,.72);
}

.customer-shell .today-activity-list li:last-child {
    border-bottom: 0;
}

.customer-shell .today-activity-dot {
    grid-row: 1 / span 2;
    width: 9px;
    height: 9px;
    margin-top: 7px;
    border-radius: 999px;
    background: var(--today-blue);
    box-shadow: 0 0 0 6px var(--today-blue-soft);
}

.customer-shell .today-activity-list p {
    margin: 0;
    color: #17243a;
    font-size: 15px;
    font-weight: var(--font-weight-regular);
    line-height: 1.45;
}

.customer-shell .today-activity-list small {
    color: var(--today-muted);
    font-size: 12.5px;
}

.customer-shell .today-side-column {
    position: sticky;
    top: 118px;
    display: grid;
    gap: 18px;
}

.customer-shell .today-metrics {
    display: grid;
    gap: 2px;
    padding: 5px 0;
}

.customer-shell .today-metrics a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: baseline;
    min-height: 48px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(220,230,242,.82);
    color: inherit;
    text-decoration: none;
}

.customer-shell .today-metrics a:last-child {
    border-bottom: 0;
}

.customer-shell .today-metrics span {
    color: var(--today-muted);
    font-size: 13px;
}

.customer-shell .today-metrics strong {
    color: var(--today-ink);
    font-size: clamp(20px, 2.4vw, 30px);
    font-weight: 590;
    letter-spacing: -.042em;
}

.customer-shell .search-stage {
    margin-bottom: 22px;
}

.customer-shell .search-stage-box {
    padding: clamp(24px, 3.5vw, 42px);
    border: 1px solid rgba(211,224,240,.72);
    border-radius: calc(var(--today-radius) + 4px);
    background: rgba(255,255,255,.78);
    box-shadow: var(--today-shadow);
}

.customer-shell .search-stage h2 {
    margin: 0 0 18px;
    color: var(--today-ink);
    font-size: clamp(30px, 4vw, 50px);
    font-weight: 540;
    letter-spacing: -.052em;
    line-height: 1;
}

.customer-shell .search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.customer-shell .search-stage-copy {
    margin: 14px 0 0;
    color: var(--today-muted);
    font-size: 14px;
}

.customer-shell .search-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.customer-shell .search-hints a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid rgba(211,224,240,.9);
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    color: #40536d;
    font-size: 13px;
    text-decoration: none;
}

.customer-shell .search-hints a:hover {
    border-color: rgba(7,95,192,.24);
    color: var(--today-blue);
}

.customer-shell .panel:has(> table),
.customer-shell .panel:has(> .table-wrap) {
    max-width: 100%;
    overflow-x: auto;
}

.customer-shell .panel > table .inline-form {
    max-width: 100%;
    flex-wrap: wrap;
}

.customer-shell .panel > table .inline-form .signature-pad {
    min-width: min(100%, 220px);
    max-width: 100%;
}

.customer-shell .panel > table .inline-form .signature-pad-actions {
    grid-template-columns: 1fr;
}

@media (max-width: 1320px) {
    .customer-shell .today-workspace {
        grid-template-columns: 1fr;
    }

    .customer-shell .today-side-column {
        position: static;
    }

    .customer-shell .today-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .customer-shell .today-metrics a {
        min-height: 90px;
        padding: 16px;
        border: 1px solid rgba(211,224,240,.72);
        border-radius: 20px;
        background: rgba(255,255,255,.62);
    }
}

@media (max-width: 900px) {
    .customer-shell .global-search.spotlight-search {
        max-width: none;
    }

    .customer-shell .today-state {
        font-size: clamp(31px, 8vw, 46px);
    }

    .customer-shell .today-quick-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .customer-shell .today-quick-actions .button.big {
        grid-column: 1 / -1;
        width: 100%;
    }

    .customer-shell .today-more-actions {
        justify-self: stretch;
    }

    .customer-shell .today-more-actions > summary {
        width: 100%;
    }

    .customer-shell .today-more-actions > div {
        right: auto;
        left: 0;
        width: min(100%, 280px);
    }

    .customer-shell .today-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-shell .search-page-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .customer-shell .today-section-head {
        display: grid;
        gap: 5px;
    }

    .customer-shell .today-section-head span {
        order: 0;
    }

    .customer-shell .today-task a {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 0;
        padding: 16px;
    }

    .customer-shell .today-task-icon {
        width: 32px;
        height: 32px;
        border-radius: 12px;
    }

    .customer-shell .today-task-action {
        grid-column: 2;
    }

    .customer-shell .today-quick-actions {
        grid-template-columns: 1fr;
    }

    .customer-shell .today-quick-actions .button,
    .customer-shell .today-more-actions > summary {
        width: 100%;
        min-height: 46px;
    }

    .customer-shell .today-metrics {
        grid-template-columns: 1fr;
    }

    .customer-shell .global-search-frame input {
        padding-right: 18px;
    }

    .customer-shell .global-search-frame kbd {
        display: none;
    }
}

/* Product Sprint 4 – Calm workflows across search, keys, issue, return, loss and history. */
.customer-shell .calm-page-head,
.customer-shell .calm-filterbar,
.customer-shell .calm-work-list,
.customer-shell .calm-object-head,
.customer-shell .calm-overview-grid,
.customer-shell .calm-stepper,
.customer-shell .calm-empty,
.customer-shell .calm-form-panel,
.customer-shell .calm-timeline-section,
.customer-shell .calm-drawer {
    width: min(100%, var(--today-width, 1180px));
    margin-left: auto;
    margin-right: auto;
}

.customer-shell .calm-page-head,
.customer-shell .calm-object-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(20px, 3vw, 34px);
    align-items: end;
    margin-bottom: clamp(22px, 3.6vw, 42px);
}

.customer-shell .calm-page-head h2,
.customer-shell .calm-object-head h2 {
    margin: 0 0 8px;
    color: var(--today-ink);
    font-size: clamp(34px, 4.8vw, 58px);
    font-weight: 540;
    letter-spacing: -.052em;
    line-height: .98;
}

.customer-shell .calm-page-head p:not(.eyebrow),
.customer-shell .calm-object-head p:not(.eyebrow) {
    max-width: 720px;
    margin: 0;
    color: var(--today-muted);
    font-size: 15px;
    line-height: 1.55;
}

.customer-shell .calm-actionbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.customer-shell .calm-filterbar {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid rgba(211,224,240,.72);
    border-radius: 24px;
    background: rgba(255,255,255,.74);
    box-shadow: 0 12px 34px rgba(8,25,54,.035);
}

.customer-shell .calm-filterbar form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(170px, auto) auto;
    gap: 10px;
    align-items: center;
}

.customer-shell .calm-filterbar input,
.customer-shell .calm-filterbar select {
    min-height: 44px;
    border-radius: 999px;
}

.customer-shell .calm-filterchips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.customer-shell .calm-filterchips a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(211,224,240,.9);
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    color: #4d617a;
    font-size: 12.5px;
    text-decoration: none;
}

.customer-shell .calm-filterchips a:hover,
.customer-shell .calm-filterchips a.is-active {
    border-color: rgba(7,95,192,.28);
    background: rgba(234,244,255,.76);
    color: var(--today-blue);
}

.customer-shell .calm-work-list {
    display: grid;
    gap: 12px;
    margin-bottom: clamp(24px, 3vw, 38px);
}

.customer-shell .calm-list-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 4px;
}

.customer-shell .calm-list-head h2 {
    margin: 0 0 4px;
    color: var(--today-ink);
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 560;
    letter-spacing: -.035em;
}

.customer-shell .calm-list-head p {
    margin: 0;
    color: var(--today-muted);
    font-size: 13.5px;
}

.customer-shell .calm-list-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
    border: 1px solid rgba(205,220,238,.72);
    border-radius: 24px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 14px 40px rgba(8,25,54,.038);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.customer-shell .calm-list-row:hover,
.customer-shell .calm-list-row:focus-within {
    transform: translateY(-1px);
    border-color: rgba(7,95,192,.24);
    box-shadow: 0 20px 52px rgba(8,25,54,.065);
}

.customer-shell .calm-row-link {
    display: grid;
    grid-template-columns: minmax(230px, 1.7fr) auto minmax(150px, .75fr) minmax(150px, .75fr) auto;
    gap: 16px;
    align-items: center;
    min-height: 82px;
    padding: 17px 18px 17px 20px;
    color: inherit;
    text-decoration: none;
}

.customer-shell .calm-row-main,
.customer-shell .calm-row-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.customer-shell .calm-row-main strong {
    color: var(--today-ink);
    font-size: clamp(16px, 1.45vw, 20px);
    font-weight: 560;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.customer-shell .calm-row-main small,
.customer-shell .calm-row-meta small {
    color: #78879c;
    font-size: 12px;
}

.customer-shell .calm-row-meta strong {
    color: #24344c;
    font-size: 13.5px;
    font-weight: 520;
    overflow-wrap: anywhere;
}

.customer-shell .calm-row-action {
    color: var(--today-blue);
    font-size: 13px;
    font-weight: 560;
    white-space: nowrap;
}

.customer-shell .calm-row-state {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.customer-shell .key-approval-indicator {
    white-space: nowrap;
}

/* Vehicle workspace: keep the operational facts visible without turning the
   vehicle list into a fixed-width table. */
.customer-shell .vehicle-workspace-row .calm-row-link {
    grid-template-columns: minmax(190px, 1.45fr) minmax(120px, .75fr) minmax(125px, .72fr) minmax(165px, .95fr) minmax(160px, .9fr) auto;
}

.customer-shell .vehicle-workspace-row .calm-row-state {
    display: grid;
    gap: 5px;
    justify-items: start;
}

.customer-shell .vehicle-workspace-row .calm-row-meta strong {
    font-variant-numeric: tabular-nums;
}

.customer-shell .vehicle-detail-key-list .calm-row-link {
    grid-template-columns: minmax(190px, 1.35fr) auto minmax(140px, .82fr) minmax(120px, .7fr) minmax(140px, .82fr) auto;
}

/* Vehicle create and edit deliberately share the same restrained form rhythm
   as the vehicle-key flow.  They remain normal form posts and do not create a
   second vehicle master-data path. */
.customer-shell .vehicle-create-panel {
    width: min(100%, var(--today-width, 1180px));
    margin-left: auto;
    margin-right: auto;
}

.customer-shell .vehicle-create-form,
.customer-shell .vehicle-edit-form {
    width: min(100%, 1040px);
    gap: 18px 20px;
    align-items: end;
}

.customer-shell .vehicle-create-form > label,
.customer-shell .vehicle-edit-form > label {
    min-width: 0;
    gap: 7px;
}

.customer-shell .vehicle-create-form textarea,
.customer-shell .vehicle-edit-form textarea {
    min-height: 86px;
}

.customer-shell .vehicle-create-actions,
.customer-shell .vehicle-edit-actions {
    justify-content: flex-end;
    margin-top: 2px;
    padding-top: 2px;
}

.customer-shell .vehicle-create-actions button,
.customer-shell .vehicle-edit-actions button {
    min-width: 190px;
}

/* Vehicle-key creation uses the shared form and depot authority, with a
   deliberately balanced presentation for the operational create journey. */
.customer-shell .vehicle-key-create-panel {
    width: min(100%, var(--today-width, 1180px));
    margin-left: auto;
    margin-right: auto;
}

.customer-shell .vehicle-key-create-form {
    width: min(100%, 1040px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 20px;
    align-items: start;
}

.customer-shell .vehicle-key-create-form > label {
    display: grid;
    grid-template-rows: minmax(20px, auto) minmax(44px, auto);
    align-content: start;
    min-width: 0;
    gap: 7px;
}

.customer-shell .vehicle-key-create-form > label > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.customer-shell .vehicle-key-create-form textarea {
    min-height: 82px;
}

.customer-shell .vehicle-key-create-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 2px;
    padding-top: 2px;
}

.customer-shell .vehicle-key-create-actions button {
    min-width: 228px;
}

/* Inventory remains a single authoritative count list.  Its desktop columns
   are deliberately aligned, while narrow screens use the existing card table
   treatment with explicit labels instead of a page-wide overflow. */
.customer-shell .inventory-items-wrap {
    overflow-x: clip;
}

.customer-shell .inventory-items-table {
    table-layout: fixed;
}

.customer-shell .inventory-items-table .inventory-status-column { width: 14%; }
.customer-shell .inventory-items-table .inventory-key-column { width: 29%; }
.customer-shell .inventory-items-table .inventory-copy-column { width: 19%; }
.customer-shell .inventory-items-table .inventory-depot-column { width: 20%; }
.customer-shell .inventory-items-table .inventory-scan-column { width: 18%; }

.customer-shell .inventory-items-table th,
.customer-shell .inventory-items-table td {
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .customer-shell .vehicle-create-form,
    .customer-shell .vehicle-edit-form,
    .customer-shell .vehicle-key-create-form {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 14px;
    }

    .customer-shell .vehicle-create-actions,
    .customer-shell .vehicle-edit-actions,
    .customer-shell .vehicle-key-create-actions {
        justify-content: stretch;
    }

    .customer-shell .vehicle-create-actions button,
    .customer-shell .vehicle-edit-actions button,
    .customer-shell .vehicle-key-create-actions button {
        width: 100%;
    }

    .customer-shell .inventory-items-table td {
        display: grid;
        grid-template-columns: minmax(104px, .65fr) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
    }

    .customer-shell .inventory-items-table td::before {
        content: attr(data-label);
        color: #758299;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .customer-shell .calm-drawer > summary {
        grid-template-columns: 16px minmax(0, 1fr);
        gap: 10px;
        padding: 16px 18px;
    }
}

.customer-shell .calm-row-menu {
    position: relative;
    display: flex;
    align-items: center;
    padding-right: 14px;
    border: 0;
}

.customer-shell .calm-row-menu > summary,
.customer-shell .calm-more-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid rgba(211,224,240,.9);
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    color: #4d617a;
    font-size: 13px;
    font-weight: 520;
    list-style: none;
    cursor: pointer;
}

.customer-shell .calm-row-menu > summary::-webkit-details-marker,
.customer-shell .calm-more-menu > summary::-webkit-details-marker {
    display: none;
}

.customer-shell .calm-row-menu > div,
.customer-shell .calm-more-menu > div {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(205,220,238,.84);
    border-radius: 18px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 22px 54px rgba(8,25,54,.12);
}

.customer-shell .calm-row-menu a,
.customer-shell .calm-more-menu a {
    padding: 9px 10px;
    border-radius: 12px;
    color: #2a3a52;
    font-size: 13px;
    text-decoration: none;
}

.customer-shell .calm-row-menu a:hover,
.customer-shell .calm-more-menu a:hover {
    background: rgba(234,244,255,.72);
    color: var(--today-blue);
}

.customer-shell .calm-object-head {
    padding: clamp(24px, 3vw, 38px);
    border: 1px solid rgba(211,224,240,.72);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(247,251,255,.72));
    box-shadow: 0 16px 46px rgba(8,25,54,.042);
}

.customer-shell .calm-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}

.customer-shell .calm-overview-grid div {
    display: grid;
    gap: 8px;
    min-height: 94px;
    padding: 18px;
    border: 1px solid rgba(211,224,240,.72);
    border-radius: 22px;
    background: rgba(255,255,255,.72);
}

.customer-shell .calm-overview-grid span {
    color: var(--today-muted);
    font-size: 12px;
}

.customer-shell .calm-overview-grid strong {
    color: var(--today-ink);
    font-size: 18px;
    font-weight: 560;
    overflow-wrap: anywhere;
}

.customer-shell .calm-stepper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.customer-shell .calm-stepper span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(211,224,240,.84);
    border-radius: 999px;
    background: rgba(255,255,255,.64);
    color: #68788f;
    font-size: 12.5px;
}

.customer-shell .calm-stepper .is-active {
    border-color: rgba(7,95,192,.28);
    background: rgba(234,244,255,.88);
    color: var(--today-blue);
}

.customer-shell .calm-summary {
    display: grid;
    gap: 5px;
    margin: 14px 0 20px;
    padding: 18px 20px;
    border: 1px solid rgba(211,224,240,.72);
    border-radius: 22px;
    background: rgba(248,251,255,.78);
}

.customer-shell .calm-summary strong {
    color: var(--today-ink);
    font-size: 17px;
    font-weight: 560;
}

.customer-shell .calm-summary span,
.customer-shell .calm-summary small {
    color: var(--today-muted);
    line-height: 1.45;
}

.customer-shell .calm-task-form details,
.customer-shell .calm-drawer {
    border: 1px solid rgba(211,224,240,.72);
    background: rgba(255,255,255,.68);
    box-shadow: none;
}

.customer-shell .calm-drawer {
    margin-bottom: 22px;
    border-radius: 24px;
}

.customer-shell .calm-drawer > summary {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 19px 22px;
    color: var(--today-ink);
    font-size: 17px;
    font-weight: 560;
    line-height: 1.25;
    list-style: none;
    cursor: pointer;
}

.customer-shell .calm-drawer > summary::-webkit-details-marker {
    display: none;
}

.customer-shell .calm-drawer > summary::before {
    content: "⌄";
    display: grid;
    place-items: center;
    width: 18px;
    height: 22px;
    color: var(--today-blue);
    font-size: 18px;
    font-weight: 620;
    line-height: 1;
    transition: transform .16s ease;
}

.customer-shell .calm-drawer[open] > summary::before {
    transform: rotate(180deg);
}

.customer-shell .calm-drawer-summary {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.customer-shell .calm-drawer-summary strong {
    display: block;
    color: var(--today-ink);
    font-size: 17px;
    font-weight: 620;
    line-height: 1.2;
}

.customer-shell .calm-drawer-summary small {
    display: block;
    color: var(--today-muted);
    font-size: 13px;
    font-weight: 450;
    line-height: 1.45;
}

/* Older drawer markup also contains a semantic title/subtitle pair, but does
   not always carry the newer helper class. Preserve the same two-line rhythm
   for every such pair instead of relying on incidental inline whitespace. */
.customer-shell .calm-drawer > summary > span > strong {
    display: block;
    color: var(--today-ink);
    font-size: 17px;
    font-weight: 620;
    line-height: 1.2;
}

.customer-shell .calm-drawer > summary > span > small {
    display: block;
    margin-top: 7px;
    color: var(--today-muted);
    font-size: 13px;
    font-weight: 450;
    line-height: 1.45;
}

.customer-shell .calm-drawer:not([open]) > :not(summary) {
    display: none !important;
}

.customer-shell .calm-drawer-body {
    padding: 0 22px 22px;
}

.customer-shell .key-copy-create {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--today-line, #dce6f3);
}

.customer-shell .key-copy-create-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.customer-shell .key-copy-create-head h3 {
    margin: 0;
    color: var(--today-ink);
    font-size: 17px;
    line-height: 1.25;
}

.customer-shell .key-copy-create-head p {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--today-muted);
    font-size: 14px;
    line-height: 1.5;
}

.customer-shell .key-copy-create-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

@media (max-width: 680px) {
    .customer-shell .key-copy-create-head {
        flex-direction: column;
        gap: 8px;
    }

    .customer-shell .key-copy-create-actions {
        justify-content: stretch;
    }

    .customer-shell .key-copy-create-actions button {
        width: 100%;
    }
}

.customer-shell .calm-pick-row {
    border-radius: 22px;
    background: rgba(255,255,255,.82);
}

.customer-shell .calm-timeline {
    gap: 0;
}

.customer-shell .calm-timeline li {
    grid-template-columns: 160px 28px minmax(0, 1fr);
    gap: 12px;
}

.customer-shell .panel:has(> table input[name="action"][value="return"]) {
    display: none;
}

.customer-shell .calm-empty {
    display: grid;
    gap: 5px;
    margin-bottom: 24px;
    padding: 24px;
    border: 1px dashed rgba(190,207,228,.9);
    border-radius: 24px;
    background: rgba(255,255,255,.62);
}

.customer-shell .calm-empty strong {
    color: var(--today-ink);
    font-weight: 560;
}

.customer-shell .calm-empty span {
    color: var(--today-muted);
}

.customer-shell .setup-hero,
.customer-shell .setup-section,
.customer-shell .setup-import-callout {
    border: 1px solid rgba(211,224,240,.64);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(248,251,255,.68));
    box-shadow: 0 18px 46px rgba(8,25,54,.038);
}

.customer-shell .setup-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .34fr);
    gap: clamp(22px, 4vw, 44px);
    align-items: end;
    padding: clamp(28px, 4vw, 48px);
    margin-bottom: 24px;
}

.customer-shell .setup-hero h2,
.customer-shell .setup-section-head h2,
.customer-shell .setup-import-callout h2 {
    margin: 0;
    color: var(--today-ink);
    font-size: clamp(32px, 4vw, 54px);
    font-weight: 520;
    letter-spacing: -.045em;
    line-height: .98;
}

.customer-shell .setup-section-head h2,
.customer-shell .setup-import-callout h2 {
    font-size: clamp(28px, 3vw, 42px);
}

.customer-shell .setup-hero p,
.customer-shell .setup-section-head p,
.customer-shell .setup-import-callout p,
.customer-shell .setup-step-panel p {
    color: var(--today-muted);
    line-height: 1.62;
}

.customer-shell .setup-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 16px;
}

.customer-shell .setup-hero-actions,
.customer-shell .setup-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.customer-shell .setup-score-card {
    display: grid;
    gap: 8px;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(211,224,240,.72);
    border-radius: 26px;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(16px);
}

.customer-shell .setup-score-card span,
.customer-shell .setup-score-card p,
.customer-shell .setup-metrics small,
.customer-shell .setup-next-card small,
.customer-shell .setup-muted {
    color: var(--today-muted);
}

.customer-shell .setup-score-card strong {
    color: var(--today-blue);
    font-size: 34px;
    font-weight: 560;
    letter-spacing: -.04em;
}

.customer-shell .setup-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.customer-shell .setup-metrics article,
.customer-shell .setup-next-card,
.customer-shell .setup-step-panel,
.customer-shell .setup-readonly-card,
.customer-shell .setup-result-row {
    border: 1px solid rgba(211,224,240,.68);
    border-radius: 24px;
    background: rgba(255,255,255,.76);
    box-shadow: 0 12px 34px rgba(8,25,54,.032);
}

.customer-shell .setup-metrics article {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.customer-shell .setup-metrics span,
.customer-shell .setup-step-panel > span,
.customer-shell .setup-readonly-card span {
    color: var(--today-muted);
    font-size: 12px;
}

.customer-shell .setup-metrics strong {
    color: var(--today-ink);
    font-size: 28px;
    font-weight: 560;
    letter-spacing: -.03em;
}

.customer-shell .setup-next-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.customer-shell .setup-next-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    min-height: 174px;
    padding: 18px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.customer-shell .setup-next-card:hover {
    transform: translateY(-2px);
    border-color: rgba(7,95,192,.22);
    box-shadow: 0 18px 46px rgba(8,25,54,.055);
}

.customer-shell .setup-next-card > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: rgba(234,244,255,.88);
    color: var(--today-blue);
    font-weight: 650;
}

.customer-shell .setup-next-card.needs-work > span {
    background: rgba(255,245,229,.86);
    color: #ad5b10;
}

.customer-shell .setup-next-card strong {
    display: block;
    margin: 4px 0 8px;
    color: var(--today-ink);
    font-size: 18px;
    font-weight: 560;
}

.customer-shell .setup-next-card p {
    margin: 0;
    color: var(--today-muted);
    line-height: 1.46;
}

.customer-shell .setup-next-card em {
    display: inline-flex;
    margin-top: 14px;
    color: var(--today-blue);
    font-style: normal;
    font-weight: 560;
}

.customer-shell .setup-section {
    padding: clamp(22px, 3vw, 34px);
    margin-bottom: 24px;
}

.customer-shell .setup-section-head,
.customer-shell .setup-import-callout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: end;
}

.customer-shell .setup-section-head {
    margin-bottom: 22px;
}

.customer-shell .setup-search {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto;
    gap: 8px;
}

.customer-shell .setup-search input,
.customer-shell .setup-context-picker select {
    min-height: 46px;
    border-radius: 16px;
    background: rgba(255,255,255,.9);
}

.customer-shell .setup-search-results {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.customer-shell .setup-list-head,
.customer-shell .setup-result-row,
.customer-shell .setup-tree-site > details > summary,
.customer-shell .setup-tree-building > summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.customer-shell .setup-list-head {
    color: var(--today-muted);
    grid-template-columns: minmax(0, 1fr) auto;
}

.customer-shell .setup-result-row {
    padding: 14px 16px;
}

.customer-shell .setup-result-row strong {
    color: var(--today-ink);
    font-weight: 560;
}

.customer-shell .setup-tree {
    display: grid;
    gap: 14px;
}

.customer-shell .setup-tree-site {
    border: 1px solid rgba(211,224,240,.72);
    border-radius: 26px;
    background: rgba(255,255,255,.76);
    overflow: hidden;
}

.customer-shell .setup-tree summary {
    list-style: none;
    cursor: pointer;
}

.customer-shell .setup-tree summary::-webkit-details-marker {
    display: none;
}

.customer-shell .setup-tree-site > details > summary {
    padding: 18px 20px;
}

.customer-shell .setup-tree-building {
    border-top: 1px solid rgba(229,236,246,.9);
}

.customer-shell .setup-tree-building > summary {
    padding: 16px 18px 16px 48px;
}

.customer-shell .setup-tree-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 16px;
    background: rgba(234,244,255,.9);
    color: var(--today-blue);
    font-weight: 650;
}

.customer-shell .setup-tree strong,
.customer-shell .setup-room-list strong,
.customer-shell .setup-readonly-card strong {
    color: var(--today-ink);
    font-weight: 560;
}

.customer-shell .setup-tree small,
.customer-shell .setup-room-list small,
.customer-shell .setup-readonly-card small {
    display: block;
    margin-top: 4px;
    color: var(--today-muted);
}

.customer-shell .setup-room-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0 18px 18px 86px;
}

.customer-shell .setup-room-list div {
    display: grid;
    gap: 4px;
    min-height: 118px;
    padding: 15px;
    border: 1px solid rgba(229,236,246,.9);
    border-radius: 20px;
    background: rgba(248,251,255,.78);
}

.customer-shell .setup-room-list span {
    color: var(--today-muted);
    font-size: 12px;
}

.customer-shell .setup-room-list a {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    min-height: 36px;
    padding: 0 2px;
    color: var(--today-blue);
    font-size: 13px;
    font-weight: 560;
}

.customer-shell .setup-assistant-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.customer-shell .setup-step-panel {
    position: relative;
    padding: 24px;
}

.customer-shell .setup-step-panel.wide-panel {
    grid-column: 1 / -1;
}

.customer-shell .setup-step-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: rgba(234,244,255,.9);
    color: var(--today-blue);
    font-weight: 650;
}

.customer-shell .setup-step-panel h3 {
    margin: 0 0 8px;
    color: var(--today-ink);
    font-size: 22px;
    font-weight: 540;
    letter-spacing: -.02em;
}

.customer-shell .setup-step-panel form {
    margin-top: 18px;
}

.customer-shell .setup-step-panel label {
    color: var(--today-ink);
    font-weight: 560;
}

.customer-shell .setup-step-panel input,
.customer-shell .setup-step-panel select,
.customer-shell .setup-step-panel textarea {
    min-height: 46px;
    border-radius: 16px;
}

.customer-shell .setup-more-fields {
    padding: 14px;
    border: 1px solid rgba(211,224,240,.72);
    border-radius: 18px;
    background: rgba(248,251,255,.72);
}

.customer-shell .setup-more-fields summary {
    display: flex;
    align-items: center;
    min-height: 40px;
    cursor: pointer;
    color: var(--today-blue);
    font-weight: 560;
}

.customer-shell .setup-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.customer-shell .setup-context-picker {
    max-width: 620px;
    margin: 16px 0;
}

.customer-shell .setup-existing-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.customer-shell .setup-existing-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(234,244,255,.78);
    color: var(--today-blue);
    font-size: 13px;
}

.customer-shell .setup-readonly-card {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 18px;
}

.customer-shell .setup-warning {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255,245,229,.8);
    color: #8a470d !important;
}

.customer-shell .setup-import-callout {
    padding: clamp(24px, 4vw, 38px);
}

@media (max-width: 1120px) {
    .customer-shell .setup-hero,
    .customer-shell .setup-section-head,
    .customer-shell .setup-import-callout {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .customer-shell .setup-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .customer-shell .setup-next-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-shell .setup-room-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-shell .calm-row-link {
        grid-template-columns: minmax(220px, 1fr) auto minmax(130px, .7fr) auto;
    }

    .customer-shell .vehicle-workspace-row .calm-row-link,
    .customer-shell .vehicle-detail-key-list .calm-row-link {
        grid-template-columns: 1fr;
    }

    .customer-shell .calm-row-meta:nth-of-type(3) {
        display: none;
    }

    .customer-shell .calm-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .customer-shell .setup-hero,
    .customer-shell .setup-section {
        border-radius: 24px;
        padding: 22px;
    }

    .customer-shell .setup-metrics,
    .customer-shell .setup-next-grid,
    .customer-shell .setup-assistant-grid,
    .customer-shell .setup-two-column,
    .customer-shell .setup-room-list,
    .customer-shell .setup-search {
        grid-template-columns: 1fr;
    }

    .customer-shell .setup-next-card {
        min-height: 0;
    }

    .customer-shell .setup-tree-site > details > summary,
    .customer-shell .setup-tree-building > summary,
    .customer-shell .setup-list-head,
    .customer-shell .setup-result-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .customer-shell .setup-tree-building > summary,
    .customer-shell .setup-room-list {
        padding-left: 18px;
    }

    .customer-shell .setup-tree summary .button {
        width: 100%;
        justify-content: center;
    }

    .customer-shell .calm-page-head,
    .customer-shell .calm-object-head {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .customer-shell .calm-page-head h2,
    .customer-shell .calm-object-head h2 {
        font-size: clamp(32px, 10vw, 44px);
    }

    .customer-shell .calm-actionbar {
        justify-content: stretch;
    }

    .customer-shell .calm-actionbar .button,
    .customer-shell .calm-actionbar button,
    .customer-shell .calm-more-menu,
    .customer-shell .calm-more-menu > summary {
        width: 100%;
    }

    .customer-shell .calm-filterbar form {
        grid-template-columns: 1fr;
    }

    .customer-shell .calm-list-head {
        display: grid;
        align-items: start;
    }

    .customer-shell .calm-list-row {
        grid-template-columns: 1fr;
    }

    .customer-shell .calm-row-link {
        grid-template-columns: 1fr;
        gap: 10px;
        min-height: 0;
        padding: 17px;
    }

    .customer-shell .calm-row-state,
    .customer-shell .calm-row-action {
        justify-self: start;
    }

    .customer-shell .calm-row-meta:nth-of-type(3) {
        display: grid;
    }

    .customer-shell .calm-row-menu {
        justify-self: start;
        padding: 0 17px 17px;
    }

    .customer-shell .calm-row-menu > div,
    .customer-shell .calm-more-menu > div {
        right: auto;
        left: 0;
    }

    .customer-shell .calm-overview-grid {
        grid-template-columns: 1fr;
    }

    .customer-shell .calm-timeline li {
        grid-template-columns: 24px minmax(0, 1fr);
    }
}

.migration-hero,
.migration-panel {
    border: 1px solid rgba(213,225,241,.66);
    border-radius: 28px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 22px 58px rgba(8,25,54,.055);
    backdrop-filter: blur(18px);
}

.migration-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) auto;
    gap: clamp(22px, 4vw, 42px);
    align-items: end;
    padding: clamp(30px, 5vw, 54px);
    margin-bottom: 22px;
    background:
        radial-gradient(circle at 18% 12%, rgba(6,114,216,.13), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(244,249,255,.82));
}

.migration-hero h2 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 540;
    color: #071b3f;
}

.migration-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 18px 0 0;
    color: #53657d;
    font-size: clamp(16px, 1.7vw, 19px);
    line-height: 1.65;
}

.migration-hero-actions,
.migration-actions,
.migration-template-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.migration-hero-actions {
    justify-content: flex-end;
}

.migration-panel {
    padding: clamp(22px, 3.5vw, 36px);
    margin-bottom: 20px;
}

.migration-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    margin-bottom: 22px;
}

.migration-section-head h2 {
    margin: 0;
    color: #071b3f;
    font-size: clamp(23px, 2.5vw, 34px);
    line-height: 1.12;
    letter-spacing: -.028em;
    font-weight: 560;
}

.migration-section-head p:not(.eyebrow) {
    max-width: 760px;
    margin: 9px 0 0;
    color: #64748b;
    line-height: 1.62;
}

.migration-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(232,243,255,.86);
    color: #075fc0;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.migration-status.ok {
    background: rgba(225,247,237,.86);
    color: #047857;
}

.migration-status.warn {
    background: rgba(255,244,221,.9);
    color: #9a4d16;
}

.migration-status.bad {
    background: rgba(255,234,231,.9);
    color: #b42318;
}

.migration-order {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.migration-order span,
.migration-template-strip a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(247,250,255,.92);
    border: 1px solid rgba(213,225,241,.72);
    color: #21324b;
}

.migration-order i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(6,114,216,.1);
    color: #075fc0;
    font-size: 12px;
    font-style: normal;
    font-weight: 720;
}

.migration-start-panel { margin-bottom: 22px; }

.migration-start-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.migration-start-card {
    display: grid;
    gap: 8px;
    min-height: 176px;
    padding: 20px;
    border: 1px solid rgba(202,217,238,.86);
    border-radius: 22px;
    color: #102544;
    text-decoration: none;
    background: rgba(255,255,255,.76);
    box-shadow: 0 14px 36px rgba(20,53,94,.06);
}

.migration-start-card:hover {
    border-color: rgba(6,114,216,.48);
    background: rgba(242,248,255,.96);
    transform: translateY(-1px);
}

.migration-start-card strong { font-size: 17px; }
.migration-start-card span { color: #425b7b; line-height: 1.5; }
.migration-start-card small { margin-top: auto; color: #075fc0; font-weight: 650; }

.migration-format-note {
    margin: 16px 0 0;
    color: #536a86;
    line-height: 1.55;
}

.migration-source-form,
.migration-mapping-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.migration-source-form .wide,
.migration-mapping-form .wide,
.migration-request-card.wide {
    grid-column: 1 / -1;
}

.migration-template-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(184, 213, 246, .9);
    border-radius: 18px;
    background: rgba(240, 247, 255, .78);
}

.migration-template-primary > div {
    display: grid;
    gap: 4px;
}

.migration-template-primary strong {
    color: #102544;
}

.migration-template-primary span,
.migration-safety-details p {
    color: #64748b;
    line-height: 1.5;
}

.migration-source-form input[type="file"] {
    min-height: 56px;
    padding: 15px;
    border: 1px dashed rgba(6,114,216,.34);
    background: rgba(247,251,255,.9);
}

.migration-source-form small,
.migration-mapping-form small,
.migration-template-strip span,
.migration-file-grid small,
.migration-history-list span,
.migration-limit-grid span,
.migration-empty span {
    color: #64748b;
    line-height: 1.45;
}

.migration-request-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(232,243,255,.72);
    color: #143b73;
}

.migration-template-strip {
    margin-top: 18px;
}

.migration-template-strip span {
    font-size: 13px;
    font-weight: 700;
}

.migration-safety-details {
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 1px solid rgba(213,225,241,.72);
    border-radius: 18px;
    background: rgba(255,255,255,.66);
}

.migration-safety-details summary {
    cursor: pointer;
    color: #37506f;
    font-weight: 650;
}

.migration-safety-details p {
    max-width: 720px;
    margin: 10px 0 0;
}

.migration-file-grid,
.migration-quality-grid,
.migration-limit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.migration-file-grid article,
.migration-quality-grid div,
.migration-limit-grid article {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 18px;
    border-radius: 22px;
    background: rgba(247,250,255,.88);
    border: 1px solid rgba(225,232,242,.8);
}

.migration-file-grid span,
.migration-quality-grid span {
    color: #64748b;
    font-size: 13px;
}

.migration-file-grid strong,
.migration-quality-grid strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #071b3f;
    font-size: clamp(22px, 2.4vw, 31px);
    line-height: 1.08;
    font-weight: 590;
}

.migration-map-table {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
}

.migration-map-table > div {
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(190px, 1.1fr) minmax(120px, .55fr) minmax(140px, .8fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(247,250,255,.72);
}

.migration-map-table > div:first-child {
    background: transparent;
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.migration-worklist {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.migration-worklist h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 620;
}

.migration-worklist article,
.migration-calm-ok,
.migration-empty {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255,251,242,.9);
    border: 1px solid rgba(245,202,139,.55);
}

.migration-worklist article span,
.migration-worklist article small {
    color: #8a470d;
}

.migration-worklist article strong,
.migration-calm-ok strong,
.migration-empty strong {
    color: #071b3f;
}

.migration-worklist article p {
    margin: 0;
    color: #374151;
}

.migration-calm-ok {
    margin-top: 18px;
    background: rgba(225,247,237,.8);
    border-color: rgba(128,211,176,.55);
}

.migration-technical {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(248,251,255,.72);
}

.migration-technical summary {
    cursor: pointer;
    color: #075fc0;
    font-weight: 650;
}

.migration-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
    color: #64748b;
}

.migration-history-list {
    display: grid;
    gap: 10px;
}

.migration-history-list article {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(150px, .65fr) minmax(170px, .75fr);
    gap: 14px;
    align-items: center;
    padding: 15px 16px;
    border-radius: 20px;
    background: rgba(247,250,255,.78);
    border: 1px solid rgba(225,232,242,.78);
}

.migration-history-list article > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.migration-limits {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 24px;
    align-items: start;
}

.migration-limit-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 980px) {
    .migration-hero,
    .migration-section-head,
    .migration-limits {
        grid-template-columns: 1fr;
    }

    .migration-hero-actions {
        justify-content: flex-start;
    }

    .migration-file-grid,
    .migration-quality-grid,
    .migration-start-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .migration-map-table > div {
        grid-template-columns: minmax(130px, .8fr) minmax(160px, 1fr) minmax(110px, .55fr);
    }

    .migration-map-table > div > small,
    .migration-map-table > div:first-child > strong:nth-child(4) {
        display: none;
    }
}

@media (max-width: 680px) {
    .migration-hero,
    .migration-panel {
        border-radius: 24px;
        padding: 22px;
    }

    .migration-source-form,
    .migration-mapping-form,
    .migration-file-grid,
    .migration-quality-grid,
    .migration-start-grid,
    .migration-history-list article,
    .migration-detail-grid {
        grid-template-columns: 1fr;
    }

    .migration-template-primary {
        align-items: stretch;
        flex-direction: column;
    }

    .migration-template-primary .button {
        width: 100%;
        justify-content: center;
    }

    .migration-actions .button,
    .migration-actions button,
    .migration-hero-actions .button,
    .migration-source-form button {
        width: 100%;
        justify-content: center;
    }

    .migration-map-table > div,
    .migration-map-table > div:first-child {
        grid-template-columns: 1fr;
    }

    .migration-map-table > div:first-child {
        display: none;
    }
}

/* Targeted setup/account polish after pilot feedback. */
.customer-shell .setup-disabled-form {
    display: grid;
    gap: 16px;
    min-height: 100%;
    padding: 22px;
    border: 1px dashed rgba(159,184,217,.72);
    border-radius: 24px;
    background: rgba(246,250,255,.72);
    color: var(--text-quiet);
}

.customer-shell .setup-disabled-form > div {
    display: grid;
    gap: 6px;
}

.customer-shell .setup-disabled-form strong {
    color: var(--text-heading);
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
}

.customer-shell .setup-disabled-form span {
    color: var(--text-quiet);
    line-height: 1.55;
}

.customer-shell .setup-disabled-form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    opacity: .58;
}

.customer-shell .calm-empty.slim {
    min-height: 0;
    margin: 0 0 18px;
    padding: 16px 18px;
    text-align: left;
    align-items: start;
}

.customer-shell .calm-empty.slim a {
    color: var(--blue-primary);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.customer-shell .scan-link-details {
    width: 100%;
    margin-top: 10px;
    color: var(--text-quiet);
}

.customer-shell .scan-link-details > summary {
    cursor: pointer;
    list-style: none;
    color: var(--blue-primary);
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
}

.customer-shell .scan-link-details > summary::-webkit-details-marker {
    display: none;
}

.customer-shell .scan-link-details .nfc-url {
    display: block;
    margin-top: 8px;
    white-space: normal;
    word-break: break-all;
}

/* Product Sprint 9 – reporting, help, package usage, loss handling and matrix orientation. */
.toolbar-actions,
.matrix-hero-actions,
.help-card-links,
.migration-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.context-help-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 13px;
    border: 1px solid rgba(7,95,192,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    color: var(--blue-primary);
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(25,63,112,.06);
}

.context-help-link:hover,
.context-help-link:focus {
    background: #fff;
    box-shadow: 0 16px 34px rgba(25,63,112,.11);
}

.help-hero,
.usage-overview,
.matrix-hero,
.reports-command {
    margin-bottom: 26px;
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    background: rgba(255,255,255,.78);
    box-shadow: var(--shadow-panel);
    backdrop-filter: blur(18px);
}

.help-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 28px;
    padding: clamp(24px, 4vw, 42px);
}

.help-hero h2,
.matrix-hero h2,
.usage-overview h2 {
    margin: 0 0 10px;
    color: var(--text-heading);
    font-size: clamp(28px, 4vw, 48px);
    font-weight: var(--font-weight-medium);
    letter-spacing: -.035em;
    line-height: 1.04;
}

.help-hero p,
.matrix-hero p,
.usage-head p,
.report-chart-summary {
    color: var(--text-quiet);
    line-height: 1.62;
}

.help-search {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.help-search input {
    min-height: 52px;
    border-radius: 18px;
    font-size: 16px;
}

.help-first-steps {
    padding: 22px;
    border: 1px solid rgba(201,216,235,.72);
    border-radius: 24px;
    background: rgba(248,251,255,.76);
}

.help-first-steps h3 {
    margin: 0 0 16px;
    color: var(--text-heading);
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
}

.help-first-steps ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.help-step a {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 2px 10px;
    padding: 12px;
    border: 1px solid rgba(201,216,235,.56);
    border-radius: 17px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.help-step span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(7,95,192,.08);
    color: var(--blue-primary);
    font-weight: var(--font-weight-semibold);
}

.help-step.done span {
    background: rgba(20,159,105,.12);
    color: #128056;
}

.help-step.manual span {
    background: rgba(246,167,45,.16);
    color: #a96a00;
}

.help-step strong,
.help-topic-card h3,
.usage-card strong,
.report-kpi-grid strong {
    color: var(--text-heading);
    font-weight: var(--font-weight-semibold);
}

.help-step small {
    color: var(--text-quiet);
    line-height: 1.45;
}

.help-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.help-topic-card {
    padding: 22px;
    border: 1px solid rgba(201,216,235,.72);
    border-radius: 24px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 18px 45px rgba(18,54,94,.07);
}

.help-topic-card > span {
    color: var(--blue-primary);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: .02em;
}

.help-topic-card ul {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--text-quiet);
    line-height: 1.5;
}

.help-card-links {
    margin-top: 16px;
}

.help-card-links a {
    color: var(--blue-primary);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
}

.help-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.help-field-group {
    padding: 18px;
    border: 1px solid rgba(201,216,235,.64);
    border-radius: 22px;
    background: rgba(255,255,255,.72);
}

.help-field-group summary {
    cursor: pointer;
    color: var(--text-heading);
    font-weight: var(--font-weight-semibold);
}

.help-field-group article {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(201,216,235,.56);
}

.help-field-group code {
    display: inline-flex;
    margin: 6px 0;
    padding: 4px 8px;
    border-radius: 9px;
    background: rgba(7,95,192,.07);
    color: var(--blue-primary);
    font-family: inherit;
}

.usage-overview {
    padding: 26px;
}

.usage-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.usage-plan-badge {
    align-self: start;
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(20,159,105,.1);
    color: #128056;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
}

.usage-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.usage-card {
    display: grid;
    gap: 11px;
    padding: 18px;
    border: 1px solid rgba(201,216,235,.68);
    border-radius: 22px;
    background: rgba(255,255,255,.82);
}

.usage-card-icon,
.usage-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(7,95,192,.08);
    color: var(--blue-primary);
}

.usage-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.usage-card strong {
    display: block;
    font-size: 15px;
    letter-spacing: -.04em;
}

.usage-number {
    margin: 0;
    color: var(--text-heading);
    font-size: 31px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -.045em;
}

.usage-number span {
    font-size: 16px;
}

.usage-card small,
.usage-card span,
.usage-caption,
.usage-data-note {
    color: var(--text-quiet);
}

.usage-progress,
.usage-bar,
.usage-trend-bar,
.report-status-list i {
    overflow: hidden;
    height: 7px;
    border-radius: 999px;
    background: rgba(134,154,184,.18);
}

.usage-progress i,
.usage-bar i,
.usage-trend-bar i,
.report-status-list i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue-primary), #58a8ff);
}

.usage-card.ok .usage-progress i,
.usage-card.ok .usage-bar i { background: linear-gradient(90deg, #1da76f, #74d5a9); }
.usage-card.warn .usage-progress i,
.usage-card.warn .usage-bar i { background: linear-gradient(90deg, #e49b24, #f3cf7a); }
.usage-card.bad .usage-progress i,
.usage-card.danger .usage-progress i,
.usage-card.bad .usage-bar i,
.usage-card.danger .usage-bar i { background: linear-gradient(90deg, #d9554f, #f0918c); }

.usage-lower-grid,
.usage-insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
    gap: 16px;
    margin-top: 16px;
}

.usage-trend-panel,
.usage-package-card {
    padding: 20px;
    border: 1px solid rgba(201,216,235,.68);
    border-radius: 24px;
    background: rgba(255,255,255,.76);
}

.usage-trend-list {
    display: grid;
    gap: 13px;
}

.usage-trend-row {
    display: grid;
    grid-template-columns: 100px minmax(0,1fr);
    align-items: center;
    gap: 12px;
}

.usage-sparkline {
    display: flex;
    align-items: end;
    gap: 8px;
    min-height: 74px;
}

.usage-sparkline span {
    display: grid;
    grid-template-rows: 54px 16px;
    align-items: end;
    flex: 1;
    text-align: center;
}

.usage-sparkline i {
    display: block;
    width: 100%;
    min-height: 4px;
    height: var(--h);
    border-radius: 999px 999px 4px 4px;
    background: linear-gradient(180deg, var(--blue-primary), rgba(7,95,192,.28));
}

.usage-sparkline small {
    color: var(--text-quiet);
    font-size: 10px;
}

.loss-risk-strip,
.loss-report-meta,
.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.loss-risk-strip article,
.loss-report-meta div,
.report-kpi-grid article,
.matrix-side article {
    padding: 17px;
    border: 1px solid rgba(201,216,235,.68);
    border-radius: 20px;
    background: rgba(255,255,255,.78);
}

.loss-risk-strip span,
.loss-report-meta span,
.report-kpi-grid span,
.matrix-side span {
    display: block;
    color: var(--text-quiet);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
}

.loss-risk-strip strong,
.loss-report-meta strong,
.matrix-side strong {
    display: block;
    margin-top: 5px;
    color: var(--text-heading);
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -.03em;
}

.loss-process {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    margin: 18px 0;
}

.loss-process span {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid rgba(201,216,235,.64);
    border-radius: 20px;
    background: rgba(248,251,255,.72);
}

.loss-process i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--blue-primary);
    color: #fff;
    font-style: normal;
    font-weight: var(--font-weight-semibold);
}

.loss-process small,
.loss-action-list p,
.risk-resolution p {
    color: var(--text-quiet);
    line-height: 1.5;
}

.loss-action-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.loss-action-list li {
    display: grid;
    grid-template-columns: 28px minmax(0,1fr);
    gap: 10px;
}

.loss-action-list li span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(20,159,105,.12);
    color: #128056;
}

.matrix-missing {
    align-items: start;
    text-align: left;
}

.matrix-hero {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    padding: 30px;
}

.matrix-filterbar {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    background: rgba(255,255,255,.74);
}

.matrix-filterbar form {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(160px, 1fr)) auto auto;
    gap: 12px;
    align-items: end;
}

.matrix-workspace {
    display: grid;
    grid-template-columns: minmax(0,1fr) 220px;
    gap: 18px;
}

.matrix-board,
.matrix-side {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border-subtle);
    border-radius: 26px;
    background: rgba(255,255,255,.78);
    box-shadow: var(--shadow-panel);
}

.matrix-board {
    overflow: hidden;
}

.matrix-grid {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid rgba(201,216,235,.72);
    border-radius: 20px;
    -webkit-overflow-scrolling: touch;
}

.matrix-grid-head,
.matrix-grid-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(var(--matrix-cols), minmax(112px, .8fr)) minmax(92px, auto);
    width: max-content;
    min-width: 100%;
}

.matrix-grid-row:not(form) {
    grid-template-columns: minmax(220px, 1.4fr) repeat(var(--matrix-cols), minmax(112px, .8fr));
}

.matrix-grid-head > div,
.matrix-key-cell,
.matrix-cell,
.matrix-row-save {
    padding: 12px;
    border-right: 1px solid rgba(201,216,235,.58);
    border-bottom: 1px solid rgba(201,216,235,.58);
    background: rgba(255,255,255,.7);
}

.matrix-grid-head > div {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248,251,255,.96);
    color: var(--text-heading);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
}

.matrix-grid-head small,
.matrix-key-cell small,
.matrix-cell small {
    display: block;
    color: var(--text-quiet);
    font-size: 11px;
}

.matrix-key-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    background: rgba(255,255,255,.96);
}

.matrix-cell {
    display: grid;
    place-items: center;
    min-height: 66px;
    text-align: center;
}

.matrix-cell span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 999px;
    font-weight: var(--font-weight-semibold);
}

.matrix-cell.opens span {
    background: rgba(20,159,105,.13);
    color: #128056;
}

.matrix-cell.closed span {
    background: rgba(131,148,174,.12);
    color: #7a8799;
}

.matrix-cell.editable {
    cursor: pointer;
}

.matrix-cell.editable input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.matrix-side {
    display: grid;
    align-content: start;
    gap: 12px;
}

.matrix-legend {
    display: grid;
    gap: 8px;
    color: var(--text-quiet);
    font-size: 12px;
}

.matrix-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 999px;
    background: rgba(131,148,174,.24);
}

.matrix-legend i.opens { background: #1da76f; }
.matrix-legend i.closed { background: #d9554f; }

.reports-command {
    padding: 22px;
}

.report-kpi-grid {
    grid-template-columns: repeat(4, minmax(0,1fr));
}

.report-kpi-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 32px;
    letter-spacing: -.04em;
}

.report-kpi-grid article.needs-action {
    border-color: rgba(217,85,79,.25);
    background: rgba(255,246,244,.82);
}

.report-insight {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding: 15px 17px;
    border-radius: 18px;
    background: rgba(7,95,192,.06);
    color: var(--text-heading);
}

.report-insight span {
    color: var(--text-quiet);
}

.report-filter-panel { margin-bottom: 18px; }

.report-filter-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
}

.report-filter-submit {
    display: flex;
    align-items: end;
    min-height: 100%;
}

.report-filter-submit button { width: 100%; }

.report-value-command { margin-bottom: 18px; }

.report-value-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.report-work-panel { min-width: 0; }

.report-case-list {
    display: grid;
    gap: 8px;
}

.report-case-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.3fr) minmax(120px, 1fr) minmax(125px, 1fr) minmax(125px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    background: rgba(255,255,255,.56);
}

.report-case-row:hover {
    border-color: rgba(7,95,192,.35);
    background: rgba(7,95,192,.045);
}

.report-case-row.needs-action { border-color: rgba(217,85,79,.28); }

.report-case-main,
.report-case-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.report-case-main strong,
.report-case-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-case-main small,
.report-case-meta small { color: var(--text-quiet); }

.report-case-action {
    color: var(--blue-primary);
    font-weight: 700;
    white-space: nowrap;
}

.report-timeline { margin: 0; }

.report-timeline li { grid-template-columns: 105px minmax(0,1fr) auto; }

.report-timeline .button { align-self: center; }

.report-inventory-status {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px 14px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: rgba(255,255,255,.56);
}

.report-inventory-status small,
.report-inventory-status p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-quiet);
}

.report-deep-dive { margin-top: 18px; }

.report-deep-dive > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

.report-deep-dive > summary::-webkit-details-marker { display: none; }

.report-deep-dive > summary small {
    display: block;
    margin-top: 3px;
    color: var(--text-quiet);
}

.report-deep-dive-body { padding-top: 18px; }

.report-chart-grid {
    display: grid;
    grid-template-columns: minmax(0,1.25fr) minmax(0,.9fr);
    gap: 18px;
    margin-bottom: 26px;
}

.report-chart-card {
    padding: 20px;
    border: 1px solid var(--border-subtle);
    border-radius: 26px;
    background: rgba(255,255,255,.78);
    box-shadow: var(--shadow-panel);
}

.report-rank-card {
    grid-column: 1 / -1;
}

.report-bars {
    display: flex;
    align-items: end;
    gap: 9px;
    min-height: 210px;
    padding: 20px 4px 4px;
}

.report-bar-day {
    display: grid;
    grid-template-rows: minmax(120px,1fr) 20px;
    align-items: end;
    flex: 1;
    min-width: 24px;
    text-align: center;
}

.report-bar-day::before {
    content: "";
    grid-row: 1;
}

.report-bar-day .bar {
    display: inline-block;
    align-self: end;
    width: 8px;
    min-height: 4px;
    border-radius: 999px 999px 0 0;
}

.report-bar-day .issued {
    background: var(--blue-primary);
}

.report-bar-day .returned {
    margin-left: 3px;
    background: #1da76f;
}

.report-bar-day small {
    color: var(--text-quiet);
    font-size: 10px;
}

.report-status-list {
    display: grid;
    gap: 12px;
}

.report-status-list div {
    display: grid;
    grid-template-columns: minmax(0,1fr) 50px;
    gap: 8px;
    align-items: center;
}

.report-status-list i {
    grid-column: 1 / -1;
}

.report-status-list.quiet i {
    background: linear-gradient(90deg, rgba(7,95,192,.72), rgba(7,95,192,.18));
}

@media (max-width: 1180px) {
    .usage-card-grid,
    .help-topic-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .matrix-workspace,
    .usage-lower-grid,
    .report-chart-grid,
    .report-value-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .matrix-filterbar form {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 760px) {
    .help-hero,
    .usage-head,
    .matrix-hero {
        display: grid;
        grid-template-columns: 1fr;
    }

    .help-topic-grid,
    .help-field-grid,
    .usage-card-grid,
    .loss-risk-strip,
    .loss-report-meta,
    .loss-process,
    .report-kpi-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-grid { grid-template-columns: 1fr; }

    .report-case-row {
        grid-template-columns: minmax(0,1fr) auto;
        gap: 9px 12px;
    }

    .report-case-meta {
        grid-column: 1;
        grid-template-columns: 115px minmax(0,1fr);
    }

    .report-case-action {
        grid-column: 2;
        grid-row: 1;
    }

    .report-timeline li { grid-template-columns: 1fr auto; }
    .report-timeline time,
    .report-timeline li > div { grid-column: 1; }
    .report-timeline .button { grid-column: 2; grid-row: 1; }

    .matrix-filterbar form {
        grid-template-columns: 1fr;
    }

    .report-bars {
        overflow-x: auto;
    }

    .report-bar-day {
        min-width: 34px;
    }
}

/* Product Sprint 10 – Betreiberportal V1. */
.platform-shell .topbar {
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,250,255,.86));
}

.operator-hero,
.operator-panel,
.operator-worklist,
.operator-filterbar,
.operator-drawer,
.operator-tabs {
    border: 1px solid rgba(196,214,238,.72);
    background: rgba(255,255,255,.82);
    box-shadow: 0 24px 70px rgba(20, 53, 94, .08);
    backdrop-filter: blur(18px);
}

.operator-hero {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: end;
    margin-bottom: 22px;
    padding: clamp(26px, 4vw, 44px);
    border-radius: 32px;
}

.operator-hero.compact { align-items: center; }

.operator-hero > div {
    min-width: 0;
}

.operator-hero h2 {
    margin: 0;
    max-width: 880px;
    font-size: clamp(32px, 5vw, 62px);
    line-height: .96;
    letter-spacing: -.055em;
    font-weight: var(--font-weight-medium);
}

.operator-hero.compact h2 {
    font-size: clamp(30px, 3.8vw, 48px);
    line-height: 1.04;
    overflow-wrap: anywhere;
}

.operator-hero p {
    max-width: 760px;
    color: var(--text-muted);
}

.operator-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.operator-metric-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.operator-metric-strip a {
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 18px;
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid rgba(196,214,238,.72);
    border-radius: 24px;
    background: rgba(255,255,255,.72);
}

.operator-metric-strip span,
.operator-customer-row small,
.operator-workitem span,
.operator-facts span,
.operator-timeline span,
.operator-mini-list span {
    color: var(--text-muted);
}

.operator-metric-strip strong {
    font-size: 28px;
    font-weight: var(--font-weight-medium);
}

.operator-worklist,
.operator-panel,
.operator-filterbar {
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 28px;
}

.operator-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.operator-section-head h2,
.operator-panel h2 {
    margin: 0;
    font-weight: var(--font-weight-medium);
    letter-spacing: -.025em;
}

.operator-workitem,
.operator-customer-row,
.operator-mini-list a,
.operator-mini-list article,
.operator-empty,
.operator-blockers article {
    border: 1px solid rgba(204,219,239,.78);
    background: rgba(250,252,255,.8);
    border-radius: 22px;
}

.operator-workitem {
    display: grid;
    grid-template-columns: 160px minmax(0,1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
}

.operator-workitem + .operator-workitem,
.operator-customer-row + .operator-customer-row,
.operator-mini-list > * + *,
.operator-drawer + .operator-drawer {
    margin-top: 10px;
}

.operator-workitem strong {
    font-weight: var(--font-weight-medium);
}

.operator-workitem a,
.operator-customer-row em {
    color: var(--accent);
    font-style: normal;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.operator-grid {
    display: grid;
    grid-template-columns: minmax(0,1.25fr) minmax(320px,.75fr);
    gap: 22px;
}

.operator-customer-list {
    display: grid;
    gap: 10px;
}

.operator-customer-row {
    display: grid;
    grid-template-columns: minmax(190px,1.2fr) minmax(175px,.95fr) minmax(170px,.9fr) minmax(165px,.78fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    color: var(--text-main);
    text-decoration: none;
}

.operator-customer-row.is-created {
    border-color: #5bc99a;
    background: linear-gradient(135deg, rgba(54, 154, 105, .12), rgba(255, 255, 255, .95));
    box-shadow: 0 10px 28px rgba(33, 121, 81, .12);
}

.operator-create-success {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 16px 18px;
    border: 1px solid #8bd6b2;
    border-radius: 12px;
    background: #effaf4;
    color: #174d35;
}

.operator-create-success div { display: grid; gap: 4px; }
.operator-create-success span { color: #35624b; }

.operator-customer-row > span {
    display: grid;
    gap: 4px;
}

.operator-customer-row > .operator-action-strip {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.operator-customer-row > .operator-action-strip form {
    margin: 0;
}

.operator-customer-row strong,
.operator-customer-row small {
    overflow-wrap: anywhere;
}

.operator-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(87,119,166,.25);
    border-radius: 999px;
    background: rgba(242,247,255,.9);
    color: #31557f;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
}

.operator-status-chip.is-free { border-color: rgba(68,137,103,.28); background: rgba(241,250,245,.9); color: #236746; }
.operator-status-chip.is-trial { border-color: rgba(44,112,193,.28); background: rgba(239,247,255,.92); color: #195a9f; }
.operator-status-chip.is-onboarding { border-color: rgba(181,125,31,.28); background: rgba(255,248,231,.9); color: #87530a; }
.operator-status-chip.is-paid { border-color: rgba(88,73,176,.26); background: rgba(245,243,255,.92); color: #4e3e9c; }
.operator-status-chip.is-archived { border-color: rgba(104,113,126,.24); background: rgba(246,247,249,.92); color: #596473; }

.operator-row-more-actions {
    position: relative;
}

.operator-row-more-actions > summary {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    list-style: none;
    border: 1px solid rgba(159,178,205,.68);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 19px;
    font-weight: var(--font-weight-bold);
}

.operator-row-more-actions > summary::-webkit-details-marker { display: none; }

.operator-row-more-actions > div {
    position: absolute;
    z-index: 5;
    right: 0;
    top: calc(100% + 8px);
    display: grid;
    min-width: 180px;
    padding: 8px;
    border: 1px solid rgba(171,190,215,.78);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(14,33,66,.16);
}

.operator-row-more-actions form { margin: 0; }
.operator-row-more-actions button {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-main);
    text-align: left;
}
.operator-row-more-actions button:hover { background: rgba(231,239,250,.8); }
.operator-row-more-actions button.danger { color: #a22929; }

.customer-domain-list {
    display: grid;
    gap: 10px;
}

.customer-domain-list article {
    display: grid;
    grid-template-columns: minmax(130px, .6fr) minmax(170px, .8fr) minmax(210px, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(204,219,239,.72);
    border-radius: 16px;
    background: rgba(250,252,255,.72);
}

.customer-domain-row > * {
    min-width: 0;
}

.customer-domain-list strong,
.customer-domain-list small,
.customer-domain-list span {
    display: block;
}

.customer-domain-tenant > span,
.customer-domain-primary > span,
.customer-domain-additional > span,
.customer-domain-list small,
.customer-domain-capabilities span {
    color: var(--text-muted);
}

.customer-domain-tenant > span,
.customer-domain-primary > span,
.customer-domain-additional > span {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: .03em;
    text-transform: uppercase;
}

.customer-domain-primary strong {
    color: var(--text);
}

.customer-domain-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.customer-domain-capabilities span {
    padding: 5px 8px;
    border: 1px solid rgba(204,219,239,.78);
    border-radius: 999px;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
}

.customer-domain-capabilities .is-enabled {
    border-color: rgba(78,159,120,.38);
    background: rgba(235,249,244,.82);
    color: #246746;
}

.customer-domain-editor {
    display: grid;
    gap: 16px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(68,126,201,.28);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(244,249,255,.92), rgba(252,253,255,.78));
}

.customer-domain-editor h4 {
    margin: 0;
}

.customer-domain-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
}

.customer-domain-preview {
    padding: 16px;
    border: 1px solid rgba(111,151,201,.26);
    border-radius: 14px;
    background: rgba(255,255,255,.7);
}

.operator-filterbar form,
.operator-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
}

.operator-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 10px;
    border-radius: 24px;
}

.operator-tabs a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
}

.operator-tabs a:hover,
.operator-tabs a:focus {
    color: var(--accent);
    background: rgba(7,95,192,.08);
}

.operator-facts article {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(204,219,239,.72);
    border-radius: 22px;
    background: rgba(250,252,255,.72);
}

.operator-facts strong {
    font-size: 22px;
    font-weight: var(--font-weight-medium);
}

.operator-facts.compact {
    margin-top: 14px;
}

.operator-drawer {
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
}

.operator-drawer summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
}

.operator-drawer summary span {
    display: grid;
    gap: 4px;
}

.operator-drawer-body {
    padding: 0 20px 20px;
}

.operator-checklist {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.operator-checkitem {
    display: grid;
    grid-template-columns: minmax(220px,1.2fr) 150px 160px 140px minmax(180px,1fr) minmax(160px,1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(204,219,239,.72);
    border-radius: 18px;
    background: rgba(255,255,255,.72);
}

.operator-checkitem strong {
    font-weight: var(--font-weight-medium);
}

.operator-mini-list {
    display: grid;
    gap: 10px;
}

.operator-mini-list a,
.operator-mini-list article,
.operator-mini-list details {
    padding: 16px;
}

.operator-mini-list article {
    display: grid;
    gap: 4px;
}

.operator-mini-list article span {
    color: var(--text-muted);
    line-height: 1.45;
}

.operator-mini-list a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-main);
    text-decoration: none;
}

.operator-empty {
    display: grid;
    gap: 6px;
    padding: 20px;
    color: var(--text-muted);
}

.operator-blockers {
    display: grid;
    gap: 10px;
}

.operator-blockers article {
    padding: 16px 18px;
    border-color: rgba(226,155,57,.42);
    background: rgba(255,248,236,.82);
}

.operator-go-live-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(235,249,244,.82);
}

.operator-timeline {
    display: grid;
    gap: 12px;
}

.operator-timeline article {
    display: grid;
    grid-template-columns: 190px minmax(0,1fr) 180px;
    gap: 16px;
    padding: 16px;
    border-left: 3px solid rgba(7,95,192,.35);
    background: rgba(250,252,255,.72);
    border-radius: 0 18px 18px 0;
}

.document-send-preview textarea {
    min-height: 360px;
    line-height: 1.58;
}

.document-send-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.document-resend-form {
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.document-resend-form .permanent-option {
    margin: 0;
}

.operator-action-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid rgba(180,197,222,.72);
    border-radius: 20px;
    background: rgba(250,252,255,.78);
}

.operator-action-strip span,
.operator-empty.subtle span {
    color: var(--text-muted);
}

.mail-preview {
    margin-top: 14px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(248,251,255,.86);
    color: var(--text-main);
    line-height: 1.65;
    white-space: normal;
}

.document-center-master details + details,
.document-center-pick .operator-panel {
    margin-top: var(--space-4);
}

.document-center-master table td:first-child small,
.document-center-pick small {
    color: var(--text-muted);
}

.document-center-pick .operator-mini-list a em {
    max-width: 18rem;
    text-align: right;
}

.document-center-pick .operator-mini-list a strong,
.document-center-master table td:first-child strong {
    overflow-wrap: anywhere;
    hyphens: auto;
}

@media (max-width: 640px) {
    .document-center-master .table-wrap {
        overflow: visible;
    }

    .document-center-master table,
    .document-center-master tbody,
    .document-center-master tr,
    .document-center-master td {
        display: block;
        width: 100%;
    }

    .document-center-master table tr:first-child {
        display: none;
    }

    .document-center-master table tr {
        margin-bottom: 12px;
        padding: 14px;
        border: 1px solid var(--border-soft);
        border-radius: 18px;
        background: rgba(255,255,255,.82);
        box-shadow: var(--shadow-soft);
    }

    .document-center-master table td {
        border: 0;
        padding: 4px 0;
        color: var(--text-main);
    }

    .document-center-master table td:nth-child(2)::before { content: "Version: "; }
    .document-center-master table td:nth-child(4)::before { content: "Prüfung: "; }
    .document-center-master table td:nth-child(5)::before { content: "Stand: "; }
    .document-center-master table td:nth-child(6)::before { content: "Format: "; }
    .document-center-master table td:nth-child(7)::before { content: "Freigabe: "; }

    .document-center-master table td::before {
        color: var(--text-muted);
        font-size: .78rem;
        font-weight: var(--font-weight-semibold);
        letter-spacing: .02em;
    }
}

.document-workbench-card {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.document-workbench-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.document-workbench-grid > a,
.document-workbench-grid > div {
    display: grid;
    gap: 6px;
    min-height: 118px;
    padding: 16px;
    border: 1px solid rgba(203, 217, 236, .68);
    border-radius: 22px;
    background: rgba(255, 255, 255, .76);
    color: var(--text-main);
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(14, 33, 66, .06);
}

.document-workbench-grid span {
    color: var(--text-muted);
    font-size: .86rem;
}

.document-workbench-grid strong {
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    line-height: 1;
    letter-spacing: -.04em;
    font-weight: var(--font-weight-medium);
}

.document-workbench-grid small {
    color: var(--text-soft);
    line-height: 1.45;
}

.document-workbench-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.document-workbench-lists .operator-mini-list strong,
.document-workbench-lists .operator-mini-list small {
    display: block;
}

.document-workbench-lists .operator-mini-list small {
    margin-top: 0.2rem;
}

.platform-document-search .calm-empty .button {
    margin-top: 12px;
    justify-self: start;
}

@media (max-width: 820px) {
    .document-center-pick .operator-mini-list a em {
        max-width: none;
        text-align: left;
    }

    .document-center-pick .operator-mini-list a {
        grid-template-columns: minmax(0, 1fr);
    }

    .document-workbench-grid,
    .document-workbench-lists {
        grid-template-columns: minmax(0, 1fr);
    }
}

.document-delivery-list {
    margin-bottom: 18px;
}

.document-delivery-list a {
    border: 1px solid rgba(180,197,222,.64);
    border-radius: 18px;
    background: rgba(255,255,255,.72);
}

/* Product Sprint 12 – Business Pulse for the operator Today workspace. */
.operator-pulse-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 28px;
    margin-bottom: 18px;
}

.operator-pulse-head h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: var(--font-weight-medium);
}

.operator-pulse-head p {
    margin-bottom: 0;
    color: var(--text-muted);
}

.operator-day-note {
    max-width: 420px;
    padding: 16px 18px;
    border: 1px solid rgba(202,216,236,.68);
    border-radius: 22px;
    background: rgba(255,255,255,.66);
    box-shadow: 0 18px 42px rgba(20,53,94,.06);
}

.operator-metric-strip.pulse {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.operator-metric-strip.pulse.compact {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.operator-metric-strip.pulse a {
    min-height: 82px;
    padding: 16px 18px;
    border-radius: 22px;
}

.operator-metric-strip.pulse a.is-muted {
    opacity: .62;
}

.operator-metric-strip.pulse small {
    color: var(--text-muted);
    font-size: 12px;
}

.operator-business-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .72fr);
    gap: 22px;
    align-items: start;
}

.business-inbox .operator-section-head p {
    margin: 4px 0 0;
    color: var(--text-muted);
}

.business-inbox-list {
    display: grid;
    gap: 12px;
}

.operator-workitem.pulse {
    grid-template-columns: 46px minmax(0, 1.2fr) minmax(160px, .44fr) auto;
    padding: 16px;
    border-color: rgba(204,219,239,.72);
    background: rgba(255,255,255,.78);
}

.operator-workitem.pulse.warn {
    border-color: rgba(226,155,57,.32);
    background: rgba(255,251,244,.88);
}

.operator-workitem.pulse.critical {
    border-color: rgba(221,89,89,.34);
    background: rgba(255,247,247,.9);
}

.operator-workitem.pulse.muted {
    background: rgba(249,251,255,.7);
}

.workitem-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: var(--accent);
    background: rgba(7,95,192,.08);
    font-weight: var(--font-weight-semibold);
}

.workitem-main {
    display: grid;
    gap: 3px;
}

.workitem-main p,
.workitem-meta small {
    margin: 0;
    color: var(--text-muted);
}

.workitem-meta {
    display: grid;
    gap: 4px;
    color: var(--text-muted);
}

.workitem-meta em {
    color: var(--text-main);
    font-style: normal;
    font-weight: var(--font-weight-medium);
}

.pulse-status {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.pulse-status > small {
    grid-column: 1 / -1;
    color: var(--text-muted);
}

.pulse-status em {
    align-self: center;
    color: var(--accent);
    font-style: normal;
    font-weight: var(--font-weight-semibold);
    text-align: right;
}

.pulse-status.warn em,
.pulse-status.critical em {
    color: #b45309;
}

.pulse-status.muted em {
    color: var(--text-muted);
}

.business-pipeline {
    margin-top: 22px;
}

.pipeline-rail {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

.pipeline-rail a {
    position: relative;
    display: grid;
    min-height: 118px;
    gap: 4px;
    padding: 14px;
    overflow: hidden;
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid rgba(203,217,236,.74);
    border-radius: 20px;
    background: rgba(255,255,255,.72);
}

.pipeline-rail a i {
    align-self: end;
    display: block;
    width: var(--w);
    max-width: 100%;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #7aa8ff);
}

.pipeline-rail span,
.pipeline-rail small {
    color: var(--text-muted);
}

.pipeline-rail strong {
    font-size: 28px;
    font-weight: var(--font-weight-medium);
}

.business-lower {
    margin-top: 22px;
}

.onboarding-stack {
    display: flex;
    height: 18px;
    overflow: hidden;
    margin: 12px 0 18px;
    border-radius: 999px;
    background: rgba(226,236,250,.8);
}

.onboarding-stack span {
    width: var(--w);
}

.onboarding-stack .plan,
.onboarding-legend .plan { background: #0b66c3; }
.onboarding-stack .waiting_customer,
.onboarding-legend .waiting_customer { background: #d9a441; }
.onboarding-stack .blocked,
.onboarding-legend .blocked { background: #d56b6b; }
.onboarding-stack .ready,
.onboarding-legend .ready { background: #1d9a73; }

.onboarding-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.onboarding-legend a {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid rgba(204,219,239,.72);
    border-radius: 16px;
    background: rgba(250,252,255,.74);
}

.onboarding-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.onboarding-legend span {
    color: var(--text-muted);
}

.calm-success {
    border-color: rgba(78,159,120,.28);
    background: rgba(243,250,247,.82);
}

@media (max-width: 1180px) {
    .operator-metric-strip {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .operator-grid,
    .operator-business-grid,
    .operator-customer-row,
    .customer-domain-list article,
    .operator-checkitem {
        grid-template-columns: 1fr;
    }

    .customer-domain-list article {
        align-items: start;
    }

    .customer-domain-list .button {
        justify-self: start;
    }

    .pipeline-rail {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .operator-hero,
    .operator-pulse-head,
    .operator-section-head,
    .operator-go-live-form {
        display: grid;
    }

    .operator-hero-actions {
        justify-content: stretch;
    }

    .operator-hero-actions .button,
    .operator-go-live-form .button,
    .document-send-actions .button,
    .operator-action-strip .button {
        width: 100%;
    }

    .customer-domain-list .button {
        width: 100%;
        justify-content: center;
    }

    .operator-customer-row > .operator-action-strip {
        justify-content: stretch;
    }

    .operator-customer-row > .operator-action-strip > .button {
        flex: 1 1 auto;
    }

    .operator-row-more-actions > div {
        right: auto;
        left: 0;
        min-width: min(260px, calc(100vw - 76px));
    }

    .commercial-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .commercial-trial-fields,
    .commercial-contract-dates,
    .commercial-save-row {
        grid-template-columns: 1fr;
    }

    .commercial-save-row {
        display: grid;
    }

    .commercial-save-row .button { width: 100%; }

    .operator-action-strip,
    .document-send-actions {
        display: grid;
    }

    .operator-metric-strip,
    .operator-metric-strip.pulse,
    .operator-filterbar form,
    .operator-facts,
    .operator-workitem,
    .operator-workitem.pulse,
    .operator-timeline article {
        grid-template-columns: 1fr;
    }

    .pipeline-rail,
    .onboarding-legend {
        grid-template-columns: 1fr;
    }

    .pipeline-rail a {
        min-height: auto;
    }

    .workitem-icon {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .commercial-choice-grid { grid-template-columns: 1fr; }
}

/* Product Sprint 13 – premium customer file: relationship, status and next action. */
.customer-file-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(230px, .56fr) minmax(300px, .72fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid rgba(203,217,236,.62);
    border-radius: 30px;
    background:
        radial-gradient(circle at 18% 0%, rgba(7,95,192,.08), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,.88), rgba(246,250,255,.74));
    box-shadow: 0 24px 60px rgba(16,48,90,.055);
    backdrop-filter: blur(18px);
}

.customer-file-identity {
    display: grid;
    align-content: center;
    min-width: 0;
}

.customer-file-identity h2 {
    margin: 4px 0 14px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: var(--font-weight-medium);
    color: var(--text-strong, var(--ink));
}

.customer-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.customer-file-meta span,
.customer-signal span,
.customer-next-action span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    letter-spacing: .02em;
}

.customer-file-meta span {
    padding: 7px 11px;
    border: 1px solid rgba(204,219,239,.72);
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    color: var(--text-soft, var(--muted));
}

.customer-signal,
.customer-next-action,
.customer-card {
    border: 1px solid rgba(203,217,236,.7);
    border-radius: 24px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 18px 48px rgba(16,48,90,.04);
    backdrop-filter: blur(16px);
}

.customer-signal {
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 20px;
}

.customer-signal strong {
    font-size: 24px;
    line-height: 1.08;
    font-weight: var(--font-weight-semibold);
}

.customer-signal a {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.customer-signal.is-plan {
    border-color: rgba(29,154,115,.22);
    background: rgba(244,251,248,.82);
}

.customer-signal.is-waiting_customer {
    border-color: rgba(217,164,65,.26);
    background: rgba(255,250,240,.84);
}

.customer-signal.is-attention,
.customer-signal.is-action_required {
    border-color: rgba(217,164,65,.28);
    background: rgba(255,250,240,.84);
}

.customer-signal.is-blocked,
.customer-signal.is-critical {
    border-color: rgba(210,82,82,.24);
    background: rgba(255,247,247,.86);
}

.customer-next-action {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 20px;
}

.customer-next-action strong {
    font-size: 22px;
    line-height: 1.12;
    font-weight: var(--font-weight-semibold);
}

.customer-next-action p {
    margin: 0;
    color: var(--text-muted);
}

.customer-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.customer-action-row .button.big {
    min-height: 48px;
    padding-inline: 20px;
}

.customer-more-actions {
    position: relative;
}

.customer-more-actions summary {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(190,207,231,.8);
    border-radius: 16px;
    background: rgba(255,255,255,.74);
    color: var(--accent);
    cursor: pointer;
    list-style: none;
    font-weight: var(--font-weight-medium);
}

.customer-more-actions summary::-webkit-details-marker {
    display: none;
}

.customer-more-actions[open] summary {
    box-shadow: 0 0 0 4px rgba(7,95,192,.08);
}

.customer-more-actions[open] {
    z-index: 12;
}

.customer-more-actions a {
    display: block;
    min-width: 220px;
    padding: 12px 14px;
    color: var(--text-main);
    text-decoration: none;
}

.customer-more-action-form {
    margin: 0;
}

.customer-more-action-form button {
    display: block;
    width: 100%;
    min-width: 220px;
    padding: 12px 14px;
    border: 0;
    color: var(--text-main);
    background: rgba(255,255,255,.96);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.customer-more-action-form button:hover {
    background: rgba(235,243,255,.72);
}

.customer-more-actions a:hover {
    background: rgba(235,243,255,.72);
}

.customer-more-actions[open]::after {
    content: "";
    position: absolute;
    inset: 50px auto auto 0;
    width: 240px;
    height: calc(100% - 50px);
    pointer-events: none;
}

.customer-more-actions[open] > :nth-child(2) {
    margin-top: 8px;
}

.customer-more-actions[open] a {
    position: relative;
    z-index: 2;
    border-left: 1px solid rgba(203,217,236,.74);
    border-right: 1px solid rgba(203,217,236,.74);
    background: rgba(255,255,255,.96);
}

.customer-more-actions[open] .customer-more-action-form {
    position: relative;
    z-index: 2;
    border-left: 1px solid rgba(203,217,236,.74);
    border-right: 1px solid rgba(203,217,236,.74);
}

.customer-more-actions[open] > :nth-child(2) {
    border-top: 1px solid rgba(203,217,236,.74);
    border-radius: 16px 16px 0 0;
}

.customer-more-actions[open] > :last-child,
.customer-more-actions[open] > :last-child button {
    border-bottom: 1px solid rgba(203,217,236,.74);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 18px 38px rgba(16,48,90,.12);
}

.customer-access-card .customer-facts {
    margin-bottom: 16px;
}

.customer-user-list {
    margin-top: 16px;
}

.customer-user-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.customer-user-list article > div:first-child {
    min-width: 0;
}

.customer-user-list article strong,
.customer-user-list article span,
.customer-user-list article small {
    display: block;
}

.customer-user-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.customer-user-preview {
    margin-top: 14px;
}

.customer-wizard-cancel {
    margin-top: 10px;
}

.customer-file-tabs {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 0 20px;
    padding: 8px;
    border: 1px solid rgba(203,217,236,.66);
    border-radius: 20px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 18px 36px rgba(16,48,90,.035);
    backdrop-filter: blur(16px);
    scrollbar-width: thin;
}

.customer-file-tabs a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 14px;
    color: var(--text-soft, var(--muted));
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
}

.customer-file-tabs a:hover,
.customer-file-tabs a:focus-visible {
    background: rgba(231,241,255,.82);
    color: var(--accent);
}

.customer-file-tabs a[aria-current="page"] {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(32,112,204,.24);
}

.customer-overview-grid,
.customer-section-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.customer-section-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .72fr);
}

.customer-card {
    min-width: 0;
    padding: clamp(20px, 2.3vw, 28px);
}

.customer-card.wide,
.customer-card[id],
.customer-card + .customer-card {
    margin-bottom: 18px;
}

.customer-history-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.customer-history-pagination > span {
    color: var(--text-muted);
    font-size: 13px;
}

.customer-card h3 {
    margin: 4px 0 14px;
    font-size: clamp(21px, 2vw, 30px);
    line-height: 1.06;
    letter-spacing: -.035em;
    font-weight: var(--font-weight-semibold);
}

.customer-card p {
    color: var(--text-muted);
    line-height: 1.58;
}

.customer-overview-grid > .customer-card:first-child,
.customer-section-grid > .customer-card.wide {
    grid-column: span 2;
}

.customer-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.customer-facts.single {
    grid-template-columns: 1fr;
}

.customer-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.customer-action-grid form {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(208,222,240,.78);
    border-radius: 18px;
    background: rgba(249,252,255,.78);
}

.commercial-change-card {
    display: grid;
    gap: 16px;
}

.commercial-selection-form,
.commercial-trial-fields,
.commercial-contract-dates {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(203,217,236,.78);
    border-radius: 18px;
    background: rgba(250,252,255,.82);
}

.commercial-selection-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.commercial-selection-form legend {
    margin-bottom: 10px;
    font-weight: var(--font-weight-semibold);
}

.commercial-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.commercial-choice {
    display: grid;
    grid-template-columns: 1.05rem minmax(0, 1fr);
    grid-template-areas: "control copy";
    min-width: 0;
    gap: 10px;
    align-items: flex-start;
    align-content: start;
    min-height: 82px;
    padding: 13px;
    border: 1px solid rgba(203,217,236,.82);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
    cursor: pointer;
}

.commercial-choice:has(input:checked) {
    border-color: rgba(7,95,192,.62);
    background: rgba(239,247,255,.92);
    box-shadow: inset 0 0 0 1px rgba(7,95,192,.12);
}

.commercial-choice input {
    grid-area: control;
    width: 1.05rem;
    height: 1.05rem;
    min-width: 1.05rem;
    min-height: 1.05rem;
    margin: 3px 0 0;
    accent-color: var(--accent);
}

.commercial-choice strong,
.commercial-choice small {
    display: block;
    min-width: 0;
}

.commercial-choice > span {
    display: grid;
    grid-area: copy;
    align-content: start;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

.commercial-choice strong { overflow-wrap: anywhere; }
.commercial-choice small { color: var(--text-muted); line-height: 1.35; }

/* These labels live inside the premium customer shell, whose general label
 * styling is intentionally grid-based. Pin the choice-card grid explicitly
 * so that no generic form rule can turn an access choice into a tall card
 * with vertically collapsed copy. */
.customer-shell .commercial-choice {
    display: grid;
    grid-template-columns: 1.05rem minmax(0, 1fr);
    grid-template-areas: "control copy";
    grid-auto-rows: auto;
    grid-column: auto;
    grid-row: auto;
    gap: 10px;
    min-height: 82px;
    height: auto;
    align-items: flex-start;
    align-content: start;
}

.customer-shell .commercial-choice > span {
    display: grid;
    grid-area: copy;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: start;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

.commercial-trial-fields {
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    align-items: end;
}

.commercial-trial-fields small {
    padding-bottom: 10px;
    color: var(--text-muted);
}

.commercial-contract-dates {
    grid-template-columns: repeat(2, minmax(180px, 280px));
    justify-content: start;
}

.commercial-save-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 2px;
}

.commercial-save-row small {
    max-width: 52rem;
    color: var(--text-muted);
}

.customer-facts div,
.customer-stat-list span,
.document-pills a,
.customer-document-matrix a,
.customer-mini-list > article,
.customer-mini-list > a,
.customer-timeline a,
.customer-blocker-list a {
    min-width: 0;
    border: 1px solid rgba(208,222,240,.7);
    border-radius: 18px;
    background: rgba(249,252,255,.78);
}

.customer-facts div {
    display: grid;
    gap: 4px;
    padding: 14px;
}

.customer-facts span,
.customer-stat-list small,
.customer-document-matrix span,
.customer-mini-list span,
.customer-timeline span,
.customer-onboarding-item small {
    color: var(--text-muted);
    font-size: 12px;
}

.customer-facts strong {
    overflow-wrap: anywhere;
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
}

.customer-facts small {
    overflow-wrap: anywhere;
    color: var(--text-muted);
}

.document-pills,
.customer-stat-list,
.customer-mini-metrics {
    display: grid;
    gap: 10px;
}

.document-pills a {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    text-decoration: none;
}

.document-pills a.is-ok {
    border-color: rgba(29,154,115,.28);
    background: rgba(245,251,248,.84);
}

.document-pills a.is-open,
.customer-document-matrix a.is-required {
    border-color: rgba(217,164,65,.32);
    background: rgba(255,251,244,.9);
}

.document-pills strong,
.customer-document-matrix strong {
    font-weight: var(--font-weight-semibold);
}

.customer-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(226,236,250,.9);
}

.customer-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #79a8ff);
}

.customer-mini-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.customer-mini-metrics span {
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(239,246,255,.76);
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
}

.go-live-summary.is-ready {
    border-color: rgba(29,154,115,.28);
    background: rgba(244,251,248,.86);
}

.go-live-summary.is-blocked {
    border-color: rgba(217,164,65,.28);
    background: rgba(255,250,240,.86);
}

.customer-stat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-stat-list.compact {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.customer-stat-list span {
    display: grid;
    gap: 2px;
    padding: 14px;
    color: var(--text-muted);
}

.customer-stat-list strong {
    display: block;
    color: var(--text-main);
    font-size: 28px;
    line-height: 1;
    letter-spacing: -.04em;
    font-weight: var(--font-weight-semibold);
}

.customer-section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    margin-bottom: 16px;
}

.customer-section-head h3,
.customer-section-head p {
    margin-bottom: 0;
}

.customer-timeline {
    display: grid;
    gap: 10px;
}

.customer-timeline a {
    position: relative;
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr) minmax(120px, .26fr);
    gap: 14px;
    align-items: center;
    padding: 14px 16px 14px 22px;
    text-decoration: none;
}

.customer-timeline a::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 18px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(7,95,192,.09);
}

.customer-timeline strong {
    overflow-wrap: anywhere;
    font-weight: var(--font-weight-medium);
}

.customer-timeline small {
    color: var(--text-muted);
    text-align: right;
}

.customer-document-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.customer-document-matrix a {
    display: grid;
    gap: 6px;
    padding: 16px;
    text-decoration: none;
}

.customer-document-matrix a.is-ok {
    border-color: rgba(29,154,115,.26);
    background: rgba(244,251,248,.88);
}

.customer-document-matrix a.is-open {
    background: rgba(249,252,255,.84);
}

.customer-detail-drawer {
    margin-top: 16px;
    border: 1px solid rgba(203,217,236,.7);
    border-radius: 20px;
    background: rgba(250,252,255,.74);
}

.customer-detail-drawer > summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    color: var(--accent);
    font-weight: var(--font-weight-semibold);
}

.customer-detail-drawer > form,
.customer-detail-drawer > .form-grid,
.customer-detail-drawer > .operator-mini-list,
.customer-detail-drawer > .customer-onboarding-list {
    padding: 0 18px 18px;
}

.customer-mini-list,
.customer-onboarding-list,
.customer-blocker-list {
    display: grid;
    gap: 10px;
}

.customer-mini-list > article,
.customer-mini-list > a {
    display: grid;
    gap: 4px;
    padding: 13px 15px;
    color: var(--text-main);
    text-decoration: none;
}

.customer-mini-list strong {
    overflow-wrap: anywhere;
    font-weight: var(--font-weight-semibold);
}

.customer-onboarding-item {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) minmax(150px, .5fr) minmax(150px, .5fr) 140px minmax(160px, .6fr) minmax(160px, .6fr) auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(208,222,240,.7);
    border-radius: 18px;
    background: rgba(255,255,255,.82);
}

.customer-onboarding-item.is-done,
.customer-onboarding-item.is-not_required {
    background: rgba(244,251,248,.78);
}

.customer-onboarding-item.is-blocked {
    border-color: rgba(210,82,82,.28);
    background: rgba(255,247,247,.86);
}

.customer-onboarding-item.is-waiting_customer {
    border-color: rgba(217,164,65,.3);
    background: rgba(255,251,244,.9);
}

.customer-onboarding-item strong {
    display: block;
    font-weight: var(--font-weight-semibold);
}

.customer-onboarding-item input,
.customer-onboarding-item select {
    min-height: 42px;
}

.customer-blocker-list a {
    display: block;
    padding: 14px 16px;
    color: #8a3d0a;
    background: rgba(255,248,236,.9);
    text-decoration: none;
}

.project-brief-prep {
    border: 1px solid rgba(9, 91, 191, .16);
    border-radius: 24px;
    padding: 22px;
    background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(244,248,255,.78));
    box-shadow: 0 18px 50px rgba(12, 34, 64, .08);
}

.project-brief-prep legend {
    padding: 0 10px;
    color: var(--text);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
}

.project-brief-prep .page-intro {
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--muted);
}

.project-brief-prep textarea {
    min-height: 112px;
}

.project-brief-prep input,
.project-brief-prep select,
.project-brief-prep textarea {
    font-weight: var(--font-weight-regular);
}

@media (max-width: 1240px) {
    .customer-file-hero {
        grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
    }

    .customer-next-action {
        grid-column: 1 / -1;
    }

    .customer-overview-grid,
    .customer-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-section-grid > .customer-card.wide {
        grid-column: 1 / -1;
    }

    .customer-onboarding-item {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .customer-file-hero,
    .customer-overview-grid,
    .customer-section-grid,
    .customer-overview-grid > .customer-card:first-child {
        grid-template-columns: 1fr;
    }

    .customer-overview-grid > .customer-card:first-child {
        grid-column: auto;
    }

    .customer-file-hero {
        padding: 22px;
        border-radius: 24px;
    }

    .customer-file-identity h2 {
        font-size: clamp(32px, 11vw, 44px);
    }

    .customer-file-tabs {
        top: 0;
        margin-inline: -4px;
    }

    .customer-action-row,
    .customer-section-head,
    .customer-facts,
    .customer-mini-metrics,
    .customer-stat-list,
    .customer-timeline a,
    .customer-onboarding-item {
        display: grid;
        grid-template-columns: 1fr;
    }

    .customer-action-row .button,
    .customer-more-actions summary {
        width: 100%;
        justify-content: center;
    }

    .customer-more-actions[open] a {
        width: 100%;
    }

    .customer-timeline small {
        text-align: left;
    }

    .customer-card {
        border-radius: 22px;
        padding: 20px;
    }
}

.prospect-file-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .52fr);
    gap: 22px;
    align-items: stretch;
}

.prospect-next-action {
    display: grid;
    align-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(13, 101, 203, .16);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(247, 251, 255, .96), rgba(234, 244, 255, .76));
    box-shadow: 0 14px 38px rgba(14, 48, 87, .07);
}

.prospect-next-action span,
.prospect-file-grid small,
.marketing-directory-grid li,
.onboarding-phase-documents > span {
    color: var(--text-muted);
}

.prospect-next-action strong {
    display: block;
    margin-top: 5px;
    font-size: 1.28rem;
    letter-spacing: -.025em;
    color: var(--text-main);
}

.prospect-next-action p {
    margin: 7px 0 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.prospect-hero-actions,
.prospect-introduction-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.prospect-file-grid,
.marketing-summary-grid,
.marketing-directory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.prospect-file-grid article,
.marketing-summary-grid article,
.marketing-directory-grid article {
    padding: 19px;
    border: 1px solid rgba(205, 219, 237, .72);
    border-radius: 20px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 10px 28px rgba(18, 49, 88, .045);
}

.prospect-file-grid h3,
.marketing-summary-grid h3,
.marketing-directory-grid h4 {
    margin: 6px 0 7px;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -.012em;
}

.prospect-file-grid p,
.marketing-directory-grid p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.prospect-introduction-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px dashed rgba(40, 110, 193, .28);
    border-radius: 20px;
    background: rgba(248, 252, 255, .62);
}

.prospect-timeline {
    display: grid;
    gap: 0;
}

.prospect-timeline article {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 18px;
    padding: 14px 0 14px 18px;
    border-bottom: 1px solid rgba(215, 225, 239, .65);
}

.prospect-timeline article::before {
    content: "";
    position: absolute;
    left: 0;
    top: 21px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(7, 95, 192, .09);
}

.prospect-timeline article:last-child { border-bottom: 0; }
.prospect-timeline p { grid-column: 1 / -1; margin: 0; color: var(--text-muted); line-height: 1.55; }
.prospect-timeline small { color: var(--text-muted); }

.marketing-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.marketing-summary-grid strong {
    display: block;
    color: var(--text-main);
    font-size: 1.55rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: -.035em;
}

.marketing-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-directory-grid article {
    display: grid;
    gap: 16px;
}

.marketing-directory-grid ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .9rem;
}

.marketing-directory-grid details,
.marketing-content-list details {
    border-top: 1px solid rgba(210, 222, 238, .72);
    padding-top: 12px;
}

.marketing-directory-grid summary,
.marketing-content-list summary {
    cursor: pointer;
    color: var(--accent);
    font-size: .93rem;
    font-weight: var(--font-weight-medium);
}

.directory-kit-grid {
    display: grid;
    grid-template-columns: minmax(230px, .8fr) minmax(0, 1.5fr);
    gap: 20px;
}

.directory-kit-grid dl {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 8px 14px;
    margin: 0;
}

.directory-kit-grid dt { color: var(--text-muted); }
.directory-kit-grid dd { margin: 0; overflow-wrap: anywhere; }

.marketing-content-list {
    display: grid;
    gap: 8px;
}

.marketing-content-list details {
    padding: 13px 4px 0;
}

.marketing-content-list details:first-child { border-top: 0; padding-top: 0; }
.marketing-content-list form { margin-top: 14px; }

.onboarding-map-phase {
    margin-top: 10px;
    border-radius: 17px;
    background: rgba(255, 255, 255, .58);
}

.onboarding-map-phase.is-current {
    border-color: rgba(10, 100, 205, .29);
    background: linear-gradient(135deg, rgba(247, 251, 255, .98), rgba(236, 246, 255, .72));
}

.onboarding-map-phase > summary small {
    color: var(--text-muted);
    font-size: .82rem;
}

.onboarding-phase-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    padding: 4px 0 10px;
}

.onboarding-phase-selector label {
    display: grid;
    gap: 6px;
    flex: 1 1 260px;
    color: var(--text-muted);
    font-size: .85rem;
}

.customer-onboarding-item {
    display: block;
    padding: 0;
    overflow: hidden;
}

.customer-onboarding-item > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 14px;
    cursor: pointer;
}

.customer-onboarding-item > summary small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
}

.customer-onboarding-item > form {
    margin: 0 14px 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(211, 222, 238, .72);
}

.onboarding-phase-documents {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(211, 222, 238, .72);
    font-size: .88rem;
}

.onboarding-phase-documents a {
    color: var(--accent);
    text-decoration: none;
}

@media (max-width: 1100px) {
    .prospect-file-hero,
    .directory-kit-grid { grid-template-columns: 1fr; }
    .prospect-file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .prospect-file-grid,
    .marketing-summary-grid,
    .marketing-directory-grid { grid-template-columns: 1fr; }
    .prospect-next-action { padding: 18px; }
    .prospect-hero-actions .button,
    .prospect-introduction-actions .button { width: 100%; justify-content: center; }
    .prospect-timeline article,
    .customer-onboarding-item > summary { grid-template-columns: 1fr; }
    .customer-user-list article { align-items: flex-start; flex-direction: column; }
    .customer-user-actions { justify-content: flex-start; width: 100%; }
    .customer-user-actions .button { flex: 1 1 180px; justify-content: center; }
    .directory-kit-grid dl { grid-template-columns: 1fr; gap: 2px; }
}

@media print {
    body { background: #fff; }
    .print-label-body { background: #fff; }
    .label-sheet { width: 100%; padding: 0; }
    .label-print-head { display: none; }
    .label-grid { grid-template-columns: repeat(3, 1fr); gap: 0; }
    .key-label {
        min-height: 38mm;
        border: 1px dashed #888;
        border-radius: 0;
        box-shadow: none;
        page-break-inside: avoid;
    }
    .protocol { border: 0; margin: 0; width: 100%; box-shadow: none; }
    .protocol button { display: none; }
}

/* Premium core workspace pass: the daily customer flow stays deliberately
   quiet.  This layer resolves older, more decorative iterations in favour of
   compact controls, fine separators and progressive detail. */
body.customer-shell {
    --today-width: 1240px;
    --today-gap: 24px;
    --today-radius: 14px;
    --today-shadow: 0 1px 2px rgba(8,25,54,.035);
    --premium-radius: 14px;
    --premium-radius-card: 12px;
    --shadow-soft: 0 1px 2px rgba(8,25,54,.035);
    --shadow-panel: 0 3px 12px rgba(8,25,54,.04);
    background: #f7f9fc;
    letter-spacing: 0;
}

.customer-shell .sidebar {
    width: 236px;
    flex-basis: 236px;
    padding: 18px 12px;
    background: #fff;
    box-shadow: none;
}

.customer-shell .brand {
    margin: 0 6px 18px;
    padding: 0 6px 14px;
}

.customer-shell nav { gap: 3px; }
.customer-shell nav a {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 13px;
}
.customer-shell nav a:hover { transform: none; box-shadow: none; }
.customer-shell .nav-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    border-radius: 7px;
}

.customer-shell .main {
    padding: 22px clamp(18px, 3vw, 42px) 42px;
    overflow-x: clip;
}
.customer-shell .topbar {
    min-height: 66px;
    margin: -22px clamp(-42px, -3vw, -18px) 22px;
    padding: 14px clamp(18px, 3vw, 42px);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
}
.customer-shell .topbar h1 {
    font-size: clamp(22px, 2.3vw, 30px);
    font-weight: 650;
    letter-spacing: -.035em;
}
.customer-shell .global-search-frame input,
.customer-shell .global-search-frame.large input {
    min-height: 38px;
    border-radius: 9px;
    box-shadow: none;
    font-size: 13px;
}

.customer-shell .section-tabs {
    margin: -8px auto 20px;
    padding: 4px;
    border-radius: 10px;
    box-shadow: none;
}
.customer-shell .section-tabs a {
    min-height: 32px;
    padding: 7px 11px;
    border-radius: 7px;
    font-size: 12px;
}
.customer-shell .section-tabs a.is-active { box-shadow: none; }

.customer-shell .button,
.customer-shell button,
.customer-shell .button.big,
.customer-shell .quick-issue-actions .button.big {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
    font-weight: 650;
}
.customer-shell .button:hover,
.customer-shell button:hover { box-shadow: none; transform: none; }

.customer-shell .panel,
.customer-shell .card,
.customer-shell .metric-card,
.customer-shell .scan-card,
.customer-shell .settings-tile,
.customer-shell .split-card,
.customer-shell .record-row,
.customer-shell .edit-panel {
    border-color: #dfe7f1;
    border-radius: 12px;
    box-shadow: none;
}
.customer-shell .panel {
    padding: 18px;
    margin-bottom: 14px;
}
.customer-shell .panel:hover,
.customer-shell .card:hover,
.customer-shell .split-card:hover,
.customer-shell .edit-panel:hover { box-shadow: none; }

.customer-shell .dashboard-hero,
.customer-shell .workflow-hero,
.customer-shell .key-detail-hero,
.customer-shell .calm-object-head,
.customer-shell .search-stage-box,
.customer-shell .setup-hero,
.customer-shell .setup-section,
.customer-shell .setup-import-callout {
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}
.customer-shell .dashboard-hero,
.customer-shell .workflow-hero,
.customer-shell .calm-object-head,
.customer-shell .setup-hero { padding: 22px; }
.customer-shell .dashboard-hero h2,
.customer-shell .workflow-hero h2,
.customer-shell .calm-page-head h2,
.customer-shell .calm-object-head h2,
.customer-shell .search-stage h2,
.customer-shell .setup-hero h2,
.customer-shell .setup-section-head h2,
.customer-shell .setup-import-callout h2 {
    font-size: clamp(24px, 2.8vw, 34px);
    font-weight: 650;
    letter-spacing: -.04em;
    line-height: 1.12;
}

.customer-shell .today-state {
    max-width: 760px;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 650;
    letter-spacing: -.04em;
    line-height: 1.13;
}
.customer-shell .today-main-column { gap: 26px; }
.customer-shell .today-task-list,
.customer-shell .today-activity-list { gap: 6px; }
.customer-shell .today-task a {
    min-height: 64px;
    padding: 12px 14px;
    gap: 12px;
    border-radius: 10px;
    box-shadow: none;
}
.customer-shell .today-task a:hover { transform: none; box-shadow: none; }
.customer-shell .today-task-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 14px;
}
.customer-shell .today-task-copy strong { font-size: 15px; font-weight: 650; }
.customer-shell .today-task-copy em { font-size: 13px; }
.customer-shell .today-quickstart {
    padding: 14px;
    border-radius: 12px;
    box-shadow: none;
}
.customer-shell .today-quick-actions { gap: 8px; }
.customer-shell .today-metrics a {
    min-height: 42px;
    padding: 8px 0;
    background: transparent;
    box-shadow: none;
}
.customer-shell .today-metrics strong { font-size: 20px; }

.customer-shell .calm-page-head,
.customer-shell .calm-object-head { margin-bottom: 22px; }
.customer-shell .calm-filterbar {
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 10px;
    box-shadow: none;
}
.customer-shell .calm-filterbar input,
.customer-shell .calm-filterbar select { min-height: 36px; border-radius: 8px; }
.customer-shell .calm-work-list { gap: 6px; margin-bottom: 22px; }
.customer-shell .calm-list-row {
    border-radius: 10px;
    box-shadow: none;
}
.customer-shell .calm-list-row:hover,
.customer-shell .calm-list-row:focus-within { transform: none; box-shadow: none; }
.customer-shell .calm-row-link {
    min-height: 58px;
    padding: 10px 12px;
    gap: 12px;
}
.customer-shell .calm-row-main strong { font-size: 14px; font-weight: 650; }
.customer-shell .calm-row-meta strong { font-size: 12.5px; }
.customer-shell .calm-row-action { font-size: 12px; }
.customer-shell .calm-row-menu > summary,
.customer-shell .calm-more-menu > summary { min-height: 32px; padding: 6px 10px; border-radius: 7px; font-size: 12px; }
.customer-shell .calm-overview-grid { gap: 8px; margin-bottom: 18px; }
.customer-shell .calm-overview-grid div { min-height: 0; padding: 12px; border-radius: 10px; }
.customer-shell .calm-overview-grid strong { font-size: 15px; }
.customer-shell .calm-summary,
.customer-shell .calm-empty,
.customer-shell .calm-drawer { padding: 14px; border-radius: 10px; box-shadow: none; }
.customer-shell .calm-drawer > summary { padding: 14px; font-size: 15px; }
.customer-shell .calm-drawer-body { padding: 0 14px 14px; }

.customer-shell .setup-metrics article,
.customer-shell .setup-next-card,
.customer-shell .setup-step-panel,
.customer-shell .setup-readonly-card,
.customer-shell .setup-result-row,
.customer-shell .setup-tree-site,
.customer-shell .setup-room-list div {
    border-radius: 10px;
    box-shadow: none;
}
.customer-shell .setup-metrics article,
.customer-shell .setup-next-card,
.customer-shell .setup-step-panel { padding: 14px; }
.customer-shell .setup-next-card { min-height: 0; }

@media (max-width: 760px) {
    .customer-shell .main { padding: 16px 12px 28px; }
    .customer-shell .topbar { margin: -16px -12px 16px; padding: 12px; }
    .customer-shell .today-task a,
    .customer-shell .calm-row-link { padding: 12px; }
    .customer-shell .today-quick-actions .button,
    .customer-shell .today-more-actions > summary,
    .customer-shell .calm-actionbar .button,
    .customer-shell .calm-actionbar button { min-height: 38px; }
}

/* Keyora visual reference pass: the welcome mail is a mood reference, not a
   layout template. Keep its quiet hierarchy, hairline separators and reserved
   blue accent while the product itself stays a light, interactive workspace. */
body.customer-shell {
    --keyora-ink: #152642;
    --keyora-muted: #66778d;
    --keyora-line: #d9e2ec;
    --keyora-surface: #ffffff;
    --keyora-canvas: #f5f7fa;
    --keyora-blue: #116fd7;
    --keyora-blue-soft: #edf5ff;
    background: var(--keyora-canvas);
    color: var(--keyora-ink);
}

.customer-shell .topbar,
.customer-shell .sidebar {
    border-color: var(--keyora-line);
}

.customer-shell .topbar h1,
.customer-shell .today-state,
.customer-shell .today-section-head h2,
.customer-shell .calm-page-head h2,
.customer-shell .calm-object-head h2,
.customer-shell .search-stage h2,
.customer-shell .dashboard-hero h2,
.customer-shell .workflow-hero h2 {
    color: var(--keyora-ink);
}

.customer-shell .today-greeting,
.customer-shell .today-task-copy em,
.customer-shell .today-activity-list small,
.customer-shell .calm-page-head p:not(.eyebrow),
.customer-shell .calm-object-head p:not(.eyebrow),
.customer-shell .search-stage-copy,
.customer-shell .key-timeline time,
.customer-shell .key-timeline p {
    color: var(--keyora-muted);
}

.customer-shell .eyebrow,
.customer-shell .today-section-head span,
.customer-shell .calm-row-meta small,
.customer-shell thead th {
    color: #4c6f98;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
}

.customer-shell .dashboard-hero,
.customer-shell .workflow-hero,
.customer-shell .key-detail-hero,
.customer-shell .calm-object-head,
.customer-shell .search-stage-box,
.customer-shell .today-quickstart {
    border-color: var(--keyora-line);
    background: var(--keyora-surface);
}

.customer-shell .dashboard-hero,
.customer-shell .workflow-hero,
.customer-shell .key-detail-hero,
.customer-shell .calm-object-head {
    border-inline-start: 2px solid var(--keyora-blue);
}

.customer-shell .today-status,
.customer-shell .today-panel,
.customer-shell .calm-work-list,
.customer-shell .calm-timeline-section {
    border-top: 1px solid var(--keyora-line);
}

.customer-shell .today-status {
    padding-top: 20px;
}

.customer-shell .today-panel,
.customer-shell .calm-timeline-section {
    padding-top: 18px;
}

.customer-shell .today-task a,
.customer-shell .calm-list-row,
.customer-shell .calm-empty,
.customer-shell .calm-drawer,
.customer-shell .panel,
.customer-shell .edit-panel,
.customer-shell .record-row {
    border-color: var(--keyora-line);
    background: var(--keyora-surface);
}

.customer-shell .today-task a:hover,
.customer-shell .today-task a:focus-visible,
.customer-shell .calm-list-row:focus-within,
.customer-shell .calm-list-row:hover {
    border-color: #9fc5f0;
    background: #fbfdff;
}

.customer-shell .today-task-icon,
.customer-shell .today-activity-dot {
    color: var(--keyora-blue);
    background-color: var(--keyora-blue-soft);
    box-shadow: none;
}

.customer-shell .today-task-action,
.customer-shell .today-link,
.customer-shell .calm-row-action,
.customer-shell .text-link {
    color: var(--keyora-blue);
    font-weight: 650;
}

.customer-shell .text-link {
    text-decoration-color: rgba(17, 111, 215, .35);
    text-underline-offset: 3px;
}

.customer-shell .button,
.customer-shell button,
.customer-shell .section-tabs a,
.customer-shell .global-search-frame input,
.customer-shell input,
.customer-shell select,
.customer-shell textarea {
    border-color: var(--keyora-line);
}

.customer-shell .button:not(.ghost):not(.danger),
.customer-shell button:not(.ghost):not(.danger),
.customer-shell .button.big {
    background: var(--keyora-blue);
    border-color: var(--keyora-blue);
    color: #fff;
}

.customer-shell .button.ghost,
.customer-shell button.ghost,
.customer-shell .secondary {
    background: #fff;
    color: #29496d;
}

.customer-shell .global-search-frame input:focus,
.customer-shell input:focus,
.customer-shell select:focus,
.customer-shell textarea:focus,
.customer-shell a:focus-visible,
.customer-shell button:focus-visible {
    outline: 2px solid rgba(17,111,215,.35);
    outline-offset: 2px;
    box-shadow: none;
}

.customer-shell .key-timeline,
.customer-shell .calm-timeline,
.customer-shell .today-activity-list {
    border-inline-start: 1px solid var(--keyora-line);
    padding-inline-start: 16px;
}

.customer-shell .key-timeline li,
.customer-shell .calm-timeline li,
.customer-shell .today-activity-list li {
    border-bottom-color: var(--keyora-line);
}

.customer-shell .key-timeline li::before,
.customer-shell .today-activity-dot {
    background: var(--keyora-blue);
}

.customer-shell .table-wrap,
.customer-shell table {
    border-color: var(--keyora-line);
    box-shadow: none;
}

.customer-shell table td,
.customer-shell table th {
    border-bottom-color: var(--keyora-line);
}

@media (max-width: 760px) {
    .customer-shell .today-status { padding-top: 16px; }
    .customer-shell .today-task a,
    .customer-shell .calm-row-link { min-height: 60px; }
    .customer-shell .key-timeline,
    .customer-shell .calm-timeline,
    .customer-shell .today-activity-list { padding-inline-start: 12px; }
}

/* Key creation is an intentional working form, not a collapsed drawer.
   Its sections align field baselines even when a context has only two inputs. */
.customer-shell .key-create-panel {
    width: min(100%, var(--today-width, 1180px));
    margin: 0 auto 24px;
    padding: 0;
    overflow: hidden;
}

.customer-shell .key-create-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px 22px;
    border-bottom: 1px solid var(--keyora-line);
}

.customer-shell .key-create-head h2,
.customer-shell .key-create-section-head h3 {
    margin: 0;
    color: var(--today-ink);
}

.customer-shell .key-create-head h2 {
    font-size: clamp(23px, 2.1vw, 29px);
    line-height: 1.12;
}

.customer-shell .key-create-head p:not(.eyebrow),
.customer-shell .key-create-section-head p {
    margin: 7px 0 0;
    color: var(--today-muted);
    line-height: 1.5;
}

.customer-shell .key-create-head > .button {
    flex: 0 0 auto;
}

.customer-shell .key-create-body {
    padding: 24px 28px 28px;
}

.customer-shell .key-create-form {
    display: grid;
    width: min(100%, 1120px);
    gap: 26px;
}

.customer-shell .key-create-section {
    display: grid;
    gap: 17px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--keyora-line);
}

.customer-shell .key-create-section-head {
    display: grid;
    gap: 3px;
}

.customer-shell .key-create-section-head h3 {
    font-size: 16px;
    font-weight: 680;
    letter-spacing: -.01em;
}

.customer-shell .key-create-section-head p {
    font-size: 14px;
}

.customer-shell .key-create-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 22px;
    align-items: start;
}

.customer-shell .key-create-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 790px);
}

.customer-shell .key-create-grid > label {
    display: grid;
    min-width: 0;
    grid-template-rows: minmax(22px, auto) 48px minmax(0, auto);
    align-content: start;
    gap: 6px;
    color: var(--today-ink);
    font-weight: 620;
}

.customer-shell .key-create-grid > label > input,
.customer-shell .key-create-grid > label > select,
.customer-shell .key-create-grid > label > textarea {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.customer-shell .key-create-grid > label > small {
    display: block;
    color: var(--today-muted);
    font-size: 12.5px;
    font-weight: 450;
    line-height: 1.4;
}

.customer-shell .key-create-grid > label.inline {
    display: inline-flex;
    min-height: 48px;
    grid-template-rows: none;
    align-items: center;
    gap: 9px;
    padding-top: 22px;
    font-weight: 560;
}

.customer-shell .key-create-grid > label.inline > input {
    width: auto;
}

.customer-shell .key-create-span-2 {
    grid-column: span 2;
}

/* Textareas must reserve their full working height.  The surrounding
   optional-details panel deliberately clips its rounded border, so letting a
   textarea overflow a fixed 48px control row visibly cut off its lower edge. */
.customer-shell .key-create-grid > label.key-create-textarea {
    grid-column: 1 / -1;
    grid-template-rows: minmax(22px, auto) minmax(92px, auto) minmax(0, auto);
}

.customer-shell .key-create-grid > label.key-create-textarea > textarea {
    min-height: 92px;
}

.customer-shell .key-create-optional {
    overflow: hidden;
    border: 1px solid var(--keyora-line);
    border-radius: 14px;
    background: rgba(248, 251, 255, .72);
}

.customer-shell .key-create-optional > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 72px;
    padding: 15px 18px;
    color: #36516f;
    font-weight: 640;
    list-style: none;
    cursor: pointer;
    transition: background-color .16s ease;
}

.customer-shell .key-create-optional > summary::-webkit-details-marker {
    display: none;
}

.customer-shell .key-create-optional > summary:hover,
.customer-shell .key-create-optional > summary:focus-visible {
    background: var(--keyora-blue-soft);
}

.customer-shell .key-create-optional-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.customer-shell .key-create-optional-copy strong {
    color: var(--today-ink);
    font-size: 15px;
}

.customer-shell .key-create-optional-copy small {
    color: var(--today-muted);
    font-size: 13px;
    font-weight: 450;
    line-height: 1.35;
}

.customer-shell .key-create-disclosure {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--keyora-blue);
    font-size: 13px;
    font-weight: 670;
    white-space: nowrap;
}

.customer-shell .key-create-disclosure-icon {
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 15px;
    line-height: 1;
    transition: transform .16s ease;
}

.customer-shell .key-create-optional[open] > summary {
    border-bottom: 1px solid var(--keyora-line);
}

.customer-shell .key-create-optional[open] .key-create-disclosure-icon {
    transform: rotate(180deg);
}

.customer-shell .key-create-optional > .key-create-grid {
    padding: 18px;
}

.customer-shell .key-create-optional textarea {
    min-height: 92px;
}

.customer-shell .key-create-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 0;
}

.customer-shell .key-create-actions .button {
    min-width: 205px;
}

/* Key search keeps the working list in place while the next result set is
   loaded.  The visual change is deliberately quiet: no full-page jump and no
   disappearing table while a person is still typing. */
.customer-shell [data-key-live-filter] form {
    position: relative;
}

.customer-shell .key-live-search-status {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
}

.customer-shell #key-list-results {
    min-height: 74px;
    transition: opacity 140ms ease;
}

.customer-shell #key-list-results.is-refreshing {
    opacity: .55;
    pointer-events: none;
}

/* The search field is a working control: refresh only its result region, never
   the field itself.  The quiet opacity transition makes live updates visible
   without moving focus or the reading position. */
.customer-shell #global-search-results {
    min-height: 74px;
    transition: opacity 140ms ease;
}

.customer-shell #global-search-results.is-refreshing {
    opacity: .55;
    pointer-events: none;
}

@media (max-width: 760px) {
    .customer-shell .key-create-head {
        align-items: stretch;
        flex-direction: column;
        padding: 20px 18px 18px;
    }

    .customer-shell .key-create-head > .button {
        align-self: flex-start;
    }

    .customer-shell .key-create-body {
        padding: 20px 18px 22px;
    }

    .customer-shell .key-create-form {
        gap: 22px;
    }

    .customer-shell .key-create-grid,
    .customer-shell .key-create-context-grid {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 14px;
    }

    .customer-shell .key-create-span-2 {
        grid-column: auto;
    }

    .customer-shell .key-create-optional > summary {
        gap: 12px;
        min-height: 68px;
        padding: 14px 15px;
    }

    .customer-shell .key-create-disclosure > span:first-child {
        display: none;
    }

    .customer-shell .key-create-actions {
        justify-content: stretch;
    }

    .customer-shell .key-create-actions .button {
        width: 100%;
    }

    .customer-shell .key-live-search-status {
        display: none;
    }
}

/* Setup forms are working surfaces, not a loose collection of inputs.  The
   generic form rule aligns controls at their lower edge; that is useful in
   compact dialogs but makes independently sized setup forms look staggered.
   Keep the guided setup on one explicit top-aligned two-column rhythm. */
.customer-shell .setup-step-panel > form.form-grid,
.customer-shell .setup-two-column > form.form-grid,
.customer-shell .setup-disabled-form > fieldset.form-grid,
.customer-shell .setup-more-fields > .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    align-items: start;
    gap: 18px;
}

.customer-shell .setup-step-panel > form.form-grid > label,
.customer-shell .setup-two-column > form.form-grid > label,
.customer-shell .setup-disabled-form > fieldset.form-grid > label,
.customer-shell .setup-more-fields > .form-grid > label {
    display: grid;
    min-width: 0;
    align-content: start;
    grid-template-rows: auto minmax(48px, auto);
    gap: 7px;
    margin: 0;
}

.customer-shell .setup-step-panel > form.form-grid > label.wide,
.customer-shell .setup-two-column > form.form-grid > label.wide,
.customer-shell .setup-disabled-form > fieldset.form-grid > label.wide,
.customer-shell .setup-more-fields > .form-grid > label.wide {
    grid-column: 1 / -1;
}

.customer-shell .setup-step-panel > form.form-grid textarea,
.customer-shell .setup-two-column > form.form-grid textarea,
.customer-shell .setup-disabled-form > fieldset.form-grid textarea,
.customer-shell .setup-more-fields > .form-grid textarea {
    min-height: 92px;
    resize: vertical;
}

.customer-shell .setup-step-panel > form.form-grid > button,
.customer-shell .setup-two-column > form.form-grid > button,
.customer-shell .setup-disabled-form > fieldset.form-grid > button {
    grid-column: 1 / -1;
    justify-self: start;
    align-self: start;
    margin: 2px 0 0;
}

.customer-shell .setup-more-fields {
    grid-column: 1 / -1;
}

.customer-shell .setup-more-fields[open] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.customer-shell .setup-more-fields[open] > summary {
    grid-column: 1 / -1;
}

.customer-shell .setup-assistant-grid {
    align-items: stretch;
}

.customer-shell .setup-step-panel:not(.wide-panel) {
    display: flex;
    flex-direction: column;
}

.customer-shell .setup-score-card > a {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 4px;
    color: var(--keyora-blue);
    font-size: 13px;
    font-weight: 640;
}

@media (max-width: 760px) {
    .customer-shell .setup-step-panel > form.form-grid,
    .customer-shell .setup-two-column > form.form-grid,
    .customer-shell .setup-disabled-form > fieldset.form-grid,
    .customer-shell .setup-more-fields > .form-grid,
    .customer-shell .setup-more-fields[open] {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .customer-shell .setup-step-panel > form.form-grid > label.wide,
    .customer-shell .setup-two-column > form.form-grid > label.wide,
    .customer-shell .setup-disabled-form > fieldset.form-grid > label.wide,
    .customer-shell .setup-more-fields > .form-grid > label.wide,
    .customer-shell .setup-more-fields[open] > summary,
    .customer-shell .setup-more-fields {
        grid-column: auto;
    }

    .customer-shell .setup-step-panel > form.form-grid > button,
    .customer-shell .setup-two-column > form.form-grid > button,
    .customer-shell .setup-disabled-form > fieldset.form-grid > button {
        width: 100%;
    }
}
