/* CoreControl – ein Stylesheet für alles. Mobile first; ab 900px Seitenleiste statt Tab-Leiste.
   Bausteine (siehe CLAUDE.md): Layout · Buttons · Karten · Listen · Formulare · Chat · Dateien */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e6ea;
  --text: #1c2026;
  --muted: #68717d;
  --accent: #2f6fed;
  --accent-strong: #1f57c9;
  --accent-weak: #e8f0fe;
  --danger: #d33a3a;
  --danger-weak: #fdecec;
  --ok: #1f9d55;
  --ok-weak: #e6f6ec;
  --warn: #b7770d;
  --warn-weak: #fdf3dc;
  --sidebar: #15181e;
  --sidebar-text: #c3cad5;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --tabbar-h: 58px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  overscroll-behavior-y: none;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.25rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; }
.icon { flex: none; vertical-align: -4px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ Layout */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.sidebar { display: none; }
.main { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }

.page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.page-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.page-head h1 { flex: 1 1 11rem; min-width: 0; overflow-wrap: anywhere; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
.page-narrow { max-width: 720px; margin: 0 auto; }

.tabbar {
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--tabbar-h); color: var(--muted); font-size: .68rem; font-weight: 600; position: relative;
}
.tabbar a:hover { text-decoration: none; }
.tabbar a.active { color: var(--accent); }
.tabbar .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
body.no-tabbar .tabbar { display: none; }

@media (min-width: 900px) {
  .app { flex-direction: row; }
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; width: 228px; flex: none;
    background: var(--sidebar); color: var(--sidebar-text); padding: 14px 10px;
  }
  .brand { display: block; padding: 4px 4px 16px; text-decoration: none; }
  .brand img { display: block; width: 100%; height: auto; max-height: 40px; object-fit: contain; object-position: left center; }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav a, .nav button {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--sidebar-text); font-weight: 550; font: inherit; background: none; border: 0; cursor: pointer;
    width: 100%; text-align: left;
  }
  .nav a:hover, .nav button:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
  .nav a.active { background: rgba(255, 255, 255, .12); color: #fff; }
  .nav .badge { margin-left: auto; }
  .nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 14px 10px 4px; }
  .sidebar-foot { margin-top: auto; }
  .page-head { padding: 14px 24px; }
  .page-body { padding: 24px; }
}

/* Zwei Spalten (Liste | Detail) für E-Mail und Chat. Mobil ist immer nur eine sichtbar:
   die Liste – oder mit .has-detail das Detail. */
.split { flex: 1; min-height: 0; display: flex; }
.split-list, .split-detail { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.split-list { flex: 1; }
.split-detail { flex: 1; display: none; }
.split.has-detail .split-list { display: none; }
.split.has-detail .split-detail { display: flex; }
.pane-head {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 12px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.pane-head h1, .pane-head h2 { flex: 1; min-width: 0; }
.pane-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pane-foot { border-top: 1px solid var(--border); background: var(--surface); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
.back-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--text); }
.back-link:hover { background: var(--surface-2); }
@media (min-width: 900px) {
  .split-list { flex: none; width: 360px; border-right: 1px solid var(--border); }
  .split-detail, .split.has-detail .split-list { display: flex; }
  .split-detail { background: var(--bg); }
  .back-link { display: none; }
  .pane-foot { padding-bottom: 8px; }
}

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; min-height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-weak); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(0, 0, 0, .05); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: .85rem; }
.btn-icon { padding: 0; width: 38px; min-height: 38px; border-radius: 50%; }
.btn-icon.btn-sm { width: 30px; }
.btn.recording { background: var(--danger); border-color: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.btn.transcribing { color: var(--accent); cursor: wait; }
.btn.transcribing .icon { visibility: hidden; }
.btn.transcribing::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%;
  animation: voice-spin .65s linear infinite;
}
@keyframes voice-spin { to { transform: rotate(360deg); } }
.voice-transcribing {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 8px 12px;
  border-radius: var(--radius-sm); background: var(--accent-weak); border: 1px solid #cfdffc;
  font-size: .88rem; color: var(--text);
}
.voice-transcribing[hidden] { display: none !important; }
.voice-transcribe-spinner {
  flex: none; width: 1rem; height: 1rem; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: voice-spin .65s linear infinite;
}
.voice-transcribe-label { font-weight: 550; }
@keyframes pulse { 50% { opacity: .65; } }

