.print-map-only { display: none; }

/* ============================================================
   navora · Cruise Manager — Brand Style v0.22
   Kompaktes Layout, weniger Scrollen, saubere Ausrichtung
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --c-navy:       #071C34;
  --c-navy-deep:  #00284D;
  --c-navy-mid:   #0D2B4D;
  --c-red:        #D72638;
  --c-red-dark:   #b01f2d;
  --c-cyan:       #6FAFC7;

  --c-black:      #0D1F35;
  --c-text:       #1c1c1e;
  --c-text-soft:  #5a5a5a;
  --c-text-muted: #8a8a8a;

  --c-paper:        #ffffff;
  --c-paper-stripe: #F7F8F7;
  --c-line:         #d8d4ca;
  --c-line-soft:    #e3e0d6;

  --c-input:        #fdf3cc;
  --c-input-focus:  #fff8dd;
  --c-input-border: #e8c952;

  --c-info-bg:      #e4eef6;
  --c-info-border:  #1e5a96;
  --c-warn-bg:      #fce8e9;
  --c-warn-border:  #D72638;
  --c-success-bg:   #e3f0e0;
  --c-success-text: #2d6a1f;
  --c-neutral-bg:   #efebe2;
  --c-hover:        #ece8de;

  --c-role-gold:      #b88a1e;
  --c-role-gold-soft: #b8a366;

  --f-body:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-brand: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  /* Kompakte Abstände */
  --sp-xs: 0.3rem;
  --sp-sm: 0.5rem;
  --sp-md: 0.8rem;
  --sp-lg: 1.2rem;
  --sp-xl: 1.8rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--c-paper);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 13.5px;
  line-height: 1.45;
  font-feature-settings: "tnum","lnum";
  min-height: 100vh;
  scroll-padding-top: 0; /* sticky-topbar ist als Einheit sticky */
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

.print-map-only { display: none; }

/* ====== Header (sticky) ====== */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: var(--c-navy);
  border-bottom: 2px solid var(--c-red);
  flex-shrink: 0;
  /* position:sticky jetzt via .sticky-topbar Wrapper */
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-burgee { height: 46px; width: auto; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--f-brand); font-weight: 600; color: #fff;
  font-size: 1.88rem; letter-spacing: 0.01em; line-height: 1;
  /*
    Ziel: gleiche visuelle Breite wie "CRUISE MANAGER" (0.6rem, 0.18em tracking, uppercase Inter)
    "CRUISE MANAGER" ≈ 6.4rem breit.
    "navora" in Cormorant Garamond SemiBold: ~3.46em Zeichenbreite → 6.4/3.46 ≈ 1.85rem
    1.88rem mit minimal tracking (0.01em) für optischen Ausgleich.
  */
}
.brand-sub {
  font-family: var(--f-body); font-size: 0.6rem; color: rgba(255,255,255,0.5);
  font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 0.2rem;
}
.site-meta { text-align: right; font-size: 0.68rem; color: rgba(255,255,255,0.35); }

/* Tenant-Logo im Header */
.tenant-logo-wrap { display: flex; align-items: center; }
.tenant-logo { max-height: 40px; max-width: 180px; object-fit: contain; }

.print-map-only { display: none; }

