:root {
    --bg: #edf4f7;
    --surface: #ffffff;
    --surface-2: #f4f7fb;
    --text: #17202c;
    --muted: #667085;
    --line: #d8e0ea;
    --primary: #147f9f;
    --primary-strong: #0d5f78;
    --accent: #e48b2c;
    --accent-2: #7c5cff;
    --danger: #d3463c;
    --success: #24966d;
    --info: #2f6fe4;
    --warning: #d99b22;
    --sidebar-bg: #0f5268;
    --topbar-bg: #dcecf1;
    --shadow: 0 18px 45px rgba(25, 38, 55, .1);
    --shadow-lift: 0 18px 34px rgba(23, 32, 44, .12), 0 2px 0 rgba(255, 255, 255, .95) inset;
    --shadow-soft: 0 10px 22px rgba(23, 32, 44, .08);
}

[data-theme="dark"] {
    --bg: #101820;
    --surface: #172231;
    --surface-2: #202d3d;
    --text: #edf2f7;
    --muted: #aab6c5;
    --line: #2d3b4d;
    --primary: #46a5bf;
    --primary-strong: #77c5d8;
    --accent: #e0a64b;
    --accent-2: #8d7cff;
    --danger: #ff7a6e;
    --success: #66c293;
    --info: #7ea7ef;
    --warning: #e7bd61;
    --shadow: 0 18px 45px rgba(0, 0, 0, .22);
    --shadow-lift: 0 18px 36px rgba(0, 0, 0, .28), 0 1px 0 rgba(255, 255, 255, .06) inset;
    --shadow-soft: 0 10px 24px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.skip-link {
    position: fixed;
    z-index: 9999;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--text);
    color: var(--surface);
    font-weight: 800;
    transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 72%, #ffffff);
    outline-offset: 3px;
}

input, select, textarea, button {
    font: inherit;
}

label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
    font-size: .9rem;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
    outline: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 1px 2px rgba(23, 32, 44, .04);
}

input[type="color"] {
    min-height: 48px;
    padding: 5px;
    cursor: pointer;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)),
        var(--surface);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 6px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 18px rgba(23, 32, 44, .14);
}

input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 6px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 18px rgba(23, 32, 44, .14);
}

textarea { min-height: 110px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 0;
    padding: 22px 18px;
    background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-2) 62%, var(--surface)));
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 34px rgba(23, 32, 44, .05);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

html:not([data-theme="dark"]) body {
    --primary: #147f9f;
    --primary-strong: #0d5f78;
    --bg: #edf3f6;
    --text: #17202c;
    --muted: #667085;
    background: var(--bg);
}

html:not([data-theme="dark"]) .sidebar {
    background: var(--sidebar-bg);
    border-right: 0;
    box-shadow: 16px 0 36px rgba(15, 82, 104, .18);
}

html:not([data-theme="dark"]) .brand {
    color: #fff;
}

html:not([data-theme="dark"]) .brand small {
    color: rgba(235, 250, 255, .72);
}

html:not([data-theme="dark"]) .brand-mark {
    background: #ffffff;
    color: #0f5268;
    box-shadow: 0 12px 24px rgba(3, 24, 32, .2);
}

html:not([data-theme="dark"]) .nav-sublist {
    border-left-color: rgba(255, 255, 255, .2);
}

html:not([data-theme="dark"]) .nav-item {
    color: rgba(235, 250, 255, .76);
}

html:not([data-theme="dark"]) .nav-item.active,
html:not([data-theme="dark"]) .nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, .13);
    box-shadow: 0 10px 22px rgba(3, 24, 32, .14), 0 1px 0 rgba(255, 255, 255, .08) inset;
}

html:not([data-theme="dark"]) .nav-item.active .nav-icon {
    color: #fff;
    border-color: rgba(255, 255, 255, .88);
    background: rgba(255, 255, 255, .16);
}

[data-theme="dark"] body {
    background: #101820;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px 22px;
}

.brand small, .user-chip small, table small {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent-2));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 28%, transparent);
}

.brand-logo {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    overflow: hidden;
    flex: 0 0 38px;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-mark.large {
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
}

.brand-logo.large {
    width: 52px;
    height: 52px;
}

.nav-list {
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary) 45%, var(--line)) transparent;
}

.nav-list::-webkit-scrollbar {
    width: 8px;
}

.nav-list::-webkit-scrollbar-track {
    background: transparent;
}

.nav-list::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary) 45%, var(--line));
    border-radius: 999px;
}

.nav-group {
    display: grid;
    gap: 4px;
}

.nav-group summary {
    list-style: none;
    cursor: pointer;
}

.nav-group summary::-webkit-details-marker { display: none; }

.nav-group summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    opacity: .65;
}

.nav-group[open] summary::after { transform: rotate(45deg); }

.nav-sublist {
    display: grid;
    gap: 3px;
    margin: 0 0 4px 29px;
    padding-left: 10px;
    border-left: 1px solid var(--line);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
}

.nav-subitem {
    min-height: 34px;
    padding: 7px 10px;
    font-size: .9rem;
}

.nav-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.nav-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    border-radius: 999px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.nav-footer-links a:hover {
    color: var(--text);
    background: var(--surface-2);
}

html:not([data-theme="dark"]) .nav-footer-links {
    border-top-color: rgba(255, 255, 255, .18);
}

html:not([data-theme="dark"]) .nav-footer-links a {
    border-color: rgba(255, 255, 255, .18);
    color: rgba(235, 250, 255, .72);
}

html:not([data-theme="dark"]) .nav-footer-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .13);
}

.nav-item.active, .nav-item:hover {
    color: var(--text);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 12%, transparent), transparent 58%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, var(--surface-2)), var(--surface-2));
    box-shadow: 0 8px 18px rgba(23, 32, 44, .07), 0 1px 0 rgba(255, 255, 255, .72) inset;
}

.nav-item.active .nav-icon {
    color: var(--primary);
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 18%, transparent);
}

.nav-item.muted { opacity: .62; cursor: default; }

.nav-icon {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 5px;
    flex: 0 0 18px;
    background: color-mix(in srgb, currentColor 8%, transparent);
}

.main { min-width: 0; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 82px;
    padding: 18px 28px;
    background: color-mix(in srgb, var(--bg) 78%, var(--surface));
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 28px rgba(23, 32, 44, .06);
}

html:not([data-theme="dark"]) .topbar {
    background: var(--topbar-bg);
}

.topbar h1, h2, h1 { margin: 0; letter-spacing: 0; }

.eyebrow {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.global-search {
    flex: 1 1 300px;
    max-width: 460px;
}

.global-search input {
    min-height: 40px;
    background: var(--surface);
}

.content { padding: 28px; display: grid; gap: 24px; }

.page-help {
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: var(--shadow);
}

.page-help summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.page-help summary::-webkit-details-marker { display: none; }

.page-help summary span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.page-help summary strong { font-size: 1rem; }

.page-help summary::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.page-help[open] summary::after { transform: rotate(45deg); }

.page-help p {
    margin: 10px 0 8px;
    max-width: 980px;
    color: var(--muted);
}

.page-help a {
    color: var(--primary);
    font-weight: 900;
    font-size: .9rem;
}

.button, .icon-button {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-2) 76%, var(--surface)));
    color: var(--text);
    border-radius: 8px;
    min-height: 40px;
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 16px rgba(23, 32, 44, .08), 0 1px 0 rgba(255, 255, 255, .9) inset;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.button:hover, .icon-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(23, 32, 44, .12), 0 1px 0 rgba(255, 255, 255, .9) inset;
}

