:root,
html[data-theme="dark"] {
    color-scheme: dark;
    --page: #0f1211;
    --surface: #171c1a;
    --surface-2: #202722;
    --surface-3: #263029;
    --field: #101513;
    --field-line: #394740;
    --ink: #f2f7f4;
    --muted: #9db0a8;
    --line: rgba(211, 224, 217, 0.16);
    --soft: var(--surface-2);
    --white: var(--surface);
    --ready: #59d7a7;
    --ready-strong: #37b987;
    --ready-soft: rgba(89, 215, 167, 0.14);
    --waiting: #f3c76b;
    --waiting-soft: rgba(243, 199, 107, 0.15);
    --error: #ff766f;
    --error-soft: rgba(255, 118, 111, 0.16);
    --danger: #b9413a;
    --button: #37b987;
    --button-hover: #2f9b74;
    --button-text: #07110d;
    --secondary-button: #28332d;
    --secondary-button-hover: #34443c;
    --nav-bg: rgba(15, 18, 17, 0.93);
    --nav-text: #dbe8e2;
    --table-head: #202821;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.24);
    --focus: #f3c76b;
}

html[data-theme="light"] {
    color-scheme: light;
    --page: #edf3f1;
    --surface: #ffffff;
    --surface-2: #f5f8f7;
    --surface-3: #e9f0ed;
    --field: #ffffff;
    --field-line: #c8d5cf;
    --ink: #14201b;
    --muted: #5f6f67;
    --line: #d7e1dd;
    --soft: var(--surface-2);
    --white: var(--surface);
    --ready: #0f766e;
    --ready-strong: #0b5f59;
    --ready-soft: rgba(15, 118, 110, 0.1);
    --waiting: #ad6b12;
    --waiting-soft: rgba(173, 107, 18, 0.12);
    --error: #b42318;
    --error-soft: rgba(180, 35, 24, 0.1);
    --danger: #b42318;
    --button: #0f766e;
    --button-hover: #0b5f59;
    --button-text: #ffffff;
    --secondary-button: #26364f;
    --secondary-button-hover: #1e2b40;
    --nav-bg: rgba(237, 243, 241, 0.94);
    --nav-text: #26364f;
    --table-head: #f0f5f3;
    --shadow: 0 16px 40px rgba(21, 34, 56, 0.08);
    --shadow-soft: 0 10px 24px rgba(21, 34, 56, 0.07);
    --focus: #0f766e;
}

html[data-theme="pine"] {
    color-scheme: dark;
    --page: #10140e;
    --surface: #192017;
    --surface-2: #222c1e;
    --surface-3: #2a3525;
    --field: #11170f;
    --field-line: #46563c;
    --ink: #f4f7ed;
    --muted: #b1bea4;
    --line: rgba(225, 232, 211, 0.18);
    --soft: var(--surface-2);
    --white: var(--surface);
    --ready: #9fdd75;
    --ready-strong: #73b957;
    --ready-soft: rgba(159, 221, 117, 0.14);
    --waiting: #ebc45f;
    --waiting-soft: rgba(235, 196, 95, 0.15);
    --error: #ff897a;
    --error-soft: rgba(255, 137, 122, 0.16);
    --danger: #b45445;
    --button: #9fdd75;
    --button-hover: #82c45d;
    --button-text: #0c1309;
    --secondary-button: #324027;
    --secondary-button-hover: #3e5131;
    --nav-bg: rgba(16, 20, 14, 0.93);
    --nav-text: #e8f0dc;
    --table-head: #263321;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.25);
    --focus: #ebc45f;
}

html[data-theme="bacon"] {
    color-scheme: dark;
    --page: #050100;
    --surface: #160807;
    --surface-2: #24100c;
    --surface-3: #35170f;
    --field: #0b0302;
    --field-line: #7f2a13;
    --ink: #fff4cc;
    --muted: #d99871;
    --line: rgba(255, 113, 28, 0.24);
    --soft: var(--surface-2);
    --white: var(--surface);
    --ready: #ff8a00;
    --ready-strong: #ff5a00;
    --ready-soft: rgba(255, 91, 0, 0.18);
    --waiting: #ffd24a;
    --waiting-soft: rgba(255, 210, 74, 0.18);
    --error: #ff4e2f;
    --error-soft: rgba(255, 78, 47, 0.18);
    --danger: #b92f1a;
    --button: #ff8a00;
    --button-hover: #ff5a00;
    --button-text: #150400;
    --secondary-button: #4a160d;
    --secondary-button-hover: #6a210f;
    --nav-bg: rgba(5, 1, 0, 0.95);
    --nav-text: #ffe1a3;
    --table-head: #1f0b08;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.62);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.4);
    --focus: #ffd24a;
}

