:root {
    --bg: #f4f6f8;
    --surface: #fff;
    --soft: #f8f9fb;
    --text: #172634;
    --muted: #667788;
    --border: #dce3e8;
    --accent: #356b91;
    --accent-dark: #294f6b;
    --accent-soft: #eff4f7;
    --accent-border: #cbd9e2;
    --navy: #081521;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --warning: #a15c07;
    --warning-bg: #fff7e6;
    --ok: #0f6b3d;
    --ok-bg: #edfdf3;
}

/* Fahrzeuge */
.vehicle-metrics .admin-metric-card strong { font-size: 26px; }
.vehicle-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.vehicle-card { display: grid; grid-template-rows: 170px auto; min-width: 0; overflow: hidden; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 9px; transition: transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.vehicle-card:hover { transform: translateY(-2px); border-color: var(--accent-border); box-shadow: 0 12px 28px rgba(20,34,42,.1); }
.vehicle-card-media { display: flex; align-items: center; justify-content: center; overflow: hidden; background: #edf2f5; }
.vehicle-card-media img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-placeholder { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; color: var(--accent); background: #fff; border: 1px solid var(--accent-border); border-radius: 50%; }
.vehicle-placeholder svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vehicle-card-body { display: grid; gap: 7px; padding: 15px; }
.vehicle-card-body .status { justify-self: start; }
.vehicle-card-body > strong { font-size: 18px; }
.vehicle-card-body small,.vehicle-card-body > span:last-child { color: var(--muted); }
.vehicle-list-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:22px 0 12px}.vehicle-list-heading h2{margin:0}.vehicle-list-heading p{margin:4px 0 0}.vehicle-table-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.vehicle-table-panel{min-width:0;margin-bottom:0}.vehicle-list-table{min-width:690px}.vehicle-list-table th{white-space:nowrap}.vehicle-list-table td{vertical-align:middle}.vehicle-list-table td:first-child{min-width:190px}.vehicle-list-table td a{display:grid;gap:3px;color:var(--text)}.vehicle-list-table td small{display:block;color:var(--muted);font-size:11px;white-space:nowrap}.vehicle-click-row{cursor:pointer;transition:background .14s ease}.vehicle-click-row:hover,.vehicle-click-row:focus-visible{background:var(--accent-soft);outline:none}
.vehicle-license-plate{display:inline-flex;align-items:stretch;min-width:104px;height:30px;overflow:hidden;border:2px solid #16191c;border-radius:5px;background:linear-gradient(180deg,#fff 0%,#f5f6f7 100%);color:#111;box-shadow:inset 0 0 0 1px rgba(255,255,255,.8),0 1px 2px rgba(10,24,35,.12);vertical-align:middle;white-space:nowrap}.vehicle-license-eu{display:flex;width:20px;flex:0 0 20px;flex-direction:column;align-items:center;justify-content:center;background:#064da5;color:#fff;line-height:1}.vehicle-license-eu i{color:#ffd33d;font-size:8px;font-style:normal;line-height:8px}.vehicle-license-eu b{margin-top:2px;font-family:Arial,sans-serif;font-size:10px;font-weight:700}.vehicle-license-number{display:flex;flex:1;align-items:center;justify-content:center;padding:0 8px;font-family:"Arial Narrow","DIN Condensed",Arial,sans-serif;font-size:15px;font-weight:800;letter-spacing:1px;line-height:1}.vehicle-plate-empty{color:var(--muted)}
@media(max-width:1100px){.vehicle-table-columns{grid-template-columns:1fr}}
@media(max-width:720px){.vehicle-list-heading{align-items:stretch;flex-direction:column}.vehicle-list-heading .button{width:100%}.vehicle-list-table{min-width:650px}}
.vehicle-master-form { display: grid; gap: 18px; }
.vehicle-master-form fieldset { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0; padding: 18px; border: 1px solid var(--border); border-radius: 9px; }
.vehicle-master-form legend { padding: 0 7px; font-weight: 850; }
.vehicle-master-form .wide { grid-column: 1/-1; }
.vehicle-detail-hero { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 22px; align-items: center; }
.vehicle-detail-hero h2 { margin: 9px 0 3px; font-size: 28px; }
.vehicle-detail-hero p { margin: 0; color: var(--muted); }
.vehicle-ownership { display: grid; gap: 2px; min-width: 190px; padding-left: 20px; border-left: 1px solid var(--border); }
.vehicle-ownership span,.vehicle-ownership small { color: var(--muted); }
.vehicle-ownership strong { font-size: 18px; }
.vehicle-facts { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 0; }
.vehicle-facts > div { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 4px 15px; border-right: 1px solid var(--border); }
.vehicle-facts > div:last-child { border-right: 0; }
.vehicle-facts span,.vehicle-facts small { color: var(--muted); font-size: 12px; }
.vehicle-facts strong { overflow-wrap: anywhere; font-size: 16px; }
.vehicle-photo-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.vehicle-photo-grid figure { margin: 0; overflow: hidden; background: var(--soft); border: 1px solid var(--border); border-radius: 8px; }
.vehicle-photo-grid img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.vehicle-photo-grid figcaption { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; color: var(--muted); font-size: 12px; }
.text-danger { min-height: 0; padding: 0; color: var(--danger); background: transparent; border: 0; font-size: 12px; }
.vehicle-inline-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto; gap: 10px; align-items: end; padding: 14px; background: var(--soft); border: 1px solid var(--border); border-radius: 8px; }
.vehicle-fuel-form .vehicle-inline-form { grid-template-columns: repeat(5,minmax(0,1fr)); }
.vehicle-fuel-form .vehicle-inline-form .wide { grid-column: span 3; }
.vehicle-fuel-form .vehicle-inline-form .check { align-self: center; }
.vehicle-fuel-form .vehicle-inline-form button { justify-self: start; }
.vehicle-history-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.vehicle-timeline { display: grid; gap: 10px; }
.vehicle-timeline article { display: grid; grid-template-columns: 88px minmax(0,1fr) auto auto; gap: 12px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--border); }
.vehicle-timeline time { color: var(--muted); font-size: 12px; font-weight: 800; }
.vehicle-timeline h3 { margin: 5px 0 2px; font-size: 16px; }
.vehicle-timeline p,.vehicle-timeline small { display: block; margin: 0; color: var(--muted); }
.vehicle-timeline.accident article { border-left: 3px solid var(--warning); padding-left: 11px; }
.vehicle-add-details { margin-top: 14px; }
.vehicle-add-details > summary { list-style: none; }
.vehicle-add-details[open] > form { margin-top: 10px; padding: 14px; background: var(--soft); border: 1px solid var(--border); border-radius: 8px; }
.vehicle-plate-list { display: grid; gap: 8px; margin-bottom: 14px; }
.vehicle-plate-list article { display: grid; grid-template-columns: 150px 210px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px 13px; background: var(--soft); border: 1px solid var(--border); border-radius: 7px; }
.vehicle-plate-list article > strong { letter-spacing: .06em; }
.vehicle-plate-list span,.vehicle-plate-list small { color: var(--muted); }
@media(max-width:1100px){.vehicle-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.vehicle-facts{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.vehicle-facts>div{border-right:0}.vehicle-master-form fieldset{grid-template-columns:repeat(2,minmax(0,1fr))}.vehicle-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.vehicle-inline-form,.vehicle-fuel-form .vehicle-inline-form{grid-template-columns:repeat(2,minmax(0,1fr))}.vehicle-fuel-form .vehicle-inline-form .wide{grid-column:1/-1}.vehicle-history-layout{grid-template-columns:1fr}}
@media(max-width:720px){.vehicle-card-grid,.vehicle-master-form fieldset,.vehicle-facts,.vehicle-photo-grid,.vehicle-inline-form,.vehicle-fuel-form .vehicle-inline-form{grid-template-columns:1fr}.vehicle-fuel-form .vehicle-inline-form .wide{grid-column:auto}.vehicle-detail-hero{grid-template-columns:1fr}.vehicle-ownership{padding:12px 0 0;border-left:0;border-top:1px solid var(--border)}.vehicle-timeline article{grid-template-columns:1fr}.vehicle-plate-list article{grid-template-columns:1fr}.vehicle-card{grid-template-rows:150px auto}.vehicle-master-form .wide{grid-column:auto}}

/* Wartungspläne: direkte Anlage und planorientierte Übersicht. */
.maintenance-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.maintenance-plan-card {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 16px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid #8aa0ad;
    border-radius: 9px;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.maintenance-plan-card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 9px 24px rgba(20, 34, 42, .09);
    transform: translateY(-1px);
}
.maintenance-plan-card.is-overdue { border-left-color: var(--danger); }
.maintenance-plan-card.is-due,
.maintenance-plan-card.is-soon { border-left-color: var(--warning); }
.maintenance-plan-card.is-planned { border-left-color: var(--accent); }
.maintenance-plan-card.is-done { opacity: .72; }
.maintenance-plan-card > strong { font-size: 18px; }
.maintenance-plan-card > small { color: var(--muted); }
.maintenance-plan-card-head,
.maintenance-plan-card-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}
.maintenance-plan-card-head .maintenance-state { margin-left: auto; }
.maintenance-plan-card-meta {
    justify-content: space-between;
    padding-top: 9px;
    border-top: 1px solid #e7ecef;
}
.maintenance-create-panel { max-width: 980px; }
.maintenance-create-form { display: grid; gap: 18px; }
.maintenance-create-form fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 9px;
}
.maintenance-create-form legend {
    padding: 0 7px;
    color: var(--text);
    font-size: 15px;
    font-weight: 850;
}
.maintenance-create-form label { min-width: 0; }
.maintenance-create-form .wide { grid-column: 1 / -1; }
.maintenance-inline-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 12px;
    padding: 13px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
}
.maintenance-inline-category[hidden] { display: none; }
.maintenance-create-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.optional {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}
@media (max-width: 760px) {
    .maintenance-plan-grid,
    .maintenance-create-form fieldset,
    .maintenance-inline-category { grid-template-columns: 1fr; }
    .maintenance-plan-card-meta,
    .maintenance-create-actions { align-items: stretch; flex-direction: column; }
    .maintenance-create-actions .button,
    .maintenance-create-actions .primary { width: 100%; justify-content: center; }
}

