:root {
  /* CarFlexx Farbwelt: Türkis führt, Gold setzt Akzente. */
  --ink: #173a54;
  --ink-soft: #607687;
  --navy: #173d58;
  --navy-deep: #0c2c45;
  --cream: #f5f9fa;
  --paper: #ffffff;
  --line: #cfdee2;
  --muted: #607687;
  --primary: #207e91;
  --primary-pale: #e8f6f6;
  --accent: #55bac5;
  --accent-dark: #19778a;
  --gold: #f2b436;
  --gold-pale: #fff3d9;
  --mint: #e8f6f6;
  --green: #207e91;
  --sidebar-surface: #f7fafc;
  --on-dark: #f7fbfd;
  --on-dark-muted: #bfd5e1;
  --warning: #c9782a;
  --danger: #b7433f;
  --shadow: 0 18px 50px rgba(13, 37, 56, 0.12);
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }
/* Die Scrollleisten gehören zur jeweiligen Fläche statt als fremder Systemkasten aufzutreten. */
* { scrollbar-width: thin; scrollbar-color: var(--accent-dark) var(--cream); }
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: var(--cream); }
*::-webkit-scrollbar-thumb { border: 3px solid var(--cream); border-radius: 999px; background: linear-gradient(180deg, var(--accent), var(--accent-dark)); }
*::-webkit-scrollbar-thumb:hover { background: var(--primary); }
*::-webkit-scrollbar-corner { background: var(--cream); }
html, body { min-height: 100%; margin: 0; }
body { background: var(--cream); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.eyebrow--light { color: var(--on-dark-muted); }
.muted { color: var(--muted); line-height: 1.6; }

.brand-symbol { display: block; width: 46px; height: 46px; flex: 0 0 auto; filter: drop-shadow(0 5px 12px rgba(7, 35, 54, .16)); }
.brand-symbol--large { width: 88px; height: 88px; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, .92fr) 1.08fr; }
.auth-brand {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: clamp(3rem, 7vw, 7.5rem);
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, #173d58 0%, #12324c 55%, #0c2b43 100%);
  color: var(--on-dark);
}
.auth-brand::before,
.auth-brand::after {
  position: absolute;
  border: 1px solid rgba(191, 213, 225, .18);
  border-radius: 50%;
  content: "";
}
.auth-brand::before { width: 36rem; height: 36rem; top: -14rem; right: -25rem; border-color: rgba(85, 186, 197, .22); }
.auth-brand::after { width: 22rem; height: 22rem; bottom: -12rem; left: -9rem; border-color: rgba(242, 180, 54, .16); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-lockup { display: flex; margin-bottom: 4rem; align-items: center; gap: 1.2rem; }
.auth-lockup__copy { display: grid; gap: .15rem; }
.auth-lockup__copy span { color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.auth-lockup__copy strong { color: white; font-size: 1.5rem; letter-spacing: -.035em; }
.auth-brand h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 6vw, 6.7rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .96;
}
.auth-lead { max-width: 560px; margin: 2rem 0 3rem; color: var(--on-dark-muted); font-size: 1.06rem; line-height: 1.7; }
.auth-feature { display: flex; max-width: 560px; padding: 1.05rem 0; gap: 1rem; border-top: 1px solid rgba(255,255,255,.12); color: var(--on-dark); }
.feature-number { color: var(--gold); font-size: .75rem; font-weight: 800; letter-spacing: .1em; }
.auth-panel { display: grid; min-height: 100vh; padding: 3rem; place-items: center; background: var(--paper); }
.auth-panel__inner { width: min(440px, 100%); }
.auth-card h2 { margin: 0 0 .4rem; font-family: Georgia, "Times New Roman", serif; font-size: 2.4rem; font-weight: 500; letter-spacing: -.035em; }
.auth-card > .muted { margin: 0 0 2.2rem; }
.auth-card label, .editor-form label:not(.check-option):not(.switch-label), .editor-card label:not(.check-option):not(.switch-label) {
  display: grid;
  margin: 1rem 0;
  gap: .45rem;
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .025em;
}
.auth-card input, .editor-form input:not([type="checkbox"]), .editor-card input:not([type="checkbox"]),
.editor-form select, .editor-card select, textarea {
  width: 100%;
  min-height: 48px;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: white;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(31,110,140,.13); }
input:disabled, textarea:disabled, select:disabled { opacity: .65; }
label small { color: var(--muted); font-weight: 400; line-height: 1.4; }
.form-error { min-height: 1.4rem; color: var(--danger); font-size: .83rem; }
.mobile-brand { display: none; align-items: center; gap: .75rem; margin-bottom: 3rem; }
.mobile-brand > span { display: grid; gap: .05rem; }
.mobile-brand small { color: var(--accent-dark); font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mobile-brand strong { color: var(--navy); font-size: 1.1rem; }

.button {
  display: inline-flex;
  min-height: 44px;
  padding: .75rem 1.05rem;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  border: 0;
  border-radius: 8px;
  font-weight: 750;
  transition: transform .18s, background .18s, box-shadow .18s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; }
.button--primary { background: var(--primary); color: var(--on-dark); box-shadow: 0 8px 20px rgba(31,110,140,.2); }
.button--primary:hover:not(:disabled) { background: var(--accent-dark); }
.button--wide { width: 100%; margin-top: .5rem; justify-content: space-between; padding-inline: 1.2rem; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: 270px;
  padding: 1.6rem 1.2rem;
  flex-direction: column;
  background: linear-gradient(180deg, #173d58 0%, #12334d 100%);
  color: var(--on-dark);
  transition: width .2s ease, padding .2s ease;
}
.sidebar-toggle { position: absolute; z-index: 1; top: 1.5rem; right: -14px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #a8c8d4; border-radius: 50%; background: var(--paper); color: var(--navy); box-shadow: 0 3px 10px rgba(13,37,56,.18); font-size: 1.35rem; line-height: 1; transition: transform .2s ease, background .18s; }
.sidebar-toggle:hover { background: var(--primary-pale); }
.sidebar-brand { display: flex; padding: .2rem .4rem 1.7rem; align-items: center; gap: .85rem; color: var(--on-dark); text-decoration: none; }
.sidebar-brand__copy { display: grid; gap: .08rem; }
.sidebar-brand__copy small { color: var(--gold); font-size: .62rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-brand__copy strong { color: white; font-size: 1.15rem; font-weight: 850; letter-spacing: -.035em; }
.main-nav {
  flex: 1;
  overflow-y: auto;
  scrollbar-color: #54b9c3 rgba(5, 31, 49, .72);
}
.main-nav::-webkit-scrollbar { width: 10px; }
.main-nav::-webkit-scrollbar-track { border-radius: 999px; background: rgba(5, 31, 49, .72); }
.main-nav::-webkit-scrollbar-thumb { border: 2px solid rgba(5, 31, 49, .72); background: linear-gradient(180deg, #67c8d0, #207e91); }
.main-nav::-webkit-scrollbar-thumb:hover { background: #8ad9de; }
.nav-label { margin: 1.3rem .8rem .65rem; color: #a3cbd2; font-size: .64rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nav-label--spaced { margin-top: 2rem; }
.nav-module-group { margin: 1.4rem 0 .6rem; }
.nav-module-group__label { margin: 0 .8rem .45rem; color: var(--on-dark); font-size: .84rem; font-weight: 800; }
.nav-item {
  display: flex;
  min-height: 46px;
  margin: .2rem 0;
  padding: .7rem .8rem;
  align-items: center;
  gap: .8rem;
  border-radius: 8px;
  color: var(--on-dark-muted);
  font-size: .9rem;
  font-weight: 620;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.nav-item:hover { background: rgba(85,186,197,.14); color: var(--on-dark); }
.nav-item.is-active { background: linear-gradient(90deg, #207e91, #2c91a1); color: var(--on-dark); box-shadow: inset 3px 0 0 var(--gold); }
.nav-item--sub { min-height: 40px; margin-left: .55rem; padding-block: .55rem; font-size: .78rem; }
.nav-subitem__marker { width: 7px; height: 7px; border: 1px solid #a3cbd2; border-radius: 50%; }
.nav-item--sub.is-active .nav-subitem__marker { border-color: white; background: white; }
.nav-icon { display: grid; width: 24px; color: #a9d2d7; font-size: 1.1rem; place-items: center; }
.module-monogram { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #72aeb6; border-radius: 7px; color: var(--on-dark-muted); font-size: .68rem; font-weight: 900; }
.sidebar-footer { display: flex; padding: 1rem .25rem .1rem; align-items: center; gap: .7rem; border-top: 1px solid rgba(255,255,255,.1); }
.user-chip { display: flex; min-width: 0; flex: 1; align-items: center; gap: .7rem; }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--mint); color: var(--navy); font-size: .68rem; font-weight: 850; }
.avatar--large { width: 42px; height: 42px; }
.user-chip__text { display: grid; min-width: 0; }
.user-chip__text strong, .user-chip__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip__text strong { font-size: .78rem; }
.user-chip__text small { margin-top: .2rem; color: #a3cbd2; font-size: .66rem; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--on-dark-muted); font-size: 1.1rem; }
.icon-button:hover { background: rgba(85,186,197,.14); color: var(--on-dark); }

.workspace { min-height: 100vh; margin-left: 270px; }
.workspace { transition: margin-left .2s ease; }
.topbar { display: flex; height: 104px; padding: 1.5rem clamp(1.5rem, 4vw, 4rem); align-items: center; border-bottom: 1px solid var(--line); background: rgba(242,246,249,.92); }
.page-kicker { margin: 0 0 .22rem; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 500; letter-spacing: -.03em; }
.status-pill { display: flex; margin-left: auto; padding: .55rem .75rem; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 30px; background: rgba(255,255,255,.65); color: var(--ink-soft); font-size: .7rem; font-weight: 700; }
.status-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(53,166,200,.15); }
.content { max-width: 1500px; min-height: calc(100vh - 104px); padding: clamp(1.5rem, 4vw, 4rem); outline: none; }
.menu-button, .sidebar-backdrop { display: none; }

.sidebar-collapsed .sidebar { width: 76px; padding-inline: .65rem; }
.sidebar-collapsed .workspace { margin-left: 76px; }
.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }
.sidebar-collapsed .sidebar-brand { padding-inline: .15rem; justify-content: center; }
.sidebar-collapsed .sidebar-brand__copy,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-module-group__label,
.sidebar-collapsed .nav-item > span:not(.nav-icon):not(.module-monogram):not(.nav-subitem__marker),
.sidebar-collapsed .user-chip__text { display: none; }
.sidebar-collapsed .nav-module-group { margin-top: 1.2rem; }
.sidebar-collapsed .nav-item { justify-content: center; padding-inline: .45rem; }
.sidebar-collapsed .nav-item--sub { display: none; }
.sidebar-collapsed .sidebar-footer { justify-content: center; }
.sidebar-collapsed .user-chip { flex: 0 0 auto; }

.dashboard-hero {
  position: relative;
  display: flex;
  min-height: 250px;
  padding: clamp(2rem, 5vw, 4rem);
  align-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy);
  color: var(--on-dark);
}
.dashboard-hero::after { position: absolute; inset: auto -12% -70% auto; width: 500px; height: 500px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; content: ""; }
.dashboard-hero > div:first-child { position: relative; z-index: 1; }
.dashboard-hero h2 { max-width: 620px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.8rem); font-weight: 400; letter-spacing: -.045em; }
.dashboard-hero p:last-child { color: var(--on-dark-muted); }
.hero-orbit { position: absolute; right: 7%; display: grid; width: 150px; height: 150px; place-items: center; border: 1px solid rgba(191,213,225,.27); border-radius: 50%; }
.hero-orbit::before, .hero-orbit::after { position: absolute; border: 1px solid rgba(191,213,225,.12); border-radius: 50%; content: ""; }
.hero-orbit::before { width: 220px; height: 220px; }
.hero-orbit::after { width: 300px; height: 300px; }
.hero-orbit span { display: grid; width: 70px; height: 70px; place-items: center; border-radius: 20px; background: var(--accent); font-weight: 900; }
.section-heading { display: flex; margin: 3.4rem 0 1.3rem; align-items: flex-end; justify-content: space-between; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; letter-spacing: -.03em; }
.count-badge { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: .72rem; font-weight: 800; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 1.35rem; perspective: 1100px; }
.module-card {
  position: relative;
  display: flex;
  min-height: 260px;
  padding: 1.6rem;
  flex-direction: column;
  border: 1px solid #bfd2dd;
  border-right-color: #adc8d5;
  border-bottom-color: #9fbdcb;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #fafdfe 55%, #eef7fa 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.95),
    inset -1px -1px 0 rgba(31,110,140,.06),
    0 3px 0 #e4f0f5,
    0 7px 0 #d1e3eb,
    0 16px 28px rgba(13,37,56,.11);
  color: inherit;
  text-decoration: none;
  transform: translateY(0) rotateX(.35deg);
  transform-style: preserve-3d;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.module-card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 15% 5%, rgba(53,166,200,.11), transparent 34%);
  content: "";
  opacity: .7;
  pointer-events: none;
}
.module-card:hover,
.module-card:focus-visible {
  border-color: #8fb8ca;
  outline: none;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,1),
    inset -1px -1px 0 rgba(31,110,140,.07),
    0 4px 0 #e4f0f5,
    0 10px 0 #c8dee8,
    0 24px 38px rgba(13,37,56,.16);
  transform: translateY(-6px) rotateX(1deg) rotateY(-.5deg);
}
.module-card:active {
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.95),
    0 2px 0 #d1e3eb,
    0 8px 16px rgba(13,37,56,.12);
  transform: translateY(2px);
}
.module-card__top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; transform: translateZ(14px); }
.module-card__mark { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.8); border-radius: 13px; background: linear-gradient(145deg, #f8fcfd, #dceef4); box-shadow: 5px 6px 13px rgba(21,50,74,.13), inset 1px 1px 0 white; color: var(--primary); font-size: .8rem; font-weight: 900; letter-spacing: -.05em; }
.module-card__number { color: #8ca3b2; font-family: Georgia, serif; font-size: .78rem; }
.module-card h3 { position: relative; margin: 1.7rem 0 .4rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 500; transform: translateZ(10px); }
.module-card p { position: relative; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; transform: translateZ(8px); }
.module-card__action { position: relative; margin-top: auto; padding-top: 1.5rem; color: var(--accent-dark); font-size: .77rem; font-weight: 800; transform: translateZ(12px); }
.empty-state { grid-column: 1 / -1; padding: 3rem; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.empty-state p { color: var(--muted); }

.dashboard-todos { margin: 1.5rem 0 2.3rem; padding: 1.3rem; border: 1px solid #c7dae3; border-radius: 15px; background: linear-gradient(135deg, #f5fafc, #fff 62%); box-shadow: 0 8px 22px rgba(13,37,56,.06); }
.dashboard-todos__heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.dashboard-todos__heading h2 { margin: .1rem 0 0; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.dashboard-todos__controls { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.dashboard-todos__scope { padding: .48rem .65rem; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink-soft); font-size: .66rem; font-weight: 800; }
.dashboard-todos__scope:hover, .dashboard-todos__scope:focus-visible { border-color: #8fb8ca; outline: none; background: var(--primary-pale); }
.dashboard-todos__scope.is-active { border-color: var(--primary); background: var(--primary); color: white; }
.dashboard-todos__empty { padding: 1.2rem .2rem .2rem; }
.dashboard-todos__empty strong { font-size: .82rem; }
.dashboard-todos__empty p { margin: .35rem 0 0; color: var(--muted); font-size: .76rem; }
.dashboard-todo-list { display: grid; margin-top: .85rem; gap: .45rem; }
.dashboard-todo { display: grid; width: 100%; padding: .85rem; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: center; gap: .85rem; border: 1px solid var(--line); border-left: 3px solid #5d9db7; border-radius: 9px; background: white; color: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.dashboard-todo:hover, .dashboard-todo:focus-visible { border-color: #8fb8ca; outline: none; box-shadow: 0 4px 12px rgba(13,37,56,.09); transform: translateY(-1px); }
.dashboard-todo.is-overdue { border-left-color: #c55e56; background: #fff9f8; }
.dashboard-todo.is-today { border-left-color: #c28a29; background: #fffcf5; }
.dashboard-todo__date { color: var(--muted); font-size: .7rem; font-weight: 800; }
.dashboard-todo.is-overdue .dashboard-todo__date { color: #a4433d; }
.dashboard-todo.is-today .dashboard-todo__date { color: #8d651d; }
.dashboard-todo__detail { display: grid; min-width: 0; gap: .16rem; }
.dashboard-todo__detail strong { overflow: hidden; color: var(--ink); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-todo__detail span { overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-todo__action { color: var(--accent-dark); font-size: .66rem; font-weight: 800; white-space: nowrap; }

.module-placeholder { display: grid; min-height: 520px; padding: 3rem; place-items: center; align-content: center; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); text-align: center; }
.module-placeholder__mark { display: grid; width: 82px; height: 82px; margin-bottom: 2rem; place-items: center; border-radius: 24px; background: var(--navy); color: var(--on-dark); font-size: 1.15rem; font-weight: 900; letter-spacing: -.07em; box-shadow: 10px 10px 0 var(--primary-pale); }
.module-placeholder h2 { max-width: 680px; margin: .2rem 0 1rem; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 500; letter-spacing: -.04em; }
.module-placeholder > p:not(.eyebrow) { max-width: 700px; margin: 0; color: var(--muted); line-height: 1.7; }
.readiness-list { display: flex; margin-top: 2.2rem; flex-wrap: wrap; justify-content: center; gap: 1.4rem; color: var(--ink-soft); font-size: .8rem; font-weight: 700; }
.readiness-list i { display: inline-grid; width: 20px; height: 20px; margin-right: .25rem; place-items: center; border-radius: 50%; background: var(--primary-pale); color: var(--primary); font-style: normal; }

.casedesk-header { display: flex; padding-bottom: 2rem; align-items: flex-end; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.casedesk-header h2 { margin: 0 0 .45rem; font-family: Georgia, serif; font-size: clamp(2rem, 3vw, 2.8rem); font-weight: 500; letter-spacing: -.04em; }
.casedesk-header p:last-child { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.6; }
.case-search { display: flex; width: min(520px, 100%); gap: .6rem; }
.case-search input { width: 100%; min-height: 46px; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); }
.case-create { margin: 1.5rem 0; background: var(--paper); }
.casedesk-personal-work { margin-top: 1.5rem; }
.case-scope-control { display: flex; margin: 1.5rem 0 0; align-items: center; justify-content: space-between; gap: .8rem; color: var(--muted); font-size: .74rem; }
.case-state-filter { display: inline-flex; margin-top: 1.2rem; align-items: center; gap: .55rem; color: var(--ink-soft); font-size: .78rem; font-weight: 750; }
.case-state-filter input { width: 18px; height: 18px; accent-color: var(--primary); }
.case-list { margin-top: 1.8rem; }
.case-list__heading { display: flex; margin-bottom: 1rem; align-items: center; justify-content: space-between; }
.case-list__heading h3 { margin: 0; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.case-cards { display: grid; gap: .8rem; }
.case-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 5px 16px rgba(13,37,56,.05); }
.case-card.is-archived { opacity: .72; }
.case-card--list { display: grid; min-height: 86px; padding: 1rem 1.25rem; grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr) auto; align-items: center; gap: 1.5rem; transition: border-color .18s, box-shadow .18s, transform .18s; }
.case-card--list:hover { border-color: #a8cbd8; box-shadow: 0 9px 22px rgba(13,37,56,.09); transform: translateY(-1px); }
.case-card__open { padding: .55rem .7rem; border: 1px solid #bdd7e1; border-radius: 8px; background: var(--primary-pale); color: var(--accent-dark); font-size: .72rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.case-card__open:hover { border-color: #7db0c0; background: #dceff2; }
.case-card > summary { display: flex; min-height: 86px; padding: 1rem 1.25rem; align-items: center; justify-content: space-between; gap: 1.5rem; cursor: pointer; list-style: none; }
.case-card > summary::-webkit-details-marker { display: none; }
.case-card[open] > summary { border-bottom: 1px solid var(--line); background: var(--primary-pale); }
.case-card__main { display: grid; min-width: 0; gap: .28rem; }
.case-card__main strong { color: var(--accent-dark); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.case-card__main span { overflow: hidden; font-family: Georgia, serif; font-size: 1.2rem; text-overflow: ellipsis; white-space: nowrap; }
.case-card__meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.case-card__meta span { padding: .35rem .55rem; border-radius: 999px; background: var(--background); color: var(--muted); font-size: .67rem; font-weight: 700; }
.case-card__form { padding: 1.3rem; }
.case-detail { max-width: 1220px; }
.case-detail__header { display: grid; padding-bottom: 1.4rem; gap: .65rem; border-bottom: 1px solid var(--line); }
.case-detail__back { width: fit-content; color: var(--accent-dark); font-size: .76rem; font-weight: 800; text-decoration: none; }
.case-detail__back:hover { text-decoration: underline; }
.case-detail__header h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 3vw, 2.8rem); font-weight: 500; letter-spacing: -.04em; }
.case-detail__header p { margin: .35rem 0 0; color: var(--muted); font-size: .82rem; }
.case-detail__tabs { display: flex; margin-top: 1.25rem; gap: .45rem; overflow-x: auto; border-bottom: 1px solid var(--line); }
.case-detail__tab { padding: .75rem .9rem; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: .75rem; font-weight: 800; white-space: nowrap; }
.case-detail__tab:hover { color: var(--ink); }
.case-detail__tab.is-active { border-bottom-color: var(--accent); color: var(--ink); }
.case-detail__panels { margin-top: 1.15rem; }
.case-detail__panel { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.case-detail__panel-heading { padding: 1.3rem 1.3rem 0; }
.case-detail__panel-heading h3 { margin: .1rem 0 .35rem; font-family: Georgia, serif; font-size: 1.4rem; font-weight: 600; }
.case-detail__panel-heading p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.case-detail__form { padding-top: 1rem; }
.address-book-filter { display: grid; width: min(320px, 100%); margin: 1.15rem 0; gap: .35rem; color: var(--ink-soft); font-size: .72rem; font-weight: 750; }
.address-book-filter select { min-height: 40px; }
.address-book-list { margin-top: 1.1rem; }
.address-book-cards { display: grid; gap: .65rem; }
.address-book-card { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; }
.address-book-card > summary { display: flex; padding: .85rem 1rem; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; }
.address-book-card > summary::-webkit-details-marker { display: none; }
.address-book-card[open] > summary { border-bottom: 1px solid var(--line); background: var(--primary-pale); }
.address-book-card__heading { display: grid; min-width: 0; gap: .2rem; }
.address-book-card__heading strong { color: var(--ink); font-size: .82rem; }
.address-book-card__heading span { color: var(--muted); font-size: .68rem; }
.address-book-card__type, .case-party-card__role { flex: 0 0 auto; padding: .28rem .46rem; border-radius: 999px; background: var(--primary-pale); color: var(--primary); font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.address-book-card__body { background: rgba(255,255,255,.72); }
.address-book-card__details { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; padding: 1rem; gap: .5rem .8rem; font-size: .74rem; }
.address-book-card__details dt { color: var(--muted); font-weight: 800; }
.address-book-card__details dd { margin: 0; color: var(--ink-soft); }
.case-party-structure { display: grid; padding: 1.1rem 1.3rem 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.case-party-review { display: grid; margin: 1rem 1.3rem 0; padding: .8rem .9rem; gap: .24rem; border: 1px solid #e4c57e; border-left: 4px solid var(--gold); border-radius: 9px; background: #fffaf0; }
.case-party-review strong { color: var(--ink); font-size: .76rem; }
.case-party-review p { margin: 0; color: var(--ink-soft); font-size: .69rem; line-height: 1.45; }
.case-party-group { min-width: 0; padding: .9rem; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, rgba(239,247,250,.52), rgba(255,255,255,.75)); }
.case-party-group--independent { background: linear-gradient(180deg, rgba(250,247,239,.72), rgba(255,255,255,.75)); }
.case-party-group h4 { margin: 0 0 .7rem; color: var(--ink); font-size: .76rem; }
.case-party-group__empty { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.case-party-group__children { display: grid; margin: .6rem 0 0 .85rem; padding-left: .7rem; gap: .55rem; border-left: 2px solid #b9d4df; }
.case-party-card { display: grid; padding: .72rem .75rem; gap: .28rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.case-party-card--root { border-color: #abd0dc; box-shadow: 0 2px 0 rgba(58,126,153,.08); }
.case-party-card--review { border-color: #e4c57e; background: #fffdf8; }
.case-party-card__heading { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.case-party-card__review-badge { padding: .25rem .42rem; border-radius: 999px; background: #fff0c8; color: #825e10; font-size: .56rem; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.case-party-card strong { color: var(--ink); font-size: .76rem; }
.case-party-card p { margin: 0; color: var(--muted); font-size: .67rem; line-height: 1.4; }
.case-party-card small { color: var(--ink-soft); font-size: .64rem; line-height: 1.35; }
.case-party-edit { margin-top: .35rem; border-top: 1px solid var(--line); }
.case-party-edit > summary { padding-top: .55rem; color: var(--accent-dark); cursor: pointer; font-size: .64rem; font-weight: 800; }
.case-party-edit .editor-form { padding: .75rem 0 .1rem; }
.case-party-edit .editor-form label { font-size: .64rem; }
.case-party-edit .form-actions { align-items: center; flex-wrap: wrap; }
.case-party-review-check { display: flex !important; padding: .6rem .65rem; align-items: center; gap: .35rem; border: 1px solid #e4c57e; border-radius: 7px; background: #fffaf0; color: var(--ink-soft); }
.case-party-review-check input { width: auto; }
.case-party-create { margin: 1.1rem 1.3rem 1.3rem; border: 1px solid #c7dae3; border-radius: 10px; background: rgba(239,247,250,.5); }
.case-party-create > summary { padding: .85rem .95rem; color: var(--accent-dark); cursor: pointer; font-size: .78rem; font-weight: 800; }
.case-party-create[open] > summary { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.68); }
.case-party-create__new-entry { margin-top: 1rem; padding: 0 .95rem .95rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.75); }
.case-party-create__new-entry .form-section-label { margin-top: 1rem; }
.case-party-create__details { margin-top: 1rem; }
.case-claims { padding: 1.3rem; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(250,247,239,.72), rgba(255,255,255,.75)); }
.case-claims__heading { display: flex; margin-bottom: 1rem; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.case-claims__heading h3 { margin: .1rem 0 .35rem; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 600; }
.case-claims__heading p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.case-claims__totals { display: grid; min-width: min(100%, 380px); grid-template-columns: repeat(3, minmax(92px, 1fr)); gap: .5rem; }
.claim-total { display: grid; padding: .65rem .7rem; gap: .2rem; border: 1px solid var(--line); border-radius: 8px; background: white; }
.claim-total span, .claim-amount span { color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.claim-total strong { color: var(--ink); font-size: .84rem; }
.claim-total--recognized strong, .claim-amount--recognized strong { color: #16744d; }
.claim-total--reduced strong, .claim-amount--reduced strong { color: #a03e36; }
.case-claims__create, .claim-item__edit { margin: 1.1rem 0; border: 1px solid #d8cfaf; border-radius: 10px; background: rgba(255,255,255,.78); }
.case-claims__create > summary, .claim-item__edit > summary { padding: .82rem .95rem; color: var(--accent-dark); cursor: pointer; font-size: .78rem; font-weight: 800; }
.case-claims__form { border-top: 1px solid var(--line); }
.claim-items { display: grid; gap: .5rem; }
.claim-item { display: grid; padding: .8rem .85rem; gap: .85rem; border: 1px solid var(--line); border-left: 4px solid #d0a333; border-radius: 8px; background: rgba(255,255,255,.88); }
.claim-item__description { display: grid; min-width: 0; gap: .15rem; }
.claim-item__description strong { font-size: .8rem; }
.claim-item__description > span { color: var(--accent-dark); font-size: .66rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.claim-item__description p { margin: .15rem 0 0; color: var(--ink-soft); font-size: .73rem; line-height: 1.4; }
.claim-item__description small { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.claim-item__amounts { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: .45rem; }
.claim-amount { display: grid; padding: .5rem .6rem; gap: .18rem; border-radius: 7px; background: var(--primary-pale); }
.claim-amount strong { font-size: .78rem; }
.claim-amount--pending strong { color: var(--muted); }
.claim-item__edit { margin: 0; }
.mandantenkonto { padding: 1.3rem; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(239,247,250,.72), rgba(255,255,255,.75)); }
.mandantenkonto__heading { display: flex; margin-bottom: 1rem; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.mandantenkonto__heading h3 { margin: .1rem 0 .35rem; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 600; }
.mandantenkonto__heading p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.mandantenkonto__totals { display: grid; min-width: min(100%, 380px); grid-template-columns: repeat(3, minmax(92px, 1fr)); gap: .5rem; }
.ledger-total { display: grid; padding: .65rem .7rem; gap: .2rem; border: 1px solid var(--line); border-radius: 8px; background: white; }
.ledger-total span { color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ledger-total strong { color: var(--ink); font-size: .8rem; }
.ledger-total--in strong { color: #16744d; }
.ledger-total--out strong { color: #a03e36; }
.ledger-total--balance strong { color: var(--accent-dark); }
.mandantenkonto__form { margin: 1.1rem 0; border: 1px solid #c7dae3; border-radius: 10px; background: rgba(255,255,255,.78); }
.form-hint { margin: 0 0 .8rem; padding: .65rem .75rem; border-left: 3px solid var(--accent); border-radius: 4px; background: var(--primary-pale); color: var(--ink-soft); font-size: .73rem; line-height: 1.4; }
.ledger-entries { display: grid; gap: .5rem; }
.ledger-entry { display: grid; min-height: 62px; padding: .75rem .85rem; grid-template-columns: 94px minmax(0, 1fr) auto auto; align-items: center; gap: .9rem; border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; background: rgba(255,255,255,.88); }
.ledger-entry--in { border-left-color: #3d9f74; }
.ledger-entry--out { border-left-color: #cd7770; }
.ledger-entry__date { color: var(--muted); font-size: .72rem; font-weight: 700; }
.ledger-entry__description { display: grid; min-width: 0; gap: .15rem; }
.ledger-entry__description strong { font-size: .78rem; }
.ledger-entry__description span { overflow: hidden; color: var(--ink-soft); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.ledger-entry__description small { color: var(--muted); font-size: .62rem; }
.ledger-entry__amount { min-width: 95px; text-align: right; font-size: .8rem; }
.ledger-entry--in .ledger-entry__amount { color: #16744d; }
.ledger-entry--out .ledger-entry__amount { color: #a03e36; }
.button--quiet { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--accent-dark); font-size: .68rem; font-weight: 800; }
.button--quiet:hover { border-color: #8fb8ca; background: var(--primary-pale); }
.button--danger-quiet { margin-left: auto; padding: .45rem .6rem; border: 1px solid #e3b8b4; border-radius: 7px; background: #fff8f7; color: var(--danger); font-size: .68rem; font-weight: 800; }
.button--danger-quiet:hover:not(:disabled) { border-color: #ce827c; background: #fff0ee; }

.case-workspace { margin: 0 1rem 1rem; padding: 1.25rem; border: 1px solid #cfe1e8; border-radius: 11px; background: linear-gradient(180deg, #f7fbfc 0%, #fff 55%); }
.case-workspace__heading { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.case-workspace__heading h3 { margin: .1rem 0 .35rem; font-family: Georgia, serif; font-size: 1.3rem; font-weight: 600; }
.case-workspace__heading p:last-child { max-width: 680px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.case-workspace__columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
.work-panel { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.86); }
.work-panel > h4 { margin: 0; color: var(--ink); font-size: .78rem; font-weight: 800; }
.work-panel .editor-form { padding: 1rem 0 .2rem; }
.work-panel .editor-form label { font-size: .68rem; }
.work-items, .timeline { display: grid; gap: .65rem; margin-top: 1rem; }
.work-empty { margin: 1rem 0 0; color: var(--muted); font-size: .75rem; }
.work-item { display: flex; padding: .8rem; align-items: flex-start; justify-content: space-between; gap: .75rem; border: 1px solid var(--line); border-left: 3px solid #5d9db7; border-radius: 8px; background: #fff; }
.work-item--completed { border-left-color: #6eaa83; background: #fbfdfb; }
.work-item--cancelled { border-left-color: #af8b76; background: #fdfaf8; }
.work-item > div { display: grid; min-width: 0; gap: .32rem; }
.work-item__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.work-item__top strong { color: var(--ink); font-size: .76rem; }
.work-status, .timeline-entry__type { flex: 0 0 auto; padding: .2rem .35rem; border-radius: 4px; background: var(--primary-pale); color: var(--primary); font-size: .56rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.work-item--completed .work-status { background: #e6f3eb; color: #3e7a57; }
.work-item__dates, .work-item small { color: var(--muted); font-size: .65rem; line-height: 1.4; }
.work-item p { margin: .08rem 0 0; color: var(--ink-soft); font-size: .7rem; line-height: 1.4; white-space: pre-wrap; }
.timeline-entry { position: relative; display: grid; gap: .3rem; padding: .8rem .8rem .8rem 1rem; border-left: 2px solid #b9d4df; background: #fff; }
.timeline-entry::before { position: absolute; left: -5px; top: 1rem; width: 8px; height: 8px; border-radius: 999px; background: var(--accent); content: ""; }
.timeline-entry time, .timeline-entry small { color: var(--muted); font-size: .62rem; }
.timeline-entry__type { width: fit-content; }
.timeline-entry strong { color: var(--ink); font-size: .73rem; }
.timeline-entry p { margin: 0; color: var(--ink-soft); font-size: .71rem; line-height: 1.45; white-space: pre-wrap; }

.admin-intro { display: flex; padding-bottom: 2rem; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.admin-intro h2 { margin: 0 0 .5rem; font-family: Georgia, serif; font-size: 2.25rem; font-weight: 500; letter-spacing: -.04em; }
.admin-intro p:last-child { margin: 0; color: var(--muted); }
.security-note { display: flex; max-width: 360px; padding: 1rem; align-items: center; gap: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--primary-pale); }
.security-note > span { color: var(--primary); }
.security-note div { display: grid; gap: .2rem; }
.security-note strong { font-size: .76rem; }
.security-note small { color: var(--muted); font-size: .69rem; line-height: 1.4; }
.tabs { display: flex; margin: 2rem 0 1.2rem; gap: .35rem; border-bottom: 1px solid var(--line); }
.tabs button { padding: .85rem 1rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 750; }
.tabs button.is-active { border-bottom-color: var(--accent); color: var(--ink); }
.admin-panel { min-height: 240px; }
.loading { padding: 3rem; color: var(--muted); text-align: center; }
.error-box { padding: 1rem; border: 1px solid #e6c1bd; border-radius: 10px; background: #fff1ef; color: var(--danger); }
.create-box { margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.6); }
.create-box summary { padding: 1rem 1.2rem; color: var(--accent-dark); font-size: .8rem; font-weight: 800; cursor: pointer; list-style: none; }
.create-box summary::-webkit-details-marker { display: none; }
.create-box[open] summary { border-bottom: 1px solid var(--line); }
.editor-form { padding: 1.2rem; }
.editor-list { display: grid; gap: 1rem; }
.editor-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.editor-card__heading { display: flex; margin-bottom: 1rem; align-items: center; justify-content: space-between; gap: 1rem; }
.editor-card__heading > div:first-child { display: flex; align-items: center; gap: .6rem; }
.editor-card h3 { margin: 0; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 600; }
.invitation-result { display: grid; margin-top: 1rem; padding: 1rem; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: end; border: 1px solid rgba(53,166,200,.35); border-radius: 12px; background: rgba(53,166,200,.08); }
.invitation-result[hidden] { display: none; }
.invitation-result p { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: .82rem; }
.invitation-result input { min-width: 0; }
.invitation-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 1rem; align-items: center; }
.invitation-card > span:not(.status-pill) { color: var(--ink-soft); font-size: .8rem; overflow-wrap: anywhere; }
.badge { padding: .28rem .48rem; border-radius: 5px; background: var(--primary-pale); color: var(--primary); font-size: .6rem; font-weight: 800; text-transform: uppercase; }
.editor-count { color: var(--muted); font-size: .7rem; }
.field-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1rem; }
.field-row--three { grid-template-columns: repeat(3, 1fr); }
.form-section-label { margin: 1.3rem 0 .7rem; color: var(--ink-soft); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: .5rem; }
.check-option { display: flex; min-height: 58px; padding: .7rem .8rem; align-items: flex-start; gap: .65rem; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.check-option:has(input:checked) { border-color: #8fb8ca; background: var(--primary-pale); }
.check-option input { margin-top: .15rem; accent-color: var(--primary); }
.check-option span { display: grid; gap: .15rem; }
.check-option strong { color: var(--ink); font-size: .75rem; }
.check-option small { color: var(--muted); font-size: .67rem; line-height: 1.35; }
.form-actions { display: flex; margin-top: 1.2rem; justify-content: flex-end; }
.person-heading { display: flex !important; align-items: center; gap: .75rem !important; }
.person-heading > div { display: grid; gap: .16rem; }
.person-heading small { color: var(--muted); }
.editor-form .switch-label, .editor-card .switch-label {
  display: inline-flex;
  min-height: 48px;
  margin: 0;
  align-items: center;
  gap: .65rem;
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: 0;
}
.editor-form .switch-label input, .editor-card .switch-label input {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}

.toast-region { position: fixed; z-index: 100; right: 1.2rem; bottom: 1.2rem; display: grid; width: min(380px, calc(100vw - 2.4rem)); gap: .6rem; }
.toast { padding: .9rem 1rem; border-radius: 9px; background: var(--navy); color: var(--on-dark); box-shadow: var(--shadow); font-size: .8rem; animation: toast-in .25s ease-out; }
.toast--error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .module-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .hero-orbit { opacity: .45; }
  .check-grid { grid-template-columns: 1fr; }
  .field-row--three { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 1.5rem; }
  .mobile-brand { display: flex; }
  .mobile-brand .brand-symbol { width: 42px; height: 42px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease-out; }
  .sidebar-toggle { display: none; }
  .sidebar-collapsed .sidebar { width: 270px; padding: 1.6rem 1.2rem; }
  .sidebar-collapsed .workspace { margin-left: 0; }
  .sidebar-collapsed .sidebar-brand { padding: .2rem .4rem 1.7rem; justify-content: flex-start; }
  .sidebar-collapsed .sidebar-brand__copy { display: grid; }
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .nav-module-group__label { display: block; }
  .sidebar-collapsed .nav-item > span:not(.nav-icon):not(.module-monogram):not(.nav-subitem__marker) { display: inline; }
  .sidebar-collapsed .nav-module-group { margin-top: 1.4rem; }
  .sidebar-collapsed .nav-item { justify-content: flex-start; padding-inline: .8rem; }
  .sidebar-collapsed .nav-item--sub { display: flex; }
  .sidebar-collapsed .sidebar-footer { justify-content: flex-start; }
  .sidebar-collapsed .user-chip { flex: 1; }
  .sidebar-collapsed .user-chip__text { display: grid; }
  .menu-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 15; inset: 0; border: 0; background: rgba(13,37,56,.44); }
  .menu-open .sidebar-backdrop { display: block; }
  .workspace { margin-left: 0; }
  .topbar { height: 86px; }
  .menu-button { display: grid; width: 40px; height: 40px; margin-right: .8rem; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy); }
  .content { min-height: calc(100vh - 86px); }
  .status-pill { display: none; }
  .admin-intro { align-items: flex-start; flex-direction: column; }
  .casedesk-header { align-items: flex-start; flex-direction: column; }
  .case-scope-control { align-items: flex-start; flex-direction: column; }
  .case-claims__heading { align-items: flex-start; flex-direction: column; }
  .case-claims__totals { width: 100%; }
  .mandantenkonto__heading { align-items: flex-start; flex-direction: column; }
  .mandantenkonto__totals { width: 100%; }
  .case-workspace__columns { grid-template-columns: 1fr; }
  .case-party-structure { grid-template-columns: 1fr; }
  .dashboard-todo { grid-template-columns: 110px minmax(0, 1fr); }
  .dashboard-todo__action { grid-column: 2; }
  .dashboard-todos__heading { align-items: flex-start; flex-direction: column; }
  .dashboard-todos__controls { justify-content: flex-start; }
  .security-note { max-width: none; }
}

@media (max-width: 580px) {
  .auth-card h2 { font-size: 2rem; }
  .topbar, .content { padding-inline: 1rem; }
  .dashboard-hero { min-height: 300px; padding: 2rem 1.4rem; }
  .hero-orbit { right: -90px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 230px; }
  .field-row, .field-row--three { grid-template-columns: 1fr; gap: 0; }
  .editor-card { padding: 1rem; }
  .editor-card__heading { align-items: flex-start; }
  .readiness-list { align-items: flex-start; flex-direction: column; }
  .module-placeholder { padding: 2rem 1.2rem; }
  .dashboard-todo { grid-template-columns: 1fr; gap: .35rem; }
  .dashboard-todo__action { grid-column: 1; }
  .case-search { flex-direction: column; }
  .case-card--list { grid-template-columns: 1fr; align-items: flex-start; }
  .case-card > summary { align-items: flex-start; flex-direction: column; }
  .case-card__meta { justify-content: flex-start; }
  .address-book-card > summary { align-items: flex-start; flex-direction: column; }
  .ledger-entry { grid-template-columns: 1fr auto; gap: .5rem; }
  .claim-item__amounts { grid-template-columns: 1fr; }
  .ledger-entry__date { grid-column: 1; }
  .ledger-entry__description { grid-column: 1 / -1; grid-row: 2; }
  .ledger-entry__amount { grid-column: 2; grid-row: 1; }
  .ledger-entry .button--quiet { grid-column: 2; grid-row: 3; }
}

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