.button.primary {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 14px 24px color-mix(in srgb, var(--primary) 28%, transparent), 0 1px 0 rgba(255, 255, 255, .18) inset;
}

.button.primary:hover { background: var(--primary-strong); }
.button.ghost { background: transparent; }
.button.small { min-height: 34px; padding: 7px 10px; font-size: .86rem; }
.button.danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.button.full { width: 100%; }

.icon-button {
    width: 42px;
    padding: 0;
}

.theme-symbol {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--text) 50%, transparent 50%);
    border: 2px solid var(--text);
}

.notification-button {
    position: relative;
}

.notification-button strong {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    font-size: .68rem;
    line-height: 1;
}

.notification-dot {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text);
    border-radius: 5px;
    display: block;
    position: relative;
}

.notification-dot::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
}

.hamburger::before, .hamburger::after { content: ""; margin-top: 5px; }

.mobile-only { display: none; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-2) 62%, var(--surface)));
    box-shadow: var(--shadow-soft);
}

.user-chip > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--surface-2);
    font-weight: 900;
}

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

.dashboard-stat-row {
    grid-template-columns: repeat(var(--dashboard-stat-count, 6), minmax(150px, 1fr));
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
}

.metric-card, .panel, .login-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff), var(--surface));
    border: 1px solid color-mix(in srgb, var(--line) 72%, #fff);
    border-radius: 8px;
    box-shadow: var(--shadow-lift);
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.dashboard-stat-row .metric-card {
    min-height: 106px;
    padding: 16px;
    scroll-snap-align: start;
}

.dashboard-stat-row .metric-card strong {
    font-size: 1.75rem;
}
.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
}
.metric-card:nth-child(2n)::before { background: linear-gradient(90deg, var(--accent), var(--warning)); }
.metric-card:nth-child(3n)::before { background: linear-gradient(90deg, var(--accent-2), var(--info)); }
.metric-card:nth-child(4n)::before { background: linear-gradient(90deg, var(--success), var(--primary)); }
.metric-card span { color: var(--muted); font-weight: 800; }
.metric-card strong {
    display: block;
    margin-top: 10px;
    font-size: 2rem;
    color: var(--primary);
}
.metric-card.warn strong { color: var(--accent); }

.grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
    gap: 20px;
}

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

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

.dashboard-command {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, #fff);
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 9%, transparent), transparent 62%),
        var(--surface);
    box-shadow: var(--shadow-lift);
}

.dashboard-command h2 {
    margin: 0;
    color: color-mix(in srgb, var(--text) 82%, var(--primary));
}

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

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

.faq-item summary {
    cursor: pointer;
    font-weight: 900;
}

.faq-item p {
    margin: 10px 0 0;
    color: var(--muted);
}

.help-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 28px;
    align-items: end;
    margin-bottom: 16px;
    padding: 28px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--primary);
    border-radius: 8px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 7%, var(--surface)), var(--surface) 58%);
    box-shadow: var(--shadow-soft);
}
.help-hero h2 { max-width: 760px; margin: 5px 0 8px; font-size: clamp(1.75rem, 3vw, 2.7rem); line-height: 1.08; }
.help-hero p { max-width: 780px; margin: 0; color: var(--muted); }
.help-search { padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.help-search span { color: var(--text); }
.help-jump-nav {
    position: sticky;
    top: 8px;
    z-index: 4;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.help-jump-nav a { flex: 0 0 auto; padding: 8px 11px; border-radius: 6px; color: var(--muted); font-size: .84rem; font-weight: 800; }
.help-jump-nav a:hover { color: var(--text); background: var(--surface-2); }
.help-section { scroll-margin-top: 78px; }
.help-role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.help-role-grid article {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--primary);
    border-radius: 7px;
    background: var(--surface-2);
}
.help-role-grid article:nth-child(2) { border-top-color: var(--accent); }
.help-role-grid article:nth-child(3) { border-top-color: var(--accent-2); }
.help-role-grid article:nth-child(4) { border-top-color: var(--success); }
.help-role-grid h3 { margin: 8px 0; }
.help-role-grid ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: .88rem; line-height: 1.65; }
.help-role-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; background: var(--primary); color: #fff; font-weight: 900; }
.help-guide-list { display: grid; gap: 18px; }
.help-guide {
    display: grid;
    grid-template-columns: minmax(310px, .82fr) minmax(420px, 1.18fr);
    gap: 22px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}
.help-guide:nth-child(even) .help-guide-copy { order: 2; }
.help-guide h3 { margin: 6px 0 7px; font-size: 1.35rem; }
.help-guide p { margin: 0 0 12px; color: var(--muted); }
.help-guide ol { margin: 0; padding-left: 21px; line-height: 1.65; }
.help-guide-meta { display: flex; gap: 8px; }
.help-guide-meta span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: .72rem; font-weight: 800; }
.help-guide figure { min-width: 0; margin: 0; }
.help-guide img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top left;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.help-guide figcaption { margin-top: 7px; color: var(--muted); font-size: .75rem; }
.help-faq-item { padding: 0; overflow: hidden; }
.help-faq-item summary { padding: 15px 17px; }
.help-faq-body { padding: 0 17px 17px; }
.help-faq-body > p { margin: 0 0 14px; color: var(--text); font-size: .98rem; }
.help-answer-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 14px; }
.help-answer-grid > div, .help-answer-grid aside { padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.help-answer-grid ol { margin: 8px 0 0; padding-left: 21px; line-height: 1.65; }
.help-answer-grid aside { border-left: 4px solid var(--accent); }
.help-answer-grid aside p { margin: 5px 0 12px; color: var(--muted); }
.help-answer-grid aside p:last-child { margin-bottom: 0; }
.help-no-results { padding: 26px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); }
.help-no-results p { margin: 4px 0 0; color: var(--muted); }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(12, 24, 32, .48);
    backdrop-filter: blur(5px);
}

.modal-panel {
    width: min(560px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--line) 68%, #fff);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .28), 0 1px 0 rgba(255, 255, 255, .92) inset;
}

.panel-header h2 {
    color: color-mix(in srgb, var(--text) 82%, var(--primary));
}

.tab-shell {
    display: grid;
    gap: 16px;
}

.tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 7%, transparent), transparent 58%),
        color-mix(in srgb, var(--surface-2) 72%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.tab-button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 13px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.tab-button:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 72%, var(--primary) 8%);
}

.tab-button.active {
    color: #fff;
    border-color: color-mix(in srgb, var(--primary) 78%, #fff);
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 94%, #fff), var(--primary));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 22%, transparent), 0 1px 0 rgba(255, 255, 255, .28) inset;
    transform: translateY(-1px);
}

.tab-panel {
    display: grid;
    gap: 16px;
}

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

.compact-panel {
    gap: 12px;
}

.soft-card {
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, transparent), transparent 46%),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

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

.mini-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 62%, var(--surface));
}

.mini-list small {
    color: var(--muted);
    text-align: right;
}