html[data-theme="contrast"] {
    color-scheme: dark;
    --page: #050505;
    --surface: #111111;
    --surface-2: #1d1d1d;
    --surface-3: #282828;
    --field: #060606;
    --field-line: #6a6a6a;
    --ink: #ffffff;
    --muted: #d3d3d3;
    --line: #4a4a4a;
    --soft: var(--surface-2);
    --white: var(--surface);
    --ready: #7dff9a;
    --ready-strong: #49e872;
    --ready-soft: rgba(125, 255, 154, 0.16);
    --waiting: #ffe27a;
    --waiting-soft: rgba(255, 226, 122, 0.17);
    --error: #ff7f7f;
    --error-soft: rgba(255, 127, 127, 0.17);
    --danger: #d33;
    --button: #7dff9a;
    --button-hover: #49e872;
    --button-text: #000000;
    --secondary-button: #2a2a2a;
    --secondary-button-hover: #3a3a3a;
    --nav-bg: rgba(5, 5, 5, 0.96);
    --nav-text: #ffffff;
    --table-head: #202020;
    --shadow: none;
    --shadow-soft: none;
    --focus: #ffe27a;
}

* {
    box-sizing: border-box;
}

main,
section,
article,
form,
label {
    min-width: 0;
}

html {
    background: var(--page);
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
    width: min(1240px, calc(100vw - 28px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.flash-stack {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    left: 50%;
    z-index: 80;
    display: grid;
    gap: 10px;
    width: min(720px, calc(100vw - 24px));
    margin: 0;
    pointer-events: none;
    transform: translateX(-50%);
}

.flash {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-weight: 750;
    box-shadow: var(--shadow-soft);
    pointer-events: auto;
}

.flash-stack .flash {
    animation: flash-toast-lifetime 20s ease forwards;
}

@keyframes flash-toast-lifetime {
    0%,
    88% {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    100% {
        opacity: 0;
        transform: translateY(-6px);
        visibility: hidden;
    }
}

.flash.is-ok {
    border-color: var(--ready);
    color: var(--ready);
}

.flash.is-error {
    border-color: var(--error);
    color: var(--error);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, auto);
    gap: 24px;
    align-items: start;
    padding-bottom: 22px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.hero-actions {
    display: grid;
    gap: 10px;
    min-width: 220px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--ready);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 10px;
    font-size: 3.1rem;
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    letter-spacing: 0;
}

.lead {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.5;
}

.scorecard,
.panel,
.module,
.login-card,
.kpis article,
.kpi-link {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 36px;
    align-items: center;
    min-height: calc(100vh - 88px);
}

.login-copy {
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: center;
    gap: 18px;
    max-width: 650px;
    min-height: 430px;
    overflow: hidden;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-2) 78%, transparent)),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.login-copy::before {
    content: "";
    position: absolute;
    inset: -24% -18% -24% 27%;
    z-index: -2;
    background: url("/assets/baycon-logo-2026.jpg") 76% 49% / min(72vw, 610px) auto no-repeat;
    opacity: 0.24;
    filter: saturate(1.08) contrast(1.08);
}

.login-copy::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--ready) 18%, transparent), transparent 34%),
        linear-gradient(90deg, color-mix(in srgb, var(--surface) 96%, transparent) 0%, color-mix(in srgb, var(--surface) 82%, transparent) 48%, color-mix(in srgb, var(--surface) 42%, transparent) 100%);
}

html[data-theme="light"] .login-copy::before {
    opacity: 0.14;
}

html[data-theme="bacon"] .login-copy::before {
    opacity: 0.3;
}

.login-copy .eyebrow,
.login-copy h1,
.login-copy .lead,
.login-access-list {
    position: relative;
}

.login-access-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 560px;
}

.login-access-list span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-2) 76%, transparent);
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 850;
}

.privacy-inline-note {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.privacy-inline-note a,
.trust-footer a,
.privacy-card a {
    color: var(--ready);
    font-weight: 800;
    text-decoration: none;
}

.privacy-inline-note a:hover,
.trust-footer a:hover,
.privacy-card a:hover {
    text-decoration: underline;
}

.trust-footer {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    color: var(--muted);
    box-shadow: var(--shadow-soft);
}

.trust-footer p {
    max-width: 820px;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.trust-footer strong {
    color: var(--ink);
}

.trust-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    min-width: max-content;
}

.privacy-shell {
    max-width: 1100px;
}

.privacy-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    gap: 22px;
    align-items: start;
    margin-bottom: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.privacy-actions {
    display: grid;
    gap: 10px;
    min-width: 190px;
}

.privacy-callout,
.privacy-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.privacy-callout {
    margin-bottom: 16px;
    padding: 16px 18px;
    color: var(--muted);
    line-height: 1.55;
}

.privacy-callout strong {
    color: var(--ready);
}

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

.privacy-card {
    padding: 18px;
}

.privacy-wide-card {
    margin-bottom: 14px;
}

.privacy-card h2 {
    margin-bottom: 10px;
    font-size: 1.14rem;
}

.privacy-card p,
.policy-list {
    color: var(--muted);
    line-height: 1.55;
}

.privacy-card p + p {
    margin-top: 10px;
}

.policy-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}

