/* ==========================================================================
   Akteneinsicht24 · Mandantenportal (Dashboard-Entwurf)
   Gleiches Designsystem wie die Landingpage: warmes Greige, Ink, Silber,
   großzügige Radien, enge Display-Typo, Signalfarbe Salbei.
   ========================================================================== */

:root {
  /* Basis */
  --bg: #F0EDE7;
  --surface: #F7F6F2;
  --surface-2: #E7E3DC;
  --ink: #1f252e;
  --ink-2: #43484E;
  --muted: #63676C;          /* etwas dunkler als auf der Landingpage: 4,5:1 auf allen Flächen */
  --line: rgba(22, 27, 33, .10);
  --line-strong: rgba(22, 27, 33, .16);
  --on-ink: #F3F1EC;
  --on-ink-2: rgba(243, 241, 236, .66);
  --on-ink-line: rgba(243, 241, 236, .10);

  /* Silber */
  --silver: linear-gradient(135deg, #FAFAF9 0%, #DFE0E1 20%, #F7F7F6 40%, #D3D5D7 63%, #F3F3F2 82%, #DCDDDE 100%);
  --silver-soft: linear-gradient(160deg, #F6F6F4 0%, #E6E7E7 34%, #F4F4F2 58%, #DFE0E1 100%);
  --silver-text: linear-gradient(180deg, #D9DADC 0%, #C2C5C9 45%, #E9EAEB 70%, #BFC2C6 100%);

  /* Signalfarbe: Salbei */
  --accent: #6A8F77;
  --accent-ink: #3D6249;
  --accent-soft: #DFECE2;
  --accent-on-dark: #9DC3A9;
  --accent-strong: #587C66;  /* Salbei für kleine Badges mit weißer Schrift (4,6:1) */

  /* Typo */
  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* Form */
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --gutter: clamp(12px, 1.6vw, 20px);
  --gap: 16px;
  --side-w: 280px;
  --top-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --shadow-sm: 0 1px 2px rgba(22, 27, 33, .06), 0 4px 12px -6px rgba(22, 27, 33, .10);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 40px 80px -40px rgba(22, 27, 33, .35), 0 16px 32px -20px rgba(22, 27, 33, .18);
}


/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
html:has(dialog[open]), html.is-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 15.5px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.9rem); line-height: 1.02; letter-spacing: -.045em; }
h2 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.025em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--on-ink); transition: top .2s; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: #fff; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }


