/* Lizenzportal — neutrale Herstelleroptik (nicht das Kunden-Designsystem). Akzent per --accent überschreibbar (Agentur-Marke). */
:root {
  --accent: #0f766e; --accent-ink: #fff;
  --bg: #f5f6f8; --surface: #fff; --surface-2: #f0f2f5; --line: #e2e5ea; --line-strong: #cfd4dc;
  --ink: #1b1e27; --muted: #626b7a; --good: #12805c; --good-bg: #e3f5ee; --bad: #c23a32; --bad-bg: #fbe9e7; --dev: #6b4fd8; --dev-bg: #efeafd; --warn: #c27a0e;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 24, 33, .05), 0 2px 8px rgba(20, 24, 33, .04);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a; --surface: #1a1d25; --surface-2: #222631; --line: #2b303c; --line-strong: #3a4050;
    --ink: #e8eaf0; --muted: #9aa2b2; --good: #4cc79a; --good-bg: #173229; --bad: #ff8a80; --bad-bg: #3a1c1a; --dev: #b3a2ff; --dev-bg: #2a2445; --warn: #e3a547;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0; }
p { margin: 0 0 10px; }
code, pre { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.i { width: 18px; height: 18px; flex: none; }
.i.lg { width: 34px; height: 34px; color: var(--accent); }

/* Kopf */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-t { display: flex; flex-direction: column; line-height: 1.15; }
.brand-t small { color: var(--muted); font-size: 12px; }
.mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 700; }
.mark.big { width: 48px; height: 48px; border-radius: 13px; font-size: 22px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.is-active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.who { display: flex; align-items: center; gap: 8px; }
.who-t { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.who-t small { color: var(--muted); font-size: 12px; }
.who form { margin: 0; }

main { width: 100%; margin: 0 auto; padding: 28px 24px 40px; flex: 1; }
main.wide { max-width: 1180px; }
main.narrow { max-width: 440px; padding-top: 10vh; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 16px; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; list-style: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn .i { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.dev { background: var(--dev-bg); color: var(--dev); }
.pill.plan-business { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.pill.plan-unlimited { background: var(--ink); color: var(--bg); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.keyhint { font-family: var(--mono); font-size: .7em; font-weight: 500; }

/* Formulare */
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; min-width: 0; }
label > input, label > select { width: 100%; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.opt { color: var(--muted); font-weight: 400; }
input, select { font: inherit; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; margin: 0; }
legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
input.code { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; text-align: center; }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash.ok { background: var(--good-bg); color: var(--good); }
.flash.err { background: var(--bad-bg); color: var(--bad); }
.hint { background: var(--surface-2); padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); }

/* Pop-up-Formular */
.pop { position: relative; }
.pop > summary::-webkit-details-marker { display: none; }
.pop-body { position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(20, 24, 33, .16); padding: 16px; }

/* Anmeldung */
.login { padding: 28px; }
.login-head { text-align: center; margin-bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.login h1 { font-size: 22px; }

/* Lizenz-Karte */
.card.lic { display: flex; flex-direction: column; gap: 12px; color: var(--ink); margin: 0; transition: border-color .15s; }
.card.lic:hover { border-color: var(--line-strong); text-decoration: none; }
.lic-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lic-h h2 { font-size: 17px; }
.lic-f { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.go { color: var(--muted); }

.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.meter-h { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.meter-h b { margin-left: auto; color: var(--ink); font-size: 15px; }
.meter-h b small { color: var(--muted); font-weight: 400; font-size: 12px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.meter.is-full .bar i { background: var(--warn); }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.card:not(.flush) .tbl { margin: 0 -12px; width: calc(100% + 24px); }
.tbl .r { text-align: right; }
.tbl td form { margin: 0; display: inline; }
.tbl tr.link { cursor: pointer; }
.tbl tr.link:hover td { background: var(--surface-2); }
.host { font-family: var(--mono); font-size: 13.5px; }

.addsite { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin: 16px 0 8px; }
.invite { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 12px; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 10px; }
.empty .btn { margin-top: 8px; }

pre.code { background: var(--surface-2); padding: 12px 14px; border-radius: 8px; overflow-x: auto; margin: 0 0 10px; }
.keybox { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.keybox h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.copyline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copyline code { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line-strong); padding: 9px 12px; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.keyline code { font-size: 14px; }

.feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.feat .off { color: var(--muted); }
.feat .on::first-letter { color: var(--good); }

.log { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.log li { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.log li:last-child { border: 0; }
.log time { color: var(--muted); font-variant-numeric: tabular-nums; }

.team { list-style: none; margin: 0; padding: 0; }
.team li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.team li:last-child { border: 0; }
.team .t { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.team .t b, .team .t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team form { margin: 0; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 13px; flex: none; }
ul.plain { margin: 0; padding-left: 18px; }

.preview .pv { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.preview .pv div { display: flex; flex-direction: column; line-height: 1.2; }
.preview .mark { background: var(--accent); color: var(--accent-ink); }

@media (max-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .top { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .nav { order: 3; flex-basis: 100%; }
  .who-t { display: none; }
  main { padding: 20px 16px 32px; }
}
@media (max-width: 560px) {
  .meters, .row2 { grid-template-columns: 1fr; }
  .addsite, .invite { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .log li { grid-template-columns: 1fr; gap: 0; }
  .tbl th:nth-child(3), .tbl td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Vertragstext */
.doc { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 12px 0; font-size: 14px; }
.doc h2 { font-size: 17px; margin: 0 0 10px; }
.doc h3 { font-size: 14px; margin: 14px 0 6px; }
.doc .li { padding-left: 14px; text-indent: -10px; margin-bottom: 4px; }
