/* Kundenportal „Auftragsstatus“ – Stil angelehnt an Barnane_V2. */
:root {
  --accent: #36c6c3;
  --accent-hover: #63d8d5;
  --accent-soft: #dff7f5;
  --accent-tint: #eaf9f8;
  --accent-ink: #173f3e;
  --ink: #444444;
  --muted: #737373;
  --line: #dedede;
  --bg: #ffffff;
  --soft: #f4f4f4;
  --cream: #f5f3ef;
  --card: #ffffff;
  --footer: #3f4141;
  --blue: #1f6fd1;
  --blue-soft: #e8f1fc;
  --green: #1d9a57;
  --green-soft: #e5f6ec;
  --red: #c0392b;
  --radius: .65rem;
  --radius-sm: .4rem;
  --shadow: 0 .25rem 1.2rem #00000012;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(16px, .18vw + 15.5px, 18px);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; line-height: 1.5; }
button, input, textarea { font: inherit; }
a { color: var(--accent); }

/* Kopf – hell wie Barnane_V2 */
.cp-top {
  background: #fffffff7;
  backdrop-filter: blur(10px);
  color: var(--ink);
  border-bottom: 1px solid #00000014;
  box-shadow: 0 .25rem 1.2rem #00000012;
  padding: env(safe-area-inset-top) 0 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.cp-top-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.cp-logo { display: inline-flex; align-items: center; }
.cp-logo-img { display: block; width: auto; height: 40px; max-width: min(220px, 55vw); object-fit: contain; }
.cp-top-btn {
  background: transparent;
  color: #414646;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}
.cp-top-btn:hover { color: #176f6d; background: var(--accent-tint); border-color: transparent; }

/* Login */
.cp-login { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 0 0 24px; }
.cp-hero {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: center;
  padding: 36px 20px 76px;
}
.cp-hero h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 3vw, 2.2rem); color: var(--accent); line-height: 1.2; }
.cp-hero p { margin: 0; color: var(--muted); }
.cp-login-card { margin: -52px 16px 0; position: relative; }
.cp-field { display: block; margin-bottom: 16px; }
.cp-field > span { display: block; font-weight: 700; margin-bottom: 6px; }
.cp-field input, .cp-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 1.05rem;
  background: #fff;
  color: var(--ink);
}
.cp-field input:focus, .cp-field textarea:focus {
  outline: 3px solid rgba(54, 198, 195, .35);
  border-color: var(--accent);
}
.cp-field small { display: block; color: var(--muted); font-size: .82rem; margin-top: 6px; line-height: 1.35; }
.cp-help { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.cp-help summary { cursor: pointer; color: var(--accent); text-align: center; font-weight: 700; }
.cp-features { list-style: none; margin: 20px 16px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.cp-features li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 8px;
  box-shadow: none;
}
.cp-features b { display: block; font-size: .85rem; }
.cp-features span { display: block; font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* Bausteine */
.cp-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: .85rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-size: .98rem;
}
.cp-btn-primary { background: var(--accent); color: var(--accent-ink); }
.cp-btn-primary:hover { background: var(--accent-hover); }
.cp-btn-primary:disabled { opacity: .55; cursor: default; }
.cp-btn-ghost { background: #fff; color: #176f6d; border-color: var(--line); }
.cp-btn-ghost:hover { background: var(--accent-tint); border-color: transparent; }
.cp-btn-small { padding: 7px 12px; font-size: .88rem; }
.cp-btn-block { width: 100%; }
.cp-alert { background: #fdecea; color: #8a2a1e; border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px; font-size: .92rem; line-height: 1.4; }
.cp-alert-info { background: var(--accent-soft); color: #125d5b; }
.cp-alert-ok { background: var(--green-soft); color: #135f37; }
.cp-foot {
  text-align: center;
  color: #c9c9c9;
  background: var(--footer);
  font-size: .78rem;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}

/* App */
.cp-app { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 14px 12px 8px; display: grid; gap: 12px; background: var(--soft); }
.cp-body-app { background: var(--soft); }
.cp-loading { text-align: center; color: var(--muted); padding: 60px 0; }
.cp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cp-head h1 { margin: 0; font-size: 1.15rem; color: var(--ink); }
.cp-head .cp-jobno { text-align: right; font-size: .75rem; color: var(--muted); }
.cp-head .cp-jobno b { display: block; font-size: 1rem; color: var(--ink); }

.cp-notice {
  background: #fff8e8;
  border: 1px solid #e6c56a;
  border-left: 4px solid #c49212;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: .92rem;
  line-height: 1.45;
}
.cp-notice strong { display: block; margin-bottom: 4px; color: #6a4a00; font-size: .98rem; }
.cp-notice p { margin: 0; color: #5a4a22; }
.cp-notice b { color: #6a4a00; }

.cp-note-limits {
  background: #fff8e8;
  border: 1px solid #e6c56a;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: .88rem;
  line-height: 1.4;
  color: #5a4a22;
}
.cp-note-limits b { color: #6a4a00; }

.cp-status { display: flex; gap: 14px; align-items: flex-start; border-left: 4px solid var(--accent); }
.cp-status-icon { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: #176f6d; }
.cp-status-icon svg { width: 24px; height: 24px; }
.cp-status h2 { margin: 0 0 4px; font-size: 1.25rem; line-height: 1.25; }
.cp-status p { margin: 0; color: var(--muted); line-height: 1.4; }
.cp-tone-live { border-left-color: var(--blue); }
.cp-tone-live .cp-status-icon { background: var(--blue-soft); color: var(--blue); }
.cp-tone-soon, .cp-tone-done { border-left-color: var(--green); }
.cp-tone-soon .cp-status-icon, .cp-tone-done .cp-status-icon { background: var(--green-soft); color: var(--green); }

.cp-eta { display: flex; gap: 14px; align-items: center; background: var(--accent-soft); box-shadow: none; border: 1px solid #b8eae7; }
.cp-eta.cp-eta-live { background: var(--blue-soft); border-color: #c9ddf6; }
.cp-eta.cp-eta-soon { background: var(--green-soft); border-color: #bfe6cf; }
.cp-eta-icon { flex: 0 0 40px; color: var(--accent-ink); }
.cp-eta-label { font-size: .85rem; color: var(--muted); }
.cp-eta-main { font-size: 1.3rem; font-weight: 700; margin: 2px 0; }
.cp-eta-live .cp-eta-main { color: #124e99; }
.cp-eta-soon .cp-eta-main { color: #0f6e3c; font-size: 1.5rem; }
.cp-eta-sub { font-size: .9rem; color: var(--muted); }

.cp-map-card { padding: 0; overflow: hidden; }
.cp-map { height: 320px; background: var(--soft); }
.cp-map-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 12px 14px; font-size: .92rem; font-weight: 600; color: var(--ink, #1f2d3a); }
.cp-map-legend span { display: inline-flex; align-items: center; }
.cp-map-legend i { display: inline-block; width: 28px; height: 8px; border-radius: 4px; margin-right: 8px; }
.cp-map-note { margin: 0; padding: 12px 14px; font-size: .9rem; color: #125d5b; background: var(--accent-soft); }
.cp-marker { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.cp-marker svg { width: 18px; height: 18px; }
.cp-marker-driver { background: var(--blue); }
.cp-marker-dest { background: var(--red); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.cp-marker-dest svg { transform: rotate(45deg); }
.cp-marker-customer { background: var(--green); width: 22px; height: 22px; }
.cp-dot-driver { background: var(--blue); }
.cp-dot-dest { background: var(--red); }
.cp-dot-customer { background: var(--green); }

.cp-section-title { margin: 0 0 12px; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.cp-section-title svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--accent); }
svg { max-width: 100%; }

.cp-tl-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.cp-tl-group:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.cp-tl-group-head h4 { margin: 0 0 4px; font-size: 1.05rem; }
.cp-tl-group-meta { font-size: .9rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.cp-tl-group-addr { font-size: .82rem; color: var(--muted); line-height: 1.35; margin-bottom: 12px; }
.cp-tl-group-addr a { margin-left: .4rem; font-weight: 700; }
.cp-tl-current .cp-tl-group-head h4 { color: #125d5b; }
.cp-tl-done .cp-tl-group-head h4 { color: var(--green); }
.cp-tl-done-badge {
  margin-left: 8px; font-size: .72rem; font-weight: 700; color: var(--green);
  background: var(--green-soft); border-radius: 999px; padding: 2px 8px; vertical-align: 2px;
}
.cp-tl-done .cp-tl-group-meta { font-weight: 500; color: var(--muted); }

.cp-tl-compact { list-style: none; margin: 0; padding: 0; }
.cp-tl-compact li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 2px 0; font-size: .84rem; color: var(--muted);
}
.cp-tl-compact-label { display: inline-flex; align-items: center; gap: 6px; }
.cp-tl-compact-label svg { width: 13px; height: 13px; flex: 0 0 13px; color: var(--green); }
.cp-tl-compact .cp-tl-time { font-size: .8rem; }

.cp-timeline { list-style: none; margin: 0; padding: 0; }
.cp-timeline li { position: relative; padding: 0 0 16px 32px; }
.cp-timeline li::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: -2px; width: 2px; background: var(--line); }
.cp-timeline li:last-child { padding-bottom: 0; }
.cp-timeline li:last-child::before { display: none; }
.cp-timeline .cp-dot { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid #c3ccd6; display: grid; place-items: center; }
.cp-timeline .cp-done .cp-dot { background: var(--green); border-color: var(--green); color: #fff; }
.cp-timeline .cp-done::before { background: var(--green); }
.cp-timeline .cp-current .cp-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px rgba(54, 198, 195, .25); }
.cp-timeline .cp-dot svg { width: 12px; height: 12px; }
.cp-tl-row { display: flex; justify-content: space-between; gap: 8px; }
.cp-tl-label { font-weight: 600; }
.cp-todo .cp-tl-label { color: #8a96a3; font-weight: 500; }
.cp-tl-time { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.cp-tl-sub { font-size: .85rem; color: var(--muted); margin-top: 2px; }

.cp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.cp-note-intro { margin: 0 0 12px; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.cp-counter { text-align: right; font-size: .78rem; color: var(--muted); margin-top: -10px; margin-bottom: 10px; }
.cp-attach { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.cp-attach-btn {
  border: 1px dashed #b9c6d4;
  border-radius: var(--radius);
  background: var(--soft);
  padding: 10px;
  text-align: left;
  cursor: pointer;
  font-size: .85rem;
  color: var(--ink);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.cp-attach-btn b { display: block; color: #176f6d; font-size: .88rem; }
.cp-attach-btn small { color: var(--muted); }
.cp-attach-btn svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--accent); }
.cp-attach-btn input { display: none; }
.cp-preview { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 10px; font-size: .88rem; }
.cp-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: .35rem; }
.cp-preview button { margin-left: auto; background: none; border: none; color: var(--red); cursor: pointer; font-size: .85rem; }
.cp-privacy { font-size: .78rem; color: var(--muted); line-height: 1.4; margin: 10px 0 0; }
.cp-sent { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.cp-sent-item { background: var(--soft); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
.cp-sent-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: .85rem; }
.cp-sent-head b { font-size: .9rem; }
.cp-badge-ok { background: var(--green-soft); color: #135f37; border-radius: 999px; padding: 2px 8px; font-size: .78rem; font-weight: 600; }
.cp-badge-pending { background: #eef1f5; color: var(--muted); border-radius: 999px; padding: 2px 8px; font-size: .78rem; font-weight: 600; }
.cp-sent-text { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font-size: .92rem; }
.cp-sent-meta { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.cp-sent-meta img { width: 64px; height: 64px; object-fit: cover; border-radius: .35rem; }
.cp-noreply { font-size: .8rem; color: var(--muted); margin: 4px 0 0; }

.cp-avis-card { border: 1px solid #b8eae7; background: #f7fcfc; }
.cp-switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.cp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cp-switch-ui {
  flex: 0 0 48px; width: 48px; height: 28px; border-radius: 999px; background: #c9d2dd;
  position: relative; margin-top: 2px; transition: background .15s;
}
.cp-switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #00000033; transition: transform .15s;
}
.cp-switch input:checked + .cp-switch-ui { background: var(--accent); }
.cp-switch input:checked + .cp-switch-ui::after { transform: translateX(20px); }
.cp-switch input:focus-visible + .cp-switch-ui { outline: 3px solid rgba(54, 198, 195, .35); }
.cp-switch-text { display: grid; gap: 2px; }
.cp-switch-text b { font-size: .98rem; }
.cp-switch-text small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.cp-avis-body { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.cp-avis { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cp-avis-num { font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; }
.cp-avis small { display: block; color: var(--muted); font-size: .8rem; }
.cp-avis-form { display: flex; gap: 8px; margin-top: 10px; width: 100%; }
.cp-avis-form input { flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; }

.cp-expired { text-align: center; padding: 40px 22px; }
.cp-expired svg { width: 42px; height: 42px; color: #7d8a98; }
.cp-expired h2 { margin: 12px 0 8px; }
.cp-expired p { color: var(--muted); line-height: 1.5; }
.cp-updated { text-align: center; font-size: .78rem; color: var(--muted); }

@media (min-width: 720px) {
  .cp-app { grid-template-columns: 1fr 1fr; align-items: start; }
  .cp-span { grid-column: 1 / -1; }
  .cp-map { height: 380px; }
}

@media (max-width: 520px) {
  .cp-features { grid-template-columns: 1fr; }
}