/* ---------- Bausteine aus der Landingpage ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13.5px/1 var(--font-body); color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.dot--live { animation: live 2.4s var(--ease) infinite; }
@keyframes live {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  60% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  height: var(--h);
  padding: 0 7px 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font: 500 15px/1 var(--font-body);
  letter-spacing: -.005em;
  white-space: nowrap;
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: #2a313b; }
.btn:active { transform: scale(.985); }
.btn__icon { width: calc(var(--h) - 14px); height: calc(var(--h) - 14px); display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--accent); color: #fff; transition: transform .35s var(--ease), background-color .3s; }
.btn__icon svg { width: 17px; height: 17px; }
.btn:hover .btn__icon { transform: translateX(2px); }
.btn--sm { --h: 44px; padding-left: 18px; font-size: 14.5px; gap: 12px; }
.btn--sm .btn__icon svg { width: 15px; height: 15px; }
.btn--xs { --h: 36px; padding: 0 14px; font-size: 13.5px; gap: 8px; }
.btn--xs svg { width: 14px; height: 14px; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { background: transparent; color: var(--accent-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn--ghost .btn__icon { background: var(--ink); }
.btn--ghost:hover .btn__icon { background: var(--accent); }
.btn--light { background: var(--on-ink); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-ink); }
.btn--glass { background: rgba(250, 249, 246, .62); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-right: 10px; }
.btn--glass:hover { background: rgba(250, 249, 246, .9); }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.logo__mark { width: 30px; height: 30px; flex: none; color: var(--ink); }
.logo__word { font: 600 18px/1 var(--font-display); letter-spacing: -.035em; }
.logo__word span { color: var(--muted); font-weight: 500; }
.logo--light { color: var(--on-ink); --logo-paper: var(--ink); }
.logo--light .logo__mark { color: var(--on-ink); }
.logo--light .logo__word span { color: var(--on-ink-2); }

.status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font: 500 13px/1 var(--font-body); white-space: nowrap; }
.status-chip .dot { width: 6px; height: 6px; box-shadow: none; }
.status-chip--wait { background: var(--surface-2); color: var(--ink-2); }
.status-chip--wait .dot { background: var(--muted); animation: blink 1.8s ease-in-out infinite; }
.status-chip--action { background: var(--ink); color: var(--on-ink); }
.status-chip--action .dot { background: var(--accent-on-dark); }
.status-chip--done { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.status-chip--done .dot { background: var(--line-strong); }
@keyframes blink { 50% { opacity: .25; } }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); transition: background-color .25s, color .25s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.seg em { font-style: normal; font-size: 11.5px; min-width: 18px; padding: 2px 5px; border-radius: 999px; text-align: center; background: var(--accent-strong); color: #fff; }
.seg em:empty, .seg em[data-zero] { display: none; }
.lbl-short { display: none; }

.files { display: grid; }
.files li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.files li:first-child { border-top: 0; }
.files__icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--silver-soft); box-shadow: inset 0 0 0 1px rgba(22, 27, 33, .06); color: var(--ink-2); flex: none; }
.files__icon svg { width: 17px; height: 17px; }
.files__name { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files__name small { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.files__size { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.new { display: inline-block; margin-right: 4px; padding: 2px 7px; border-radius: 999px; font: 600 10.5px/1.4 var(--font-body); letter-spacing: .02em; text-transform: uppercase; vertical-align: 1px; background: var(--accent-strong); color: #fff; }

.toast {
  position: fixed; z-index: 90; left: 50%; bottom: 24px;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  width: max-content; max-width: min(92vw, 520px);
  padding: 14px 20px; border-radius: 16px;
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
  font-size: 14.5px; line-height: 1.45;
  transition: opacity .3s, transform .4s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast b { font-weight: 600; }


/* ---------- Neue Bausteine ---------- */
.icon-btn { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color .2s, color .2s, box-shadow .2s, transform .2s var(--ease); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--ink); background: var(--surface); }
.icon-btn:active { transform: scale(.95); }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm svg { width: 15px; height: 15px; }
.icon-btn--plain { box-shadow: none; }
.icon-btn--plain:hover { background: var(--bg); }
.icon-btn--dark { width: 38px; height: 38px; color: var(--on-ink-2); box-shadow: inset 0 0 0 1px var(--on-ink-line); }
.icon-btn--dark:hover { color: var(--on-ink); background: rgba(243, 241, 236, .06); }
.icon-btn__dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); transition: transform .3s var(--ease); }
.icon-btn__dot[hidden] { display: block; transform: scale(0); }

.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font: 600 12px/1 var(--font-body); font-variant-numeric: tabular-nums; background: rgba(243, 241, 236, .08); color: var(--on-ink); }
.count--accent { background: var(--accent-strong); color: #fff; }
.count[data-zero] { display: none; }

.avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 13.5px/1 var(--font-display); letter-spacing: -.02em; background: var(--silver); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.avatar svg { width: 22px; height: 22px; }
.avatar--ink { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.avatar--lg { width: 56px; height: 56px; font-size: 17px; }
.avatar--online::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent-on-dark); box-shadow: 0 0 0 2.5px var(--ink); }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font: 500 12px/1 var(--font-body); white-space: nowrap; background: var(--bg); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.tag svg { width: 11px; height: 11px; }
.tag--mono { font: 400 11.5px/1 var(--font-mono); letter-spacing: -.01em; }
.tag--accent { background: var(--accent-strong); color: #fff; box-shadow: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font: 500 13px/1 var(--font-body); white-space: nowrap; background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.chip svg { width: 14px; height: 14px; color: var(--accent); flex: none; }

.link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1.5px; transition: color .2s; white-space: nowrap; }
.link:hover { color: var(--ink); }

