/* HafenBox Desk 0.4 – „Glas über tiefem Wasser“
   Mattes Glas auf tiefblauem Grund mit weichem Licht. Keine harten Rahmen, keine Streifen am Rand. */
:root {
  --canvas: #0b1d3a;
  --deep: rgba(4, 14, 32, .38);
  --surface: rgba(255, 255, 255, .065);
  --surface-raised: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f2f7fc;
  --muted: #b4c7da;
  --faint: #93abc2;
  --accent: #8cc2ff;
  --on-accent: #04172e;
  --gold: #f2c46d;
  --mint: #79d6c0;
  --danger: #ff9f9a;
  --select: rgba(140, 194, 255, .16);
  --glass-blur: blur(22px) saturate(140%);
  --radius: 20px;
  --small-radius: 12px;
  --sidebar: 248px;
  --scene:
    radial-gradient(1100px 650px at 88% -8%, rgba(90, 160, 255, .38), transparent 62%),
    radial-gradient(900px 620px at -8% 108%, rgba(40, 190, 220, .20), transparent 60%),
    radial-gradient(700px 500px at 45% 55%, rgba(70, 110, 230, .14), transparent 70%),
    linear-gradient(160deg, #0b1d3a 0%, #0c2650 52%, #081631 100%);
  font: 15px/1.5 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}
:root[data-accent="gold"] { --accent: #f2c46d; --select: rgba(242, 196, 109, .16); }
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #eaf1fb;
  --deep: rgba(255, 255, 255, .7);
  --surface: rgba(255, 255, 255, .62);
  --surface-raised: rgba(255, 255, 255, .85);
  --line: rgba(10, 40, 80, .10);
  --line-strong: rgba(10, 40, 80, .16);
  --text: #0d2342;
  --muted: #3f5a78;
  --faint: #5d7896;
  --accent: #1f6fd1;
  --on-accent: #ffffff;
  --gold: #9a6a00;
  --mint: #0f7a62;
  --danger: #b3261e;
  --select: rgba(31, 111, 209, .12);
  --scene:
    radial-gradient(1100px 650px at 88% -8%, rgba(120, 175, 255, .45), transparent 62%),
    radial-gradient(900px 620px at -8% 108%, rgba(90, 210, 230, .28), transparent 60%),
    linear-gradient(160deg, #f4f8fe 0%, #e6eefb 55%, #dde8f8 100%);
}
:root[data-theme="light"][data-accent="gold"] { --accent: #9a6a00; }
html, body { background: var(--canvas); color: var(--text); }
body { background: var(--scene); background-attachment: fixed; }
h1, h2, h3 { font-family: "Space Grotesk", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; color: var(--text); }
@media (prefers-reduced-transparency: reduce) { :root { --glass-blur: none; --surface: rgba(18, 40, 72, .92); } }

/* Alte, feste Flächenfarben aus 0.3 auf Glas umgestellt (gilt für hell und dunkel) */
.panel { background: var(--surface); }
th { background: var(--surface); }
tr:hover td { background: var(--select); }
.module-metric { background: var(--surface); }
.metric-icon { background: var(--surface); }
.record-panel th { background: var(--surface); }
.case-list-item:hover, .case-list-item[aria-pressed="true"] { background: var(--select); }
.invoice-summary { background: var(--surface); }
.segments button[aria-pressed="true"] { background: var(--select); }
.mail-sidebar { background: var(--surface); }
.mail-folder:hover, .mail-folder[aria-pressed="true"] { background: var(--select); }
.mail-item:hover, .mail-item[aria-pressed="true"] { background: var(--select); }
.mail-reader { background: var(--surface); }
.calendar-sidebar { background: var(--surface); }
.mini-day:hover { background: var(--select); }
.schedule-heading { background: var(--surface); }
.schedule-date:hover { background: var(--select); }
.all-day { background: var(--surface); }
.schedule-track { background: var(--surface); }
.schedule-track.today { background: var(--surface); }
.hour-axis { background: var(--surface); }
.weekday { background: var(--surface); }
.month-cell { background: var(--surface); }
.month-cell.outside { background: var(--surface); }
.month-cell.today { background: var(--surface); }
.day-add:hover, .today .day-add { background: var(--select); }
.status-pill.info { background: var(--surface); }
.mail-count { background: var(--surface); }
.mail-images-note { background: var(--surface); }
.attachment { background: var(--surface); }
.attachment:hover { background: var(--select); }
.admin-nav { background: var(--surface); }
.admin-tab:hover { background: var(--select); }
.admin-tab[aria-pressed="true"] { background: var(--select); }
.metric-card { background: var(--surface); }

/* Bausteine */
.button { border-radius: var(--small-radius); background: var(--surface-raised); border: 1px solid var(--line-strong); color: var(--text); }
.button:not(:disabled):hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .2); }
:root[data-theme="light"] .button:not(:disabled):hover { background: #fff; }
.button.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.button.quiet { background: transparent; border-color: transparent; }
.button.quiet:not(:disabled):hover { background: var(--surface); }
.button.danger { background: rgba(255, 159, 154, .12); border-color: rgba(255, 159, 154, .3); color: var(--danger); }
input, select, textarea { background: var(--deep); border: 1px solid var(--line-strong); border-radius: var(--small-radius); color: var(--text); }
.panel, .metric-card, .auth-card, .dialog, .glass {
  background: var(--surface); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none;
}
.metric-card.attention { background: rgba(242, 196, 109, .10); border-color: rgba(242, 196, 109, .22); }
.panel.open { border-color: rgba(242, 196, 109, .3); }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.notice.error { background: rgba(255, 159, 154, .12); border-color: rgba(255, 159, 154, .28); color: var(--danger); }
.notice.success { background: rgba(121, 214, 192, .12); border-color: rgba(121, 214, 192, .28); }
.notice.warn { background: rgba(242, 196, 109, .12); border-color: rgba(242, 196, 109, .28); color: var(--gold); }
.status-pill { border-radius: 999px; padding: .2rem .62rem; background: var(--select); color: var(--accent); font-weight: 600; }
.status-pill.positive, .status-pill.success { background: rgba(121, 214, 192, .15); color: var(--mint); }
.status-pill.warn { background: rgba(242, 196, 109, .16); color: var(--gold); }
.status-pill.error, .status-pill.danger { background: rgba(255, 159, 154, .15); color: var(--danger); }
.status-pill.neutral { background: rgba(255, 255, 255, .08); color: var(--muted); }
table th { color: var(--faint); }
table td, table th { border-color: rgba(255, 255, 255, .06) !important; }
.dialog { color: var(--text); background: rgba(16, 36, 66, .9); }
:root[data-theme="light"] .dialog { background: rgba(255, 255, 255, .95); }
.dialog::backdrop { background: rgba(2, 10, 24, .55); backdrop-filter: blur(3px); }
.toast { background: rgba(16, 36, 66, .92); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); border-radius: 16px; }

/* Keine Rand-Streifen mehr: Auswahl ist eine weiche Fläche */
.case-list-item, .mail-item, .task-card { border-left: 0 !important; box-shadow: none !important; }
.case-list-item[aria-pressed="true"], .mail-item[aria-pressed="true"] { background: var(--select) !important; }
.mail-item.flagged { box-shadow: none !important; }
.calendar-event, .time-event, .all-day-event { border-left: 0 !important; background: color-mix(in srgb, var(--calendar-color, var(--accent)) 26%, transparent) !important; border-radius: 10px !important; }
.time-event.private, .calendar-event.private { background: repeating-linear-gradient(135deg, rgba(255,255,255,.10) 0 6px, rgba(255,255,255,.04) 6px 12px) !important; }

/* Rahmen der Anwendung: schwebende Seitenleiste statt Dock */
.dock-wrap, .topbar { display: none !important; }
.desk { background: transparent; display: grid; grid-template-columns: calc(var(--sidebar) + 16px) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 16px 0 16px 16px; box-sizing: border-box; }
.sidebar-inner {
  height: 100%; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; border-radius: 24px; overflow-y: auto;
  background: var(--surface); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--line);
}
.sidebar .brand { padding: 4px 8px 10px; font-weight: 600; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #04172e; background: linear-gradient(135deg, #8cc2ff, #4f8df5); }
.nav-group { font: 600 11px/1 inherit; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; padding: 16px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--select); color: var(--text); font-weight: 600; }
.nav-link[aria-current="page"] svg { color: var(--accent); }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--select); color: var(--text); font-size: 11px; line-height: 20px; text-align: center; font-weight: 600; }
.nav-link.admin { margin-top: 14px; background-color: rgba(242, 196, 109, .08); }
.nav-link.admin .nav-hint { margin-left: auto; font-size: 11px; color: var(--gold); font-weight: 600; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .05); text-decoration: none; color: var(--text); }
.sidebar-foot small { display: block; color: var(--faint); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--select); color: var(--text); font-weight: 600; font-size: 12px; flex: 0 0 auto; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; gap: 12px; align-items: center; padding: 22px 32px 0 16px; }
.top-search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; border-radius: 12px; color: var(--faint);
  background: var(--surface); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); cursor: text; text-align: left; font: inherit; }