.privacy-table {
    min-width: 760px;
}

.privacy-table code {
    color: var(--ready);
    font-weight: 850;
}

.login-card {
    display: grid;
    gap: 12px;
    padding: 24px;
}

.login-card h2 {
    margin-bottom: 6px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--field-line);
    border-radius: 6px;
    background: var(--field);
    color: var(--ink);
    font: inherit;
    padding: 9px 10px;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a.button-link:focus-visible,
summary:focus-visible {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px var(--waiting-soft);
}

textarea {
    resize: vertical;
}

button {
    max-width: 100%;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--button);
    color: var(--button-text);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    padding: 10px 14px;
}

button:hover {
    background: var(--button-hover);
}

button.danger-button {
    background: var(--danger);
    color: #ffffff;
}

button.danger-button:hover {
    filter: brightness(1.08);
}

a.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--secondary-button);
    color: var(--ink);
    font-weight: 850;
    padding: 10px 14px;
    text-decoration: none;
}

a.button-link:hover {
    background: var(--secondary-button-hover);
}

button:disabled {
    background: var(--surface-3);
    color: var(--muted);
    cursor: not-allowed;
}

.logout-form {
    align-self: start;
}

.logout-form button {
    width: 100%;
    background: var(--secondary-button);
    color: var(--ink);
}

.logout-form button:hover {
    background: var(--secondary-button-hover);
}

.theme-picker {
    font-size: 0.88rem;
}

.theme-picker select {
    min-height: 38px;
    font-weight: 750;
}

.login-mode-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.login-mode-toggle button {
    min-height: 38px;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.login-mode-toggle button.is-active {
    background: var(--button);
    color: var(--button-text);
}

.login-mode-panel {
    display: grid;
    gap: 12px;
}

.login-mode-panel[hidden] {
    display: none;
}

.password-management {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.password-management summary {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--secondary-button);
    color: var(--ink);
    cursor: pointer;
    font-weight: 850;
    list-style: none;
}

.password-management summary::-webkit-details-marker {
    display: none;
}

.password-management[open] summary {
    border-color: var(--ready);
}

.password-management-body {
    display: grid;
    gap: 12px;
    padding-top: 12px;
}

.compact-form {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.compact-form h3 {
    margin-bottom: 0;
    font-size: 0.96rem;
}

.account-subform {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 16px;
}

.small-note {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.scorecard {
    min-width: 176px;
    padding: 18px;
    text-align: right;
}

.score {
    display: block;
    color: var(--ready);
    font-size: 2rem;
    font-weight: 850;
}

.score-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.panel {
    min-width: 0;
    padding: 22px;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: baseline;
    margin-bottom: 18px;
}

.panel h2,
.panel-heading h2,
.module h2 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.panel-heading p,
.module p {
    color: var(--muted);
    line-height: 1.5;
}

.checks {
    display: grid;
    gap: 10px;
}

.check {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--muted);
    border-radius: 8px;
    background: var(--surface-2);
}

.check h3 {
    margin-bottom: 4px;
    font-size: 1rem;
}

.check p {
    margin-bottom: 0;
    color: var(--muted);
}

.check span {
    color: var(--muted);
    font-weight: 800;
}

.check.is-ready {
    border-left-color: var(--ready);
}

.check.is-ready span {
    color: var(--ready);
}

.check.is-waiting {
    border-left-color: var(--waiting);
}

.check.is-waiting span {
    color: var(--waiting);
}

.check.is-error {
    border-left-color: var(--error);
}

.check.is-error span {
    color: var(--error);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.kpis article,
.kpi-link {
    min-width: 0;
    padding: 16px;
}

.kpi-link {
    display: block;
    width: 100%;
    min-height: 0;
    color: var(--ink);
    text-align: left;
}

.kpi-link:hover,
.kpi-link.is-active {
    border-color: var(--ready);
    background: var(--surface-2);
    color: var(--ink);
}

.kpis article.needs-attention,
.kpi-link.needs-attention {
    border-color: var(--waiting);
    background: var(--waiting-soft);
}

.kpis span {
    display: block;
    color: var(--ready);
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
}

.kpis p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 750;
}

.section-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(98px, 1fr));
    gap: 8px;
    padding: 8px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
}

.section-tab {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--nav-text);
    box-shadow: var(--shadow-soft);
}

