/* Resavis — Grundlagen: Schriften, Farben, Bausteine */

@font-face { font-family: 'Archivo'; src: url('fonts/archivo-var-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-var-latinext.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/plexmono-400-latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/plexmono-500-latin.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --blue: #0056E5;
  --blue-dark: #0047bd;
  --blue-tint: #e6effe;
  --paper: #f2f6fe;
  --navy: #00092d;
  --navy-2: #00143c;
  --ink: #0d1638;
  --ink-soft: #66728a;
  --ink-mute: #8a94a8;
  --line: #e3e8f0;
  --line-strong: #cfd6e2;
  --card: #ffffff;
  --yellow: #EFC945;
  --yellow-tint: #fff8e6;
  --green: #0f9d58;
  --green-tint: #e6f6ec;
  --red: #d93025;
  --red-tint: #fdecea;
  --amber: #b45309;
  --amber-tint: #fef3c7;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --r-xl: 26px;
  --shadow: 0 1px 2px rgba(13, 22, 56, .05), 0 10px 30px rgba(13, 22, 56, .06);
  --shadow-lg: 0 24px 70px rgba(0, 9, 45, .2);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .88em; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
.tiny { font-size: .78rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.visually-hidden, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 100; }
[hidden] { display: none !important; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.stack { display: grid; gap: 14px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; text-decoration: none !important; transition: background .15s, color .15s, box-shadow .15s, transform .15s; white-space: nowrap; }
.btn:focus-visible { outline: 3px solid rgba(0, 86, 229, .35); outline-offset: 2px; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--yellow { background: var(--yellow); color: var(--navy); }
.btn--yellow:hover { background: #f3d15c; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--navy-2); }
.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink-mute); background: #fff; }
.btn--light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn--light:hover { background: rgba(255, 255, 255, .22); }
.btn--danger { background: var(--red-tint); color: var(--red); }
.btn--danger:hover { background: #f9d6d2; }
.btn--sm { padding: 7px 14px; font-size: .85rem; }
.btn--lg { padding: 15px 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--icon { padding: 8px; border-radius: 10px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .btn { white-space: normal; text-align: center; } }

/* Formulare */
.field { margin-bottom: 16px; }
.field label, .field > .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { display: block; color: var(--ink-soft); font-size: .8rem; margin-top: 5px; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .field select, .field textarea,
.input { width: 100%; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--card); font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 86, 229, .18); }
.field textarea { min-height: 96px; resize: vertical; }
.field input[type="color"] { width: 54px; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); }
.field--inline { display: flex; align-items: center; gap: 10px; }
.field--inline label { margin: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .93rem; cursor: pointer; margin-bottom: 10px; }
.check input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--blue); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .93rem; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 40px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + .switch__track { background: var(--blue); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 3px solid rgba(0, 86, 229, .35); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 700; font-size: 1rem; padding: 0; margin-bottom: 10px; }

/* Karten, Badges, Hinweise */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; box-shadow: var(--shadow); }
.card--flat { box-shadow: none; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__head h2, .card__head h3 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.badge--ok { background: var(--green-tint); color: var(--green); }
.badge--warn { background: var(--amber-tint); color: var(--amber); }
.badge--bad { background: var(--red-tint); color: var(--red); }
.badge--mute { background: #eef1f6; color: var(--ink-soft); }
.badge--blue { background: var(--blue-tint); color: var(--blue); }
.alert { padding: 12px 16px; border-radius: var(--r-m); font-size: .93rem; margin-bottom: 16px; border: 1px solid transparent; }
.alert--success, .alert--ok { background: var(--green-tint); color: #0b6b3c; border-color: #b8e5c9; }
.alert--error, .alert--bad { background: var(--red-tint); color: #a1261b; border-color: #f4c3bd; }
.alert--info { background: var(--blue-tint); color: #003a9e; border-color: #c2d6fb; }
.alert--warn { background: var(--amber-tint); color: #8a4a00; border-color: #f5dea0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); flex: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 600; }
.table tbody tr:hover { background: #f7f9fd; }
.table td.actions { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-soft); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Textbausteine */
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.lead { font-size: 1.12rem; color: var(--ink-soft); }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