.score-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(180deg, color-mix(in srgb, var(--success) 84%, #fff), var(--success));
    box-shadow: 0 12px 26px color-mix(in srgb, var(--success) 24%, transparent);
}

.list-tools {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 68%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.list-tools summary {
    cursor: pointer;
    font-weight: 900;
    color: color-mix(in srgb, var(--text) 80%, var(--primary));
}

.column-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.column-picker label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    border-radius: 8px;
    background: var(--surface);
    font-weight: 800;
}

.activity-feed {
    display: grid;
    gap: 10px;
}

.activity-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 13px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 8px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 6%, transparent), transparent 48%), var(--surface);
}

.activity-item small {
    display: block;
    color: var(--muted);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, transparent), transparent 55%), var(--surface);
    box-shadow: var(--shadow-soft);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 900;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    color: var(--primary);
    font-size: 2rem;
}

.kanban-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.kanban-column {
    min-height: 360px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 76%, var(--surface));
}

.kanban-column h3 {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
}

.kanban-column h3 span {
    color: var(--muted);
}

.kanban-card {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.kanban-card.overdue {
    border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
    background: linear-gradient(90deg, color-mix(in srgb, var(--danger) 9%, transparent), var(--surface));
}

.modal-row > td {
    height: 0;
    padding: 0 !important;
    border: 0 !important;
}

.alert.warning {
    background: linear-gradient(90deg, color-mix(in srgb, var(--warning) 18%, var(--surface)), var(--surface));
    color: color-mix(in srgb, var(--warning) 70%, var(--text));
    border-color: color-mix(in srgb, var(--warning) 38%, var(--line));
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 7%, transparent), transparent 46%),
        color-mix(in srgb, var(--surface-2) 72%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.filters input,
.filters select {
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
}

.filters input[type="search"] {
    flex: 1 1 240px;
    min-width: min(240px, 100%);
}

.filters select {
    flex: 0 1 178px;
    max-width: 220px;
}

.filters input[type="number"],
.filters input[type="date"] {
    flex: 0 1 150px;
    max-width: 170px;
}

.filters .button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.signature-pad {
    width: 100%;
    max-width: 520px;
    height: 160px;
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    touch-action: none;
}

.signature-preview {
    width: 100%;
    max-width: 420px;
    min-height: 110px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent 70%),
        color-mix(in srgb, var(--surface-2) 74%, var(--surface));
    color: color-mix(in srgb, var(--muted) 72%, var(--primary));
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}

tbody tr {
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
    box-shadow: 0 8px 18px rgba(23, 32, 44, .06);
}

td strong,
td a strong {
    color: color-mix(in srgb, var(--text) 92%, var(--primary));
}

td:empty::after {
    content: "-";
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    border-radius: 8px;
    padding: 4px 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 85%, #fff), var(--surface-2));
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: capitalize;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .75) inset;
}

.badge.high, .badge.critical { color: var(--danger); }
.badge.low { color: var(--success); }
.badge.medium { color: var(--accent); }
.badge.high { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.badge.critical { background: color-mix(in srgb, var(--danger) 15%, var(--surface)); }
.badge.low { background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.badge.medium { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }

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

.billing-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 18px;
}

.billing-price strong {
    font-size: 2.4rem;
}

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

.billing-price.compact {
    margin-bottom: 0;
}

.billing-subscription-status {
    display: grid;
    gap: 3px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 7px;
    background: var(--surface-2);
}
.billing-subscription-status span,
.billing-subscription-status small { color: var(--muted); }
.stripe-plan-actions { display: grid; gap: 8px; }

.billing-price.compact strong {
    font-size: 1.7rem;
}

.upgrade-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.upgrade-callout span {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.usage-bars,
.feature-list {
    display: grid;
    gap: 14px;
}

.usage-bar {
    display: grid;
    gap: 8px;
}

.usage-bar small {
    color: var(--muted);
    font-weight: 800;
}

.usage-bar.warn small,
.usage-bar.warn strong {
    color: var(--accent);
}

.usage-bar.limit small,
.usage-bar.limit strong {
    color: var(--danger);
}

.usage-bar div,
.feature-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.feature-list div {
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.feature-list small {
    flex: 1 0 100%;
    color: var(--muted);
}

meter {
    width: 100%;
    height: 12px;
}

.feature-on { color: var(--success); }
.feature-off { color: var(--muted); }

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

.feature-grid span {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    color: var(--muted);
    font-weight: 800;
}

.feature-grid span.on {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, transparent);
}

.plan-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.plan-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, #fff);
    border-radius: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff), var(--surface));
    box-shadow: var(--shadow-soft);
}

.plan-card.current {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.plan-card.recommended {
    box-shadow: var(--shadow-lift);
}

.plan-card h3 {
    margin: 0;
}

.plan-limits {
    display: grid;
    gap: 8px;
}

.plan-limits span {
    color: var(--muted);
    font-weight: 850;
}

.locked-feature-grid,
.onboarding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.locked-feature-grid article,
.onboarding-item {
    display: grid;
    gap: 7px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.locked-feature-grid p,
.onboarding-item small {
    margin: 0;
    color: var(--muted);
}

.onboarding-item strong {
    width: max-content;
    border-radius: 8px;
    padding: 3px 8px;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    color: var(--primary);
    font-size: .75rem;
}

.onboarding-item.done {
    opacity: .78;
}

.onboarding-item.done strong {
    background: color-mix(in srgb, var(--success) 12%, var(--surface));
    color: var(--success);
}

.onboarding-sample-panel {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--success) 9%, transparent), transparent 68%),
        var(--surface);
}

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

.onboarding-sample-grid article {
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, #fff);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 58%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.onboarding-sample-grid span {
    display: block;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.onboarding-sample-grid strong {
    display: block;
    margin-top: 4px;
    color: var(--primary);
    font-size: 1.45rem;
}

.guided-onboarding-form {
    display: grid;
    gap: 16px;
}

.setup-step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 94%, var(--primary));
}

.setup-step > span {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-weight: 900;
}

.setup-step h3 {
    margin: 0 0 4px;
    font-size: 1.08rem;
}

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

.timeline-list article {
    position: relative;
    display: grid;
    gap: 5px;
    padding: 12px 12px 12px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 68%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.timeline-list article::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 8px;
    background: var(--primary);
}

.timeline-list span,
.timeline-list small {
    color: var(--muted);
}

.asset-summary,
.detail-list {
    display: grid;
    gap: 12px;
}

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

.asset-summary div,
.detail-list div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.asset-summary span,
.detail-list span,
.detail-list small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.asset-summary strong,
.detail-list strong {
    overflow-wrap: anywhere;
}

.work-order-sheet small {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

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

.form-grid .span-2 { grid-column: 1 / -1; }

.actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.section-line {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 22px 0;
}

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

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.check-row input {
    width: auto;
}

.inline-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.inline-actions form { margin: 0; }

.inspection-checklist {
    display: grid;
    gap: 14px;
}

.inspection-item {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, #fff);
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 6%, transparent), transparent 70%),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.inspection-item strong {
    display: block;
}

.inspection-item small {
    color: var(--muted);
    font-weight: 800;
}

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

.segmented-control label {
    display: block;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    display: grid;
    place-items: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 900;
    cursor: pointer;
}

.segmented-control input:checked + span {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 16%, var(--surface));
    color: var(--primary);
    box-shadow: 0 10px 20px color-mix(in srgb, var(--primary) 14%, transparent);
}

.segmented-control label:last-child input:checked + span {
    border-color: var(--danger);
    background: color-mix(in srgb, var(--danger) 14%, var(--surface));
    color: var(--danger);
}