.section-tab:hover,
.section-tab.is-active {
    border-color: var(--ready);
    background: var(--button);
    color: var(--button-text);
}

.nav-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--ready-soft);
    color: inherit;
    font-weight: 900;
}

.section-tab.is-active .nav-icon,
.section-tab:hover .nav-icon {
    background: rgba(255, 255, 255, 0.18);
}

.bms-section {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.bms-section[hidden] {
    display: none;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
}

.section-heading h2 {
    margin-bottom: 4px;
    font-size: 1.35rem;
}

.section-heading p {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.45;
}

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    min-width: 0;
}

.workspace-grid > *,
.data-grid > *,
.bms-section > * {
    min-width: 0;
}

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

.stacked-form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-row:has(label:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.inline-check input {
    width: auto;
    min-height: auto;
}

.inline-create {
    padding: 12px;
    border: 1px dashed var(--field-line);
    border-radius: 8px;
    background: var(--surface-2);
}

.inline-create summary {
    cursor: pointer;
    font-weight: 850;
}

.inline-create[open] {
    display: grid;
    gap: 12px;
}

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

.record-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.record-card summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    cursor: pointer;
    padding: 16px;
    font-weight: 850;
}

.record-card summary small {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.record-card > form {
    padding: 0 16px 16px;
}

.job-command-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
    padding: 0 16px 16px;
}

.job-command-form {
    display: block;
    min-width: 0;
    margin: 0;
}

.job-command-card {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
    min-height: 92px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    background: color-mix(in srgb, var(--surface-2) 92%, transparent);
}

button.job-command-card {
    width: 100%;
    height: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.job-command-card:hover {
    border-color: var(--button);
    background: color-mix(in srgb, var(--button) 10%, var(--surface-2));
}

.job-command-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.job-command-card strong {
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.job-command-card small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.3;
}

.job-command-card.needs-attention {
    border-color: var(--waiting);
    background: var(--waiting-soft);
}

.job-command-card.is-waiting {
    border-color: color-mix(in srgb, var(--waiting) 70%, var(--line));
}

.job-command-card.is-danger {
    border-color: color-mix(in srgb, var(--error) 78%, var(--line));
}

.job-command-card.is-complete {
    border-color: color-mix(in srgb, var(--ready) 78%, var(--line));
    background: var(--ready-soft);
}

.customer-card-body {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}

.customer-quick-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.customer-quick-summary span {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 10px;
}

.customer-quick-summary strong,
.customer-quick-summary small {
    display: block;
    overflow-wrap: anywhere;
}

.customer-quick-summary small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.compact-details {
    padding: 10px 12px;
}

.compact-details summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.portal-status-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.portal-status-list span {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field);
}

.portal-status-list strong,
.portal-status-list small {
    display: block;
    overflow-wrap: anywhere;
}

.portal-status-list strong {
    color: var(--ink);
    font-size: 0.86rem;
    line-height: 1.25;
}

.portal-status-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}

.job-edit-details {
    margin: 0 16px 12px;
}

.clock-bridge-card .panel-heading {
    align-items: start;
    margin-bottom: 14px;
}

.clock-bridge-card .panel-heading .button-link {
    flex: 0 0 auto;
}

.time-collapsible-card {
    display: block;
}

.time-collapsible-card > summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    min-height: 46px;
    cursor: pointer;
    list-style: none;
    font-weight: 850;
}

.time-collapsible-card > summary::-webkit-details-marker {
    display: none;
}

.time-collapsible-card > summary::after {
    content: "Open";
    flex: 0 0 auto;
    color: var(--ready);
    font-size: 0.82rem;
    font-weight: 850;
}

.time-collapsible-card[open] > summary {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.time-collapsible-card[open] > summary::after {
    content: "Close";
}

.time-collapsible-card > summary span {
    min-width: 0;
    color: var(--ink);
}

.time-collapsible-card > summary small {
    min-width: 0;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
    overflow-wrap: anywhere;
    text-align: right;
}

.legacy-import-panel {
    display: grid;
    gap: 14px;
}

.legacy-import-panel > summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    list-style: none;
    font-weight: 850;
}

.legacy-import-panel > summary::-webkit-details-marker {
    display: none;
}

.legacy-import-panel > summary small {
    color: var(--muted);
    font-weight: 750;
    text-align: right;
}

.payment-link-inline {
    border-top: 1px solid var(--line);
    margin-top: 2px;
    padding-top: 16px;
}

.payment-receipt-space {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 14px;
}

.payment-receipt-space h4 {
    margin: 0;
    color: var(--ready);
    font-size: 0.98rem;
}

.down-payment-received-box {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px dashed var(--ready);
    border-radius: 8px;
    background: var(--ready-soft);
}

.job-documents {
    border-color: var(--ready);
}

