/* easimo Schulungsbuchung – Design-Tokens aus dem Canvas */
:root {
  --bg: #F3F5F5;
  --surface: #FFFFFF;
  --surface-2: #F7F9F9;
  --border: #D9DFDF;
  --border-light: #EEF1F1;
  --text: #16211F;
  --muted: #556260;
  --dim: #8E9998;
  --accent: #0E5F63;
  --accent-dark: #0A4548;
  --accent-soft: #E3F0F0;
  --blue: #27467C; --blue-soft: #E8EEF8;
  --plum: #6B3A7A; --plum-soft: #F1E6F4;
  --green: #1F6B3A; --green-soft: #E4F3E9;
  --orange: #8A4512; --orange-soft: #FBEBDD;
  --red: #9B2C22; --red-soft: #FBE3E1;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; background: var(--bg); padding: 2px 6px; border-radius: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Karten */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; }
.card-flush { padding: 0; overflow: hidden; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border-light); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.eyebrow-accent { color: var(--accent); font-size: 13px; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius); font-size: 14px; }
.note svg { flex: 0 0 auto; margin-top: 2px; }
.note-teal { background: var(--accent-soft); color: var(--accent-dark); }
.note-blue { background: var(--blue-soft); color: var(--blue); }
.note-red { background: var(--red-soft); color: var(--red); }
.note-orange { background: var(--orange-soft); color: var(--orange); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; min-height: 44px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #B9C3C2; color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-lg { min-height: 48px; padding: 12px 20px; font-size: 15px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); color: var(--red); }
.btn-link { border: 0; background: transparent; padding: 0; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: underline; min-height: 24px; }
.btn.disabled, .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn-icon { width: 40px; height: 40px; padding: 0; }
.btn-dashed { border-style: dashed; color: var(--accent); font-weight: 600; width: 100%; }

/* Badges & Avatare */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-plum { background: var(--plum-soft); color: var(--plum); }
.badge-teal { background: var(--accent-soft); color: var(--accent); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: var(--bg); color: var(--muted); }
.badge svg { vertical-align: -2px; margin-right: 4px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #3E4B4A; color: #fff; font-size: 11px; font-weight: 600; flex: 0 0 auto; }
.avatar-lg { width: 34px; height: 34px; font-size: 12px; }
.avatar-1 { background: #27467C; } .avatar-2 { background: #6B3A7A; } .avatar-3 { background: #0E5F63; }
.avatar-empty { background: #fff; border: 1px dashed #B9C3C2; color: var(--muted); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid #fff; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }
.with-avatar { display: inline-flex; align-items: center; gap: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dot-green { background: var(--green); } .dot-red { background: var(--red); } .dot-orange { background: var(--orange); }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 14px; font-weight: 500; }
.hint { font-size: 13px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #B9C3C2; border-radius: var(--radius-sm); background: #fff; color: var(--text); }
textarea.input { resize: vertical; min-height: 72px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input-group { display: flex; align-items: stretch; border: 1px solid #B9C3C2; border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.input-group .input { border: 0; border-radius: 0; }
.input-group span { display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: 13px; border-left: 1px solid var(--border-light); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; cursor: pointer; min-height: 40px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 2px 0 0; flex: 0 0 auto; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; cursor: pointer; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; min-height: 32px; border-radius: 999px; font-weight: 600; font-size: 12px; cursor: pointer; background: var(--bg); color: var(--muted); }
.chip-check input { width: 14px; height: 14px; margin: 0; }
.chip-check:has(input:checked).chip-blue { background: var(--blue-soft); color: var(--blue); }
.chip-check:has(input:checked).chip-plum { background: var(--plum-soft); color: var(--plum); }
.chip-check:has(input:checked).chip-teal { background: var(--accent-soft); color: var(--accent); }
.chip-check:has(input:checked).chip-orange { background: var(--orange-soft); color: var(--orange); }
.chip-check:has(input:checked).chip-green { background: var(--green-soft); color: var(--green); }
.day-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 40px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.day-toggle:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.day-toggle input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.radio-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; min-height: 44px; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.errors { margin: 0; padding: 12px 16px 12px 32px; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red); font-size: 14px; }

/* Flash */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.flash-success { background: var(--green-soft); color: var(--green); }
.flash-error { background: var(--red-soft); color: var(--red); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 600; white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table td.actions { text-align: right; white-space: nowrap; }
.table tr.row-error { background: #FFF8F7; }
.table tr.row-active { background: var(--accent-soft); }
.table .cell-title { font-weight: 600; }
.table .cell-sub { color: var(--muted); font-size: 13px; }
.nowrap { white-space: nowrap; }

/* Filter-Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 500; font-size: 14px; text-decoration: none; }
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 600; text-align: center; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 44px; border: 1px solid var(--border); border-radius: 9px; background: #fff; flex: 0 1 280px; }
.search input { border: 0; outline: 0; width: 100%; font-size: 14px; background: transparent; }

/* Öffentliche Seite */
.public-page { min-height: 100vh; display: flex; flex-direction: column; }
.public-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.public-header .inner, .public-footer .inner { max-width: 1120px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.brand-name { font-weight: 600; font-size: 18px; }
.brand-sub { color: var(--muted); padding-left: 12px; border-left: 1px solid var(--border); }
.public-main { max-width: 1120px; width: 100%; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 28px; flex: 1 0 auto; }
.public-footer { border-top: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--muted); }
.public-footer a { color: var(--muted); }
.welcome { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; padding: 28px 32px; }
.welcome h1 { font-size: 30px; }
.welcome dl { margin: 0; display: flex; flex-wrap: wrap; gap: 20px 32px; flex: 1 1 420px; }
.welcome dl > div { flex: 1 1 140px; }
.welcome dt { font-size: 13px; color: var(--muted); }
.welcome dd { margin: 0; font-weight: 600; }
@media (max-width: 560px) { .welcome dl { grid-template-columns: 1fr; } }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; }
.stepper li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.stepper li.active { font-weight: 600; color: var(--accent); }
.stepper li.done { color: var(--accent); }
.step-num { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #B9C3C2; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.stepper li.active .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper li.done .step-num { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.service-card { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; padding: 20px 24px; border-radius: var(--radius); }
.service-num { width: 48px; height: 48px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.service-body { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.service-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted); align-items: center; }
.service-meta span { display: inline-flex; align-items: center; gap: 6px; }
.layout-2col { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.layout-2col > aside { flex: 1 1 300px; max-width: 380px; }
.layout-2col > .main-col { flex: 999 1 520px; min-width: 0; }
@media (max-width: 760px) { .layout-2col > aside { max-width: none; } }
.summary dl { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.summary dl > div { display: flex; gap: 12px; align-items: flex-start; }
.summary dt { width: 96px; flex: 0 0 auto; color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; }
.steps-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.steps-list li { display: flex; gap: 12px; align-items: flex-start; }
.steps-list .step-num { width: 24px; height: 24px; background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; flex: 0 0 auto; }

/* Kalender */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-weekdays { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-day { min-height: 52px; border-radius: 9px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; cursor: pointer; }
.cal-day .dot { width: 6px; height: 6px; }
.cal-day.outside { border-color: transparent; background: transparent; color: var(--dim); cursor: default; }
.cal-day.full { border-color: var(--border-light); background: var(--surface-2); color: var(--dim); cursor: default; }
.cal-day.today { border-style: dashed; }
.cal-day.anchor { border: 2px solid var(--blue); font-weight: 600; }
.cal-day.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.cal-day.selected .dot { background: #fff; }
.cal-day small { font-size: 10px; font-weight: 600; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--border-light); }
.cal-legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend-box { width: 14px; height: 14px; border-radius: 4px; }
.slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .slot-grid { grid-template-columns: 1fr; } }
.slot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; min-height: 56px; border-radius: 10px; border: 1px solid var(--border); background: #fff; text-align: left; cursor: pointer; }
.slot .slot-time { font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; gap: 10px; }
.slot .slot-who { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.slot.selected { border: 2px solid var(--accent); background: var(--accent-soft); padding: 11px 15px; }
.slot.selected .slot-who { color: var(--accent-dark); }
.empty-state { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--border); border-radius: 10px; }

/* Admin-Layout */
.admin-shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.admin-nav { flex: 1 1 240px; max-width: 260px; background: var(--surface); border-right: 1px solid var(--border); padding: 20px 16px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 760px) { .admin-nav { max-width: none; border-right: 0; border-bottom: 1px solid var(--border); } }
.admin-nav .brand { padding: 4px 8px; }
.admin-nav .brand-sub { border: 0; padding: 0; font-size: 12px; display: block; }
.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.admin-main { flex: 999 1 560px; min-width: 0; padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 760px) { .admin-main { padding: 20px 16px 40px; } }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.panel { flex: 1 1 340px; max-width: 420px; }
@media (max-width: 760px) { .panel { max-width: none; } }
.assign-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.flow-steps li { flex: 1 1 200px; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.flow-steps .step-num { width: 32px; height: 32px; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.kv { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.kv > div { display: flex; gap: 12px; }
.kv dt { width: 150px; flex: 0 0 auto; color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
/* Modal / Toast */
dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(22, 33, 31, 0.25); }
dialog.modal::backdrop { background: rgba(22, 33, 31, 0.45); }
.modal-body { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border-light); }
.modal-content { padding: 20px 24px 24px; overflow: auto; }
.modal-frame { width: 100%; height: min(80vh, 900px); border: 0; display: block; }
#toast-host { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: min(480px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(22, 33, 31, 0.18); background: var(--text); color: #fff; transition: opacity .3s, transform .3s; word-break: break-all; }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast.hide { opacity: 0; transform: translateY(8px); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; }
.preview-box { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.preview-box > div { display: flex; justify-content: space-between; gap: 12px; }