/* Mobile Werkzeuge: Profil und Logout werden ausschliesslich im Workspace angeboten. */
@media (max-width: 720px) {
    body:not(.portal-page) .topbar .user-chip,
    body:not(.portal-page) .topbar .session-logout-form {
        display: none !important;
    }
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html.matrix-page-lock,
body.matrix-page-lock {
    height: 100vh;
    overflow: hidden;
}
a { color: var(--accent-dark); text-decoration: none; }
.sort-link {
    color: #52616b;
    display: inline-flex;
    align-items: center;
    font-weight: 900;
}
.name-link {
    color: var(--accent-dark);
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.name-link.is-inactive {
    color: #8b99a3;
    opacity: .68;
    font-weight: 800;
}
.count-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 26px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 900;
}
.count-link.warning-count {
    background: var(--warning-bg);
    color: var(--warning);
}
button, input, select, textarea { font: inherit; }
button, .button, .primary {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    cursor: pointer;
}
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.muted-button { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-border); }
.danger { color: var(--danger); background: var(--danger-bg); border-color: #f0c8c3; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, rgba(53,107,145,.07), transparent 44%), #f1f3f5; }
.login-card, .panel, .metrics article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(20,34,42,.05);
}
.login-shell {
    width: min(980px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 20px 24px 62px rgba(20,34,42,.16), 4px 8px 20px rgba(20,34,42,.08);
}
.login-intro {
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: 18px;
    min-height: 520px;
    padding: 42px;
    background: #01040a;
    color: #fff;
}
.login-intro h1 { margin: 0; font-size: 38px; }
.login-intro p { margin: 0 auto; max-width: 420px; color: #d8e4e8; font-size: 17px; }
.security-list { display: grid; gap: 9px; margin-top: 12px; }
.security-list span { padding: 10px 12px; border: 1px solid #33464f; border-radius: 8px; color: #eaf2f4; font-weight: 850; }
.login-card { width: auto; padding: 42px; align-self: center; border: 0; box-shadow: none; }
.login-card h1 { margin: 18px 0 8px; font-size: 28px; }
.login-card h2 { margin: 0 0 8px; font-size: 28px; }
.login-card p, .muted, .hint { color: var(--muted); }
.login-logo {
    width: 420px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.brand-mark {
    width: 34px; height: 34px; border-radius: 7px; background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 900;
}
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { background: #01040a; color: #edf5fb; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: grid; gap: 10px; align-items: center; justify-items: center; text-align: center; padding: 18px 20px; }
.brand[role="link"],
.brand a {
    cursor: pointer;
}
.brand[role="link"]:focus-visible {
    outline: 2px solid #7f9db2;
    outline-offset: -6px;
}
.brand strong { line-height: 1.15; }
.brand-logo {
    width: 210px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.brand > a,
.portal-head a,
.mobile-clock-header > a,
.logo-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
}
.brand > a {
    width: 100%;
    min-height: 86px;
}
.app-shell > .sidebar > .brand > a {
    height: 86px;
    overflow: hidden;
}
.app-shell > .sidebar > .brand .brand-logo {
    width: 270px;
    max-width: none;
    flex: 0 0 auto;
}
.logo-home-link {
    max-width: max-content;
}
.brand-link { color: #fff; }
.brand-link:hover { color: #fff; }
.mobile-tool-menu-toggle { display: none; }
.sidebar nav { display: grid; gap: 4px; padding: 8px 12px; }
.sidebar nav a { color: #b9c7ce; border-radius: 7px; padding: 10px 12px; font-weight: 800; }
.sidebar nav a span { display: block; }
.nav-clock-state {
    display: inline-flex;
    margin-top: 4px;
    min-height: 19px;
    align-items: center;
    border-radius: 999px;
    padding: 0 7px;
    font-size: 11px;
    line-height: 1;
    color: #9fb0b8;
    background: rgba(255,255,255,.06);
}
.nav-clock-state.is-in { color: #7ee0b2; background: rgba(126, 224, 178, .12); }
.nav-clock-state.is-out { color: #b7c4ca; background: rgba(255,255,255,.055); }
.sidebar nav a.nav-child { margin-left: 14px; padding-left: 16px; font-size: 14px; position: relative; }
.sidebar nav a.nav-child::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 2px; border-radius: 999px; background: #41535c; }
.sidebar nav .nav-section-divider { display: block; height: 1px; margin: 10px 6px 8px; background: rgba(185, 199, 206, .24); }
.sidebar nav a.active, .sidebar nav a:hover { background: #123452; color: #fff; }
.logout { margin: auto 12px 18px; display: grid; gap: 8px; }
.logout button, .logout .portal-back { width: 100%; background: transparent; color: #dce7eb; border-color: #34454d; }
.logout .active-footer-action { background: #123452; color: #fff; }
.logout form { display: none !important; }
.app-footer {
    display: grid;
    gap: 3px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(130, 150, 160, .28);
    color: #81929a;
    font-size: 11px;
    line-height: 1.35;
}
.app-footer a {
    color: #c7d8dd;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.portal-shell > .app-footer {
    margin-top: 22px;
    color: var(--muted);
    text-align: center;
    justify-items: center;
}
.portal-shell > .app-footer a {
    color: var(--accent-dark);
}
.portal-page { min-height: 100vh; background: #f2f4f6; color: var(--text); }
.portal-shell { width: min(1180px, calc(100vw - 36px)); margin: 0 auto; padding: 34px 0; }
.portal-shell.wide-portal { width: min(1720px, calc(100vw - 28px)); }
.portal-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(20,34,42,.05);
}
.portal-brand-row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.portal-logo {
    width: 132px;
    height: auto;
    display: block;
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #172228;
    box-shadow: 0 10px 24px rgba(20,34,42,.12);
}
.portal-head h1 { margin: 0; font-size: 32px; }
.portal-head p { margin: 4px 0 0; color: var(--muted); }
.portal-user { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.portal-user button,
.portal-user-name,
.notification-center summary {
    min-height: 38px;
}
.portal-user button {
    font-weight: 900;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--soft);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}
.portal-action-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.portal-action-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.portal-user > span,
.portal-user-name {
    font-weight: 900;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--soft);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.portal-user form { margin: 0; }
.push-panel {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: -8px 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    background: #f8fafb;
    color: var(--text);
}
.push-panel[hidden] {
    display: none !important;
}
.push-panel-prompt {
    border-left: 3px solid var(--accent);
    box-shadow: 0 8px 22px rgba(21, 37, 45, 0.06);
}
.portal-head > .push-panel-prompt {
    grid-column: 1 / -1;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    width: 100%;
    margin: 2px 0 0;
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.portal-head > .push-panel-prompt .push-panel-icon {
    width: 32px;
    height: 32px;
}
.portal-head > .push-panel-prompt .push-panel-copy {
    gap: 1px;
}
.portal-head > .push-panel-prompt .push-panel-copy span {
    font-size: 13px;
    font-weight: 600;
}
.portal-head > .push-panel-prompt .push-status:empty {
    display: none;
}
.push-panel-settings {
    margin: 18px 0;
    background: #fff;
}
.push-panel-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.push-panel-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.push-panel-copy {
    display: grid;
    gap: 2px;
}
.push-panel-copy span,
.push-panel small {
    color: var(--muted);
    font-weight: 700;
}
.push-panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.push-panel .button {
    white-space: nowrap;
}
.push-panel .button[hidden] {
    display: none !important;
}
.push-panel .push-test-form {
    margin: 0;
}
.push-panel .push-test-form[hidden] {
    display: none !important;
}
.push-status {
    min-width: 170px;
    text-align: right;
}
.push-status.is-error {
    color: var(--danger);
}
.notification-center {
    position: relative;
}
.notification-center summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid #f0c98d;
    border-radius: 7px;
    background: #fff8ec;
    color: #17242b;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(242, 140, 24, .1);
}
.notification-center summary::-webkit-details-marker {
    display: none;
}
.notification-center summary > strong {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f28c18;
    color: #17242b;
    font-size: 12px;
}
.notification-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(360px, calc(100vw - 36px));
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(20,34,42,.18);
}
.notification-menu-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 6px 6px 10px;
    border-bottom: 1px solid var(--border);
}
.notification-menu-head span,
.notification-empty,
.notification-item small {
    color: var(--muted);
}
.notification-empty {
    margin: 10px 6px 6px;
    font-weight: 700;
}
.notification-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 12px;
    padding: 11px 6px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.notification-item:last-child {
    border-bottom: 0;
}
.notification-item span {
    font-weight: 900;
}
.notification-item small {
    grid-column: 1;
    font-weight: 650;
}
.notification-item > strong {
    grid-row: 1 / span 2;
    align-self: center;
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e8f7f3;
    color: var(--accent-dark);
}
.report-mail-panel {
    background: #f7fbfb;
    border-color: #cfe2df;
}
.report-mail-panel .filter-strip {
    margin-bottom: 0;
}
.session-logout-form { margin: 0; }
.session-logout-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    min-height: 38px;
    padding: 8px 12px;
}
.portal-user .session-logout-button {
    background: var(--soft);
}
.session-logout-button .session-logout-label {
    line-height: 1;
}
.session-logout-button .session-logout-label::after {
    content: " -";
    color: var(--muted);
    font-weight: 800;
}
.session-timer {
    display: inline-flex;
    align-items: center;
    margin-left: 0;
    padding: 1px 5px;
    border-radius: 999px;
    background: #edf3f4;
    color: #71808a;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
}
.user-chip .session-timer {
    margin-left: 7px;
}
.session-timer.is-warning {
    color: var(--warning);
    background: var(--warning-bg);
}
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tool-card {
    min-height: 214px;
    display: grid;
    align-content: space-between;
    gap: 20px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(20,34,42,.05);
}
.tool-card h2 { margin: 0 0 8px; font-size: 22px; }
.tool-card p { margin: 0; color: var(--muted); }
.tool-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}
.tool-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #edf7f5;
    color: var(--accent-dark);
    border: 1px solid #d5e0e7;
    flex: 0 0 auto;
}
.tool-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tool-icon-time_records { background: #fff4e7; color: #9b5608; border-color: #f4d4aa; }
.tool-icon-training_db { background: #eef6ff; color: #265f93; border-color: #cee0f0; }
.tool-icon-central_companies { background: #f1f7f0; color: #3b6d38; border-color: #d5e7d1; }
.tool-icon-time_book { background: #fff7e8; color: #8a5b13; border-color: #ead8b8; }
.tool-icon-admin { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-border); }
.tool-icon-inspections { background: #eef8f4; color: #0b6b58; border-color: #cfe6de; }
.tool-featured {
    grid-column: span 2;
    min-height: 236px;
    background: linear-gradient(180deg, #ffffff, #fff8ef);
    color: var(--text);
    border-color: #efd7b7;
    box-shadow: 0 16px 38px rgba(242,140,24,.11);
}
.tool-featured h2 {
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: 0;
}
.tool-featured p,
.tool-featured .portal-time-widget small {
    color: var(--muted);
}
.tool-featured .portal-time-widget {
    background: rgba(255,255,255,.72);
    border-color: #efd7b7;
}
.tool-featured .portal-time-actions .primary {
    background: #f28c18;
    color: #14222a;
    border-color: #f28c18;
}
.tool-card-inspections {
    background: linear-gradient(180deg, #ffffff, #f5fbfa);
}
.portal-time-widget {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
}
.portal-time-widget small {
    color: var(--muted);
    font-weight: 800;
}
.portal-time-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.portal-time-actions form { margin: 0; }
.portal-time-actions .button,
.portal-time-actions .primary {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
}
.portal-time-actions button:disabled {
    cursor: not-allowed;
    opacity: .45;
    filter: grayscale(.35);
}
.portal-clock-out {
    border-color: #f0c8c3;
    background: var(--danger-bg);
    color: var(--danger);
}
.tool-card-time_book {
    gap: 14px;
}
.portal-customer-visit {
    display: grid;
    gap: 10px;
}
.portal-visit-start-form {
    display: grid;
    gap: 9px;
}
.portal-visit-start-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.portal-visit-start-form .combo-select,
.portal-visit-start-form .primary,
.portal-visit-open {
    width: 100%;
}
.portal-visit-running,
.portal-visit-empty {
    display: grid;
    gap: 4px;
    padding: 11px;
    border: 1px solid #efd7b7;
    border-radius: 8px;
    background: #fffaf2;
}
.portal-visit-running > strong {
    font-size: 16px;
}
.portal-visit-running small,
.portal-visit-empty small {
    color: var(--muted);
}
.portal-visit-running-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.portal-visit-running-head > strong {
    color: #8a5b13;
    font-variant-numeric: tabular-nums;
}
.portal-visit-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.portal-visit-actions form,
.portal-visit-actions button {
    width: 100%;
    margin: 0;
}
.portal-visit-pending {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #f1d28f;
    border-radius: 8px;
    background: #fff8e8;
    color: #7a4a00;
    text-decoration: none;
}
.portal-visit-pending span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.customer-visit-tasks {
    border-color: #efd7b7;
}
.customer-visit-task-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.customer-visit-task {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
}
.customer-visit-task.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(53, 107, 145, .10);
}
.customer-visit-task h3,
.customer-visit-task p {
    margin: 0;
}
.customer-visit-task > small {
    color: var(--muted);
}
.customer-visit-task-head,
.customer-visit-task p,
.customer-visit-task-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.customer-visit-task-head > span:first-child,
.customer-visit-task p span {
    color: var(--muted);
    font-size: 12px;
}
.customer-visit-task-actions {
    margin-top: 4px;
}
.customer-visit-task-actions form {
    margin: 0;
}
.customer-visit-task-actions .primary,
.customer-visit-task-actions .button {
    min-height: 34px;
    padding: 7px 10px;
}
.login-helper { margin: 12px 0 0; text-align: center; font-weight: 800; }
.login-helper a { color: var(--accent); }
.login-secondary-form {
    margin-top: 10px;
    display: grid;
}
.tool-ready { border-color: #cedbe4; }
.tool-disabled { opacity: .72; background: #f7f9fa; }
.field-disabled {
    opacity: .55;
}
.field-disabled input,
.field-disabled select,
.field-disabled textarea {
    background: #eef3f4;
    cursor: not-allowed;
}
.tool-pill { display: inline-flex; margin: 0 6px 6px 0; min-height: 24px; border-radius: 999px; padding: 0 9px; align-items: center; font-size: 12px; font-weight: 900; }
.tool-pill.is-muted-tool { color: #87939a; background: #eef1f2; border: 1px dashed #c9d2d6; }
.permission-box { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--soft); }
.soft-divider {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}
.workspace { padding: 28px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.topbar h1 { margin: 0; font-size: 30px; }
.topbar p { margin: 5px 0 0; color: var(--muted); }
.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.quick-entry-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 7px;
    border: 1px solid #e17d0d;
    background: #f28c18;
    color: #17242b;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(242, 140, 24, .18);
}
.quick-entry-button:hover {
    background: #ff9d2e;
    color: #102027;
}
.user-chip { gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 8px 12px; font-weight: 800; display: inline-flex; align-items: center; }
.user-chip .portal-action-icon,
.session-logout-button .portal-action-icon {
    width: 18px;
    height: 18px;
}
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metrics.metrics-compact-row { grid-template-columns: repeat(var(--metric-columns, 4), minmax(0, 1fr)); }
.time-record-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.month-proof-panel { display: grid; gap: 14px; }
.month-proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    gap: 8px;
}
.month-proof-day {
    display: grid;
    min-height: 58px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfc;
    color: var(--muted);
}
a.month-proof-day {
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
a.month-proof-day:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: 0 8px 18px rgba(0, 95, 91, .13);
}
.month-proof-day span {
    font-size: 12px;
    font-weight: 900;
}
.month-proof-day strong {
    color: #53616b;
    font-size: 20px;
    line-height: 1;
}
.month-proof-day.has-entry {
    border-color: #cbd9e2;
    background: #eff4f7;
    color: var(--accent-dark);
}
.month-proof-day.has-entry strong { color: var(--accent-dark); }
.month-proof-day.is-selected {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 2px var(--accent);
}
.month-proof-day.is-weekend { background: #f1f5f6; }
.month-proof-day.has-entry.is-weekend { background: #e8f2ef; }
.metrics article { padding: 18px; }
.metrics span { color: var(--muted); }
.metrics strong { display: block; margin-top: 6px; font-size: 28px; }
.time-book-status-metrics article {
    border-width: 1px;
}
.time-book-status-metrics .status-open {
    border-color: #f2bf75;
    background: #fff5e7;
}
.time-book-status-metrics .status-open span,
.time-book-status-metrics .status-open .count-link {
    color: #9a4f00;
}
.time-book-status-metrics .status-waiting {
    border-color: #d3dde2;
    background: #f5f8f9;
}
.time-book-status-metrics .status-approved {
    border-color: #b8dfc8;
    background: #edf9f2;
}
.time-book-status-metrics .status-approved span,
.time-book-status-metrics .status-approved .count-link {
    color: #116237;
}
.time-book-status-metrics .status-deleted {
    border-color: #efc0bd;
    background: #fff1f0;
}
.time-book-status-metrics .status-deleted span,
.time-book-status-metrics .status-deleted .count-link {
    color: #9b1c1c;
}
.dashboard-hero {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-color: #cddadd;
}
.dashboard-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
}
.dashboard-hero h2 { margin: 0 0 5px; font-size: 23px; }
.dashboard-hero p { margin: 0; color: var(--muted); max-width: 640px; }
.hero-number {
    min-width: 150px;
    padding: 12px 14px;
    border: 1px solid #cfe2df;
    border-radius: 8px;
    background: #eff4f7;
    text-align: right;
}
.hero-number span { display: block; color: var(--accent-dark); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.hero-number strong { display: block; margin-top: 2px; font-size: 34px; line-height: 1; color: var(--accent-dark); }
.hero-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hero-stat {
    display: grid;
    gap: 6px;
    min-height: 78px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--soft);
    color: var(--text);
}
.hero-stat span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.hero-stat strong { font-size: 26px; line-height: 1; }
.hero-stat.danger { border-color: #f0c8c3; background: var(--danger-bg); }
.hero-stat.warning { border-color: #f4d59a; background: var(--warning-bg); }
.hero-stat.ok { border-color: #bde8cc; background: var(--ok-bg); }
.hero-stat.neutral { border-color: #d9e1e5; background: #f3f6f7; }
.dashboard-showcase, .dashboard-lower {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
    gap: 18px;
    align-items: stretch;
}
.donut-panel, .timeline-panel, .service-rank-panel, .inventory-panel { min-height: 100%; }
.donut-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: center; }
.donut-svg {
    width: 180px !important;
    height: 180px !important;
    max-width: 180px !important;
    max-height: 180px !important;
    display: block;
    filter: drop-shadow(0 12px 20px rgba(23,34,40,.08));
}
.donut-layout > .donut-svg {
    grid-column: 1;
    justify-self: center;
}
.donut-panel { overflow: hidden; }
.donut-svg circle { transition: stroke-dashoffset .25s ease, stroke-dasharray .25s ease; }
.donut-total { fill: var(--text); font-size: 34px; font-weight: 900; }
.donut-caption { fill: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-bar-svg {
    width: 100%;
    height: auto;
    max-height: 220px;
    display: block;
}
.bar-track { fill: #edf2f4; }
.bar-label { fill: var(--text); font-size: 13px; font-weight: 850; }
.bar-value { fill: var(--muted); font-size: 14px; font-weight: 900; }
.chart-legend { display: grid; gap: 6px; }
.legend-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 8px;
    border-radius: 7px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-weight: 800;
}
.legend-row:hover { background: var(--soft); }
.legend-row strong { font-size: 18px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.legend-dot.danger-status { background: var(--danger); }
.legend-dot.warning { background: var(--warning); }
.legend-dot.amber { background: #cf7d12; }
.legend-dot.ok { background: var(--ok); }
.legend-dot.neutral { background: #53616b; }
.service-rank-list { display: grid; gap: 12px; }
.service-rank-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
}
.service-rank-row span { font-weight: 850; overflow-wrap: anywhere; }
.service-rank-row strong { color: var(--accent-dark); font-size: 17px; }
.service-rank-row i { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: #edf2f4; overflow: hidden; }
.service-rank-row b { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.split.services-layout {
    grid-template-columns: minmax(0, 1fr) 430px;
}
.service-section {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.service-section-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    background: #f6fafb;
    border-bottom: 1px solid var(--border);
}
.service-section.person .service-section-head { background: #f2f6f8; }
.service-section.asset .service-section-head { background: #fff7eb; }
.service-section-head h3 {
    margin: 0 0 3px;
    font-size: 17px;
}
.service-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.service-section-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--accent-dark);
    font-weight: 900;
}
.service-editor-panel .section-head {
    margin-bottom: 14px;
}
.service-form {
    grid-template-columns: 1fr 1fr;
}
.inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.inventory-grid article { padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--soft); }
.inventory-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; }
.inventory-grid strong { display: block; margin-top: 4px; font-size: 24px; }
.profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.profile-grid article { background: var(--soft); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.profile-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.profile-grid strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.participant-history-edit .panel-head { align-items: start; }
.participant-name-edit { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 10px; min-width: min(560px, 100%); }
.participant-name-edit label,
.participant-history-edit .editable-card label,
.participant-comment-edit label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.participant-name-edit input,
.participant-history-edit .editable-card input,
.participant-history-edit .editable-card select,
.participant-comment-edit textarea { width: 100%; border: 1px solid transparent; background: transparent; padding: 4px 0; color: var(--text); font: inherit; font-weight: 800; }
.participant-history-edit .editable-card select,
.participant-history-edit .editable-card input[type="date"] { margin-top: 2px; }
.participant-history-edit .editable-card:focus-within,
.participant-comment-edit:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53, 107, 145, .10); }
.participant-comment-edit textarea { min-height: 70px; resize: vertical; font-weight: 600; }
.history-groups { display: grid; gap: 16px; }
.history-group {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.history-group-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--soft);
    border-bottom: 1px solid var(--border);
}
.history-group-head h3 { margin: 0; font-size: 16px; }
.history-group-head span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-top: 2px; }
.history-group-head strong { color: var(--accent-dark); white-space: nowrap; }
.history-group table { min-width: 680px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.panel { padding: 18px; min-width: 0; margin-bottom: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 19px; }
.panel h3 { margin: 22px 0 10px; font-size: 15px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}
.soft-card {
    display: grid;
    gap: 5px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
}
.soft-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.soft-card strong {
    color: var(--text);
    font-size: 16px;
}
.soft-card small {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}
.collapsible-panel.is-collapsed .panel-head {
    margin-bottom: 0;
}
.collapsible-panel [hidden] {
    display: none !important;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--soft); color: #52616b; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr.clickable-row,
.clickable-row {
    cursor: pointer;
}
tr.clickable-row:hover td,
.inspection-row-card.clickable-row:hover {
    background: #f3faf9;
}
tr.clickable-row:focus-visible,
.inspection-row-card.clickable-row:focus-visible {
    outline: 2px solid rgba(15, 118, 110, .35);
    outline-offset: -2px;
}
td small { display: block; color: var(--muted); margin-top: 2px; }
.inline-muted { display: inline; color: var(--muted); margin: 0; font-weight: 700; }
.company-subline {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 3px;
}
.company-edit-panel .stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}
.company-edit-panel .stack > label,
.company-edit-panel .stack > .two-col,
.company-edit-panel .stack > .permission-box,
.company-edit-panel .stack > .check,
.company-edit-panel .stack > button {
    min-width: 0;
}
.company-edit-panel textarea,
.company-edit-panel .permission-box { grid-column: span 2; }
.company-master-form {
    display: grid;
    grid-template-columns: minmax(120px, .7fr) repeat(3, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}
.company-master-form > * { min-width: 0; }
.company-master-form .field-small { max-width: 180px; }
.company-master-form .field-wide { grid-column: span 2; }
.company-master-form .field-full { grid-column: 1 / -1; }
.company-master-form textarea { min-height: 88px; }
.company-address-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(95px, .45fr) minmax(115px, .5fr) minmax(180px, 1fr);
    gap: 14px;
    align-items: end;
}
.company-address-row .field-small { max-width: none; }
.company-address-editor {
    display: grid;
    gap: 8px;
}
.address-editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.address-editor-head strong {
    display: block;
    font-size: 12px;
    font-weight: 950;
}
.address-editor-head span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}
.company-address-list {
    display: grid;
    gap: 6px;
}
.company-address-item {
    display: grid;
    grid-template-columns: minmax(120px, .85fr) minmax(170px, 1.35fr) 64px 82px minmax(130px, 1fr) 92px 88px;
    gap: 6px;
    align-items: end;
    padding: 7px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f8fafb;
}
.company-address-item label {
    display: grid;
    gap: 2px;
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.company-address-item input {
    width: 100%;
    min-width: 0;
    min-height: 30px;
}
.company-address-item .danger-button {
    align-self: end;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
}
.detail-list .company-address-detail,
.detail-list .company-address-detail div,
.detail-list .company-address-detail label {
    border: 0;
    background: transparent;
    padding: 0;
}
.detail-list .company-address-detail {
    padding: 8px !important;
    border: 1px solid var(--border);
    background: #fbfdfd;
}
.detail-list .company-address-detail .company-address-item {
    padding: 7px 8px;
    border: 1px solid var(--border);
    background: #f8fafb;
}
.detail-list .company-address-detail input {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 3px 6px;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
}
.detail-list .company-address-detail label:focus-within {
    box-shadow: none;
}
.company-table-panel { margin-top: 18px; }
.company-profile-hero { display: grid; gap: 16px; }
.company-profile-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.company-profile-head h2 {
    margin: 4px 0 8px;
    font-size: 28px;
}
.company-structure-list {
    display: grid;
    gap: 8px;
}
.company-structure-header {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(4, 84px);
    gap: 10px;
    align-items: center;
    padding: 0 12px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.company-structure-main,
.company-structure-cost-center,
.company-structure-empty {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(4, 84px);
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}
.company-structure-main {
    background: #f2f8f7;
    border-color: #cfe2df;
}
.company-structure-main small,
.company-structure-cost-center small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 650;
}
.company-structure-cost-center {
    margin-left: 22px;
    grid-template-columns: minmax(238px, 1fr) repeat(4, 84px);
    background: #f8fafb;
}
.company-structure-cost-center.is-inactive { opacity: .68; }
.company-structure-empty {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--muted);
    font-weight: 750;
    margin-left: 22px;
}
.company-structure-main .count-link,
.company-structure-cost-center .count-link {
    justify-self: start;
}
.company-profile-grid { align-items: start; }
.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.detail-list div,
.detail-list label {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
}
.detail-list label {
    display: grid;
    gap: 4px;
    cursor: text;
}
.detail-list span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    margin-bottom: 2px;
}
.detail-list strong {
    display: block;
    overflow-wrap: anywhere;
}
.editable-detail-list input,
.editable-detail-list textarea,
.editable-detail-list select {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    color: var(--ink);
    outline: none;
}
.editable-detail-list input::placeholder,
.editable-detail-list textarea::placeholder {
    color: #9aa8af;
    font-weight: 750;
}
.editable-detail-list label:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 108, 103, .12);
    background: #fff;
}
.editable-detail-list .company-tool-switches {
    display: grid;
    grid-template-columns: auto repeat(3, max-content);
    align-items: center;
    gap: 7px 12px;
    padding: 8px 10px;
    border-style: dashed;
    background: #fbfdfd;
}
.editable-detail-list .company-tool-switches > strong {
    margin-right: 2px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.editable-detail-list .company-tool-switches > p {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 12px;
}
.editable-detail-list .company-tool-switches .check {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 7px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 850;
}
.editable-detail-list .company-tool-switches .check input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--accent);
}
.detail-wide { grid-column: 1 / -1; }
.company-name-field {
    padding: 10px 12px !important;
}
.company-name-field input {
    font-size: 20px;
    font-weight: 950;
}
.participant-structure-list .company-structure-header,
.participant-structure-list .company-structure-main {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1.2fr) 130px 96px 82px;
}
.participant-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    align-items: stretch;
    gap: 16px;
}
.participant-service-panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.participant-service-mini-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}
.participant-service-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.participant-service-scroll {
    display: grid;
    flex: 1;
    gap: 6px;
    height: clamp(320px, 45vh, 440px);
    min-height: 0;
    max-height: clamp(320px, 45vh, 440px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}
.participant-service-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
    cursor: pointer;
}
.participant-service-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
}
.participant-service-toggle strong,
.participant-service-toggle small {
    display: block;
}
.participant-service-toggle strong {
    font-size: 12px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.participant-service-toggle small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    margin-top: 1px;
}
.participant-service-toggle em {
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}
.participant-service-toggle.is-active em {
    color: #006c67;
    background: #e7f8ee;
}
.participant-service-toggle.is-inactive {
    opacity: .72;
}
.participant-service-toggle.is-inactive em {
    color: #53626d;
    background: #eef2f4;
}
.participant-service-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}
@media (max-width: 1100px) {
    .participant-profile-grid {
        grid-template-columns: 1fr;
    }
    .participant-service-summary {
        justify-content: flex-start;
    }
    .participant-service-scroll {
        max-height: 260px;
    }
}
.tool-usage-grid {
    display: grid;
    gap: 10px;
}
.tool-usage-grid article {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
}
.tool-usage-grid article > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.tool-usage-grid p {
    margin: 8px 0;
    color: var(--muted);
    font-weight: 700;
}
.cost-center-create-box { display: grid; gap: 12px; }
.compact-head { margin-bottom: 0; }
.company-cost-center-rows { display: grid; gap: 10px; }
.company-cost-center-row {
    display: grid;
    grid-template-columns: minmax(110px, .7fr) minmax(180px, 1.15fr) minmax(160px, 1fr) repeat(3, auto) auto;
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}
.company-cost-center-row label { min-width: 0; }
.company-duplicate-list {
    display: grid;
    gap: 10px;
    margin: 12px 0 16px;
}
.company-duplicate-group {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f7fafb;
}
.company-duplicate-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}
.company-duplicate-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.company-duplicate-items {
    display: grid;
    gap: 6px;
}
.company-duplicate-item {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
}
.company-duplicate-item small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 600;
}
.portal-company-table { min-width: 1360px; }
.portal-company-table th, .portal-company-table td { padding: 9px 8px; }
.portal-company-table td:nth-child(4),
.portal-company-table td:nth-child(9),
.portal-company-table td:nth-child(10) { overflow-wrap: anywhere; }
.portal-company-table th:nth-child(1),
.portal-company-table td:nth-child(1),
.portal-company-table th:nth-child(2),
.portal-company-table td:nth-child(2),
.portal-company-table th:nth-child(5),
.portal-company-table td:nth-child(5),
.portal-company-table th:nth-child(6),
.portal-company-table td:nth-child(6),
.portal-company-table th:nth-child(7),
.portal-company-table td:nth-child(7),
.portal-company-table th:nth-child(8),
.portal-company-table td:nth-child(8) { width: 72px; }
.table-section-row td {
    padding: 13px 10px;
    background: #eaf3f2;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cost-center-row td {
    background: #f8fafb;
    border-bottom-color: #e7edf0;
    padding-top: 7px;
    padding-bottom: 7px;
}
.cost-center-row.is-inactive { opacity: .72; }
.cost-center-indent {
    display: block;
    position: relative;
    padding-left: 24px;
}
.cost-center-indent::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 7px;
    width: 10px;
    height: 10px;
    border-left: 2px solid #9fb0b8;
    border-bottom: 2px solid #9fb0b8;
    border-radius: 0 0 0 3px;
}
.cost-center-indent strong { color: #25414b; font-size: 13px; }
.static-count { pointer-events: none; }
.admin-profile-form,
.admin-user-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}
.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.admin-metric-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafb 100%);
    box-shadow: 0 12px 26px rgba(28, 48, 56, .06);
}
.admin-metric-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.admin-metric-card strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 30px;
    line-height: 1;
}
.admin-management-grid {
    display: grid;
    grid-template-columns: minmax(320px, .8fr) minmax(520px, 1.2fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}
.admin-profile-panel,
.admin-editor-panel,
.admin-users-panel {
    box-shadow: 0 14px 34px rgba(28, 48, 56, .07);
}
.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.admin-user-actions .button {
    min-height: 40px;
}
.admin-user-actions .active-action {
    box-shadow: 0 0 0 3px rgba(0, 108, 103, .12);
}
.admin-detail-panel {
    margin-top: 16px;
    border-top: 3px solid rgba(0, 108, 103, .55);
    scroll-margin-top: 18px;
}
.admin-profile-form {
    grid-template-columns: 1fr;
}
.admin-profile-form button {
    justify-self: start;
}
.profile-readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    grid-column: 1 / -1;
}
.profile-readonly-grid div {
    display: grid;
    gap: 5px;
    min-height: 74px;
    align-content: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafb 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
}
.profile-readonly-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.profile-readonly-grid strong {
    display: block;
    color: var(--accent-dark);
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.admin-user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-user-form .admin-permissions { grid-column: 1 / -1; }
.admin-user-form .pill-row { align-self: end; }
.admin-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.admin-tool-license {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    transition: border-color .16s ease, background-color .16s ease;
}
.admin-tool-license.is-on,
.admin-tool-license:has(.admin-tool-toggle input:checked) {
    border-color: rgba(53, 107, 145, .38);
    background: #f3f8fc;
}
.admin-tool-license .admin-tool-toggle {
    border: 0;
    border-radius: 0;
    background: transparent;
}
.admin-tool-license-period {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px 10px;
}
.admin-tool-license-period label {
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}
.admin-tool-license-period input {
    min-width: 0;
    margin-top: 4px;
    padding: 8px;
    font-size: 12px;
}
.admin-tool-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.admin-tool-toggle.is-on {
    border-color: rgba(0, 108, 103, .28);
    background: #f1fbf7;
}
.admin-tool-toggle input {
    margin-top: 3px;
}
.admin-tool-toggle strong,
.admin-tool-toggle small {
    display: block;
}
.admin-tool-toggle strong {
    color: var(--ink);
    font-size: 13px;
}
.admin-tool-toggle small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}
.admin-users-table { min-width: 920px; }
.admin-users-table th, .admin-users-table td { padding: 10px 9px; }
.admin-users-table td:nth-child(5) { min-width: 150px; }
.admin-users-table td {
    vertical-align: top;
}
.admin-users-table .tool-pill {
    margin: 0 4px 5px 0;
}
.admin-tool-count-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 11px;
    border: 1px solid rgba(0, 108, 103, .22);
    border-radius: 7px;
    background: #f0f9f7;
    color: var(--accent-dark);
    cursor: pointer;
    text-align: left;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.admin-tool-count-button:hover,
.admin-tool-count-button:focus-visible {
    border-color: rgba(0, 108, 103, .48);
    background: #e7f6f2;
    box-shadow: 0 0 0 3px rgba(0, 108, 103, .09);
    outline: 0;
}
.admin-tool-count-button strong {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
}
.admin-tool-count-button span {
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}
.admin-detail-dialog {
    width: min(920px, calc(100vw - 32px));
    max-width: none;
    max-height: min(88vh, 860px);
    padding: 0;
    overflow: hidden;
    border: 1px solid #cddadd;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 28px 80px rgba(18, 37, 45, .26);
}
.admin-user-status-dialog {
    width: min(1120px, calc(100vw - 32px));
}
.admin-detail-dialog::backdrop {
    background: rgba(15, 31, 38, .58);
    backdrop-filter: blur(2px);
}
.admin-detail-dialog-shell {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 860px);
}
.admin-detail-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 18px;
    border-bottom: 1px solid var(--border);
    background: #f7fafb;
}
.admin-detail-dialog-head form,
.admin-detail-dialog-footer form {
    margin: 0;
}
.admin-detail-dialog-head > div > span {
    display: block;
    margin-bottom: 4px;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.admin-detail-dialog-head h2,
.admin-detail-dialog-head p {
    margin: 0;
}
.admin-detail-dialog-head h2 {
    font-size: 23px;
    line-height: 1.2;
}
.admin-detail-dialog-head p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}
.admin-detail-dialog-close {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}
.admin-detail-dialog-close:hover,
.admin-detail-dialog-close:focus-visible {
    border-color: rgba(0, 108, 103, .42);
    color: var(--accent-dark);
    outline: 0;
}
.admin-detail-dialog-body {
    flex: 1 1 auto;
    padding: 20px 22px;
    overflow-y: auto;
    background: #fff;
}
.admin-detail-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: #f7fafb;
}
.admin-tool-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.admin-tool-access-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f8fafb;
}
.admin-tool-access-item.is-enabled {
    border-color: rgba(0, 108, 103, .22);
    background: #f0faf7;
}
.admin-tool-access-item.is-disabled {
    color: #75848b;
}
.admin-tool-access-item strong,
.admin-tool-access-item small {
    display: block;
}
.admin-tool-access-item .admin-license-period {
    margin-top: 6px;
    color: var(--accent-dark);
    font-weight: 850;
}