.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: var(--v, 0%); border-radius: inherit; background: var(--accent); transition: width .8s var(--ease); }

.ring { width: 56px; height: 56px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4.5; }
.ring__track { stroke: var(--line); }
.ring__fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s var(--ease) .3s; }
.is-in .ring__fill, .ring.is-on .ring__fill { stroke-dashoffset: calc(100 - var(--v)); }


/* ---------- App-Rahmen ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

/* Seitenleiste */
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: var(--gutter) 0 var(--gutter) var(--gutter); z-index: 50; }
.side__inner {
  position: relative; isolation: isolate;
  height: 100%; display: flex; flex-direction: column; gap: 20px;
  padding: 22px 14px 14px;
  border-radius: var(--r-xl);
  background: var(--ink); color: var(--on-ink-2);
  overflow: hidden auto; scrollbar-width: none;
}
.side__inner::-webkit-scrollbar { display: none; }
.side__inner > * { flex-shrink: 0; }
.side__inner::before { content: ""; position: absolute; z-index: -1; left: -40%; top: -18%; width: 120%; aspect-ratio: 1; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent); pointer-events: none; }
.side__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px; }
.side__close { display: none; }
.side__new { margin-top: 4px; }
.side__nav { display: grid; gap: 2px; }
.side__label { padding: 14px 12px 8px; font: 500 11px/1 var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: rgba(243, 241, 236, .52); }
.side__label:first-child { padding-top: 0; }
.side__link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px 0 12px; border-radius: 14px; font-size: 15px; color: var(--on-ink-2); transition: background-color .2s, color .2s; }
.side__link svg { width: 18px; height: 18px; flex: none; }
.side__link .count { margin-left: auto; }
.side__link:hover { background: rgba(243, 241, 236, .05); color: var(--on-ink); }
.side__link.is-active { background: rgba(243, 241, 236, .09); color: var(--on-ink); box-shadow: inset 0 0 0 1px var(--on-ink-line); }
.side__link.is-active svg { color: var(--accent-on-dark); }

.side__plan { position: relative; overflow: hidden; margin-top: auto; padding: 16px; border-radius: 18px; background: var(--silver); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); font-size: 13.5px; line-height: 1.45; }
.side__plan::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .6) 45%, transparent 60%) -200% 0 / 250% 100% no-repeat; pointer-events: none; transition: background-position 1.4s var(--ease); }
.side__plan:hover::after { background-position: 200% 0; }
.side__plan-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side__plan-top svg { width: 18px; height: 18px; color: var(--accent); }
.side__plan b { color: var(--ink); font-weight: 600; }
.side__plan .link { margin-top: 10px; font-size: 13.5px; color: var(--ink); }