.top-search kbd { margin-left: auto; font: 600 11px inherit; background: rgba(255, 255, 255, .08); border-radius: 6px; padding: 2px 6px; }
.top .button.icon-button { background: var(--surface); border-color: var(--line); }
.workspace { width: 100%; max-width: 1520px; margin: 0; padding: 20px 32px 48px 16px; }
.module-header { margin-bottom: 4px; }
.module-header h1 { font-size: 32px; letter-spacing: -.025em; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 16px; background: var(--surface); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); justify-self: start; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; text-decoration: none; }
.tab[aria-current="page"], .tab[aria-pressed="true"] { background: var(--select); color: var(--text); }
.tab .nav-count { margin-left: 2px; background: rgba(242, 196, 109, .18); color: var(--gold); }
.banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: rgba(242, 196, 109, .12); color: var(--gold); }
.banner.info { background: var(--select); color: var(--text); }
.banner .button { margin-left: auto; }

/* Anmeldung */
.auth { background: transparent; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); }
.auth-scene { background: transparent; }
.auth-card { padding: 28px; max-width: 440px; width: 100%; }
.auth-form { display: grid; place-items: center; padding: 48px 24px; }
.step-label { font-weight: 600; font-size: 13px; color: var(--accent); }
.code-input { font-size: 24px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { width: 184px; height: 184px; border-radius: 14px; background: #fff; padding: 8px; }
.secret { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; padding: 8px 10px; border-radius: 10px; background: var(--deep); user-select: all; }
.recovery-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-family: ui-monospace, Consolas, monospace; padding: 14px; border-radius: 14px; background: var(--deep); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

/* Willkommen */
.welcome { position: fixed; inset: 0; z-index: 30; overflow-y: auto; background: var(--scene); }
.welcome-inner { width: min(100%, 980px); margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; gap: 22px; }
.stepper { display: flex; gap: 22px; flex-wrap: wrap; }
.stepper span { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--faint); }
.stepper b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 13px; }
.stepper .on { color: var(--text); }
.stepper .on b { background: var(--accent); color: var(--on-accent); }
.field-hint { display: flex; justify-content: space-between; gap: 8px; font-weight: 500; }
.field-hint em { font-style: normal; color: var(--faint); font-weight: 400; font-size: 12px; }
.req { color: var(--gold); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* Kontakte */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.person { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); backdrop-filter: var(--glass-blur); text-align: left; color: var(--text); cursor: pointer; font: inherit; }
.person[aria-pressed="true"] { background: var(--select); border-color: var(--line-strong); }
.person-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.person-head strong { display: block; }
.person-head small { display: block; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }

/* Team-Kalender */
.team-list { display: grid; gap: 2px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; }
.team-row .swatch { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--c); flex: 0 0 auto; }
.team-row.on .swatch { background: var(--c); }
.team-row button.link { border: 0; background: none; color: var(--muted); padding: 0; cursor: pointer; text-align: left; flex: 1; font: inherit; }
.team-day { display: grid; gap: 0; overflow-x: auto; }
.team-day-row { display: grid; grid-template-columns: 170px minmax(560px, 1fr); align-items: center; border-top: 1px solid rgba(255, 255, 255, .06); }
.team-day-track { position: relative; height: 54px; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 11 - 1px), rgba(255, 255, 255, .06) calc(100% / 11 - 1px), rgba(255, 255, 255, .06) calc(100% / 11)); }
.team-day-event { position: absolute; top: 6px; bottom: 6px; border-radius: 10px; padding: 5px 8px; font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 30%, transparent); }
.team-day-event.busy { background: repeating-linear-gradient(135deg, rgba(255,255,255,.10) 0 6px, rgba(255,255,255,.04) 6px 12px); }
.team-day-hours { display: grid; grid-template-columns: 170px repeat(11, minmax(0, 1fr)); font-size: 12px; color: var(--faint); }
.slot { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .04); color: var(--text); cursor: pointer; text-align: left; font: inherit; font-weight: 600; }
.slot[aria-pressed="true"] { border-color: var(--accent); background: var(--select); }
.slot small { font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 12px; background: var(--deep); border: 1px solid var(--line-strong); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .09); font-weight: 600; font-size: 13px; }
.chip button { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 0 4px; }
.fb-row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 8px; font-size: 13px; }
.fb-track { position: relative; height: 16px; border-radius: 6px; background: rgba(255, 255, 255, .05); }
.fb-busy { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: color-mix(in srgb, var(--c) 45%, transparent); }
.fb-pick { position: absolute; top: -4px; bottom: -4px; border: 2px solid var(--accent); border-radius: 6px; }