.portal-tools-empty {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed #bdcbd2;
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}
.portal-tools-empty strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 17px;
}
.portal-tools-empty p {
    margin: 0;
}
.admin-tool-access-item strong {
    font-size: 14px;
}
.admin-tool-access-item small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}
.admin-user-status-table {
    min-width: 760px;
}
.admin-user-status-table td {
    vertical-align: middle;
}
.admin-user-status-table td small,
.admin-tool-activity-table td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}
.admin-user-status-table .clickable-row {
    cursor: pointer;
    transition: background-color .15s ease;
}
.admin-user-status-table .clickable-row:hover,
.admin-user-status-table .clickable-row:focus-visible {
    background: #f0f8f7;
    outline: 0;
}
.admin-user-status-table .clickable-row:focus-visible td {
    background: #eaf4f6;
}
.admin-user-status-link {
    display: block;
    color: inherit;
}
.admin-pwa-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.admin-pwa-state::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8998a5;
}
.admin-pwa-state.is-installed {
    color: var(--accent-dark);
}
.admin-pwa-state.is-installed::before {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.admin-status-row-arrow span {
    display: grid;
    place-items: center;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    color: var(--accent-dark);
    font-size: 24px;
    font-weight: 900;
}
.admin-status-overview {
    gap: 10px;
}
.admin-status-overview .admin-metric-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    min-height: 82px;
    padding: 13px 15px;
    box-shadow: 0 7px 18px rgba(28, 48, 56, .045);
}
.admin-status-overview .admin-metric-card > span {
    align-self: end;
}
.admin-status-overview .admin-metric-card > strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    margin: 0;
    color: var(--accent-dark);
    font-size: 27px;
}
.admin-status-overview .admin-metric-card > small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}
.admin-status-panel {
    padding: 0;
    overflow: hidden;
}
.admin-status-panel-head {
    padding: 20px 18px 17px;
    border-bottom: 1px solid var(--border);
}
.admin-status-panel-head h2,
.admin-status-panel-head p {
    margin: 0;
}
.admin-status-panel-head p {
    margin-top: 5px;
}
.admin-status-summary {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.admin-user-status-table th,
.admin-user-status-table td {
    padding: 12px 14px;
}
.admin-user-status-table th:first-child,
.admin-user-status-table td:first-child {
    padding-left: 18px;
}
.admin-user-status-table th:last-child,
.admin-user-status-table td:last-child {
    padding-right: 18px;
}
.admin-user-status-table th:nth-child(1) { width: 29%; }
.admin-user-status-table th:nth-child(2) { width: 23%; }
.admin-user-status-table th:nth-child(3) { width: 25%; }
.admin-user-status-table th:nth-child(4) { width: 20%; }
.admin-user-identity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
.admin-user-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(0, 108, 103, .2);
    border-radius: 50%;
    background: #eaf6f3;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 950;
}
.admin-user-identity > span:last-child {
    min-width: 0;
}
.admin-user-identity strong,
.admin-user-identity small {
    display: block;
}
.admin-user-identity strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-current-state {
    display: grid;
    gap: 6px;
}
.admin-state-line {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #617078;
    font-size: 12px;
    font-weight: 850;
}
.admin-state-line i {
    display: block;
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #aebbc0;
    box-shadow: 0 0 0 3px #eef2f3;
}
.admin-state-line.is-online {
    color: #087145;
}
.admin-state-line.is-online i {
    background: #20a665;
    box-shadow: 0 0 0 3px #e5f7ed;
}
.admin-state-line.is-clocked {
    color: #9a6300;
}
.admin-state-line.is-clocked i {
    background: #e39a1e;
    box-shadow: 0 0 0 3px #fff2d9;
}
.admin-status-row-arrow {
    width: 36px;
    color: var(--accent-dark);
    font-size: 25px;
    font-weight: 800;
    text-align: right;
}
.admin-status-detail-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.admin-status-detail-metrics article,
.admin-status-facts article {
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f8fafb;
}
.admin-status-detail-metrics span,
.admin-status-facts article > span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
}
.admin-status-detail-metrics strong,
.admin-status-detail-metrics small,
.admin-status-facts strong,
.admin-status-facts small {
    display: block;
}
.admin-status-detail-metrics strong {
    margin-top: 7px;
    color: var(--accent-dark);
    font-size: 22px;
    line-height: 1.1;
}
.admin-status-detail-metrics small,
.admin-status-facts small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}
.admin-status-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}
.admin-status-facts strong {
    margin-top: 6px;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.admin-tool-activity-section {
    padding-top: 17px;
    border-top: 1px solid var(--border);
}
.admin-tool-activity-section .section-head {
    margin-bottom: 10px;
}
.admin-tool-activity-section h3,
.admin-tool-activity-section p {
    margin: 0;
}
.admin-tool-activity-section p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}
.admin-tool-activity-table {
    min-width: 720px;
}
.admin-tool-activity-table th:not(:first-child),
.admin-tool-activity-table td:not(:first-child) {
    text-align: right;
}
.admin-activity-note {
    margin-top: 9px !important;
}
.stats-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stats-filter { margin-bottom: 0; }
.stats-table { width: 100%; min-width: 100% !important; max-width: 100%; table-layout: fixed; }
.stats-table th, .stats-table td { padding: 9px 8px; }
.stats-table .name-cell { overflow-wrap: anywhere; }
.stats-table .sort-link { white-space: normal; }
.stats-table .num { width: 72px; text-align: right; white-space: nowrap; }
.compact-stats-table { font-size: 12px; }
.compact-stats-table th, .compact-stats-table td { padding: 8px 5px; }
.compact-stats-table .num { width: 44px; }
.compact-stats-table .sort-link { font-size: 10px; }
.compact-stats-table th:first-child { width: auto; }
.stats-no-scroll { overflow-x: visible; }
.matrix-wrap {
    height: calc(100vh - 315px);
    min-height: 320px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.matrix-table {
    min-width: 1100px;
    border-collapse: separate;
    border-spacing: 0;
}
.matrix-table th,
.matrix-table td {
    min-width: 138px;
    padding: 9px 10px;
    vertical-align: top;
    background: var(--surface);
}
.matrix-table td {
    text-align: center;
    vertical-align: middle;
    position: relative;
}
.matrix-table td .status {
    justify-content: center;
}
.matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--soft);
    white-space: normal;
    text-align: center;
}
.matrix-table thead th:first-child {
    text-align: left;
}
.matrix-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 240px;
    max-width: 320px;
    background: var(--soft);
}
.matrix-table tbody th {
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
}
.matrix-sort-link {
    display: block;
    color: var(--text);
    text-decoration: none;
    text-align: center;
}
.matrix-table thead th:first-child .matrix-sort-link {
    text-align: left;
}
.matrix-sort-link:hover {
    color: var(--brand);
    text-decoration: underline;
}
.matrix-table tbody th strong,
.matrix-table tbody th small {
    display: block;
}
.matrix-empty { color: var(--muted); }
.matrix-due-tooltip {
    position: relative;
    display: inline-flex;
    justify-content: center;
    cursor: help;
}
.matrix-date-link {
    display: inline-flex;
    color: inherit;
}
.matrix-date-link:hover .status {
    box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.18);
    transform: translateY(-1px);
}
.matrix-table td:target {
    box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.35);
    background: #eff4f7;
}
.matrix-floating-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 360px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #111f25;
    color: #fff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.28);
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    white-space: pre-line;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.matrix-floating-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
.actions { text-align: right; white-space: nowrap; }
.inline-action { display: inline-flex; margin: 0; }
.actions .inline-action { margin-left: 8px; }
.danger-button { color: var(--danger); border-color: #f2c2c2; background: var(--danger-bg); }
.merge-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
}
.merge-toolbar strong,
.merge-toolbar span {
    display: block;
}
.merge-toolbar span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.link-button {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--accent-dark);
    font: inherit;
    font-weight: 900;
    text-decoration: underline;
    cursor: pointer;
}
.danger-link { color: var(--danger); }
.status { display: inline-flex; min-height: 24px; border-radius: 999px; padding: 0 9px; align-items: center; font-size: 12px; font-weight: 900; }
.ok { color: var(--ok); background: var(--ok-bg); }
.warning { color: var(--warning); background: var(--warning-bg); }
.bad, .danger-status { color: var(--danger); background: var(--danger-bg); }
.warning-status { color: #8a5200; background: #fff3d8; }
.neutral { color: #53616b; background: #eef2f4; }
.month-group-row td {
    background: #eef4f5;
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.stack { display: grid; gap: 12px; }
.page-stack { display: grid; gap: 18px; }
.participant-editor-panel .stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
}
.participant-editor-panel .stack .two-col,
.participant-editor-panel .stack label:has(textarea),
.participant-editor-panel .stack button {
    grid-column: span 3;
}
label { display: grid; gap: 6px; color: #34424b; font-size: 13px; font-weight: 800; }
input, select, textarea {
    width: 100%; min-height: 38px; border: 1px solid var(--border); border-radius: 7px;
    background: #fff; padding: 8px 10px; color: var(--text); font-weight: 500;
}
.checkbox-line,
.check {
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1.35;
}
.checkbox-line input[type="checkbox"],
.check input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    margin: 0;
    flex: 0 0 16px;
    border-radius: 4px;
}
.combo-source {
    position: absolute;
    width: 1px;
    min-height: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.combo-select {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
}
.combo-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.combo-toggle {
    min-height: 38px;
    border: 1px solid var(--border);
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #f6fafb;
    color: var(--accent-dark);
    cursor: pointer;
    font-weight: 900;
}
.combo-input:focus {
    border-color: #8fc9c7;
    outline: 2px solid rgba(0, 112, 120, .15);
}
.combo-menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: none;
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(21, 35, 43, .16);
}
.combo-select.is-open .combo-menu { display: grid; }
.combo-item {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--text);
    display: block;
    text-align: left !important;
    justify-content: flex-start;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.combo-item.is-cost-center {
    margin-left: 12px;
    width: calc(100% - 12px);
    padding-left: 22px;
    border-left: 3px solid #cbd9e2;
    background: #f3faf8;
    color: #37555d;
    font-weight: 800;
}
.combo-item.is-cost-center::before {
    content: "Kostenstelle";
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.combo-item:hover, .combo-item.is-selected {
    background: #eff4f7;
    color: var(--accent-dark);
}
.combo-item.is-cost-center:hover, .combo-item.is-cost-center.is-selected {
    background: #dff2ee;
}
.combo-empty {
    padding: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.table-choice {
    width: 16px;
    min-height: 16px;
    height: 16px;
    padding: 0;
    margin: 0 auto;
    display: block;
    border-radius: 4px;
}
.table-choice[type="radio"] { border-radius: 999px; }
.small-input { max-width: 120px; }
textarea { min-height: 78px; resize: vertical; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: 17px; min-height: 17px; }
.responsible-picker {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
}
.responsible-picker strong,
.responsible-picker small {
    display: block;
}
.responsible-picker small {
    color: var(--muted);
    margin-top: 2px;
}
.responsible-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.responsible-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-weight: 850;
}
.responsible-option input {
    width: 16px;
    min-height: 16px;
}
.compact-check { justify-content: flex-start; font-weight: 900; white-space: nowrap; }
.compact-check input { min-width: 17px; }
.remember-device-box {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid #cedbe4;
    border-radius: 8px;
    background: #effaf8;
    color: #17343a;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.35;
}
.remember-device-box input[type="checkbox"] {
    appearance: auto;
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    accent-color: var(--accent);
    flex: 0 0 16px;
}
.remember-device-box span {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.remember-device-box strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.2;
}
.remember-device-box small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}
.inspection-workspace {
    background: #f4f7f7;
}
.inspection-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}
.inspection-capture-panel {
    border-color: #cedbe4;
    box-shadow: 0 16px 36px rgba(22, 73, 73, .07);
}
.inspection-capture-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.inspection-capture-form-pro {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr);
    align-items: start;
    gap: 18px;
}
.inspection-capture-form .wide {
    grid-column: 1 / -1;
}
.inspection-capture-form textarea {
    min-height: 130px;
    font-size: 16px;
    line-height: 1.45;
}
.inspection-capture-form input[type="file"] {
    padding: 14px;
    min-height: 54px;
    background: #f8fbfb;
}
.inspection-capture-main,
.inspection-capture-side {
    display: grid;
    gap: 12px;
}
.inspection-capture-main {
    padding: 16px;
    border: 1px solid #d4e2e5;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}
.inspection-capture-side {
    padding: 16px;
    border: 1px solid #d5e0e7;
    border-radius: 10px;
    background: #f2f6f8;
}
.inspection-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.inspection-category-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.inspection-category-picker legend {
    margin-bottom: 7px;
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
}
.inspection-category-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.inspection-category-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}
.inspection-category-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.inspection-category-option span {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 7px;
    border: 1px solid #c9d8db;
    border-radius: 7px;
    background: #fff;
    color: #405860;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.inspection-category-option span::before {
    content: "";
    display: grid;
    place-items: center;
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    border: 1px solid #9cafb4;
    border-radius: 4px;
    background: #fff;
    color: #fff;
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
}
.inspection-category-option input:focus-visible + span {
    outline: 3px solid rgba(11, 129, 120, .18);
    outline-offset: 2px;
}
.inspection-category-option input:checked + span::before {
    content: "✓";
    border-color: #356b91;
    background: #356b91;
}
.inspection-category-option-safety input:checked + span {
    border-color: #dfaa43;
    background: #fff6e5;
    color: #805000;
}
.inspection-category-option-environment input:checked + span {
    border-color: #75b88a;
    background: #edf8f0;
    color: #27653a;
}
.inspection-category-option-information input:checked + span {
    border-color: #79aeca;
    background: #eff7fb;
    color: #285f7a;
}
.inspection-item-categories {
    flex-wrap: wrap;
}
.inspection-category {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}
.inspection-category-safety {
    background: #fff1d8;
    color: #805000;
}
.inspection-category-environment {
    background: #eaf7ee;
    color: #27653a;
}
.inspection-category-information {
    background: #edf6fb;
    color: #285f7a;
}
.inspection-dictation-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.inspection-upload-box {
    display: grid;
    gap: 7px;
    padding: 18px;
    border: 2px dashed #9fc8c3;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.inspection-camera-box {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #d5e0e7;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.inspection-upload-box span {
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
}
.inspection-upload-box strong {
    font-size: 18px;
}
.inspection-camera-box span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.inspection-camera-box strong {
    color: var(--ink);
    font-size: 16px;
}
.inspection-camera-box input[type="file"] {
    margin-top: 4px;
}
.inspection-upload-box input[type="file"] {
    margin-top: 5px;
    background: #f8fbfb;
}
.inspection-photo-source {
    display: grid;
    gap: 8px;
}
.inspection-photo-source-main {
    display: grid;
    gap: 7px;
    width: 100%;
    padding: 18px;
    border: 2px dashed #9fc8c3;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.inspection-photo-source-main span {
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
}
.inspection-photo-source-main strong {
    font-size: 19px;
}
.inspection-photo-source-main small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}
.inspection-photo-source-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.inspection-photo-source-options[hidden] {
    display: none;
}
.inspection-photo-source-options button {
    min-height: 44px;
    border: 1px solid #cedbe4;
    border-radius: 8px;
    background: #fff;
    color: var(--accent-dark);
    font-weight: 950;
    cursor: pointer;
}
.inspection-suggestion-box {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d5e0e7;
    border-radius: 10px;
    background: #f2f6f8;
}
.inspection-suggestion-box[hidden] {
    display: none;
}
.inspection-suggestion-box strong {
    color: var(--accent-dark);
    font-size: 13px;
}
.inspection-suggestion-box button {
    padding: 10px;
    border: 1px solid #d5e0e7;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}
.inspection-photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
}
.inspection-photo-preview-card {
    overflow: hidden;
    border: 1px solid #d4e2e5;
    border-radius: 8px;
    background: #fff;
}
.inspection-photo-preview-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.inspection-photo-preview-card span {
    display: block;
    padding: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inspection-photo-preview-remove {
    width: calc(100% - 10px);
    margin: 0 5px 6px;
    padding: 6px 7px;
    border: 1px solid #f2c2c2;
    border-radius: 6px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}
.inspection-submit-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.inspection-upload-status {
    flex: 1 1 260px;
    min-width: 240px;
    padding: 11px 12px;
    border: 1px solid #b9d8d3;
    border-radius: 10px;
    background: #f2f6f8;
}
.inspection-upload-status strong,
.inspection-upload-status span {
    display: block;
}
.inspection-upload-status strong {
    color: var(--accent-dark);
    font-size: 14px;
}
.inspection-upload-status span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.inspection-upload-progress {
    position: relative;
    height: 8px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #d7e6e8;
}
.inspection-upload-progress i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #ff930f);
    animation: inspection-upload-bar 1.05s ease-in-out infinite;
}
.inspection-saving-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(8, 20, 27, .72);
}
.inspection-saving-overlay[hidden] {
    display: none;
}
.inspection-saving-overlay > div {
    display: grid;
    justify-items: center;
    gap: 11px;
    width: min(390px, 92vw);
    padding: 24px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
    text-align: center;
}
.inspection-saving-overlay strong {
    font-size: 21px;
}
.inspection-saving-overlay span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}
.inspection-saving-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #d7e6e8;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: inspection-spin .8s linear infinite;
}
@keyframes inspection-upload-bar {
    0% { transform: translateX(-105%); }
    50% { transform: translateX(80%); }
    100% { transform: translateX(245%); }
}
@keyframes inspection-spin {
    to { transform: rotate(360deg); }
}
.inspection-item-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.inspection-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}
.inspection-row-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(20,34,42,.04);
}
.inspection-row-card .actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.inspection-row-card .inline-action {
    margin-left: 0;
}
.inspection-row-card small {
    color: var(--muted);
    font-weight: 800;
}
.inspection-row-card h3 {
    margin: 4px 0 2px;
    font-size: 18px;
}
.inspection-row-card p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.inspection-row-stats {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.inspection-row-stats span {
    display: grid;
    min-width: 78px;
    padding: 9px 10px;
    border-radius: 8px;
    background: var(--soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}
.inspection-row-stats strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.1;
}
.inspection-item-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 10px 26px rgba(20,34,42,.05);
}
.inspection-item-card-pro {
    display: grid;
    grid-template-columns: 46px minmax(180px, 280px) minmax(0, 1fr) minmax(140px, auto);
    gap: 16px;
    align-items: start;
}
.inspection-item-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e6f5f2;
    color: var(--accent-dark);
    font-size: 18px;
    font-weight: 950;
}
.inspection-item-content {
    min-width: 0;
}
.inspection-item-media {
    min-width: 0;
}
.inspection-item-description {
    margin: 10px 0 0;
    color: #22333b;
    line-height: 1.5;
}
.inspection-item-side {
    display: grid;
    gap: 12px;
    justify-items: end;
}
.inspection-item-side > span {
    display: grid;
    min-width: 86px;
    padding: 9px 10px;
    border-radius: 8px;
    background: var(--soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}
.inspection-item-side strong {
    color: var(--ink);
    font-size: 20px;
    line-height: 1.1;
}
.inspection-item-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.inspection-item-head h2 {
    margin: 2px 0 0;
    font-size: 20px;
}
.inspection-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 14px 0;
}
.inspection-photo-grid figure {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #f8fbfb;
}
.inspection-photo-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.inspection-photo-grid figcaption {
    padding: 8px 9px 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.inspection-photo-grid form {
    padding: 0 8px 8px;
}
.inspection-photo-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.inspection-photo-stack figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfb;
}
.inspection-photo-stack figure:first-child {
    grid-column: 1 / -1;
}
.inspection-photo-stack img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.inspection-photo-stack form {
    position: absolute;
    top: 5px;
    right: 5px;
}
.inspection-photo-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}
.inspection-photo-open img {
    pointer-events: none;
}
.inspection-photo-empty {
    display: grid;
    min-height: 124px;
    place-items: center;
    border: 1px dashed #cddbe0;
    border-radius: 8px;
    background: #f8fbfb;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}
.inspection-photo-strip {
    display: flex;
    gap: 9px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.inspection-photo-strip figure {
    position: relative;
    flex: 0 0 116px;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8fbfb;
}
.inspection-photo-strip img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.inspection-photo-strip form {
    position: absolute;
    top: 5px;
    right: 5px;
}
.photo-delete {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(190, 24, 24, .92);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.inspection-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(8, 20, 27, .88);
}
.inspection-photo-modal[hidden] {
    display: none;
}
.inspection-photo-modal-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 16px;
    align-items: stretch;
    width: min(1180px, 94vw);
    max-height: 92vh;
}
.inspection-photo-modal-image {
    display: grid;
    gap: 10px;
    align-content: center;
}
.inspection-photo-modal-image img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 10px;
    background: #0f1f26;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.inspection-photo-modal-image span {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    overflow-wrap: anywhere;
}
.inspection-photo-modal-text {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 20px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.inspection-photo-modal-text small,
.inspection-photo-modal-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}
.inspection-photo-modal-text h2 {
    margin: 0;
    font-size: 22px;
}
.inspection-photo-modal-text p {
    margin: 0;
    color: #22333b;
    line-height: 1.5;
    white-space: pre-wrap;
}
.inspection-photo-modal-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
.inspection-photo-nav {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 54px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: var(--ink);
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
.inspection-photo-prev { left: -18px; }
.inspection-photo-next { right: -18px; }
body.modal-open {
    overflow: hidden;
}
.setting-check {
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
}
.setting-check span { display: grid; gap: 4px; }
.setting-check small { color: var(--muted); line-height: 1.35; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick-entry-form { display: grid; gap: 14px; }
.quick-entry-top {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 1.4fr) minmax(160px, .7fr);
    gap: 12px;
    align-items: end;
}
.quick-entry-mode {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfb;
}
.quick-entry-mode[hidden] { display: none; }
.quick-mode-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}
.quick-mode-head h3 { margin: 0 0 3px; font-size: 18px; }
.quick-mode-head p { margin: 0; color: var(--muted); }
.quick-filter { max-width: 420px; }
.quick-filter-hint { margin: -4px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.quick-participant-section { display: grid; gap: 8px; }
.quick-participant-section[hidden] { display: none !important; }
.quick-participant-section h4 {
    margin: 4px 0 0;
    padding: 7px 9px;
    border-radius: 7px;
    background: #eff4f7;
    color: var(--accent-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.quick-participant-section-muted h4 { background: #eef1f2; color: #53616b; }
.quick-participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
    max-height: 430px;
    overflow: auto;
    padding-right: 4px;
}
.quick-participant {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}
.quick-participant[hidden] { display: none !important; }
.quick-participant.is-inactive { opacity: .62; background: #f4f6f7; }
.quick-participant:hover { border-color: #9ccfca; background: #f1fbfa; }
.quick-participant.is-inactive:hover { background: #eef2f4; }
.quick-participant input { width: 17px; min-height: 17px; }
.quick-participant strong, .quick-participant small {
    display: block;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.quick-participant strong { color: var(--accent-dark); font-size: 13px; }
.quick-participant small { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.quick-empty-participants {
    display: grid;
    gap: 8px;
    justify-items: start;
    padding: 14px;
    border: 1px dashed #b9c8ce;
    border-radius: 8px;
    background: #fff;
}
.quick-empty-participants[hidden] { display: none !important; }
.quick-empty-participants strong { color: var(--text); }
.quick-empty-participants p { margin: 0; color: var(--muted); }
.quick-actions, .list { display: grid; gap: 10px; }
.recent-checks { display: grid; gap: 10px; }
.recent-day {
    display: grid;
    gap: 6px;
}
.recent-day h3 {
    margin: 0;
    padding: 6px 8px;
    border-radius: 7px;
    background: #eff4f7;
    color: var(--accent-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.recent-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 9px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
}
.recent-row strong, .recent-row span {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
.recent-row strong { font-size: 13px; }
.recent-row span { font-weight: 800; font-size: 13px; }
.recent-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.25; }
.filter-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: end;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
}
.filter-strip label { min-width: 220px; }
.search-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.search-form input { max-width: 380px; }
.duplicate-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.note-box { margin-top: 16px; background: var(--soft); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.active-company-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    border: 2px solid #f29f05; background: #fff8e8; border-radius: 8px;
    padding: 14px 16px; margin: 0 0 14px;
}
.active-company-banner span:first-child {
    display: block; color: #8a5a00; font-size: 12px; font-weight: 900;
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px;
}
.active-company-banner strong { display: block; font-size: 22px; line-height: 1.15; color: #111f26; }
.active-company-banner small { display: block; margin-top: 4px; color: var(--muted); font-weight: 800; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.choice-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.choice-card h3 { margin: 0; font-size: 16px; }
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid #cbd9e2; background: #eff4f7; color: var(--accent-dark); font-weight: 800; }
.alert.error, .alert.warning { background: var(--warning-bg); color: var(--warning); border-color: #f4d59a; }
.inline-filter { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-filter input { width: 110px; }
.narrow-panel { max-width: 760px; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.pagination.bottom {
    justify-content: flex-end;
    margin-top: 14px;
}
.pagination .disabled {
    opacity: 0.45;
    pointer-events: none;
}
.pager-gap {
    color: var(--muted);
    padding: 0 2px;
}
.document-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
    padding: 12px;
}
.document-box-head,
.document-row,
.document-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.document-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}
.document-row,
.document-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
}
.document-row strong,
.document-row small,
.document-card strong,
.document-card small {
    display: block;
}
.document-explorer {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.document-card {
    justify-content: flex-start;
}
.document-card > div:nth-child(2) {
    flex: 1;
    min-width: 0;
}
.document-card-grouped {
    align-items: flex-start;
}
.document-group-body {
    flex: 1;
    min-width: 0;
}
.document-group-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.document-assignment-list {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}
.document-assignment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--soft);
}
.document-assignment-row .actions {
    flex-shrink: 0;
}
.document-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #e9f6f4;
    color: var(--brand);
    font-weight: 800;
    font-size: 12px;
}
.document-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e9f6f4;
    color: var(--brand);
    font-weight: 700;
    white-space: nowrap;
}
.empty { text-align: center; color: var(--muted); padding: 28px; }
.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.section-head h2 { margin: 0 0 4px; }
.section-head p { margin: 0; color: var(--muted); }
.toolbar-form {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}
.toolbar-form label { min-width: 150px; }
.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.grid-form .wide { grid-column: 1 / -1; }
.contract-editor-form {
    display: grid;
    gap: 14px;
}
.contract-form-section {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #fbfdfe);
}
.contract-form-section-main {
    background: #f5fbfa;
    border-color: #cce6e1;
}
.contract-section-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.contract-section-title > span {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--accent);
    color: #fff;
    font-weight: 950;
    font-size: 13px;
}
.contract-section-title strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
}
.contract-section-title small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}
.contract-field-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.contract-field-grid .wide { grid-column: 1 / -1; }
.contract-field-grid label,
.contract-editor-form > .contract-form-section > label {
    display: grid;
    gap: 6px;
}
.contract-field-grid label small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}
.travel-cost-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.contract-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}
.progress-cell { display: grid; gap: 6px; min-width: 150px; }
.mini-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #eaf0f2;
}
.forecast-progress {
    position: relative;
    overflow: visible;
}
.mini-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #d68b1f);
}
.forecast-progress b {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    border-radius: 999px;
    background: #10242d;
    box-shadow: 0 0 0 2px #fff;
}
.progress-cell small {
    font-size: 11px;
    line-height: 1.25;
}
.help-tooltip {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-left: 5px;
    border-radius: 999px;
    background: #e8f2f3;
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    cursor: help;
    vertical-align: middle;
}
.help-tooltip > span {
    position: absolute;
    z-index: 30;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    width: min(360px, 82vw);
    padding: 12px 14px;
    border-radius: 8px;
    background: #10242d;
    color: #fff;
    box-shadow: 0 16px 34px rgba(16, 36, 45, .22);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
    text-transform: none;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}