/* ====== Navigation (sticky) ====== */
.site-nav {
  padding: 0 2rem;
  background: var(--c-navy-deep);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 0; flex-shrink: 0;
  /* position:sticky jetzt via .sticky-topbar Wrapper */
}
.site-nav a {
  padding: 0.6rem 1rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.site-nav a:hover { color: #fff; }
.site-nav a.active { color: #fff; border-bottom-color: var(--c-red); }

/* User-Info rechts in der Nav */
.nav-user-info {
  margin-left: auto;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0 0 0 1rem;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.nav-user-name { font-size: 0.72rem; color: rgba(255,255,255,0.7); font-weight: 500; }
.nav-user-role { font-size: 0.65rem; color: rgba(255,255,255,0.35); }
.nav-logout-btn {
  font-size: 0.68rem; color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2); padding: 0.15rem 0.45rem;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
  text-decoration: none; transition: all 0.12s;
}
.nav-logout-btn:hover { color: #fff; border-color: rgba(255,255,255,0.5); }

.print-map-only { display: none; }

/* ====== Layout ====== */
.container { padding: 1.4rem 2rem; max-width: 1320px; margin: 0 auto; width: 100%; flex: 1; }

.print-map-only { display: none; }

/* ====== Seitenheader (kompakter) ====== */
.pre-title { font-size: 0.63rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--c-red); font-weight: 600; margin-bottom: 0.2rem; }
h1 { font-size: 1.55rem; font-weight: 700; color: var(--c-black); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 0.2rem; }
h2 { font-size: 1.1rem; font-weight: 700; color: var(--c-black); letter-spacing: -0.01em; margin-bottom: 0.5rem; }
h3 { font-size: 0.7rem; font-weight: 700; color: var(--c-black); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.5rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--c-line); }
.subtitle { font-size: 0.88rem; color: var(--c-text-soft); margin-bottom: 1rem; }

.print-map-only { display: none; }

/* ====== Breadcrumb ====== */
.breadcrumb { font-size: 0.74rem; color: var(--c-text-soft); margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--c-text-soft); }
.breadcrumb a:hover { color: var(--c-red); }
.breadcrumb .sep { margin: 0 0.35rem; color: var(--c-line); }

.print-map-only { display: none; }

/* ====== Info-Strip ====== */
.info-strip {
  display: flex; gap: 2rem; padding: 0.65rem 1rem;
  background: var(--c-info-bg); border-left: 3px solid var(--c-info-border);
  margin-bottom: 1rem; font-size: 0.82rem; flex-wrap: wrap;
}
.nav-crew-preview-btn {
  font-size: 0.72rem; color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.18); padding: 0.1rem 0.45rem;
  border-radius: 2px; margin-right: 0.35rem; white-space: nowrap;
  text-decoration: none;
}
.nav-crew-preview-btn:hover {
  color: white; border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
}
.info-strip .item { display: flex; flex-direction: column; }
.info-strip .item-label { font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--c-text-soft); font-weight: 600; }
.info-strip .item-value { font-weight: 600; color: var(--c-black); font-size: 0.9rem; margin-top: 0.1rem; }

.print-map-only { display: none; }

/* ====== Stat-Cards (kompakter) ====== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.stat-card { background: var(--c-paper); border: 1px solid var(--c-line); padding: 0.8rem 1rem; }
.stat-card .stat-label { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-red); font-weight: 600; margin-bottom: 0.3rem; }
.stat-card .stat-value { font-size: 1.45rem; font-weight: 700; color: var(--c-black); letter-spacing: -0.01em; line-height: 1.1; }
.stat-card .stat-meta { font-size: 0.74rem; color: var(--c-text-soft); margin-top: 0.2rem; }

.print-map-only { display: none; }

/* ====== Toolbar ====== */
.toolbar { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; align-items: center; flex-wrap: wrap; }

.print-map-only { display: none; }