/* Postfach: Postfächer umschalten */
.mailbox-switch { display: grid; gap: 2px; margin-bottom: 8px; }
.mailbox-switch button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.mailbox-switch button[aria-pressed="true"] { background: var(--select); }
.mailbox-switch .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); flex: 0 0 auto; }
.mailbox-switch small { display: block; color: var(--faint); font-size: 12px; }
.mark { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(121, 214, 192, .15); color: var(--mint); }
.mark.claim { background: var(--select); color: var(--accent); }

/* Befehlssuche (Strg K) */
.palette { position: fixed; inset: 0; z-index: 40; display: grid; place-items: start center; padding-top: 12vh; background: rgba(2, 10, 24, .45); backdrop-filter: blur(3px); }
.palette-box { width: min(640px, calc(100% - 32px)); border-radius: 20px; background: rgba(16, 36, 66, .94); border: 1px solid var(--line-strong); overflow: hidden; }
:root[data-theme="light"] .palette-box { background: rgba(255, 255, 255, .97); }
.palette-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 17px; padding: 16px 18px; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; display: grid; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.palette-item[aria-selected="true"] { background: var(--select); }
.palette-item small { margin-left: auto; color: var(--faint); }

/* Handy: Leiste unten statt Seitenleiste */
@media (max-width: 760px) {
  .desk { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 0 12px 12px; }
  .sidebar-inner { flex-direction: row; padding: 6px; border-radius: 22px; overflow-x: auto; }
  .sidebar .brand, .nav-group, .sidebar-foot, .nav-link.extra { display: none; }
  .nav-link { flex: 1 0 auto; flex-direction: column; gap: 3px; min-height: 54px; padding: 4px 8px; font-size: 11px; justify-content: center; }
  .nav-link.admin { margin-top: 0; }
  .nav-count, .nav-link .nav-hint { display: none; }
  .top, .workspace { padding-left: 16px; padding-right: 16px; }
  .workspace { padding-bottom: 110px; }
  .auth { grid-template-columns: 1fr; }
}