.help-tooltip > span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #10242d;
}
.help-tooltip:hover > span,
.help-tooltip:focus > span,
.help-tooltip:focus-within > span {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}
.table-wrap thead .help-tooltip > span {
    top: calc(100% + 10px);
    bottom: auto;
}
.table-wrap thead .help-tooltip > span::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #10242d;
}
.table-wrap thead .help-tooltip:hover > span,
.table-wrap thead .help-tooltip:focus > span,
.table-wrap thead .help-tooltip:focus-within > span {
    transform: translateX(-50%) translateY(2px);
}
.forecast-warning {
    color: #b42318;
    font-weight: 800;
}
.time-book-detail {
    display: grid;
    gap: 16px;
}
.time-book-detail-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(130px, .8fr));
    gap: 12px;
}
.time-book-detail-grid article {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
    padding: 14px;
}
.time-book-detail-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.time-book-detail-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
}
.invoice-overview-panel {
    display: grid;
    grid-template-columns: minmax(260px, .72fr) minmax(620px, 2fr);
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.invoice-overview-summary {
    display: grid;
    align-content: start;
    padding: 20px;
    border-right: 1px solid var(--border);
    background: #f8fafb;
}
.invoice-overview-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.invoice-overview-summary > strong {
    margin-top: 7px;
    color: var(--text);
    font-size: 32px;
    line-height: 1.08;
}
.invoice-overview-summary > small {
    margin-top: 6px;
    color: var(--muted);
}
.invoice-overview-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 20px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.invoice-overview-facts div {
    min-width: 0;
    padding-right: 10px;
}
.invoice-overview-facts div + div {
    padding-left: 10px;
    border-left: 1px solid var(--border);
}
.invoice-overview-facts dt {
    min-height: 32px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}
.invoice-overview-facts dd {
    margin: 4px 0 0;
    color: var(--accent-dark);
    font-size: 21px;
    font-weight: 900;
}
.invoice-month-chart {
    min-width: 0;
    padding: 18px 20px 16px;
}
.invoice-month-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.invoice-month-chart-head h2 {
    margin: 0;
    font-size: 18px;
}
.invoice-month-chart-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.invoice-month-chart-head > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.invoice-month-chart-scroll {
    min-width: 0;
}
.invoice-month-bars {
    display: grid;
    grid-template-columns: repeat(12, minmax(42px, 1fr));
    gap: 8px;
    min-width: 600px;
}
.invoice-month-bar {
    display: grid;
    grid-template-rows: 19px 82px 18px;
    gap: 5px;
    min-width: 0;
    text-align: center;
}
.invoice-month-value {
    overflow: hidden;
    color: #53616b;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.invoice-month-track {
    position: relative;
    display: block;
    width: 20px;
    height: 82px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 4px;
    background: #e7eef0;
}
.invoice-month-track i {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    border-radius: 4px 4px 0 0;
    background: #19877f;
}
.invoice-month-bar > strong {
    color: #53616b;
    font-size: 12px;
}
.invoice-month-bar.is-current .invoice-month-track i {
    background: var(--orange);
}
.invoice-month-bar.is-current > strong {
    color: #a65300;
}
.invoice-month-bar.is-negative .invoice-month-track i {
    background: #c63d36;
}
.invoice-preview-row {
    cursor: pointer;
}
.invoice-preview-row:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(0, 117, 111, .3);
    outline-offset: -3px;
}
.invoice-preview-dialog {
    width: min(1320px, calc(100vw - 32px));
    max-width: none;
    height: min(90vh, 920px);
    max-height: none;
    padding: 0;
    overflow: hidden;
    color: var(--text);
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(11, 31, 40, .34);
}
.invoice-preview-dialog::backdrop {
    background: rgba(11, 31, 40, .58);
    backdrop-filter: blur(3px);
}
.invoice-preview-dialog-inner {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
}
.invoice-preview-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.invoice-preview-dialog-head > div:first-child {
    min-width: 0;
}
.invoice-preview-dialog-head span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.invoice-preview-dialog-head h2 {
    overflow: hidden;
    margin: 0;
    font-size: 19px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.invoice-preview-dialog-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.invoice-preview-dialog-close {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f8fafb;
    color: var(--text);
    font-size: 25px;
    line-height: 1;
}
.invoice-preview-dialog-close:hover {
    border-color: #e5aaa6;
    background: #fff1f0;
    color: #9b1c1c;
}
.invoice-preview-frame-wrap {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: #eef3f4;
}
.invoice-preview-loading {
    position: absolute;
    inset: 0;
    display: grid;
    z-index: 1;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}
.invoice-preview-frame {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    border: 0;
    background: #eef3f4;
    transition: opacity .14s ease;
}
.invoice-preview-frame.is-loaded {
    opacity: 1;
}
.invoice-embed-body {
    margin: 0;
    overflow: auto;
    background: #eef3f4;
}
.invoice-embed-page {
    min-height: 100vh;
}
.invoice-embed-page .workspace {
    max-width: none;
    padding: 18px;
}
.invoice-embed-page .invoice-document {
    margin: 0 auto;
}
.invoice-detail-panel {
    display: grid;
    gap: 14px;
}
.invoice-detail-head {
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.invoice-detail-head h2 {
    margin-top: 4px;
    font-size: 24px;
}
.invoice-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}
.invoice-detail-grid article {
    display: grid;
    gap: 7px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
}
.invoice-detail-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.invoice-detail-grid strong {
    font-size: 17px;
    line-height: 1.25;
}
.invoice-note-box {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
}
.invoice-note-box + .invoice-note-box {
    margin-top: 12px;
}
.invoice-note-box strong {
    font-size: 17px;
}
.invoice-note-box p {
    margin: 0;
}
.invoice-document {
    display: grid;
    gap: 26px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 35, 45, .08);
}
.invoice-doc-head {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-start;
    padding-bottom: 22px;
    border-bottom: 4px solid var(--orange);
}
.invoice-sender {
    display: grid;
    gap: 12px;
}
.invoice-sender img {
    width: 178px;
    max-height: 82px;
    object-fit: contain;
    padding: 9px 12px;
    border-radius: 4px;
    background: #111820;
}
.invoice-sender p,
.invoice-meta p,
.invoice-address-row p,
.invoice-status-box p {
    margin: 0;
    color: var(--muted);
}
.invoice-meta {
    min-width: 290px;
    text-align: right;
}
.invoice-meta h2 {
    margin: 0 0 14px;
    font-size: 34px;
}
.invoice-meta dl,
.invoice-summary dl {
    display: grid;
    gap: 8px;
    margin: 0;
}
.invoice-meta dl div,
.invoice-summary dl div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}
.invoice-meta dt,
.invoice-summary dt {
    color: var(--muted);
    font-weight: 800;
}
.invoice-meta dd,
.invoice-summary dd {
    margin: 0;
    font-weight: 950;
}
.invoice-address-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .75fr);
    gap: 22px;
}
.invoice-address-row > div,
.invoice-status-box {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
}
.invoice-address-row span,
.invoice-status-box span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.invoice-address-row strong,
.invoice-status-box strong {
    display: block;
    margin-bottom: 7px;
    font-size: 20px;
}
.invoice-lines {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.invoice-lines th,
.invoice-lines td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.invoice-lines th {
    background: #f3f7f8;
    color: var(--muted);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.invoice-lines th:last-child,
.invoice-lines td:last-child,
.invoice-lines th:nth-child(3),
.invoice-lines td:nth-child(3),
.invoice-lines th:nth-child(4),
.invoice-lines td:nth-child(4) {
    text-align: right;
}
.invoice-lines .invoice-date-group td {
    background: #eef7f6;
    color: var(--brand);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
}
.invoice-lines small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}
.invoice-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, .55fr);
    gap: 26px;
    align-items: start;
}
.invoice-note {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
}
.invoice-note p {
    margin: 8px 0 0;
    color: var(--muted);
}
.invoice-summary dl {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.invoice-summary .invoice-total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--orange);
    font-size: 20px;
}
.invoice-doc-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.invoice-print-page .workspace {
    padding: 0;
}
.invoice-print-page .invoice-document {
    box-shadow: none;
}
.forecast-card .progress-cell { margin-top: 10px; }
.year-group {
    margin-top: 16px;
}
.year-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f8fafb;
}
.year-group-head h3 {
    margin: 0;
    font-size: 18px;
}
.time-book-detail-table {
    min-width: 1280px;
}
.time-book-detail-table td {
    vertical-align: top;
}
.time-book-detail-table .actions {
    min-width: 170px;
    text-align: left;
}
.time-book-detail-table .inline-action {
    margin-top: 6px;
}
.pending-row {
    background: #fffaf0;
}
.detail-edit-box {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafb;
}
.pending-edit-box {
    background: #fffaf0;
    border-color: #f4d8a8;
}
.detail-time-entry-form {
    margin-top: 10px;
}
.compact-edit-form {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
}
.compact-edit-form .wide {
    grid-column: 1 / -1;
}
.time-overview table { min-width: 980px; }
.time-record-shell .workspace { max-width: none; }
.time-record-top { grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr); }
.time-entry-form {
    grid-template-columns: 1fr;
}
.activity-form-section {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #fbfdfe);
}
.activity-form-main {
    background: #f7fbfb;
}
.activity-form-section.is-company-locked {
    position: relative;
    border-color: #d5e0e3;
    background: linear-gradient(180deg, #eef3f5, #e7edf0);
    color: #71828a;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
}
.activity-form-section.is-company-locked::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background: rgba(238, 243, 245, .52);
    pointer-events: none;
}
.activity-form-section.is-company-locked > * {
    position: relative;
    z-index: 2;
}
.activity-form-section.is-company-locked .activity-section-title > span {
    background: #9cacb4;
    color: #fff;
}
.activity-form-section.is-company-locked input,
.activity-form-section.is-company-locked select,
.activity-form-section.is-company-locked textarea,
.activity-form-section.is-company-locked button {
    background: #edf2f4;
    border-color: #cfdadd;
    color: #7b8b92;
}
.activity-form-section.is-company-locked .activity-section-title small::after {
    content: " Erst Firma / Kostenstelle auswählen.";
    color: var(--accent-dark);
    font-weight: 900;
}
.activity-contract-section {
    padding: 0;
    border: 0;
    background: transparent;
}
.activity-section-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.activity-section-title > span {
    width: 27px;
    height: 27px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 950;
}
.activity-section-title strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
}
.activity-section-title small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}
.activity-field-grid {
    display: grid;
    grid-template-columns: minmax(180px, .45fr) minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}
.activity-field-grid label,
.activity-form-section > label {
    display: grid;
    gap: 6px;
}
.activity-form-actions {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.activity-form-actions .primary {
    min-width: 220px;
}
.contract-live-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    background: linear-gradient(135deg, #f8fbfb, #ffffff);
    display: grid;
    gap: 12px;
}
.contract-live-card.is-ok {
    border-color: #b8e6d6;
    background: linear-gradient(135deg, #f2fbf7, #ffffff);
}
.contract-live-card.is-warning {
    border-color: #f2d394;
    background: linear-gradient(135deg, #fff8e9, #ffffff);
}
.contract-live-card.is-danger {
    border-color: #f0b9b3;
    background: linear-gradient(135deg, #fff3f1, #ffffff);
}
.contract-live-card.is-loading { opacity: .72; }
.contract-live-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}
.contract-live-head strong {
    display: block;
    font-size: 16px;
}
.contract-live-head span {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}
.contract-live-head em {
    font-style: normal;
    font-weight: 800;
    color: var(--accent-dark);
    background: #eaf8f4;
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap;
}
.contract-live-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.contract-live-grid article {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255,255,255,.82);
    padding: 10px;
}
.contract-live-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.contract-live-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 18px;
}
.contract-live-progress {
    display: grid;
    gap: 6px;
}
.contract-live-progress span {
    position: relative;
    display: block;
    height: 10px;
    background: #e5ecee;
    border-radius: 999px;
    overflow: visible;
}
.contract-live-progress i {
    display: block;
    height: 100%;
    min-width: 2px;
    background: var(--accent);
    border-radius: inherit;
    transition: width .2s ease;
}
.contract-live-card.is-warning .contract-live-progress i {
    background: var(--warning);
}
.contract-live-card.is-danger .contract-live-progress i {
    background: var(--danger);
}
.contract-live-progress b {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 18px;
    background: #ff8a00;
    border-radius: 4px;
}
.contract-live-progress small {
    color: var(--muted);
    font-weight: 700;
}
.time-entry-row,
.travel-entry-row {
    display: grid;
    gap: 10px;
    align-items: end;
}
.time-entry-row {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}
.travel-entry-row {
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
}
.activity-travel-row {
    grid-template-columns: minmax(190px, 260px) minmax(220px, .85fr) minmax(260px, 1fr);
    align-items: end;
}
.activity-travel-row label {
    min-width: 0;
}
.travel-time-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfb;
}
.billable-travel-time-row {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(180px, 240px) minmax(220px, 1fr);
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfdfd;
}
.billable-travel-time-row .travel-preview {
    min-height: 42px;
}
.approval-billable-travel-row {
    margin-top: 10px;
}
.overnight-entry-row {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(180px, 260px);
    gap: 10px;
    align-items: end;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfdfd;
}
.overnight-entry-row input[name="overnight_total"]:disabled,
.approval-travel-grid input[name="overnight_total"]:disabled {
    opacity: .65;
    background: #f2f5f6;
}
.travel-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #b8e6d6;
    border-radius: 8px;
    background: #f2fbf7;
    color: var(--text);
}
.travel-preview[hidden] {
    display: none;
}
.travel-preview strong {
    color: var(--accent-dark);
    white-space: nowrap;
}
.travel-preview span {
    color: var(--muted);
    font-weight: 800;
}
.travel-preview.is-warning {
    border-color: #f2d394;
    background: #fff8e9;
}
.travel-preview.is-warning strong {
    color: #8a5a00;
}
.employee-approval-note {
    display: grid;
    gap: 3px;
    margin-top: 8px;
    padding: 8px 10px;
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: #f2f6f8;
}
.employee-approval-note strong {
    color: var(--accent-dark);
    font-size: 12px;
    text-transform: uppercase;
}
.employee-approval-note span {
    color: var(--text);
}
.material-entry-box {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfc;
}
.material-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.material-entry-head strong,
.material-entry-head span {
    display: block;
}
.material-entry-head span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.material-rows {
    display: grid;
    gap: 8px;
}
.material-row {
    display: grid;
    grid-template-columns: 110px minmax(180px, 1fr) 130px auto;
    gap: 8px;
    align-items: end;
}
.material-remove {
    min-height: 38px;
    white-space: nowrap;
}
.time-clock-card { display: grid; gap: 16px; }
.time-clock-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
}
.time-clock-actions form { margin: 0; }
.clock-button {
    width: 100%;
    min-height: 92px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 24px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(20,34,42,.12);
}
.clock-button.clock-in { background: linear-gradient(135deg, #356b91, #17a173); }
.clock-button.clock-out { background: linear-gradient(135deg, #b42318, #d95b35); }
.clock-button:disabled {
    cursor: not-allowed;
    opacity: .38;
    filter: grayscale(.45);
    box-shadow: none;
}
.time-clock-state {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.time-clock-state div {
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}
.time-clock-state span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.time-clock-state strong {
    display: block;
    margin-top: 6px;
    font-size: 25px;
}
.time-clock-state .running-clock-card {
    border-color: #cbd9e2;
    background: #eff4f7;
}
.time-clock-state .running-clock-card strong {
    color: var(--accent-dark);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}
.compact-form { margin-top: 4px; }
.personal-clock-card .pill-row .primary { min-width: 180px; }
.day-edit-panel { scroll-margin-top: 16px; }
.cell-edit-link {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff4f7;
    color: var(--accent-dark);
    font-weight: 850;
}
.cell-edit-link.note-link {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.punch-list {
    display: grid;
    gap: 8px;
    padding-top: 4px;
}
.punch-list > strong {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--muted);
}
.punch-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
}
.punch-list div.auto-closed-punch,
.mini-punches span.auto-closed-punch {
    border-color: #f0d8a8;
    background: #fff7e6;
    color: var(--warning);
}
.mini-punches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mini-punches span {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef5f6;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}
.inline-month-filter {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.time-record-table { min-width: 980px; }
.time-record-table td, .time-record-table th { white-space: nowrap; }
.time-record-table td:last-child { white-space: normal; min-width: 220px; }
.time-record-admin-table { min-width: 1180px; }
.time-record-admin-table td,
.time-record-admin-table th { vertical-align: top; }
.time-record-admin-table td:nth-child(6),
.time-record-admin-table td:nth-child(7) {
    min-width: 220px;
    white-space: normal;
}
.time-book-approval-table { min-width: 1380px; }
.time-book-approval-table td,
.time-book-approval-table th { vertical-align: top; }
.approval-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 8px;
    min-width: 360px;
}
.approval-form label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}
.approval-form input {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 13px;
    text-transform: none;
}
.approval-form textarea {
    min-height: 78px;
    padding: 8px;
    font-size: 13px;
    text-transform: none;
    resize: vertical;
}
.approval-form .wide,
.approval-form button {
    grid-column: 1 / -1;
}
.approval-contract-status {
    grid-column: 1 / -1;
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfc;
}
.approval-contract-status.is-ok {
    border-color: #bde8d2;
    background: #f1fbf5;
}
.approval-contract-status.is-warning {
    border-color: #f0d28b;
    background: #fff9eb;
}
.approval-contract-status.is-danger {
    border-color: #f1b8ae;
    background: #fff2f0;
}
.approval-contract-status > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.approval-contract-status strong {
    font-size: 13px;
}
.approval-contract-status span,
.approval-contract-status p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.approval-contract-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}
.approval-contract-grid article {
    padding: 8px;
    border: 1px solid rgba(196, 211, 217, .75);
    border-radius: 7px;
    background: rgba(255,255,255,.72);
}
.approval-contract-grid small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.approval-contract-grid b {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}
.approval-travel-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfc;
}
.approval-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.approval-card-head span {
    color: var(--text);
    font-weight: 950;
    text-transform: none;
}
.approval-card-head small {
    color: var(--muted);
    font-weight: 800;
    text-transform: none;
}
.approval-travel-grid {
    display: grid;
    grid-template-columns: minmax(150px, .9fr) repeat(3, minmax(90px, .7fr));
    gap: 8px;
    align-items: end;
}
.approval-travel-grid .wide {
    grid-column: 1 / -1;
}
.approval-travel-grid input:disabled {
    background: #edf2f4;
    color: #7b8b92;
}
.approval-material-stack {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfc;
}
.approval-material-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.approval-material-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.approval-material-head .button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 12px;
}
.approval-material-rows {
    display: grid;
    gap: 8px;
}
.approval-material-preview {
    display: grid;
    gap: 5px;
    margin-top: 8px;
}
.approval-material-preview span {
    display: block;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f8fbfc;
    font-size: 12px;
}
.approval-material-preview b {
    color: var(--accent-dark);
}
.approval-material-preview em {
    color: var(--text);
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}
.approval-material-row {
    display: grid;
    grid-template-columns: 90px minmax(140px, 1fr) 110px auto;
    gap: 8px;
    align-items: end;
}
.time-book-approval-table {
    min-width: 1520px;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.time-book-approval-table thead th {
    padding-top: 7px;
    padding-bottom: 7px;
}
.time-book-approval-table tbody tr {
    background: #fff;
    box-shadow: 0 8px 22px rgba(20, 36, 43, .055);
}
.time-book-approval-table tbody td {
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.time-book-approval-table tbody td:first-child {
    border-left: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
}
.time-book-approval-table tbody td:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 8px 8px 0;
}
.time-book-approval-table td:nth-child(1) {
    width: 88px;
    white-space: nowrap;
}
.time-book-approval-table td:nth-child(2) {
    width: 135px;
}
.time-book-approval-table td:nth-child(3) {
    width: 190px;
}
.time-book-approval-table td:nth-child(4) {
    width: 108px;
    white-space: nowrap;
}
.time-book-approval-table td:nth-child(5) {
    width: 255px;
}
.time-book-approval-table td:nth-child(6) {
    min-width: 760px;
}
.time-book-approval-table td:nth-child(7) {
    width: 132px;
}
.time-book-approval-table .company-subline {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.25;
}
.time-book-approval-table td:nth-child(5) > strong {
    display: block;
    margin-bottom: 4px;
    color: var(--accent-dark);
}
.approval-form {
    grid-template-columns: minmax(190px, 1.35fr) repeat(3, minmax(92px, .72fr));
    gap: 7px;
    min-width: 720px;
}
.approval-form label {
    gap: 3px;
    font-size: 10px;
}
.approval-form input,
.approval-form select {
    min-height: 31px;
    padding: 5px 7px;
    font-size: 12px;
}
.approval-form textarea {
    min-height: 54px;
    padding: 7px;
    font-size: 12px;
}
.approval-form .wide {
    grid-column: span 2;
}
.approval-form > .approval-contract-status,
.approval-form > .note-box,
.approval-form > label:first-of-type {
    grid-column: 1 / -1;
}
.approval-form > button.primary {
    grid-column: auto;
    min-height: 34px;
    padding: 7px 12px;
    align-self: end;
}
.approval-contract-status {
    grid-template-columns: minmax(200px, .82fr) 1.6fr minmax(150px, .7fr);
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
}
.approval-contract-status > div:first-child {
    display: grid;
    gap: 2px;
    align-items: start;
    justify-content: stretch;
}
.approval-contract-status p {
    font-size: 10px;
}
.approval-contract-grid {
    gap: 5px;
}
.approval-contract-grid article {
    padding: 6px 7px;
}
.approval-contract-grid small {
    font-size: 9px;
}
.approval-contract-grid b {
    margin-top: 2px;
    font-size: 11px;
}
.approval-travel-card,
.approval-material-stack {
    padding: 8px;
    align-self: start;
}
.approval-card-head,
.approval-material-head {
    min-height: 28px;
}
.approval-card-head small {
    display: none;
}
.approval-travel-grid {
    grid-template-columns: minmax(135px, 1fr) repeat(3, minmax(78px, .72fr));
    gap: 6px;
}
.approval-travel-grid .wide {
    grid-column: 1 / -1;
}
.travel-time-row {
    grid-template-columns: minmax(210px, 1fr) minmax(120px, .55fr);
    gap: 8px;
    align-items: end;
}
.approval-form .checkbox-line {
    display: flex;
    min-height: 31px;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    text-transform: none;
}
.approval-form .checkbox-line input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
}
.approval-material-row {
    grid-template-columns: 70px minmax(140px, 1fr) 92px auto;
    gap: 6px;
}
.approval-material-head .button,
.approval-material-row .button {
    min-height: 29px;
    padding: 5px 8px;
    font-size: 11px;
}
.approval-material-preview {
    gap: 4px;
    margin-top: 5px;
}
.approval-material-preview span {
    padding: 5px 7px;
    font-size: 11px;
}
.employee-approval-note {
    margin-top: 6px;
    padding: 7px 8px;
}
.time-book-approval-table .actions {
    display: grid;
    gap: 7px;
}
.time-book-approval-table .actions .inline-action,
.time-book-approval-table .actions button {
    width: 100%;
}
.time-book-approval-table .approval-form {
    align-items: start;
}
.time-book-approval-table .approval-form > * {
    align-self: start;
}
.time-book-approval-table .approval-form label {
    align-self: start;
}
.time-book-approval-table .approval-form textarea {
    min-height: 46px;
    max-height: 82px;
}
.time-book-approval-table .approval-form textarea[name="activity"] {
    height: 58px;
}
.time-book-approval-table .approval-form textarea[name="material_note_free"] {
    height: 44px;
}
.time-book-approval-table .approval-travel-card {
    grid-column: span 2;
}
.time-book-approval-table .approval-material-stack {
    grid-column: span 2;
}
.time-book-approval-table .approval-form > label:has(select[name="billing_type"]),
.time-book-approval-table .approval-form > label:has(input[name="time_book_note"]) {
    grid-column: span 2;
}
.time-book-approval-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.time-book-approval-table thead,
.time-book-approval-table tbody {
    display: block;
}
.time-book-approval-table thead tr {
    display: grid;
    grid-template-columns: 88px 130px 190px 105px minmax(230px, 1fr) 118px;
    gap: 10px;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid var(--border);
}
.time-book-approval-table thead th {
    display: block;
    padding: 9px 0;
    border: 0;
}
.time-book-approval-table thead th:nth-child(6) {
    display: none;
}
.time-book-approval-table thead th:nth-child(7)::before {
    content: "Aktionen";
}
.time-book-approval-table thead th:nth-child(7) {
    font-size: 0;
}
.time-book-approval-table thead th:nth-child(7)::before {
    font-size: 11px;
}
.time-book-approval-table tbody {
    display: grid;
    gap: 12px;
    padding-top: 12px;
}
.time-book-approval-table tbody tr {
    display: grid;
    grid-template-columns: 88px 130px 190px 105px minmax(230px, 1fr) 118px;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(20, 36, 43, .055);
}
.time-book-approval-table tbody td {
    display: block;
    width: auto !important;
    min-width: 0 !important;
    padding: 0;
    border: 0;
}
.time-book-approval-table tbody td:first-child,
.time-book-approval-table tbody td:last-child {
    border: 0;
    border-radius: 0;
}
.time-book-approval-table tbody td:nth-child(6) {
    grid-column: 1 / 6;
    grid-row: 2;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.time-book-approval-table tbody td:nth-child(7) {
    grid-column: 6;
    grid-row: 1 / span 2;
    align-self: stretch;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}
.time-book-approval-table .approval-form {
    grid-template-columns: minmax(260px, 1.25fr) repeat(5, minmax(110px, .72fr));
    min-width: 0;
}
.time-book-approval-table .approval-form > .approval-contract-status {
    grid-column: 1 / -1;
}
.time-book-approval-table .approval-form > label:first-of-type {
    grid-column: span 3;
}
.time-book-approval-table .approval-form > label:has(textarea[name="activity"]) {
    grid-column: span 3;
}
.time-book-approval-table .approval-travel-card,
.time-book-approval-table .approval-material-stack {
    grid-column: span 3;
}
.time-book-approval-table .approval-form > label:has(select[name="billing_type"]) {
    grid-column: span 2;
}
.time-book-approval-table .approval-form > label:has(input[name="time_book_note"]) {
    grid-column: span 3;
}
.time-book-approval-table .approval-form > button.primary {
    grid-column: span 1;
    width: 100%;
}
.time-book-approval-table .approval-contract-status {
    grid-template-columns: minmax(190px, .8fr) minmax(440px, 1.8fr) minmax(230px, .9fr);
}
.time-book-approval-table .actions {
    align-content: start;
}
.time-book-approval-table .actions .button {
    min-height: 38px;
}
@media (max-width: 1200px) {
    .time-book-approval-table {
        overflow-x: auto;
    }
    .time-book-approval-table thead tr,
    .time-book-approval-table tbody tr {
        min-width: 1120px;
    }
}
#approvals .time-book-approval-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    border-spacing: 0;
}
.approval-empty-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #bfe7db;
    border-radius: 10px;
    background: linear-gradient(180deg, #f5fcf9 0%, #eef9f6 100%);
}
.approval-empty-state div {
    display: grid;
    gap: 4px;
}
.approval-empty-state strong {
    color: var(--accent-dark);
    font-size: 18px;
}
.approval-empty-state span {
    color: var(--muted);
    font-weight: 700;
}
.approval-empty-state .button {
    white-space: nowrap;
}
#approvals .time-book-approval-table thead {
    display: none;
}
#approvals .time-book-approval-table tbody {
    display: grid;
    gap: 16px;
    padding-top: 8px;
}
#approvals .time-book-approval-table tbody tr {
    display: grid;
    grid-template-columns: 86px 150px 220px 120px minmax(260px, 1fr) 172px;
    grid-template-areas:
        "date user company time activity actions"
        "form form form form form actions";
    gap: 0 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid #d5e1e6;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #fbfdfe 100%);
    box-shadow: 0 14px 30px rgba(19, 35, 42, .08);
}
#approvals .time-book-approval-table tbody tr.is-collapsed {
    grid-template-areas: "date user company time activity actions";
    align-items: center;
}
#approvals .time-book-approval-table tbody td {
    display: block;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}