.table-toolbar .inline-actions {
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--line) 64%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 58%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.table-toolbar .inline-actions .button {
    min-height: 38px;
}

.upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.attachment-grid {
    display: grid;
    gap: 12px;
}

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

.notification-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.notification-item.unread {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.notification-item p {
    margin: 6px 0;
    color: var(--muted);
}

.attachment-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.attachment-card img,
.file-tile {
    width: 88px;
    height: 66px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-2);
}

.file-tile {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 900;
}

.attachment-card .inline-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.calendar-stat-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.calendar-control-panel {
    position: relative;
    overflow: hidden;
}

.calendar-control-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
}

.calendar-filter-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin-top: 16px;
}

.calendar-filter-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.calendar-filter-grid label span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.calendar-filter-grid input,
.calendar-filter-grid select {
    min-height: 40px;
}

.calendar-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    align-items: start;
}

.calendar-month-panel {
    min-width: 0;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-size: .78rem;
    font-weight: 900;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--event-color, var(--primary)) 10%, transparent);
}

.legend-item::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--event-color, var(--primary));
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
    margin-top: 16px;
}

.calendar-weekday {
    min-height: 38px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 148px;
    background: var(--surface);
    padding: 10px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
}

.calendar-day.muted {
    background: color-mix(in srgb, var(--surface) 72%, var(--surface-2));
}

.calendar-day.today {
    box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-events {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

.calendar-event {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 7px;
    padding: 7px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--event-color, var(--primary));
    border-radius: 8px;
    background: var(--surface-2);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--event-color, var(--text)) 10%, transparent);
    min-width: 0;
    transition: transform .16s ease, box-shadow .16s ease;
}

.calendar-event:hover,
.agenda-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--event-color, var(--text)) 16%, transparent);
}

.calendar-event span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
}

.calendar-event strong {
    overflow-wrap: anywhere;
    font-size: .82rem;
    line-height: 1.25;
}

.calendar-event small {
    grid-column: 1 / -1;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.calendar-event.is-overdue,
.agenda-card.is-overdue {
    border-color: color-mix(in srgb, var(--danger) 34%, var(--line));
}

.calendar-more {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.event-work_order { --event-color: #0ea5a3; }
.event-pm { --event-color: #22c55e; }
.event-inspection { --event-color: #7c3aed; }
.event-inventory_count { --event-color: #f59e0b; }
.calendar-event.high,
.calendar-event.critical { --event-color: var(--danger); }
.calendar-event.medium { --event-color: var(--accent); }

.schedule-buckets {
    display: grid;
    gap: 16px;
}

.schedule-bucket {
    padding: 16px;
}

.panel-header.compact {
    margin-bottom: 12px;
}

.panel-header.compact h2 {
    font-size: 1.05rem;
}

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

.agenda-list.compact {
    gap: 8px;
}

.agenda-card {
    --event-color: var(--primary);
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--event-color) 10%, transparent), transparent 44%),
        var(--surface);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--event-color, var(--text)) 10%, transparent);
    color: var(--text);
    min-width: 0;
}

.event-rail {
    width: 4px;
    height: 100%;
    min-height: 42px;
    border-radius: 999px;
    background: var(--event-color);
}

.event-pill {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--event-color) 16%, var(--surface));
    color: var(--event-color);
    font-size: .68rem;
    font-weight: 900;
}

.agenda-card-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.agenda-card-main strong,
.agenda-card-main small {
    overflow-wrap: anywhere;
}

.agenda-card-main small,
.agenda-card-side small {
    color: var(--muted);
}

.agenda-card-side {
    display: grid;
    gap: 2px;
    justify-items: end;
    white-space: nowrap;
    color: var(--text);
    font-weight: 900;
}

.mobile-agenda-panel {
    display: none;
}

.log-entry-list {
    display: grid;
    gap: 8px;
}

.log-entry {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.log-entry code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--text);
}

.qa-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

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

.qa-card h3 {
    margin: 0;
}

.qa-card div {
    display: grid;
    gap: 2px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.qa-card small {
    color: var(--muted);
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    max-width: 560px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.empty-state strong {
    color: var(--text);
    font-size: 1rem;
}

.empty-state span {
    color: var(--muted);
    line-height: 1.45;
}

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

.feedback-drawer {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    width: min(360px, calc(100vw - 36px));
}

.feedback-drawer summary {
    width: fit-content;
    margin-left: auto;
    list-style: none;
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
}

.feedback-drawer summary::-webkit-details-marker {
    display: none;
}

.feedback-drawer form {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 14px;
}

label:has(input[required])::after,
label:has(select[required])::after,
label:has(textarea[required])::after {
    content: "Required";
    display: inline-flex;
    width: fit-content;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary);
    font-size: .62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.filters select,
.filters input {
    min-height: 38px;
}

.filters {
    align-items: end;
}

.diagnostics-section {
    position: relative;
}

.diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.diagnostic-card {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(25, 38, 55, .07);
    border-top: 4px solid var(--success);
}

.diagnostic-card h3 {
    margin: 4px 0 0;
    font-size: 1rem;
}

.diagnostic-card p {
    margin: 0;
    color: var(--text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.diagnostic-card small {
    color: var(--muted);
    line-height: 1.4;
}

.diagnostic-card .button {
    justify-self: start;
}

.diagnostic-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--success) 14%, var(--surface));
    color: var(--success);
    font-size: .68rem;
    font-weight: 900;
}

.diagnostic-warn {
    border-top-color: var(--accent);
}

.diagnostic-warn .diagnostic-status {
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
    color: var(--accent);
}

.diagnostic-fail {
    border-top-color: var(--danger);
}

.diagnostic-fail .diagnostic-status {
    background: color-mix(in srgb, var(--danger) 14%, var(--surface));
    color: var(--danger);
}

.danger-zone {
    border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--danger) 7%, transparent), transparent 170px),
        var(--surface);
}

.danger-zone-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.confirm-phrase {
    display: inline-block;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--danger) 10%, var(--surface));
    color: var(--danger);
    font-weight: 900;
}

.alert {
    border-radius: 8px;
    padding: 11px 12px;
    font-weight: 800;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.alert.danger {
    background: linear-gradient(90deg, color-mix(in srgb, var(--danger) 16%, var(--surface)), var(--surface));
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.alert.success {
    background: linear-gradient(90deg, color-mix(in srgb, var(--success) 16%, var(--surface)), var(--surface));
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 35%, var(--line));
}

.support-banner,
.billing-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 13px 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.support-banner div,
.billing-banner div {
    display: grid;
    gap: 2px;
}

.support-banner span,
.billing-banner span {
    color: var(--muted);
}

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

.guest-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    background: color-mix(in srgb, var(--bg) 88%, #ffffff);
    position: relative;
    overflow-x: hidden;
}

.guest-body::before {
    content: "";
    position: fixed;
    inset: 18px;
    pointer-events: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.guest-body::after {
    content: none;
}

.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.login-panel {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 32px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.login-copy {
    position: relative;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
    border-radius: 8px;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .12), transparent 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--sidebar-bg) 88%, #06141b), #071a22);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 32px 70px rgba(6, 20, 27, .28);
    overflow: hidden;
}

.login-copy::before {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 34%, transparent);
    filter: blur(2px);
    opacity: .72;
}

.login-copy > * {
    position: relative;
    z-index: 1;
}

