/* scribesetup — schlichte Verwaltung, hell und dunkel */
:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #1d2330; --muted: #677085; --line: #e3e6ec;
  --accent: #2d5bd7; --accent-text: #ffffff; --ok: #1f7a4d; --warn: #9a6200; --bad: #b3261e;
  --chip-ok: #e3f4ea; --chip-warn: #fff1d6; --chip-bad: #fde4e1; --chip-muted: #eceef3;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 4px 16px rgba(20, 30, 50, .06);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --card: #1b2029; --text: #e7eaf0; --muted: #98a1b3; --line: #2b3240;
    --accent: #7b9cff; --accent-text: #0d1220; --ok: #6fd3a0; --warn: #f2bd5b; --bad: #ff8a80;
    --chip-ok: #173326; --chip-warn: #3a2c10; --chip-bad: #3d1c1a; --chip-muted: #262c38;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
[hidden] { display: none !important; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

.top { display: flex; align-items: center; gap: 24px; padding: 14px 24px; background: var(--card);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 17px; }
.brand .sub { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 6px; }
nav { display: flex; gap: 4px; }
nav button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
nav button.on { background: var(--chip-muted); color: var(--text); font-weight: 600; }
#who { margin-left: auto; color: var(--muted); font-size: 14px; }

main { max-width: 1180px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin-bottom: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.btn { border: 1px solid var(--line); background: var(--card); padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.link { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; }

input[type=text], input[type=email], input[type=date], input[type=number], input[type=search], input[type=password],
textarea, select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
textarea { resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--bg); }
.table-wrap { overflow-x: auto; }

.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.active, .chip.released { background: var(--chip-ok); color: var(--ok); }
.chip.expiring, .chip.grace, .chip.new, .chip.uploading { background: var(--chip-warn); color: var(--warn); }
.chip.blocked, .chip.silent, .chip.withdrawn { background: var(--chip-bad); color: var(--bad); }
.chip.muted { background: var(--chip-muted); color: var(--muted); }

.key { font: 600 20px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; padding: 14px;
  background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; text-align: center; word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.note { padding: 10px 12px; border-radius: 8px; background: var(--chip-warn); color: var(--warn); font-size: 14px; margin: 10px 0; }
.note.bad { background: var(--chip-bad); color: var(--bad); }

dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(640px, 94vw);
  background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(10, 15, 25, .45); }
dialog form, dialog .body { padding: 20px 22px; }
dialog h2 { margin-bottom: 4px; }
dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 9; }
#toast.on { opacity: 1; }

.center { max-width: 460px; margin: 60px auto; text-align: center; }
.center .card { text-align: left; }
.files li { margin: 10px 0; display: flex; gap: 12px; align-items: flex-start; }
.files li > div { min-width: 0; word-break: break-all; }
.row > input[type=search] { width: 240px; }
.files { list-style: none; padding: 0; margin: 8px 0 0; }
