/* Tourenplan -- Stylesheet der oeffentlichen Partner-App (Kapitel 34).

   Dieselbe Formensprache wie VorabReady (templates/base.html und
   auth/login.html dort): Navy und Gold, heller Grund, weisse Karten mit
   Goldlinie, Kopfleiste 60px mit goldenem Unterstrich. Eigene Datei statt
   des Cockpit-Stylesheets: dessen Klassen sind fuer Seitenleiste und
   Kundenkontext gebaut und liessen die Partnerseiten kahl aussehen.

   Keine Inline-Styles in den Vorlagen: die CSP der App erlaubt nur diese
   Datei. */

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

:root {
  --navy: #1F4570;
  --navy-dark: #0B2D5D;
  --navy-mid: #305186;
  --gold: #D4A648;
  --gold-dark: #C1830A;
  --bg: #F4F6F9;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --linie: #e5e7eb;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}
a { color: var(--navy); }

/* ---- Kopfleiste ------------------------------------------------------ */
.navbar {
  background: var(--navy);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.navbar-logo img { height: 32px; }
.navbar-logo span {
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 0.3px;
  border-left: 1px solid rgba(255,255,255,0.3); padding-left: 14px;
}
.navbar-user {
  color: rgba(255,255,255,0.75); font-size: 13px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.navbar-user strong { color: #fff; font-weight: 600; }
.btn-leiste {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; padding: 6px 14px; border-radius: 6px; font-size: 13px;
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.btn-leiste:hover { background: rgba(255,255,255,0.2); }
.navbar form { display: inline; }

/* ---- Inhalt ---------------------------------------------------------- */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.container-sm { max-width: 520px; margin: 0 auto; padding: 32px 24px; }
h1 { font-size: 24px; color: var(--navy); font-weight: 700; margin-bottom: 6px; }
.untertitel { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.zurueck { display: inline-block; font-size: 13px; text-decoration: none; margin-bottom: 18px; }
.zurueck:hover { text-decoration: underline; }

.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 28px; margin-bottom: 20px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-bottom: 2px solid var(--gold); padding-bottom: 12px; margin-bottom: 18px;
}
.card-header h2 { font-size: 17px; color: var(--navy); font-weight: 700; }
.card-header p { font-size: 13px; color: var(--text-muted); }

/* ---- Knoepfe --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none; font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy); font-weight: 700; }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }

/* ---- Formulare ------------------------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--navy); margin-bottom: 7px;
}
.form-control {
  width: 100%; padding: 12px 14px; border: 2px solid var(--linie);
  border-radius: 8px; font-size: 15px; color: var(--text); background: #fff;
  font-family: inherit; -webkit-appearance: none;
}
.form-control:focus { outline: none; border-color: var(--navy); }
textarea.form-control { min-height: 84px; resize: vertical; }
.form-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-zeile-plz { grid-template-columns: 120px 1fr; }
.form-hinweis { font-size: 13px; color: var(--text-muted); margin-top: -8px; margin-bottom: 18px; }
code { background: #f0f2f5; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* ---- Meldungen ------------------------------------------------------- */
.flash {
  padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 12px;
  border-left: 4px solid;
}
.flash-error { background: #fce8e8; color: #c0392b; border-color: #e74c3c; }
.flash-info, .flash-success { background: #e8f4fd; color: var(--navy); border-color: var(--navy); }

/* ---- Tabellen -------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  background: var(--navy); color: #fff; padding: 10px 14px; text-align: left;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
th:first-child { border-radius: 6px 0 0 0; }
th:last-child { border-radius: 0 6px 0 0; }
td { padding: 11px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
tr:hover td { background: #f8f9fc; }
.leer { color: var(--text-muted); font-size: 14px; padding: 8px 0; }

/* ---- Abzeichen ------------------------------------------------------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
  vertical-align: middle; margin-left: 8px;
}
.badge-grau { background: #f0f0f0; color: #666; }
.badge-rot { background: #fce8e8; color: #c0392b; }
.badge-gold { background: #fff0d6; color: #b57a00; }

/* ---- Woche ----------------------------------------------------------- */
.tag { margin-bottom: 16px; }
.tag-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 2px solid var(--gold); padding-bottom: 10px; margin-bottom: 14px;
}
.tag-kopf h2 { font-size: 17px; color: var(--navy); font-weight: 700; }
.tag-gesperrt { opacity: 0.7; }
.belegt {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px;
  font-size: 13px; color: var(--text-muted); align-items: center;
}
.belegt span {
  background: #eceff3; color: #4b5563; border-radius: 6px; padding: 4px 10px;
  font-variant-numeric: tabular-nums;
}
.termin-zeit { font-weight: 700; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.termin-firma { font-weight: 600; }
.klein { font-size: 13px; color: var(--text-muted); }

/* ---- Anmeldeseite: zweigeteilt wie bei VorabReady ------------------- */
body.anmeldung { display: grid; grid-template-columns: 1fr 1fr; }
.login-brand {
  background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy) 60%, #2a5a8a 100%);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 60px 48px; position: relative; overflow: hidden;
}
.login-brand::before {
  content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
  border: 1px solid rgba(212,166,72,0.15); top: -100px; right: -200px;
}
.login-brand::after {
  content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid rgba(212,166,72,0.1); bottom: -80px; left: -80px;
}
.login-brand > * { position: relative; z-index: 1; }
.login-brand-logo { width: 260px; margin-bottom: 40px; }
.login-brand-divider { width: 60px; height: 3px; background: var(--gold); border-radius: 2px; margin: 0 auto 28px; }
.login-brand-headline { color: #fff; font-size: 30px; font-weight: 700; line-height: 1.2; text-align: center; margin-bottom: 14px; }
.login-brand-headline span { color: var(--gold); }
.login-brand-sub { color: rgba(255,255,255,0.72); font-size: 15px; text-align: center; line-height: 1.6; max-width: 340px; }
.login-brand-features { list-style: none; margin-top: 32px; }
.login-brand-features li {
  color: rgba(255,255,255,0.8); font-size: 14px; padding: 8px 0;
  display: flex; align-items: center; gap: 10px;
}
.login-brand-features li::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0;
}
.login-form-wrap {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 60px 48px;
}
.login-box {
  background: #fff; border-radius: 14px; box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px; width: 100%; max-width: 420px;
}
.login-box h2 { font-size: 22px; color: var(--navy); font-weight: 700; margin-bottom: 6px; }
.login-box > p { color: var(--text-muted); font-size: 14px; margin-bottom: 26px; }
.login-box img.qr { display: block; margin: 0 auto 16px; width: 200px; height: 200px; }
.login-footer { margin-top: 28px; text-align: center; font-size: 12px; color: #9ca3af; }
.login-footer a { color: var(--navy); text-decoration: none; }

@media (max-width: 860px) {
  body.anmeldung { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-wrap { padding: 40px 20px; }
  .navbar { padding: 0 14px; flex-wrap: wrap; }
  .navbar-user > span { display: none; }
  .container, .container-sm { padding: 20px 14px; }
  .card { padding: 18px; }
  .form-zeile { grid-template-columns: 1fr; }
}
