/* ==========================================================================
   BoatRefit Web – Material-3-naher Look, maritimes Blau (Seed #0B6E8C).
   Entspricht dem Theme der Flutter-App (lib/core/theme.dart).
   ========================================================================== */

@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../vendor/fonts/MaterialIcons.woff2) format('woff2');
}
@font-face {
  font-family: 'Material Icons Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../vendor/fonts/MaterialIconsOutlined.woff2) format('woff2');
}

/* --- Farbtokens ----------------------------------------------------------- */
:root {
  --primary: #0b6e8c;
  --on-primary: #ffffff;
  --primary-container: #bfe9f8;
  --on-primary-container: #002632;
  --surface: #f6fafb;
  --on-surface: #171c1f;
  --surface-container-low: #f0f4f6;
  --surface-container: #eaeff1;
  --surface-container-high: #e4e9eb;
  --surface-container-highest: #dee3e5;
  --outline: #6f797c;
  --outline-variant: #c0c8cb;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #410002;
  --green: #2e7d32;
  --orange: #ef6c00;
  --blue-grey: #546e7a;
  --amber: #c98600;
  --scrim: rgba(0, 0, 0, .45);
  --elev-1: 0 1px 2px rgba(0, 0, 0, .10), 0 1px 3px rgba(0, 0, 0, .06);
  --elev-2: 0 2px 6px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .08);
  --elev-3: 0 6px 18px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .10);
  --radius: 12px;
  --appbar-h: 56px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --primary: #85d2ea;
  --on-primary: #00363f;
  --primary-container: #004e5f;
  --on-primary-container: #bfe9f8;
  --surface: #0f1416;
  --on-surface: #dfe3e5;
  --surface-container-low: #171d1f;
  --surface-container: #1b2124;
  --surface-container-high: #262c2e;
  --surface-container-highest: #313739;
  --outline: #899295;
  --outline-variant: #3f484b;
  --error: #ffb4ab;
  --on-error: #690005;
  --error-container: #93000a;
  --on-error-container: #ffdad6;
  --green: #7fd688;
  --orange: #ffb77c;
  --blue-grey: #a3b6be;
  --amber: #ffca4b;
  --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* --- Grundlagen ----------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--surface);
  color: var(--on-surface);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a { color: var(--primary); }

.mi, .mio {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
  flex: none;
}
.mio { font-family: 'Material Icons Outlined'; }
.mi.sm, .mio.sm { font-size: 18px; }
.mi.xs, .mio.xs { font-size: 14px; }
.mi.lg, .mio.lg { font-size: 56px; }

.boot-splash {
  height: 100vh;
  display: grid;
  place-items: center;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--outline-variant);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