.side__user { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 4px 0; border-top: 1px solid var(--on-ink-line); }
.side__user b { display: block; color: var(--on-ink); font-weight: 500; font-size: 14.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__user span:not(.avatar) { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrim { display: none; }

/* Hauptbereich */
.main-wrap { min-width: 0; padding: 0 var(--gutter) var(--gutter) clamp(16px, 2vw, 28px); }
.top {
  position: sticky; top: 0; z-index: 40;
  height: var(--top-h);
  display: flex; align-items: center; gap: 12px;
  margin: 0 calc(-1 * var(--gutter)) 0 calc(-1 * clamp(16px, 2vw, 28px));
  padding: 0 var(--gutter) 0 clamp(16px, 2vw, 28px);
  transition: background-color .3s, box-shadow .3s;
}
.top.is-scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
.top__menu, .top__logo, .top__search-btn { display: none; }
.top__crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.top__crumb svg { width: 11px; height: 11px; }
.top__crumb b { color: var(--ink); font-weight: 500; }

.search { position: relative; flex: 1; max-width: 440px; margin-left: auto; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .25s; }
.search:focus-within { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.search > svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--ink); }
.search input::placeholder { color: #6A6E73; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search kbd { font: 500 12px/1 var(--font-mono); padding: 6px 9px; border-radius: 8px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.search__close { display: none; }
.top__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top__new { display: none; }


/* ---------- Raster ---------- */
.dash {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "welcome  welcome  welcome"
    "stats    stats    stats"
    "cases    cases    inbox"
    "file     activity inbox"
    "tasks    lawyer   plus"
    "security security security";
  align-items: start;
}
.welcome { grid-area: welcome; }
.stats { grid-area: stats; }
.panel--cases { grid-area: cases; }
.panel--inbox { grid-area: inbox; align-self: stretch; }
.panel--file { grid-area: file; }
.panel--activity { grid-area: activity; }
.panel--tasks { grid-area: tasks; }
.panel--lawyer { grid-area: lawyer; }
.panel--plus { grid-area: plus; }
.panel--security { grid-area: security; }
.panel--file, .panel--activity, .panel--tasks, .panel--lawyer, .panel--plus { align-self: stretch; }


/* ---------- Willkommen (Bildleiste) ---------- */
.welcome {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 232px;
  display: flex; align-items: center; gap: 24px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-xl);
  background: var(--surface-2);
}
.welcome__img {
  position: absolute; z-index: -2; top: 0; right: 0;
  width: 74%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .55) 22%, #000 52%);
          mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .55) 22%, #000 52%);
  animation: drift 2.6s var(--ease) both;
}
.welcome::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 50% 90% at 18% 50%, rgba(240, 237, 231, .7), rgba(240, 237, 231, 0) 70%); pointer-events: none; }
@keyframes drift { from { transform: scale(1.06); opacity: .3; } to { transform: scale(1); opacity: 1; } }
.welcome__content { position: relative; max-width: 560px; }
.welcome .eyebrow { margin-bottom: 14px; color: var(--ink-2); }
.welcome__lead { margin-top: 12px; max-width: 46ch; font-size: 15.5px; color: var(--ink-2); text-wrap: pretty; }
.welcome__lead b { color: var(--ink); font-weight: 600; }
.welcome__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.welcome__actions .btn--glass .count { margin-left: 2px; }

