/* PaketSpur – Stylesheet
   © 2026 PaketSpur (Inh. Calvin Bandle) */

:root {
  --navy: #12266b;
  --navy-700: #0d1c50;
  --navy-050: #eef1fb;
  --amber: #f6b23c;
  --amber-600: #d9931b;
  --ink: #1b2130;
  --muted: #5b6478;
  --line: #e2e6ef;
  --bg: #f5f6fa;
  --card: #ffffff;
  --green: #1f9d55;
  --red: #d64545;
  --blue: #2f6fed;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 26, 64, .06), 0 8px 30px rgba(16, 26, 64, .08);
  --maxw: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 38px; width: auto; }
.brand span {
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  letter-spacing: .2px;
}
.brand span b { color: var(--amber-600); font-weight: 700; }

.header-nav { display: flex; align-items: center; gap: 8px; }
.header-nav a.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 9px;
}
.header-nav a.nav-link:hover { color: var(--navy); background: var(--navy-050); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .04s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-amber { background: var(--amber); color: #23180a; }
.btn-amber:hover { background: var(--amber-600); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { background: var(--navy-050); }
.btn-danger { background: #fdecec; color: var(--red); border-color: #f5c9c9; }
.btn-danger:hover { background: #f9dcdc; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Hero / Tracking ---------- */
.hero {
  background: radial-gradient(1200px 400px at 80% -50%, rgba(246,178,60,.25), transparent 60%),
              linear-gradient(180deg, var(--navy), var(--navy-700));
  color: #fff;
  padding: 56px 0 64px;
}
.hero h1 { font-size: 34px; margin: 0 0 10px; line-height: 1.2; }
.hero p.lead { margin: 0 0 26px; color: #c9d2f2; font-size: 17px; max-width: 620px; }

.track-box {
  background: var(--card);
  color: var(--ink);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  max-width: 640px;
}
.track-box form { display: flex; gap: 10px; flex-wrap: wrap; }
.track-box label { font-weight: 600; font-size: 13px; color: var(--muted); display: block; margin-bottom: 8px; width: 100%; }
.track-box input[type="text"] {
  flex: 1 1 320px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
}
.track-box input[type="text"]:focus { outline: 2px solid var(--amber); border-color: var(--amber); }
.track-hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Sections / cards ---------- */
section.block { padding: 48px 0; }
section.block h2 { font-size: 24px; margin: 0 0 6px; color: var(--navy); }
section.block p.sub { margin: 0 0 26px; color: var(--muted); }

.card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature h3 { margin: 6px 0 4px; font-size: 17px; color: var(--navy); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature .ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--navy-050); color: var(--navy);
  display: grid; place-items: center; font-size: 20px;
}

/* ---------- Partner badges ---------- */
.partners { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.carrier-badge {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 18px; background: #fff; box-shadow: var(--shadow);
}
.carrier-badge img { height: 30px; width: auto; display: block; }

/* kleines Logo, z. B. im Verfolgungsergebnis */
.carrier-logo { height: 24px; width: auto; display: inline-block; vertical-align: middle; }

/* ---------- Tracking result ---------- */
.result { margin-top: 28px; }
.result-head {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 4px;
}
.result-head .tn { font-size: 13px; color: var(--muted); }
.result-head .tn strong { color: var(--ink); font-size: 18px; display: block; letter-spacing: .5px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 13px;
}
.status-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.s-created   { background: #eef1fb; color: #3b4a8c; }
.s-picked_up { background: #eaf5ff; color: #1d6fb8; }
.s-in_transit{ background: #fff3e0; color: #b9781a; }
.s-out_for_delivery { background: #e9f7ef; color: #1f7a44; }
.s-delivered { background: #e4f6ea; color: #157a3c; }
.s-exception { background: #fdecec; color: #c0392b; }
.s-returned  { background: #f1eaf6; color: #7d3aa8; }

.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; margin: 18px 0 6px; }
.kv div { font-size: 14px; color: var(--ink); }
.kv span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }

/* progress bar */
.track-progress { display: flex; margin: 22px 0 10px; }
.track-progress .step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--muted); }
.track-progress .step::before {
  content: ""; display: block; width: 16px; height: 16px; border-radius: 50%;
  background: var(--line); margin: 0 auto 8px; position: relative; z-index: 2;
}
.track-progress .step::after {
  content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 1;
}
.track-progress .step:first-child::after { display: none; }
.track-progress .step.done::before { background: var(--green); }
.track-progress .step.done::after { background: var(--green); }
.track-progress .step.current::before { background: var(--amber); box-shadow: 0 0 0 4px rgba(246,178,60,.25); }

/* timeline */
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 26px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; border: 3px solid var(--navy);
}
.timeline li:first-child::before { border-color: var(--amber); }
.timeline .t-date { font-size: 12px; color: var(--muted); }
.timeline .t-title { font-weight: 600; color: var(--ink); }
.timeline .t-loc { font-size: 13px; color: var(--muted); }

.notice {
  background: #fff8ec; border: 1px solid #f3dcae; color: #8a5a12;
  border-radius: 10px; padding: 14px 16px; font-size: 14px; margin-top: 20px;
}
.notice.error { background: #fdecec; border-color: #f2c6c6; color: #a5352b; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-700); color: #c7cfec; margin-top: 40px;
  padding: 40px 0 28px; font-size: 14px;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: #fff; font-size: 14px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .6px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #9fa9d0;
}

/* ---------- Legal pages ---------- */
.legal { background: var(--card); padding: 40px 0 60px; }
.legal .container { max-width: 820px; }
.legal h1 { color: var(--navy); font-size: 28px; margin-top: 0; }
.legal h2 { color: var(--navy); font-size: 19px; margin-top: 34px; }
.legal p, .legal li { color: #2b3244; }
.legal .updated { color: var(--muted); font-size: 13px; }

/* ---------- Manager ---------- */
.mgr { padding: 32px 0 60px; }
.mgr-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  justify-content: space-between; margin-bottom: 20px;
}
.mgr-toolbar .left { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mgr-search {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; min-width: 220px;
}

table.mgr-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.mgr-table th, table.mgr-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.mgr-table th { background: var(--navy-050); color: var(--navy); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
table.mgr-table tr:last-child td { border-bottom: none; }
table.mgr-table tr:hover td { background: #fafbff; }
table.mgr-table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .4px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Hilfe-Karte im Manager */
.help-card {
  background: var(--navy-050); border: 1px solid #d5ddf5; border-radius: 12px;
  padding: 18px 20px; margin-bottom: 22px;
}
.help-card h2 { margin: 0 0 10px; font-size: 16px; color: var(--navy); }
.help-card ol { margin: 0; padding-left: 20px; }
.help-card li { font-size: 14px; margin-bottom: 5px; color: #2b3350; }
.help-card .help-note {
  margin: 12px 0 0; font-size: 13px; color: var(--muted);
  border-top: 1px solid #d5ddf5; padding-top: 10px;
}

/* Formular-Hilfetexte */
small.fh, .fh { font-size: 12px; color: var(--muted); line-height: 1.45; }
fieldset.section legend .opt { font-weight: 400; color: var(--muted); font-size: 12px; }
.field label.check {
  display: flex; align-items: flex-start; gap: 8px; text-transform: none;
  font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.field label.check input { width: auto; margin-top: 2px; }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12,20,55,.55);
  display: none; align-items: flex-start; justify-content: center; padding: 30px 16px; z-index: 60; overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 760px;
  box-shadow: var(--shadow); animation: pop .12s ease;
}
@keyframes pop { from { transform: translateY(8px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; color: var(--navy); font-size: 18px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.icon-x { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 14px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--amber); border-color: var(--amber); }
.field textarea { resize: vertical; min-height: 64px; }
fieldset.section { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 18px; }
fieldset.section legend { padding: 0 8px; font-weight: 700; color: var(--navy); font-size: 13px; }

.events-editor { display: flex; flex-direction: column; gap: 10px; }
.event-row { display: grid; grid-template-columns: 150px 150px 1fr 1fr 36px; gap: 8px; align-items: center; }
.event-row input, .event-row select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.event-row .del { background: #fdecec; color: var(--red); border: 1px solid #f5c9c9; border-radius: 8px; cursor: pointer; height: 34px; }

.gate {
  max-width: 380px; margin: 60px auto; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 30px; box-shadow: var(--shadow); text-align: center;
}
.gate img { height: 46px; margin: 0 auto 14px; }
.gate h2 { margin: 0 0 6px; color: var(--navy); font-size: 20px; }
.gate p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.gate input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; text-align: center; letter-spacing: 3px; margin-bottom: 12px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90;
}
.toast.show { opacity: 1; }

.tag-count { background: var(--amber); color: #23180a; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .hero h1 { font-size: 27px; }
  .event-row { grid-template-columns: 1fr 1fr; }
  .header-nav .nav-link.hide-sm { display: none; }
  .track-progress .step { font-size: 10.5px; }
  table.mgr-table thead { display: none; }
  table.mgr-table, table.mgr-table tbody, table.mgr-table tr, table.mgr-table td { display: block; width: 100%; }
  table.mgr-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.mgr-table td { border: none; padding: 6px 14px; }
  table.mgr-table .actions { justify-content: flex-start; padding-top: 10px; }
}