.spinner.on-primary { border-color: rgba(255, 255, 255, .4); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Gerüst: App-Bar + scrollender Inhalt --------------------------------- */
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  color: var(--on-surface);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.appbar.scrolled {
  box-shadow: var(--elev-1);
  border-bottom-color: var(--outline-variant);
}
.appbar-row {
  height: var(--appbar-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.appbar-title {
  font-size: 20px;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}
.appbar-search {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 17px;
  padding: 8px;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 96px;
}
.content.flush { padding-bottom: 0; }

.page-pad { padding: 16px; }
.form-narrow { max-width: 440px; margin: 0 auto; padding: 24px 16px; }

/* --- Buttons -------------------------------------------------------------- */
button { font: inherit; }

.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  position: relative;
}
.icon-btn:hover:not(:disabled) { background: color-mix(in srgb, currentColor 10%, transparent); }
.icon-btn:disabled { opacity: .38; cursor: default; }

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.filled:hover:not(:disabled) { filter: brightness(1.08); }
.btn.tonal { background: var(--primary-container); color: var(--on-primary-container); }
.btn.text { background: transparent; color: var(--primary); padding: 8px 12px; }
.btn.text:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.btn.outlined { background: transparent; color: var(--primary); border: 1px solid var(--outline-variant); }
.btn.danger { background: var(--error); color: var(--on-error); }
.btn.danger-outline { background: transparent; color: var(--error); border: 1px solid var(--error); }
.btn.block { width: 100%; }
.btn.tall { min-height: 54px; }
.btn.spread { justify-content: space-between; }

.fab {
  position: fixed;
  right: max(16px, calc(50vw - 534px));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 25;
  background: var(--primary-container);
  color: var(--on-primary-container);
  border: 0;
  border-radius: 16px;
  min-height: 56px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--elev-3);
}
.fab.round { padding: 0; width: 56px; justify-content: center; }
.fab:hover { filter: brightness(1.06); }

/* --- Tabs ----------------------------------------------------------------- */
.tabbar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--outline-variant);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.tabbar::-webkit-scrollbar { display: none; }
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--outline);
  padding: 8px 18px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  flex: none;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover:not(.active) { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.tabbar.equal .tab { flex: 1; }

/* --- Karten & Listen ------------------------------------------------------ */
.card {
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  margin: 8px 12px;
  overflow: hidden;
  box-shadow: var(--elev-1);
}
.card.flat { box-shadow: none; }
.card.plain { background: var(--surface-container-high); border: 0; }
.card.accent { background: var(--primary-container); color: var(--on-primary-container); border: 0; }
.card.tappable { cursor: pointer; }
.card.tappable:hover { box-shadow: var(--elev-2); }
.card-pad { padding: 16px; }

.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  min-height: 56px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: default;
}
.tile.tappable { cursor: pointer; }
.tile.tappable:hover { background: color-mix(in srgb, var(--on-surface) 5%, transparent); }
.tile-lead { color: var(--outline); display: grid; place-items: center; flex: none; }
.tile-body { flex: 1; min-width: 0; }
.tile-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-title.wrap { white-space: normal; }
.tile-sub {
  font-size: 13px;
  color: var(--outline);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.tile-trail { display: flex; align-items: center; gap: 2px; flex: none; }
.tile.done .tile-title { text-decoration: line-through; color: var(--outline); }

.divider { height: 1px; background: var(--outline-variant); border: 0; margin: 0 16px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 16px 4px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}
.section-head .count { color: var(--outline); font-weight: 400; }
.section-head .spacer { flex: 1; }
.section-head .total { color: var(--primary); font-weight: 700; }

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 80px 32px;
  color: var(--on-surface);
}
.empty .mi, .empty .mio { color: var(--outline); }
.empty p { margin: 0; white-space: pre-line; }

.center-box { display: grid; place-items: center; padding: 64px 0; }

.hint { color: var(--outline); font-size: 13px; }
.right { text-align: right; }
.row-right { display: flex; justify-content: flex-end; padding: 4px 8px; }

/* --- Filterleiste & Mehrfachauswahl (Teile-Uebersicht) -------------------- */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 4px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--outline-variant);
  cursor: pointer;
}
.chip.filter:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.chip.filter.active { border-color: transparent; }
.chip.filter .count { font-weight: 400; opacity: .75; }

.filter-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-controls > * { flex: 1 1 180px; min-width: 0; }

.tile.selected { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.trail-row { display: flex; align-items: center; gap: 2px; }

/* Kachelraster der Bilder-Übersicht (mit Menü und Beschriftung je Kachel). */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 4px 8px 8px;
}
.grid-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-container-high);
}
.grid-card.selected { outline: 2px solid var(--primary); outline-offset: -2px; }
.grid-card .shot {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
.grid-card .corner, .grid-card .pick {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
}
.grid-card .pick { left: 6px; right: auto; top: 6px; padding: 4px; background: rgba(0, 0, 0, .4); }
.grid-card .cap {
  display: block;
  padding: 6px 8px 8px;
  font-size: 12px;
  line-height: 1.35;
}
.grid-card .cap-main, .grid-card .cap-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grid-card .cap-sub { color: var(--outline); }

.bulkbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--surface-container-high);
  border-top: 1px solid var(--outline-variant);
  box-shadow: var(--elev-3);
}
.bulkbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.bulkbar .grow { flex: 1; min-width: 0; font-weight: 600; }

