/* Company admin area: white, neutral look like the participant area and the reader player
   (black primary, greys, coloured dots only for status) */
:root {
  --ad-bg: #ffffff;
  --ad-soft: #f6f6f6;
  --ad-soft-2: #fafafa;
  --ad-ink: #111111;
  --ad-ink-2: #3d3d3d;
  --ad-muted: #737373;
  --ad-faint: #a3a3a3;
  --ad-line: #e5e5e5;
  --ad-line-2: #d4d4d4;
  --ad-ok: #16a34a;
  --ad-ok-ink: #15803d;
  --ad-ok-soft: #ecf8f0;
  --ad-bad: #dc2626;
  --ad-bad-ink: #b91c1c;
  --ad-bad-soft: #fdf0f0;
  --ad-warn: #f59e0b;
  --ad-info: #3b82f6;
  --ad-reg: #a855f7;
  --ad-max: 1200px;
}

body.ad { background: var(--ad-bg); color: var(--ad-ink); font-family: 'Inter', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }

/* ===== Sidebar ===== */
body.ad .sidebar { border-right: 1px solid var(--ad-line) !important; background: var(--ad-bg); }
body.ad .sidebar-header { border-bottom: 0 !important; padding: 1.5rem 1rem 1rem !important; margin-left: 0 !important; }
body.ad .sidebar-header span { color: var(--ad-ink) !important; }
body.ad .sidebar .nav { padding: 0 12px !important; }
body.ad .sidebar .nav-item { margin-bottom: 2px !important; }
body.ad .sidebar .nav-link {
  padding: 0.55rem 0.75rem;
  border-left: 0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ad-muted) !important;
  gap: 2px;
  transition: color .15s, background .15s;
}
body.ad .sidebar .nav-link svg { width: 18px; height: 18px; stroke-width: 1.8; flex: none; }
body.ad .sidebar .nav-link:hover { background: var(--ad-soft); color: var(--ad-ink) !important; }
body.ad .sidebar .nav-link.active { background: var(--ad-soft); color: var(--ad-ink) !important; font-weight: 600; }
body.ad .sidebar .user-info { border-color: var(--ad-line) !important; padding: 0 0.25rem; }
body.ad .sidebar .user-info .fw-semibold { font-size: 0.9rem; color: var(--ad-ink); }
body.ad .sidebar .border-top { border-color: var(--ad-line) !important; }

/* ===== Page shell ===== */
.ad-page { max-width: var(--ad-max); margin: 0 auto; padding: 1.5rem 12px 3rem; }
.ad-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 1.25rem 0 2rem; }
.ad-kicker { font-size: 0.75rem; font-weight: 600; color: var(--ad-muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.5rem; }
.ad-title { font-size: 2rem; font-weight: 800; color: var(--ad-ink); letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
.ad-sub { font-size: 0.95rem; color: var(--ad-muted); margin: 0.5rem 0 0; }
.ad-back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--ad-muted); text-decoration: none; margin-bottom: 1rem; }
.ad-back:hover { color: var(--ad-ink); }

.ad-section { margin-top: 2.5rem; }
.ad-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 1rem; }
.ad-section-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; color: var(--ad-ink); }