/* ====== Inputs ====== */
.input,
input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="date"], input[type="search"],
input[type="url"], select, textarea {
  padding: 0.38rem 0.65rem;
  background: var(--c-input);
  border: 1px solid var(--c-input-border);
  color: var(--c-text);
  font-family: var(--f-body); font-size: 0.86rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.input:focus, input:focus, select:focus, textarea:focus { border-color: var(--c-red); background: var(--c-input-focus); }
.input::placeholder, input::placeholder, textarea::placeholder { color: #8a7c3e; font-style: italic; }
textarea { resize: vertical; min-height: 72px; }
select { cursor: pointer; }
input[type="checkbox"] { width: auto; accent-color: var(--c-red); margin-right: 0.35rem; cursor: pointer; }
.search-input { max-width: 320px; flex: 1; min-width: 200px; }

.print-map-only { display: none; }

/* ====== Buttons ====== */
.btn {
  padding: 0.38rem 0.85rem; background: var(--c-paper);
  border: 1px solid var(--c-black); color: var(--c-black);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  transition: all 0.12s; display: inline-flex; align-items: center; gap: 0.25rem; text-decoration: none;
}
.btn:hover { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }
.btn-primary { background: var(--c-red); color: #fff; border-color: var(--c-red); }
.btn-primary:hover { background: var(--c-navy); border-color: var(--c-navy); }
.btn-ghost { background: transparent; border-color: var(--c-line); color: var(--c-text-soft); }
.btn-ghost:hover { background: var(--c-paper-stripe); color: var(--c-black); border-color: var(--c-black); }
.btn-danger { background: transparent; border-color: var(--c-red); color: var(--c-red); }
.btn-danger:hover { background: var(--c-red); color: #fff; }
.btn-push-right { margin-left: auto; }

.print-map-only { display: none; }

/* ====== Tabellen (kompakter) ====== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data thead th {
  text-align: left; padding: 0.42rem 0.75rem;
  font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: #fff; background: var(--c-navy); font-weight: 600; white-space: nowrap;
}
table.data tbody td { padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--c-line-soft); font-size: 0.86rem; color: var(--c-text); vertical-align: middle; }
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr:nth-child(even) { background: var(--c-paper-stripe); }
table.data tbody tr:hover { background: var(--c-hover); }
table.data tbody tr.clickable { cursor: pointer; }
table.data .name { font-weight: 600; color: var(--c-black); }
table.data .name-meta { display: block; font-size: 0.73rem; color: var(--c-text-soft); margin-top: 0.08rem; font-style: italic; }
table.data .home { color: var(--c-text-soft); }
table.data .num { font-weight: 600; color: var(--c-black); font-feature-settings: "tnum"; }
table.data .num-unit { color: var(--c-text-soft); font-weight: 400; margin-left: 0.12rem; font-size: 0.78rem; }
table.data .right { text-align: right; }
table.data .center { text-align: center; }
table.data .empty { padding: 2rem 1rem; text-align: center; color: var(--c-text-muted); font-style: italic; }

.print-map-only { display: none; }

/* ====== Rollen ====== */
.role { font-size: 0.82rem; display: inline-block; }
.role-skipper { font-weight: 600; padding: 0.15rem 0.5rem; border: 1px solid var(--c-role-gold); color: var(--c-role-gold); letter-spacing: 0.03em; }
.role-skipper2 { color: var(--c-role-gold-soft); font-weight: 600; }
.role-default { color: var(--c-text); }
.role-trainee { color: var(--c-text-soft); font-style: italic; }

.print-map-only { display: none; }

/* ====== Badges ====== */
.badges { display: flex; gap: 0.2rem; flex-wrap: wrap; align-items: center; }
.badge { font-size: 0.66rem; padding: 0.08rem 0.4rem; background: var(--c-navy); color: #fff; font-weight: 600; letter-spacing: 0.05em; }
.badge-dim { background: var(--c-line); color: var(--c-text-muted); }
.badge-info { background: var(--c-info-bg); color: var(--c-info-border); border: 1px solid var(--c-info-border); }
.badge-ok   { background: #e3f3e1; color: #2d6a32; border: 1px solid #b6dab1; }
.badge-warn { background: #fdf3cc; color: #8a6d00; border: 1px solid #ecd982; }
.badge-active { background: #ffe5e5; color: var(--c-red); border: 1px solid #f5b9b9; font-weight: 600; }

.print-map-only { display: none; }

/* ====== Status ====== */
.status { display: inline-block; padding: 0.12rem 0.45rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.status-active   { background: var(--c-success-bg); color: var(--c-success-text); }
.status-archived { background: var(--c-neutral-bg); color: var(--c-text-soft); }

.print-map-only { display: none; }

/* ====== Formulare (kompakter, besser ausgerichtet) ====== */
.form-section { background: var(--c-paper); border: 1px solid var(--c-line); padding: 1rem 1.25rem; margin-bottom: 0.8rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem 1rem; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }
.form-grid-full { grid-column: 1 / -1; }

.form-field { display: flex; flex-direction: column; }
.form-field-label { font-size: 0.72rem; font-weight: 600; color: var(--c-black); margin-bottom: 0.18rem; letter-spacing: 0.02em; }
.form-field-label .req { color: var(--c-red); margin-left: 0.12rem; }
.form-field-label small { display: block; font-weight: 400; color: var(--c-text-soft); font-style: italic; font-size: 0.68rem; margin-top: 0.08rem; }
.form-field-help { font-size: 0.7rem; color: var(--c-text-soft); margin-top: 0.18rem; font-style: italic; }

.form-checkbox-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.2rem 0.8rem; }
.form-checkbox-label { display: flex; align-items: center; font-size: 0.86rem; color: var(--c-text); cursor: pointer; padding: 0.15rem 0; }
.form-checkbox-label input[type="checkbox"], .form-checkbox-label input[type="radio"] { margin-right: 0.3rem; flex-shrink: 0; }

.form-actions { display: flex; gap: 0.5rem; padding-top: 0.8rem; border-top: 1px solid var(--c-line); margin-top: 0.8rem; }
.form-actions .btn-push-right { margin-left: auto; }

/* Inline-Formular-Layout (Label links, Feld rechts) für kompakte Detail-Ansichten */
.form-inline { display: grid; grid-template-columns: 140px 1fr; gap: 0.3rem 0.8rem; align-items: center; }
.form-inline .form-field-label { text-align: right; padding-top: 0.4rem; }

.print-map-only { display: none; }

/* ====== Detail-Ansicht ====== */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.35rem 1.5rem; }
.detail-item { padding: 0.35rem 0; border-bottom: 1px dotted var(--c-line-soft); }
.detail-item:last-child { border-bottom: none; }
.detail-label { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-soft); font-weight: 600; margin-bottom: 0.15rem; }
.detail-value { font-size: 0.9rem; color: var(--c-black); font-weight: 500; }
.detail-value.empty { color: var(--c-text-muted); font-style: italic; font-weight: 400; }

.print-map-only { display: none; }

/* ====== Hinweise ====== */
.note { padding: 0.65rem 1rem; margin-bottom: 0.8rem; font-size: 0.85rem; }
.note-neutral  { background: var(--c-paper-stripe); border-left: 3px solid var(--c-text-soft); }
.note-info     { background: var(--c-info-bg);      border-left: 3px solid var(--c-info-border); }
.note-warn     { background: var(--c-warn-bg);      border-left: 3px solid var(--c-warn-border); }
.note-success  { background: var(--c-success-bg);   border-left: 3px solid var(--c-success-text); }
.note strong { font-weight: 700; }

.print-map-only { display: none; }

/* ====== Actions ====== */
.action-link { font-size: 0.74rem; font-weight: 600; color: var(--c-red); text-transform: uppercase; letter-spacing: 0.06em; }
.action-link:hover { color: var(--c-navy); text-decoration: underline; }

.print-map-only { display: none; }

/* ====== Footer ====== */
.site-footer { border-top: 1px solid var(--c-line); padding: 0.65rem 2rem; color: var(--c-text-muted); font-size: 0.72rem; display: flex; justify-content: space-between; align-items: center; }
.site-footer .motto { font-style: italic; }

.print-map-only { display: none; }

/* ====== Tile-Gruppen (Home + Stammdaten-Bereiche) ====== */
.tile-group { margin-bottom: 1.2rem; }
.tile-group-title {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--c-text-soft);
  padding: 0.4rem 0; margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--c-line);
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}
.tile {
  display: flex; flex-direction: column;
  padding: 0.9rem 1rem; background: white;
  border: 1px solid var(--c-line); text-decoration: none; color: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.tile:hover { border-color: var(--c-red); box-shadow: 0 1px 4px rgba(215,38,56,0.1); }
.tile-primary { border-color: var(--c-navy); }
.tile-primary:hover { border-color: var(--c-red); }
.tile-icon { font-size: 1.3rem; margin-bottom: 0.35rem; line-height: 1; }
.tile-title { font-size: 0.82rem; font-weight: 700; color: var(--c-black); margin-bottom: 0.15rem; }
.tile-value { font-size: 1.6rem; font-weight: 700; color: var(--c-navy); letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 0.1rem; }
.tile-meta { font-size: 0.74rem; color: var(--c-text-soft); }

/* Stat-Card-Link (anklickbar) */
.stat-card-link { text-decoration: none; display: block; transition: border-color 0.12s; }
.stat-card-link:hover { border-color: var(--c-red); }

.print-map-only { display: none; }

/* ====== Roadmap ====== */
.roadmap { list-style: none; counter-reset: step; background: var(--c-paper); border: 1px solid var(--c-line); padding: 0.8rem 1.2rem; }
.roadmap li { counter-increment: step; position: relative; padding: 0.3rem 0 0.3rem 2.2rem; font-size: 0.88rem; color: var(--c-text); border-bottom: 1px solid var(--c-line-soft); }
.roadmap li:last-child { border-bottom: none; }
.roadmap li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0.3rem; font-size: 0.82rem; font-weight: 700; color: var(--c-red); font-feature-settings: "tnum"; }
.roadmap li strong { color: var(--c-black); font-weight: 700; }
.roadmap li.done { color: var(--c-text-soft); }
.roadmap li.done::before { color: var(--c-text-muted); content: "✓"; }

.print-map-only { display: none; }

/* ====== Karte (Leaflet) ====== */
.cm-map { border: 1px solid var(--c-line); border-radius: 2px; background: #f6f6f4; margin: 0.4rem 0 0.8rem 0; z-index: 1; }
.cm-marker-wrap { background: transparent !important; border: none !important; }
.cm-marker { width: 26px; height: 26px; border-radius: 50%; background: var(--c-red); color: white; display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 2px 4px rgba(0,0,0,0.35); border: 2px solid white; }
.leaflet-popup-content { font-family: var(--f-body); font-size: 0.86rem; margin: 0.5rem 0.7rem; }
.leaflet-popup-content a { color: var(--c-red); }
.leaflet-container { font-family: var(--f-body); }
.map-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem; font-size: 0.82rem; }
.map-toolbar .legend-item { display: inline-flex; align-items: center; gap: 0.25rem; }
.map-toolbar .legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid white; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }

.print-map-only { display: none; }

/* ====== Trip-Status ====== */
.status-flow { display: flex; gap: 0.25rem; flex-wrap: wrap; align-items: center; margin: 0.4rem 0 0.8rem 0; font-size: 0.74rem; }
.status-flow .step { padding: 0.2rem 0.5rem; border-radius: 2px; background: var(--c-paper); border: 1px solid var(--c-line); color: var(--c-text-muted); }
.status-flow .step.current { background: var(--c-red); color: white; border-color: var(--c-red); font-weight: 600; }
.status-flow .step.done { background: #e3f3e1; color: #2d6a32; border-color: #b6dab1; }
.status-flow .arrow { color: var(--c-line); }

.print-map-only { display: none; }

/* ====== Trip-Karte ====== */
.trip-card { border: 1px solid var(--c-line); padding: 0.8rem 1rem; margin-bottom: 0.5rem; background: white; }
.trip-card:hover { border-color: var(--c-red); cursor: pointer; }
.trip-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; margin-bottom: 0.3rem; }
.trip-card-title { font-size: 1rem; font-weight: 600; }
.trip-card-meta  { color: var(--c-text-soft); font-size: 0.82rem; }

.print-map-only { display: none; }

/* ====== Sub-Nav (Törn-Detail) ====== */
.trip-subnav { display: flex; gap: 0; background: var(--c-paper-stripe); border: 1px solid var(--c-line); margin-bottom: 1rem; overflow-x: auto; flex-wrap: nowrap; }
.trip-subnav-link { padding: 0.55rem 0.9rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-text-soft); border-right: 1px solid var(--c-line); white-space: nowrap; transition: all 0.12s; border-bottom: 2px solid transparent; }
.trip-subnav-link:hover { color: var(--c-black); background: var(--c-hover); }
.trip-subnav-link.active { color: var(--c-red); border-bottom-color: var(--c-red); background: white; }
.trip-subnav-cockpit { color: var(--c-red); }
.trip-subnav-cockpit:hover { color: var(--c-black); }

.print-map-only { display: none; }

/* ====== Section-Kacheln (Cockpit) ====== */
.cockpit-section { margin-bottom: 1.2rem; }
.cockpit-section-title { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-text-soft); margin-bottom: 0.5rem; border-bottom: 1px solid var(--c-line); padding-bottom: 0.3rem; }
.cockpit-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; }
.cockpit-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; } /* Alias */
.cockpit-tile { display: flex; flex-direction: column; padding: 0.8rem 1rem; background: white; border: 1px solid var(--c-line); text-decoration: none; color: inherit; transition: border-color 0.12s; min-height: 80px; }
.cockpit-tile:hover { border-color: var(--c-red); }
.cockpit-tile-icon { font-size: 1.2rem; margin-bottom: 0.3rem; }
.cockpit-tile-title { font-size: 0.82rem; font-weight: 700; color: var(--c-black); }
.cockpit-tile-meta { font-size: 0.76rem; color: var(--c-text-soft); margin-top: 0.15rem; }
.cockpit-tile-primary { font-size: 0.88rem; font-weight: 600; color: var(--c-black); margin-top: 0.2rem; }
.cockpit-tile-secondary { font-size: 0.74rem; color: var(--c-text-soft); margin-top: 0.1rem; }
.cockpit-tile-bar { height: 3px; background: var(--c-line); margin-top: auto; padding-top: 0.5rem; }
.cockpit-tile-bar-fill { height: 3px; background: var(--c-red); transition: width 0.3s; }

