
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --bg-void: #17141D;
  --bg-surface: #211C29;
  --bg-surface-2: #2A2333;
  --line: #3A3244;
  --text-hi: #F6F0EC;
  --text-mid: #B6A8C2;
  --text-low: #776985;
  --topbar-bg: #17141Dee;
  --page-bg: #0E0C12;
  --gradient-a: #3A2A4A55;
  --gradient-b: #4A344A44;
  --shadow-ambient: #00000088;
}
[data-theme="light"] {
  --bg-void: #FBF8F9;
  --bg-surface: #FFFFFF;
  --bg-surface-2: #F3ECF3;
  --line: #E4D9E4;
  --text-hi: #241B2E;
  --text-mid: #6B5E75;
  --text-low: #948AA0;
  --topbar-bg: #FBF8F9ee;
  --page-bg: #EAE2E8;
  --gradient-a: #8C3FA61c;
  --gradient-b: #E7B19922;
  --shadow-ambient: #00000022;
}

* { box-sizing: border-box; }
html, body { background: var(--page-bg); }
.app {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse 700px 400px at 85% 0%, var(--gradient-a), transparent),
    radial-gradient(ellipse 600px 400px at 10% 5%, var(--gradient-b), transparent),
    var(--bg-void);
  color: var(--text-hi);
  font-family: 'Inter', sans-serif;
  padding-bottom: 100px;
  position: relative;
  box-shadow: 0 0 60px var(--shadow-ambient);
  transition: background-color .2s ease, color .2s ease;
}

.hero-banner {
  display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover;
}

.tour-counter-bar { display: flex; gap: 8px; padding: 12px 16px 0; }
.counter-pill {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 6px; cursor: pointer;
}
.counter-pill.is-static { cursor: default; }