.welcome__float {
  margin-left: auto; align-self: flex-end;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: min(100%, 340px); padding: 12px 12px 12px 14px;
  border-radius: 20px;
  background: rgba(250, 249, 246, .5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 24px 48px -28px rgba(22, 27, 33, .45);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  color: var(--ink);
  transition: background-color .25s, transform .3s var(--ease);
}
.welcome__float:hover { background: rgba(250, 249, 246, .72); transform: translateY(-2px); }
.welcome__float .files__icon { background: rgba(255, 255, 255, .7); }
.welcome__float b { display: block; font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.welcome__float span:not([class]) { display: block; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.welcome__float .btn__icon { width: 38px; height: 38px; }


/* ---------- Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.stat {
  position: relative; overflow: hidden;
  min-height: 160px; padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  border-radius: var(--r-lg);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .3s var(--ease), box-shadow .3s;
}
a.stat:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-sm); }
.stat__head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.stat__icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--bg); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.stat__icon svg { width: 16px; height: 16px; }
.stat__go { margin-left: auto; width: 16px; height: 16px; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
a.stat:hover .stat__go { transform: translate(2px, -2px); color: var(--ink); }
.stat__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.stat__value { font: 500 2.75rem/.9 var(--font-display); letter-spacing: -.055em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__value small { margin-left: 6px; font-size: .38em; font-weight: 500; letter-spacing: -.01em; color: var(--muted); }
.stat__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.trend { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font: 500 12px/1 var(--font-body); background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.trend--ink { background: var(--ink); color: var(--on-ink); }
.stat--silver { background: var(--silver); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), var(--shadow-sm); }
.stat--silver .stat__icon { background: rgba(255, 255, 255, .65); }
.stat--silver .ring__track { stroke: rgba(22, 27, 33, .08); }
.stat--ink { background: var(--ink); box-shadow: none; color: var(--on-ink-2); }
.stat--ink::before { content: ""; position: absolute; right: -30%; top: -60%; width: 90%; aspect-ratio: 1; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 24%, transparent), transparent); pointer-events: none; }
.stat--ink .stat__head { color: var(--on-ink-2); }
.stat--ink .stat__icon { background: rgba(243, 241, 236, .07); color: var(--accent-on-dark); box-shadow: inset 0 0 0 1px var(--on-ink-line); }
.stat--ink .stat__value { color: var(--on-ink); }
.stat--ink .stat__value small { color: var(--on-ink-2); }
.stat--ink .stat__meta { color: var(--on-ink-2); }


/* ---------- Panels ---------- */
.panel {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(20px, 2vw, 26px);
  border-radius: var(--r-lg);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  container-type: inline-size;
}
.panel__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.panel__title { display: flex; align-items: center; gap: 10px; font: 500 1.3rem/1.2 var(--font-display); letter-spacing: -.025em; color: var(--ink); }
.panel__title .count { height: 24px; }
.panel__sub { margin-top: 5px; font-size: 13.5px; color: var(--muted); }
.panel .eyebrow { margin-bottom: 10px; }
.panel__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 13px; color: var(--muted); }
.panel__foot svg { width: 13px; height: 13px; flex: none; }
.empty { padding: 28px 0 10px; text-align: center; font-size: 14px; color: var(--muted); }
.empty[hidden] { display: none; }

/* Verfahren */
.cases { display: grid; }
.case-row {
  display: grid; align-items: center; gap: 12px 22px;
  grid-template-columns: minmax(0, 1.35fr) minmax(170px, 1fr) 128px auto;
  grid-template-areas: "main steps status go";
  padding: 16px 0; border-top: 1px solid var(--line);
}
.case-row[hidden] { display: none; }
.case-row__main { grid-area: main; display: flex; align-items: center; gap: 14px; min-width: 0; }
.case-row__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--silver-soft); box-shadow: inset 0 0 0 1px rgba(22, 27, 33, .06); color: var(--ink-2); }
.case-row__icon svg { width: 19px; height: 19px; }
.case-row__text { min-width: 0; }
.case-row__kicker { display: flex; align-items: center; gap: 6px; font: 400 12.5px/1.4 var(--font-mono); color: var(--muted); }
.copy { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; color: var(--ink-2); transition: color .2s; }
.copy svg { width: 11px; height: 11px; opacity: .45; transition: opacity .2s; }
.copy:hover { color: var(--accent-ink); }
.copy:hover svg, .copy:focus-visible svg { opacity: 1; }
.case-row__title { margin-top: 2px; font: 500 1rem/1.3 var(--font-display); letter-spacing: -.015em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-row__meta { margin-top: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-row .status-chip { grid-area: status; justify-self: start; }
.case-row > .icon-btn { grid-area: go; }
.case-row.is-done .case-row__icon { background: var(--bg); color: var(--muted); }

.steps { grid-area: steps; display: grid; gap: 9px; min-width: 0; }
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.stepper li { height: 4px; border-radius: 4px; background: var(--line); }
.stepper .is-done { background: var(--accent); }
.stepper .is-current { background: linear-gradient(90deg, var(--accent) 0 50%, var(--line) 50% 100%); background-size: 200% 100%; animation: step 2.4s var(--ease) infinite alternate; }
@keyframes step { from { background-position: 100% 0; } to { background-position: 40% 0; } }
.case-row.is-done .stepper li { background: var(--line-strong); }
.steps__label { font-size: 12.5px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Akte */
.panel--file .files { margin-top: -6px; }
.file-dl { width: 34px; height: 34px; }

/* Aktivität */
.feed { display: grid; }
.feed li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; }
.feed li:last-child { padding-bottom: 0; }
.feed li:not(:last-child)::before { content: ""; position: absolute; left: 14.5px; top: 34px; bottom: 4px; width: 1px; background: var(--line-strong); }
.feed__dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); }
.feed__dot svg { width: 13px; height: 13px; }
.feed .is-new .feed__dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }
.feed p { padding-top: 4px; font: 500 14.5px/1.35 var(--font-body); color: var(--ink); }
.feed li > div > span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.feed .is-added { animation: feed-in .6s var(--ease); }
@keyframes feed-in { from { opacity: 0; transform: translateY(-8px); } }

