:root {
  --bg: #f5f6f8; --card: #fff; --text: #1b1f27; --muted: #667085; --line: #e3e6eb;
  --accent: #1f6feb; --accent-text: #fff; --ok: #12805c; --ok-bg: #e6f6ef; --err: #b42318; --err-bg: #fdecea;
  --warn-bg: #fff4d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218; --card: #181c24; --text: #e7eaf0; --muted: #98a2b3; --line: #2a303b;
    --accent: #4c8dff; --accent-text: #0b0f16; --ok: #4cc9a0; --ok-bg: #12312a; --err: #ff8a80; --err-bg: #3a1a18;
    --warn-bg: #3a3012;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); }
.brand .logo { color: var(--accent); }
.top nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
main { max-width: 720px; margin: 28px auto; padding: 0 16px; }
main.wide { max-width: 1000px; }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 28px 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=number] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button, .btn { display: inline-block; padding: 9px 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--err); color: #fff; }
button.small { padding: 4px 10px; font-size: 13px; }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 400; }
form.inline { display: inline; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 140px; }
.row > button { flex: 0 0 auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.dot.on { background: var(--ok); }
.muted { color: var(--muted); }
.actions { white-space: nowrap; text-align: right; }
summary { cursor: pointer; color: var(--accent); }
.hero { text-align: center; padding: 40px 0 10px; }
.hero h1 { font-size: 32px; }
.hero p { color: var(--muted); max-width: 520px; margin: 0 auto 22px; }
.hero .btn { margin: 0 6px; }

/* Softphone */
.phone { max-width: 360px; margin: 0 auto; }
.phone .status { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.phone .display { width: 100%; font-size: 26px; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); letter-spacing: .05em; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.pad button { background: var(--bg); color: var(--text); border: 1px solid var(--line); font-size: 22px; padding: 14px 0; }
.pad button small { display: block; font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: .1em; }
.callbar { display: flex; gap: 10px; }
.callbar button { flex: 1; padding: 14px; font-size: 16px; }
.callbtn { background: var(--ok); color: #fff; }
.hangbtn { background: var(--err); color: #fff; }
.incoming { background: var(--warn-bg); border-radius: 10px; padding: 14px; margin-bottom: 14px; text-align: center; }
.incoming .callbar { margin-top: 10px; }
.hidden { display: none !important; }
.callinfo { text-align: center; margin: 8px 0; min-height: 24px; color: var(--muted); }
.callinfo b { color: var(--text); }

/* Tabs & Formulare für Rufgruppen / Warteschlangen / IVR */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 18px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 0; }
label.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--text); }
select, input[type=file], textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.digits { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 14px; }
.digits label { margin: 0; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; color: var(--text); }
.digits b { text-align: center; font-size: 16px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
