:root {
  color-scheme: light;
  --ink: #17324a;
  --muted: #607487;
  --canvas: #f5f8f5;
  --paper: #fffefa;
  --line: #d9e5df;
  --primary: #087f72;
  --primary-dark: #05665e;
  --blue-soft: #eaf3f8;
  --green-soft: #e9f5ef;
}
* { box-sizing: border-box; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; border-radius: .65rem; background: #fff; padding: .8rem 1rem; color: #123; box-shadow: 0 8px 24px rgb(0 0 0/.2); }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid #1976d2 !important; outline-offset: 3px !important; }
.nav-group { padding: .7rem .75rem .4rem; color: #91a7b5; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.brand-mark { background: #d8f3eb; color: #103d3a; }
.global-search-trigger { border-color: #d5dfdc; background: #f8faf9; transition: .15s ease; }
.global-search-trigger:hover { border-color: #89aaa1; background: #fff; }
kbd { border: 1px solid #cad6d2; border-bottom-width: 2px; border-radius: .35rem; background: rgb(255 255 255/.08); padding: .1rem .35rem; font-family: inherit; font-size: .7rem; }
.mode-toggle { min-height: 2.5rem; border-color: #cad8d3; background: #fff; color: #315468; }
.icon-button { min-width: 2.75rem; min-height: 2.75rem; border-radius: .75rem; border: 1px solid #d7e0dd; background: #fff; }
.user-menu { list-style: none; background: #173f4d; color: #fff; }
.user-menu::-webkit-details-marker { display:none; }
.search-dialog { border: 1px solid #cbd8d4; background: #fffefa; box-shadow: 0 30px 80px rgb(15 35 52/.28); }
.search-dialog::backdrop { background: rgb(14 30 43/.52); backdrop-filter: blur(3px); }
.empty-state { border: 1px dashed #c9d8d3; border-radius: .9rem; padding: 2rem; text-align: center; color: #607487; }
.action-card { display: flex; min-height: 8.5rem; align-items: flex-start; justify-content: space-between; gap: 1rem; border: 1px solid #d8e2df; border-radius: 1rem; background: #fff; padding: 1.1rem; transition: .15s ease; }
.action-card:hover { border-color: #75a99d; box-shadow: 0 8px 22px rgb(23 50 74/.08); transform: translateY(-1px); }
.action-count { display: grid; min-width: 2.3rem; height: 2.3rem; place-items: center; border-radius: .75rem; background: #fff0d5; color: #774d00; font-weight: 800; }
.action-count.zero { background: #e8f4ef; color: #17674e; }
.quality-row { display: grid; grid-template-columns: minmax(10rem,1fr) minmax(9rem,2fr) 3rem; align-items: center; gap: 1rem; padding: .8rem 0; }
.quality-bar { height: .55rem; overflow: hidden; border-radius: 999px; background: #e5ebe9; }
.quality-bar > span { display: block; height: 100%; border-radius: inherit; background: #287f73; }
.timeline { position: relative; }
.timeline::before { content:""; position:absolute; left:.45rem; top:.8rem; bottom:.8rem; width:1px; background:#cfdad6; }
.timeline-item { position:relative; padding:0 0 1.25rem 2rem; }
.timeline-dot { position:absolute; left:0; top:.25rem; width:.95rem; height:.95rem; border:3px solid #fff; border-radius:50%; background:#287f73; box-shadow:0 0 0 1px #8ebcb1; }
.status-chip { display:inline-flex; align-items:center; gap:.35rem; border-radius:999px; padding:.3rem .6rem; font-size:.72rem; font-weight:750; }
.status-chip[data-tone="good"] { background:#e3f2eb; color:#145d48; }
.status-chip[data-tone="attention"] { background:#fff1d8; color:#704a00; }
.status-chip[data-tone="blocked"] { background:#fbe8e5; color:#8b2b20; }
.help-card { border-left: 3px solid #5f8fa5; border-radius: .65rem; background: #edf4f7; padding: .8rem 1rem; color: #315468; font-size: .82rem; }
.skeleton { position:relative; overflow:hidden; background:#e8eeec; }
.skeleton::after { content:""; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg,transparent,rgb(255 255 255/.65),transparent); animation:shimmer 1.2s infinite; }
@keyframes shimmer { to { transform:translateX(100%); } }
.drop-active { border-color:#087f72 !important; background:#eaf7f1 !important; }
.upload-file-row { display:grid; grid-template-columns:1fr auto; gap:1rem; align-items:center; border-top:1px solid #e0e8e5; padding:.75rem 0; }
.success-enter { animation:success-in .28s ease-out; }
@keyframes success-in { from { opacity:0; transform:translateY(8px) scale(.99); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; } }
@media (forced-colors: active) { .quality-bar>span,.timeline-dot { forced-color-adjust:none; background:Highlight; } }
@media (max-width: 640px) { .quality-row { grid-template-columns:1fr 2.5rem; }.quality-row .quality-bar { grid-column:1/-1; grid-row:2; }.action-card { min-height:auto; } }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 4%, rgb(203 232 223 / .42), transparent 24rem),
    radial-gradient(circle at 44% 18%, rgb(220 235 245 / .34), transparent 30rem),
    var(--canvas);
}
.app-shell { background: transparent; }
.app-shell > main, .page-wrap { min-width: 0; max-width: 100%; }
.card > * { min-width: 0; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; height: auto; padding-block: .75rem; }
  .topbar > div:last-child { min-width: 0; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }
  .card { max-width: 100%; overflow-wrap: anywhere; }
  .card a, .card button, .card form { max-width: 100%; }
}
.sidebar {
  background-color: #122f41;
  background-image: linear-gradient(180deg, #153b49 0%, #153448 52%, #132d40 100%);
  box-shadow: 6px 0 24px rgb(15 35 52 / .14);
}
.brand-mark { box-shadow: 0 8px 20px rgb(45 212 191 / .2); }
.nav-link {
  min-height: 2.8rem;
  color: #e7f1f3;
  background: rgb(255 255 255 / .035);
  border: 1px solid rgb(255 255 255 / .075);
  font-weight: 600;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.nav-icon {
  display: inline-grid;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: .5rem;
  background: rgb(255 255 255 / .09);
  color: #9de4d6;
  font-size: .85rem;
}
.nav-link:hover { background: rgb(255 255 255 / .11); border-color: rgb(255 255 255 / .18); color: white; transform: translateX(2px); }
.nav-link[aria-current="page"] { background: #0b8075; color: white; border-color: #29a99b; box-shadow: 0 7px 16px rgb(2 20 31 / .25); font-weight: 750; }
.nav-link[aria-current="page"] .nav-icon { background: rgb(255 255 255 / .17); color: white; }
.topbar {
  background: #fffefa;
  box-shadow: 0 4px 18px rgb(23 50 74 / .07);
  isolation: isolate;
}
.page-wrap { padding-top: 2.25rem; padding-bottom: 3.5rem; }
.card { border: 1px solid var(--line); border-radius: 1.15rem; background: #fffefa; padding: 1.6rem; box-shadow: 0 10px 28px rgb(23 50 74 / .055), 0 1px 2px rgb(23 50 74 / .06); }
.card-accent { border-color: #acd8ca; box-shadow: 0 12px 32px rgb(8 127 114 / .1); }
.card-blue { background: linear-gradient(145deg, #fafdff, var(--blue-soft)); border-color: #c7dce8; }
.card-green { background: linear-gradient(145deg, #fffefa, var(--green-soft)); border-color: #c3dfd3; }
.eyebrow { font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.page-title { color: var(--ink); line-height: 1.12; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid #08786d; border-radius: .8rem; background: linear-gradient(180deg, #0b9182, #08766c); padding: .75rem 1.15rem; font-weight: 700; color: white; box-shadow: 0 8px 18px rgb(8 127 114 / .2); transition: .18s ease; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgb(8 127 114 / .25); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid #b9d3ca; border-radius: .8rem; background: #fffefa; padding: .7rem 1rem; font-weight: 700; color: #17665f; transition: .18s ease; }
.btn-secondary:hover { border-color: #78b8a7; background: #eff9f4; }
.pricing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #06665e;
  background: linear-gradient(180deg, #0b9182, #08766c);
  color: white;
  box-shadow: 0 6px 14px rgb(8 127 114 / .22);
  transition: .16s ease;
}
.pricing-cta:hover { background: #05665e; transform: translateY(-1px); box-shadow: 0 8px 18px rgb(8 127 114 / .27); }
.logout-button { transition: .16s ease; }
.logout-button:hover { border-color: #8aa99f; background: #f0f7f4; color: #115e59; }
.next-step { border: 1px solid #afd8cb; background: linear-gradient(135deg, #eef9f4, #edf5fa); }
.step-dot { display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; border-radius: 999px; background: #d9efe7; color: #0a6f65; font-size: .8rem; font-weight: 800; }
.step-dot.done { background: #087f72; color: white; }
.choice-card { position: relative; display: block; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card-body { height: 100%; border: 1.5px solid #cbdcd6; border-radius: 1rem; background: #fffefa; padding: 1rem; transition: .16s ease; }
.choice-card:hover .choice-card-body { border-color: #78b8a7; background: #f5fbf8; }
.choice-card input:focus-visible + .choice-card-body { outline: 3px solid rgb(45 212 191 / .3); outline-offset: 2px; }
.choice-card input:checked + .choice-card-body { border-color: #087f72; background: #eaf7f1; box-shadow: 0 0 0 3px rgb(8 127 114 / .1); }
.choice-check { float: right; width: 1.35rem; height: 1.35rem; border: 1.5px solid #abc4ba; border-radius: 999px; }
.choice-card input:checked + .choice-card-body .choice-check { border: 5px solid #087f72; background: white; }
.compact-choice .choice-card-body { min-height: auto; padding: .8rem 1rem; }
.field-error { display: block; margin-top: .35rem; color: #b42318; font-size: .75rem; font-weight: 650; }
.field-error.hidden { display: none; }
.entity-choice .choice-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 12.5rem;
  border: 2px solid #b9cec7;
  background: linear-gradient(150deg, #fffefa 0%, #f8fbfa 100%);
  box-shadow: 0 5px 14px rgb(23 50 74 / .06);
}
.entity-choice .choice-check,
#unternehmensprofil fieldset .choice-check,
.company-profile-editor fieldset .choice-check {
  position: absolute;
  top: 1rem;
  right: 1rem;
  float: none;
}
.entity-choice:hover .choice-card-body {
  border-color: #279d8e;
  background: linear-gradient(150deg, #fffefa 0%, #edf9f4 100%);
  box-shadow: 0 12px 24px rgb(8 127 114 / .13);
  transform: translateY(-3px);
}
.entity-choice input:checked + .choice-card-body {
  border-color: #087f72;
  background: linear-gradient(150deg, #f4fcf8 0%, #dff3eb 100%);
  box-shadow: 0 0 0 3px rgb(8 127 114 / .12), 0 12px 24px rgb(8 127 114 / .12);
}
.entity-symbol { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; border-radius: .8rem; background: #e5f3ee; color: #08766c; font-size: 1.15rem; font-weight: 800; }
.entity-action { display: block; margin-top: auto; padding-top: 1.1rem; color: #08766c; font-size: .75rem; font-weight: 800; }
.entity-choice input:checked + .choice-card-body .entity-action::before { content: "✓ "; }
.entity-choice input:checked + .choice-card-body .entity-action { color: #05665e; }
#unternehmensprofil fieldset .choice-card,
.company-profile-editor fieldset .choice-card { height: 100%; min-width: 0; }
#unternehmensprofil fieldset .choice-card-body,
.company-profile-editor fieldset .choice-card-body {
  position: relative;
  display: flex;
  min-height: 8.25rem;
  flex-direction: column;
  justify-content: center;
  padding: 1.1rem 3rem 1.1rem 1.1rem;
  border-width: 2px;
}
#unternehmensprofil fieldset .choice-card-body strong,
.company-profile-editor fieldset .choice-card-body strong { line-height: 1.35; overflow-wrap: anywhere; }
#unternehmensprofil fieldset .choice-card-body small,
.company-profile-editor fieldset .choice-card-body small { margin-top: .5rem; line-height: 1.35; }
.wizard-enhanced [data-wizard-step], .wizard-enhanced [data-onboarding-step] { display: none; }
.wizard-enhanced [data-wizard-step].is-active, .wizard-enhanced [data-onboarding-step].is-active { display: block; animation: reveal .2s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }
.progress-track { height: .5rem; overflow: hidden; border-radius: 999px; background: #dfeae5; }
.progress-value { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b9182, #65a9c2); transition: width .2s ease; }
.label { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(100 116 139); }
.metric { margin-top: .5rem; font-size: 2rem; line-height: 1; font-weight: 650; }
.hint { margin-top: .6rem; font-size: .8rem; color: rgb(100 116 139); }
.htmx-indicator { display: none; }.htmx-request .htmx-indicator,.htmx-request.htmx-indicator { display: block; }
input, select, textarea { color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgb(45 212 191 / .18); border-color: #50a895 !important; }
@media (max-width: 1023px) {
  .sidebar { min-height: auto; box-shadow: 0 5px 18px rgb(15 35 52 / .18); }
  .mobile-nav { display: flex !important; overflow-x: auto; padding-bottom: .75rem; scrollbar-width: thin; }
  .mobile-nav .nav-link { flex: 0 0 auto; margin: 0; background: rgb(255 255 255 / .06); }
  .page-wrap { padding-top: 1.5rem; }
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); }
.calendar-view-button { display: inline-flex; align-items: center; gap: .45rem; border-radius: .65rem; padding: .65rem .9rem; color: #64748b; font-size: .85rem; font-weight: 750; transition: .15s ease; }
.calendar-view-button:hover { background: rgb(255 255 255 / .7); color: #0f766e; }
.calendar-view-button:focus-visible, .month-shortcut:focus-visible { outline: 3px solid rgb(8 127 114 / .25); outline-offset: 2px; }
.calendar-view-button.is-active { background: white; color: #08766c; box-shadow: 0 2px 8px rgb(23 50 74 / .1); }
.month-shortcuts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.month-shortcut { display: flex; min-height: 2.7rem; align-items: center; justify-content: space-between; gap: .35rem; border: 1px solid #d4e1dc; border-radius: .7rem; background: #fbfdfc; padding: .55rem .7rem; color: #315468; font-size: .75rem; font-weight: 700; transition: .15s ease; }
.month-shortcut:hover { border-color: #55a997; background: #edf8f3; color: #08766c; transform: translateY(-1px); }
.month-shortcut b { display: grid; min-width: 1.25rem; height: 1.25rem; place-items: center; border-radius: 999px; background: #dcefe8; color: #07675e; font-size: .65rem; }
.calendar-head { padding: .75rem; text-align: center; font-size: .75rem; font-weight: 700; color: rgb(100 116 139); }
.calendar-day { min-height: 120px; border-top: 1px solid rgb(226 232 240); border-right: 1px solid rgb(241 245 249); padding: .6rem; }
.year-month { min-height: 13rem; border: 1px solid #d9e5df; border-radius: 1rem; background: #fbfcfa; padding: 1rem; box-shadow: 0 3px 10px rgb(23 50 74 / .04); transition: .16s ease; }
.year-month:hover { border-color: #9fc8bc; background: white; box-shadow: 0 9px 20px rgb(23 50 74 / .08); transform: translateY(-2px); }
.year-month.has-tax-events { border-top: 3px solid #f2b84b; }
.category-vat { --category: #d99512; --category-bg: #fff6d8; --category-text: #76500b; }
.category-corporation { --category: #7c5cc4; --category-bg: #f2edff; --category-text: #50388b; }
.category-trade { --category: #3884bb; --category-bg: #eaf5fc; --category-text: #245f88; }
.category-income { --category: #26936f; --category-bg: #e8f7f0; --category-text: #17674e; }
.category-annual { --category: #536fb2; --category-bg: #edf1fb; --category-text: #394f88; }
.category-disclosure { --category: #bd5f7e; --category-bg: #fbeef3; --category-text: #86405a; }
.category-individual { --category: #168f89; --category-bg: #e6f7f5; --category-text: #0b625e; }
.legend-dot { width: .7rem; height: .7rem; flex: 0 0 auto; border-radius: 999px; background: var(--category); }
.year-event-detail { border-radius: .55rem; }
.year-event { display: flex; cursor: pointer; list-style: none; align-items: center; gap: .5rem; overflow: hidden; border-left: 4px solid var(--category); border-radius: .45rem; background: var(--category-bg); padding: .5rem .55rem; color: var(--category-text); font-size: .72rem; transition: .15s ease; }
.year-event::-webkit-details-marker { display: none; }
.year-event:hover { filter: saturate(1.08); box-shadow: 0 3px 10px rgb(23 50 74 / .09); }
.year-event:focus-visible { outline: 3px solid rgb(8 127 114 / .28); outline-offset: 2px; }
.year-event.is-overdue { box-shadow: inset 0 0 0 1px #dc4c43; }
.year-event.is-completed { opacity: .62; filter: grayscale(.35); text-decoration: line-through; }
.status-label { border-radius: 999px; background: rgb(255 255 255 / .72); padding: .15rem .35rem; font-size: .58rem; font-weight: 800; text-decoration: none; }
.year-event-info { margin-top: .35rem; border: 1px solid #d8e2de; border-radius: .65rem; background: white; padding: .75rem; color: var(--ink); font-size: .75rem; box-shadow: 0 5px 14px rgb(23 50 74 / .07); }
.category-badge { flex: 0 0 auto; border: 1px solid var(--category); border-radius: 999px; background: var(--category-bg); padding: .2rem .45rem; color: var(--category-text); font-size: .62rem; font-weight: 800; }
@media (max-width: 767px) { .month-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .month-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .calendar-view-button { padding-inline: .65rem; font-size: .78rem; } }
.native-progress { width: 100%; height: .55rem; overflow: hidden; border: 0; border-radius: 999px; background: #e2e8f0; color: #0f766e; }
.native-progress::-webkit-progress-bar { border-radius: 999px; background: #e2e8f0; }
.native-progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #0f766e, #14b8a6); }
.native-progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, #0f766e, #14b8a6); }
#company-profile-dialog .company-form-options { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; align-items: stretch !important; gap: .85rem !important; }
#company-profile-dialog .company-form-option { position: relative !important; display: block !important; min-width: 0 !important; height: 100% !important; margin: 0 !important; cursor: pointer !important; }
#company-profile-dialog .company-form-option > input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
#company-profile-dialog .company-form-option-body { position: relative !important; display: flex !important; box-sizing: border-box !important; min-height: 9rem !important; height: 100% !important; flex-direction: column !important; justify-content: center !important; padding: 1.2rem 3.2rem 1.2rem 1.2rem !important; border: 2px solid #b9cec7 !important; border-radius: 1rem !important; background: #fffefa !important; }
#company-profile-dialog .company-form-option-check { position: absolute !important; top: 1rem !important; right: 1rem !important; width: 1.35rem !important; height: 1.35rem !important; border: 2px solid #8eaaa0 !important; border-radius: 999px !important; }
#company-profile-dialog .company-form-option:hover .company-form-option-body { border-color: #279d8e !important; background: #f1faf6 !important; transform: translateY(-2px); }
#company-profile-dialog .company-form-option > input:focus-visible + .company-form-option-body { outline: 3px solid rgb(45 212 191 / .35) !important; outline-offset: 2px !important; }
#company-profile-dialog .company-form-option > input:checked + .company-form-option-body { border-color: #087f72 !important; background: #e5f5ee !important; box-shadow: 0 0 0 3px rgb(8 127 114 / .12) !important; }
#company-profile-dialog .company-form-option > input:checked + .company-form-option-body .company-form-option-check { border: 5px solid #087f72 !important; background: white !important; }
@media (max-width: 639px) { #company-profile-dialog .company-form-options { grid-template-columns: 1fr !important; } #company-profile-dialog .company-form-option-body { min-height: 7rem !important; } }

/* Shared application shell: compact, calm and keyboard-friendly. */
@media (min-width: 1024px) {
  .app-shell { --sidebar-collapsed: 4.5rem; --sidebar-expanded: 15.5rem; }
  .app-shell > .sidebar {
    width: var(--sidebar-collapsed);
    flex: 0 0 var(--sidebar-collapsed);
    overflow-x: hidden;
    transition: width .18s ease, flex-basis .18s ease, box-shadow .18s ease;
  }
  .app-shell > .sidebar:hover,
  .app-shell > .sidebar:focus-within {
    width: var(--sidebar-expanded);
    flex-basis: var(--sidebar-expanded);
    box-shadow: 8px 0 24px rgb(15 35 52 / .18);
  }
  .sidebar-brand { padding-inline: 1rem; }
  .sidebar-label,
  .sidebar-meta,
  .sidebar .nav-group {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    transition: max-width .16s ease, opacity .12s ease;
  }
  .app-shell > .sidebar:hover .sidebar-label,
  .app-shell > .sidebar:focus-within .sidebar-label,
  .app-shell > .sidebar:hover .sidebar-meta,
  .app-shell > .sidebar:focus-within .sidebar-meta,
  .app-shell > .sidebar:hover .nav-group,
  .app-shell > .sidebar:focus-within .nav-group {
    max-width: 14rem;
    opacity: 1;
  }
  .sidebar .nav-link { min-width: 3rem; padding-inline: .85rem; }
  .sidebar .nav-icon { flex: 0 0 1.65rem; }
}

.topbar { min-height: 4rem; padding-block: .55rem; }
.global-search-trigger { width: min(100%, 22rem); min-width: 0; height: 2.5rem; }
.page-wrap { padding-top: 1.5rem; padding-bottom: 2.75rem; }
.card { border-radius: .9rem; padding: 1.25rem; box-shadow: 0 5px 18px rgb(23 50 74 / .055); }
.btn-primary, .btn-secondary { min-height: 2.5rem; border-radius: .65rem; }
input, select, textarea { border-radius: .65rem !important; }
table thead th { background: #f5faf7; color: #365b6b; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
table tbody tr { transition: background-color .14s ease; }
table tbody tr:hover { background: #f7fbf9; }
.table-wrap { border-radius: .85rem; }
.empty-state { border: 1px dashed #c7d9d1; border-radius: .8rem; background: #f8fbf9; padding: 1rem; color: #557080; }

.dashboard-summary-grid { display: grid; gap: .85rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary-card { display: block; min-height: 8.75rem; border: 1px solid #d8e5df; border-radius: .9rem; background: #fffefa; padding: 1.15rem; box-shadow: 0 4px 14px rgb(23 50 74 / .045); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.summary-card:hover { border-color: #78b9aa; box-shadow: 0 8px 20px rgb(23 50 74 / .08); transform: translateY(-1px); }
.summary-card .summary-value { margin-top: .45rem; color: #17324a; font-size: 1.8rem; font-weight: 750; line-height: 1.05; }
.summary-card .summary-caption { margin-top: .35rem; color: #607887; font-size: .82rem; }
.dashboard-secondary { border: 1px solid #dbe7e1; border-radius: .9rem; background: rgb(255 255 255 / .72); }
.dashboard-secondary > summary { cursor: pointer; list-style: none; }
.dashboard-secondary > summary::-webkit-details-marker { display: none; }
.dashboard-secondary > summary::after { content: '＋'; float: right; color: #087f72; font-weight: 800; }
.dashboard-secondary[open] > summary::after { content: '−'; }
.activity-list { display: grid; gap: .7rem; }
.activity-item { display: flex; align-items: flex-start; gap: .65rem; border-bottom: 1px solid #edf2ef; padding-bottom: .7rem; }
.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-icon { display: grid; width: 1.75rem; height: 1.75rem; flex: 0 0 auto; place-items: center; border-radius: .55rem; background: #e7f5ef; color: #087f72; font-size: .8rem; font-weight: 800; }
@media (max-width: 900px) { .dashboard-summary-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .app-shell > .sidebar, .summary-card, table tbody tr { transition: none; }
}

/* Compact workbench language used by all operational views. */
.page-header { margin-bottom: 1.25rem; }
.page-header h1, .page-header .page-title { font-size: clamp(1.55rem, 2vw, 2rem); line-height: 1.15; }
.page-header > div > p:last-child { margin-top: .35rem; color: #6a7f8b; font-size: .86rem; }
.filter-bar, .filter-bar.card { display: grid; gap: .7rem; border: 1px solid #dfe9e4; border-radius: .8rem; background: #f9fcfa; padding: .8rem; box-shadow: none; }
.filter-bar label, .filter-bar label > span { font-size: .72rem; font-weight: 750; color: #58707d; }
.filter-bar input, .filter-bar select { height: 2.4rem; padding: .45rem .65rem !important; font-size: .82rem; }
.workbench-panel, .workbench-panel.card { border: 1px solid #dfe9e4; border-radius: .85rem; background: #fffefa; padding: 0; box-shadow: 0 4px 14px rgb(23 50 74 / .045); }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { padding: .65rem .8rem; border-bottom: 1px solid #dfe9e4; background: #f7fbf9; color: #58707d; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.data-table td { padding: .72rem .8rem; border-bottom: 1px solid #edf2ef; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8fcfa; }
.table-primary { color: #17324a; font-weight: 750; }
.table-secondary { margin-top: .2rem; color: #71848e; font-size: .73rem; }
.status-badge { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .25rem .52rem; background: #edf3f0; color: #44616a; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.status-badge[data-tone="good"] { background: #e5f5ed; color: #17674e; }
.status-badge[data-tone="warn"] { background: #fff3d9; color: #805600; }
.status-badge[data-tone="danger"] { background: #fbe9e7; color: #912f27; }
.status-badge[data-tone="info"] { background: #eaf3f8; color: #245f88; }
.stat-strip { display: grid; gap: .65rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-tile { display: flex; align-items: center; gap: .65rem; border: 1px solid #e0ebe6; border-radius: .75rem; background: #fffefa; padding: .75rem .85rem; }
.stat-tile-icon { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; place-items: center; border-radius: .55rem; background: #e7f5ef; color: #087f72; font-weight: 800; }
.stat-tile-value { display: block; color: #17324a; font-size: 1.15rem; font-weight: 800; line-height: 1; }
.stat-tile-label { display: block; margin-top: .22rem; color: #6c818a; font-size: .68rem; }
.compact-list { display: grid; gap: .35rem; }
.compact-list > a, .compact-list > .compact-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-radius: .65rem; padding: .68rem .75rem; }
.compact-list > a:hover { background: #f2f8f5; }
.compact-list-title { color: #17324a; font-size: .84rem; font-weight: 750; }
.compact-list-meta { margin-top: .18rem; color: #71848e; font-size: .72rem; }
.action-card { min-height: auto; padding: .9rem; }
.dashboard-summary-grid + .dashboard-summary-grid { margin-top: 0; }
.form-section { max-width: 58rem; }
@media (min-width: 1024px) {
  .app-shell > .sidebar { background: #102e3d; background-image: none; }
  .sidebar-brand { height: 4rem !important; border-bottom-color: rgb(255 255 255 / .08); }
  .sidebar .mobile-nav { padding: .75rem; }
  .sidebar .nav-link { border-color: transparent; border-radius: .7rem; }
  .sidebar .nav-link[aria-current="page"] { box-shadow: inset 3px 0 #68d2bd, 0 6px 14px rgb(2 20 31 / .2); }
  .topbar { border-bottom-color: #e3ebe7; box-shadow: 0 2px 10px rgb(23 50 74 / .05); }
}
@media (max-width: 760px) {
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-table { min-width: 680px; }
}

/* Desktop sidebar is an overlay: the main column never participates in its expansion. */
@media (min-width: 1024px) {
  .app-shell { display: block; position: relative; }
  .app-shell > .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: var(--sidebar-collapsed);
    height: 100vh;
    flex: none;
    transition: width .18s ease, box-shadow .18s ease;
  }
  .app-shell > .sidebar:hover,
  .app-shell > .sidebar:focus-within {
    width: var(--sidebar-expanded);
    flex-basis: auto;
  }
  .app-shell > main {
    width: calc(100% - var(--sidebar-collapsed));
    margin-left: var(--sidebar-collapsed);
  }
}