.login-copy h1 {
    font-size: clamp(2.6rem, 5vw, 4.75rem);
    line-height: .98;
    margin: 20px 0 16px;
    max-width: 620px;
    letter-spacing: 0;
    color: #ffffff;
}

.login-copy p {
    color: rgba(255, 255, 255, .78);
    font-size: 1.08rem;
    max-width: 590px;
    margin: 0;
}

.login-copy::after {
    content: none;
}

.login-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.login-highlights span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 8px 11px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
    font-weight: 850;
    color: #ffffff;
}

.auth-showcase {
    display: grid;
    gap: 14px;
    margin-top: 30px;
    padding: 18px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .08));
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 22px 46px rgba(0, 0, 0, .22);
    backdrop-filter: blur(10px);
}

.auth-showcase-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-showcase-head strong {
    font-size: 1.08rem;
}

.auth-showcase-head span {
    color: rgba(255, 255, 255, .66);
    font-size: .82rem;
    font-weight: 800;
}

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

.auth-showcase-grid span {
    min-height: 74px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .7);
    font-size: .8rem;
    font-weight: 800;
}

.auth-showcase-grid strong {
    display: block;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
}

.auth-showcase-row {
    display: grid;
    grid-template-columns: .32fr 1fr;
    gap: 10px;
}

.auth-showcase-row span {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
}

.auth-showcase-row span:last-child {
    background: linear-gradient(90deg, var(--accent), var(--primary-strong));
}

.auth-showcase-row.short {
    grid-template-columns: .48fr .72fr;
}

.auth-showcase.security .auth-showcase-row span:last-child {
    background: linear-gradient(90deg, var(--success), var(--primary-strong));
}

.login-card {
    position: relative;
    padding: 32px;
    display: grid;
    gap: 16px;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--primary) 20%, var(--line));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 98%, #fff), var(--surface)),
        var(--surface);
    box-shadow: 0 30px 70px rgba(18, 42, 60, .18), 0 2px 0 rgba(255, 255, 255, .9) inset;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
}

.login-card h2 {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.06;
}

.login-card input {
    min-height: 48px;
    background: color-mix(in srgb, var(--surface) 92%, var(--surface-2));
}

.login-card .button {
    min-height: 48px;
}

.login-stack { display: grid; gap: 16px; }
.form-note { margin: 0; color: var(--muted); font-size: .85rem; }
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 700;
}
.checkbox-row input {
    width: auto;
    margin-top: 4px;
    flex: 0 0 auto;
}

.custom-field-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 8%, transparent), transparent 70%),
        color-mix(in srgb, var(--surface-2) 70%, var(--surface));
}

.custom-field-toolbar small {
    color: var(--muted);
    font-weight: 750;
}

.landing-page {
    width: min(1240px, 100%);
    display: grid;
    gap: 0;
}

.landing-page section[id] {
    scroll-margin-top: 86px;
}

.landing-nav {
    position: sticky;
    z-index: 40;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 72px;
    padding: 12px 4px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    backdrop-filter: blur(16px);
}

.landing-brand,
.landing-nav-actions,
.landing-cta-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-brand > span:last-child {
    display: grid;
    line-height: 1.05;
}

.landing-brand small {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.landing-nav-links a {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}

.landing-nav-links a:hover {
    color: var(--primary);
}

.landing-nav-actions form {
    margin: 0;
}

.landing-hero {
    min-height: min(720px, calc(100vh - 72px));
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: 52px;
    align-items: center;
    padding: 56px 4px 70px;
    border-bottom: 1px solid var(--line);
}

.landing-hero-copy {
    width: 100%;
    color: var(--text);
}

.landing-hero h1 {
    max-width: 670px;
    margin: 18px 0;
    font-size: clamp(3rem, 5.3vw, 5.2rem);
    line-height: .98;
}

.landing-hero-lead {
    max-width: 620px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 1.16rem;
    line-height: 1.7;
}

.launch-pill {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary);
    font-weight: 900;
    text-transform: uppercase;
    font-size: .78rem;
}

.landing-main-cta {
    min-width: 150px;
}

.landing-cta-row form {
    margin: 0;
}

.landing-hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 22px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.landing-hero-notes span {
    position: relative;
    padding-left: 16px;
}

.landing-hero-notes span::before {
    position: absolute;
    left: 0;
    color: var(--success);
    content: "\2713";
    font-weight: 900;
}

.landing-hero-preview {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #123444;
    box-shadow: 0 28px 60px rgba(20, 52, 68, .2);
    transform: perspective(1400px) rotateY(-2deg) rotateX(1deg);
}

.landing-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    background: #0f5268;
    color: #ffffff;
    font-size: .76rem;
}

.landing-preview-bar span {
    color: #cde5ed;
}

.landing-hero-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.landing-proof {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
}

.landing-proof div {
    display: grid;
    gap: 5px;
    padding: 24px 22px;
    border-right: 1px solid var(--line);
}

.landing-proof div:last-child {
    border-right: 0;
}

.landing-proof strong {
    font-size: 1rem;
}

.landing-proof span {
    color: var(--muted);
    font-size: .82rem;
}

.landing-section,
.landing-pricing,
.landing-faq {
    display: grid;
    gap: 30px;
    padding: 76px 4px;
    border-bottom: 1px solid var(--line);
}

.landing-section-heading {
    max-width: 780px;
}

.landing-section-heading h2,
.landing-workflow h2,
.landing-security h2,
.landing-signup h2 {
    margin: 5px 0 12px;
    font-size: clamp(2rem, 3.3vw, 3.15rem);
    line-height: 1.08;
}

.landing-section-heading > p:last-child,
.landing-workflow-copy > p,
.landing-signup-copy > p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.landing-capability-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.landing-capability-list article {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    padding: 28px 26px 28px 0;
    border-bottom: 1px solid var(--line);
}

.landing-capability-list article:nth-child(odd) {
    padding-right: 34px;
    border-right: 1px solid var(--line);
}

.landing-capability-list article:nth-child(even) {
    padding-left: 34px;
}

.landing-capability-number {
    color: var(--primary);
    font-size: .74rem;
    font-weight: 900;
}

.landing-capability-list h3 {
    margin: 0 0 7px;
    font-size: 1.18rem;
}

.landing-capability-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.landing-workflow {
    display: grid;
    grid-template-columns: .78fr 1.22fr;
    gap: 64px;
    align-items: start;
    padding: 76px 48px;
    background: #103847;
    color: #ffffff;
}

.landing-workflow .eyebrow {
    color: #74c6dc;
}

.landing-workflow-copy > p {
    margin-bottom: 22px;
    color: #c8dce4;
}

.landing-workflow-steps {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.landing-workflow-steps li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.landing-workflow-steps li > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    color: #103847;
    font-weight: 900;
}

.landing-workflow-steps strong {
    font-size: 1.04rem;
}

.landing-workflow-steps p {
    margin: 3px 0 0;
    color: #c8dce4;
}

.landing-role-band {
    display: grid;
    grid-template-columns: .62fr 1.38fr;
    gap: 50px;
    padding: 72px 4px;
    border-bottom: 1px solid var(--line);
}

.landing-role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.landing-role-grid div {
    display: grid;
    gap: 7px;
    padding: 22px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.landing-role-grid div:nth-child(even) {
    border-right: 0;
}

.landing-role-grid span {
    color: var(--muted);
    line-height: 1.55;
}

.landing-price-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.landing-price-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 18px;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--primary);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.landing-price-card.featured {
    border-top-color: var(--warning);
    box-shadow: 0 16px 36px color-mix(in srgb, var(--primary) 18%, transparent);
}