/* ===== Buttons ===== */
.ad-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; padding: 0.7rem 1.1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.ad-btn svg { width: 16px; height: 16px; flex: none; }
.ad-btn--primary, .ad-btn--primary:visited { background: var(--ad-ink); color: #fff !important; }
.ad-btn--primary:hover { background: #000; }
.ad-btn--outline, .ad-btn--outline:visited { background: #fff; color: var(--ad-ink) !important; border-color: var(--ad-line); }
.ad-btn--outline:hover { background: var(--ad-soft); border-color: var(--ad-line-2); }
.ad-btn--sm { font-size: 0.8rem; padding: 0.5rem 0.8rem; border-radius: 8px; }
.ad-btn--wide { width: 100%; }
.ad-btn[disabled] { background: var(--ad-soft); color: var(--ad-faint) !important; border-color: var(--ad-soft); cursor: not-allowed; }
.ad-link { font-size: 0.85rem; font-weight: 600; color: var(--ad-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ad-link:hover { text-decoration: underline; }

/* ===== Stats ===== */
.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ad-stat { display: block; background: var(--ad-soft); border-radius: 14px; padding: 1.1rem 1.25rem; text-decoration: none; color: var(--ad-ink); transition: background .15s; }
a.ad-stat:hover { background: #efefef; }
.ad-stat__value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.ad-stat__value small { font-size: 0.95rem; font-weight: 600; color: var(--ad-muted); letter-spacing: 0; }
.ad-stat__label { font-size: 0.8rem; font-weight: 500; color: var(--ad-muted); margin-top: 0.3rem; }

/* ===== Panels ===== */
.ad-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1024px) { .ad-grid-2 { grid-template-columns: 1fr; } }
.ad-panel { border: 1px solid var(--ad-line); border-radius: 16px; padding: 1.4rem 1.5rem; background: #fff; }
.ad-panel .ad-section-head { margin-bottom: 1.1rem; }

/* ===== Status dots and chips ===== */
.ad-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--ad-faint); }
.ad-dot--completed { background: var(--ad-ok); }
.ad-dot--inprogress { background: var(--ad-warn); }
.ad-dot--invited { background: var(--ad-info); }
.ad-dot--registered { background: var(--ad-reg); }
.ad-status { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; font-weight: 500; color: var(--ad-ink-2); white-space: nowrap; }
.ad-status--completed { color: var(--ad-ok-ink); font-weight: 600; }

.ad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--ad-line); font-family: inherit; font-size: 0.82rem; font-weight: 500; color: var(--ad-ink-2); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.ad-chip b { font-weight: 700; color: var(--ad-ink); }
.ad-chip:hover { background: var(--ad-soft); color: var(--ad-ink); }
.ad-chip.active { background: var(--ad-ink); border-color: var(--ad-ink); color: #fff; }
.ad-chip.active b { color: #fff; }

/* ===== Progress ===== */
.ad-bar { height: 6px; border-radius: 3px; background: #ececec; overflow: hidden; }
.ad-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--ad-ink); }
.ad-bar > i.done { background: var(--ad-ok); }
.ad-bar--stack { display: flex; height: 8px; border-radius: 4px; }
.ad-bar--stack > i { border-radius: 0; }
.ad-progress { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.ad-progress .ad-bar { flex: 1; }
.ad-progress__pct { font-size: 0.8rem; font-weight: 600; color: var(--ad-ink-2); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* ===== Forms ===== */
.ad-select { position: relative; display: inline-block; }
.ad-select select { appearance: none; -webkit-appearance: none; font-family: inherit; font-size: 0.875rem; font-weight: 500; color: var(--ad-ink); padding: 0.6rem 2.4rem 0.6rem 0.9rem; border: 1px solid var(--ad-line); border-radius: 10px; background: #fff; cursor: pointer; outline: none; max-width: 100%; }
.ad-select select:hover { border-color: var(--ad-line-2); }
.ad-select select:focus-visible { border-color: var(--ad-ink); }
.ad-select svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ad-muted); width: 16px; height: 16px; }
.ad-search { position: relative; }
.ad-search input { font-family: inherit; font-size: 0.875rem; padding: 0.6rem 0.9rem 0.6rem 2.3rem; border: 1px solid var(--ad-line); border-radius: 10px; width: 240px; max-width: 100%; outline: none; }
.ad-search input:focus { border-color: var(--ad-ink); }
.ad-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ad-faint); }
.ad-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 1rem; }
.ad-toolbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ===== Table ===== */
.ad-table-wrap { border: 1px solid var(--ad-line); border-radius: 16px; overflow: hidden; }
.ad-table-scroll { overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ad-table th { text-align: left; font-size: 0.72rem; font-weight: 600; color: var(--ad-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.8rem 1rem; background: var(--ad-soft-2); border-bottom: 1px solid var(--ad-line); white-space: nowrap; }
.ad-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--ad-line); vertical-align: middle; color: var(--ad-ink-2); }
.ad-table tr:last-child td { border-bottom: 0; }
.ad-table tbody tr { transition: background .1s; }
.ad-table tbody tr:hover { background: var(--ad-soft-2); }
.ad-table tr.is-link { cursor: pointer; }
.ad-table .ad-num { text-align: right; font-variant-numeric: tabular-nums; }
.ad-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ad-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ad-soft); color: var(--ad-ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex: none; letter-spacing: 0.02em; }
.ad-avatar--lg { width: 56px; height: 56px; font-size: 1.05rem; }
.ad-person__name { font-weight: 600; color: var(--ad-ink); white-space: nowrap; }
.ad-person__mail { font-size: 0.78rem; color: var(--ad-muted); white-space: nowrap; }
.ad-cell-sub { font-size: 0.78rem; color: var(--ad-muted); margin-top: 2px; white-space: nowrap; }
.ad-chapter { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.ad-empty { padding: 3.5rem 2rem; text-align: center; color: var(--ad-muted); font-size: 0.9rem; }
.ad-empty svg { width: 40px; height: 40px; color: var(--ad-line-2); margin: 0 auto 0.75rem; display: block; }

/* ===== Activity list ===== */
.ad-feed { list-style: none; margin: 0; padding: 0; }
.ad-feed li { display: flex; align-items: flex-start; gap: 12px; padding: 0.7rem 0; border-bottom: 1px solid var(--ad-line); }
.ad-feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.ad-feed li:first-child { padding-top: 0; }
.ad-feed .ad-dot { margin-top: 7px; }
.ad-feed__text { flex: 1; min-width: 0; font-size: 0.875rem; color: var(--ad-ink-2); line-height: 1.45; }
.ad-feed__text b { color: var(--ad-ink); font-weight: 600; }
.ad-feed__date { flex: none; font-size: 0.78rem; color: var(--ad-faint); white-space: nowrap; padding-top: 1px; }

/* ===== Course cards (admin) ===== */
.ad-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.ad-course { position: relative; background: #fff; border: 1px solid var(--ad-line); border-radius: 16px; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.ad-course:hover { border-color: var(--ad-line-2); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
.ad-course__cover { position: relative; aspect-ratio: 16 / 7; background: #f2f2f2; overflow: hidden; border-radius: 15px 15px 0 0; }
.ad-course__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-course__cover--tilted { background: linear-gradient(135deg, #f7f7f7 0%, #ececec 100%); }
.ad-course__cover--tilted img { position: absolute; right: -4%; bottom: -60%; width: auto; height: 170%; object-fit: contain; transform: rotate(-8deg); }
.ad-course__cover--none { display: flex; align-items: center; justify-content: center; color: var(--ad-faint); }
.ad-course__badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.94); color: var(--ad-ink); font-size: 0.75rem; font-weight: 600; padding: 6px 11px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.ad-course__badge--demo { background: #fef3c7; color: #92400e; }
.ad-course__badge--demo.is-over { background: #f3f4f6; color: #6b7280; }
.ad-course__body { padding: 1.15rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.ad-course__kicker { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ad-muted); margin-bottom: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-course__title { font-size: 1.1rem; font-weight: 700; color: var(--ad-ink); letter-spacing: -0.01em; line-height: 1.3; margin: 0; }
.ad-course__status { display: block; margin-top: 1.1rem; padding: 0.85rem 0.95rem; border-radius: 12px; background: var(--ad-soft-2); border: 1px solid var(--ad-line); text-decoration: none; color: var(--ad-ink-2); transition: border-color .15s, background .15s; }
.ad-course__status:hover { border-color: var(--ad-line-2); background: var(--ad-soft); }
.ad-course__status .ad-bar { margin: 0.55rem 0; height: 5px; }
.ad-course__status-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.85rem; }
.ad-course__status-row b { color: var(--ad-ink); font-weight: 700; }
.ad-course__status-pct { font-weight: 700; color: var(--ad-ink); font-variant-numeric: tabular-nums; }
.ad-course__status-row--sub { font-size: 0.78rem; color: var(--ad-muted); }
.ad-course__status-link { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--ad-ink); }
.ad-course__actions { margin-top: auto; padding-top: 1rem; display: grid; gap: 8px; }
.ad-course__actions .ad-btn { padding-left: 0.6rem; padding-right: 0.6rem; }

/* Three-dot menu on the course cover */
.ad-menu { position: absolute; top: 10px; right: 10px; z-index: 5; }
.ad-menu__btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.94); color: var(--ad-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.ad-menu__btn:hover { background: #fff; }
.ad-menu__list { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: #fff; border: 1px solid var(--ad-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.1); padding: 6px; }
.ad-menu.open .ad-menu__list { display: block; }
.ad-menu__list a { display: block; padding: 0.55rem 0.75rem; border-radius: 8px; font-size: 0.85rem; font-weight: 500; color: var(--ad-ink); text-decoration: none; }
.ad-menu__list a:hover { background: var(--ad-soft); }

/* ===== Person detail: chapters and exercises ===== */
.ad-profile { display: flex; align-items: center; gap: 16px; }
.ad-chapters { list-style: none; margin: 0; padding: 0; counter-reset: ch; }
.ad-chapters li { display: flex; align-items: center; gap: 12px; padding: 0.65rem 0; border-bottom: 1px solid var(--ad-line); font-size: 0.9rem; color: var(--ad-ink-2); }
.ad-chapters li:last-child { border-bottom: 0; }
.ad-chapters__mark { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; background: var(--ad-soft); color: var(--ad-muted); }
.ad-chapters li.done .ad-chapters__mark { background: var(--ad-ok-soft); color: var(--ad-ok-ink); }
.ad-chapters li.current .ad-chapters__mark { background: var(--ad-ink); color: #fff; }
.ad-chapters li.current { color: var(--ad-ink); font-weight: 600; }
.ad-chapters__name { flex: 1; min-width: 0; }
.ad-chapters__tag { font-size: 0.75rem; font-weight: 600; color: var(--ad-muted); white-space: nowrap; }
.ad-chapters li.done .ad-chapters__tag { color: var(--ad-ok-ink); }

.ad-results { list-style: none; margin: 0; padding: 0; }
.ad-results li { display: flex; align-items: flex-start; gap: 12px; padding: 0.75rem 0; border-bottom: 1px solid var(--ad-line); }
.ad-results li:last-child { border-bottom: 0; }
.ad-results__mark { width: 24px; height: 24px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.ad-results__mark svg { width: 13px; height: 13px; }
.ad-results__mark--ok { background: var(--ad-ok-soft); color: var(--ad-ok-ink); }
.ad-results__mark--bad { background: var(--ad-bad-soft); color: var(--ad-bad-ink); }
.ad-results__mark--part { background: #fdf6e3; color: #b45309; }
.ad-results__body { flex: 1; min-width: 0; }
.ad-results__q { font-size: 0.9rem; color: var(--ad-ink); font-weight: 500; line-height: 1.4; }
.ad-results__meta { font-size: 0.78rem; color: var(--ad-muted); margin-top: 2px; }
.ad-results__score { flex: none; font-size: 0.85rem; font-weight: 700; color: var(--ad-ink); font-variant-numeric: tabular-nums; }
.ad-results__group { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ad-muted); padding: 1.1rem 0 0.25rem; border-bottom: 0 !important; }
.ad-results__group:first-child { padding-top: 0; }
.ad-note { background: var(--ad-soft); border-radius: 12px; padding: 0.9rem 1.1rem; font-size: 0.85rem; color: var(--ad-ink-2); }

@media (max-width: 640px) {
  .ad-title { font-size: 1.6rem; }
  .ad-head { padding: 0.5rem 0 1.5rem; }
  .ad-panel { padding: 1.1rem; }
}

/* ===== Status table: fits without horizontal scrolling ===== */
.ad-page--wide { max-width: 1400px; }
.ad-table td.ad-col-person { max-width: 240px; }
.ad-col-person .ad-person > div { overflow: hidden; }
.ad-col-person .ad-person__name, .ad-col-person .ad-person__mail { overflow: hidden; text-overflow: ellipsis; }
.ad-table td.ad-col-course { min-width: 160px; max-width: 280px; }
.ad-course-name { color: var(--ad-ink); font-weight: 500; line-height: 1.35; }
.ad-col-course .ad-chapter, .ad-col-progress .ad-chapter { max-width: 100%; margin-top: 4px; }
.ad-table td.ad-col-progress { min-width: 170px; max-width: 240px; }
.ad-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ad-table td.ad-col-action { text-align: right; white-space: nowrap; width: 1%; padding-left: 0.5rem; }
.ad-icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--ad-line); background: #fff; color: var(--ad-ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, border-color .15s; }
.ad-icon-btn:hover { background: var(--ad-soft); border-color: var(--ad-line-2); color: var(--ad-ink); }
.ad-icon-btn.is-busy { opacity: 0.5; }
.ad-icon-btn.is-sent { color: var(--ad-ok-ink); border-color: var(--ad-ok-soft); background: var(--ad-ok-soft); }
.ad-icon-btn.is-error { color: var(--ad-bad-ink); border-color: var(--ad-bad-soft); }
.ad-toolbar .ad-select select#courseFilter { width: 300px; text-overflow: ellipsis; }

/* ===== Teilnahme ohne Konto (share modal): second link with on/off switch ===== */
.ad-participation__label { margin: 0 0 0.35rem; font-size: 0.875rem; color: var(--ad-ink); }
.ad-participation { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--ad-line); }
.ad-participation__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.875rem; color: var(--ad-ink); }
.ad-participation__text { margin: 0.35rem 0 0.9rem; font-size: 0.8rem; line-height: 1.45; color: var(--ad-muted); }
.ad-participation.is-off .ad-participation__text, .ad-participation.is-off input[type=text] { opacity: 0.5; }
.ad-participation__status { min-height: 1.2em; font-size: 0.8rem; color: var(--ad-muted); margin-top: 0.5rem; }
.ad-switch { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--ad-muted); cursor: pointer; user-select: none; }
.ad-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ad-switch__track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--ad-line-2); transition: background .15s; }
.ad-switch__track i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.ad-switch input:checked + .ad-switch__track { background: var(--ad-ink); }
.ad-switch input:checked + .ad-switch__track i { transform: translateX(14px); }
.ad-switch input:focus-visible + .ad-switch__track { outline: 2px solid var(--ad-info); outline-offset: 2px; }

/* ===== Forms (profile) ===== */
.ad-page--narrow { max-width: 860px; }
.ad-flash { border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.875rem; margin-bottom: 1rem; }
.ad-flash--ok { background: var(--ad-ok-soft); color: var(--ad-ok-ink); }
.ad-flash--error { background: var(--ad-bad-soft); color: var(--ad-bad-ink); }
.ad-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ad-form__section--full, .ad-form__actions { grid-column: 1 / -1; }
@media (max-width: 1100px) { .ad-form { grid-template-columns: 1fr; } }
.ad-form__section .ad-section-title { margin-bottom: 1rem; }
.ad-form__hint { font-size: 0.82rem; color: var(--ad-muted); margin: -0.6rem 0 1rem; }
.ad-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.ad-fields[hidden] { display: none; }
.ad-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ad-field--full { grid-column: 1 / -1; }
.ad-fields:has(.ad-field--zip) { grid-template-columns: 110px 1fr; }
.ad-fields:has(.ad-field--zip) > .ad-field:not(.ad-field--zip):not(.ad-field--full) { grid-column: 2; }
.ad-fields:has(.ad-field--zip) > .ad-field--zip { grid-column: 1; }
.ad-field > span:first-child { font-size: 0.78rem; font-weight: 600; color: var(--ad-ink-2); }
.ad-field input, .ad-field select { font-family: inherit; font-size: 0.9rem; color: var(--ad-ink); padding: 0.6rem 0.8rem; border: 1px solid var(--ad-line); border-radius: 10px; background: #fff; outline: none; width: 100%; min-width: 0; transition: border-color .15s; }
.ad-field select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px; }
.ad-field input:hover, .ad-field select:hover { border-color: var(--ad-line-2); }
.ad-field input:focus, .ad-field select:focus { border-color: var(--ad-ink); }
.ad-check { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ad-ink-2); margin: 1rem 0 0.75rem; cursor: pointer; }
.ad-check input { width: 16px; height: 16px; accent-color: var(--ad-ink); }
.ad-logo { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.ad-logo__preview { width: 200px; aspect-ratio: 4 / 1; border: 1px solid var(--ad-line); border-radius: 10px; background: var(--ad-soft-2); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.ad-logo__preview img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.ad-logo__preview span { font-size: 0.78rem; color: var(--ad-faint); }
.ad-color { display: flex; gap: 8px; align-items: center; }
.ad-color input[type="color"] { width: 42px; height: 40px; padding: 3px; flex: none; cursor: pointer; }
.ad-color input[type="text"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ad-form__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 0.25rem; }
@media (max-width: 640px) {
  .ad-fields { grid-template-columns: 1fr; }
  .ad-form__actions { flex-direction: column-reverse; }
}

/* ===== Schulung zuweisen (one modal: link or employees) ===== */
.ad-seg { display: flex; gap: 4px; margin-top: 1.1rem; padding: 4px; border-radius: 10px; background: var(--ad-soft); }
.ad-seg__btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0.5rem 0.75rem; border: 0; border-radius: 7px; background: transparent; font-size: 0.85rem; font-weight: 600; color: var(--ad-muted); cursor: pointer; }
.ad-seg__btn:hover { color: var(--ad-ink); }
.ad-seg__btn.is-active { background: #fff; color: var(--ad-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ad-seg__count { font-size: 0.72rem; font-weight: 600; padding: 0 6px; border-radius: 999px; background: var(--ad-line); color: var(--ad-ink-2); }
.ad-share-opt { border: 1px solid var(--ad-line); border-radius: 12px; padding: 1rem 1.1rem; margin-top: 0.75rem; }
.ad-share-opt.ad-participation { margin-top: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--ad-line); }
.ad-share-opt__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.9rem; color: var(--ad-ink); }
.ad-share-opt__text { margin: 0.35rem 0 0.85rem; font-size: 0.8rem; line-height: 1.45; color: var(--ad-muted); }
.ad-badge-rec { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ad-ok-soft); color: var(--ad-ok-ink); }
.ad-share-empty { text-align: center; padding: 1.25rem 0.5rem 0.25rem; font-size: 0.875rem; color: var(--ad-muted); }
.ad-share-empty b { color: var(--ad-ink); }
.ad-share-empty p + p { margin-top: 0.3rem; }
.ad-share-empty__actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 1.1rem; }
.ad-share-opt .ad-participation__status:empty { display: none; }
.ad-seg__btn:focus { outline: none; }
.ad-seg__btn:focus-visible { outline: 2px solid var(--ad-ink); outline-offset: 1px; }