#approvals .time-book-approval-table tbody td:nth-child(1) { grid-area: date; }
#approvals .time-book-approval-table tbody td:nth-child(2) { grid-area: user; }
#approvals .time-book-approval-table tbody td:nth-child(3) { grid-area: company; }
#approvals .time-book-approval-table tbody td:nth-child(4) { grid-area: time; }
#approvals .time-book-approval-table tbody td:nth-child(5) { grid-area: activity; }
#approvals .time-book-approval-table tbody tr.approval-row > td:nth-child(-n+5) {
    cursor: pointer;
}
#approvals .time-book-approval-table tbody tr.approval-row > td:nth-child(-n+5):hover {
    color: var(--accent-dark);
}
#approvals .time-book-approval-table tbody td:nth-child(6) {
    grid-area: form;
    margin-top: 14px;
    padding-top: 14px !important;
    border-top: 1px solid #dbe6ea !important;
}
#approvals .time-book-approval-table tbody tr.is-collapsed td:nth-child(6) {
    display: none !important;
}
#approvals .time-book-approval-table tbody td:nth-child(7) {
    grid-area: actions;
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 100%;
    padding-left: 14px !important;
    border-left: 1px solid #dbe6ea !important;
}
#approvals .time-book-approval-table tbody td:nth-child(-n+4) {
    color: var(--text);
    font-size: 13px;
}
#approvals .time-book-approval-table tbody td:nth-child(-n+4)::before,
#approvals .time-book-approval-table tbody td:nth-child(5)::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .02em;
    text-transform: uppercase;
}
#approvals .time-book-approval-table tbody td:nth-child(1)::before { content: "Datum"; }
#approvals .time-book-approval-table tbody td:nth-child(2)::before { content: "Mitarbeiter"; }
#approvals .time-book-approval-table tbody td:nth-child(3)::before { content: "Firma"; }
#approvals .time-book-approval-table tbody td:nth-child(4)::before { content: "Zeit"; }
#approvals .time-book-approval-table tbody td:nth-child(5)::before { content: "Tätigkeit"; }
#approvals .time-book-approval-table tbody td:nth-child(5) > strong {
    margin: 0 0 4px;
    color: var(--accent-dark);
    font-size: 15px;
}
#approvals .time-book-approval-table tbody tr.approval-row td:nth-child(5)::after {
    content: "Details geöffnet";
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e8f6f4;
    color: var(--accent-dark);
    font-size: 10px;
    font-weight: 900;
}
#approvals .time-book-approval-table tbody tr.approval-row.is-collapsed td:nth-child(5)::after {
    content: "Details anzeigen";
    background: #eef4f6;
    color: var(--muted);
}
#approvals .time-book-approval-table .company-subline {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.28;
}
#approvals .time-book-approval-table .actions {
    display: grid;
    gap: 8px;
    width: 100%;
}
#approvals .time-book-approval-table .actions .inline-action {
    display: block;
    width: 100%;
    margin: 0;
}
#approvals .time-book-approval-table .actions button {
    width: 100%;
    min-height: 36px;
    box-sizing: border-box;
    justify-content: center;
    white-space: nowrap;
}
#approvals .time-book-approval-table .actions .approval-submit {
    min-height: 36px;
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
#approvals .time-book-approval-table .actions .approval-toggle {
    border-color: #cbd9e2;
    background: #e8f6f4;
    color: var(--accent-dark);
}
#approvals .time-book-approval-table tbody tr.is-collapsed .approval-submit {
    display: none;
}
#approvals .approval-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
    align-items: start;
}
#approvals .approval-form > * {
    align-self: start;
}
#approvals .approval-form label {
    gap: 4px;
    font-size: 10px;
}
#approvals .approval-form input,
#approvals .approval-form select {
    min-height: 34px;
    font-size: 12px;
}
#approvals .approval-form textarea {
    min-height: 62px;
    max-height: 100px;
    font-size: 12px;
}
#approvals .approval-contract-status {
    grid-column: 1 / -1 !important;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(190px, .75fr) minmax(420px, 1.8fr) minmax(220px, .8fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
}
#approvals .approval-contract-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}
#approvals .approval-contract-grid article {
    padding: 7px 8px;
}
#approvals .approval-form > label:nth-of-type(1) {
    grid-column: 1 / span 4 !important;
    grid-row: 2;
}
#approvals .approval-form > label:nth-of-type(2) {
    grid-column: 5 / span 2 !important;
    grid-row: 2;
}
#approvals .approval-form > label:nth-of-type(3) {
    grid-column: 7 / span 2 !important;
    grid-row: 2;
}
#approvals .approval-form > label:nth-of-type(4) {
    grid-column: 9 / span 2 !important;
    grid-row: 2;
}
#approvals .approval-form > label:nth-of-type(5) {
    grid-column: 1 / span 4 !important;
    grid-row: 3;
}
#approvals .approval-form > label:nth-of-type(5) textarea {
    height: 104px;
}
#approvals .approval-travel-card {
    grid-column: 5 / span 4 !important;
    grid-row: 3;
}
#approvals .approval-material-stack {
    grid-column: 9 / span 4 !important;
    grid-row: 3;
}
#approvals .approval-travel-card,
#approvals .approval-material-stack {
    min-height: 0;
    padding: 10px;
    border-radius: 10px;
    background: #f7fbfc;
}
#approvals .approval-card-head,
#approvals .approval-material-head {
    min-height: 24px;
}
#approvals .approval-card-head small {
    display: none;
}
#approvals .approval-material-head span {
    color: var(--text);
    font-size: 13px;
    font-weight: 950;
    text-transform: none;
}
#approvals .approval-travel-grid {
    grid-template-columns: minmax(140px, 1fr) repeat(3, minmax(76px, .72fr));
    gap: 7px;
}
#approvals .travel-time-row {
    grid-template-columns: minmax(210px, 1fr) minmax(110px, .55fr);
    gap: 8px;
}
#approvals .approval-material-row {
    grid-template-columns: 70px minmax(135px, 1fr) 90px auto;
    gap: 7px;
}
#approvals .approval-form > label:nth-of-type(6),
#approvals .approval-form > .note-box {
    grid-column: 11 / span 2 !important;
    grid-row: 2;
    align-self: end;
}
#approvals .approval-form > label:nth-of-type(6) small {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.25;
}
#approvals .approval-form > .note-box {
    margin: 0;
    padding: 8px 10px;
}
#approvals .approval-form > .note-box p {
    margin: 3px 0 0;
    font-size: 11px;
    line-height: 1.25;
}
#approvals .approval-form > label.approval-extra-invoice {
    grid-column: 5 / span 4 !important;
    margin-top: 18px;
}
#approvals .approval-form > label:nth-last-of-type(1) {
    grid-column: 11 / span 2 !important;
    grid-row: 2;
}
#approvals .approval-form > button.primary {
    grid-column: 10 / span 3 !important;
    width: 100%;
    min-height: 38px;
    margin-top: 8px;
}
#approvals .travel-time-row input[name="travel_extra_minutes"]:disabled {
    background: #edf2f4;
    color: #8a9aa2;
    cursor: not-allowed;
}
#approvals .approval-form > label.approval-extra-invoice {
    display: none !important;
}
#approvals .time-book-approval-table tbody tr {
    grid-template-columns: 86px 150px 220px 120px minmax(320px, 1fr) 170px;
}
#approvals .time-book-approval-table tbody td:nth-child(6) {
    overflow: hidden;
}
#approvals .time-book-approval-table .actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    align-content: start;
}
#approvals .time-book-approval-table .actions .button,
#approvals .time-book-approval-table .actions button {
    width: 100%;
    min-height: 36px;
    margin: 0 !important;
    white-space: nowrap;
}
#approvals .approval-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}
#approvals .approval-form > label:nth-of-type(1) {
    grid-column: 1 / span 4 !important;
    grid-row: 2;
}
#approvals .approval-form > label:nth-of-type(2) {
    grid-column: 5 / span 2 !important;
    grid-row: 2;
}
#approvals .approval-form > label:nth-of-type(3) {
    grid-column: 7 / span 2 !important;
    grid-row: 2;
}
#approvals .approval-form > label:nth-of-type(4) {
    grid-column: 9 / span 2 !important;
    grid-row: 2;
}
#approvals .approval-form > label:has(select[name="billing_type"]),
#approvals .approval-form > .note-box {
    grid-column: 11 / span 2 !important;
    grid-row: 2 !important;
    align-self: end;
}
#approvals .approval-form > label:nth-of-type(5) {
    grid-column: 1 / span 4 !important;
    grid-row: 3;
}
#approvals .approval-travel-card {
    grid-column: 5 / span 4 !important;
    grid-row: 3;
    overflow: hidden;
}
#approvals .approval-material-stack {
    grid-column: 9 / span 4 !important;
    grid-row: 3;
    overflow: hidden;
}
#approvals .approval-travel-grid {
    grid-template-columns: minmax(135px, 1.05fr) minmax(82px, .65fr) minmax(82px, .65fr) minmax(102px, .8fr);
}
#approvals .approval-travel-grid .wide {
    grid-column: 1 / -1;
}
#approvals .approval-billable-travel-row {
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(112px, .9fr);
    gap: 7px;
    padding: 8px;
    margin-top: 0;
}
#approvals .approval-billable-travel-row label {
    min-width: 0;
}
#approvals .travel-time-row {
    grid-template-columns: minmax(190px, 1.4fr) minmax(130px, .8fr);
    gap: 8px;
    padding: 8px;
}
#approvals .approval-material-row {
    grid-template-columns: 68px minmax(120px, 1fr) 88px;
}
#approvals .approval-material-row .material-remove {
    grid-column: 1 / -1;
    min-height: 30px;
}
#approvals .approval-form > label:nth-last-of-type(1) {
    display: none !important;
}
#approvals .approval-form > button.primary {
    display: none !important;
}
@media (max-width: 1450px) {
    #approvals .time-book-approval-table tbody tr {
        grid-template-columns: 80px 135px 190px 110px minmax(240px, 1fr) 160px;
    }
    #approvals .approval-form {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
    #approvals .approval-form > label:nth-of-type(1) { grid-column: 1 / span 3 !important; grid-row: 2; }
    #approvals .approval-form > label:nth-of-type(2) { grid-column: 4 / span 2 !important; grid-row: 2; }
    #approvals .approval-form > label:nth-of-type(3) { grid-column: 6 / span 1 !important; grid-row: 2; }
    #approvals .approval-form > label:nth-of-type(4) { grid-column: 7 / span 2 !important; grid-row: 2; }
    #approvals .approval-form > label:nth-of-type(5) { grid-column: 3 / span 6 !important; grid-row: 3; }
    #approvals .approval-travel-card { grid-column: 1 / span 4 !important; grid-row: 4; }
    #approvals .approval-material-stack { grid-column: 5 / span 4 !important; grid-row: 4; }
    #approvals .approval-form > label:nth-of-type(6),
    #approvals .approval-form > .note-box { grid-column: 1 / span 2 !important; grid-row: 3; }
    #approvals .approval-form > label.approval-extra-invoice { grid-column: 4 / span 3 !important; }
    #approvals .approval-form > label:nth-last-of-type(1) { grid-column: 1 / span 2 !important; grid-row: 3; }
    #approvals .approval-form > button.primary { grid-column: 6 / span 3 !important; }
    #approvals .approval-form > label:has(select[name="billing_type"]),
    #approvals .approval-form > .note-box { grid-column: 1 / span 2 !important; grid-row: 3 !important; }
    #approvals .approval-form > label:nth-of-type(5) { grid-column: 3 / span 6 !important; grid-row: 3; }
    #approvals .approval-travel-card { grid-column: 1 / span 4 !important; grid-row: 4; }
    #approvals .approval-material-stack { grid-column: 5 / span 4 !important; grid-row: 4; }
    #approvals .approval-billable-travel-row,
    #approvals .travel-time-row { grid-template-columns: 1fr; }
    #approvals .approval-form > label:nth-last-of-type(1),
    #approvals .approval-form > button.primary { display: none !important; }
}
.compact-month-panel { display: grid; gap: 12px; }
.compact-month-scroll {
    max-height: 260px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.compact-month-scroll table { margin: 0; }
.compact-month-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--soft);
}
.compact-month-scroll .time-record-table td,
.compact-month-scroll .time-record-table th {
    padding-top: 9px;
    padding-bottom: 9px;
}
.compact-month-scroll tr.current-day {
    background: #eff4f7;
    outline: 2px solid #cbd9e2;
    outline-offset: -2px;
}
.compact-month-scroll tr.current-day td:first-child strong {
    color: var(--accent-dark);
}
.time-card-calendar-panel {
    display: grid;
    gap: 14px;
}
.time-card-calendar-head {
    align-items: center;
}
.time-card-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--border);
    gap: 1px;
}
.time-admin-entry-panel {
    padding: 14px;
    border: 1px solid #cbd9e2;
    border-radius: 8px;
    background: #f3faf9;
}
.time-admin-entry-panel h3 {
    margin: 0 0 4px;
}
.time-admin-entry-panel .mini-punches {
    margin-top: 10px;
}
.time-admin-punch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.time-admin-punch-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.time-admin-punch-item > span {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef5f6;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}
.time-admin-punch-item > span.auto-closed-punch {
    border-color: #f0d8a8;
    background: #fff7e6;
    color: var(--warning);
}
.compact-button {
    padding: 5px 9px;
    min-height: 0;
}
.time-card-weekday {
    padding: 10px 12px;
    background: var(--soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.time-card-day {
    min-height: 132px;
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 11px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: background .12s ease, box-shadow .12s ease;
}
.time-card-day:hover {
    background: #f7fbfb;
    box-shadow: inset 0 0 0 2px rgba(0, 95, 91, .18);
}
.time-card-day.is-empty {
    background: #f4f7f8;
    pointer-events: none;
}
.time-card-day.is-weekend {
    background: #fbfcfd;
}
.time-card-day.is-holiday {
    background: #fff1dc;
    border: 1px solid #f59e0b;
    box-shadow: inset 4px 0 0 #f59e0b, 0 10px 20px rgba(245, 158, 11, .08);
}
.time-card-day.has-work {
    background: #eff4f7;
}
.time-card-day.is-holiday.has-work {
    background: linear-gradient(135deg, #fff1dc 0%, #fff7ed 55%, #eff4f7 100%);
    border-color: #f59e0b;
}
.time-card-day.is-today {
    box-shadow: inset 0 0 0 2px var(--accent);
}
.time-card-day.is-today.is-holiday {
    box-shadow: inset 4px 0 0 #f59e0b, inset 0 0 0 2px var(--accent), 0 10px 20px rgba(245, 158, 11, .1);
}
.time-card-day-number {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2f3;
    font-weight: 900;
}
.time-card-day.is-today .time-card-day-number {
    background: var(--accent);
    color: #fff;
}
.time-card-day strong {
    font-size: 22px;
    color: var(--accent-dark);
}
.time-card-day small,
.time-card-day em {
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
    line-height: 1.35;
}
.time-card-day .holiday-name {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(245, 158, 11, .22);
}
.calendar-day {
    cursor: default;
    position: relative;
}
.calendar-day[data-request-url] {
    cursor: pointer;
}
.calendar-day[data-request-url]:hover {
    box-shadow: inset 0 0 0 2px rgba(0, 103, 101, .22);
}
.calendar-day[data-calendar-date]:focus-visible {
    z-index: 1;
    outline: 3px solid rgba(0, 117, 111, .28);
    outline-offset: -3px;
}
.calendar-day.has-open-punch {
    border-color: #efb45f;
    background: #fff8e9;
    box-shadow: inset 0 0 0 2px rgba(242, 140, 24, .24);
}
.calendar-day.has-open-punch.is-today {
    box-shadow: inset 0 0 0 2px var(--orange);
}
.calendar-live-status {
    display: grid;
    gap: 1px;
    width: fit-content;
    max-width: 100%;
    padding: 5px 7px;
    border: 1px solid #efc27f;
    border-radius: 7px;
    background: #fff1d8;
    color: #8a4b00;
    font-size: 11px;
    line-height: 1.2;
}
.calendar-live-status b {
    font-size: 12px;
}
.time-off-badge {
    display: grid;
    gap: 1px;
    padding: 6px 8px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.25;
    border: 1px solid transparent;
}
.time-off-badge b {
    font-size: 11px;
    text-transform: uppercase;
}
.time-off-badge.pending {
    color: #8a5200;
    background: #fff3d8;
    border-color: #f0c978;
}
.time-off-badge.approved {
    color: #0d7a48;
    background: #e9f8ef;
    border-color: #b8dfc8;
}
.time-off-delete-form {
    margin: 0;
}
.time-off-delete-button {
    width: 100%;
    border: 1px solid #f3b8b3;
    border-radius: 7px;
    background: #fff1ef;
    color: #a51f14;
    padding: 5px 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}
.time-off-delete-button:hover {
    background: #ffe4e0;
    border-color: #e08a82;
}
.team-calendar-panel {
    display: grid;
    gap: 14px;
}
.team-mobile-day-nav,
.team-mobile-month-total {
    display: none;
}
.team-calendar-scroll {
    max-height: calc(100vh - 330px);
    min-height: 360px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.team-calendar-table {
    min-width: 1600px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.team-calendar-table th,
.team-calendar-table td {
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid #edf2f3;
    background: #fff;
}
.team-calendar-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 9px 8px;
    background: var(--soft);
    text-align: center;
}
.team-calendar-table th span,
.team-calendar-table th small,
.team-calendar-table td small {
    display: block;
}
.team-calendar-table th small,
.team-calendar-table td small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}
.team-calendar-user-col {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 210px;
    max-width: 210px;
    background: #f8fbfb !important;
}
.team-calendar-table td.team-calendar-user-col {
    padding: 12px 10px;
}
.team-calendar-user-col strong,
.team-calendar-table td > strong {
    display: block;
    color: var(--text);
}
.team-calendar-cell {
    width: 118px;
    min-width: 118px;
    height: 84px;
    padding: 8px;
}
.team-calendar-cell.has-work {
    background: #eff4f7;
}
.team-calendar-cell.is-weekend {
    background: #fbfcfd;
}
.team-calendar-cell.is-holiday {
    background: #fff7ed;
}
.team-calendar-cell.is-today {
    box-shadow: inset 0 0 0 2px var(--accent);
}
.team-calendar-cell.has-open-punch {
    background: #fff8e9;
}
.team-calendar-cell.is-expected-workday {
    box-shadow: inset 0 0 0 1px #d8e5ea;
}
.team-calendar-cell.has-missing-pep {
    background: #fff0f0;
    box-shadow: inset 0 0 0 2px #e0524d;
}
.team-calendar-page {
    overflow: hidden;
}
.team-calendar-page .app-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}
.team-calendar-page .workspace {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}
.team-calendar-page .topbar,
.team-calendar-page .metrics,
.team-calendar-page .alert {
    flex: 0 0 auto;
}
.team-calendar-page .team-calendar-panel {
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
}
.team-calendar-page .team-calendar-scroll {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.team-calendar-cell[data-team-calendar-cell] {
    cursor: pointer;
    transition: background-color .16s ease, box-shadow .16s ease;
}
.team-calendar-cell[data-team-calendar-cell]:hover {
    box-shadow: inset 0 0 0 2px rgba(0, 117, 111, .38);
}
.team-calendar-cell[data-team-calendar-cell]:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(0, 117, 111, .28);
    outline-offset: -3px;
}
.team-calendar-entry-dialog {
    width: min(720px, calc(100vw - 32px));
    max-height: min(86vh, 760px);
    padding: 0;
    overflow: auto;
    color: var(--text);
    background: #fff;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(11, 31, 40, .28);
}
.team-calendar-entry-dialog::backdrop {
    background: rgba(11, 31, 40, .54);
    backdrop-filter: blur(2px);
}
.team-calendar-entry-dialog-inner {
    display: grid;
    gap: 18px;
    padding: 22px;
}
.team-calendar-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.team-calendar-dialog-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.team-calendar-dialog-head h2,
.team-calendar-dialog-head p,
.team-calendar-entry-copy h3,
.team-calendar-entry-copy p {
    margin: 0;
}
.team-calendar-dialog-close {
    display: inline-grid;
    place-items: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    color: #435761;
    background: #f4f7f8;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.team-calendar-dialog-close:hover {
    color: var(--text);
    background: #eaf0f2;
}
.team-calendar-entry-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    background: #eef3f4;
    border-radius: 8px;
}
.team-calendar-entry-switch button {
    min-height: 40px;
    padding: 8px 14px;
    color: #49616e;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.team-calendar-entry-switch button.active {
    color: var(--accent);
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 34, 42, .08);
}
.team-calendar-entry-panel {
    display: grid;
    gap: 14px;
}
.team-calendar-entry-panel[hidden] {
    display: none;
}
.my-calendar-entry-dialog {
    width: min(680px, calc(100vw - 32px));
}
.my-calendar-dialog-status {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f4f8f8;
}
.my-calendar-dialog-status strong {
    color: var(--accent-dark);
}
.my-calendar-dialog-status span {
    color: var(--muted);
    font-size: 13px;
}
.my-calendar-dialog-status.is-live {
    border-color: #efc27f;
    background: #fff6e6;
}
.my-calendar-dialog-status.is-live strong {
    color: #8a4b00;
}
.team-calendar-entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.team-calendar-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.team-calendar-live-clock {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: #f4f8f8;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.team-calendar-live-status {
    display: grid;
    gap: 3px;
}
.team-calendar-live-status span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.team-calendar-live-status strong {
    color: var(--accent);
    font-size: 20px;
}
.team-calendar-live-status small {
    color: var(--muted);
}
.team-calendar-live-clock form,
.team-calendar-live-clock button {
    margin: 0;
}
.team-calendar-live-clock button {
    min-width: 180px;
}
.team-holiday,
.team-open-note {
    color: #a15c00 !important;
    font-weight: 800;
}
.mini-status {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    padding: 3px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
}
.mini-status.success {
    color: #0d7a48;
    background: #e9f8ef;
}
.mini-status.warning {
    color: #8a5200;
    background: #fff3d8;
}
.mini-status.danger {
    color: #b42318;
    background: #ffe7e5;
}
.mini-status.neutral {
    color: #49616e;
    background: #eef3f5;
}
.pep-weekdays {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfc;
}
.pep-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
}
.pep-field-row label {
    min-width: 0;
}
.pep-time-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}
.pep-flex-check {
    grid-column: 1 / -1;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #eef9f7;
    color: var(--brand);
}
.pep-form > label.wide {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.pep-missing-row td {
    background: #fbfdfe;
}
.pep-weekday-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.time-balance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.time-balance-card {
    display: grid;
    gap: 12px;
}
.time-balance-card > div span {
    color: var(--muted);
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
}
.time-balance-card > div strong {
    display: block;
    margin-top: 5px;
    font-size: 28px;
    color: var(--accent-dark);
}
.time-balance-card dl {
    display: grid;
    gap: 7px;
    margin: 0;
}
.time-balance-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 7px;
    border-top: 1px solid var(--border);
}
.time-balance-card dt {
    color: var(--muted);
    font-weight: 800;
}
.time-balance-card dd {
    margin: 0;
    font-weight: 900;
}
.compact-calendar-balances {
    gap: 10px;
    margin-bottom: 12px;
}
.calendar-balance-card {
    padding: 12px 14px;
    gap: 8px;
}
.calendar-balance-card summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
}
.calendar-balance-card summary::-webkit-details-marker {
    display: none;
}
.calendar-balance-card summary::after {
    content: "Details";
    grid-column: 1 / -1;
    justify-self: start;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}