.landing-price-card.enterprise {
    border-top-color: var(--success);
}

.landing-price-card h3 {
    margin: 4px 0 8px;
    font-size: 1.3rem;
}

.landing-price-card p {
    margin: 0;
    color: var(--muted);
}

.price-card-label {
    position: absolute;
    top: -14px;
    right: 12px;
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--warning);
    color: #172033;
    font-size: .7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.landing-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.landing-price strong {
    font-size: 2.25rem;
    line-height: 1;
}

.landing-price span {
    color: var(--muted);
    font-weight: 700;
}

.landing-price-card ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.landing-price-card > .button {
    align-self: end;
}

.landing-price-card li::marker {
    color: var(--primary);
}

.landing-pricing-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-left: 4px solid var(--primary);
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.landing-pricing-note div {
    display: flex;
    gap: 8px;
}

.landing-pricing-note span,
.landing-pricing-note a {
    color: var(--muted);
}

.landing-pricing-note a {
    font-weight: 900;
    color: var(--primary);
}

.landing-security {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 52px;
    padding: 64px 48px;
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
    border-top: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
}

.landing-security-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: center;
}

.landing-security-points span {
    position: relative;
    padding: 12px 12px 12px 32px;
    border-bottom: 1px solid var(--line);
    font-weight: 750;
}

.landing-security-points span::before {
    position: absolute;
    left: 9px;
    color: var(--success);
    content: "\2713";
    font-weight: 900;
}

.landing-faq {
    grid-template-columns: .5fr 1.5fr;
    gap: 54px;
}

.landing-faq-list {
    border-top: 1px solid var(--line);
}

.landing-faq details {
    border-bottom: 1px solid var(--line);
}

.landing-faq summary {
    position: relative;
    padding: 20px 42px 20px 0;
    cursor: pointer;
    font-size: 1.02rem;
    font-weight: 850;
    list-style: none;
}

.landing-faq summary::-webkit-details-marker {
    display: none;
}

.landing-faq summary::after {
    position: absolute;
    top: 18px;
    right: 8px;
    color: var(--primary);
    content: "+";
    font-size: 1.35rem;
}

.landing-faq details[open] summary::after {
    content: "\2212";
}

.landing-faq details p {
    margin: -4px 40px 20px 0;
    color: var(--muted);
    line-height: 1.65;
}

.landing-signup {
    display: grid;
    grid-template-columns: .75fr 1.25fr;
    gap: 70px;
    align-items: center;
    padding: 76px 48px;
    background: #e2f0f3;
    border-bottom: 1px solid var(--line);
}

.landing-signup-copy ul {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.landing-signup-copy li {
    position: relative;
    padding-left: 23px;
    font-weight: 750;
}

.landing-signup-copy li::before {
    position: absolute;
    left: 0;
    color: var(--success);
    content: "\2713";
    font-weight: 900;
}

.landing-register-card {
    width: 100%;
    max-width: none;
    margin: 0;
}

.landing-register-card h3 {
    margin: 2px 0 0;
    font-size: 1.45rem;
}

.landing-footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 34px 4px 24px;
}

.landing-footer p {
    color: var(--muted);
}

.landing-footer > div {
    display: flex;
    gap: 18px;
    font-size: .86rem;
    font-weight: 800;
}

.landing-footer > small {
    grid-column: 1 / -1;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.register-panel {
    align-items: start;
}

.request-page {
    width: min(900px, 100%);
    display: grid;
    gap: 22px;
}

.request-heading {
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 8px;
}

.request-heading h1,
.request-success h1 {
    font-size: clamp(2rem, 6vw, 3.4rem);
}

.request-heading p,
.request-success p {
    color: var(--muted);
    margin: 0;
}

.request-card {
    width: 100%;
}

.request-success {
    justify-items: center;
    text-align: center;
    width: min(560px, 100%);
    margin: 0 auto;
}

.tech-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.tech-hero h2 { font-size: 1.8rem; }

.tech-hero-actions,
.tech-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tech-filter-bar {
    padding: 0 2px;
}

.tech-sync-alert[hidden] {
    display: none;
}

.mobile-work-list,
.request-list {
    display: grid;
    gap: 14px;
}

.mobile-work-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.mobile-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.mobile-card-head small,
.mobile-meta {
    color: var(--muted);
}

.mobile-work-card p { margin: 0; }

.mobile-meta,
.quick-actions,
.approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-actions form { flex: 1 1 110px; }

.quick-actions .button,
.approval-actions .button {
    width: 100%;
}

.tech-quick-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    overflow: hidden;
}

.tech-quick-panel summary {
    cursor: pointer;
    padding: 11px 12px;
    font-weight: 900;
}

.tech-quick-panel form {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}

.tech-labor-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 8px;
}

.tech-work-hero small {
    color: var(--muted);
    display: block;
    margin-top: 4px;
}

.tech-work-layout {
    align-items: start;
}

.tech-work-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.tech-checklist .checkbox-row {
    align-items: flex-start;
    padding: 8px;
    border-radius: 6px;
    background: var(--surface);
}

.tech-signature-pad {
    width: 100%;
    max-width: 100%;
    height: 160px;
}

@media (max-width: 760px) {
    .tech-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .tech-work-status {
        grid-template-columns: 1fr;
    }
}

.approval-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.approval-actions form {
    display: grid;
    gap: 8px;
}

.qr-label-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.qr-label {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 128px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.qr-label strong,
.qr-label span,
.qr-label small {
    display: block;
}

.qr-label span,
.qr-label small {
    color: var(--muted);
}

.barcode {
    width: 150px;
    max-width: 100%;
    height: 34px;
    margin-top: 6px;
}

.text-danger {
    color: var(--danger);
}

.log-viewer {
    max-height: 360px;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0e1420;
    color: #e5edf7;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .82rem;
    white-space: pre-wrap;
}

.work-order-activity {
    display: grid;
    gap: 12px;
}

.activity-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, white), var(--surface));
    box-shadow: 0 12px 30px rgba(25, 38, 55, .08);
}

.activity-dot {
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 14%, transparent);
}