.print-map-only { display: none; }

/* ====== Action-Tiles (Seiten wie Setup) ====== */
.action-tile { display: block; padding: 0.9rem 1.1rem; background: white; border: 1px solid var(--c-line); text-decoration: none; color: inherit; transition: border-color 0.12s; }
.action-tile:hover { border-color: var(--c-red); }

.print-map-only { display: none; }

/* ====== Section-Bereiche (Törn-Detail ausgeklappt) ====== */
.form-section-group { }
.section-group-head { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; background: var(--c-navy); color: white; cursor: pointer; margin-bottom: 0; }
.section-group-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.section-group-meta { font-size: 0.68rem; color: rgba(255,255,255,0.55); }

.print-map-only { display: none; }

/* ====== Sticky Top-Bar: Header + Nav + Hero als eine Einheit ====== */
.sticky-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Eigener Stacking-Context + kein Hintergrund-Bleed */
  isolation: isolate;
}
.sticky-topbar > * { position: static; }

.print-map-only { display: none; }

/* ====== Hero-Bilder ====== */
.section-hero {
  position: relative;   /* Containing block für .section-hero-overlay */
  width: 100%;
  height: 180px;
  background: var(--c-navy-mid) center/cover no-repeat;
  margin: 0;
  overflow: hidden;
  display: block;
}
.section-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,28,52,0.7) 0%, rgba(7,28,52,0.25) 100%);
}
.section-hero-content {
  position: absolute; bottom: 1rem; left: 2rem; z-index: 1;
}
.section-hero-title {
  font-family: var(--f-brand); font-size: 2.2rem; font-weight: 500;
  color: white; line-height: 1; text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.section-hero-rule {
  display: block; width: 48px; height: 2px;
  background: var(--c-red); margin-top: 0.5rem;
}

/* Sub-Hero: kleinere Hero für Sub-Seiten / Reports */
.sub-hero {
  position: relative; width: 100%;
  height: 100px;
  background: var(--c-navy-mid) center/cover no-repeat;
  margin: -1.4rem -2rem 1rem;
  width: calc(100% + 4rem);
  overflow: hidden;
}
.sub-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,28,52,0.75) 0%, rgba(7,28,52,0.2) 100%);
}
.sub-hero-content {
  position: absolute; bottom: 0.7rem; left: 2rem; z-index: 1;
}
.sub-hero-title {
  font-family: var(--f-brand); font-size: 1.4rem; font-weight: 500;
  color: white; line-height: 1;
}
.sub-hero-rule {
  display: block; width: 32px; height: 2px;
  background: var(--c-red); margin-top: 0.35rem;
}