.calendar-balance-card[open] summary::after {
    content: "Details ausblenden";
}
.calendar-balance-card summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.calendar-balance-card summary strong {
    color: var(--accent-dark);
    font-size: 20px;
    line-height: 1.1;
}
.calendar-balance-card dl {
    gap: 4px;
    padding-top: 8px;
}
.calendar-balance-card dl div {
    padding-top: 5px;
    font-size: 12px;
}
.time-report-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.print-report-body {
    background: #fff;
}
.print-report {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
}
.print-report-toolbar {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 18px;
}
.print-report-logo {
    width: 150px;
    max-height: 70px;
    object-fit: contain;
    background: #111820;
    border-radius: 4px;
    padding: 8px 10px;
}
.report-print-header {
    border-top: 4px solid var(--orange);
}
@media print {
    body {
        background: #fff;
    }
    .no-print,
    .sidebar,
    .topbar {
        display: none !important;
    }
    .print-report {
        max-width: none;
        padding: 0;
    }
    .workspace {
        padding: 0 !important;
    }
    .invoice-document {
        max-width: none;
        padding: 0;
        border: 0;
        box-shadow: none;
    }
    .invoice-lines {
        min-width: 0;
    }
    .panel,
    .metrics article {
        box-shadow: none !important;
        break-inside: avoid;
    }
    .table-wrap {
        overflow: visible;
    }
    a {
        color: inherit;
        text-decoration: none;
    }
}
.time-card-note {
    display: block;
    padding-top: 4px;
    border-top: 1px solid rgba(15, 35, 45, .08);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.muted-row { background: #fbfcfd; color: var(--muted); }
.report-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 18px;
    width: 100%;
    align-items: stretch;
}
.report-choice-card {
    display: flex;
    width: 100%;
    min-height: 230px;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}
.report-choice-card h2 { margin: 6px 0 8px; }
.report-choice-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.report-choice-kicker {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
}
@media (min-width: 721px) {
    .report-choice-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
.inner-report-panel {
    margin-top: 16px;
    margin-bottom: 16px;
    box-shadow: none;
}
.report-status-chart {
    display: grid;
    gap: 12px;
}
.report-status-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 52px;
    gap: 12px;
    align-items: center;
}
.report-status-row span {
    color: var(--muted);
    font-weight: 800;
}
.report-status-row i {
    height: 14px;
    border-radius: 999px;
    background: #e8eef0;
    overflow: hidden;
}
.report-status-row b {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: var(--brand);
}
.report-status-row b.warning { background: #d9991f; }
.report-status-row b.amber { background: #bd7f0c; }
.report-status-row b.ok { background: #0d7a48; }
.report-status-row b.danger-status { background: #c2261f; }
.report-status-row strong { text-align: right; }
.service-report-group {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}
.service-report-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #eef5f5;
}
.service-report-title h3 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 16px;
}
.service-report-title span {
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    text-align: right;
}
.month-grid { display: grid; gap: 9px; }
.month-row {
    display: grid;
    grid-template-columns: 42px 86px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--soft);
}
.month-row span { color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: 12px; }
.month-row strong { font-size: 13px; white-space: nowrap; }
.month-row i {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5ecef;
}
.month-row b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}
.entry-list { display: grid; gap: 9px; }
.entry-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--soft);
}
.entry-list strong, .entry-list span {
    display: block;
    overflow-wrap: anywhere;
}
.entry-list span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.entry-list b { color: var(--accent-dark); white-space: nowrap; }
.danger-zone { margin-top: 12px; }
.mobile-clock-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 139, 31, .18), transparent 30%),
        linear-gradient(160deg, #15252d 0%, #203740 48%, #edf3f4 48%, #edf3f4 100%);
    color: var(--text);
}
.mobile-clock-shell {
    width: min(100%, 480px);
    min-height: 100vh;
    margin: 0 auto;
    padding: max(18px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
    display: grid;
    align-content: start;
    gap: 16px;
}
.mobile-clock-header {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    padding: 8px 0 10px;
}
.mobile-clock-header img {
    width: 104px;
    max-height: 54px;
    object-fit: contain;
}
.mobile-clock-header h1 {
    margin: 0;
    font-size: 25px;
    color: #fff;
}
.mobile-clock-header p {
    margin: 2px 0 0;
    color: rgba(255,255,255,.72);
    font-weight: 800;
}
.mobile-clock-alert {
    box-shadow: 0 16px 35px rgba(15, 35, 45, .16);
}
.mobile-clock-card {
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
    padding: 26px 20px 22px;
    border-radius: 22px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(196, 211, 217, .9);
    box-shadow: 0 24px 50px rgba(13, 31, 40, .2);
}
.mobile-clock-card.is-active {
    border-color: rgba(245, 158, 11, .45);
}
.mobile-clock-date {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}
.mobile-clock-status {
    font-size: clamp(30px, 9vw, 44px);
    line-height: 1;
    letter-spacing: 0;
}
.mobile-clock-time {
    font-size: clamp(48px, 18vw, 74px);
    line-height: 1;
    font-weight: 950;
    color: var(--accent-dark);
    font-variant-numeric: tabular-nums;
}
.mobile-clock-subline {
    min-height: 22px;
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}
.mobile-clock-action-form {
    width: 100%;
    margin-top: 8px;
}
.mobile-clock-main-button {
    width: 100%;
    min-height: 76px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    font-size: 24px;
    font-weight: 950;
    box-shadow: 0 18px 34px rgba(15, 35, 45, .22);
}
.mobile-clock-main-button.clock-in {
    background: linear-gradient(135deg, #356b91, #18a77a);
}
.mobile-clock-main-button.clock-out {
    background: linear-gradient(135deg, #b42318, #e05d35);
}
.mobile-clock-main-button:disabled {
    cursor: not-allowed;
    background: #9aa8ad;
    box-shadow: none;
}
.mobile-clock-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.mobile-clock-stats article {
    padding: 14px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.93);
    border: 1px solid rgba(196, 211, 217, .85);
    box-shadow: 0 14px 28px rgba(13, 31, 40, .08);
}
.mobile-clock-stats span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.mobile-clock-stats strong {
    display: block;
    margin-top: 5px;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}
.mobile-clock-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.mobile-clock-links a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(196, 211, 217, .9);
    color: var(--accent-dark);
    font-weight: 950;
    text-decoration: none;
}
@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .sidebar nav { grid-template-columns: repeat(3, 1fr); }
    .logout { margin: 8px 12px 14px; }
    .split, .metrics, .dashboard-showcase, .dashboard-lower, .stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-management-grid { grid-template-columns: 1fr; }
    .company-edit-panel .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-profile-form { grid-template-columns: 1fr; }
    .admin-user-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-entry-top { grid-template-columns: 1fr 1fr; }
    .donut-layout { grid-template-columns: 180px minmax(0, 1fr); justify-items: stretch; }
    .hero-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-shell, .tool-grid, .time-clock-actions { grid-template-columns: 1fr; }
    .inspection-row-card { grid-template-columns: 1fr; align-items: stretch; }
    .inspection-row-stats { justify-content: flex-start; }
    .inspection-capture-form, .inspection-capture-form-pro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inspection-capture-main, .inspection-capture-side, .inspection-submit-row { grid-column: 1 / -1; }
    .inspection-item-card-pro { grid-template-columns: 42px minmax(180px, 240px) minmax(0, 1fr); }
    .inspection-item-side { grid-column: 3; justify-items: start; }
    .invoice-overview-panel { grid-template-columns: 1fr; }
    .invoice-overview-summary { border-right: 0; border-bottom: 1px solid var(--border); }
    .invoice-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice-address-row, .invoice-summary { grid-template-columns: 1fr; }
    .invoice-doc-head { display: grid; }
    .invoice-meta { text-align: left; }
    .login-intro { min-height: auto; }
}
@media (max-width: 720px) {
    .first-login-page {
        min-height: 100dvh;
        place-items: start center;
        padding: max(8px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom));
    }
    .first-login-page .login-shell {
        width: min(100%, calc(100vw - 16px));
        grid-template-columns: 1fr;
    }
    .first-login-page .login-intro {
        grid-template-columns: 92px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: start;
        gap: 3px 14px;
        min-height: 0;
        padding: 16px 18px;
        text-align: left;
    }
    .first-login-page .login-intro .login-logo {
        grid-row: 1 / span 2;
        width: 92px;
        margin: 0;
    }
    .first-login-page .login-intro h1 {
        align-self: end;
        font-size: 24px;
    }
    .first-login-page .login-intro p {
        align-self: start;
        margin: 0;
        font-size: 14px;
        line-height: 1.35;
    }
    .first-login-page .login-card {
        padding: 20px;
    }
    .first-login-page .login-card h2 {
        font-size: 23px;
    }
    .first-login-page .login-card > p {
        margin: 0 0 12px;
        line-height: 1.5;
    }
    .first-login-page .note-box {
        margin-top: 10px;
        padding: 12px;
    }
    .first-login-page .note-box p {
        margin: 4px 0 0;
        line-height: 1.4;
    }
    .first-login-page .primary,
    .first-login-page .button {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }
    .workspace { padding: 18px; }
    .topbar, .panel-head, .inline-filter, .filter-strip, .portal-head, .section-head, .toolbar-form, .company-profile-head { display: grid; align-items: stretch; }
    .sidebar nav, .split, .metrics, .dashboard-showcase, .dashboard-lower, .dashboard-hero-main, .hero-stat-grid, .profile-grid, .two-col, .three-col, .action-grid, .grid-form, .activity-field-grid, .contract-field-grid, .travel-cost-grid, .company-master-form, .company-address-row, .company-address-item, .company-cost-center-row, .company-structure-header, .company-structure-main, .company-structure-cost-center, .detail-list, .quick-entry-top, .stats-grid, .report-choice-grid, .report-status-row, .time-clock-actions, .time-clock-state, .portal-time-actions, .time-balance-grid, .admin-overview-grid, .admin-management-grid, .admin-tool-grid, .contract-live-grid, .invoice-detail-grid, .profile-readonly-grid, .pep-field-row, .pep-time-row { grid-template-columns: 1fr; }
    .company-structure-cost-center, .company-structure-empty { margin-left: 10px; }
    .company-structure-header { display: none; }
    .company-edit-panel .stack { grid-template-columns: 1fr; }
    .admin-profile-form, .admin-user-form { grid-template-columns: 1fr; }
    .admin-user-actions { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
    .admin-user-actions .button { width: 100%; justify-content: center; }
    .quick-mode-head { display: grid; }
    .hero-number { text-align: left; }
    .donut-layout { grid-template-columns: 1fr; justify-items: center; }
    .donut-svg { width: 170px !important; height: 170px !important; max-width: 170px !important; max-height: 170px !important; }
    .inventory-grid { grid-template-columns: 1fr; }
    .login-intro, .login-card, .portal-head, .tool-card { padding: 22px; }
    .portal-user { justify-content: flex-start; }
    .topbar h1 { font-size: 24px; }
    .material-row { grid-template-columns: 1fr; }
    .material-entry-head { display: grid; }
    .contract-form-actions { display: grid; }
    .time-entry-row, .travel-entry-row, .travel-time-row, .billable-travel-time-row, .overnight-entry-row { grid-template-columns: 1fr; }
    .invoice-document { padding: 20px; }
    .invoice-doc-footer { display: grid; }
    .invoice-lines { min-width: 720px; }
    .inspection-row-card .actions { justify-content: flex-start; }
    .inspection-workspace { padding: 12px; background: #eef4f5; }
    .inspection-workspace .topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        margin: -12px -12px 12px;
        padding: 14px 12px;
        border-radius: 0 0 14px 14px;
        background: rgba(244,247,247,.96);
        box-shadow: 0 12px 24px rgba(13,31,40,.08);
        backdrop-filter: blur(10px);
    }
    .inspection-workspace .topbar h1 { font-size: 21px; }
    .inspection-workspace .topbar p { font-size: 13px; }
    .inspection-workspace .topbar-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .inspection-workspace .quick-entry-button,
    .inspection-workspace .user-chip {
        width: 100%;
        justify-content: center;
    }
    .inspection-capture-panel,
    .inspection-item-card {
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 10px 24px rgba(13,31,40,.07);
    }
    .inspection-capture-form, .inspection-capture-form-pro, .inspection-metrics, .inspection-mini-grid { grid-template-columns: 1fr; }
    .inspection-capture-main, .inspection-capture-side, .inspection-submit-row { grid-column: 1; }
    .inspection-item-card-pro { grid-template-columns: 1fr; }
    .inspection-item-number { width: 34px; height: 34px; font-size: 15px; }
    .inspection-item-side { grid-column: auto; justify-items: start; }
    .inspection-item-media { order: 1; }
    .inspection-item-content { order: 2; }
    .inspection-item-side { order: 3; }
    .inspection-photo-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .inspection-photo-stack figure:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }
    .inspection-photo-stack img {
        aspect-ratio: 1 / 1;
    }
    .inspection-photo-stack figure:first-child img {
        aspect-ratio: 4 / 3;
    }
    .inspection-upload-box,
    .inspection-camera-box,
    .inspection-photo-source-main,
    .inspection-capture-main,
    .inspection-capture-side {
        padding: 14px;
        border-radius: 12px;
    }
    .inspection-photo-source-options {
        grid-template-columns: 1fr;
    }
    .inspection-photo-source-options button {
        min-height: 48px;
    }
    .inspection-suggestion-box button {
        padding: 12px;
    }
    .inspection-photo-modal {
        padding: 12px;
    }
    .inspection-photo-modal-inner {
        grid-template-columns: 1fr;
        width: 100%;
        max-height: 94vh;
        overflow-y: auto;
    }
    .inspection-photo-modal-image img {
        max-height: 62vh;
        border-radius: 8px;
    }
    .inspection-photo-modal-text {
        padding: 14px;
    }
    .inspection-photo-modal-close {
        top: 8px;
        right: 8px;
        width: 44px;
        height: 44px;
    }
    .inspection-photo-nav {
        top: calc(31vh + 12px);
        width: 40px;
        height: 48px;
        font-size: 34px;
    }
    .inspection-photo-prev { left: 4px; }
    .inspection-photo-next { right: 4px; }
    .inspection-submit-row .primary,
    .inspection-submit-row .button {
        width: 100%;
        justify-content: center;
        min-height: 46px;
    }
    .inspection-upload-status {
        width: 100%;
        min-width: 0;
        flex-basis: 100%;
    }
    .inspection-saving-overlay > div {
        width: 100%;
        padding: 22px 18px;
    }
    .inspection-item-head { display: grid; }
.inspection-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .time-card-calendar { grid-template-columns: 1fr; }
    .time-card-weekday { display: none; }
    .time-card-day { min-height: 104px; }
    .time-card-day.is-empty { display: none; }
}