.activity-item.requester .activity-dot { background: #0ea5e9; }
.activity-item.labor .activity-dot { background: #f59e0b; }
.activity-item.material .activity-dot { background: #10b981; }
.activity-item.complete .activity-dot { background: #22c55e; }
.activity-item.internal .activity-dot { background: #8b5cf6; }
.activity-item.pm .activity-dot { background: #14b8a6; }
.activity-item.inspection .activity-dot { background: #6366f1; }
.activity-item.transfer .activity-dot { background: #64748b; }
.activity-item.file .activity-dot { background: #0ea5e9; }
.activity-item.work .activity-dot { background: #f59e0b; }

.activity-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.activity-item span,
.activity-item small {
    color: var(--muted);
}

.activity-item p {
    margin: 8px 0 0;
}

.asset-health-grid .metric-card strong {
    letter-spacing: 0;
}

.asset-timeline {
    display: grid;
    gap: 12px;
}

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

.metric-card.danger { border-top-color: var(--danger); }
.metric-card.warning { border-top-color: #f59e0b; }
.metric-card.critical { border-top-color: #7c3aed; }

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

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

.template-help-grid article {
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary) 7%, transparent), transparent 70%),
        color-mix(in srgb, var(--surface-2) 68%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.template-help-grid strong {
    display: block;
    color: color-mix(in srgb, var(--text) 84%, var(--primary));
}

.template-help-grid p {
    margin: 6px 0 0;
    color: var(--muted);
}

.template-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(25, 38, 55, .1);
}

.template-card h3 {
    margin: 10px 0 4px;
}

.template-empty {
    border-style: dashed;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, transparent), transparent 52%),
        var(--surface);
}

.portal-page {
    width: min(1160px, 100%);
}

.portal-shell {
    display: grid;
    grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
    gap: 22px;
    align-items: start;
}

.portal-intro,
.portal-card,
.portal-success {
    border: 1px solid color-mix(in srgb, var(--line) 72%, #fff);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-lift);
}

.portal-intro {
    position: sticky;
    top: 22px;
    display: grid;
    gap: 14px;
    padding: 24px;
    overflow: hidden;
}

.portal-intro::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
}

.portal-intro h1,
.portal-success h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
}

.portal-intro p,
.portal-success p {
    margin: 0;
    color: var(--muted);
}

.portal-note {
    display: grid;
    gap: 6px;
    padding: 13px;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.portal-note p {
    font-size: .94rem;
}

.portal-steps {
    display: grid;
    gap: 10px;
}

.portal-steps div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
}

.portal-steps span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    grid-row: span 2;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 14%, var(--surface));
    color: var(--primary);
    font-weight: 900;
}

.portal-steps small,
.portal-timeline small {
    color: var(--muted);
}

.portal-card {
    padding: 24px;
}

.portal-success {
    width: min(560px, 100%);
    margin: 0 auto;
    padding: 28px;
    text-align: center;
}

.status-shell {
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
}

.portal-timeline {
    display: grid;
    gap: 10px;
}

.portal-timeline article {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-2) 68%, var(--surface));
}

.portal-timeline span {
    color: var(--primary);
    font-size: .78rem;
    font-weight: 900;
}

.detail-list.compact {
    gap: 8px;
}

.request-status-hero {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.request-status-hero strong {
    display: block;
    font-size: 1.25rem;
}

.request-status-hero p {
    margin-bottom: 0;
    color: var(--muted);
}

.request-status-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.request-status-steps div {
    display: grid;
    gap: 6px;
    color: var(--muted);
}

.request-status-steps span {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: var(--line);
}

.request-status-steps .done span {
    background: var(--primary);
}

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

.completion-readiness article,
.closeout-steps > div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 94%, var(--primary));
}

.completion-readiness span,
.closeout-steps small {
    color: var(--muted);
}

.completion-readiness strong {
    display: block;
    margin-top: 4px;
    font-size: 1.15rem;
}

.closeout-steps {
    display: grid;
    gap: 10px;
}

.closeout-steps > div {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 10px;
}

.closeout-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--line);
    font-weight: 900;
}

.closeout-steps .done span {
    background: var(--primary);
    color: white;
}

.print-sheet {
    color: #111827;
}

