/* =================================================================
   Scoophub - Brand & Layout
   Brand: #005ca9 (HSL 207, 100%, 33%) on Bulma 1.x
   ================================================================= */

:root {
  --bulma-primary-h: 207deg;
  --bulma-primary-s: 100%;
  --bulma-primary-l: 33%;
  --bulma-link-h: 207deg;
  --bulma-link-s: 100%;
  --bulma-link-l: 33%;

  --sh-brand: #005ca9;
  --sh-brand-hover: #00498a;
  --sh-brand-50: #e6f0fa;
  --sh-brand-100: #cce1f4;
  --sh-bg: #f7f8fa;
  --sh-surface: #ffffff;
  --sh-border: #e7eaee;
  --sh-border-strong: #d1d6dd;
  --sh-text: #0a0a0a;
  --sh-text-muted: #6b7280;
  --sh-text-soft: #9ca3af;
  --sh-radius: 14px;
  --sh-radius-sm: 10px;
  --sh-shadow-xs: 0 1px 1px rgba(10,10,10,0.04);
  --sh-shadow-sm: 0 1px 2px rgba(10,10,10,0.05), 0 1px 1px rgba(10,10,10,0.03);
  --sh-shadow-md: 0 6px 24px rgba(10,10,10,0.06);
}

* { box-sizing: border-box; }

html, body {
  font-family: 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--sh-bg);
  color: var(--sh-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--sh-brand);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: var(--sh-brand); }
a:hover { color: var(--sh-brand-hover); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 22;
  user-select: none;
  vertical-align: middle;
}

/* ====== Shell ====== */
.sh-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* ====== Sidebar ====== */
.sh-sidebar {
  background: var(--sh-surface);
  border-right: 1px solid var(--sh-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 5;
}
.sh-brand {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--sh-border);
}
.sh-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--sh-text);
  font-weight: 700;
}
.sh-logo-img {
  display: block;
  height: 28px;
  width: auto;
  max-width: 100%;
}
.sh-logo-img-lg {
  height: 44px;
  margin: 0 auto 16px;
}

.sh-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}
.sh-nav-group { margin-bottom: 16px; }
.sh-nav-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--sh-text-soft);
  padding: 0 10px;
  margin-bottom: 6px;
}
.sh-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--sh-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 1px;
  transition: background 80ms ease, color 80ms ease;
}
.sh-nav-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--sh-text-muted);
  transition: color 80ms ease;
}
.sh-nav-item:hover {
  background: var(--sh-bg);
  color: var(--sh-text);
}
.sh-nav-item.is-active {
  background: var(--sh-brand-50);
  color: var(--sh-brand);
}
.sh-nav-item.is-active .material-symbols-outlined {
  color: var(--sh-brand);
}

.sh-sidebar-foot {
  border-top: 1px solid var(--sh-border);
  padding: 10px;
}
.sh-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--sh-text);
}
.sh-user-card:hover { background: var(--sh-bg); color: var(--sh-text); }
.sh-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sh-brand);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.sh-avatar.sh-avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.sh-user-info { line-height: 1.25; min-width: 0; }
.sh-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-user-role { font-size: 11px; color: var(--sh-text-muted); text-transform: capitalize; }

/* ====== Main + Topbar ====== */
.sh-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sh-topbar {
  height: 60px;
  background: var(--sh-surface);
  border-bottom: 1px solid var(--sh-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 4;
}
.sh-topbar-title { font-size: 16px; font-weight: 600; }
.sh-topbar-actions { display: flex; align-items: center; gap: 8px; }

.sh-content {
  padding: 24px 28px;
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin-inline: auto;
}

/* ====== Page header ====== */
.sh-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.sh-page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.sh-page-subtitle { color: var(--sh-text-muted); font-size: 14px; margin-top: 2px; }
.sh-page-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ====== Cards ====== */
.sh-card {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  box-shadow: var(--sh-shadow-xs);
}
.sh-card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--sh-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
}
.sh-card-body { padding: 18px; }
.sh-card-body-flush { padding: 0; }

/* ====== Stats Tiles ====== */
.sh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.sh-stat {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  padding: 16px 18px;
}
.sh-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sh-text-muted);
}
.sh-stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