/* --- Formularfelder ------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 12.5px;
  color: var(--outline);
  margin-bottom: 5px;
  font-weight: 500;
}
.field .help { font-size: 12px; color: var(--outline); margin-top: 4px; }
.field .err { font-size: 12px; color: var(--error); margin-top: 4px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .mi, .input-wrap > .mio { position: absolute; left: 12px; color: var(--outline); pointer-events: none; }
.input-wrap.has-lead input, .input-wrap.has-lead select { padding-left: 44px; }
.input-wrap > .icon-btn { position: absolute; right: 2px; width: 40px; height: 40px; }
.input-wrap.has-trail input { padding-right: 44px; }

input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--on-surface);
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
input:disabled, textarea:disabled { opacity: .6; }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; }
select { appearance: none; background-image: none; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: 'expand_more';
  font-family: 'Material Icons';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--outline);
  pointer-events: none;
}
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; min-width: 0; }
.checkbox { width: 20px; height: 20px; flex: none; accent-color: var(--primary); cursor: pointer; }

/* --- Dialoge -------------------------------------------------------------- */
.dialog-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }

.dialog {
  background: var(--surface-container-high);
  color: var(--on-surface);
  border-radius: 24px;
  box-shadow: var(--elev-3);
  width: min(460px, 100%);
  max-height: min(86dvh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dialog h2 { margin: 0; padding: 22px 24px 8px; font-size: 21px; font-weight: 500; }
.dialog .dialog-body { padding: 4px 24px 8px; overflow: auto; }
.dialog .dialog-body > p { margin: 4px 0 12px; }
.dialog .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 18px;
}
.dialog .dialog-icon { text-align: center; padding-top: 22px; color: var(--primary); }
.dialog .dialog-icon + h2 { text-align: center; padding-top: 6px; }

/* --- Snackbar ------------------------------------------------------------- */
#snackbar-root {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(560px, calc(100vw - 32px));
  pointer-events: none;
}
.snackbar {
  background: var(--surface-container-highest);
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
  border-radius: 8px;
  box-shadow: var(--elev-3);
  padding: 12px 8px 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: snack-in .2s ease-out;
}
.snackbar.error { background: var(--error-container); color: var(--on-error-container); border-color: transparent; }
.snackbar span { flex: 1; }
.snackbar .btn.text { color: inherit; text-decoration: underline; }
@keyframes snack-in { from { opacity: 0; transform: translateY(12px); } }

/* --- Bilder --------------------------------------------------------------- */
.img-ph {
  background: var(--surface-container-high);
  display: grid;
  place-items: center;
  color: var(--outline);
  overflow: hidden;
}
img.remote { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--surface-container-high); }
img.remote.contain { object-fit: contain; }

.cover-slot {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-container-high);
  cursor: pointer;
}
.cover-slot .clear {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
}
.cover-empty { display: grid; place-items: center; height: 100%; gap: 8px; color: var(--outline); }

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 4px;
  padding: 0 8px;
}
.image-grid button {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #000;
  display: flex;
  flex-direction: column;
}
.viewer .appbar { position: static; background: #000; color: #fff; }
.viewer-actions { display: flex; align-items: center; flex: none; }
.viewer-count { color: rgba(255, 255, 255, .7); font-size: 14px; white-space: nowrap; padding: 0 4px; }

/* Bühne: nimmt den Rest des Fensters ein; das Bild wird darin eingepasst. */
.viewer-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
  cursor: zoom-in;
}
.viewer-body.zoomed { cursor: grab; }
.viewer-body.zoomed:active { cursor: grabbing; }

/* inset + margin:auto zentriert und begrenzt zuverlässig auf die Fenstergröße
   (max-height in % wirkt hier – anders als bei einem Grid-Kind). */