.document-send-form {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.document-checkbox-list {
    display: grid;
    gap: 8px;
}

.document-checkbox-list .inline-check {
    align-items: flex-start;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 9px 10px;
}

.document-checkbox-list small {
    color: var(--muted);
    font-weight: 800;
}

.document-single-send {
    border-top: 1px dashed var(--line);
    padding-top: 10px;
}

.customer-portal-shell {
    max-width: 1040px;
}

.customer-portal-hero {
    align-items: center;
}

.customer-portal-kpis article span {
    font-size: clamp(1rem, 2vw, 1.65rem);
    overflow-wrap: anywhere;
}

.customer-message-panel {
    margin-bottom: 16px;
}

.admin-preview-banner {
    margin-bottom: 16px;
}

.customer-job-body {
    display: grid;
    gap: 14px;
    padding: 0 16px 16px;
}

.customer-job-grid {
    margin: 0;
}

.customer-job-list .job-subsection {
    margin: 0;
}

.wedding-workspace-panel {
    overflow: hidden;
    border-color: color-mix(in srgb, var(--button) 34%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--button) 18%, transparent), transparent 32%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 84%, #0ea5e9), var(--surface));
}

.wedding-heading {
    align-items: flex-start;
}

.wedding-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--button) 55%, var(--line));
    border-radius: 999px;
    color: var(--ink);
    background: color-mix(in srgb, var(--button) 16%, var(--surface-2));
    font-weight: 900;
    white-space: nowrap;
}

.wedding-progress {
    height: 12px;
    margin: 0 0 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
}

.wedding-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--button), #38bdf8);
}

.wedding-preview-lock {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--waiting);
    border-radius: 8px;
    background: var(--waiting-soft);
    color: var(--ink);
    font-weight: 850;
}

.wedding-preview-lock.is-editing {
    border-color: var(--ready);
    background: var(--ready-soft);
}

.wedding-section-form.is-readonly fieldset {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.attachment-link.needs-attention {
    border-color: var(--waiting);
    background: var(--waiting-soft);
}

.wedding-action-row,
.wedding-tabs,
.button-row {
    flex-wrap: wrap;
}

.wedding-action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.wedding-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px;
}

.wedding-tabs a {
    display: grid;
    gap: 2px;
    min-width: 124px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    text-decoration: none;
    background: var(--surface-2);
    font-weight: 900;
}

.wedding-tabs a.is-current,
.wedding-tabs a:hover {
    border-color: var(--button);
    background: color-mix(in srgb, var(--button) 14%, var(--surface-2));
}

.wedding-tabs small {
    color: var(--muted);
    font-size: 0.76rem;
}

.wedding-section-card,
.wedding-history,
.wedding-collab-box,
.wedding-admin-details {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-2) 88%, transparent);
    padding: 0;
}

.wedding-section-card + .wedding-section-card,
.wedding-history,
.wedding-collab-box {
    margin-top: 12px;
}

.wedding-section-card > summary,
.wedding-history > summary,
.wedding-collab-box > summary,
.wedding-admin-details > summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    color: var(--ink);
    font-weight: 950;
}

.wedding-section-card > summary small,
.wedding-admin-details > summary small {
    color: var(--muted);
    font-weight: 800;
}

.wedding-section-form,
.wedding-collab-box form,
.wedding-admin-details form,
.wedding-history > .table-wrap,
.wedding-admin-grid,
.wedding-admin-details .check-list {
    margin: 0 16px 16px;
}

.repeat-card-list {
    display: grid;
    gap: 10px;
}

.repeat-card-list h4,
.music-preference-grid h4 {
    margin: 8px 0 0;
    color: var(--ink);
}

.repeat-card {
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 12px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.music-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 12px;
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 850;
}

.music-preference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.music-preference-grid h4 {
    grid-column: 1 / -1;
}

.wedding-admin-grid {
    display: grid;
    gap: 12px;
}

.wedding-admin-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.wedding-admin-summary span {
    display: grid;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    background: var(--surface-2);
}

.wedding-admin-summary strong {
    color: var(--ink);
}

.wedding-admin-summary small {
    color: var(--muted);
    font-weight: 850;
}

.job-dashboard {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--line);
    margin: 16px;
    padding-top: 16px;
}

.job-dashboard-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.job-dashboard-heading h3 {
    margin-bottom: 0;
    font-size: 1.05rem;
}

.sync-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 5px 10px;
}

.job-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 16px;
}

.job-subsection {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--line);
    margin: 16px;
    padding-top: 16px;
}

.job-subsection h3 {
    margin-bottom: 0;
    font-size: 1rem;
}

.inline-create summary small {
    color: var(--muted);
    font-weight: 750;
}

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