/* ====== Bar Chart (Soll / Ist) ====== */
.sh-barchart-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sh-text-muted);
}
.sh-barchart-key { display: inline-flex; align-items: center; gap: 6px; }
.sh-barchart-key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sh-barchart-key i.is-soll { background: #e3e8ef; }
.sh-barchart-key i.is-ist { background: #1f7a3a; }

.sh-barchart {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sh-barchart-yaxis {
  position: relative;
  width: 22px;
  height: 200px;
  flex: 0 0 auto;
}
.sh-barchart-ylabel {
  position: absolute;
  right: 0;
  transform: translateY(50%);
  font-size: 11px;
  line-height: 1;
  color: var(--sh-text-soft);
}
.sh-barchart-plot {
  position: relative;
  flex: 1 1 auto;
  height: 200px;
  margin-bottom: 22px;
}
.sh-barchart-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid var(--sh-border);
}
.sh-barchart-cols {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.sh-bar-track { position: relative; flex: 1 1 0; height: 100%; }
.sh-bar {
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 70%;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.sh-bar-soll { background: #e3e8ef; }
.sh-bar-ist { background: #1f7a3a; }
.sh-bar-xlabel {
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  line-height: 1;
  color: var(--sh-text-soft);
  white-space: nowrap;
}

/* ====== Table ====== */
.sh-table {
  width: 100%;
  border-collapse: collapse;
}
.sh-table th, .sh-table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--sh-border);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}
.sh-table th {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sh-text-muted);
  background: var(--sh-bg);
}
.sh-table tr:last-child td { border-bottom: none; }
.sh-table tbody tr:hover td { background: rgba(0, 92, 169, 0.025); }
.sh-table .sh-row-actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}
.sh-table .sh-row-actions > * {
  vertical-align: middle;
}
.sh-table .sh-row-actions > * + * {
  margin-left: 4px;
}
/* Horizontaler Scroll-Schutz für breite Tabellen in schmalen Karten/Spalten.
   Kein min-width: die Tabelle bleibt bei width:100%, bricht Text um und
   scrollt nur, wenn der Inhalt wirklich nicht passt (statt abzuschneiden). */
.sh-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ====== Grids ====== */
.sh-grid { display: grid; gap: 16px; }
.sh-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sh-grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sh-grid-2 { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

/* ====== Tile (clickable card) ====== */
.sh-tile {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  padding: 18px;
  text-decoration: none;
  color: var(--sh-text);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.sh-tile:hover {
  border-color: var(--sh-brand);
  box-shadow: 0 4px 16px rgba(0, 92, 169, 0.07);
  color: var(--sh-text);
  transform: translateY(-1px);
}
.sh-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sh-brand-50);
  color: var(--sh-brand);
  display: grid;
  place-items: center;
}
.sh-tile-icon .material-symbols-outlined { font-size: 22px; }
.sh-tile-title { font-weight: 600; font-size: 15px; }
.sh-tile-desc { color: var(--sh-text-muted); font-size: 13px; line-height: 1.4; }

/* ====== Filters bar ====== */
.sh-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
}
.sh-filters .field { margin: 0; flex: 0 0 auto; }
.sh-filters .field.is-grow { flex: 1 1 200px; }

/* ====== Buttons ====== */
.button {
  font-family: inherit;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.2;
  letter-spacing: 0;
  border-radius: var(--sh-radius-sm);
  padding: 0.6em 1.1em;
  min-height: 2.5em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.button.is-primary {
  background-color: var(--sh-brand);
  border-color: var(--sh-brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 73, 138, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.button.is-primary:hover, .button.is-primary:focus {
  background-color: var(--sh-brand-hover);
  border-color: var(--sh-brand-hover);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 73, 138, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.button.is-primary:active {
  color: #fff;
  box-shadow: 0 1px 1px rgba(0, 73, 138, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(0);
}
.button .material-symbols-outlined { font-size: 18px; margin-right: 4px; }
.button.is-icon { padding: 0 8px; min-height: 0; }
.button.is-icon .material-symbols-outlined { margin-right: 0; }
.button.is-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--sh-text-muted);
}
.button.is-ghost:hover { background: var(--sh-bg); color: var(--sh-text); }

/* ====== Forms ====== */
.field { margin-bottom: 1.0rem; }
.label { font-size: 13px; font-weight: 600; color: var(--sh-text); margin-bottom: 4px; }
.input, .textarea, .select select {
  border-color: var(--sh-border-strong);
  border-radius: var(--sh-radius-sm);
  background: var(--sh-surface);
  font-size: 14px;
  box-shadow: none;
}
.input:focus, .input:active, .textarea:focus, .textarea:active, .select select:focus, .select select:active {
  border-color: var(--sh-brand);
  box-shadow: 0 0 0 3px rgba(0, 92, 169, 0.15);
}
.help { font-size: 12px; color: var(--sh-text-muted); }
.help.is-danger { color: #b42525; }

/* ====== Calendar ====== */
.sh-calendar {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  overflow: hidden;
}
.sh-cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--sh-bg);
  border-bottom: 1px solid var(--sh-border);
}
.sh-cal-head > div {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sh-text-muted);
  text-align: center;
}
.sh-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.sh-cal-day {
  border-right: 1px solid var(--sh-border);
  border-bottom: 1px solid var(--sh-border);
  min-height: 110px;
  padding: 6px 8px;
  position: relative;
}
.sh-cal-day:nth-child(7n) { border-right: none; }
.sh-cal-day.is-other-month { background: #fafbfc; color: var(--sh-text-soft); }
.sh-cal-day.is-today { background: var(--sh-brand-50); }
.sh-cal-day.is-weekend { background: #fafbfc; }
.sh-cal-daynum {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.sh-cal-day.is-today .sh-cal-daynum {
  display: inline-block;
  background: var(--sh-brand);
  color: white;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
}
.sh-cal-event {
  display: block;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  color: var(--sh-text);
  background: var(--sh-brand-50);
  border-left: 2px solid var(--sh-brand);
}
.sh-cal-event:hover { color: var(--sh-text); filter: brightness(.95); }
.sh-cal-holiday {
  font-size: 10px;
  color: #b42525;
  font-weight: 500;
  margin-bottom: 2px;
}

/* ====== Seat plan ====== */
.sh-seatplan {
  position: relative;
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  background: var(--sh-bg);
  overflow: hidden;
  user-select: none;
}
.sh-seatplan img {
  display: block;
  width: 100%;
  height: auto;
}
.sh-seat {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sh-surface);
  border: 2px solid var(--sh-brand);
  color: var(--sh-brand);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 100ms ease, background 100ms ease;
  text-decoration: none;
}
.sh-seat:hover { transform: translate(-50%, -50%) scale(1.12); color: var(--sh-brand); }
.sh-seat.is-taken {
  background: var(--sh-brand);
  color: white;
  cursor: not-allowed;
}
.sh-seat.is-mine {
  background: #1f7a3a;
  color: white;
  border-color: #1f7a3a;
}

/* Booking view: smaller plan, larger seat dots for click comfort */
.sh-seatplan.is-booking {
  max-width: 560px;
  margin: 0 auto;
}
.sh-seatplan.is-booking .sh-seat {
  width: 46px;
  height: 46px;
  font-size: 13px;
  border-width: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Attendance list next to seat plan */
.sh-attendance {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sh-attendance-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  background: var(--sh-surface);
}
.sh-attendance-row.is-mine {
  border-color: #1f7a3a;
  background: #eaf6ee;
}
.sh-attendance-seat {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--sh-brand);
  color: white;
  font-weight: 700;
  font-size: 12px;
}
.sh-attendance-row.is-mine .sh-attendance-seat {
  background: #1f7a3a;
}
.sh-attendance-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sh-bg);
  color: var(--sh-brand);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 28px;
}
.sh-attendance-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sh-attendance-name {
  font-size: 13px;
  color: var(--sh-text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====== Notification badge ====== */
.sh-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #b42525;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid white;
}

/* ====== Tags ====== */
.sh-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--sh-bg);
  color: var(--sh-text);
  border: 1px solid var(--sh-border);
}
.sh-tag.is-success { background: #e8f6ec; color: #1f7a3a; border-color: #c9ebd2; }
.sh-tag.is-warning { background: #fef7e6; color: #8b6105; border-color: #f6e4ad; }
.sh-tag.is-danger { background: #fde8e8; color: #b42525; border-color: #f5c5c5; }
.sh-tag.is-info { background: var(--sh-brand-50); color: var(--sh-brand); border-color: var(--sh-brand-100); }

/* ====== Empty state ====== */
.sh-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--sh-text-muted);
}
.sh-empty .material-symbols-outlined {
  font-size: 56px;
  color: var(--sh-border-strong);
  margin-bottom: 6px;
}
.sh-empty h3 {
  color: var(--sh-text);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

/* ====== Notification (flash) ====== */
.notification {
  border-radius: var(--sh-radius);
  padding: 12px 18px;
  font-size: 14px;
}

/* ====== Public layout (login) ====== */
.sh-public {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fafbfc 0%, #eaf1f9 100%);
}
.sh-public-card {
  background: white;
  border: 1px solid var(--sh-border);
  border-radius: 18px;
  padding: 44px 40px;
  width: min(420px, 90vw);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 92, 169, 0.08);
}
.sh-public-card h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.sh-public-card p {
  color: var(--sh-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ====== Modal ====== */
.modal-card {
  border-radius: 14px;
  overflow: hidden;
}
.modal-card-head, .modal-card-foot {
  background: var(--sh-surface);
  border-color: var(--sh-border);
}

/* ====== Markdown content (Wiki render) ====== */
.sh-md {
  font-size: 15px;
  line-height: 1.65;
  color: var(--sh-text);
}
/* Lesbare Zeilenlänge für Fließtext */
.sh-prose { max-width: 78ch; }
.sh-md h1, .sh-md h2, .sh-md h3, .sh-md h4 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 1.5em 0 0.5em;
}
.sh-md h1 { font-size: 26px; }
.sh-md h2 { font-size: 21px; }
.sh-md h3 { font-size: 17px; }
.sh-md p { margin-bottom: 0.9em; }
.sh-md ul, .sh-md ol { margin: 0.6em 0 1em 1.4em; }
.sh-md li { margin-bottom: 0.2em; }
.sh-md code {
  background: var(--sh-bg);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.sh-md pre {
  background: #0a0a0a;
  color: #f5f5f5;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  overflow-x: auto;
  margin: 1em 0;
}
.sh-md pre code { background: transparent; color: inherit; padding: 0; }
.sh-md blockquote {
  border-left: 3px solid var(--sh-brand);
  padding-left: 14px;
  color: var(--sh-text-muted);
  margin: 1em 0;
}
.sh-md table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
}
.sh-md table th, .sh-md table td {
  border: 1px solid var(--sh-border);
  padding: 8px 12px;
  font-size: 14px;
}
.sh-md table th { background: var(--sh-bg); font-weight: 600; }
.sh-md hr { border: none; border-top: 1px solid var(--sh-border); margin: 1.5em 0; }
.sh-md a { color: var(--sh-brand); }

/* ====== iframe view ====== */
.sh-iframe-host {
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  overflow: hidden;
  background: var(--sh-surface);
  height: calc(100vh - 180px);
}
.sh-iframe-host iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ====== Definition list (Detail pages) ====== */
.sh-dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 4px 16px;
  font-size: 14px;
}
.sh-dl dt {
  color: var(--sh-text-muted);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--sh-border);
}
.sh-dl dd {
  padding: 8px 0;
  border-bottom: 1px solid var(--sh-border);
}
.sh-dl dt:last-of-type, .sh-dl dd:last-of-type { border-bottom: none; }

/* ====== Section headings ====== */
.sh-section-title {
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--sh-text-muted);
  margin: 24px 0 10px;
}

