/* GUS Inbox — Farben/Schriften aus GUS_Memory/50-templates/GUS_Brand_CI_extracted.md (Tokens §CSS) */
:root {
  --gus-yellow: #FFFA37;
  --gus-black: #000000;
  --gus-white: #FFFFFF;
  --font-sans: 'Maxeville', 'Inter', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --ink: #111;
  --muted: #6b6b6b;
  --line: rgba(0, 0, 0, .12);
  --bg: #f6f5f1;
  --card: #fff;
  --red: #d22a1e;
  --green: #1d7a3a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font-sans); }
a { color: inherit; }
code { font: 12px ui-monospace, Menlo, monospace; background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 3px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.red { color: var(--red); }
button {
  font: inherit; font-weight: 700; font-size: 13px; letter-spacing: .2px; cursor: pointer;
  border-radius: 4px; padding: 8px 14px; border: 1.5px solid var(--gus-black);
  background: var(--gus-yellow); color: var(--gus-black);
}
button.ghost { background: var(--gus-white); }
button.small { padding: 4px 10px; font-size: 12px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gus-black); outline-offset: 2px; }
input[type=text], input[type=search], input[type=password], textarea {
  font: inherit; width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; background: #fff;
}
textarea { resize: vertical; line-height: 1.55; }

/* Kopfzeile */
.top { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--gus-white); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 900; letter-spacing: 1.5px; text-decoration: none; font-size: 15px; white-space: nowrap; }
.brand span { background: var(--gus-yellow); padding: 1px 6px; margin-left: 2px; }
.brand.big { font-size: 22px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { text-decoration: none; padding: 6px 10px; border-radius: 4px; font-weight: 700; font-size: 13px; color: var(--muted); }
.tab b { font-weight: 700; margin-left: 4px; color: var(--ink); background: rgba(0,0,0,.06); padding: 0 6px; border-radius: 10px; font-size: 12px; }
.tab.on { color: var(--ink); background: var(--gus-yellow); }
.tab.on b { background: rgba(0,0,0,.1); }
.search { flex: 1 1 220px; max-width: 360px; }
.sys { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; }
.sys form { margin: 0; }

.banners:empty { display: none; }
.banner { padding: 8px 18px; font-size: 13px; border-bottom: 1px solid var(--line); }
.banner.warn { background: var(--gus-yellow); }
.banner.bad { background: #fde8e6; color: #7a140c; }
.banner.ok { background: #e6f4ea; color: #0f4d22; }

/* Zweispaltig */
.layout { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; height: calc(100vh - 56px); }
.list { border-right: 1px solid var(--line); overflow-y: auto; background: var(--gus-white); }
.detail { overflow-y: auto; padding: 18px 22px 60px; }
.list-head { padding: 12px 14px 4px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; display: flex; gap: 8px; justify-content: space-between; }
.list-head a { text-transform: none; font-weight: 400; letter-spacing: 0; }
.label-filter { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px 14px 10px; border-bottom: 1px solid var(--line); }
.chip { font-size: 11px; text-decoration: none; padding: 2px 8px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.chip.on { background: var(--gus-black); color: var(--gus-white); border-color: var(--gus-black); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
.item:hover { background: #fafaf6; }
.item.current { background: #fffde0; box-shadow: inset 4px 0 0 var(--gus-yellow); }
.item .row1 { display: flex; align-items: center; gap: 6px; }
.item .who { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.unread .who, .item.unread .subj { font-weight: 700; }
.item .when { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.item .subj { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .count { font-size: 11px; color: var(--muted); }
.item .snip { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gus-black); flex: none; }
.dot.red { background: var(--red); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 3px; background: rgba(0,0,0,.06); }
.tag.draft { background: var(--gus-yellow); font-weight: 700; }
.tag.muted { color: var(--muted); }
.tag.bad { background: #fde8e6; color: #7a140c; }
.tag.contacted { background: #e6f4ea; color: #0f4d22; }
.contacted-hint { margin-bottom: 12px; }
.contacted-hint ul { margin: 6px 0 0; padding-left: 18px; }
.empty { padding: 30px 14px; color: var(--muted); text-align: center; }

/* Gespräch */
.placeholder { margin-top: 18vh; text-align: center; }
.back { display: none; text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.thread-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.thread-head h1 { font-size: 20px; line-height: 1.25; margin: 0 0 2px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.head-actions form { margin: 0; }
.seg { display: inline-flex; }
.seg button { border-radius: 0; background: var(--gus-white); margin-left: -1.5px; }
.seg button:first-child { border-radius: 4px 0 0 4px; margin-left: 0; }
.seg button:last-child { border-radius: 0 4px 4px 0; }
.seg button.on { background: var(--gus-black); color: var(--gus-white); }
.menu { position: relative; }
.menu summary { cursor: pointer; font-size: 12px; font-weight: 700; padding: 6px 8px; list-style: none; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.menu form { position: absolute; right: 0; top: 34px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px; display: grid; gap: 6px; min-width: 200px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
form.inline { display: inline-flex; gap: 8px; align-items: center; }
label { font-size: 12px; }

.thread-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; }
.msg.out { border-left: 4px solid var(--gus-yellow); }
.msg > summary { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.msg > summary::-webkit-details-marker { display: none; }
.msg .from { font-weight: 700; }
.msg .to { font-size: 12px; }
.msg .when { margin-left: auto; font-size: 12px; color: var(--muted); }
.msg .snip { flex-basis: 100%; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg[open] .snip { display: none; }
.msg-body { padding: 0 14px 12px; border-top: 1px solid var(--line); }
.mailtext { white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 10px; }
.mailframe { width: 100%; border: 0; min-height: 80px; margin-top: 10px; display: block; }
.quote summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 8px; }
.atts { list-style: none; padding: 8px 0 0; margin: 0; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }

.composer { background: var(--card); border: 1.5px solid var(--gus-black); border-radius: 6px; padding: 14px; margin-top: 16px; }
.composer-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.draft-state { font-size: 12px; padding: 2px 8px; border-radius: 3px; }
.draft-state.ready { background: var(--gus-yellow); font-weight: 700; }
.draft-state.pending { background: rgba(0,0,0,.06); }
.draft-state.bad { background: #fde8e6; color: #7a140c; }
.hint { background: #fffde0; border: 1px dashed #c9c25a; padding: 8px 10px; border-radius: 4px; font-size: 13px; }
.hint.bad { background: #fde8e6; border-color: #e3a19b; }
.buttons { display: flex; gap: 8px; }
.regen { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.regen input { flex: 1; }

.side .box { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin-bottom: 12px; }
.side h2 { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; margin: 0 0 8px; }
.order { padding: 8px 0; border-top: 1px solid var(--line); }
.order:first-of-type { border-top: 0; padding-top: 0; }
.labels { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; cursor: pointer; }
.chip-check:has(input:checked) { background: var(--gus-yellow); border-color: var(--gus-black); }
.side textarea { margin-bottom: 6px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; width: 100%; max-width: 360px; display: grid; gap: 10px; }
.login-card p { margin: 0; }
.alert { background: #fde8e6; color: #7a140c; padding: 8px 10px; border-radius: 4px; font-size: 13px; }

/* Schmal */
@media (max-width: 1100px) {
  .thread-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; height: auto; }
  .list { border-right: 0; }
  .layout.has-thread .list { display: none; }
  .layout:not(.has-thread) .detail { display: none; }
  .detail { padding: 14px 16px 40px; }
  .back { display: inline-block; }
  .sys .sync-state { display: none; }
  .search { max-width: none; order: 5; flex-basis: 100%; }
}