/* Reiter-Seiten und Feinschliff 0.4 */
.tab-body > .module-header h1, .tab-body .module-header h1 { font-size: 22px; letter-spacing: -.01em; }
.tab-body > .module-header { margin-top: 4px; }
a.tab { text-decoration: none; }
a.tab[aria-current="page"] { background: var(--select); color: var(--text); }
.table-sub { color: var(--faint); }
.people-group { grid-column: 1 / -1; font-size: 13px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin: 8px 0 0; }
.quote { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--deep); white-space: pre-wrap; color: var(--muted); }
.welcome .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.welcome h1 { font-size: 34px; margin: 0 0 6px; }
.sidebar-foot[aria-current="page"] { background: var(--select); }
.sidebar .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.sidebar .brand img { border-radius: 10px; }
.top-search > span:first-child { display: inline-flex; }
.mail-item .toolbar { gap: 4px; margin-top: 4px; }
.team-day-event { border: 0; color: var(--text); cursor: pointer; text-align: left; font: inherit; font-size: 12px; font-weight: 600; }
.team-day-row .person-head { padding: 8px 10px 8px 0; }
.team-day-row .person-head small { display: block; color: var(--faint); font-size: 11px; }
.calendar-picker + .calendar-picker { margin-top: 14px; }
.auth-card details summary { cursor: pointer; color: var(--muted); }
.auth-card .toolbar { justify-content: center; }
.person-head .person-initials { flex: 0 0 auto; }
.auth-form { background: transparent; }
.auth-card.flow { gap: 14px; }
.auth-card h2 { margin: 0; }
@media (max-width: 760px) {
  .sidebar .brand, .sidebar-foot { display: none; }
  .top { padding-top: 14px; gap: 8px; }
  .top-search { flex: 1 1 auto; min-width: 0; }
  .top-search kbd, #fullscreen { display: none; }
  .top-search > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .banner { align-items: flex-start; }
}
.record-panel th, table thead th { background: rgba(255, 255, 255, .05); }
:root[data-theme="light"] .record-panel th, :root[data-theme="light"] table thead th { background: rgba(13, 35, 66, .05); color: var(--muted); }
:root[data-theme="light"] .hero { color: #f2f7fc; }
:root[data-theme="light"] .hero h1 { color: #f2f7fc; }
.team-day-row { grid-template-columns: 200px minmax(560px, 1fr); }
.team-day-hours { grid-template-columns: 200px repeat(11, minmax(0, 1fr)); min-width: 760px; }
.team-day-row .person-head { min-width: 0; overflow: hidden; }
.team-day-row .person-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 0.4.1: Profilbild und HTML-Signatur ---- */
img.person-initials.person-photo, img.avatar-photo { object-fit: cover; padding: 0; border: 0; background: var(--surface-raised); }
img.avatar-photo { width: 34px; height: 34px; border-radius: 50%; }
.avatar-picker { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.avatar-preview { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--select); color: var(--text); font-size: 30px; font-weight: 600; flex: 0 0 auto; box-shadow: 0 8px 26px rgba(0, 0, 0, .18); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.sig-wrap { display: grid; gap: 8px; }
.sig-toolbar { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 6px; border-radius: var(--small-radius); background: var(--surface); }
.sig-tool { min-width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 15px; display: inline-grid; place-items: center; cursor: pointer; }
.sig-tool:hover, .sig-tool:focus-visible { background: var(--select); }
.sig-color-wrap { position: relative; }
.sig-color-dot { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(#ff6b6b, #f2c46d, #79d6c0, #8cc2ff, #c7a6ff, #ff6b6b); }
.sig-color { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.sig-spacer { flex: 1 1 auto; }
.sig-link { display: flex; gap: 6px; flex-wrap: wrap; }
.sig-link input { flex: 1 1 220px; }
/* Der Editor zeigt die Signatur so, wie Empfänger sie sehen: dunkle Schrift auf hellem Papier */
.sig-editor { min-height: 120px; max-height: 320px; overflow: auto; padding: 14px 16px; border-radius: var(--small-radius); background: #ffffff; color: #1b2430; font: 14px/1.45 Arial, Helvetica, sans-serif; outline: none; box-shadow: inset 0 0 0 1px rgba(10, 40, 80, .12); }
.sig-editor:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.sig-editor a { color: #1d6fd6; }
.sig-editor table { width: auto; border-collapse: collapse; }
.sig-editor td { padding: 0; font-size: inherit; border-bottom: 0; overflow-wrap: normal; background: transparent; }
.sig-editor tr:hover td { background: transparent; }
.sig-editor td[style*="border-left"] { border-left-color: #2b7de9 !important; }
.sig-editor img { width: auto; height: auto; max-width: 180px; max-height: 60px; display: inline-block; vertical-align: middle; }