.check-row {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.check-row.is-done {
    border-color: var(--ready);
    background: var(--ready-soft);
}

.compact-item,
.past-bucket {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.compact-item[open],
.past-bucket[open] {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.compact-item.is-done {
    border-color: var(--ready);
    background: var(--ready-soft);
}

.compact-item.is-removed {
    border-style: dashed;
    opacity: 0.82;
}

.compact-item summary,
.past-bucket summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
    cursor: pointer;
    list-style-position: inside;
}

.compact-item summary span,
.past-bucket summary {
    font-weight: 850;
}

.compact-item summary small,
.past-bucket summary small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.compact-item form,
.compact-item .attachment-strip,
.compact-item .signature-admin-panel,
.compact-item .compact-item-body,
.past-bucket .check-list {
    margin: 0 12px 12px;
}

.compact-item-body {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.labor-note,
.rate-lock-note {
    align-self: end;
    min-height: 38px;
    margin: 0;
    padding: 9px 10px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.removed-time-bucket {
    border-style: dashed;
}

.attachment-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.attachment-strip img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.invoice-create-form {
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.invoice-total-strip {
    margin-bottom: 2px;
}

.invoice-line-list {
    display: grid;
    gap: 8px;
}

.invoice-line-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.8fr) minmax(72px, 0.5fr) minmax(92px, 0.7fr) minmax(92px, 0.7fr) auto;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.invoice-line-row label {
    gap: 5px;
    font-size: 0.78rem;
}

.invoice-line-description input {
    min-width: 0;
}

.invoice-send-box {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px dashed var(--field-line);
    border-radius: 8px;
    background: var(--surface);
}

.portal-document-card.needs-signature,
.signature-field-card.needs-signature {
    border-color: var(--waiting);
    background: var(--waiting-soft);
}

.signature-admin-panel,
.signature-field-list {
    display: grid;
    gap: 10px;
}

.signature-admin-panel {
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.signature-admin-panel h4 {
    margin: 0;
    font-size: 0.95rem;
}

.signature-field-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

details.signature-field-card summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.signature-field-card.is-signed {
    border-color: var(--ready);
    background: var(--ready-soft);
}

.signature-field-card strong,
.signature-field-card summary span {
    color: var(--ink);
    font-weight: 850;
}

.signature-field-card small,
.signature-field-card span {
    color: var(--muted);
}

.signature-certificate-shell {
    max-width: 980px;
}

.signature-certificate {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.certificate-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.certificate-heading h1 {
    margin-bottom: 8px;
}

.certificate-status {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.certificate-status.is-complete {
    border-color: var(--ready);
    background: var(--ready-soft);
}

.certificate-status.is-pending {
    border-color: var(--waiting);
    background: var(--waiting-soft);
}

.certificate-status strong {
    color: var(--ink);
    font-size: 1.1rem;
}

.certificate-status span {
    color: var(--muted);
    font-weight: 800;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.certificate-grid article,
.certificate-signature-row {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.certificate-grid h2,
.certificate-signatures h2 {
    font-size: 1rem;
}

.certificate-grid p,
.certificate-signature-row p {
    color: var(--muted);
    line-height: 1.45;
}

.certificate-signatures {
    display: grid;
    gap: 12px;
}

.certificate-signature-row {
    display: grid;
    grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
    gap: 14px;
}

.certificate-signature-row.is-signed {
    border-color: var(--ready);
}

.certificate-signature-row.needs-signature {
    border-color: var(--waiting);
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-weight: 850;
    text-decoration: none;
    background: var(--surface-2);
}

.attachment-link:hover {
    border-color: var(--button);
}

.data-grid {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.section-panel {
    margin-top: 0;
}

.table-panel h2 {
    margin-bottom: 12px;
}

.audit-panel {
    grid-column: 1 / -1;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.review-list {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.review-card {
    display: grid;
    min-width: 0;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.compact-review-card {
    gap: 8px;
}

.review-card-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.review-card-heading span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

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

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.button-row button {
    flex: 0 1 auto;
}

.remove-reason {
    flex: 1 1 220px;
    min-width: min(100%, 220px);
}

.inline-sign-form {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 8px;
    min-width: 240px;
}

.inline-sign-form input,
.inline-sign-form button {
    min-height: 36px;
    padding: 8px 10px;
}

.mirror-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.mirror-metrics span {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.mirror-metrics strong {
    color: var(--ready);
    font-size: 1.45rem;
    line-height: 1;
}

.labor-examples {
    margin-top: 12px;
}

.pay-rate-list {
    display: grid;
    gap: 10px;
}

.pay-rate-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.55fr) minmax(150px, 0.7fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.pay-rate-row div {
    display: grid;
    gap: 3px;
}

.pay-rate-row small {
    color: var(--muted);
    font-weight: 750;
}

.checkbox-line {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    min-height: 42px;
    margin: 0;
}

.checkbox-line input {
    width: auto;
    min-height: auto;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.metric-grid span {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.metric-grid strong {
    color: var(--ready);
    font-size: 1.25rem;
    line-height: 1.05;
}

.metric-grid small {
    color: var(--muted);
    font-weight: 750;
}

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

.focus-pulse {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

.goal-list {
    display: grid;
    gap: 12px;
}

.goal-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.goal-card h3 {
    margin-bottom: 0;
    font-size: 1rem;
}

.progress-track {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--field);
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--ready);
}

.payment-link-card {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1.2fr);
    gap: 16px;
    align-items: end;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--ready);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.payment-link-card h2 {
    margin-bottom: 6px;
}

.payment-link-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.payment-link-actions input {
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.pay-public-page .pay-shell {
    width: min(1040px, calc(100vw - 28px));
}

.pay-hero {
    align-items: center;
}

.pay-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 16px;
    align-items: start;
}

.pay-panel,
.pay-summary-card,
.pay-stripe-card {
    box-shadow: var(--shadow-soft);
}

.pay-summary-list {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.pay-summary-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.pay-summary-list dt {
    color: var(--muted);
}

.pay-summary-list dd {
    margin: 0;
    font-weight: 800;
}

.pay-total-row {
    color: var(--ready);
    font-size: 1.12rem;
}

.payment-ack {
    align-items: flex-start;
    margin-top: 6px;
}

.pay-stripe-card {
    grid-column: 1 / -1;
}

.stripe-element-box {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--field-line);
    border-radius: 10px;
    background: var(--field);
}

.mini-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mini-list p {
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--field);
    color: var(--muted);
    line-height: 1.35;
}

.mini-job-link {
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--field);
    color: var(--ink);
    line-height: 1.35;
    text-decoration: none;
}

.mini-job-link:hover,
.mini-job-link:focus-visible {
    border-color: var(--button);
    background: color-mix(in srgb, var(--button) 10%, var(--field));
}

.mini-job-link span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    background: var(--surface);
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
    overflow-wrap: break-word;
    word-break: normal;
}

th {
    background: var(--table-head);
    color: var(--ink);
    font-size: 0.9rem;
}

td {
    color: var(--muted);
}

td small {
    color: var(--muted);
}

tr:last-child td {
    border-bottom: 0;
}

.audit-log-table,
.clock-activity-table {
    table-layout: fixed;
    min-width: 820px;
}

.audit-log-table th:nth-child(1),
.audit-log-table td:nth-child(1) {
    width: 120px;
}

.audit-log-table th:nth-child(2),
.audit-log-table td:nth-child(2) {
    width: 90px;
}

.audit-log-table th:nth-child(3),
.audit-log-table td:nth-child(3) {
    width: 210px;
}

.clock-activity-table th:nth-child(1),
.clock-activity-table td:nth-child(1) {
    width: 145px;
}

.clock-activity-table th:nth-child(2),
.clock-activity-table td:nth-child(2) {
    width: 145px;
}

.clock-activity-table th:nth-child(3),
.clock-activity-table td:nth-child(3),
.clock-activity-table th:nth-child(4),
.clock-activity-table td:nth-child(4) {
    width: 86px;
}

.clock-activity-table th:nth-child(5),
.clock-activity-table td:nth-child(5) {
    width: 180px;
}

.clock-activity-table th:nth-child(6),
.clock-activity-table td:nth-child(6) {
    width: 100px;
}

.audit-summary-cell {
    min-width: 260px;
    color: var(--ink);
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
}

.system-panel {
    margin-top: 18px;
}

.module {
    padding: 20px;
}

.module p {
    margin-bottom: 0;
}

@media (max-width: 980px) {
    .kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .section-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .pay-rate-row {
        grid-template-columns: minmax(0, 1fr) minmax(120px, 0.6fr);
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(100% - 14px, 680px);
        padding: 14px 0 28px;
    }

    .hero,
    .privacy-hero,
    .panel-heading,
    .customer-quick-summary,
    .job-dashboard-heading,
    .section-heading,
    .grid,
    .login-shell,
    .workspace-grid,
    .job-dashboard-grid,
    .job-command-strip,
    .form-row,
    .form-row:has(label:nth-child(3)),
    .review-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 14px;
        padding-bottom: 16px;
        margin-bottom: 12px;
    }

    .hero-actions,
    .privacy-actions,
    .login-shell {
        min-width: 0;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.05;
    }

    .lead {
        font-size: 0.98rem;
    }

    .login-copy {
        min-height: 280px;
        padding: 22px;
    }

    .login-copy::before {
        inset: -18% -16% -18% 14%;
        background-size: min(92vw, 470px) auto;
        background-position: 82% 48%;
        opacity: 0.13;
    }

    .login-card,
    .panel {
        padding: 16px;
    }

    .privacy-grid {
        grid-template-columns: 1fr;
    }

    .trust-footer {
        display: grid;
        gap: 10px;
        padding: 12px;
    }

    .trust-footer nav {
        justify-content: flex-start;
        min-width: 0;
    }

    .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 10px;
    }

    .kpis article,
    .kpi-link {
        padding: 12px;
        min-width: 0;
    }

    .kpis span {
        font-size: 1.45rem;
    }

    .kpis p {
        font-size: 0.82rem;
        line-height: 1.25;
    }

    .scorecard {
        text-align: left;
    }

    .panel-heading {
        display: block;
    }

    .job-dashboard-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .sync-pill {
        justify-content: center;
        border-radius: 8px;
    }

    .job-dashboard-grid {
        margin: 0;
    }

    .metric-grid,
    .compact-metrics {
        grid-template-columns: 1fr;
    }

    .job-dashboard,
    .job-subsection {
        margin: 12px 0;
    }

    .invoice-line-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .invoice-line-row .inline-check {
        min-height: 42px;
    }

    .section-heading,
    .review-card-heading {
        display: grid;
    }

    .section-nav {
        position: sticky;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 6px;
        margin: 0 -2px 14px;
        border-radius: 8px;
        scrollbar-width: none;
    }

    .section-nav::-webkit-scrollbar {
        display: none;
    }

    .section-tab {
        flex: 0 0 86px;
        display: grid;
        justify-items: center;
        align-content: center;
        gap: 4px;
        min-height: 58px;
        padding: 8px 6px;
        font-size: 0.78rem;
        line-height: 1.1;
    }

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

    .record-card summary,
    .review-card-heading,
    .compact-item summary,
    .past-bucket summary {
        grid-template-columns: 1fr;
    }

    .record-card summary {
        gap: 6px;
        padding: 14px;
    }

    .job-command-strip {
        padding: 0 14px 14px;
    }

    .job-command-card {
        min-height: 0;
    }

    .record-card summary small {
        line-height: 1.35;
    }

    .record-card form {
        padding: 0 14px 14px;
    }

    .customer-card-body {
        padding: 0 14px 14px;
    }

    .customer-card-body .compact-details form {
        padding: 0;
    }

    .job-edit-details {
        margin: 0 14px 12px;
    }

    .clock-bridge-card .panel-heading {
        display: grid;
        gap: 12px;
    }

    .clock-bridge-card .panel-heading .button-link,
    .legacy-import-panel > summary {
        width: 100%;
    }

    .legacy-import-panel > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .time-collapsible-card > summary {
        align-items: flex-start;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .time-collapsible-card > summary small {
        grid-column: 1 / -1;
        text-align: left;
    }

    .legacy-import-panel > summary small {
        text-align: left;
    }

    .payment-link-card {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .payment-link-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .payment-link-actions button,
    .payment-link-actions a {
        width: 100%;
    }

    .pay-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .pay-hero .hero-actions {
        align-items: stretch;
    }

    .pay-hero .hero-actions a {
        width: 100%;
    }

    .certificate-heading,
    .certificate-status,
    .certificate-signature-row,
    .certificate-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .review-card {
        padding: 14px;
    }

    .button-row,
    .inline-sign-form,
    .pay-rate-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .button-row button,
    .inline-sign-form button,
    .pay-rate-row button {
        width: 100%;
    }

    .mirror-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mirror-metrics span {
        padding: 10px;
        font-size: 0.82rem;
    }

    .mirror-metrics strong {
        font-size: 1.25rem;
    }

    input,
    select,
    textarea,
    button {
        font-size: 1rem;
    }

    table {
        min-width: 620px;
    }

    th,
    td {
        padding: 9px;
    }
}

@media print {
    html,
    body {
        background: #ffffff;
        color: #111111;
    }

    .signature-certificate-shell {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .signature-certificate {
        box-shadow: none;
        border-color: #999999;
    }

    .certificate-heading button,
    .attachment-link {
        display: none;
    }

    .certificate-grid article,
    .certificate-signature-row,
    .certificate-status {
        break-inside: avoid;
        background: #ffffff;
        border-color: #bbbbbb;
    }
}

@media (max-width: 420px) {
    .shell {
        width: min(100% - 10px, 410px);
    }

    .panel,
    .login-card {
        padding: 14px;
    }

    .login-copy {
        min-height: 240px;
        padding: 18px;
    }

    .login-access-list span {
        min-height: 30px;
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.78rem;
    }

    .section-tab {
        flex-basis: 78px;
    }

    .nav-icon {
        width: 22px;
        height: 22px;
    }

    .kpis,
    .mirror-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .small-note {
        font-size: 0.86rem;
    }
}