/* ====== Vacation Timeline (Team-Kalender) ====== */
.sh-timeline-card-head {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.sh-timeline-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sh-timeline-month-label {
  font-size: 14px;
  min-width: 140px;
  text-align: center;
}

.sh-timeline {
  --user-col: 220px;
  overflow-x: auto;
  background: var(--sh-surface);
}
.sh-timeline-row {
  display: grid;
  grid-template-columns: var(--user-col) 1fr;
  border-bottom: 1px solid var(--sh-border);
  min-width: 880px;
}
.sh-timeline-row:last-child { border-bottom: 0; }
.sh-timeline-row-head .sh-timeline-corner,
.sh-timeline-row-head .sh-timeline-day {
  background: var(--sh-bg);
}

.sh-timeline-corner {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sh-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-right: 1px solid var(--sh-border);
  display: flex;
  align-items: center;
}

.sh-timeline-cells {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--days), 1fr);
  min-height: 52px;
}
.sh-timeline-row-head .sh-timeline-cells { min-height: 0; }

.sh-timeline-day {
  padding: 6px 0;
  text-align: center;
  border-left: 1px solid var(--sh-border);
  font-size: 11px;
  color: var(--sh-text-muted);
  position: relative;
}
.sh-timeline-day:first-child { border-left: 0; }
.sh-timeline-weekday {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.2;
}
.sh-timeline-daynum {
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-text);
  line-height: 1.3;
}