.viewer-img {
  position: absolute;
  inset: 8px;
  margin: auto;
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  object-fit: contain;
  transform-origin: center center;
  opacity: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.viewer-img.ready { opacity: 1; }
.viewer-spin {
  position: absolute;
  inset: 0;
  margin: auto;
  border-color: rgba(255, 255, 255, .3);
  border-top-color: #fff;
}

.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  cursor: pointer;
}
.viewer-nav:hover { background: rgba(0, 0, 0, .7); }
.viewer-nav.prev { left: 8px; }
.viewer-nav.next { right: 8px; }
@media (max-width: 520px) {
  .viewer-nav { width: 38px; height: 38px; background: rgba(0, 0, 0, .3); }
}

/* --- Markdown ------------------------------------------------------------- */
.markdown { line-height: 1.6; overflow-wrap: anywhere; }
.markdown > *:first-child { margin-top: 0; }
.markdown h1 { font-size: 1.7em; }
.markdown h2 { font-size: 1.4em; }
.markdown h3 { font-size: 1.18em; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { margin: 1.1em 0 .45em; line-height: 1.25; }
.markdown p, .markdown ul, .markdown ol { margin: .6em 0; }
.markdown ul, .markdown ol { padding-left: 1.4em; }
.markdown li { margin: .2em 0; }
.markdown img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.markdown code {
  background: var(--surface-container-high);
  padding: .12em .4em;
  border-radius: 4px;
  font-size: .9em;
}
.markdown pre {
  background: var(--surface-container-high);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
}
.markdown pre code { background: none; padding: 0; }
.markdown blockquote {
  margin: .7em 0;
  padding: .1em 0 .1em 14px;
  border-left: 3px solid var(--outline-variant);
  color: var(--outline);
}
.markdown table { border-collapse: collapse; width: 100%; margin: .7em 0; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--outline-variant); padding: 6px 10px; text-align: left; }
.markdown th { background: var(--surface-container-high); }
.markdown hr { border: 0; border-top: 1px solid var(--outline-variant); margin: 1em 0; }

/* --- KI-Chat -------------------------------------------------------------- */
.chat-wrap { display: flex; flex-direction: column; min-height: 60dvh; }
.chat-list { flex: 1; padding: 12px; }
.bubble-user {
  margin: 0 0 10px auto;
  max-width: min(80%, 640px);
  width: fit-content;
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: 14px;
  padding: 10px 14px;
  white-space: pre-wrap;
}
.bubble-ai {
  margin: 0 24px 10px 0;
  background: var(--surface-container-highest);
  border-radius: 14px;
  padding: 10px 14px 4px;
}
.bubble-ai .bubble-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chat-input {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface-container-low);
  border-top: 1px solid var(--outline-variant);
}
.chat-input textarea { min-height: 44px; max-height: 140px; resize: none; }
.send-btn {
  border: 0;
  background: var(--primary);
  color: var(--on-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.send-btn:disabled { opacity: .4; cursor: default; }
.thinking { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px; color: var(--outline); }

/* --- Speicheranzeige (Paywall) -------------------------------------------- */
.meter {
  height: 10px;
  border-radius: 6px;
  background: var(--outline-variant);
  overflow: hidden;
}
.meter > div { height: 100%; background: var(--primary); transition: width .3s; }
.meter.full > div { background: var(--error); }

.benefit { display: flex; gap: 16px; align-items: flex-start; padding: 10px 0; }
.benefit .mi, .benefit .mio { color: var(--primary); }
.benefit strong { display: block; font-weight: 600; }
.benefit span { font-size: 13px; color: var(--outline); }

/* --- Kleine Bildschirme --------------------------------------------------- */
@media (max-width: 520px) {
  .tab { padding: 8px 12px 10px; font-size: 12px; }
  .dialog { border-radius: 20px; }
  .card { margin: 8px; }
}
