/* =====================================================================
   TTA-Reisen — gemeinsames Stylesheet
   Design-Tokens + wiederverwendbare Bausteine für alle Seiten, damit
   nicht jede Datei ihre eigene Kopie mitschleppt.
   ===================================================================== */

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

:root {
  --ink: #191C2E;
  --ink-soft: #6B7089;
  --ink-faint: #9A9DB0;
  --gold: #C89B3C;
  --gold-deep: #9C7526;
  --gold-bg: #FBF3E3;
  --red: #E5484D;
  --red-bg: #FEECEC;
  --red-text: #C22E32;
  --green: #1E9E5A;
  --green-bg: #E9F9F0;
  --green-text: #187A45;
  --blue: #2F6FE0;
  --blue-bg: #EAF1FD;
  --blue-text: #1F52AA;
  --line: #EEEDE8;
  --page: #FCFBF9;
  --shell: #E9E7E1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', monospace; }

a { color: inherit; text-decoration: none; }

.container { max-width: 1160px; margin: 24px auto; padding: 0 20px; }
.container-narrow { max-width: 680px; margin: 24px auto; padding: 0 20px; }

/* ---------- Topbar (in navbar.php) ---------- */
.topbar {
  background: #fff;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.brand span { color: var(--gold); }
.navlinks { display: flex; gap: 0; align-items: center; }
.navlinks a { color: var(--ink-soft); font-size: 13.5px; font-weight: 500; padding: 8px 0; position: relative; margin-left: 22px; }
.navlinks a.active { color: var(--ink); font-weight: 700; }
.navlinks a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--gold); border-radius: 2px; }
.navlinks a.logout { color: var(--ink-faint); }
@media (max-width: 780px) {
  .topbar { padding: 0 16px; }
  .navlinks a:not(.active):not(.logout) { display: none; }
}

/* ---------- Page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px 0; letter-spacing: -0.015em; }
.page-head .sub { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- Panels / cards ---------- */
.panel { background: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(25,28,46,0.04), 0 4px 16px rgba(25,28,46,0.05); margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.panel-head h2, .panel h3 { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.panel-head a.link, .link { font-size: 12.5px; color: var(--gold-deep); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 10px 18px; border-radius: 10px; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; transition: transform 0.05s ease, box-shadow 0.15s ease; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 2px 8px rgba(200,155,60,0.35); }
.btn-primary:hover { box-shadow: 0 3px 12px rgba(200,155,60,0.45); }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: #DDDBD2; }
.btn-danger { background: var(--red-bg); color: var(--red-text); }
.btn-danger:hover { background: #FCE0E1; }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

/* ---------- Tags / badges ---------- */
.tag { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.tag-ok, .tag-success { background: var(--green-bg); color: var(--green-text); }
.tag-full, .tag-danger { background: var(--red-bg); color: var(--red-text); }
.tag-pending, .tag-warning { background: var(--gold-bg); color: var(--gold-deep); }
.tag-info { background: var(--blue-bg); color: var(--blue-text); }
.tag-neutral { background: #F1F0EB; color: var(--ink-soft); }

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 9px; }
.dot-gold { background: var(--gold); }
.dot-red { background: var(--red); }
.dot-green { background: var(--green); }

/* ---------- Rows (dashboard-style lists) ---------- */
.row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.row:last-child { border-bottom: none; padding-bottom: 0; }
.row:first-child { padding-top: 0; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 22px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { font-size: 13px; font-weight: 500; padding: 0 0 12px 0; color: var(--ink-soft); position: relative; cursor: pointer; background: none; border: none; font-family: inherit; }
.tab.active { color: var(--ink); font-weight: 700; }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); border-radius: 2px; }

/* ---------- Tables (list pages) ---------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th { text-align: left; padding: 10px 14px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); text-transform: none; border-bottom: 1px solid var(--line); }
table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr.clickable { cursor: pointer; }
table.data-table tr.clickable:hover td { background: #FAF9F5; }
table.data-table tr.row-danger td { background: var(--red-bg); }
table.data-table tr.row-warning td { background: var(--gold-bg); }
table.data-table tr.row-muted td { opacity: 0.55; }

/* ---------- Forms ---------- */
label.field-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 12px; color: var(--ink-soft); }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="email"], input[type="url"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; box-sizing: border-box;
  font-family: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
.field-group { margin-bottom: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 13.5px; font-weight: 500; }
.alert-success { background: var(--green-bg); color: var(--green-text); }
.alert-error { background: var(--red-bg); color: var(--red-text); }
.alert-info { background: var(--blue-bg); color: var(--blue-text); }

/* ---------- Modal ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(25,28,46,0.45); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(25,28,46,0.25); }
.modal-close { position: absolute; top: 18px; right: 20px; font-size: 22px; color: var(--ink-faint); cursor: pointer; border: none; background: none; }

/* ---------- Counter / stat block ---------- */
.stat-block { text-align: center; padding: 28px; border-radius: 14px; color: #fff; }
.stat-block.stat-green { background: linear-gradient(135deg, #1E9E5A, #147A44); }
.stat-block.stat-red { background: linear-gradient(135deg, #E5484D, #B7333A); }
.stat-block.stat-gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); }
.stat-num { font-size: 44px; font-weight: 800; display: block; line-height: 1; }
.stat-label { font-size: 12.5px; opacity: 0.85; margin-top: 4px; }

/* ---------- Misc ---------- */
.pnr-pill { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--gold-deep); background: var(--gold-bg); padding: 4px 9px; border-radius: 6px; font-size: 12.5px; }
.text-soft { color: var(--ink-soft); }
.text-danger { color: var(--red-text); }