/* ------------------------------------------------------------------ Karten & Raster */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-head h2 { flex: 1; min-width: 0; }
.card-body { padding: 14px 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--border); }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.skeleton { padding: 28px 16px; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: inherit;
  border-bottom: 1px solid var(--border); border-left: 4px solid transparent; position: relative;
}
a.list-item:hover { background: var(--surface-2); text-decoration: none; }
.list-item:last-child { border-bottom: 0; }
.list-item.active { background: var(--accent-weak); }
.list-item-main { flex: 1; min-width: 0; }
.list-item-title { display: flex; align-items: baseline; gap: 8px; }
.list-item-title > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item-title.wrap > :first-child { white-space: normal; }
.list-item-sub { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item-meta { color: var(--muted); font-size: .78rem; white-space: nowrap; flex: none; }
.list-item.unread .list-item-title, .list-item.unread .list-item-sub { font-weight: 700; color: var(--text); }
.list-section { padding: 14px 14px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; opacity: .5; margin-bottom: 8px; }

/* ------------------------------------------------------------------ Marker */
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1;
}
.badge:empty { display: none; }
.badge-muted { background: #d5dae1; color: var(--text); }
.chip-removable { display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; }
.chip-label { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-remove {
  border: 0; background: none; cursor: pointer; padding: 0 4px; line-height: 1;
  color: var(--muted); font-size: 1.1rem; border-radius: 4px;
}
.chip-remove:hover { color: var(--danger); background: var(--danger-weak); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .78rem;
  font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); white-space: nowrap;
}
a.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: #e9ecf0; color: var(--text); white-space: nowrap; }
.pill-ok { background: var(--ok-weak); color: var(--ok); }
.pill-warn { background: var(--warn-weak); color: var(--warn); }
.pill-danger { background: var(--danger-weak); color: var(--danger); }
.pill-accent { background: var(--accent-weak); color: var(--accent-strong); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none;
  border-radius: 50%; background: var(--muted); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.avatar-sm { width: 24px; height: 24px; font-size: .62rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-bot { background: #111827; }

/* ------------------------------------------------------------------ Formulare */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date],
input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cfd5dc; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px; /* 16px: kein Zoom auf iOS */
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }
textarea { resize: vertical; min-height: 44px; }
input[type=color] { width: 56px; height: 38px; padding: 2px; border: 1px solid #cfd5dc; border-radius: var(--radius-sm); background: var(--surface); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label { font-weight: 600; font-size: .88rem; }
.field .help, .helptext { color: var(--muted); font-size: .82rem; }
.field .errorlist, .errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: .85rem; }
.form-row { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.inline-form { display: inline; }

.toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.seg { display: inline-flex; background: #e9ecf0; border-radius: 8px; padding: 2px; flex: none; }
.seg a, .seg button {
  padding: 5px 11px; border-radius: 6px; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 650;
  background: none; border: 0; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.seg a:hover { text-decoration: none; color: var(--text); }
.seg .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 12px; background: var(--surface); overflow-x: auto; }
.tab { padding: 11px 12px; color: var(--muted); font-weight: 650; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { text-decoration: none; color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------ Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------------ Hinweise */
.toasts { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; width: min(92%, 460px); }
.toast { padding: 10px 14px; border-radius: var(--radius-sm); background: #1f2937; color: #fff; box-shadow: var(--shadow); font-weight: 550; animation: toast-out .4s 4.5s forwards; }
.toast.error { background: var(--danger); animation: none; }
.toast.success { background: var(--ok); }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }
.notice { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-weak); color: #6b4705; font-size: .9rem; }
.notice-error { background: var(--danger-weak); color: #8f1f1f; }
.notice-info { background: var(--accent-weak); color: #173f8f; }

/* ------------------------------------------------------------------ Chat */
.thread { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; }
.msg { display: flex; gap: 8px; max-width: min(100%, 760px); }
.msg-bubble {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; border-top-left-radius: 4px;
  padding: 6px 10px 18px; min-width: 0; max-width: min(100%, 520px); overflow-wrap: anywhere;
}
.msg-body { margin-bottom: 2px; }
.msg-sender { font-size: .78rem; font-weight: 600; margin-bottom: 2px; }
.msg-foot {
  position: absolute; right: 8px; bottom: 4px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .68rem; line-height: 1; color: var(--muted); white-space: nowrap;
}
.msg-foot time { font-variant-numeric: tabular-nums; }
.msg-edited { font-size: .62rem; text-transform: lowercase; opacity: .9; }
.msg.own { align-self: flex-end; flex-direction: row-reverse; }
.msg.own .msg-bubble { background: var(--accent-weak); border-color: #cfdffc; border-radius: 14px; border-top-right-radius: 4px; }
.msg.own .msg-foot { color: rgba(0, 0, 0, .45); }
.msg.own .avatar { display: none; }
.msg-text { white-space: pre-wrap; padding-right: 0.5rem; }
.msg-deleted { margin: 0; font-style: italic; color: var(--muted); font-size: .9rem; }
.msg-pending { color: var(--muted); font-style: italic; }
.msg-error { color: var(--danger); }
.day-sep { align-self: center; font-size: .74rem; color: var(--muted); background: #e9ecf0; border-radius: 999px; padding: 2px 10px; }
.typing::after { content: "…"; display: inline-block; width: 1.2em; animation: typing 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes typing { from { width: 0; } }

.composer { display: flex; align-items: flex-end; gap: 6px; }
.composer textarea { flex: 1; resize: none; max-height: 180px; border-radius: 18px; padding: 8px 14px; }
.composer-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; align-items: flex-start; }
.composer-files:empty { display: none; }
.composer-preview-wrap { position: relative; flex: 0 0 auto; }
.composer-preview-wrap .composer-preview { display: block; max-height: 140px; max-width: min(200px, 42vw); border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
.composer-preview-wrap video.composer-preview { max-height: 160px; max-width: min(240px, 56vw); object-fit: contain; }
.composer-preview-wrap .composer-remove,
.composer-audio-wrap .composer-remove { position: absolute; top: 4px; right: 4px; z-index: 1; background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.12); border-radius: 999px; width: 1.5rem; height: 1.5rem; padding: 0; line-height: 1.2; }
.composer-audio-wrap { display: flex; flex-direction: column; gap: 4px; max-width: min(280px, 88vw); position: relative; padding-top: 4px; }
.composer-audio { width: 100%; max-width: 280px; }
.emoji-pop {
  position: absolute; z-index: 60; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-width: min(92vw, 280px);
}
.emoji-pop-item {
  font-size: 1.25rem; line-height: 1.2; padding: 4px; border: 0; background: none; cursor: pointer; border-radius: 6px;
}
.emoji-pop-item:hover { background: var(--accent-weak); }
.composer .btn-icon { position: relative; }
.mail-voice-polish { gap: 6px; color: var(--muted); font-weight: 550; cursor: pointer; user-select: none; white-space: nowrap; }
.mail-voice-polish input { width: auto; margin: 0; }

.voice-draft {
  margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); display: flex; flex-direction: column; gap: 8px;
}
.voice-draft-label { margin: 0; }
.voice-draft-audio { width: 100%; max-width: 420px; }
.voice-draft-text { width: 100%; resize: none; max-height: 200px; border-radius: var(--radius-sm); }
.voice-draft-actions { gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Dateien & Medien */
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.attachment {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: .88rem;
}
.attachment:hover { background: var(--surface-2); text-decoration: none; }
.attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-size { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.media { display: block; max-width: min(100%, 420px); max-height: 420px; border-radius: 10px; border: 1px solid var(--border); background: #000; }
img.media { background: var(--surface-2); object-fit: contain; }
audio.media { background: none; border: 0; width: 320px; }

/* ------------------------------------------------------------------ Fließtext (Markdown) */
.prose { overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose table { margin: 0 0 .7em; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1em 0 .4em; font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose code { background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
.prose pre { background: #111827; color: #e5e7eb; padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose blockquote { border-left: 3px solid var(--border); padding-left: 10px; color: var(--muted); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 4px 8px; }
.prose img { border-radius: 8px; }

/* ------------------------------------------------------------------ Login */
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--sidebar); }
.login-card { width: min(100%, 380px); background: var(--surface); border-radius: 14px; padding: 28px 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.login-card .brand { padding: 0 0 20px; }
.login-card .brand img { max-height: 48px; object-position: center; margin-inline: auto; }
.login-card .btn { width: 100%; }

/* ------------------------------------------------------------------ Mehr-Menü (mobil) */
.menu-list .list-item { padding: 14px 16px; font-weight: 600; }
.menu-list .list-item .icon:last-child { margin-left: auto; color: var(--muted); }

/* ------------------------------------------------------------------ Trainings (Eversports) */
.training-time { flex: none; width: 46px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.training-time span { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.training-spots { flex: none; width: 76px; text-align: right; font-size: .88rem; font-variant-numeric: tabular-nums; }
.meter { height: 5px; margin-top: 4px; border-radius: 3px; background: #e3e6ea; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.meter-fill.full { background: var(--ok); }

/* ------------------------------------------------------------------ Aufträge */
.order-row { cursor: pointer; }
.order-row:hover td { background: var(--surface-2); }
.order-back { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -6px 6px -6px -8px; border-radius: 50%; color: var(--text); vertical-align: middle; }
.order-back:hover { background: var(--surface-2); text-decoration: none; }
.order-detail { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.order-item img, .order-noimg { width: 56px; height: 56px; flex: none; border-radius: 8px; border: 1px solid var(--border); object-fit: contain; background: #fff; }
.order-noimg { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface-2); }
.order-sums > div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.order-total { font-weight: 700; font-size: 1.05rem; }
.order-contact { margin-top: 6px; }
.order-status-no { font-variant-numeric: tabular-nums; font-weight: 800; opacity: .75; }
.order-inline { display: flex; gap: 8px; align-items: center; }
.order-inline input, .order-inline select { flex: 1; min-width: 0; }
.order-search { display: flex; gap: 8px; }
.order-search input { flex: 1; min-width: 0; }
.order-direct { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; color: inherit; border-color: var(--accent); }
.order-direct:hover { text-decoration: none; background: var(--accent-weak); }