@media print {
    body { background: #fff; }
    .sidebar, .topbar, .no-print { display: none !important; }
    .app-shell { display: block; }
    .content { padding: 0; }
    .panel, .metric-card { box-shadow: none; break-inside: avoid; }
    .grid-two { grid-template-columns: 1fr 1fr; }
    .qr-label-sheet { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .qr-label { box-shadow: none; break-inside: avoid; color: #000; }
    .print-sheet table { width: 100%; border-collapse: collapse; }
    .print-sheet th, .print-sheet td { border: 1px solid #d1d5db; padding: 6px; }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform .2s ease;
        z-index: 30;
        width: min(300px, 88vw);
    }
    .sidebar.open { transform: translateX(0); }
    .mobile-only { display: inline-flex; }
    .topbar { align-items: flex-start; }
    .top-actions { flex-wrap: wrap; justify-content: flex-end; }
    .global-search { order: 3; max-width: none; width: 100%; flex-basis: 100%; }
    .stat-grid, .grid-two, .grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-stat-grid {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    .calendar-stat-grid .metric-card {
        min-width: 130px;
        scroll-snap-align: start;
    }
    .calendar-layout {
        grid-template-columns: 1fr;
    }
    .calendar-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .schedule-buckets {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .sla-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-stat-row {
        grid-template-columns: repeat(var(--dashboard-stat-count, 6), minmax(150px, 1fr));
    }
    .portal-shell,
    .status-shell {
        grid-template-columns: 1fr;
    }
    .portal-intro {
        position: relative;
        top: auto;
    }
}

.app-version {
    display: block;
    margin: auto 18px 16px;
    color: rgba(255, 255, 255, .68);
    font-size: .72rem;
}

.readiness-nav {
    position: sticky;
    top: 8px;
    z-index: 4;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 0 0 16px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.readiness-nav a {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.readiness-nav a:hover { background: var(--surface-2); }
.readiness-section { scroll-margin-top: 80px; }

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

.readiness-check {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--success);
    border-radius: 7px;
    background: var(--surface-2);
}

.readiness-check.fail { border-left-color: var(--danger); }
.readiness-check > span { color: var(--success); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.readiness-check.fail > span { color: var(--danger); }
.readiness-check small { color: var(--muted); }

.readiness-error-list { display: grid; gap: 10px; }
.readiness-error {
    display: grid;
    gap: 9px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line));
    border-radius: 7px;
    background: color-mix(in srgb, var(--danger) 4%, var(--surface));
}
.readiness-error.resolved { opacity: .72; border-color: var(--line); background: var(--surface-2); }
.readiness-error code { overflow-wrap: anywhere; white-space: pre-wrap; color: var(--text); }
.readiness-error form input { min-width: 220px; }
.readiness-form { align-content: start; }
.deployment-checklist { display: grid; gap: 10px; }
.deployment-checklist > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}
.deployment-checklist ol { margin: 8px 0 12px; padding-left: 22px; color: var(--muted); line-height: 1.75; }

.maintenance-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg);
}
.maintenance-page section {
    width: min(620px, 100%);
    padding: 44px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--primary);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.maintenance-page h1 { margin: 8px 0 12px; font-size: clamp(2rem, 8vw, 4rem); }
.maintenance-page p { color: var(--muted); font-size: 1.08rem; line-height: 1.6; }

@media (max-width: 900px) {
    .readiness-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .help-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .help-guide { grid-template-columns: 1fr; }
    .help-guide:nth-child(even) .help-guide-copy { order: initial; }
    .landing-nav-links { display: none; }
    .landing-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 34px;
    }
    .landing-hero-copy { max-width: 760px; }
    .landing-hero-preview { transform: none; }
    .landing-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .landing-proof div:nth-child(2) { border-right: 0; }
    .landing-proof div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .landing-role-band,
    .landing-faq,
    .landing-security {
        grid-template-columns: 1fr;
    }
    .landing-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .readiness-check-grid { grid-template-columns: 1fr; }
    .readiness-error form { align-items: stretch; }
    .readiness-error form input { min-width: 0; width: 100%; }
    .help-hero, .help-role-grid, .help-answer-grid { grid-template-columns: 1fr; }
    .help-hero { padding: 20px; }
    .help-guide { padding: 12px; }
    .guest-body {
        align-items: start;
        padding: 18px;
        background: color-mix(in srgb, var(--bg) 82%, #ffffff);
    }
    .guest-body::before {
        inset: 8px;
    }
    .content, .topbar { padding: 18px; }
    .stat-grid, .grid-two, .grid-three, .form-grid, .login-panel { grid-template-columns: 1fr; }
    .sla-summary-grid,
    .completion-readiness,
    .request-status-steps,
    .template-help-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-stat-row {
        grid-template-columns: repeat(var(--dashboard-stat-count, 6), minmax(140px, 72vw));
        grid-auto-columns: minmax(140px, 72vw);
    }
    .asset-summary { grid-template-columns: 1fr; }
    .topbar { flex-wrap: wrap; }
    .top-actions { width: 100%; justify-content: space-between; }
    .global-search { order: 2; }
    .user-chip { flex: 1; }
    .filters, .filters input, .filters select, .table-toolbar .button { width: 100%; }
    .calendar-filter-grid {
        grid-template-columns: 1fr;
    }
    .calendar-filter-actions,
    .calendar-filter-actions .button {
        width: 100%;
    }
    .danger-zone-grid {
        grid-template-columns: 1fr;
    }
    .setup-step {
        grid-template-columns: 1fr;
    }
    .calendar-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .calendar-layout {
        display: block;
    }
    .calendar-month-panel {
        margin-bottom: 16px;
    }
    .schedule-buckets {
        grid-template-columns: 1fr;
    }
    .schedule-buckets .agenda-card-side {
        justify-items: start;
        white-space: normal;
    }
    .mobile-agenda-panel {
        display: block;
    }
    .mobile-agenda-panel .agenda-card {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .mobile-agenda-panel .agenda-card-side {
        grid-column: 2;
        justify-items: start;
        white-space: normal;
    }
    .toggle-grid { grid-template-columns: 1fr; }
    .upload-form { grid-template-columns: 1fr; }
    .attachment-card { grid-template-columns: 72px minmax(0, 1fr); }
    .attachment-card img, .file-tile { width: 72px; height: 56px; }
    .actions-row { flex-direction: column-reverse; }
    .actions-row .button { width: 100%; }
    .support-banner, .billing-banner { align-items: stretch; flex-direction: column; }
    .upgrade-callout {
        align-items: stretch;
        flex-direction: column;
    }
    .upgrade-callout .button,
    .plan-card .button {
        width: 100%;
    }
    .login-panel {
        gap: 18px;
    }
    .login-copy {
        min-height: 0;
        padding: 22px;
    }
    .login-copy h1 {
        font-size: 2.35rem;
    }
    .login-copy p {
        font-size: 1rem;
    }
    .login-copy::after {
        display: none;
    }
    .auth-showcase {
        display: none;
    }
    .login-card {
        padding: 22px;
    }
    .login-highlights {
        margin-top: 16px;
    }
    .login-highlights span {
        flex: 1 1 150px;
        min-height: 34px;
    }
    .dashboard-command {
        align-items: stretch;
        flex-direction: column;
    }
    .dashboard-command .button {
        width: 100%;
    }
    .tab-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tab-button {
        width: 100%;
        padding: 10px 8px;
    }
    .landing-nav {
        position: static;
        flex-wrap: wrap;
        min-height: 0;
        padding: 10px 0 14px;
    }
    .landing-brand { width: auto; }
    .landing-nav-actions {
        width: auto;
        margin-left: auto;
    }
    .landing-nav-actions form { display: none; }
    .landing-nav-actions .button { width: auto; }
    .landing-cta-row {
        align-items: stretch;
        flex-direction: column;
    }
    .landing-cta-row form,
    .landing-cta-row .button { width: 100%; }
    .landing-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 28px;
        padding: 38px 0 42px;
    }
    .landing-hero h1 {
        font-size: 2.75rem;
    }
    .landing-hero-lead { font-size: 1.02rem; }
    .landing-hero-notes {
        display: grid;
        gap: 8px;
    }
    .landing-preview-bar {
        align-items: flex-start;
        flex-direction: column;
    }
    .landing-proof,
    .landing-capability-list,
    .landing-workflow,
    .landing-role-band,
    .landing-role-grid,
    .landing-security,
    .landing-security-points,
    .landing-faq,
    .landing-signup {
        grid-template-columns: 1fr;
    }
    .landing-proof div {
        padding: 18px 4px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .landing-section,
    .landing-pricing,
    .landing-faq,
    .landing-role-band {
        padding: 52px 0;
    }
    .landing-capability-list article,
    .landing-capability-list article:nth-child(odd),
    .landing-capability-list article:nth-child(even) {
        grid-template-columns: 38px 1fr;
        padding: 22px 0;
        border-right: 0;
    }
    .landing-workflow,
    .landing-security,
    .landing-signup {
        gap: 34px;
        padding: 48px 22px;
    }
    .landing-role-grid div,
    .landing-role-grid div:nth-child(even) {
        padding: 19px 0;
        border-right: 0;
    }
    .landing-price-grid {
        grid-template-columns: 1fr;
    }
    .landing-pricing-note {
        align-items: flex-start;
        flex-direction: column;
    }
    .landing-pricing-note div {
        align-items: flex-start;
        flex-direction: column;
    }
    .landing-faq {
        gap: 24px;
    }
    .landing-faq details p {
        margin-right: 0;
    }
    .landing-footer {
        grid-template-columns: 1fr;
        justify-items: start;
    }
    .landing-footer p {
        margin: 0;
    }
    .landing-footer > div {
        flex-wrap: wrap;
    }
    .landing-footer > small {
        grid-column: auto;
        width: 100%;
    }
    .guest-body {
        padding: 14px;
        place-items: start center;
        background: color-mix(in srgb, var(--bg) 82%, #ffffff);
    }
    .portal-intro,
    .portal-card,
    .portal-success {
        padding: 18px;
    }
    .portal-intro h1,
    .portal-success h1 {
        font-size: 2.05rem;
    }
    .approval-actions { grid-template-columns: 1fr; }
    .mobile-card-head { align-items: flex-start; }
    .table-wrap {
        overflow: visible;
    }
    .table-wrap table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 10px;
    }
    .table-wrap thead {
        display: none;
    }
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td {
        display: block;
        width: 100%;
    }
    .table-wrap tr {
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: 0 8px 24px rgba(25, 38, 55, .06);
    }
    .table-wrap td {
        display: grid;
        grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 8px 4px;
        border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
        overflow-wrap: anywhere;
    }
    .table-wrap td:last-child {
        border-bottom: 0;
    }
    .table-wrap td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .72rem;
        font-weight: 900;
        text-transform: uppercase;
    }
    .table-wrap td[data-label=""] {
        display: block;
    }
    .table-wrap td[data-label=""]::before {
        content: none;
    }
    .table-wrap td.empty {
        display: block;
        text-align: center;
    }
    .table-wrap td.empty::before {
        content: none;
    }
    .table-wrap .inline-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
    .table-wrap .inline-actions .button,
    .table-wrap .inline-actions form,
    .table-wrap .inline-actions form .button {
        width: 100%;
    }
    .table-wrap input[type="checkbox"] {
        width: auto;
        justify-self: start;
    }
    .calendar-grid {
        display: grid;
        grid-template-columns: 1fr;
        border: 0;
        background: transparent;
        gap: 10px;
    }
    .calendar-weekday { display: none; }
    .calendar-day {
        min-height: auto;
        border: 1px solid var(--line);
        border-radius: 8px;
    }
    .calendar-events {
        gap: 8px;
    }
    .calendar-event {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .calendar-day.muted.no-events { display: none; }
}