.print-map-only { display: none; }

/* ====== Kiosk ====== */
.kiosk-card { max-width: 640px; margin: 2rem auto; border: 1px solid var(--c-line); padding: 2rem; background: white; }
.kiosk-section { margin-bottom: 1.5rem; }
.kiosk-section h2 { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: var(--c-navy); border-bottom: 2px solid var(--c-red); padding-bottom: 0.4rem; margin-bottom: 1rem; }

.print-map-only { display: none; }

/* ====== Tab-Bar ====== */
.tab-bar { display: flex; border-bottom: 2px solid var(--c-line); gap: 0; margin-bottom: 0; }
.tab-btn { padding: 0.45rem 1rem; border: none; background: none; cursor: pointer; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-text-soft); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; }
.tab-btn:hover { color: var(--c-black); }
.tab-btn.is-active { color: var(--c-red); border-bottom-color: var(--c-red); }

.print-map-only { display: none; }

/* ====== Vorlage-Karte (Mail) ====== */
.tpl-card { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.45rem 0.65rem; background: white; border: 1px solid var(--c-line); cursor: pointer; }
.tpl-card:hover { border-color: var(--c-red); }
.tpl-card.is-selected { border-color: var(--c-red); background: #fff5f5; }

.print-map-only { display: none; }

/* ====== Portrait-Thumbnails ====== */
.portrait-thumb { width: 32px; height: 32px; object-fit: cover; border: 1px solid var(--c-line); flex-shrink: 0; }
.portrait-initials { display: inline-flex; width: 32px; height: 32px; background: var(--c-paper-stripe); border: 1px solid var(--c-line); align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 600; color: var(--c-text-soft); flex-shrink: 0; }

.print-map-only { display: none; }

/* ====== Personen-Detail ====== */
.person-detail-head { display: flex; gap: 1.2rem; align-items: flex-start; margin-bottom: 1rem; }
.person-detail-portrait { width: 80px; height: 80px; object-fit: cover; border: 1px solid var(--c-line); flex-shrink: 0; }
.person-detail-portrait-placeholder { width: 80px; height: 80px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--c-line); }
.person-detail-meta { flex: 1; }
.person-detail-name { font-size: 1.4rem; font-weight: 700; color: var(--c-black); letter-spacing: -0.02em; line-height: 1.2; }
.person-detail-sub { font-size: 0.85rem; color: var(--c-text-soft); margin-top: 0.2rem; }