/* Workspace mobile polish: shared responsive layer for portal and tool shells. */
@media (max-width: 900px) {
    html {
        -webkit-text-size-adjust: 100%;
    }
    body {
        overflow-x: hidden;
    }
    .portal-shell {
        width: min(100%, calc(100vw - 20px));
        padding: 12px 0 18px;
    }
    .portal-head {
        align-items: center;
        gap: 16px;
        margin-bottom: 14px;
        padding: 16px;
    }
    .portal-brand-row {
        flex: 1 1 auto;
        gap: 10px;
    }
    .portal-logo {
        width: 92px;
        margin: 0;
        padding: 6px 8px;
    }
    .portal-head h1 {
        font-size: 22px;
        text-align: left;
    }
    .portal-head p {
        text-align: left;
        display: none;
    }
    .portal-user {
        justify-content: flex-end;
        width: auto;
        flex: 0 0 auto;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .notification-center,
    .portal-user-name,
    .portal-user .session-logout-form {
        flex: 0 0 auto;
    }
    .notification-center summary,
    .portal-user-name,
    .portal-user .session-logout-button {
        width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        justify-content: center;
    }
    .portal-user button {
        width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        justify-content: center;
    }
    .portal-action-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .notification-center summary > strong {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
    .portal-head .session-timer {
        display: none;
    }
    .notification-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 76px;
        width: auto;
        max-height: calc(100vh - 96px);
        overflow: auto;
    }
    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .tool-card {
        min-height: 170px;
        padding: 16px;
        gap: 16px;
    }
    .tool-card-head {
        gap: 9px;
    }
    .tool-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }
    .tool-icon svg {
        width: 16px;
        height: 16px;
    }
    .tool-featured {
        grid-column: 1 / -1;
        min-height: 210px;
    }
    .tool-card h2 {
        font-size: 19px;
    }
    .app-shell {
        display: block;
    }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 60;
        height: auto;
        max-height: 46vh;
        overflow: auto;
        border-bottom: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 12px 28px rgba(13, 31, 40, .16);
    }
    .brand {
        padding: 12px 16px 8px;
    }
    .brand-logo {
        width: 132px;
    }
    .sidebar nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 12px 12px;
        scroll-snap-type: x proximity;
    }
    .sidebar nav a,
    .sidebar nav a.nav-child {
        flex: 0 0 auto;
        min-width: max-content;
        margin-left: 0;
        padding: 9px 11px;
        white-space: nowrap;
        scroll-snap-align: start;
    }
    .sidebar nav a.nav-child::before,
    .sidebar nav .nav-section-divider {
        display: none;
    }
    .logout {
        display: none;
    }
    .workspace {
        padding: 16px;
    }
    .topbar {
        display: grid;
        gap: 12px;
        margin-bottom: 16px;
    }
    .topbar-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: stretch;
        gap: 8px;
    }
    .topbar-actions > *,
    .topbar-actions .button,
    .topbar-actions .primary,
    .topbar-actions .quick-entry-button,
    .topbar-actions .user-chip,
    .topbar-actions .session-logout-form,
    .topbar-actions .session-logout-button {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }
    .panel {
        padding: 14px;
        margin-bottom: 14px;
    }
    .table-wrap {
        margin-inline: -4px;
        padding-bottom: 4px;
        border-radius: 8px;
        overscroll-behavior-x: contain;
    }
    .table-wrap table {
        min-width: 720px;
    }
    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .metrics article {
        min-width: 0;
    }
    .invoice-overview-summary,
    .invoice-month-chart {
        padding: 15px;
    }
    .invoice-overview-summary > strong {
        font-size: 28px;
    }
    .invoice-overview-facts {
        margin-top: 16px;
    }
    .invoice-month-chart-scroll {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }
    .invoice-month-bars {
        min-width: 680px;
    }
    .time-clock-actions .primary,
    .time-clock-actions .button {
        min-height: 54px;
        font-size: 17px;
    }
    .time-card-calendar-panel {
        overflow: hidden;
    }
    .time-card-calendar {
        grid-template-columns: repeat(7, minmax(96px, 1fr));
        overflow-x: auto;
    }
    .team-calendar-scroll,
    .compact-month-scroll {
        max-height: calc(100vh - 260px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    .team-calendar-table {
        min-width: 980px;
    }
}

@media (max-width: 520px) {
    .admin-tool-license-period {
        grid-template-columns: 1fr;
    }
    .portal-shell {
        width: min(100%, calc(100vw - 12px));
        padding-top: 6px;
    }
    .portal-head {
        padding: 14px;
        border-radius: 8px;
        gap: 10px;
    }
    .portal-logo {
        width: 82px;
    }
    .portal-head h1 {
        font-size: 20px;
    }
    .tool-grid {
        grid-template-columns: 1fr;
    }
    .tool-card {
        min-height: auto;
    }
    .portal-time-actions {
        grid-template-columns: 1fr;
    }
    .workspace {
        padding: 12px;
    }
    .topbar h1 {
        font-size: 22px;
        line-height: 1.15;
    }
    .topbar p {
        font-size: 14px;
    }
    .topbar-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .panel {
        padding: 12px;
    }
    .metrics {
        grid-template-columns: 1fr;
    }
    .sidebar {
        max-height: 42vh;
    }
    .sidebar nav a,
    .sidebar nav a.nav-child {
        font-size: 14px;
    }
    .brand-logo {
        width: 118px;
    }
    .pep-weekday-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .time-card-calendar {
        grid-template-columns: repeat(7, minmax(82px, 1fr));
    }
}

.invoice-status-form {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.invoice-status-form select.invoice-status-control {
    width: var(--invoice-status-width, 76px);
    min-width: 0;
    min-height: 28px;
    padding: 4px 10px;
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    background-image: none;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
}

.invoice-status-form select.invoice-status-control.status-open {
    --invoice-status-width: 66px;
    color: #53616b;
    background-color: #eef2f4;
}
.invoice-status-form select.invoice-status-control.status-transferred {
    --invoice-status-width: 156px;
    color: var(--ok);
    background-color: var(--ok-bg);
}
.invoice-status-form select.invoice-status-control:hover,
.invoice-status-form select.invoice-status-control:focus-visible {
    border-color: currentColor;
    outline: 0;
}

/* Mobile readability round 2: larger touch targets, calmer tables and forms. */
@media (max-width: 900px) {
    input,
    select,
    textarea,
    button,
    .button,
    .primary {
        min-height: 44px;
    }
    input,
    select,
    textarea {
        font-size: 16px;
    }
    label {
        gap: 7px;
    }
    .toolbar-form,
    .filter-strip,
    .inline-filter {
        gap: 10px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #f8fbfc;
    }
    .toolbar-form label,
    .filter-strip label,
    .inline-filter label {
        min-width: min(100%, 220px);
    }
    .toolbar-form input,
    .toolbar-form select,
    .filter-strip input,
    .filter-strip select,
    .inline-filter input,
    .inline-filter select {
        width: 100%;
    }
    .table-wrap {
        border: 1px solid var(--border);
        background: #fff;
    }
    .table-wrap table {
        border-collapse: separate;
        border-spacing: 0;
    }
    .table-wrap th,
    .table-wrap td {
        padding: 11px 12px;
        vertical-align: top;
    }
    .table-wrap th:first-child,
    .table-wrap td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #fff;
        box-shadow: 8px 0 14px rgba(20, 34, 42, .05);
    }
    .table-wrap th:first-child {
        background: #f4f7f8;
        z-index: 3;
    }
    .actions {
        gap: 8px;
    }
    .actions,
    .inline-action {
        flex-wrap: wrap;
    }
    .actions .button,
    .actions button,
    .inline-action .button,
    .inline-action button {
        min-height: 38px;
    }
    .activity-form-section,
    .contract-form-section,
    .time-admin-entry-panel,
    .approval-form,
    .quick-entry-form,
    .pep-form {
        gap: 12px;
    }
    .activity-form-section {
        padding: 14px;
    }
    .time-clock-card,
    .portal-time-widget {
        border-radius: 8px;
    }
    .time-clock-state div,
    .portal-time-widget,
    .metrics article {
        padding: 12px;
    }
    .time-card-day,
    .calendar-day,
    .team-calendar-cell {
        font-size: 13px;
    }
    .time-card-day strong,
    .calendar-day strong,
    .team-calendar-cell strong {
        font-size: 14px;
    }
    .mini-status {
        white-space: normal;
        line-height: 1.2;
    }
    .notification-item {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 14px;
    }
    h1,
    h2,
    h3 {
        overflow-wrap: anywhere;
    }
    .portal-user {
        display: flex;
        grid-template-columns: none;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .portal-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .portal-brand-row {
        min-width: 0;
    }
    .portal-brand-row h1 {
        white-space: nowrap;
    }
    .notification-center summary .portal-action-label,
    .portal-user-name .portal-action-label,
    .portal-user .session-logout-button .portal-action-label,
    .portal-user .session-logout-button .session-logout-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .session-logout-button .session-countdown {
        margin-left: 4px;
    }
    .toolbar-form,
    .filter-strip,
    .inline-filter {
        display: grid;
        grid-template-columns: 1fr;
    }
    .toolbar-form button,
    .toolbar-form .button,
    .filter-strip button,
    .filter-strip .button,
    .inline-filter button,
    .inline-filter .button {
        width: 100%;
    }
    .table-wrap {
        margin-inline: -8px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }
    .table-wrap table {
        min-width: 680px;
    }
    .table-wrap th,
    .table-wrap td {
        padding: 10px;
    }
    .sidebar nav {
        padding-inline: 10px;
    }
    .sidebar nav a,
    .sidebar nav a.nav-child {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
    }
    .time-clock-actions {
        gap: 10px;
    }
    .time-clock-actions form,
    .time-clock-actions button {
        width: 100%;
    }
    .time-card-calendar-panel,
    .team-calendar-panel {
        margin-inline: -6px;
    }
    .time-card-calendar-head,
    .panel-head {
        gap: 10px;
    }
    .time-card-calendar {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
    .time-card-day {
        min-height: 94px;
        padding: 9px;
    }
    .team-calendar-scroll,
    .compact-month-scroll {
        max-height: calc(100vh - 220px);
    }
    .team-calendar-table {
        min-width: 900px;
    }
    .approval-form,
    #approvals .approval-form,
    .time-book-approval-table .approval-form {
        grid-template-columns: 1fr !important;
    }
    .approval-form > *,
    #approvals .approval-form > *,
    .time-book-approval-table .approval-form > * {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }
    .push-panel {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
        margin-top: 0;
    }
    .push-panel-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
    .push-panel .button {
        width: 100%;
        justify-content: center;
    }
    .push-status {
        min-width: 0;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .team-calendar-page {
        overflow: auto;
    }
    .team-calendar-page .app-shell {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    .team-calendar-page .workspace {
        display: block;
        height: auto;
        min-height: 0;
        overflow: visible;
    }
    .team-calendar-page .team-calendar-panel {
        min-height: 62vh;
        overflow: visible;
    }
    .team-calendar-page .team-calendar-scroll {
        height: auto;
        min-height: 380px;
        max-height: calc(100vh - 220px);
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 600px) {
    .team-calendar-entry-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }
    .team-calendar-entry-dialog-inner {
        gap: 14px;
        padding: 16px;
    }
    .team-calendar-dialog-head {
        gap: 12px;
        padding-bottom: 12px;
    }
    .team-calendar-entry-form {
        grid-template-columns: 1fr;
    }
    .team-calendar-entry-form .wide,
    .team-calendar-form-actions {
        grid-column: 1;
    }
    .team-calendar-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .team-calendar-form-actions > * {
        width: 100%;
        justify-content: center;
    }
    .team-calendar-live-clock {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .team-calendar-live-clock form,
    .team-calendar-live-clock button {
        width: 100%;
    }
}

/* Begehungen: übersichtlicher Arbeitsschutz-Arbeitsbereich */
.inspection-overview-page,
.inspection-detail-page {
    background: #f3f6f7;
}
.inspection-overview-workspace {
    background: #f3f6f7;
}
.inspection-overview-metrics,
.inspection-detail-page .inspection-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}
.inspection-overview-metrics article,
.inspection-detail-page .inspection-metrics article {
    min-height: 112px;
    border-top: 3px solid #b8cacd;
}
.inspection-overview-metrics article strong,
.inspection-detail-page .inspection-metrics article strong {
    margin-top: 4px;
    font-size: 28px;
}
.inspection-overview-metrics article small,
.inspection-detail-page .inspection-metrics article small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.inspection-overview-metrics .inspection-metric-warning,
.inspection-detail-page .inspection-metric-warning {
    border-top-color: #df951f;
    background: #fffaf1;
}
.inspection-overview-metrics .inspection-metric-critical,
.inspection-detail-page .inspection-metric-critical {
    border-top-color: #c43b31;
    background: #fff6f5;
}
.inspection-overview-panel {
    padding: 0;
    overflow: hidden;
}
.inspection-company-head {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.inspection-company-head h2 {
    margin: 3px 0 4px;
    font-size: 23px;
}
.inspection-company-head p {
    margin: 0;
}
.inspection-section-label {
    color: #294f6b;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.inspection-view-switch {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #cbd9dc;
    border-radius: 7px;
    background: #f5f8f9;
}
.inspection-view-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    color: #35515a;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}
.inspection-view-option + .inspection-view-option {
    border-left: 1px solid #cbd9dc;
}
.inspection-view-option:hover,
.inspection-view-option:focus-visible {
    background: #eaf3f2;
    color: #006c66;
    outline: 0;
}
.inspection-view-option.is-active {
    background: #356b91;
    color: #fff;
}
.inspection-toolbar {
    margin: 0;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    background: #f7f9fa;
}
.inspection-direct-overview {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: #f3f6f7;
}
.inspection-overview-group {
    overflow: hidden;
    border: 1px solid #cbd9dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(23, 52, 61, .05);
}
.inspection-overview-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
    padding: 11px 14px;
    border-bottom: 1px solid #d9e4e5;
    background: #edf6f4;
}
.inspection-overview-group-company {
    display: grid;
    min-width: 0;
    gap: 3px;
}
.inspection-overview-group-company .name-link {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inspection-overview-group-company small {
    color: #5c7078;
    font-size: 11px;
    font-weight: 750;
}
.inspection-overview-group-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}
.inspection-overview-group-actions .button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}
.inspection-overview-flat {
    border-top: 3px solid #356b91;
}
.inspection-overview-empty {
    border: 1px solid #cbd9dc;
    border-radius: 8px;
    background: #fff;
}
.inspection-toolbar label {
    flex: 1 1 360px;
    max-width: 620px;
}
.inspection-table-wrap {
    margin: 0;
    border: 0;
    border-radius: 0;
}
.inspection-overview-table {
    width: 100%;
    min-width: 980px;
}
.inspection-overview-table th {
    background: #eef3f4;
    color: #4d616b;
    font-size: 11px;
    letter-spacing: .02em;
}
.inspection-overview-table td {
    vertical-align: middle;
}
.inspection-overview-table td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}
.inspection-overview-table .clickable-row {
    cursor: pointer;
    transition: background-color .16s ease, box-shadow .16s ease;
}
.inspection-overview-table .clickable-row:hover,
.inspection-overview-table .clickable-row:focus-visible {
    background: #f1f8f7;
    box-shadow: inset 4px 0 0 #356b91;
    outline: 0;
}
.inspection-count {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf2f3;
    color: #344b55;
    font-size: 13px;
    font-weight: 950;
}
.inspection-count.is-open {
    background: #fff2d8;
    color: #8a5700;
}
.inspection-count.is-critical {
    background: #fee9e7;
    color: #b52e27;
}
.inspection-company-row.is-expanded {
    background: #edf7f5;
    box-shadow: inset 4px 0 0 #356b91;
}
.inspection-company-name strong,
.inspection-company-name small {
    display: block;
}
.inspection-company-name strong {
    color: #005f5a;
    font-size: 14px;
}
.inspection-company-status-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.inspection-expand-cue {
    position: relative;
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    border: 1px solid #cbd9dc;
    border-radius: 6px;
    background: #fff;
}
.inspection-expand-cue::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 8px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #31515a;
    border-bottom: 2px solid #31515a;
    transform: rotate(45deg);
    transition: transform .16s ease, top .16s ease;
}
.inspection-company-row.is-expanded .inspection-expand-cue::before {
    top: 11px;
    transform: rotate(225deg);
}
.inspection-company-detail-row[hidden] {
    display: none !important;
}
.inspection-company-detail-row > td {
    padding: 0;
    border-bottom: 1px solid #cddadd;
    background: #f4f7f8;
}
.inspection-company-inline {
    margin: 0 20px 18px 46px;
    overflow: hidden;
    border: 1px solid #cbd9dc;
    border-top: 3px solid #356b91;
    border-radius: 0 0 8px 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(23, 52, 61, .08);
}
.inspection-inline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid #dce5e7;
    background: #f5f9f8;
}
.inspection-inline-head > div:first-child {
    display: grid;
    gap: 2px;
}
.inspection-inline-head > div:first-child span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
}
.inspection-inline-head > div:first-child strong {
    color: #24434d;
    font-size: 14px;
}
.inspection-inline-head .pill-row {
    gap: 7px;
}
.inspection-inline-head .button,
.inspection-inline-head .primary {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
}
.inspection-inline-list {
    display: grid;
}
.inspection-inline-item {
    display: grid;
    grid-template-columns: 128px minmax(240px, 1fr) minmax(125px, auto) minmax(250px, .8fr) 22px;
    gap: 14px;
    align-items: center;
    min-height: 76px;
    padding: 11px 14px;
    border-bottom: 1px solid #e0e8ea;
    background: #fff;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}
.inspection-inline-item:last-child {
    border-bottom: 0;
}
.inspection-inline-item:hover,
.inspection-inline-item:focus-visible {
    background: #f2faf8;
    box-shadow: inset 3px 0 0 #356b91;
    outline: 0;
}
.inspection-inline-item time,
.inspection-inline-copy strong,
.inspection-inline-copy small {
    display: block;
}
.inspection-inline-item time strong {
    color: #233e48;
    font-size: 13px;
}
.inspection-inline-item time small,
.inspection-inline-copy small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}
.inspection-inline-copy {
    min-width: 0;
}
.inspection-inline-copy .name-link {
    display: block;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inspection-inline-state {
    min-width: 0;
}
.inspection-inline-counts {
    display: grid;
    grid-template-columns: repeat(4, minmax(45px, 1fr));
    gap: 5px;
}
.inspection-inline-counts span {
    display: grid;
    gap: 2px;
    min-height: 43px;
    padding: 5px 7px;
    border-radius: 6px;
    background: #f1f5f6;
    text-align: center;
}
.inspection-inline-counts span.has-warning {
    background: #fff2d8;
    color: #8a5700;
}
.inspection-inline-counts span.has-critical {
    background: #fee9e7;
    color: #b52e27;
}
.inspection-inline-counts small {
    color: inherit;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}
.inspection-inline-counts strong {
    font-size: 13px;
}
.inspection-inline-arrow {
    position: relative;
    display: block;
    width: 20px;
    height: 28px;
}
.inspection-inline-arrow::before {
    content: "";
    position: absolute;
    top: 9px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-top: 2px solid #294f6b;
    border-right: 2px solid #294f6b;
    transform: rotate(45deg);
}
.inspection-table-actions {
    min-width: 200px;
    white-space: nowrap;
}
.inspection-table-actions > a,
.inspection-table-actions > form {
    display: inline-flex;
    margin: 2px 8px 2px 0;
}
.inspection-table-actions .danger-link {
    color: var(--danger);
}
.inspection-empty-state {
    display: grid;
    justify-items: start;
    gap: 7px;
    min-height: 150px;
    align-content: center;
    padding: 24px;
    background: #f8fafb;
}
.inspection-empty-state strong {
    font-size: 19px;
}
.inspection-empty-state span {
    color: var(--muted);
}
.inspection-empty-state .primary {
    margin-top: 4px;
}
.inspection-master-panel {
    width: min(920px, 100%);
    margin-inline: auto;
}
.inspection-participant-fieldset {
    min-width: 0;
    margin: 2px 0 0;
    padding: 14px;
    border: 1px solid #d5e1e4;
    border-radius: 7px;
    background: #f8fbfb;
}
.inspection-participant-fieldset legend {
    padding: 0 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}
.inspection-participant-fieldset > .muted {
    margin: 0 0 12px;
    font-size: 13px;
}
.inspection-participant-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}
.inspection-team-participants,
.inspection-external-participants {
    min-width: 0;
    padding: 12px;
    border: 1px solid #dce6e8;
    border-radius: 7px;
    background: #fff;
}
.inspection-participant-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.inspection-participant-section-head > div,
.inspection-participant-section-head > strong {
    min-width: 0;
}
.inspection-participant-section-head strong,
.inspection-participant-section-head small {
    display: block;
}
.inspection-participant-section-head small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}
.inspection-team-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
.inspection-team-option {
    display: flex;
    min-width: 0;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 9px;
    border: 1px solid #dce6e8;
    border-radius: 6px;
    background: #f9fbfb;
    cursor: pointer;
}
.inspection-team-option:hover {
    border-color: #a9d2ce;
    background: #f0f8f7;
}
.inspection-team-option.is-inactive {
    color: #7a898f;
    background: #f2f4f5;
}
.inspection-team-option input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin: 0;
}
.inspection-team-option span {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inspection-add-participant {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
}
.inspection-external-list {
    display: grid;
    gap: 7px;
}
.inspection-external-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 6px;
}
.inspection-external-row input {
    min-width: 0;
}
.inspection-remove-participant {
    display: grid;
    width: 36px;
    min-width: 36px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid #e6c2bf;
    border-radius: 6px;
    background: #fff6f5;
    color: #a72d27;
    font-size: 20px;
    line-height: 1;
}
.inspection-remove-participant:hover {
    border-color: #d99d98;
    background: #ffedeb;
}
.inspection-participant-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #d5e3e4;
    border-radius: 7px;
    background: #fff;
}
.inspection-participant-summary > div:first-child span,
.inspection-participant-summary > div:first-child strong {
    display: block;
}
.inspection-participant-summary > div:first-child span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.inspection-participant-summary > div:first-child strong {
    margin-top: 2px;
    font-size: 20px;
}
.inspection-participant-chips {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
}
.inspection-participant-chips > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid #d5e5e3;
    border-radius: 6px;
    background: #f1f8f7;
    color: #174c48;
    font-size: 12px;
    font-weight: 800;
}
.inspection-participant-chips small {
    color: #667980;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}
.inspection-detail-page .inspection-capture-main {
    align-content: start;
}
.inspection-detail-page .inspection-capture-main textarea {
    min-height: 112px;
}
.inspection-finding-block,
.inspection-measure-block {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 3px solid #9cafb6;
    background: #f7f9fa;
}
.inspection-measure-block {
    border-left-color: #16857b;
    background: #f1f8f7;
}
.inspection-finding-block > strong,
.inspection-measure-block > strong {
    display: block;
    margin-bottom: 5px;
    color: #4e626b;
    font-size: 11px;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.inspection-finding-block p,
.inspection-measure-block p {
    margin: 0;
    line-height: 1.5;
}
.inspection-responsibility-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.inspection-responsibility-row span {
    display: grid;
    gap: 2px;
    min-width: 150px;
    padding: 9px 11px;
    border: 1px solid #d7e1e4;
    border-radius: 7px;
    background: #fff;
}
.inspection-responsibility-row small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.inspection-responsibility-row strong {
    font-size: 13px;
}

@media (max-width: 980px) {
    .inspection-overview-metrics,
    .inspection-detail-page .inspection-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .inspection-overview-page .workspace,
    .inspection-detail-page .workspace {
        padding: 10px;
    }
    .inspection-overview-page .topbar,
    .inspection-detail-page .topbar {
        margin-bottom: 12px;
    }
    .inspection-overview-metrics,
    .inspection-detail-page .inspection-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .inspection-overview-metrics article,
    .inspection-detail-page .inspection-metrics article {
        min-height: 86px;
        padding: 11px;
    }
    .inspection-overview-metrics article strong,
    .inspection-detail-page .inspection-metrics article strong {
        font-size: 23px;
    }
    .inspection-participant-fieldset {
        padding: 11px;
    }
    .inspection-participant-columns,
    .inspection-team-picker {
        grid-template-columns: 1fr;
    }
    .inspection-participant-section-head {
        align-items: flex-start;
    }
    .inspection-participant-summary {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
    }
    .inspection-participant-summary > .button {
        grid-column: 1 / -1;
        justify-content: center;
    }
    .inspection-overview-panel {
        border-radius: 8px;
    }
    .inspection-company-head {
        padding: 16px;
    }
    .inspection-company-head .pill-row {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .inspection-company-head .pill-row > * {
        width: 100%;
        justify-content: center;
    }
    .inspection-toolbar {
        padding: 12px 16px;
    }
    .inspection-toolbar label {
        max-width: none;
    }
    .inspection-table-wrap {
        margin: 0;
        overflow: visible;
    }
    .inspection-overview-table,
    .inspection-overview-table tbody {
        display: block;
        min-width: 0 !important;
        width: 100%;
    }
    .inspection-overview-table thead {
        display: none;
    }
    .inspection-overview-table tbody tr:not(.inspection-empty-row) {
        display: block;
        margin: 10px;
        overflow: hidden;
        border: 1px solid #d3dfe2;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 5px 16px rgba(18, 42, 52, .05);
    }
    .inspection-overview-table tbody tr:not(.inspection-empty-row) td {
        position: static;
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        border: 0;
        border-bottom: 1px solid #e4ebed;
        background: transparent;
        box-shadow: none;
        white-space: normal;
    }
    .inspection-overview-table tbody tr:not(.inspection-empty-row) td:last-child {
        border-bottom: 0;
    }
    .inspection-overview-table tbody tr:not(.inspection-empty-row) td::before {
        content: attr(data-label);
        color: #5c7078;
        font-size: 10px;
        font-weight: 950;
        letter-spacing: .03em;
        text-transform: uppercase;
    }
    .inspection-overview-table tbody tr:not(.inspection-empty-row) td:first-child {
        background: #f3f8f7;
    }
    .inspection-overview-table .inspection-table-actions {
        min-width: 0;
        white-space: normal;
    }
    .inspection-table-actions > a,
    .inspection-table-actions > form {
        margin-right: 12px;
    }
    .inspection-empty-row,
    .inspection-empty-row td {
        display: block;
        width: 100%;
    }
    .inspection-empty-state {
        min-height: 175px;
    }
    .inspection-detail-page .inspection-capture-panel {
        padding: 12px;
    }
    .inspection-detail-page .inspection-capture-main,
    .inspection-detail-page .inspection-capture-side {
        padding: 12px;
    }
    .inspection-detail-page .inspection-dictation-row .button {
        flex: 1 1 100%;
        justify-content: center;
        min-height: 44px;
    }
    .inspection-detail-page .inspection-item-card-pro {
        gap: 12px;
    }
    .inspection-responsibility-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 420px) {
    .inspection-overview-metrics,
    .inspection-detail-page .inspection-metrics {
        grid-template-columns: 1fr 1fr;
    }
    .inspection-overview-table tbody tr:not(.inspection-empty-row) td {
        grid-template-columns: 94px minmax(0, 1fr);
    }
    .inspection-responsibility-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .inspection-inline-item {
        grid-template-columns: 108px minmax(190px, 1fr) minmax(110px, auto) minmax(220px, .8fr) 18px;
        gap: 10px;
    }
}

@media (max-width: 720px) {
    .inspection-overview-page .inspection-company-head {
        display: grid;
        gap: 14px;
        padding: 16px 14px;
    }
    .inspection-view-switch {
        width: 100%;
    }
    .inspection-view-option {
        min-height: 42px;
        padding-inline: 9px;
    }
    .inspection-direct-overview {
        gap: 11px;
        padding: 10px;
    }
    .inspection-overview-group-head {
        display: grid;
        gap: 9px;
        padding: 11px 12px;
    }
    .inspection-overview-group-company .name-link {
        font-size: 14px;
        white-space: normal;
    }
    .inspection-overview-group-actions {
        justify-content: space-between;
    }
    .inspection-overview-group-actions .button {
        min-height: 32px;
        padding: 6px 9px;
        font-size: 11px;
    }
    .inspection-company-table tbody tr.inspection-company-row {
        position: relative;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0;
        padding: 0;
    }
    .inspection-company-table tbody tr.inspection-company-row td {
        display: block;
        width: auto;
        min-height: 0;
        padding: 9px 10px;
        border: 0;
        border-right: 1px solid #e4ebed;
        border-bottom: 1px solid #e4ebed;
        background: transparent;
    }
    .inspection-company-table tbody tr.inspection-company-row td::before {
        display: block;
        margin-bottom: 4px;
    }
    .inspection-company-table tbody tr.inspection-company-row td:first-child {
        grid-column: 1 / -1;
        grid-row: 1;
        padding: 13px 48px 12px 13px;
        background: #f3f8f7;
    }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(2) {
        grid-column: 1 / span 2;
        grid-row: 2;
    }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(8) {
        grid-column: 3 / span 3;
        grid-row: 2;
    }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(3) { grid-column: 1; grid-row: 3; }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(4) { grid-column: 2; grid-row: 3; }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(5) { grid-column: 3; grid-row: 3; }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(6) { grid-column: 4; grid-row: 3; }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(7) { grid-column: 5; grid-row: 3; }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(7),
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(8) {
        border-right: 0;
    }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(n+3):nth-child(-n+7) {
        text-align: center;
    }
    .inspection-company-table tbody tr.inspection-company-row td:nth-child(n+3):nth-child(-n+7)::before {
        text-align: center;
    }
    .inspection-company-table .inspection-company-status-cell {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding-right: 46px !important;
    }
    .inspection-company-table .inspection-expand-cue {
        position: absolute;
        top: 14px;
        right: 13px;
    }
    .inspection-company-table tbody tr.inspection-company-detail-row {
        display: block;
        margin: -5px 10px 14px;
        overflow: visible;
        border: 0;
        border-radius: 0 0 8px 8px;
        background: transparent;
        box-shadow: none;
    }
    .inspection-company-table tbody tr.inspection-company-detail-row[hidden] {
        display: none !important;
    }
    .inspection-company-table tbody tr.inspection-company-detail-row > td {
        display: block;
        width: 100%;
        min-height: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }
    .inspection-company-table tbody tr.inspection-company-detail-row > td::before {
        display: none;
        content: none;
    }
    .inspection-company-inline {
        margin: 0 0 0 12px;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 7px 18px rgba(23, 52, 61, .08);
    }
    .inspection-inline-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 11px;
    }
    .inspection-inline-head .pill-row {
        display: flex;
        width: auto;
    }
    .inspection-inline-head .button,
    .inspection-inline-head .primary {
        width: auto;
        min-height: 32px;
        padding: 6px 8px;
        font-size: 10px;
    }
    .inspection-inline-item {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 10px;
        min-height: 0;
        padding: 12px 34px 12px 12px;
    }
    .inspection-inline-item time {
        grid-column: 1;
        grid-row: 1;
    }
    .inspection-inline-copy {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .inspection-inline-copy .name-link {
        font-size: 15px;
        white-space: normal;
    }
    .inspection-inline-state {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }
    .inspection-inline-counts {
        grid-column: 1 / -1;
        grid-row: 3;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .inspection-inline-arrow {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
    }
}

@media (max-width: 430px) {
    .inspection-inline-head {
        grid-template-columns: 1fr;
    }
    .inspection-inline-head .pill-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .inspection-inline-head .button,
    .inspection-inline-head .primary {
        width: 100%;
        justify-content: center;
    }
    .inspection-company-inline {
        margin-left: 7px;
    }
}

/* Wartungspläne */
.maintenance-shell .workspace {
    min-width: 0;
}
.maintenance-overview-grid .admin-metric-card.is-alert {
    border-color: #efc2bc;
    background: #fff7f5;
}
.maintenance-overview-grid .admin-metric-card.is-alert strong {
    color: #a9362b;
}
.maintenance-category-layout,
.maintenance-asset-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}
.maintenance-editor-card {
    position: sticky;
    top: 16px;
}
.maintenance-editor-card > h2 {
    margin: 0 0 14px;
}
.maintenance-category-grid,
.maintenance-asset-grid,
.maintenance-task-list {
    display: grid;
    gap: 10px;
}
.maintenance-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.maintenance-category-card,
.maintenance-asset-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 82px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.maintenance-category-card:hover,
.maintenance-asset-card:hover {
    border-color: rgba(53, 107, 145, .42);
    background: #f5f9fc;
    transform: translateY(-1px);
}
.maintenance-category-card strong,
.maintenance-category-card small,
.maintenance-asset-card strong,
.maintenance-asset-card small {
    display: block;
}
.maintenance-category-card small,
.maintenance-asset-card small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}
.maintenance-category-card > span:last-child,
.maintenance-asset-card > span:last-child {
    color: var(--accent-dark);
    font-size: 25px;
    font-weight: 900;
}
.maintenance-category-mark {
    width: 10px;
    height: 48px;
    border-radius: 999px;
    background: var(--category-color, var(--accent));
}
.maintenance-asset-card .tool-icon {
    width: 46px;
    height: 46px;
}
.maintenance-empty-card {
    grid-column: 1 / -1;
    padding: 24px;
    border: 1px dashed #c4d0d6;
    border-radius: 8px;
    background: #f9fbfc;
}
.maintenance-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.maintenance-breadcrumb a {
    color: var(--accent-dark);
}
.maintenance-matrix-wrap {
    overflow-x: auto;
}
.maintenance-matrix {
    min-width: 980px;
}
.maintenance-matrix td {
    vertical-align: middle;
}
.maintenance-category-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--category-color, var(--accent));
}
.maintenance-state {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf2f5;
    color: #53646d;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.maintenance-state.is-overdue {
    background: #fae5e2;
    color: #a9362b;
}
.maintenance-state.is-due,
.maintenance-state.is-soon {
    background: #fff0d7;
    color: #8a5600;
}
.maintenance-state.is-planned {
    background: #e9f1f7;
    color: #315f7e;
}
.maintenance-state.is-done {
    background: #e6f4ed;
    color: #236b49;
}
.maintenance-due-row.is-overdue td {
    background: #fffafa;
}
.maintenance-complete-button {
    white-space: nowrap;
}
.maintenance-task-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-left: 4px solid #9dafb8;
    border-radius: 8px;
    background: #fff;
}
.maintenance-task-card.is-overdue { border-left-color: #c84d42; }
.maintenance-task-card.is-due,
.maintenance-task-card.is-soon { border-left-color: #d89525; }
.maintenance-task-card.is-planned { border-left-color: var(--accent); }
.maintenance-task-card.is-done { opacity: .72; }
.maintenance-task-main h3 {
    margin: 9px 0 5px;
    font-size: 18px;
}
.maintenance-task-main > p {
    margin: 0;
    color: var(--muted);
}
.maintenance-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}
.maintenance-task-meta span {
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--soft);
    color: #4f6069;
    font-size: 11px;
    font-weight: 800;
}
.maintenance-appointment {
    display: grid;
    gap: 3px;
    margin-top: 11px;
    padding: 10px 12px;
    border: 1px solid #cdddea;
    border-radius: 7px;
    background: #f2f7fb;
    color: #315f7e;
    font-size: 12px;
}
.maintenance-task-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 155px;
}
.maintenance-task-actions > .button,
.maintenance-task-actions > form > .button,
.maintenance-task-actions > form > .primary {
    width: 100%;
    justify-content: center;
}
.maintenance-quick-action {
    position: relative;
}
.maintenance-quick-action > summary {
    width: 100%;
    list-style: none;
    cursor: pointer;
    justify-content: center;
}
.maintenance-quick-action > summary::-webkit-details-marker {
    display: none;
}
.maintenance-quick-action[open] > form {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    width: min(320px, calc(100vw - 32px));
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(20, 34, 42, .2);
}
.maintenance-recurrence-fields,
.maintenance-appointment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.maintenance-history {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.maintenance-history-list {
    display: grid;
    gap: 8px;
}
.maintenance-history-list article {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f9fbfc;
}
.maintenance-history-list time {
    color: var(--accent-dark);
    font-weight: 900;
}
.maintenance-history-list strong,
.maintenance-history-list span {
    display: block;
}
.maintenance-history-list span,
.maintenance-history-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 1100px) {
    .maintenance-category-layout,
    .maintenance-asset-layout {
        grid-template-columns: 1fr;
    }
    .maintenance-editor-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .maintenance-category-grid {
        grid-template-columns: 1fr;
    }
    .maintenance-task-card {
        grid-template-columns: 1fr;
    }
    .maintenance-task-actions {
        min-width: 0;
    }
    .maintenance-quick-action[open] > form {
        right: auto;
        left: 0;
    }
}

@media (max-width: 430px) {
    .maintenance-recurrence-fields,
    .maintenance-appointment-fields {
        grid-template-columns: 1fr;
    }
    .maintenance-history-list article {
        grid-template-columns: 1fr;
    }
}

/* Compact tool navigation on phones and tablets. Desktop sidebars stay unchanged. */
.mobile-workspace-title,
.mobile-tool-account-menu {
    display: none;
}

