/* ============================================================
   Sessio — Abstract- & Kongressmanagement
   Design system inspired by the Appstack / AdminKit admin theme
   (dark navy sidebar, #3B7DDD primary, soft-shadow cards, Inter)
   ============================================================ */

:root {
  /* Brand & semantic */
  --primary:        #3b7ddd;
  --primary-rgb:    59,125,221;
  --primary-dark:   #3169c4;
  --primary-soft:   #eaf1fb;
  --success:        #4bbf73;
  --success-soft:   #e6f6ec;
  --warning:        #f0ad4e;
  --warning-soft:   #fdf3e3;
  --danger:         #d9534f;
  --danger-soft:    #fbeae9;
  --info:           #1f9bcf;
  --info-soft:      #e5f4fa;

  /* Type colours (presentation types) */
  --type-vortrag:        #4bbf73; /* grün — Frontalvortrag */
  --type-impuls:         #f0ad4e; /* gelb — längerer Vortrag mit Beteiligung */
  --type-walk:           #d9534f; /* rot — Walk & Talk */
  --type-workshop:       #3b7ddd; /* blau — Workshop (kostenpflichtig) */
  --type-gremium:        #6f42c1; /* lila — Gremiensitzung */

  /* Neutrals */
  --body-bg:        #f5f7fb;
  --card-bg:        #ffffff;
  --sidebar-bg:     #222e3c;
  --sidebar-bg-2:   #1c2630;
  --sidebar-brand:  #1a232e;
  --text:           #495057;
  --text-strong:    #3e4676;
  --text-muted:     #adb5bd;
  --heading:        #34374b;
  --border:         #e9ecef;
  --border-strong:  #dee2e6;

  --radius:   .35rem;
  --radius-lg:.5rem;
  --shadow:   0 .2rem .6rem rgba(33,40,50,.06);
  --shadow-lg:0 .5rem 1.5rem rgba(33,40,50,.12);
  --sidebar-w: 258px;
  --topbar-h: 60px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
}
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { height: 100%; }