/* Postfach */
.panel--inbox .panel__head { align-items: flex-start; flex-wrap: nowrap; }
.panel--inbox .seg { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.panel--inbox .seg::-webkit-scrollbar { display: none; }
.panel--inbox .seg button { flex: 1 0 auto; justify-content: center; padding: 7px 10px; white-space: nowrap; }
.inbox { display: grid; margin: -6px -10px 0; }
.inbox li + li { border-top: 1px solid var(--line); }
.inbox li[hidden] { display: none; }
.msg { position: relative; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 10px; border-radius: 16px; transition: background-color .2s; }
.msg:hover { background: var(--bg); }
.msg__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.msg__from { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg__time { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg__time::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .3s var(--ease); }
.msg__subject { margin-top: 1px; font: 500 15px/1.35 var(--font-body); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg__preview { margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.msg.is-unread .msg__from { color: var(--ink); font-weight: 600; }
.msg.is-unread .msg__subject { color: var(--ink); font-weight: 600; }
.msg.is-unread .msg__time { color: var(--accent-ink); }
.msg.is-unread .msg__time::after { transform: scale(1); }

/* Aufgaben */
.tasks { display: grid; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.task label { cursor: pointer; min-width: 0; }
.task b { display: block; font-weight: 500; font-size: 14.5px; line-height: 1.35; color: var(--ink); transition: color .25s; }
.task label span { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); }
.task.is-done b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.task.is-done .icon-btn { visibility: hidden; }
.task .icon-btn:hover { color: var(--accent-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.check { appearance: none; -webkit-appearance: none; margin: 0; width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: background-color .25s, box-shadow .25s; }
.check::after { content: ""; width: 10px; height: 5px; margin-top: -2px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); transition: transform .3s var(--ease); }
.check:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.check:checked { background: var(--accent); box-shadow: none; }
.check:checked::after { transform: rotate(-45deg) scale(1); }
.tasks__progress { display: grid; gap: 8px; }
.tasks__progress p { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.tasks__progress b { color: var(--ink); font-weight: 600; }

/* Kanzlei (dunkel) */
.panel--ink { background: var(--ink); color: var(--on-ink-2); box-shadow: none; overflow: hidden; isolation: isolate; }
.panel--ink::before { content: ""; position: absolute; z-index: -1; right: -25%; top: -45%; width: 85%; aspect-ratio: 1; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 24%, transparent), transparent); pointer-events: none; }
.panel--ink .panel__title { color: var(--on-ink); }
.panel--ink .eyebrow { color: var(--on-ink-2); }
.panel--ink .chip { background: rgba(243, 241, 236, .06); color: var(--on-ink); box-shadow: inset 0 0 0 1px var(--on-ink-line); }
.panel--ink .chip svg { color: var(--accent-on-dark); }
.lawyer { display: flex; align-items: center; gap: 14px; }
.lawyer .avatar { background: var(--silver); color: var(--ink); }
.lawyer b { display: block; font: 500 1.12rem/1.25 var(--font-display); letter-spacing: -.02em; color: var(--on-ink); }
.lawyer span:not(.avatar) { display: block; margin-top: 2px; font-size: 13.5px; }
.panel--lawyer .btn { margin-top: auto; }
.quote { display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px 16px 16px 6px; background: rgba(243, 241, 236, .06); box-shadow: inset 0 0 0 1px var(--on-ink-line); color: var(--on-ink); font-size: 14px; line-height: 1.5; transition: background-color .2s; }
.quote:hover { background: rgba(243, 241, 236, .1); }
.quote small { font-size: 12.5px; color: var(--on-ink-2); }
.panel--lawyer small { font-size: 12.5px; color: rgba(243, 241, 236, .58); }

/* Plus (Silber) */
.panel--silver { background: var(--silver); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), var(--shadow-sm); overflow: hidden; }
.panel--silver::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 45%, transparent 60%) -200% 0 / 250% 100% no-repeat; pointer-events: none; transition: background-position 1.4s var(--ease); }
.panel--silver:hover::after { background-position: 200% 0; }
.plus__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plus__price b { font: 500 2.6rem/1 var(--font-display); letter-spacing: -.055em; color: var(--ink); }
.plus__price s { color: var(--muted); font-size: 15px; }
.plus__price span { font-size: 14px; color: var(--muted); }
.panel--plus .panel__head { flex-wrap: nowrap; align-items: flex-start; }
.panel--plus p { font-size: 14.5px; }
.breakeven { display: grid; gap: 8px; }
.breakeven .progress { height: 10px; background: rgba(255, 255, 255, .65); box-shadow: inset 0 0 0 1px rgba(22, 27, 33, .06); }
.breakeven p { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.breakeven b { color: var(--ink); font-weight: 600; }
.panel--plus .btn { margin-top: auto; align-self: flex-start; }
.panel--plus .btn--ghost { background: rgba(255, 255, 255, .55); }

/* Sicherheit */
.panel--security { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 18px 28px; }
.security__score { display: flex; align-items: center; gap: 16px; min-width: 0; }
.security__score .ring { width: 52px; height: 52px; }
.security__ring { position: relative; flex: none; }
.security__ring svg:last-child { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; color: var(--accent); transform: none; }
.security__score b { display: block; font: 500 1.12rem/1.25 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.security__score span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.panel--security .chips { flex: 1; min-width: 0; }
.panel--security .btn { margin-left: auto; }

/* Fußzeile */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 28px 4px 8px; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot a:hover { color: var(--ink); }


/* ---------- Nachrichten-Dialog ---------- */
.reader {
  position: fixed; inset: 12px 12px 12px auto;
  width: min(580px, calc(100% - 24px)); height: auto; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  border-radius: var(--r-xl);
  background: var(--surface); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), var(--shadow-lg);
  overflow: hidden;
}
.reader[open] { display: flex; flex-direction: column; animation: reader-in .5s var(--ease); }
.reader::backdrop { background: rgba(31, 37, 46, .26); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fade .3s; }
@keyframes reader-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes fade { from { opacity: 0; } }
.reader__head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px 24px; border-bottom: 1px solid var(--line); }
.reader__head > div { min-width: 0; flex: 1; }
.reader__head b { display: block; font-weight: 600; color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader__head span:not(.avatar) { display: block; font-size: 13px; color: var(--muted); }
.reader__body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.reader__subject { font: 500 1.6rem/1.15 var(--font-display); letter-spacing: -.035em; color: var(--ink); }
.reader__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.reader__text { display: grid; gap: 12px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.reader__files { display: grid; gap: 8px; }
.attach { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 16px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.attach b { display: block; font-weight: 500; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach span:not(.files__icon) { display: block; font-size: 12.5px; color: var(--muted); }
.bubble { align-self: flex-end; max-width: 86%; padding: 12px 16px; border-radius: 18px 18px 6px 18px; background: var(--ink); color: var(--on-ink); font-size: 15px; line-height: 1.5; animation: feed-in .5s var(--ease); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble small { display: block; margin-top: 4px; font-size: 12px; color: var(--on-ink-2); }
.reader__foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 30%, var(--surface)); }
.reader__note { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13px; color: var(--muted); }
.reader__note svg { width: 14px; height: 14px; flex: none; }
.reader__note[hidden], .reader__foot[hidden] { display: none; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px; border-radius: 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .25s; }
.composer:focus-within { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 180px; padding: 11px 12px; border: 0; background: transparent; outline: none; resize: none; font-size: 15px; line-height: 1.45; color: var(--ink); field-sizing: content; }
.composer textarea::placeholder { color: #6A6E73; }
.composer .btn { flex: none; }
.composer__hint { display: flex; align-items: center; gap: 6px; padding: 10px 8px 0; font-size: 12.5px; color: var(--muted); }
.composer__hint svg { width: 12px; height: 12px; }


/* ---------- Einblenden ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }


/* ---------- Container: schmale Panels ---------- */
@container (max-width: 760px) {
  .case-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main status" "steps steps"; }
  .case-row > .icon-btn { display: none; }
}
@container (max-width: 420px) {
  .case-row { grid-template-areas: "main main" "status status" "steps steps"; }
}


/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
  :root { --side-w: 256px; }
  .dash {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "welcome  welcome"
      "stats    stats"
      "cases    cases"
      "inbox    file"
      "inbox    activity"
      "tasks    lawyer"
      "plus     security";
  }
  .panel--security { flex-direction: column; align-items: flex-start; }
  .panel--security .btn { margin-left: 0; margin-top: auto; }
}

@media (max-width: 1180px) and (min-width: 1081px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; inset: 0 auto 0 0; z-index: 70;
    width: min(320px, 88vw); height: 100dvh; padding: 10px;
    transform: translateX(-105%); visibility: hidden;
    transition: transform .45s var(--ease), visibility 0s linear .45s;
  }
  .side.is-open { transform: none; visibility: visible; transition: transform .45s var(--ease); }
  .side__close { display: grid; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(31, 37, 46, .26); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .35s; }
  .scrim.is-on { opacity: 1; pointer-events: auto; }
  .main-wrap { padding-left: var(--gutter); }
  .top { margin-left: calc(-1 * var(--gutter)); padding-left: var(--gutter); }
  .top__menu { display: grid; }
  .top__new { display: inline-flex; }
  .top__logo { display: inline-flex; }
  .top__crumb { display: none; }
}

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome { flex-direction: column; align-items: stretch; }
  .welcome__img { width: 100%; -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .4) 35%, #000 80%); mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .4) 35%, #000 80%); }
  .welcome__float { margin-left: 0; align-self: stretch; width: auto; }
}

@media (max-width: 720px) {
  :root { --top-h: 64px; --gap: 12px; }
  .dash {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "welcome" "stats" "inbox" "file" "cases" "tasks" "activity" "lawyer" "plus" "security";
  }
  .top { gap: 8px; }
  .top__logo .logo__word { display: none; }
  .search { display: none; }
  .top__search-btn { display: grid; }
  .top__new .btn__icon { background: transparent; }
  .top.is-searching .search { display: flex; position: absolute; inset: 10px var(--gutter); max-width: none; margin: 0; z-index: 2; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
  .top.is-searching .search kbd { display: none; }
  .top.is-searching > :not(.search) { visibility: hidden; }
  .top.is-searching .search__close { display: grid; }
  .top__new { padding: 0 4px; gap: 0; }
  .top__new-label { display: none; }
  .welcome { padding: 132px 20px 20px; min-height: 0; }
  .welcome__img { height: 62%; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); }
  .welcome::after { background: linear-gradient(to bottom, rgba(231, 227, 220, 0) 20%, var(--surface-2) 62%); }
  .stat { min-height: 0; padding: 16px; gap: 14px; }
  .stat__head { font-size: 13px; }
  .stat__value { font-size: 2.2rem; }
  .stat .ring { width: 44px; height: 44px; }
  .panel { padding: 18px; }
  .reader { inset: auto 0 0 0; width: 100%; height: min(92dvh, 760px); border-radius: var(--r-xl) var(--r-xl) 0 0; }
  @keyframes reader-in { from { opacity: 0; transform: translateY(40px); } }
  .toast { bottom: 16px; }
}

@media (max-width: 420px) {
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat__head { gap: 8px; }
  .stat__icon { width: 30px; height: 30px; border-radius: 10px; }
  .stat__go { display: none; }
  .stat__value { font-size: 1.95rem; }
  .stat__value small { margin-left: 4px; }
  .stat .ring { display: none; }
  .welcome__actions .btn { flex: 1; }
  .files li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .files__size { display: none; }
  .panel--security .chips .chip:nth-child(n+4) { display: none; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