@media (max-width: 900px) {
    .app-shell > .sidebar {
        position: sticky !important;
        top: 8px;
        z-index: 120;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        align-items: center;
        gap: 8px;
        width: calc(100% - 16px);
        height: auto;
        max-height: none;
        margin: 8px 8px 0;
        padding: 7px 10px;
        overflow: visible !important;
        color: var(--text);
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(20, 34, 42, .11);
    }

    .app-shell > .sidebar > .brand {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        justify-items: initial;
        gap: 12px;
        min-width: 0;
        min-height: 42px;
        margin: 0;
        padding: 0;
        color: var(--text);
        text-align: left;
    }

    .app-shell > .sidebar > .brand > a {
        flex: 0 0 auto;
        width: auto;
        min-height: 0;
    }

    .app-shell > .sidebar > .brand .brand-logo,
    .app-shell > .sidebar > a.brand .brand-logo {
        width: 142px;
        max-width: 142px;
        height: 42px;
        max-height: 42px;
        margin: 0;
        padding: 0;
        object-fit: contain;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .app-shell > .sidebar > .brand strong {
        min-width: 0;
        overflow: hidden;
        color: #172228;
        font-size: 15px;
        line-height: 1.2;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-shell > .sidebar > .brand .desktop-tool-title {
        display: none;
    }

    .app-shell > .sidebar > .brand .mobile-workspace-title {
        display: block;
        padding-left: 12px;
        border-left: 1px solid #d7e1e5;
        font-size: 19px;
    }

    .mobile-tool-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        color: #172228;
        background: #f7fafb;
        border: 1px solid #d7e1e5;
        border-radius: 7px;
        box-shadow: none;
    }

    .mobile-tool-menu-toggle:hover,
    .mobile-tool-menu-toggle:focus-visible,
    .app-shell > .sidebar.mobile-menu-open > .mobile-tool-menu-toggle {
        color: var(--accent-dark);
        background: #eff4f7;
        border-color: #afd8d3;
    }

    .mobile-tool-menu-toggle:focus-visible {
        outline: 3px solid rgba(15, 118, 110, .18);
        outline-offset: 2px;
    }

    .mobile-tool-menu-icon {
        position: relative;
        display: grid;
        gap: 4px;
        width: 20px;
    }

    .mobile-tool-menu-icon span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform .18s ease, opacity .18s ease;
    }

    .app-shell > .sidebar.mobile-menu-open .mobile-tool-menu-icon span:first-child {
        transform: translateY(6px) rotate(45deg);
    }

    .app-shell > .sidebar.mobile-menu-open .mobile-tool-menu-icon span:nth-child(2) {
        opacity: 0;
    }

    .app-shell > .sidebar.mobile-menu-open .mobile-tool-menu-icon span:last-child {
        transform: translateY(-6px) rotate(-45deg);
    }

    .app-shell > .sidebar > nav {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        left: 0;
        z-index: 130;
        display: none;
        grid-template-columns: 1fr;
        gap: 3px;
        max-height: calc(100dvh - 84px);
        margin: 0;
        padding: 8px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 8px;
        box-shadow: 0 18px 38px rgba(13, 31, 40, .2);
        scroll-snap-type: none;
    }

    .app-shell > .sidebar.mobile-menu-open > nav {
        display: grid;
    }

    .app-shell > .sidebar > nav a,
    .app-shell > .sidebar > nav a.nav-child {
        display: flex;
        flex: none;
        align-items: center;
        width: 100%;
        min-width: 0;
        min-height: 43px;
        margin: 0;
        padding: 9px 11px;
        color: #34454d;
        font-size: 14px;
        line-height: 1.3;
        white-space: normal;
        scroll-snap-align: none;
    }

    .app-shell > .sidebar > nav a:hover,
    .app-shell > .sidebar > nav a.active {
        color: var(--accent-dark);
        background: #eff4f7;
    }

    .app-shell > .sidebar > nav a.nav-child {
        position: relative;
        padding-left: 29px;
        color: #586a73;
    }

    .app-shell > .sidebar > nav a.nav-child::before {
        position: absolute;
        top: 10px;
        bottom: 10px;
        left: 14px;
        display: block;
        width: 2px;
        content: "";
        background: #c9d8dc;
        border-radius: 999px;
    }

    .app-shell > .sidebar > nav .nav-section-divider {
        display: block;
        height: 1px;
        margin: 7px 5px;
        background: #dde5e8;
    }

    .app-shell > .sidebar > nav .mobile-tool-account-menu {
        display: grid;
        gap: 3px;
    }

    .app-shell > .sidebar > nav .mobile-tool-account-menu > .nav-section-divider {
        display: block;
    }

    .app-shell > .sidebar > nav .mobile-tool-account-menu > a,
    .app-shell > .sidebar > nav .mobile-menu-logout-form button {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 43px;
        margin: 0;
        padding: 9px 11px;
        color: #34454d;
        background: transparent;
        border: 0;
        border-radius: 7px;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.3;
        text-align: left;
    }

    .app-shell > .sidebar > nav .mobile-tool-account-menu > a:hover,
    .app-shell > .sidebar > nav .mobile-menu-logout-form button:hover {
        color: var(--accent-dark);
        background: #eff4f7;
    }

    .app-shell > .sidebar > nav .mobile-menu-logout-form {
        display: block !important;
        margin: 0;
    }

    .mobile-account-icon {
        display: inline-flex;
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
    }

    .mobile-account-icon svg {
        width: 100%;
        height: 100%;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .app-shell > .sidebar > nav .nav-clock-state {
        margin-left: auto;
        margin-top: 0;
        color: #687982;
        background: #edf2f4;
    }

    .app-shell > .sidebar > nav .nav-clock-state.is-in {
        color: #0f6b3d;
        background: #e7f8ee;
    }

    .app-shell > .workspace > .topbar {
        gap: 8px;
        margin-top: 2px;
        margin-bottom: 14px;
    }

    .app-shell > .workspace > .topbar .topbar-actions {
        display: none;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 7px;
    }

    .app-shell > .workspace > .topbar .topbar-actions > *,
    .app-shell > .workspace > .topbar .topbar-actions .button,
    .app-shell > .workspace > .topbar .topbar-actions .primary,
    .app-shell > .workspace > .topbar .topbar-actions .quick-entry-button,
    .app-shell > .workspace > .topbar .topbar-actions .user-chip,
    .app-shell > .workspace > .topbar .topbar-actions .session-logout-form,
    .app-shell > .workspace > .topbar .topbar-actions .session-logout-button {
        flex: 0 1 auto;
        width: auto;
    }

    .metrics.metrics-compact-row {
        grid-template-columns: repeat(var(--metric-columns, 4), minmax(0, 1fr));
        gap: 8px;
    }

    .metrics.metrics-compact-row article {
        min-width: 0;
        padding: 12px 9px;
    }

    .metrics.metrics-compact-row span,
    .metrics.metrics-compact-row strong,
    .metrics.metrics-compact-row small {
        overflow-wrap: anywhere;
    }

    .metrics.metrics-compact-row span {
        font-size: 11px;
        font-weight: 700;
        line-height: 1.2;
    }

    .metrics.metrics-compact-row strong {
        font-size: 22px;
        line-height: 1.15;
    }

    .metrics.metrics-compact-row strong.metric-value-long {
        font-size: 15px;
    }

    .metrics.metrics-compact-row small {
        display: block;
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.2;
    }
}

@media (max-width: 520px) {
    .app-shell > .sidebar {
        top: 0;
        width: 100%;
        margin: 0;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .app-shell > .sidebar > .brand > a {
        width: 148px;
        height: 49px;
        flex-basis: 148px;
        overflow: hidden;
    }

    .app-shell > .sidebar > .brand .brand-logo,
    .app-shell > .sidebar > a.brand .brand-logo {
        width: 214px;
        max-width: 214px;
        height: auto;
        max-height: none;
        transform: translateX(-37px);
    }

    .app-shell > .sidebar > .brand strong {
        font-size: 17px;
    }

    .app-shell > .sidebar > nav {
        max-height: calc(100dvh - 76px);
    }

    .app-shell > .workspace > .topbar .topbar-actions {
        display: none;
    }

    .app-shell > .workspace > .topbar .topbar-actions .user-chip,
    .app-shell > .workspace > .topbar .topbar-actions .session-logout-button {
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
    }

    .app-shell > .workspace > .topbar .topbar-actions .tool-user-label,
    .app-shell > .workspace > .topbar .topbar-actions .session-logout-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .app-shell > .workspace > .topbar .topbar-actions .session-timer {
        position: absolute;
        top: -5px;
        right: -5px;
        margin: 0;
        padding: 1px 4px;
        border: 1px solid #d7e1e5;
        background: #fff;
        font-size: 8px;
        line-height: 1.25;
    }

    .metrics.metrics-compact-row {
        grid-template-columns: repeat(var(--metric-columns, 4), minmax(0, 1fr));
        gap: 5px;
        margin-bottom: 12px;
    }

    .metrics.metrics-compact-row.metrics-count-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .metrics.metrics-compact-row article,
    .inspection-overview-metrics.metrics-compact-row article,
    .inspection-detail-page .inspection-metrics.metrics-compact-row article {
        min-height: 80px;
        padding: 8px 5px;
        border-radius: 6px;
    }

    .metrics.metrics-compact-row span {
        font-size: 9px;
        line-height: 1.15;
    }

    .metrics.metrics-compact-row strong,
    .inspection-overview-metrics.metrics-compact-row article strong,
    .inspection-detail-page .inspection-metrics.metrics-compact-row article strong {
        margin-top: 5px;
        font-size: 18px;
        line-height: 1.1;
    }

    .metrics.metrics-compact-row strong.metric-value-long {
        font-size: 12px;
        line-height: 1.15;
    }

    .metrics.metrics-compact-row small {
        margin-top: 3px;
        font-size: 8px;
        line-height: 1.15;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-tool-menu-icon span {
        transition: none;
    }
}

/* Teamkalender: kompakte Tagesansicht auf Smartphones */
@media (max-width: 720px) {
    .team-calendar-page .team-calendar-panel {
        grid-template-rows: auto auto minmax(280px, 1fr);
        gap: 10px;
        padding-inline: 10px;
    }

    .team-mobile-day-nav {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        align-items: end;
        gap: 8px;
        padding: 10px;
        background: #f5f8f9;
        border: 1px solid var(--border);
        border-radius: 8px;
    }

    .team-mobile-day-step {
        display: grid;
        place-items: center;
        width: 42px;
        min-width: 42px;
        height: 42px;
        padding: 0;
        color: var(--accent);
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 7px;
        font: inherit;
        font-size: 26px;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
    }

    .team-mobile-day-step:disabled {
        color: #9caab1;
        background: #edf2f3;
        cursor: default;
    }

    .team-mobile-day-picker {
        display: grid;
        gap: 4px;
        min-width: 0;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .team-mobile-day-picker input {
        width: 100%;
        min-width: 0;
        height: 42px;
        color: var(--text);
        background: #fff;
        font-size: 15px;
        font-weight: 800;
        text-transform: none;
    }

    .team-calendar-page .team-calendar-scroll {
        width: 100%;
        height: auto;
        min-height: 280px;
        max-height: min(56dvh, 520px);
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 8px;
        scrollbar-gutter: auto;
    }

    .team-calendar-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .team-calendar-table th,
    .team-calendar-table td {
        display: none;
    }

    .team-calendar-table .team-calendar-user-col,
    .team-calendar-table th[data-calendar-date].is-mobile-selected,
    .team-calendar-table td[data-work-date].is-mobile-selected {
        display: table-cell;
    }

    .team-calendar-table .team-calendar-user-col {
        width: 44%;
        min-width: 0;
        max-width: none;
        left: 0;
    }

    .team-calendar-table th[data-calendar-date].is-mobile-selected,
    .team-calendar-table td[data-work-date].is-mobile-selected {
        width: 56%;
    }

    .team-calendar-table td.team-calendar-user-col {
        padding: 10px;
    }

    .team-calendar-table td.team-calendar-user-col strong {
        overflow-wrap: anywhere;
    }

    .team-mobile-month-total {
        display: block;
        margin-top: 4px;
        color: var(--accent) !important;
        font-weight: 800;
    }

    .team-calendar-cell {
        width: auto;
        min-width: 0;
        height: 76px;
        padding: 9px 10px;
    }

    .team-calendar-table th {
        padding-block: 8px;
    }
}

@media (max-width: 700px) {
    .admin-status-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
    }
    .admin-status-overview .admin-metric-card {
        display: block;
        min-height: 76px;
        padding: 11px 12px;
    }
    .admin-status-overview .admin-metric-card > strong {
        margin-top: 7px;
        font-size: 24px;
    }
    .admin-status-overview .admin-metric-card > small {
        display: none;
    }
    .admin-status-panel-head {
        align-items: flex-start;
        padding: 16px 14px;
    }
    .admin-status-summary {
        margin-top: 5px;
    }
    .invoice-preview-dialog {
        width: calc(100vw - 12px);
        height: calc(100dvh - 12px);
    }
    .invoice-preview-dialog-head {
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
    }
    .invoice-preview-dialog-head > div:first-child {
        align-self: center;
    }
    .invoice-preview-dialog-head h2 {
        max-width: 34vw;
        font-size: 16px;
    }
    .invoice-preview-dialog-head span {
        display: none;
    }
    .invoice-preview-dialog-actions {
        gap: 5px;
    }
    .invoice-preview-dialog-actions .quick-entry-button,
    .invoice-preview-dialog-actions .button {
        min-height: 38px;
        padding: 7px 9px;
        font-size: 12px;
    }
    .invoice-preview-dialog-close {
        width: 38px;
        height: 38px;
    }
    .invoice-embed-page .workspace {
        padding: 8px;
    }
    .invoice-embed-page .invoice-document {
        min-width: 760px;
    }
}

.sds-pull-refresh {
    position: fixed;
    top: max(4px, env(safe-area-inset-top));
    left: 50%;
    z-index: 10050;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid #cfdce0;
    border-radius: 7px;
    background: #ffffff;
    color: #15252d;
    box-shadow: 0 8px 24px rgba(21, 37, 45, 0.18);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, -54px, 0);
    transition: transform 160ms ease, opacity 120ms ease, border-color 120ms ease;
    will-change: transform;
}

.sds-pull-refresh.is-visible {
    opacity: 1;
}

.sds-pull-refresh.is-ready {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.sds-pull-refresh-icon {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 16px;
    line-height: 1;
}

.sds-pull-refresh.is-refreshing .sds-pull-refresh-icon {
    width: 20px;
    height: 20px;
    margin: 2px;
    border: 2px solid var(--accent-border);
    border-top-color: var(--accent);
    background: transparent;
    color: transparent;
    animation: sds-pull-refresh-spin 700ms linear infinite;
}

@keyframes sds-pull-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (pointer: fine), (min-width: 900px) {
    .sds-pull-refresh {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sds-pull-refresh {
        transition: none;
    }
    .sds-pull-refresh.is-refreshing .sds-pull-refresh-icon {
        animation-duration: 1400ms;
    }
}

@media (max-width: 1050px) {
    .customer-visit-task-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .portal-visit-actions,
    .customer-visit-task-grid {
        grid-template-columns: 1fr;
    }
    .portal-visit-pending,
    .customer-visit-task-head,
    .customer-visit-task p {
        align-items: flex-start;
    }
    .portal-visit-pending,
    .customer-visit-task p {
        flex-direction: column;
    }
    .customer-visit-task-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .customer-visit-task-actions .primary,
    .customer-visit-task-actions .button {
        min-height: 42px;
    }
}

/* Workspace start page: clear daily actions and direct tool launchers. */
.portal-home-v3 {
    background: var(--bg);
}

.portal-home-v3 .portal-shell {
    width: 100%;
    padding: 0 0 22px;
}

.portal-home-v3 .portal-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    width: 100%;
    margin: 0 0 26px;
    padding: 20px max(28px, calc((100vw - 1440px) / 2 + 28px));
    border: 0;
    border-bottom: 1px solid #d7e0e4;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.portal-home-v3 .portal-brand-row {
    gap: 14px;
}

.portal-home-v3 .portal-brand-copy {
    min-width: 0;
    padding-left: 14px;
    border-left: 1px solid #cfd9de;
}

.portal-home-v3 .portal-greeting {
    margin: 4px 0 0;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    white-space: nowrap;
}

.portal-home-v3 .portal-logo-link {
    width: 260px;
    height: 86px;
    flex: 0 0 260px;
    overflow: hidden;
    justify-content: flex-start;
}

.portal-home-v3 .portal-logo {
    width: 375px;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: translateX(-65px);
}

.portal-home-v3 .portal-head h1 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.portal-current-date {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding-left: 30px;
    border-left: 1px solid #d7e0e4;
    color: #33434d;
}

.portal-current-date > span {
    display: inline-flex;
    width: 24px;
    height: 24px;
}

.portal-current-date svg,
.portal-clock-open svg,
.portal-visit-title svg,
.portal-tool-arrow svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-current-date strong {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-home-v3 .portal-user {
    flex-wrap: nowrap;
}

.portal-home-v3 .portal-head > .push-panel-prompt {
    grid-column: 1 / -1;
}

.portal-home-v3 .alert,
.portal-today-section,
.portal-tools-section,
.portal-home-v3 .portal-shell > .app-footer {
    width: min(1440px, calc(100vw - 56px));
    margin-right: auto;
    margin-left: auto;
}

.portal-home-v3 .alert {
    margin-bottom: 18px;
}

.portal-section-title {
    margin: 0 0 10px;
    color: #14252e;
    font-size: 25px;
    line-height: 1.2;
}

.portal-today-section {
    margin-bottom: 24px;
}

.portal-today-grid {
    display: grid;
    grid-template-columns: minmax(330px, 1.12fr) minmax(300px, .95fr) minmax(360px, 1.18fr);
    min-height: 222px;
    overflow: hidden;
    border: 1px solid #d5dfe3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 34, 42, .035);
}

.portal-today-grid-without-visit {
    grid-template-columns: minmax(330px, 1fr) minmax(300px, .8fr);
}

.portal-clock-summary,
.portal-clock-actions,
.portal-visit-quick {
    min-width: 0;
    padding: 30px;
}

.portal-clock-summary {
    display: flex;
    align-items: center;
    gap: 30px;
}

.portal-clock-symbol.tool-icon {
    width: 96px;
    height: 96px;
    border-color: #cfe8d8;
    border-radius: 50%;
    background: #eaf7ee;
    color: #0b6d3b;
}

.portal-clock-symbol.tool-icon svg {
    width: 52px;
    height: 52px;
    stroke-width: 1.6;
}

.portal-clock-copy {
    min-width: 0;
}

.portal-clock-copy h3,
.portal-visit-title h3 {
    margin: 0;
    color: #14252e;
    font-size: 23px;
    line-height: 1.2;
}

.portal-clock-copy .status {
    margin-top: 12px;
    font-size: 14px;
}

.portal-clock-copy p {
    margin: 9px 0 0;
    color: #43545e;
    font-size: 16px;
}

.portal-clock-actions {
    display: grid;
    align-content: center;
    gap: 12px;
    border-left: 1px solid #d7e0e4;
}

.portal-clock-actions form {
    width: 100%;
    margin: 0;
}

.portal-clock-main,
.portal-clock-open {
    width: 100%;
    min-height: 58px;
    border-radius: 7px;
    font-size: 18px;
    font-weight: 850;
}

.portal-clock-main {
    gap: 10px;
    border: 1px solid #f28c18;
    background: #f78b0d;
    color: #14252e;
    box-shadow: 0 9px 18px rgba(242, 140, 24, .16);
}

.portal-clock-main > span,
.portal-visit-start-form .primary > span {
    display: inline-flex;
    width: 23px;
    height: 23px;
}

.portal-clock-main > span svg,
.portal-visit-start-form .primary > span svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-clock-main:hover {
    background: #ee8004;
}

.portal-clock-main-stop {
    border-color: #d34b3e;
    background: #c83b31;
    color: #fff;
    box-shadow: 0 9px 18px rgba(180, 35, 24, .14);
}

.portal-clock-main:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.portal-clock-open {
    gap: 10px;
    background: #fff;
}

.portal-clock-open > span {
    display: inline-flex;
    width: 22px;
    height: 22px;
}

.portal-visit-quick {
    display: grid;
    align-content: center;
    gap: 14px;
    border-left: 1px solid #d7e0e4;
}

.portal-visit-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-dark);
}

.portal-visit-title > span {
    display: inline-flex;
    width: 30px;
    height: 30px;
}

.portal-visit-start-form {
    gap: 11px;
}

.portal-visit-start-form label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.portal-visit-start-form .combo-select {
    min-height: 50px;
    background: #fff;
}

.portal-visit-start-form .primary,
.portal-visit-actions .primary,
.portal-visit-actions .button {
    min-height: 50px;
}

.portal-visit-start-form .primary {
    gap: 10px;
    background: var(--accent);
    border-color: var(--accent);
    font-size: 17px;
}

.portal-tools-section {
    margin-bottom: 8px;
}

.portal-tool-launchers {
    display: grid;
    gap: 16px;
}

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

.portal-tool-launcher-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.portal-tool-launcher {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    min-height: 116px;
    padding: 22px 28px;
    border: 1px solid #d5dfe3;
    border-radius: 8px;
    background: #fff;
    color: #14252e;
    box-shadow: 0 7px 22px rgba(20, 34, 42, .035);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

a.portal-tool-launcher:hover {
    border-color: #a8bdcc;
    box-shadow: 0 10px 26px rgba(41, 79, 107, .08);
    transform: translateY(-1px);
}

.portal-tool-launcher-wide {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-height: 136px;
    padding: 25px 34px;
}

.portal-tool-launcher .tool-icon {
    width: 58px;
    height: 58px;
    border-radius: 8px;
}

.portal-tool-launcher .tool-icon svg {
    width: 31px;
    height: 31px;
    stroke-width: 1.7;
}

.tool-icon-maintenance {
    border-color: var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.portal-tool-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.portal-tool-copy strong {
    font-size: 21px;
    line-height: 1.2;
}

.portal-tool-copy small {
    max-width: 650px;
    color: #52636e;
    font-size: 15px;
    line-height: 1.5;
}

.portal-tool-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid #f0c98d;
    border-radius: 7px;
    background: #fff8ec;
    color: #a45b04;
    font-weight: 850;
    white-space: nowrap;
}

.portal-tool-arrow {
    display: inline-flex;
    width: 27px;
    height: 27px;
    color: #354650;
}

.portal-tool-launcher.is-disabled {
    background: #f7f9fa;
    color: #7b8991;
    cursor: default;
}

.portal-tool-launcher.is-disabled .portal-tool-copy small {
    color: #7b8991;
}

.portal-tool-launcher.is-disabled .portal-tool-arrow {
    display: none;
}

.portal-home-v3 .portal-shell > .app-footer {
    margin-top: 28px;
}

@media (max-width: 1120px) {
    .portal-home-v3 .portal-head {
        grid-template-columns: auto 1fr auto;
        gap: 20px;
    }
    .portal-current-date {
        padding-left: 20px;
    }
    .portal-current-date strong {
        font-size: 14px;
    }
    .portal-today-grid {
        grid-template-columns: minmax(280px, 1fr) minmax(250px, .85fr) minmax(320px, 1fr);
    }
    .portal-clock-summary,
    .portal-clock-actions,
    .portal-visit-quick {
        padding: 22px;
    }
    .portal-clock-summary {
        gap: 18px;
    }
    .portal-clock-symbol.tool-icon {
        width: 76px;
        height: 76px;
    }
    .portal-clock-symbol.tool-icon svg {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 900px) {
    .portal-home-v3 .portal-head {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        margin-bottom: 18px;
        padding: 12px 14px;
        border: 1px solid #d7e0e4;
        border-radius: 0 0 8px 8px;
    }
    .portal-home-v3 .portal-brand-row {
        gap: 8px;
    }
    .portal-home-v3 .portal-brand-copy {
        padding-left: 10px;
    }
    .portal-home-v3 .portal-logo-link {
        width: 176px;
        height: 59px;
        flex-basis: 176px;
    }
    .portal-home-v3 .portal-logo {
        width: 254px;
        padding: 0;
        transform: translateX(-44px);
    }
    .portal-home-v3 .portal-head h1 {
        font-size: 22px;
    }
    .portal-current-date {
        display: none;
    }
    .portal-home-v3 .portal-head > .push-panel-prompt {
        grid-column: 1 / -1;
    }
    .portal-home-v3 .alert,
    .portal-today-section,
    .portal-tools-section,
    .portal-home-v3 .portal-shell > .app-footer {
        width: min(100%, calc(100vw - 20px));
    }
    .portal-section-title {
        margin-bottom: 9px;
        font-size: 24px;
    }
    .portal-today-section {
        margin-bottom: 20px;
    }
    .portal-today-grid,
    .portal-today-grid-without-visit {
        grid-template-columns: 1fr;
        min-height: 0;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .portal-clock-summary {
        min-height: 164px;
        padding: 24px;
        border: 1px solid #d5dfe3;
        border-bottom: 0;
        border-radius: 8px 8px 0 0;
        background: #fff;
    }
    .portal-clock-actions {
        padding: 0 24px 24px;
        border: 1px solid #d5dfe3;
        border-top: 0;
        border-radius: 0 0 8px 8px;
        background: #fff;
    }
    .portal-visit-quick {
        margin-top: 12px;
        padding: 22px;
        border: 1px solid #d5dfe3;
        border-radius: 8px;
        background: #fff;
    }
    .portal-tool-launcher-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .portal-tool-launchers {
        gap: 12px;
    }
    .portal-tool-launcher,
    .portal-tool-launcher-wide {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 98px;
        padding: 18px 20px;
    }
    .portal-tool-launcher .tool-icon {
        width: 54px;
        height: 54px;
    }
    .portal-tool-badge {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        min-height: 30px;
        padding: 4px 9px;
    }
    .portal-tool-launcher-wide .portal-tool-copy small,
    .portal-tool-launcher-grid .portal-tool-copy small {
        display: none;
    }
    .portal-tool-launcher-wide .portal-tool-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

@media (max-width: 520px) {
    .portal-home-v3 .portal-head {
        padding: 10px;
    }
    .portal-home-v3 .portal-logo {
        width: 214px;
        padding: 0;
        transform: translateX(-37px);
    }
    .portal-home-v3 .portal-logo-link {
        width: 148px;
        height: 49px;
        flex-basis: 148px;
    }
    .portal-home-v3 .portal-head h1 {
        font-size: 18px;
    }
    .portal-home-v3 .portal-greeting {
        margin-top: 2px;
        font-size: 11px;
    }
    .portal-home-v3 .portal-user {
        gap: 5px;
    }
    .portal-home-v3 .portal-user-name .portal-user-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .portal-home-v3 .notification-center summary,
    .portal-home-v3 .portal-user-name,
    .portal-home-v3 .portal-user .session-logout-button,
    .portal-home-v3 .portal-user button {
        width: 36px;
        height: 36px;
        min-height: 36px;
    }
    .portal-section-title {
        font-size: 22px;
    }
    .portal-clock-summary {
        gap: 18px;
        min-height: 150px;
        padding: 20px;
    }
    .portal-clock-symbol.tool-icon {
        width: 72px;
        height: 72px;
    }
    .portal-clock-symbol.tool-icon svg {
        width: 40px;
        height: 40px;
    }
    .portal-clock-copy h3,
    .portal-visit-title h3 {
        font-size: 20px;
    }
    .portal-clock-copy .status {
        margin-top: 9px;
    }
    .portal-clock-copy p {
        margin-top: 7px;
        font-size: 14px;
    }
    .portal-clock-actions {
        padding: 0 20px 20px;
    }
    .portal-clock-main,
    .portal-clock-open {
        min-height: 52px;
        font-size: 16px;
    }
    .portal-visit-quick {
        padding: 20px;
    }
    .portal-tool-launcher,
    .portal-tool-launcher-wide {
        gap: 15px;
        min-height: 90px;
        padding: 15px;
    }
    .portal-tool-launcher .tool-icon {
        width: 50px;
        height: 50px;
    }
    .portal-tool-launcher .tool-icon svg {
        width: 27px;
        height: 27px;
    }
    .portal-tool-copy strong {
        font-size: 17px;
    }
    .portal-tool-arrow {
        width: 23px;
        height: 23px;
    }
    .portal-tool-badge {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .portal-home-v3 .portal-logo {
        width: 185px;
        padding: 0;
        transform: translateX(-32px);
    }
    .portal-home-v3 .portal-logo-link {
        width: 128px;
        height: 43px;
        flex-basis: 128px;
    }
    .portal-home-v3 .portal-head h1 {
        font-size: 16px;
    }
    .portal-home-v3 .portal-action-icon {
        width: 17px;
        height: 17px;
    }
    .portal-clock-summary {
        align-items: flex-start;
        gap: 13px;
        padding: 18px;
    }
    .portal-clock-symbol.tool-icon {
        width: 58px;
        height: 58px;
    }
    .portal-clock-symbol.tool-icon svg {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 900px) {
    .admin-status-detail-metrics,
    .admin-status-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-tool-access-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .admin-detail-dialog,
    .admin-user-status-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        margin: auto;
    }
    .admin-detail-dialog-shell {
        max-height: calc(100dvh - 16px);
    }
    .admin-detail-dialog-head {
        padding: 16px;
    }
    .admin-detail-dialog-head h2 {
        font-size: 19px;
    }
    .admin-detail-dialog-body {
        padding: 14px 16px;
    }
    .admin-detail-dialog-footer {
        position: sticky;
        bottom: 0;
        padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    }
    .admin-detail-dialog-footer .button,
    .admin-detail-dialog-footer .primary {
        flex: 1 1 0;
        justify-content: center;
        text-align: center;
    }
    .admin-users-table {
        min-width: 760px;
    }
    .admin-user-status-table {
        min-width: 0;
    }
    .admin-user-status-table thead {
        display: none;
    }
    .admin-user-status-table tbody,
    .admin-user-status-table tr,
    .admin-user-status-table td {
        display: block;
        width: 100%;
    }
    .admin-user-status-table tbody {
        display: grid;
        gap: 9px;
        padding: 2px;
    }
    .admin-user-status-table tr.clickable-row {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 12px;
        padding: 14px 42px 14px 14px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
    }
    .admin-user-status-table td {
        min-width: 0;
        padding: 0;
        border: 0;
    }
    .admin-user-status-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 9px;
        font-weight: 950;
        text-transform: uppercase;
    }
    .admin-user-status-table td:first-child {
        grid-column: 1 / -1;
    }
    .admin-user-status-table td:first-child::before {
        display: none;
    }
    .admin-user-status-table .admin-user-avatar {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
    .admin-user-status-table .admin-status-row-arrow {
        position: absolute;
        top: 50%;
        right: 13px;
        width: auto;
        transform: translateY(-50%);
    }
    .admin-status-detail-metrics,
    .admin-status-facts {
        grid-template-columns: 1fr 1fr;
    }
    .admin-status-detail-metrics strong {
        font-size: 18px;
    }
    .admin-tool-activity-section .table-wrap {
        border: 1px solid var(--border);
        border-radius: 7px;
    }
}

@media (max-width: 430px) {
    .admin-status-detail-metrics,
    .admin-status-facts {
        grid-template-columns: 1fr;
    }
    .admin-tool-access-item {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-detail-dialog-footer {
        flex-direction: column;
    }
}