.sh-timeline-day.is-weekend,
.sh-timeline-cell.is-weekend {
  background: repeating-linear-gradient(45deg, #fff4d6, #fff4d6 4px, #ffe8a8 4px, #ffe8a8 8px);
}
.sh-timeline-day.is-holiday,
.sh-timeline-cell.is-holiday {
  background: repeating-linear-gradient(45deg, #ececec, #ececec 4px, #cfd2d6 4px, #cfd2d6 8px);
}
.sh-timeline-day.is-today,
.sh-timeline-cell.is-today {
  position: relative;
}
.sh-timeline-day.is-today .sh-timeline-daynum {
  color: var(--sh-brand);
}
.sh-timeline-day.is-today::after,
.sh-timeline-cell.is-today::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 2px;
  background: var(--sh-brand);
  opacity: .55;
  pointer-events: none;
  z-index: 2;
}
.sh-timeline-day.is-today .sh-timeline-weekday {
  color: var(--sh-brand);
  font-weight: 700;
}

.sh-timeline-group {
  padding: 6px 14px;
  background: var(--sh-bg);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--sh-text-muted);
  border-bottom: 1px solid var(--sh-border);
  font-weight: 600;
}

.sh-timeline-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-right: 1px solid var(--sh-border);
  background: var(--sh-surface);
  position: sticky;
  left: 0;
  z-index: 1;
}
.sh-timeline-user-meta { min-width: 0; }
.sh-timeline-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-timeline-user-sub {
  font-size: 11px;
  color: var(--sh-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-timeline-me {
  display: inline-block;
  background: var(--sh-brand-50);
  color: var(--sh-brand);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  font-weight: 600;
  vertical-align: middle;
}

.sh-timeline-row.is-me {
  background: color-mix(in srgb, var(--sh-brand-50) 55%, transparent);
}
.sh-timeline-row.is-me .sh-timeline-user {
  background: var(--sh-brand-50);
  box-shadow: inset 3px 0 0 var(--sh-brand);
}

.sh-timeline-cell {
  border-left: 1px solid var(--sh-border);
}
.sh-timeline-cell:first-child { border-left: 0; }

.sh-timeline-bar {
  position: absolute;
  top: 8px;
  bottom: 8px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
}
.sh-timeline-bar.is-approved {
  background: var(--sh-brand-50);
  color: var(--sh-brand);
  border-left: 3px solid var(--sh-brand);
  font-weight: 600;
}
.sh-timeline-bar.is-pending {
  background: repeating-linear-gradient(45deg, var(--sh-brand-50), var(--sh-brand-50) 6px, #ffffff 6px, #ffffff 12px);
  color: var(--sh-brand);
  border: 1px dashed var(--sh-brand);
  font-weight: 500;
}
.sh-timeline-bar.is-clip-left {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left-style: dotted;
}
.sh-timeline-bar.is-clip-right {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.sh-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 14px;
  border-top: 1px solid var(--sh-border);
  font-size: 12px;
  color: var(--sh-text-muted);
}
.sh-timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sh-timeline-legend-swatch {
  display: inline-block;
  width: 18px;
  height: 12px;
  border-radius: 3px;
}
.sh-timeline-legend-swatch.is-approved {
  background: var(--sh-brand-50);
  border-left: 3px solid var(--sh-brand);
}
.sh-timeline-legend-swatch.is-pending {
  background: repeating-linear-gradient(45deg, var(--sh-brand-50), var(--sh-brand-50) 4px, #fff 4px, #fff 8px);
  border: 1px dashed var(--sh-brand);
}
.sh-timeline-legend-swatch.is-weekend {
  background: repeating-linear-gradient(45deg, #fff4d6, #fff4d6 3px, #ffe8a8 3px, #ffe8a8 6px);
}
.sh-timeline-legend-swatch.is-holiday {
  background: repeating-linear-gradient(45deg, #ececec, #ececec 3px, #cfd2d6 3px, #cfd2d6 6px);
}

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .sh-shell { grid-template-columns: 1fr; }
  .sh-sidebar {
    position: fixed;
    transform: translateX(-100%);
    width: 248px;
  }
  .sh-content { padding: 16px; }
  .sh-page-head { flex-direction: column; gap: 12px; align-items: stretch; }
}