.print-map-only { display: none; }

/* ====== Responsive ====== */
@media (max-width: 720px) {
  .container { padding: 1rem 1rem; }
  .site-header { padding: 0 1rem; height: 48px; }
  .brand-name { font-size: 1.25rem; }
  .site-nav { padding: 0 1rem; overflow-x: auto; }
  .site-nav a { padding: 0.5rem 0.8rem; white-space: nowrap; }
  .form-grid, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
  .info-strip { flex-direction: column; gap: 0.5rem; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btn-push-right { margin-left: 0; }
  .search-input { max-width: 100%; }
  .section-hero { height: 120px; }
  .cockpit-tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

.print-map-only { display: none; }

/* ====== Drucken ====== */
@media print {
  .site-header, .site-nav, .site-footer, .toolbar, .btn, .breadcrumb { display: none !important; }
  .container { padding: 0; max-width: 100%; }
  table.data tbody tr:hover { background: transparent; }

  /* ── Leaflet-Karten im Druck ── */
  .cm-map         { display: none !important; }
  .print-map-only { display: block !important; }
  /* Statisches PNG stattdessen anzeigen */
    /* Layer-Control + Zoom-Buttons ausblenden */
  .leaflet-control-layers,
  .leaflet-control-zoom { display: none !important; }
  /* Attribution sichtbar (OSM-Pflicht) */
  .leaflet-control-attribution {
    display: block !important;
    font-size: 7pt !important;
    background: rgba(255,255,255,.85) !important;
  }
  /* Popups beim Druck schliessen */
  .leaflet-popup { display: none !important; }
  /* Karten-Modus-Wähler ausblenden */
  a[href*="map_mode"] { display: none !important; }
  /* form-section: kein Seitenumbruch mitten drin */
  .form-section { page-break-inside: avoid; }
}

.print-map-only { display: none; }

/* ====== Sonstige ====== */
.ui-toggle-pill { display: none; } /* Entfernt — Portraits/Flags immer sichtbar */

.print-map-only { display: none; }

/* ====== Readonly-Modus (Nur-Lese-Berechtigung) ====== */
.readonly-mode input,
.readonly-mode select,
.readonly-mode textarea {
  background: var(--c-paper-stripe) !important;
  border-color: var(--c-line) !important;
  color: var(--c-text-soft) !important;
  pointer-events: none;
  cursor: not-allowed;
}
.readonly-mode input[type="checkbox"],
.readonly-mode input[type="radio"] {
  pointer-events: none; opacity: 0.6;
}
.readonly-mode .btn-primary,
.readonly-mode .btn-danger,
.readonly-mode button[type="submit"] { display: none !important; }
.readonly-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--c-text-soft); background: var(--c-paper-stripe);
  border: 1px solid var(--c-line); padding: 0.2rem 0.6rem; margin-bottom: 0.8rem;
}
.tile-locked { opacity:0.45; pointer-events:none; cursor:not-allowed; position:relative; }
.tile-locked::after { content:'🔒'; position:absolute; top:0.4rem; right:0.4rem; font-size:0.9rem; }