.today-info-card {
  display: block; width: calc(100% - 32px); margin: 10px 16px 0; text-align: left; cursor: pointer;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.today-info-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 9px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8C3FA6;
}
.today-info-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.today-info-row:first-of-type { margin-top: 0; }
.today-info-row svg { color: var(--text-low); flex-shrink: 0; margin-top: 2px; }
.today-info-text { display: flex; flex-direction: column; gap: 1px; }
.today-info-label { font-size: 10px; color: var(--text-low); text-transform: uppercase; letter-spacing: .03em; }
.today-info-value { font-size: 12.5px; color: var(--text-hi); line-height: 1.35; }
.counter-num { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; color: #8C3FA6; }
.counter-total { font-size: 12px; color: var(--text-low); font-weight: 500; }
.counter-label { font-size: 10.5px; color: var(--text-low); text-transform: uppercase; letter-spacing: .03em; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--topbar-bg); backdrop-filter: blur(8px);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: #8C3FA6; color: var(--bg-void);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-mark.lg { width: 40px; height: 40px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 0.04em; }
.brand-name.lg { font-size: 26px; }
.brand-name.sm { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: 0.05em; color: #8C3FA6; }
.brand-name-sub { font-size: 12px; font-weight: 500; color: var(--text-low); letter-spacing: 0.03em; }
.brand-sub { font-size: 11px; color: var(--text-low); }
.brand-sub.center { display: block; text-align: center; margin: -6px 0 4px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.new-btn {
  display: flex; align-items: center; gap: 6px;
  background: #8C3FA6; color: var(--bg-void); border: none;
  padding: 9px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px;
  cursor: pointer; transition: transform .12s ease, filter .12s ease;
}
.new-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.new-btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text-hi); margin-top: 10px; }

.fab {
  position: fixed; right: max(16px, calc((100vw - 480px) / 2 + 16px));
  bottom: 22px; width: 54px; height: 54px; border-radius: 50%;
  background: #8C3FA6; color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px #8C3FA666; cursor: pointer; z-index: 25;
}
.fab:active { transform: scale(0.94); }

.icon-btn {
  background: var(--bg-surface); border: 1px solid var(--line); color: var(--text-hi);
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.bell-wrap { position: relative; }
.bell-badge {
  position: absolute; top: -5px; right: -5px;
  background: #D9694F; color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.bell-panel {
  position: absolute; right: 0; top: 42px; width: 300px;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; z-index: 30; box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.bell-panel-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-low); padding: 8px 10px 4px; }
.bell-empty { padding: 12px 10px; color: var(--text-low); font-size: 13px; }
.bell-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.bell-row:hover { background: var(--bg-surface-2); }
.bell-row-text { display: flex; flex-direction: column; font-size: 13px; gap: 2px; }
.bell-row-sub { font-size: 11px; color: var(--text-low); }

.user-chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-surface); border: 1px solid var(--line); color: var(--text-hi);
  border-radius: 20px; padding: 5px 10px 5px 5px; cursor: pointer; font-size: 12.5px;
}
.user-chip:hover { border-color: #D9694F55; color: #D9694F; }
.user-chip-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.route-strip {
  display: flex; gap: 0; overflow-x: auto; padding: 14px 12px 10px;
  position: relative;
}
.route-stop {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: none; color: var(--text-low); cursor: pointer;
  padding: 6px 16px; position: relative; min-width: 84px; flex-shrink: 0;
  animation: fadein .4s ease both;
}
.route-stop::after {
  content: ''; position: absolute; top: 12px; left: 50%; right: -50%;
  height: 1px; background: var(--line); z-index: 0;
}
.route-stop:last-child::after { display: none; }
.route-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); z-index: 1; border: 2px solid var(--bg-void); }
.route-city { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: .02em; color: var(--text-mid); }
.route-date { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-low); }
.route-time { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: #5a4f66; }
.route-stop.is-active .route-dot { background: #8C3FA6; width: 11px; height: 11px; }
.route-stop.is-active .route-city { color: #8C3FA6; }
.route-stop.is-past .route-dot { background: #6FA88C; }
.route-stop.is-off { opacity: .55; }
.route-stop.is-off .route-dot { background: transparent; border: 1.5px dashed var(--text-low); }
.route-stop.is-off.is-active .route-dot { border-color: #8C3FA6; background: transparent; }
.route-stop.is-off.is-active .route-city { color: #8C3FA6; }
.route-add {
  flex-shrink: 0; align-self: center; margin-left: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: transparent; border: 1px dashed var(--line); color: var(--text-low);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.route-add:hover { border-color: #8C3FA6; color: #8C3FA6; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.board { padding: 0 16px 0; margin: 0 auto; }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 0 14px; border-bottom: 1px solid var(--bg-surface-2); margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.board-title { font-family: 'Barlow Condensed', sans-serif; font-size: 34px; font-weight: 700; letter-spacing: .01em; margin: 0; }
.board-sub { font-size: 12.5px; color: var(--text-low); }
.board-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.filter-wrap { display: flex; align-items: center; gap: 8px; color: var(--text-low); font-size: 12.5px; }
.filter-wrap select { background: var(--bg-surface); color: var(--text-hi); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 12.5px; }
.mine-toggle { background: transparent; border: 1px solid var(--line); color: var(--text-mid); border-radius: 7px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.mine-toggle.is-on { border-color: #8C3FA6; color: #8C3FA6; background: #8C3FA618; }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-card {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 12px 12px 10px; transition: opacity .15s ease;
}
.task-card.is-overdue { border-color: #D9694F55; }
.task-card.status-erledigt { opacity: .5; }
.status-pill {
  width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--status-color); background: transparent;
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-top: 2px;
}
.task-card.status-in_arbeit .status-pill { background: var(--status-color); }
.task-card.status-erledigt .status-pill { background: var(--status-color); }
.status-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status-color); }
.task-card.status-in_arbeit .status-pill-dot { background: #fff; }
.badge-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--status-color); color: #fff; border: none;
  border-radius: 6px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
}
.type-badge {
  display: inline-flex; margin: 4px 0 0 6px;
  background: var(--bg-surface-2); color: var(--text-mid);
  border-radius: 5px; padding: 1px 7px; font-size: 10px; font-weight: 500;
}
.task-body { flex: 1; min-width: 0; }
.task-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-title { font-size: 14.5px; font-weight: 500; }
.task-card.status-erledigt .task-title { text-decoration: line-through; }
.prio-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.urgency-badge {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  background: color-mix(in srgb, var(--urgency-color) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--urgency-color) 45%, transparent);
  color: var(--urgency-color); font-size: 11px; font-weight: 700;
  border-radius: 6px; padding: 3px 8px; letter-spacing: .01em;
}
.urgency-badge.is-overdue {
  background: #D9694F26; border-color: #D9694F77; color: #D9694F;
  animation: urgency-pulse 1.8s ease-in-out infinite;
}
@keyframes urgency-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
.task-desc { font-size: 12.5px; color: var(--text-mid); margin: 6px 0 0; white-space: pre-line; }
.card-attach-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.card-attach-item {
  width: 40px; height: 40px; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  background: var(--bg-void); flex-shrink: 0;
}
.card-attach-item img { width: 100%; height: 100%; object-fit: cover; }
.card-attach-pdf { color: var(--text-mid); }
.task-meta { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-low); }
.meta-overdue { color: #D9694F; }
.del-btn { background: none; border: none; color: #3A3D44; cursor: pointer; padding: 2px; flex-shrink: 0; }
.del-btn:hover { color: #D9694F; }
.del-btn.is-confirming {
  background: #D9694F; color: #fff; border-radius: 6px; padding: 4px 8px;
  animation: urgency-pulse 1.2s ease-in-out infinite;
}
.del-confirm-text { font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.task-card.is-unassigned { border-width: 2px; border-color: #8C3FA6; padding: 11px 11px 11px 9px; }
.extern-badge {
  font-size: 9.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: #8C3FA6; background: #8C3FA61c; border: 1px solid #8C3FA655;
  border-radius: 5px; padding: 2px 6px; flex-shrink: 0;
}
.assign-select {
  background: var(--bg-void); border: 1px solid #8C3FA6; color: #8C3FA6; border-radius: 6px;
  padding: 5px 7px; font-size: 11.5px; font-weight: 600; cursor: pointer; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.assign-picker { position: relative; }
.assign-picker-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; min-width: 170px; box-shadow: 0 8px 24px #00000040;
  display: flex; flex-direction: column; gap: 1px;
}
.assign-picker-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px;
  font-size: 13px; color: var(--text-hi); cursor: pointer;
}
.assign-picker-row:hover { background: var(--bg-surface-2); }
.assign-picker-row.is-checked { color: #8C3FA6; font-weight: 600; }
.assign-picker-row input[type="checkbox"] { display: none; }
.assign-picker-check {
  width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff;
}
.assign-picker-row.is-checked .assign-picker-check { background: #8C3FA6; border-color: #8C3FA6; }
.assign-picker-name { white-space: nowrap; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 60px 20px; color: var(--text-low); text-align: center; font-size: 13.5px;
  border: 1px dashed var(--line); border-radius: 12px;
}

.modal-backdrop {
  position: fixed; inset: 0; background: #000000aa; backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
}
.modal {
  background: var(--bg-surface); border: 1px solid var(--line); border-bottom: none;
  border-radius: 18px 18px 0 0;
  width: 100%; max-width: 480px; padding: 10px 18px 22px; display: flex; flex-direction: column; gap: 12px;
  max-height: 88vh; overflow-y: auto;
  animation: sheet-up .22s ease-out;
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.modal::before {
  content: ''; width: 36px; height: 4px; border-radius: 3px; background: var(--line);
  align-self: center; margin-bottom: 2px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: .02em; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-mid); flex: 1; }
.field input, .field textarea, .field select {
  background: var(--bg-void); border: 1px solid var(--line); border-radius: 8px; color: var(--text-hi);
  padding: 9px 10px; font-size: 13.5px; font-family: inherit; resize: none;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: #8C3FA655; }
.field-row { display: flex; gap: 10px; }
.attach-btn {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  background: var(--bg-void); border: 1px dashed var(--line); color: var(--text-mid);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; cursor: pointer;
}
.attach-btn:hover { border-color: #8C3FA6; color: #8C3FA6; }
.attach-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.attach-chip {
  display: flex; align-items: center; gap: 8px; background: var(--bg-void); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 8px;
}
.attach-thumb { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.attach-file-icon { width: 28px; height: 28px; border-radius: 5px; background: var(--bg-surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-mid); flex-shrink: 0; }
.attach-name { flex: 1; font-size: 12px; color: var(--text-mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip button { background: none; border: none; color: #5a4f66; cursor: pointer; padding: 2px; flex-shrink: 0; }
.attach-chip button:hover { color: #D9694F; }
.offday-toggle {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-mid);
  background: var(--bg-surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; cursor: pointer;
}
.offday-toggle input { accent-color: #8C3FA6; width: 15px; height: 15px; }
.broadcast-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  margin-top: 10px; background: #8C3FA61c; border: 1px dashed #8C3FA655; color: #8C3FA6;
  border-radius: 8px; padding: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.broadcast-btn:hover { background: #8C3FA62c; }
.broadcast-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  font-size: 10.5px; color: #6FA88C; font-weight: 600;
}
.priority-picker { display: flex; gap: 6px; }
.prio-chip {
  flex: 1; border: 1px solid var(--line); background: transparent; color: var(--text-mid);
  border-radius: 7px; padding: 8px 4px; font-size: 12px; cursor: pointer;
}
.prio-chip.is-on { border-color: var(--chip-color); color: var(--chip-color); background: color-mix(in srgb, var(--chip-color) 12%, transparent); }

.urgency-list { display: flex; flex-direction: column; gap: 6px; }
.urgency-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--line); background: transparent; border-radius: 8px;
  padding: 9px 10px; cursor: pointer; text-align: left;
}
.urgency-row.is-on { border-color: var(--chip-color); background: color-mix(in srgb, var(--chip-color) 10%, transparent); }
.urgency-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--chip-color); flex-shrink: 0; }
.urgency-row.is-on .urgency-dot { background: var(--chip-color); }
.urgency-text { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.urgency-label { font-size: 13.5px; font-weight: 600; color: var(--text-hi); }
.urgency-row.is-on .urgency-label { color: var(--chip-color); }
.urgency-sub { font-size: 11.5px; color: var(--text-low); }
.urgency-date {
  margin-top: 8px; width: 100%; background: var(--bg-void); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text-hi); padding: 9px 10px; font-size: 13.5px; font-family: inherit;
}
.meta-contact {
  color: #8C3FA6; text-decoration: none; background: #8C3FA61c; border: 1px solid #8C3FA644;
  border-radius: 6px; padding: 3px 8px 3px 6px; font-weight: 600;
}
.meta-contact:active { background: #8C3FA633; }

.submit-btn {
  background: #8C3FA6; color: var(--bg-void); border: none; border-radius: 8px;
  padding: 11px; font-weight: 600; font-size: 14px; cursor: pointer; margin-top: 4px;
}
.submit-btn:hover { filter: brightness(1.08); }
.submit-btn:disabled { opacity: .4; cursor: not-allowed; }

.footnote { text-align: center; color: #3A3D44; font-size: 11px; margin-top: 30px; padding: 0 20px; }

/* Hamburger menu */
.menu-btn { background: transparent; border: none; }
.menu-backdrop {
  position: fixed; inset: 0; background: #000000aa; backdrop-filter: blur(2px); z-index: 60;
  display: flex; animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.menu-drawer {
  width: 82%; max-width: 320px; background: var(--bg-surface); height: 100%;
  border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 4px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  animation: slide-in .22s ease;
}
@keyframes slide-in { from { transform: translateX(-30px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
.menu-user { display: flex; align-items: center; gap: 10px; padding: 6px 6px 16px; border-bottom: 1px solid var(--bg-surface-2); margin-bottom: 10px; }
.menu-user-name { font-size: 15px; font-weight: 600; color: var(--text-hi); }
.menu-user-role { font-size: 12px; color: var(--text-low); }
.menu-user .icon-btn { margin-left: auto; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: transparent; border: none; color: var(--text-hi); font-size: 15px;
  padding: 13px 12px; border-radius: 10px; cursor: pointer; text-align: left;
}
.menu-item:hover { background: var(--bg-surface-2); }
.menu-item.is-active { background: #8C3FA61c; color: #8C3FA6; }
.menu-item.is-logout { color: #D9694F; }
.menu-count { margin-left: auto; background: #8C3FA6; color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.menu-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #D9694F; }
.menu-spacer { flex: 1; }

/* Generic page */
.page { padding: 18px 16px 40px; }
.page-title { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; font-weight: 700; margin: 0; }
.page-sub { font-size: 12.5px; color: var(--text-low); margin: 2px 0 20px; }
.page-form { display: flex; flex-direction: column; gap: 14px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.tl-row {
  display: flex; gap: 12px; background: transparent; border: none; cursor: pointer;
  text-align: left; padding: 0; color: var(--text-hi); position: relative;
}
.tl-date { width: 42px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.tl-day { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 20px; line-height: 1; }
.tl-month { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-low); text-transform: uppercase; }
.tl-weekday { font-size: 9px; color: #5a4f66; text-transform: uppercase; margin-top: 1px; }
.tl-line { width: 16px; flex-shrink: 0; display: flex; justify-content: center; position: relative; }
.tl-line::before { content: ''; position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--line); }
.tl-row:first-child .tl-line::before { top: 8px; }
.tl-row:last-child .tl-line::before { bottom: calc(100% - 8px); }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid var(--bg-void); margin-top: 5px; z-index: 1; }
.tl-content { flex: 1; padding: 0 0 18px; min-width: 0; }
.tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-city { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.tl-meta { display: block; font-size: 12px; color: var(--text-mid); margin-top: 2px; }
.tl-address {
  display: flex; align-items: flex-start; gap: 5px; margin-top: 4px;
  font-size: 11px; color: var(--text-low); line-height: 1.35;
}
.tl-address svg { flex-shrink: 0; margin-top: 2px; }
.tl-event-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; margin-left: 6px;
  font-size: 10.5px; font-weight: 600; color: #E7A73F; background: #E7A73F18;
  border: 1px solid #E7A73F44; border-radius: 5px; padding: 2px 7px; width: fit-content;
}
.tl-route-btn {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  font-size: 10.5px; font-weight: 700; color: #8C3FA6; background: #8C3FA614;
  border: 1px solid #8C3FA655; border-radius: 5px; padding: 3px 8px; width: fit-content; cursor: pointer;
}
.lightbox-backdrop {
  position: fixed; inset: 0; background: #060508ee; backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 60;
  animation: lightbox-fade .15s ease-out;
}
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-close {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 61;
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: #ffffff1c; color: #F6F0EC; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox-close:hover { background: #ffffff33; }
.lightbox-stage {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center;
}
.lightbox-title {
  color: #B6A8C2; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  padding: max(14px, env(safe-area-inset-top)) 60px 8px 16px; text-align: center; width: 100%;
  flex-shrink: 0;
}
.zoomable-viewport {
  flex: 1; width: 100%; min-height: 0; display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative; touch-action: none;
}
.zoomable-image {
  max-width: 100%; max-height: 100%; object-fit: contain; display: block;
  will-change: transform; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none;
  cursor: zoom-in;
}
.lightbox-empty { padding: 0 24px; text-align: center; }
.lightbox-empty .modal-hint { color: #B6A8C2; }
.lightbox-upload {
  flex-shrink: 0; margin: 10px 16px max(14px, env(safe-area-inset-bottom));
  background: #ffffff12; border-color: #ffffff33; color: #F6F0EC; justify-content: center; width: calc(100% - 32px);
}
.lightbox-upload:hover { border-color: #8C3FA6; color: #B78FD6; }
.tl-placeholder-note { font-size: 11px; color: var(--text-low); font-style: italic; margin: -14px 0 20px; }
.tl-row.is-off .tl-city { color: var(--text-low); }
.tl-row.is-off .tl-dot { background: transparent; border-color: var(--text-low); border-style: dashed; }
.tl-row.is-off .tl-meta { color: #5a4f66; }
.tl-row.is-past { opacity: .5; }
.tl-row.is-past .tl-dot { background: #6FA88C; }
.tl-row.is-today .tl-dot { background: #8C3FA6; box-shadow: 0 0 0 4px #8C3FA633; }
.tl-row.is-today .tl-city { color: #B78FD6; }
.tl-today-badge { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: #8C3FA6; border-radius: 5px; padding: 2px 6px; }
.tl-task-badge { font-size: 10px; font-weight: 600; color: #E7B199; background: #E7B19918; border: 1px solid #E7B19944; border-radius: 5px; padding: 2px 6px; }

/* Settings */
.settings-card, .settings-info {
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px;
}
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-label { font-size: 15px; font-weight: 600; }
.settings-hint { font-size: 12px; color: var(--text-low); margin-top: 3px; line-height: 1.4; }
.settings-btn {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: #8C3FA6; color: #fff; border: none; border-radius: 8px; padding: 9px 13px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.settings-btn:disabled { background: var(--bg-surface-2); color: #6FA88C; }
.settings-test { margin-top: 12px; width: 100%; background: transparent; border: 1px solid var(--line); color: var(--text-mid); border-radius: 8px; padding: 10px; font-size: 13px; cursor: pointer; }
.settings-test:hover { border-color: #8C3FA6; color: #8C3FA6; }
.settings-test:disabled { opacity: .6; cursor: default; }
.settings-test-row { display: flex; gap: 8px; }
.settings-test-row .settings-test { margin-top: 12px; }
.push-diag {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.4;
  background: var(--bg-void); border: 1px solid var(--line);
}
.push-diag.is-ok { border-color: #6FA88C55; color: #6FA88C; }
.push-diag.is-fail { border-color: #D9694F55; color: #D9694F; }
.push-diag-meta { margin-top: 4px; font-size: 11px; color: var(--text-low); }
.settings-info-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.settings-steps { margin: 0; padding-left: 18px; color: var(--text-mid); font-size: 13px; line-height: 1.7; }
.settings-steps strong { color: var(--text-hi); }
.settings-plan { font-size: 13px; color: var(--text-mid); margin: 4px 0; padding-left: 14px; position: relative; }
.settings-plan::before { content: '•'; position: absolute; left: 0; color: #8C3FA6; }
.settings-warn { font-size: 11.5px; color: var(--text-low); margin-top: 10px; line-height: 1.45; font-style: italic; }

/* Durchsage / Broadcast */
.broadcast-textarea {
  width: 100%; resize: none; background: var(--bg-void); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; color: var(--text-hi); font-family: inherit; box-sizing: border-box;
}
.broadcast-textarea:focus { outline: none; border-color: #8C3FA6; }
.broadcast-counter { text-align: right; font-size: 11px; color: var(--text-low); margin-top: 4px; }
.broadcast-select-all {
  background: none; border: none; color: #8C3FA6; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 0;
}
.broadcast-recipients { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
.broadcast-recipients .assign-picker-row { padding: 9px 6px; }
.broadcast-role { color: var(--text-low); font-weight: 400; }
.broadcast-send-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: #8C3FA6; color: #fff; border: none; border-radius: 10px; padding: 13px; margin-top: 4px;
  font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.broadcast-send-btn:disabled { background: var(--bg-surface-2); color: var(--text-low); cursor: default; }

.theme-picker { display: flex; gap: 8px; }
.theme-chip {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--bg-void); border: 1px solid var(--line); color: var(--text-mid);
  border-radius: 10px; padding: 12px 6px; font-size: 11.5px; cursor: pointer;
}
.theme-chip.is-on { border-color: #8C3FA6; color: #8C3FA6; background: #8C3FA61c; }

/* Leader dashboard */
.stat-row { display: flex; gap: 7px; margin-bottom: 22px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: calc(50% - 4px); background: var(--bg-surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.stat-num { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 24px; line-height: 1; color: var(--text-hi); }
.stat-label { font-size: 10.5px; color: var(--text-low); text-align: center; }
.section-head { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-low); margin: 6px 2px 10px; }

.my-tasks-section { padding: 16px 16px 16px; }
.section-head-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.my-tasks-count {
  background: #8C3FA6; color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.my-tasks-empty { font-size: 13px; color: var(--text-low); background: var(--bg-surface); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; margin: 0; }
.my-tasks-more {
  width: 100%; background: transparent; border: 1px dashed var(--line); color: var(--text-mid);
  border-radius: 10px; padding: 9px; font-size: 12px; cursor: pointer; margin-top: 2px;
}
.my-tasks-more:hover { border-color: #8C3FA6; color: #8C3FA6; }
.member-stat-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.member-stat-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.member-stat-info { flex: 1; min-width: 0; }
.member-stat-top { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.member-stat-name { font-size: 13.5px; font-weight: 600; }
.member-stat-role { font-size: 10.5px; color: var(--text-low); }
.member-stat-bar { height: 5px; border-radius: 3px; background: var(--bg-surface-2); overflow: hidden; display: flex; }
.member-stat-fill { height: 100%; }
.member-stat-fill.is-work { background: #E7B199; }
.member-stat-fill.is-done { background: #6FA88C; }
.member-stat-nums { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex-shrink: 0; }
.member-stat-open { font-size: 10.5px; color: var(--text-low); font-weight: 600; }
.member-stat-work { font-size: 10.5px; color: #E7B199; }
.member-stat-done { font-size: 10.5px; color: #6FA88C; }
.lead-task-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; cursor: pointer; text-align: left;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lead-task-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lead-task-title { font-size: 13.5px; font-weight: 500; color: var(--text-hi); }
.lead-task-meta { font-size: 11px; color: var(--text-low); }

.location-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.location-info { flex: 1; min-width: 0; }
.location-meta { font-size: 11.5px; color: var(--text-low); }
.location-open-btn {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: #8C3FA6; color: #fff; display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}

/* Login screen */
.login-screen {
  max-width: 480px; margin: 0 auto; padding: 0 0 30px;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg-void);
  display: flex; flex-direction: column; align-items: center;
}
.login-body {
  width: 100%; padding: 18px 20px 0; display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.login-hero { display: flex; align-items: center; gap: 12px; }
.login-hint { color: var(--text-low); font-size: 13px; margin: 0; align-self: flex-start; }
.member-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
.member-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  cursor: pointer; text-align: left; position: relative;
}
.member-tile:hover { border-color: #8C3FA655; }
.member-tile.is-add { align-items: center; justify-content: center; flex-direction: row; gap: 8px; color: var(--text-mid); border-style: dashed; }
.member-initial {
  width: 34px; height: 34px; border-radius: 50%; background: var(--bg-surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; color: #8C3FA6;
}
.member-initial.sm { width: 22px; height: 22px; font-size: 11px; }
.member-name { font-size: 13.5px; font-weight: 500; }
.member-role { font-size: 11.5px; color: var(--text-low); }
.member-plate {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-mid);
  background: var(--bg-surface-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 6px; margin-top: 4px; letter-spacing: 0.03em;
}
.member-flag { font-size: 10px; color: #8C3FA6; position: absolute; top: 12px; right: 12px; }

.external-cta {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: linear-gradient(135deg, #8C3FA6, #6B2F8C);
  border: none; color: #fff; padding: 16px 18px; cursor: pointer; text-align: left;
  margin-top: 12px;
}
.external-cta-icon {
  width: 40px; height: 40px; border-radius: 10px; background: #ffffff22;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.external-cta-text { display: flex; flex-direction: column; gap: 2px; }
.external-cta-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.external-cta-sub { font-size: 12px; color: #ffffffb0; }
.external-cta:active { filter: brightness(0.94); }
.contact-info-strip {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 9px 16px; font-size: 11.5px; color: var(--text-low); text-decoration: none;
}
.contact-info-strip strong { color: var(--text-mid); font-weight: 600; }
.contact-info-strip svg { flex-shrink: 0; }
.modal-hint { font-size: 12px; color: var(--text-low); margin: -2px 0 2px; line-height: 1.4; }
.sent-confirm {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; padding: 20px 6px 6px; color: var(--text-mid); font-size: 13.5px;
}
.sent-confirm svg { color: #6FA88C; }

.pin-panel { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.back-link { background: none; border: none; color: var(--text-low); font-size: 12.5px; cursor: pointer; padding: 0; }
.back-link:hover { color: var(--text-hi); }
.pin-who { display: flex; align-items: center; gap: 10px; }
.pin-who-name { font-size: 15px; font-weight: 500; }
.pin-who-role { font-size: 12px; color: var(--text-low); }
.pin-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-mid); margin: 0; }
.pin-error { color: #D9694F; font-size: 12px; margin: 0; }
.field-error { color: #D9694F; font-size: 11.5px; margin: 2px 0 0; }

.pinpad { position: relative; display: flex; gap: 10px; }
.pin-slot { width: 40px; height: 46px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--bg-surface); }
.pin-slot.is-filled { border-color: #8C3FA6; background: #8C3FA618; }
.pin-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; letter-spacing: 30px;
}

@media (max-width: 520px) {
  .field-row { flex-direction: column; }
  .board-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .member-grid { grid-template-columns: 1fr 1fr; }
}