h1,h2,h3,h4,h5,h6 { color: var(--heading); font-weight: 600; margin: 0; line-height: 1.3; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

::selection { background: rgba(var(--primary-rgb),.18); }

/* scrollbars */
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #c7ced6; border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: #aab3bd; }
*::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   App layout
   ============================================================ */
.app { display: flex; min-height: 100%; }
/* Sidebar eingeklappt */
.app.sidebar-collapsed .sidebar { width: 0; min-width: 0; overflow: hidden; border: none; }
#sidebar-toggle { margin-right: .25rem; }

/* Dark Mode */
body.dark {
  --body-bg: #161b22; --card-bg: #1c232c; --border: #2d343d; --border-strong: #3a424d;
  --text: #c2cad3; --text-strong: #e6edf3; --heading: #e6edf3; --text-muted: #8b949e;
  --primary-soft: #1d2b44;
}
body.dark .topbar { background: #1c232c; border-color: #2d343d; }
body.dark table.tbl th, body.dark table.tbl td { border-color: #2d343d; }
body.dark table.tbl tbody tr:hover { background: #232b35; }
body.dark .form-control, body.dark .form-select, body.dark textarea.form-control { background: #161b22; color: #e6edf3; border-color: #3a424d; }
body.dark .stat, body.dark .modal, body.dark .dropdown-menu { background: #1c232c; }
body.dark .badge-muted { background: #2d343d; color: #c2cad3; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.content { flex: 1; padding: 1.6rem 1.9rem 2.5rem; max-width: 1480px; width: 100%; margin: 0 auto; }
.content--wide { max-width: none; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: rgba(233,237,244,.5);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: .65rem;
  padding: 0 1.4rem;
  background: var(--sidebar-brand);
  color: #fff; font-weight: 600; font-size: 1.15rem;
  letter-spacing: .2px;
  flex: 0 0 auto;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #5e9bff);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: .95rem;
  box-shadow: 0 3px 8px rgba(var(--primary-rgb),.45);
}
.brand-logo { display: block; flex: 0 0 auto; border-radius: 7px; }
.brand-sub { font-size: .62rem; font-weight: 500; color: rgba(255,255,255,.45); letter-spacing: .4px; text-transform: uppercase; margin-top: 1px; }

.sidebar-nav { padding: .6rem 0 1.5rem; flex: 1; }
.nav-section { color: rgba(233,237,244,.32); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; padding: 1.1rem 1.5rem .4rem; }
.nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .58rem 1.5rem; cursor: pointer;
  color: rgba(233,237,244,.5); font-weight: 400;
  border-left: 3px solid transparent;
  transition: color .12s, background .12s;
  font-size: .9rem;
}
.nav-item .icon svg { width: 18px; height: 18px; }
.nav-item:hover { color: #e9edf4; }
.nav-item.active {
  color: #fff; font-weight: 500;
  background: linear-gradient(90deg, rgba(var(--primary-rgb),.18), transparent);
  border-left-color: var(--primary);
}
.nav-item .nav-badge {
  margin-left: auto; font-size: .68rem; font-weight: 600;
  background: var(--primary); color: #fff;
  border-radius: 10px; padding: 1px 7px; line-height: 1.4;
}
.nav-item.active .nav-badge { background: #fff; color: var(--primary); }

.sidebar-foot { padding: 1rem 1.5rem 1.4rem; border-top: 1px solid rgba(255,255,255,.06); font-size: .76rem; color: rgba(233,237,244,.4); }

/* sidebar event switcher (P20) */
.sidebar-event { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .7rem 1.4rem; background: rgba(0,0,0,.18); border: none; border-bottom: 1px solid rgba(255,255,255,.06); cursor: pointer; text-align: left; font: inherit; transition: background .12s; }
.sidebar-event:hover { background: rgba(0,0,0,.3); }
.sidebar-event .icon { color: rgba(233,237,244,.45); margin-left: auto; flex: 0 0 auto; }
.sidebar-event-dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.sidebar-event-meta { display: flex; flex-direction: column; min-width: 0; }
.sidebar-event-meta .ev-name { color: #fff; font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sidebar-event-meta .ev-role { color: rgba(233,237,244,.5); font-size: .72rem; }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.6rem;
  position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 1.05rem; font-weight: 600; color: var(--heading); }
.topbar-spacer { flex: 1; }
.topbar-search {
  display: flex; align-items: center; gap: .5rem;
  background: var(--body-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .42rem .75rem; min-width: 260px;
  color: var(--text-muted);
}
.topbar-search input { border: none; background: transparent; outline: none; font: inherit; color: var(--text); width: 100%; }
.topbar-icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: var(--radius);
  display: grid; place-items: center; cursor: pointer; color: #6c757d;
  background: transparent; border: none;
}
.topbar-icon-btn:hover { background: var(--body-bg); }
.topbar-icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }

/* role / user chip */
.user-chip { display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .25rem .35rem; border-radius: var(--radius); }
.user-chip:hover { background: var(--body-bg); }
.user-meta { line-height: 1.15; text-align: right; }
.user-meta .nm { font-weight: 600; color: var(--heading); font-size: .85rem; }
.user-meta .rl { font-size: .72rem; color: var(--text-muted); }

.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; font-size: .85rem; flex: 0 0 auto; }
.avatar--sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }

/* ============================================================
   Page header
   ============================================================ */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.45rem; font-weight: 600; }
.page-head .sub { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }
.page-head .actions { display: flex; gap: .65rem; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
.page-head .actions .btn { white-space: nowrap; }
.breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: .35rem; display: flex; gap: .4rem; align-items: center; }
.breadcrumb .sep { opacity: .5; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.card-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.card-head h2, .card-head h3 { font-size: 1rem; font-weight: 600; }
.card-head .sub { font-size: .8rem; color: var(--text-muted); }
.card-head .spacer { flex: 1; }
.card-body { padding: 1.25rem; }
.card-body--tight { padding: 0; }
.card-foot { padding: .9rem 1.25rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: .65rem; }

/* stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 1.5rem; margin-bottom: .25rem; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .15rem; }
.stat .label { font-size: .78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }
.stat .value { font-size: 1.8rem; font-weight: 600; color: var(--heading); line-height: 1.1; }
.stat .meta { font-size: .8rem; color: var(--text-muted); margin-top: .35rem; display: flex; align-items: center; gap: .3rem; }
.stat .stat-icon { position: absolute; }
.stat-head { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.trend-up { color: var(--success); } .trend-down { color: var(--danger); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 500; font-size: .85rem;
  padding: .5rem .95rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
  line-height: 1.3;
}
.btn .icon svg { width: 16px; height: 16px; }
.btn svg, .btn i[data-feather] { width: 15px; height: 15px; flex: 0 0 auto; }
.btn-sm svg, .btn-sm i[data-feather] { width: 14px; height: 14px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color:#fff; }
.btn-light { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-light:hover { background: var(--body-bg); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: #dde9fa; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.95); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--body-bg); }
.btn-outline-danger { background:#fff; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color:#fff; }
.btn-sm { padding: .32rem .65rem; font-size: .78rem; }
.btn-lg { padding: .65rem 1.3rem; font-size: .95rem; }
.btn-icon { padding: .45rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ============================================================
   Badges & pills
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 600; padding: .25rem .55rem;
  border-radius: 5px; line-height: 1.3; white-space: nowrap;
}
.badge-dot::before { content:""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge-success { background: var(--success-soft); color: #2e8b50; }
.badge-warning { background: var(--warning-soft); color: #b9802a; }
.badge-danger  { background: var(--danger-soft);  color: #b33f3b; }
.badge-info    { background: var(--info-soft);    color: #1576a0; }
.badge-muted   { background: #eef1f4; color: #6c757d; }
.badge-purple  { background: #efe9fa; color: #6f42c1; }

/* presentation type chips */
.type-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; font-weight: 600; padding: .22rem .6rem; border-radius: 5px; }
.type-chip::before { content:""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.type-vortrag  { --c: var(--type-vortrag);  background: var(--success-soft); color:#2e8b50; }
.type-impuls   { --c: var(--type-impuls);   background: var(--warning-soft); color:#b9802a; }
.type-walk     { --c: var(--type-walk);     background: var(--danger-soft);  color:#b33f3b; }
.type-workshop { --c: var(--type-workshop); background: var(--primary-soft); color: var(--primary-dark); }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.tbl th { text-align: left; font-weight: 600; color: var(--text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; padding: .7rem 1rem; border-bottom: 1px solid var(--border); background: #fff; white-space: nowrap; }
table.tbl td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
table.tbl tbody tr { transition: background .1s; }
table.tbl tbody tr:hover { background: #fafbfd; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .row-click { cursor: pointer; }
.tbl .muted { color: var(--text-muted); }
.tbl .strong { color: var(--heading); font-weight: 600; }
.tbl-id { font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; color: var(--text-strong); font-weight: 600; }

/* ============================================================
   Forms
   ============================================================ */
.form-label { display: block; font-weight: 600; font-size: .82rem; color: var(--heading); margin-bottom: .4rem; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .35rem; }
.form-control, .form-select, textarea.form-control {
  width: 100%; font: inherit; font-size: .88rem; color: var(--text);
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: .55rem .75rem; transition: border-color .12s, box-shadow .12s;
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.13);
}
textarea.form-control { resize: vertical; min-height: 96px; line-height: 1.55; }
.form-control::placeholder { color: #b6bdc6; }
.form-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.1rem; margin-bottom: 1.15rem; }
.form-group { margin-bottom: 1.15rem; }
.form-group:last-child { margin-bottom: 0; }
.input-count { font-size: .76rem; color: var(--text-muted); text-align: right; margin-top: .3rem; }
.input-count.over { color: var(--danger); }

/* checkbox / radio */
.check { display: flex; align-items: flex-start; gap: .6rem; padding: .15rem 0; cursor: pointer; font-size: .86rem; }
.check input { margin-top: .15rem; width: 16px; height: 16px; accent-color: var(--primary); flex: 0 0 auto; cursor: pointer; }
.check.box { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .8rem .9rem; transition: border-color .12s, background .12s; }
.check.box:hover { border-color: #c4ccd6; }
.check.box.checked { border-color: var(--primary); background: var(--primary-soft); }

/* segmented / choice cards */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; }
.choice {
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem; cursor: pointer; background: #fff;
  transition: border-color .12s, box-shadow .12s, transform .08s;
  display: flex; flex-direction: column; gap: .5rem; position: relative;
}
.choice:hover { border-color: #b9c3cf; }
.choice.sel { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12); }
.choice .choice-ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; }
.choice .choice-t { font-weight: 600; color: var(--heading); }
.choice .choice-d { font-size: .8rem; color: var(--text-muted); }
.choice .choice-check { position: absolute; top: .8rem; right: .8rem; color: var(--primary); opacity: 0; transition: opacity .12s; }
.choice.sel .choice-check { opacity: 1; }

/* keyword tags */
.tag-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  font-size: .8rem; font-weight: 500; padding: .35rem .7rem; border-radius: 20px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text); cursor: pointer;
  transition: all .12s; user-select: none;
}
.tag:hover { border-color: var(--primary); color: var(--primary); }
.tag.sel { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============================================================
   Stepper
   ============================================================ */
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 1.8rem; }
.step { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }
.step .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .82rem; background: #fff; border: 2px solid var(--border-strong); color: var(--text-muted); flex: 0 0 auto; transition: all .15s; }
.step.active .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.step .step-label { font-size: .84rem; font-weight: 500; color: var(--text-muted); }
.step.active .step-label, .step.done .step-label { color: var(--heading); }
.step-line { flex: 1; height: 2px; background: var(--border-strong); margin: 0 .85rem; min-width: 20px; }
.step-line.done { background: var(--success); }

/* ============================================================
   Misc utilities
   ============================================================ */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1{gap:.35rem}.gap-2{gap:.6rem}.gap-3{gap:1rem}.gap-4{gap:1.5rem}
.wrap{flex-wrap:wrap}.col{flex-direction:column}.flex-1{flex:1}
.grid{display:grid}
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}
.text-muted{color:var(--text-muted)}.text-strong{color:var(--heading)}.text-primary{color:var(--primary)}
.text-success{color:#2e8b50}.text-danger{color:var(--danger)}.text-warning{color:#b9802a}
.fw-600{font-weight:600}.fw-500{font-weight:500}
.fs-sm{font-size:.8rem}.fs-xs{font-size:.74rem}.fs-lg{font-size:1.05rem}
.center{text-align:center}.right{text-align:right}
.divider{height:1px;background:var(--border);margin:1.25rem 0;border:none}
.hr-v{width:1px;background:var(--border);align-self:stretch}
.pill-count{font-size:.72rem;font-weight:600;background:#eef1f4;color:#6c757d;border-radius:20px;padding:1px 8px}
.dot-status{width:9px;height:9px;border-radius:50%;display:inline-block;flex:0 0 auto}
.icon{display:inline-flex;align-items:center;justify-content:center;line-height:0;color:inherit}
.icon svg{stroke-width:2;}
.clickable{cursor:pointer}
.nowrap{white-space:nowrap}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* progress bar */
.progress { height: 8px; background: var(--border); border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 6px; transition: width .3s; }

/* alert / callout */
.alert { display: flex; gap: .7rem; padding: .85rem 1rem; border-radius: var(--radius); font-size: .85rem; align-items: flex-start; margin-bottom: 1.25rem; }
.alert .icon { flex: 0 0 auto; margin-top: 1px; }
.alert-info { background: var(--info-soft); color: #1576a0; }
.alert-success { background: var(--success-soft); color: #2e8b50; }
.alert-warning { background: var(--warning-soft); color: #97681f; }
.alert-danger { background: var(--danger-soft); color: #b33f3b; }
.alert-primary { background: var(--primary-soft); color: var(--primary-dark); }

/* empty state */
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty .icon { color: #c7ced6; margin-bottom: .8rem; }
.empty h3 { color: var(--text); margin-bottom: .35rem; }

/* ============================================================
   Modal
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(33,40,50,.45);
  display: grid; place-items: center; z-index: 200; padding: 2rem;
  animation: fade .15s ease;
}
.modal {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px; max-height: 90vh; display: flex; flex-direction: column;
  animation: pop .16s ease;
}
.modal.lg { max-width: 720px; }
.modal-head { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.modal-head h3 { font-size: 1.05rem; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--text-muted); border: none; background: none; padding: 4px; border-radius: 6px; display:grid;place-items:center; }
.modal-head .x:hover { background: var(--body-bg); color: var(--text); }
.modal-body { padding: 1.4rem; overflow-y: auto; }
.modal-foot { padding: 1rem 1.4rem; border-top: 1px solid var(--border); display: flex; gap: .65rem; justify-content: flex-end; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes slidein { from { opacity:0; transform: translateY(6px); } }

/* toast */
.toast-wrap { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300; display: flex; flex-direction: column; gap: .6rem; }
.toast { background: #2a3441; color: #fff; border-radius: var(--radius); padding: .8rem 1.1rem; box-shadow: var(--shadow-lg); display: flex; gap: .6rem; align-items: center; font-size: .86rem; min-width: 260px; animation: slidein .2s ease; }
.toast .icon { color: var(--success); }
.toast.toast-danger { background: var(--danger); color: #fff; }
.toast.toast-danger .icon { color: #fff; }

/* segmented control */
/* ============================================================
   Event picker (Extranet) [P20]
   ============================================================ */
.evp { min-height: 100vh; background: var(--body-bg); }
.evp-top { background: var(--sidebar-bg); }
.evp-top-inner { max-width: 1120px; margin: 0 auto; padding: .9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.evp-body { max-width: 1120px; margin: 0 auto; padding: 2.6rem 1.5rem 3rem; }
.evp-kicker { color: var(--primary); font-weight: 700; font-size: .82rem; letter-spacing: 2px; }
.evp-h1 { font-size: 2rem; margin: .35rem 0 .6rem; letter-spacing: -.4px; }
.evp-lead { color: var(--text-muted); font-size: 1rem; max-width: 620px; line-height: 1.6; margin-bottom: 2.2rem; }
.evp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.5rem; }
.evp-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: box-shadow .15s, transform .12s; display: flex; flex-direction: column; }
.evp-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.evp-card-head { padding: 1.1rem 1.3rem 1.2rem; color: #fff; }
.evp-role { font-size: .72rem; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255,255,255,.9); }
.evp-notif { background: rgba(255,255,255,.95); color: var(--heading); border-radius: 20px; font-size: .72rem; font-weight: 600; padding: 2px 8px; display: inline-flex; align-items: center; gap: 3px; }
.evp-date { margin-top: 2.4rem; font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.92); }
.evp-card-body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; position: relative; }
.evp-card-body h3 { font-size: 1.18rem; letter-spacing: -.2px; }
.evp-sub { color: var(--text-muted); font-size: .9rem; margin: .3rem 0 1rem; line-height: 1.45; }
.evp-meta { display: flex; flex-direction: column; gap: .35rem; font-size: .86rem; color: var(--text); margin-bottom: 1.1rem; }
.evp-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.evp-meta .icon { color: var(--text-muted); }
.evp-card-foot { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.evp-open { font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 2px; }
.evp-planning { position: absolute; top: -10px; right: 1.3rem; background: var(--warning-soft); color: #97681f; font-size: .7rem; font-weight: 600; padding: 2px 9px; border-radius: 12px; }
.evp-public { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.3rem; box-shadow: var(--shadow); }

.seg { display: inline-flex; background: var(--body-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; gap: 2px; }
.seg button, .seg a { border: none; background: transparent; font: inherit; font-size: .82rem; font-weight: 500; color: var(--text-muted); padding: .35rem .8rem; border-radius: calc(var(--radius) - 2px); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.seg button.active, .seg a.active { background: #fff; color: var(--heading); box-shadow: var(--shadow); }or: pointer; }
.seg button.active { background: #fff; color: var(--heading); box-shadow: var(--shadow); }

/* avatar group */
.avatar-group { display: flex; }
.avatar-group .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatar-group .avatar:first-child { margin-left: 0; }

/* filter bar */
.filterbar { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filterbar .form-select, .filterbar .form-control { width: auto; min-width: 150px; }
.search-inline { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .42rem .7rem; color: var(--text-muted); min-width: 230px; }
.search-inline input { border: none; outline: none; font: inherit; background: transparent; color: var(--text); width: 100%; }

/* detail grid (abstract detail) */
.detail-grid { border-top: 1px solid var(--border); }

/* toggle switch (mailing preview) */
.switch-wrap { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; user-select: none; }
.switch { width: 38px; height: 21px; border-radius: 12px; background: var(--border-strong); position: relative; transition: background .15s; flex: 0 0 auto; }
.switch.on { background: var(--primary); }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch.on .knob { left: 19px; }
.switch.on-danger { background: var(--danger); }
.switch.on-danger .knob { left: 19px; }
button.switch { border: none; cursor: pointer; padding: 0; }

/* ============================================================
   Printed program (Wissenschaftliches Programm)
   ============================================================ */
.program-sheet {
  max-width: 820px; margin: 0 auto 2rem; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 3rem 3.2rem;
}
.program-cover { text-align: center; padding-bottom: 1.6rem; border-bottom: 3px solid var(--heading); margin-bottom: 2rem; }
.program-cover .kicker { font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--primary); font-weight: 600; }
.program-cover h1 { font-size: 2rem; margin: .5rem 0 .35rem; letter-spacing: -.3px; }
.program-cover .meta { color: var(--text-muted); font-size: .95rem; }
.program-cover .doc-title { margin-top: 1.1rem; font-size: 1.05rem; font-weight: 600; color: var(--heading); }

.program-day { margin-bottom: 2.2rem; }
.program-day-head { display: flex; align-items: baseline; gap: .6rem; border-bottom: 1.5px solid var(--border-strong); padding-bottom: .4rem; margin-bottom: 1.1rem; }
.program-day-head h2 { font-size: 1.3rem; }
.program-day-head .date { color: var(--text-muted); font-size: .95rem; }

.program-session { display: grid; grid-template-columns: 92px 1fr; gap: 1.1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); break-inside: avoid; }
.program-session:last-child { border-bottom: none; }
.program-time { font-weight: 700; color: var(--heading); font-size: .92rem; font-variant-numeric: tabular-nums; }
.program-time .room { display: block; font-weight: 400; font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }
.program-sess-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.program-sess-head .sid { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .76rem; color: var(--text-muted); font-weight: 600; }
.program-bar { width: 4px; align-self: stretch; border-radius: 3px; }
.program-item { margin-top: .7rem; }
.program-item:first-of-type { margin-top: 0; }
.program-item .it-title { font-weight: 600; color: var(--heading); font-size: 1rem; line-height: 1.35; }
.program-item .it-authors { font-size: .86rem; color: var(--text); margin-top: .2rem; }
.program-item .it-authors .lead { font-weight: 600; }
.program-item .it-named { font-size: .8rem; color: var(--text-muted); font-style: italic; margin-top: .15rem; }
.program-item .it-text { font-size: .85rem; color: var(--text); line-height: 1.55; margin-top: .35rem; }
.program-foot { text-align: center; color: var(--text-muted); font-size: .8rem; border-top: 1px solid var(--border); padding-top: 1.2rem; margin-top: 1rem; }

@media print {
  .sidebar, .topbar, .no-print, .toast-wrap { display: none !important; }
  .content { padding: 0 !important; max-width: none !important; }
  body, .app, .main, .content { background: #fff !important; }
  .program-sheet { box-shadow: none !important; border: none !important; margin: 0 auto !important; padding: 0 !important; max-width: none !important; }
  .program-session { break-inside: avoid; }
  .program-day-head, .program-cover { break-after: avoid; }
}
@page { margin: 16mm; }

/* ============================================================
   Public calendar — responsive / mobile
   ============================================================ */
@media (max-width: 760px) {
  .pub-container { padding-left: 1rem !important; padding-right: 1rem !important; }
  .pub-head .search-inline { min-width: 0; flex: 1; }
  .modal-backdrop { padding: .8rem; }
  .modal, .modal.lg { max-width: 100% !important; }
  .pub-list-card .card-body { flex-wrap: wrap; }
  .pub-list-card .pub-list-time { width: auto !important; text-align: left; }
  .pub-list-card .hr-v { display: none; }
  .pub-list-card .type-chip { order: 5; }
}

/* ============================================================
   PHP-Version: Login, Blank-Layout, Dropdowns, Tabs (server)
   ============================================================ */
.blank-wrap { min-height: 100vh; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background: linear-gradient(135deg, #222e3c, #2a3b50); }
.auth-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2.2rem 2.4rem; width: 100%; max-width: 420px; }
.auth-card .brand-mark { width: 46px; height: 46px; font-size: 1.25rem; }
.auth-card h1 { font-size: 1.3rem; }

/* Dropdowns (Topbar) – per app.js getoggelt */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 100; display: none; overflow: hidden; }
.dropdown.open .dropdown-menu { display: block; }

/* Server-Tabs (Links) */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.1rem; }
.tabs a { border: none; background: none; font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; padding: .55rem .85rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; display: flex; align-items: center; gap: .4rem; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* einfache Modals als <dialog>-Ersatz via Detail-Seiten – hier: Inline-Panels */
.panel { background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); }

/* Login-Demo-Hinweis */
.login-hint { background: var(--body-bg); border-radius: var(--radius); padding: .7rem .85rem; font-size: .8rem; color: var(--text-muted); margin-top: 1rem; }
.login-hint code { background:#fff; border:1px solid var(--border); border-radius:4px; padding:1px 5px; color: var(--heading); }
.step-badge { width:26px;height:26px;border-radius:50%;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:600;font-size:.82rem;flex:0 0 auto; }
.choice input:checked ~ .choice-t { color: var(--primary); }
.choice.sel { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12); }

/* --- Co-Referent Autocomplete --- */
.ac-list { position:absolute; z-index:40; top:calc(100% + 4px); left:0; right:0; background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 8px 24px rgba(0,0,0,.10); max-height:260px; overflow-y:auto; }
.ac-item { display:flex; flex-direction:column; gap:1px; padding:.55rem .8rem; cursor:pointer; border-bottom:1px solid var(--border); }
.ac-item:last-child { border-bottom:0; }
.ac-item:hover, .ac-item.active { background:var(--body-bg); }
.ac-item .ac-name { font-size:.88rem; color:var(--heading); font-weight:500; }
.ac-item .ac-inst { font-size:.76rem; color:var(--text); opacity:.75; }
.ac-item .ac-mail { font-size:.75rem; color:var(--text-muted); }
.ac-empty { padding:.7rem .8rem; font-size:.82rem; color:var(--text-muted); }

/* --- Räume: Drag&Drop-Sortierung --- */
#rooms-table tr.dragging { opacity: .4; }
#rooms-table .drag-handle:active { cursor: grabbing; }

/* ============================================================
   Abstract-Zusammenfassung (Buch)
   ============================================================ */
.abstract-toc { margin-bottom: 2.5rem; }
.abstract-toc h2 { font-size: 1.3rem; border-bottom: 1.5px solid var(--border-strong); padding-bottom: .4rem; margin-bottom: 1rem; }
.abstract-toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; }
.abstract-toc li { counter-increment: toc; border-bottom: 1px dotted var(--border); }
.abstract-toc a { display: flex; align-items: baseline; gap: .75rem; padding: .5rem .25rem; color: var(--heading); text-decoration: none; }
.abstract-toc a:hover { background: var(--body-bg); }
.abstract-toc .toc-code { flex: 0 0 auto; font-weight: 700; color: var(--primary); font-size: .82rem; min-width: 72px; }
.abstract-toc .toc-title { flex: 1; }
.abstract-toc .toc-kind { flex: 0 0 auto; font-size: .78rem; font-weight: 600; }

.abstract-entry { padding: 1.4rem 0 1.8rem; border-top: 3px solid var(--heading); margin-top: 2rem; }
.abstract-entry:first-of-type { margin-top: 0; }
.abstract-entry .ae-code { font-weight: 700; letter-spacing: .5px; color: var(--primary); font-size: .85rem; margin-bottom: .5rem; }
.abstract-entry .ae-title { font-size: 1.4rem; line-height: 1.25; margin: 0 0 .8rem; color: var(--heading); }
.abstract-entry .ae-authors { font-size: 1rem; }
.abstract-entry .ae-lead { font-style: italic; font-weight: 600; color: var(--heading); }
.abstract-entry .ae-co { font-style: italic; color: var(--text-muted); }
.abstract-entry .ae-inst { font-size: .88rem; color: var(--text-muted); margin: .15rem 0 1rem; }
.abstract-entry .ae-meta { display: grid; gap: .3rem; background: var(--body-bg); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1.1rem; font-size: .92rem; }
.abstract-entry .ae-lbl { font-weight: 700; color: var(--heading); }
.abstract-entry .ae-abstract p { margin: .35rem 0 0; line-height: 1.6; text-align: justify; }

@media print {
  .abstract-entry { break-before: page; break-inside: auto; border-top: 2px solid var(--heading); }
  .abstract-entry:first-of-type { break-before: avoid; }
  .abstract-toc { break-after: page; }
  .abstract-toc a { color: #000 !important; }
}

/* ============================================================
   Mobil-Optimierung (Referent, Bewerter, App-Oberfläche)
   ============================================================ */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 199; }
body.sidebar-lock { overflow: hidden; }

@media (max-width: 860px) {
  /* --- App-Grundlayout --- */
  .content { padding: 1rem 1rem 2rem; }
  .topbar { position: sticky; top: 0; z-index: 60; }
  .topbar-title { font-size: .98rem; }
  .topbar-search { display: none; }           /* Suche auf kleinen Screens ausblenden (Platz) */

  /* --- Sidebar als Off-Canvas --- */
  .app .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; z-index: 200;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.3);
  }
  .app.sidebar-mobile-open .sidebar { transform: translateX(0); }
  .app.sidebar-mobile-open .sidebar-backdrop { display: block; }
  /* Desktop-Collapse-Logik auf Mobil neutralisieren */
  .app.sidebar-collapsed .sidebar { width: var(--sidebar-w); min-width: var(--sidebar-w); }
  #sidebar-toggle { display: inline-flex; }

  /* --- Tabellen: horizontal scrollbar statt gequetscht --- */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.tbl { min-width: 560px; }
  table.tbl th, table.tbl td { padding: .6rem .7rem; }
  /* Aktionen-Spalte nicht umbrechen */
  table.tbl td.nowrap, table.tbl td.right { white-space: nowrap; }

  /* --- Modals: fast Vollbild --- */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal, .modal.lg { max-width: 100% !important; width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92vh; }
  .modal-body { max-height: none; }

  /* --- Formulare: einspaltig --- */
  .form-row { grid-template-columns: 1fr !important; }
  .grid { grid-template-columns: 1fr !important; }
  .stat-grid { grid-template-columns: 1fr 1fr !important; gap: .8rem !important; }

  /* --- page_head: Titel und Aktionen untereinander --- */
  .page-head { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .page-head .actions { width: 100%; flex-wrap: wrap; }
  .page-head .actions .btn { flex: 1 1 auto; justify-content: center; }

  /* --- Buttons etwas größer für Touch --- */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .btn-block { width: 100%; }

  /* --- Karten kompakter --- */
  .card-body { padding: 1rem; }
  .card-head { padding: .8rem 1rem; }

  /* --- Bewerter: Punkte-Regler gut bedienbar --- */
  input[type="range"][data-score-range] { height: 30px; }

  /* --- Einreichungs-Stepper: Labels ausblenden, Punkte behalten --- */
  .stepper { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .3rem; }
  .stepper .step-label { display: none; }
  .stepper .step-line { min-width: 16px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr !important; }
  .content { padding: .8rem .8rem 2rem; }
  .topbar-title { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Bewertungsformular – Gruppierung nach Aspekten */
.score-group { border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; }
.score-group-title { font-weight: 600; color: var(--heading); font-size: .95rem; margin-bottom: .7rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }

/* Öffentlicher Planer – kompakter Kopf am Smartphone */
.pub-filter-toggle { display: none; }
@media (max-width: 860px) {
  .pub-filter-toggle { display: inline-flex; }
  /* Optionen am Smartphone standardmäßig ausgeblendet, per Toggle einblendbar */
  .pub-options { display: none; }
  .pub-options.pub-options-open { display: block; }
  /* Tageswahl kompakter und horizontal scrollbar */
  .pub-days { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pub-days .seg { flex-wrap: nowrap; }
}
