/* =====================================================================
   Bandel Kundenportal – Unified Design System
   Colors: #00669a (blue) · #ff9900 (orange) · #47b36f (green)
   Font: Poppins
   ===================================================================== */

/* ── 1. CSS Custom Properties ─────────────────────────────────────── */
:root {
  --c-primary:        #00669a;
  --c-primary-dark:   #004d73;
  --c-primary-light:  #e6f2f8;
  --c-accent:         #ff9900;
  --c-accent-dark:    #cc7a00;
  --c-success:        #47b36f;
  --c-success-light:  #eaf6ef;
  --c-danger:         #c0392b;
  --c-danger-light:   #fdecea;
  --c-warning:        #f39c12;
  --c-warning-light:  #fef6e4;
  --c-neutral:        #6b7280;
  --c-text:           #1e2329;
  --c-text-muted:     #6b7280;
  --c-text-light:     #9ca3af;
  --c-bg:             #f0f4f8;
  --c-surface:        #ffffff;
  --c-border:         #e2e8f0;
  --c-border-light:   #f1f5f9;

  --radius-sm:  0.375rem;
  --radius:     0.5rem;
  --radius-lg:  0.75rem;
  --radius-xl:  1rem;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow:     0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.10);

  --gap-sm:   0.75rem;
  --gap:      1.25rem;
  --gap-lg:   2rem;

  --trans: 0.2s ease;
}

/* ── 2. Base Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-width: 320px;
  line-height: 1.5;
}

img, svg { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; }

/* ── 3. Layout Container ──────────────────────────────────────────── */
/* max-width and padding match the header's .inner so content edges
   align with the logo (left) and user icon (right) on all viewports. */
.p-container {
  max-width: 105em;
  margin-inline: auto;
  padding-inline: max(1rem, 3.5%);
}

/* ── 4. Grid System ──────────────────────────────────────────────── */
.p-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .p-grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .p-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .p-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .p-grid--sidebar { grid-template-columns: 280px 1fr; gap: var(--gap-lg); }
  .p-grid--sidebar-sm { grid-template-columns: 220px 1fr; gap: var(--gap-lg); }
}
.p-col-full  { grid-column: 1 / -1; }
@media (min-width: 640px)  { .p-col-full--md { grid-column: 1 / -1; } }

/* ── 5. Cards ────────────────────────────────────────────────────── */
.p-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.p-card--overflow-visible { overflow: visible; }
.p-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--c-border-light);
}
.p-card__header h2,
.p-card__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-primary);
  letter-spacing: 0.01em;
}
.p-card__body   { padding: 1.25rem; }
.p-card__footer {
  padding: 0.75rem 1.25rem;
  background: var(--c-border-light);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ── 6. Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--trans), box-shadow var(--trans), transform var(--trans);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn img { height: 1.1em; }

.btn--primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,153,0,.3);
}
.btn--primary:hover  { background: var(--c-accent-dark); }

.btn--blue {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,102,154,.25);
}
.btn--blue:hover { background: var(--c-primary-dark); }

.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}
.btn--outline:hover { background: var(--c-primary-light); }

.btn--ghost {
  background: transparent;
  color: var(--c-text-muted);
  border: 1.5px solid var(--c-border);
}
.btn--ghost:hover { background: var(--c-bg); color: var(--c-text); }

.btn--danger {
  background: var(--c-danger);
  color: #fff;
}
.btn--danger:hover { background: #a93226; }

.btn--success {
  background: var(--c-success);
  color: #fff;
}
.btn--sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn--lg { padding: 0.7rem 1.5rem; font-size: 1rem; }
.btn--full { width: 100%; justify-content: center; }

.btn--disabled,
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Keep backward compat with existing .button class */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--trans);
  white-space: nowrap;
}
.button:hover { background: var(--c-accent-dark); }
.button img   { height: 1.1em; }

/* ── 7. Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge--success  { background: var(--c-success-light); color: #2d7a4f; }
.badge--warning  { background: var(--c-warning-light); color: #a87102; }
.badge--danger   { background: var(--c-danger-light);  color: var(--c-danger); }
.badge--info     { background: var(--c-primary-light); color: var(--c-primary-dark); }
.badge--neutral  { background: #f1f5f9; color: var(--c-neutral); }
.badge--accent   { background: #fff4e5; color: #b36000; }

/* ── 8. Stats Row ────────────────────────────────────────────────── */
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-card__icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--c-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.stat-card__icon img { height: 1.1rem; }
.stat-card__value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.1;
}
.stat-card__label {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ── 9. Welcome Banner ───────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap-lg);
}
.welcome-banner h1 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 700;
  color: #fff;
}
.welcome-banner h1 span { font-weight: 300; }
.welcome-banner__meta {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.15rem;
}
.welcome-banner__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.welcome-banner__actions .btn--ghost {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.welcome-banner__actions .btn--ghost:hover { background: rgba(255,255,255,0.1); }

/* ── 10. Page Header / Back button row ───────────────────────────── */
.p-page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.p-page-header h1 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--c-text);
}
.p-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: background var(--trans), border-color var(--trans);
}
.p-back-btn:hover { background: var(--c-primary-light); border-color: var(--c-primary); }
.p-back-btn img { height: 1rem; }

/* ── 11. Order List Row ──────────────────────────────────────────── */
.order-list { display: flex; flex-direction: column; gap: 0.5rem; }

.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.9rem 1.1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--trans), box-shadow var(--trans), background var(--trans);
  text-decoration: none;
  color: inherit;
}
.order-row:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow);
  background: var(--c-primary-light);
}
@media (min-width: 540px) {
  .order-row {
    grid-template-columns: auto 1fr auto auto auto;
    gap: 0 1rem;
  }
}
.order-row__date   { font-size: 0.82rem; color: var(--c-text-muted); }
.order-row__number { font-weight: 600; font-size: 0.9rem; }
.order-row__items  { font-size: 0.82rem; color: var(--c-text-muted); }
.order-row__total  { font-weight: 700; color: var(--c-primary); font-size: 0.95rem; }
.order-row__arrow  {
  font-size: 1rem;
  color: var(--c-primary);
  font-weight: bold;
}
/* Article preview – spans full row width, clipped by CSS to available space */
.order-row__articles {
  grid-column: 1 / -1;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--c-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 0.3rem;
  border-top: 1px solid var(--c-border-light);
  margin-top: 0.15rem;
  line-height: 1.3;
}
@media (max-width: 539px) {
  .order-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "number total"
      "date   date"
      "arts   arts";
    row-gap: 0.15rem;
    column-gap: 0.75rem;
    padding: 0.8rem 0.9rem;
  }
  .order-row__number   { grid-area: number; }
  .order-row__total    { grid-area: total; text-align: right; }
  .order-row__date     { grid-area: date; }
  .order-row__articles { grid-area: arts; }
  .order-row__arrow    { display: none; }
}

/* ── 12. Horizontal Order Status Timeline ────────────────────────── */
.order-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}
.order-timeline::-webkit-scrollbar { height: 3px; }
.order-timeline::-webkit-scrollbar-track { background: var(--c-border-light); }
.order-timeline::-webkit-scrollbar-thumb { background: var(--c-primary-light); border-radius: 999px; }

.ot-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 110px;
  position: relative;
  text-align: center;
}
/* connector line */
.ot-step::before {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(-50% + 20px);
  right: calc(50% + 20px);
  height: 2px;
  background: var(--c-border);
  z-index: 0;
}
.ot-step:first-child::before { display: none; }
.ot-step--done::before    { background: var(--c-success); }
.ot-step--current::before { background: var(--c-success); }

.ot-step__dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-border);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: background var(--trans), border-color var(--trans);
}
.ot-step--done .ot-step__dot {
  background: var(--c-success);
  border-color: var(--c-success);
}
.ot-step--current .ot-step__dot {
  background: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 0 0 0 5px rgba(255,153,0,.22);
}
.ot-step--cancelled .ot-step__dot {
  background: var(--c-danger);
  border-color: var(--c-danger);
}
.ot-step__dot svg { width: 20px; height: 20px; fill: #fff; }
.ot-step__dot .ot-dot-inner {
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
}

.ot-step__label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--c-text-muted);
  margin-top: 0.55rem;
  line-height: 1.25;
}
.ot-step--done .ot-step__label    { color: var(--c-success); }
.ot-step--current .ot-step__label { color: var(--c-accent-dark); }
.ot-step--cancelled .ot-step__label { color: var(--c-danger); }

.ot-step__date {
  font-size: 0.78rem;
  color: var(--c-text-light);
  margin-top: 0.2rem;
  line-height: 1.35;
}

/* ── 13. Order Detail Info Grid ──────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 640px)  { .info-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .info-grid--3 { grid-template-columns: 1fr 1fr 1fr; } }

.info-block { }
.info-block__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  margin-bottom: 0.2rem;
}
.info-block__value {
  font-size: 0.9rem;
  color: var(--c-text);
  line-height: 1.5;
}
.info-block__value strong { color: var(--c-primary); }

/* ── 14. Article Cards (in order detail) ─────────────────────────── */
.article-list  { display: flex; flex-direction: column; gap: 0.5rem; }

.article-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.article-card__img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border-light);
  background: var(--c-bg);
}
.article-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border-light);
  color: var(--c-text-light);
  font-size: 1.25rem;
}
.article-card__name  { font-weight: 600; font-size: 0.875rem; }
.article-card__sku   { font-size: 0.75rem; color: var(--c-text-muted); margin-top: 0.1rem; }
.article-card__desc  { font-size: 0.78rem; color: var(--c-text-muted); }
.article-card__price {
  text-align: right;
  white-space: nowrap;
}
.article-card__price-val  { font-weight: 700; font-size: 0.95rem; color: var(--c-primary); }
.article-card__price-qty  { font-size: 0.75rem; color: var(--c-text-muted); }

/* ── 15. Document Accordion (modern) ─────────────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 0.4rem; }

.doc-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.doc-item__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  background: var(--c-surface);
  transition: background var(--trans);
  user-select: none;
  flex-wrap: wrap;
}
.doc-item__header:hover { background: var(--c-border-light); }
.doc-item__chevron {
  width: 1.2rem;
  height: 1.2rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.doc-item.open .doc-item__chevron { transform: rotate(180deg); }
.doc-item__type { font-weight: 600; font-size: 0.875rem; flex: 1; }
.doc-item__number { font-size: 0.8rem; color: var(--c-text-muted); }
.doc-item__actions { margin-left: auto; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.doc-item__body {
  display: none;
  padding: 1rem;
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
}
.doc-item.open .doc-item__body { display: block; }

.doc-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-bottom: 0.75rem; }
.doc-meta__item { font-size: 0.8rem; }
.doc-meta__item span { font-weight: 600; color: var(--c-primary); }

/* ── 16. Shipping Tracking Block ─────────────────────────────────── */
.tracking-block {
  background: var(--c-primary-light);
  border: 1px solid rgba(0,102,154,0.15);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tracking-block__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-primary);
}
.tracking-block__link {
  font-size: 0.82rem;
  color: var(--c-primary-dark);
  font-weight: 600;
  text-decoration: underline;
  word-break: break-all;
}

/* ── 17. Kaufdetails Strip ───────────────────────────────────────── */
.kauf-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.kauf-strip__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
}
.kauf-strip__item img {
  height: 1.1rem;
  opacity: 0.65;
}
.kauf-strip__item strong { color: var(--c-primary); }

/* ── 18. Section Headings ────────────────────────────────────────── */
.p-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
  margin: 0 0 0.6rem;
}

/* ── 19. Storno / Success Banners ────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  border: 1px solid transparent;
  margin-bottom: 1rem;
}
.alert--success {
  background: var(--c-success-light);
  border-color: rgba(71,179,111,.3);
  color: #1e5e38;
}
.alert--danger {
  background: var(--c-danger-light);
  border-color: rgba(192,57,43,.3);
  color: var(--c-danger);
}
.alert--warning {
  background: var(--c-warning-light);
  border-color: rgba(243,156,18,.3);
  color: #7a5200;
}
.alert--info {
  background: var(--c-primary-light);
  border-color: rgba(0,102,154,.2);
  color: var(--c-primary-dark);
}
.alert__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }
.alert__body { flex: 1; }
.alert__title { font-weight: 700; display: block; }
.alert__close {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  color: inherit;
  flex-shrink: 0;
}
.alert__close:hover { opacity: 1; }

/* ── 20. Form Improvements ───────────────────────────────────────── */
.p-form { display: contents; }
.p-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.p-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text);
}
.p-label .required { color: var(--c-danger); margin-left: 0.2rem; }
.p-input,
.p-select,
.p-textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color var(--trans), box-shadow var(--trans);
  box-sizing: border-box;
}
.p-input:focus,
.p-select:focus,
.p-textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(0,102,154,.12);
}
.p-textarea { resize: vertical; min-height: 80px; }
.p-select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%236b7280" d="M4 6l4 4 4-4"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 14px;
  padding-right: 2.2rem;
}

/* ── 21. Loading Spinner (brand-themed) ──────────────────────────── */
.p-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 1rem;
  color: var(--c-text-muted);
  font-size: 0.875rem;
}
.p-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: p-spin 0.8s linear infinite;
}
@keyframes p-spin { to { transform: rotate(360deg); } }

/* ── 22. Personal Data Section ───────────────────────────────────── */
.data-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--c-border-light);
  flex-wrap: wrap;
}
.data-section:last-child { border-bottom: none; }
.data-section__label { font-weight: 600; font-size: 0.875rem; }
.data-section__hint  { font-size: 0.78rem; color: var(--c-text-muted); margin-top: 0.1rem; }

/* ── 23. Address Cards ───────────────────────────────────────────── */
.address-card { font-size: 0.875rem; line-height: 1.8; }
.address-card address { font-style: normal; }
.address-card__edit {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--c-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--c-primary);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: background var(--trans);
}
.address-card__edit:hover { background: var(--c-primary-light); }

/* ── 24. Storno badge on timeline ────────────────────────────────── */
.storno-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  background: var(--c-danger-light);
  color: var(--c-danger);
  border: 1px solid rgba(192,57,43,.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── 25. Retoure button row ──────────────────────────────────────── */
.action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0 0;
}
.action-row .error-msg { font-size: 0.82rem; color: var(--c-danger); }

/* ── 26. Link action ─────────────────────────────────────────────── */
.link-action {
  font-size: 0.82rem;
  color: var(--c-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.link-action:hover { text-decoration: underline; }

/* ── 27. Responsive Table wrapper ───────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.p-table { width: 100%; border-collapse: collapse; }
.p-table th {
  text-align: left;
  padding: 0.6rem 0.85rem;
  background: var(--c-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.p-table th:last-child,
.p-table td:last-child { text-align: right; }
.p-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--c-border-light);
  font-size: 0.875rem;
  vertical-align: middle;
}
.p-table tr:last-child td { border-bottom: none; }
.p-table tr:hover td { background: var(--c-bg); }

/* ── 28. Notifications (fixed bottom) ────────────────────────────── */
#notification, #notificationerror, #notificationconst {
  left: 50% !important;
  transform: translateX(-50%) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  padding: 0.75rem 1.25rem !important;
  border: none !important;
}

/* ── 29. Global main padding ─────────────────────────────────────── */
main.p-main {
  padding: 1.5rem 0 3rem;
  flex: 1 0 auto;
}

/* ── 30. Responsive utilities ────────────────────────────────────── */
@media (max-width: 639px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 640px) {
  .hide-desktop { display: none !important; }
}

/* ── 30a. Mobile: fade hint on scrollable order timeline ────────── */
@media (max-width: 739px) {
  .p-card__body:has(> .order-timeline) {
    position: relative;
  }
  .p-card__body:has(> .order-timeline)::after {
    content: "›";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 42px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, var(--c-surface) 65%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    color: var(--c-primary);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
  }
}

/* ── 30c. Mobile: stacked article table ─────────────────────────── */
@media (max-width: 639px) {
  .table-wrap { overflow-x: visible; }
  .table-wrap .p-table,
  .table-wrap .p-table thead,
  .table-wrap .p-table tbody,
  .table-wrap .p-table tfoot,
  .table-wrap .p-table tr,
  .table-wrap .p-table td {
    display: block;
    width: 100%;
  }
  .table-wrap .p-table thead { display: none; }
  .table-wrap .p-table tr {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.5rem;
    background: var(--c-surface);
  }
  .table-wrap .p-table tbody tr:last-child { margin-bottom: 0.75rem; }
  .table-wrap .p-table td {
    border: none !important;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    text-align: right;
  }
  .table-wrap .p-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--c-text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    flex: 0 0 auto;
  }
  .table-wrap .p-table td:first-child {
    border-bottom: 1px solid var(--c-border-light) !important;
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
  }
  .table-wrap .p-table td:first-child::before { display: none; }
  .table-wrap .p-table td:first-child {
    font-weight: 600;
    color: var(--c-text);
    justify-content: flex-start;
    text-align: left;
  }
  .table-wrap .p-table tfoot tr {
    background: var(--c-primary-light);
    border-color: var(--c-primary-light);
  }
  .table-wrap .p-table tfoot td[colspan] { display: none; }
}

/* ── 30b. Header mobile: compact logo + icon-only help button ───── */
@media (max-width: 619px) {
  header .logo h3 { display: none; }
  header .user-actions .button > span { display: none; }
  header .user-actions .button {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    background-color: var(--c-accent);
    color: #fff;
  }
  header .user-actions .button svg { margin: 0; width: 1.1rem; height: 1.1rem; }
}

/* ── 30d. Footer polish ─────────────────────────────────────────── */
footer {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%) !important;
  color: #fff;
  padding: 1.25em 0 !important;
  margin-top: 2rem;
}
footer .inner {
  max-width: 105em;
  margin-inline: auto;
  padding-inline: max(1rem, 3.5%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em 1em;
}
footer p {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.85;
}
footer .nav-footer {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}
footer .nav-footer a {
  color: #fff;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 0.35em 0.6em;
  border-radius: var(--radius-sm);
  transition: background var(--trans);
}
footer .nav-footer a:hover {
  background: rgba(255,255,255,0.12);
  text-decoration: none;
}
@media (max-width: 539px) {
  footer .inner { justify-content: center; text-align: center; }
  footer .nav-footer { margin-left: 0; justify-content: center; }
}

/* ── 30e. Info / static-content pages (Kontakt, Datenschutz, …) ─ */
.p-prose {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--c-text);
}
.p-prose h1,
.p-prose h2,
.p-prose h3,
.p-prose h4 {
  color: var(--c-primary);
  font-weight: 600;
  margin: 1.25em 0 0.5em;
  line-height: 1.3;
}
.p-prose h1 { font-size: 1.4rem; margin-top: 0; }
.p-prose h2 { font-size: 1.15rem; }
.p-prose h3 { font-size: 1rem; }
.p-prose h4 { font-size: 0.9rem; }
.p-prose p { margin: 0 0 0.75em; }
.p-prose a { color: var(--c-primary); text-decoration: underline; word-break: break-word; }
.p-prose a:hover { color: var(--c-primary-dark); }
.p-prose ul,
.p-prose ol { margin: 0 0 0.75em 1.25em; padding: 0; }
.p-prose li { margin-bottom: 0.25em; }
.p-prose strong { color: var(--c-text); }
.p-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0;
  font-size: 0.85rem;
}
.p-prose table td,
.p-prose table th {
  padding: 0.5em 0.75em;
  border: 1px solid var(--c-border);
  vertical-align: top;
  text-align: left;
}
.p-prose table th { background: var(--c-primary-light); color: var(--c-primary-dark); }
.p-prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.p-prose hr { border: 0; border-top: 1px solid var(--c-border); margin: 1.5em 0; }
.p-prose blockquote {
  margin: 0.75em 0;
  padding: 0.6em 1em;
  border-left: 3px solid var(--c-primary);
  background: var(--c-primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-text);
}
.p-prose code {
  background: var(--c-border-light);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
}

/* ── 30f. Form rows / fields / alerts (used by Edit + Kontaktformular) ─ */
.p-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
  margin-bottom: 0.9rem;
}
.p-form__row:last-child { margin-bottom: 0; }
.p-form__field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.p-form__field--wide { grid-column: 1 / -1; }
.p-form__field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text);
}
.p-form__field input[type="text"],
.p-form__field input[type="email"],
.p-form__field input[type="tel"],
.p-form__field input[type="number"],
.p-form__field input[type="date"],
.p-form__field input[type="datetime-local"],
.p-form__field select,
.p-form__field textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color var(--trans), box-shadow var(--trans);
  box-sizing: border-box;
}
.p-form__field input:focus,
.p-form__field select:focus,
.p-form__field textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(0,102,154,.12);
}
.p-form__field input:disabled,
.p-form__field select:disabled,
.p-form__field textarea:disabled {
  background: var(--c-border-light);
  color: var(--c-text-muted);
  cursor: not-allowed;
}
.p-form__field textarea { min-height: 7em; resize: vertical; }
.p-form__field select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%236b7280" d="M4 6l4 4 4-4"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 14px;
  padding-right: 2.2rem;
}

@media (max-width: 560px) {
  .p-form__row { grid-template-columns: 1fr; }
  .p-form__field--wide { grid-column: auto; }
}

.p-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px solid transparent;
}
.p-alert--success {
  background: #e6f6ec;
  color: #1f7a3a;
  border-color: #b8e4c4;
}
.p-alert--danger {
  background: #fdecec;
  color: #b4232b;
  border-color: #f5b5b8;
}

/* ── 30g. Kontaktformular dynamic field blocks ───────────────────── */
.kf-field-block {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border-light);
  background: var(--c-surface);
  width: 100%;
  box-sizing: border-box;
}
.kf-field-block.alt { background: var(--c-border-light); }
.kf-field-block label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--c-text);
}
.kf-field-block .kf-infotext,
.kf-field-block p { font-size: 0.78rem; color: var(--c-text-muted); margin: 0 0 0.5rem; }
.kf-field-block input[type="text"],
.kf-field-block input[type="number"],
.kf-field-block input[type="date"],
.kf-field-block input[type="datetime-local"],
.kf-field-block textarea,
.kf-field-block select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  background: var(--c-surface);
  box-sizing: border-box;
}
.kf-field-block textarea { min-height: 6em; resize: vertical; }
.pflichtfeldtext {
  font-size: 0.72rem;
  color: var(--c-danger);
  margin-left: 0.4rem;
  font-weight: 500;
}

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.articles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.articles-table th,
.articles-table td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--c-border-light);
  white-space: nowrap;
  vertical-align: middle;
}
.articles-table th { background: var(--c-primary-light); color: var(--c-primary-dark); text-align: left; }
.articles-table img { max-width: 48px; max-height: 48px; border-radius: var(--radius-sm); }
.articles-table input[type="number"] { width: 5em; padding: 0.25rem 0.4rem; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
@media (max-width: 600px) {
  .articles-table th,
  .articles-table td { font-size: 0.78rem; padding: 0.3rem 0.35rem; }
}

/* ── 31. Rekla step header improvements ──────────────────────────── */
.rekla-steps {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
}

/* ── 32. Modal overlays (PickUp success, confirmation dialogs) ────── */
.p-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: p-modal-fade 160ms ease-out;
}
.p-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: p-modal-pop 180ms ease-out;
}
.p-modal__body {
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
}
.p-modal__footer {
  padding: 0.75rem 1.25rem;
  background: var(--c-border-light);
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.p-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: #e6f6ec;
  color: #1f7a3a;
  font-size: 1.75rem;
  font-weight: bold;
}
@keyframes p-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes p-modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ── 33. Cross-browser & responsive fixes ─────────────────────────── */
/* iOS Safari: prevent zoom-on-focus when input font-size < 16px */
.p-form input,
.p-form select,
.p-form textarea,
.kf-field-block input,
.kf-field-block select,
.kf-field-block textarea {
  font-size: 16px;
}
@media (min-width: 768px) {
  .p-form input,
  .p-form select,
  .p-form textarea,
  .kf-field-block input,
  .kf-field-block select,
  .kf-field-block textarea {
    font-size: 0.95rem;
  }
}

/* Touch target minimum: WCAG 2.5.5 Level AAA (44×44) */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .p-back-btn,
  .p-modal__footer .btn {
    min-height: 44px;
  }
  .p-form input,
  .p-form select,
  .p-form textarea {
    min-height: 44px;
  }
}

/* Card footer — allow wrap when many buttons crowd small screens */
.p-card__footer {
  flex-wrap: wrap;
}

/* Keyboard focus outlines */
.btn:focus-visible,
.p-back-btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}
.p-form input:focus-visible,
.p-form select:focus-visible,
.p-form textarea:focus-visible,
.kf-field-block input:focus-visible,
.kf-field-block select:focus-visible,
.kf-field-block textarea:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 1px;
}

/* iOS safe-area padding for main content (notches, home indicator).
   Kept additive so the original top/bottom padding from `main.p-main` survives. */
main.p-main {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: calc(3rem + env(safe-area-inset-bottom));
}

/* Safari pre-15.4 graceful fallback for :has() */
@supports not (selector(:has(*))) {
  .p-card__footer { justify-content: flex-end; }
}

/* ── 34. Cookie Consent Banner (DSGVO) ─────────────────────────────
   Fixed bottom-sheet on mobile, centered floating card on desktop.
   z-index above everything (notifications sit at 9999, we sit above). */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  padding: 0.75rem;
  padding-left: calc(0.75rem + env(safe-area-inset-left));
  padding-right: calc(0.75rem + env(safe-area-inset-right));
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  animation: cookie-banner-in 280ms ease-out both;
  pointer-events: none; /* only the inner card catches events */
}

.cookie-banner__inner {
  pointer-events: auto;
  margin: 0 auto;
  max-width: 44rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100dvh - 1.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cookie-banner--expanded .cookie-banner__inner {
  max-width: 52rem;
}

.cookie-banner__head {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.cookie-banner__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #fff4e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}

.cookie-banner__headtext { flex: 1; min-width: 0; }

.cookie-banner__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.25;
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--c-text);
}
.cookie-banner__text a {
  color: var(--c-primary);
  text-decoration: underline;
  font-weight: 600;
}
.cookie-banner__text a:hover { color: var(--c-primary-dark); }

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.cookie-banner__actions .btn { flex: 1 1 auto; justify-content: center; }

/* Category rows (detail view) */
.cookie-cats {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid var(--c-border-light);
  padding-top: 0.9rem;
}

.cookie-cat {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  background: var(--c-surface);
}
.cookie-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.cookie-cat__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-text);
}
.cookie-cat__desc {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--c-text-muted);
}
.cookie-cat__desc code {
  background: var(--c-border-light);
  padding: 0.05em 0.3em;
  border-radius: var(--radius-sm);
  font-size: 0.92em;
}
.cookie-cat__legal {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--c-text-light);
  font-style: italic;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-toggle__slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background var(--trans);
}
.cookie-toggle__slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform var(--trans);
}
.cookie-toggle input:checked + .cookie-toggle__slider {
  background: var(--c-success);
}
.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(18px);
}
.cookie-toggle input:focus-visible + .cookie-toggle__slider {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}
.cookie-toggle--locked .cookie-toggle__slider {
  background: var(--c-primary);
  cursor: not-allowed;
  opacity: 0.85;
}

/* Desktop layout — banner sits offset-from-bottom with room around it */
@media (min-width: 640px) {
  .cookie-banner {
    padding: 1.25rem;
    padding-left: calc(1.25rem + env(safe-area-inset-left));
    padding-right: calc(1.25rem + env(safe-area-inset-right));
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }
  .cookie-banner__inner { padding: 1.4rem 1.75rem; }
  .cookie-banner__actions { justify-content: flex-end; }
  .cookie-banner__actions .btn { flex: 0 0 auto; }
  .cookie-banner__title { font-size: 1.15rem; }
  .cookie-banner__text { font-size: 0.9rem; }
}

/* Put "Einstellungen" first so primary CTA stays on the right on desktop;
   on mobile the actions stack full-width, order matches source. */
@media (max-width: 539px) {
  .cookie-banner__actions { flex-direction: column-reverse; }
  .cookie-banner__actions .btn { width: 100%; min-height: 44px; }
}

@keyframes cookie-banner-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner { animation: none; }
}

/* ── 35. Tracking-Block: Status-Badge + Info-Tooltip ──────────────── */
.tracking-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}
.tracking-block__status {
  margin-left: auto;
  align-self: center;
}
.tracking-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  outline: none;
}
.tracking-info__icon {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(0,102,154,0.25);
  transition: background var(--trans), border-color var(--trans);
  user-select: none;
}
.tracking-info:hover .tracking-info__icon,
.tracking-info:focus .tracking-info__icon {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.tracking-info__tip {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  min-width: 14rem;
  max-width: min(22rem, 90vw);
  padding: 0.65rem 0.85rem;
  background: var(--c-text);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.45;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  white-space: pre-line;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--trans), transform var(--trans), visibility var(--trans);
  z-index: 50;
  pointer-events: none;
}
.tracking-info__tip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 0.6rem;
  border: 5px solid transparent;
  border-top-color: var(--c-text);
}
.tracking-info:hover .tracking-info__tip,
.tracking-info:focus .tracking-info__tip,
.tracking-info:focus-within .tracking-info__tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 539px) {
  .tracking-info__tip {
    right: auto;
    left: 0;
  }
  .tracking-info__tip::after {
    right: auto;
    left: 0.6rem;
  }
}

/* ── 36. Artikel-Card: Paket-Zuordnungs-Hinweis ──────────────────── */
.article-card__info { min-width: 0; }
.article-card__col-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  white-space: nowrap;
}
.article-card__paket {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  border: 1px solid rgba(0,102,154,0.18);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: help;
  outline: none;
  user-select: none;
}
.article-card__paket--pending {
  background: var(--c-warning-light);
  color: #a87102;
  border-color: rgba(243,156,18,0.25);
}
.article-card__paket-icon { font-size: 0.8rem; line-height: 1; }
.article-card__paket-text { font-size: 0.72rem; }
@media (max-width: 539px) {
  .article-card__paket { padding: 0.18rem 0.4rem; }
  .article-card__paket-text { font-size: 0.68rem; }
}

/* ── 37a. Zahlungsstatus-Block (Bezahlt / Jetzt bezahlen) ────────── */
.zahlungs-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.zahlungs-block__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--c-success);
  color: #fff;
}
.zahlungs-block__icon--accent {
  background: var(--c-accent);
  color: #fff;
}
.zahlungs-block__body {
  flex: 1;
  min-width: 0;
}
.zahlungs-block__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-text);
  letter-spacing: 0.01em;
}
.zahlungs-block__meta {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-top: 0.15rem;
  word-break: break-word;
}
.zahlungs-block__meta code {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.78rem;
  background: var(--c-border-light);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--c-text);
}
.zahlungs-block--paid {
  background: var(--c-success-light);
  border-color: rgba(71,179,111,0.35);
}
.zahlungs-block--paid .zahlungs-block__title { color: #1e5e38; }
.zahlungs-block--pending {
  background: #fff8ee;
  border-color: rgba(255,153,0,0.28);
}
.zahlungs-block--pending .zahlungs-block__title { color: var(--c-accent-dark); }
.zahlungs-block__cta { flex-shrink: 0; }
@media (max-width: 539px) {
  .zahlungs-block { padding: 0.75rem 0.85rem; }
  .zahlungs-block__cta { width: 100%; justify-content: center; }
}

/* ── 37. Noch-nicht-versendet Block ──────────────────────────────── */
.pending-shipment {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--c-warning-light);
  border: 1px solid rgba(243,156,18,0.25);
  border-radius: var(--radius);
}
.pending-shipment__title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a87102;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pending-shipment__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pending-shipment__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.55rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.pending-shipment__item-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  flex-shrink: 0;
}
.pending-shipment__item-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--c-text-light);
}
.pending-shipment__item-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pending-shipment__item-qty {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

/* ── 38. Service-Strip (Kontakt am Bestellstatus) ────────────────── */
.service-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.1rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--c-border-light);
  font-size: 0.82rem;
}
.service-strip__label {
  color: var(--c-text-muted);
  font-weight: 500;
}
.service-strip__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--c-primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--trans);
}
.service-strip__link:hover {
  color: var(--c-primary-dark);
  text-decoration: underline;
}
.service-strip__cta { margin-left: auto; }
@media (max-width: 539px) {
  .service-strip__cta { margin-left: 0; width: 100%; justify-content: center; }
}

/* ── 38a. Kontaktformular Redesign ───────────────────────────────── */
.kf-section .p-card__header h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.kf-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.kf-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: var(--gap);
}
@media (max-width: 539px) {
  .kf-actions { justify-content: stretch; }
  .kf-actions .btn { flex: 1; justify-content: center; }
}

.kf-field-block--info {
  background: var(--c-primary-light);
  border-color: rgba(0,102,154,0.18);
}
.kf-info-content {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--c-text);
  margin-top: 0.4rem;
}
.kf-info-content p { margin: 0 0 0.5rem; }
.kf-info-content p:last-child { margin-bottom: 0; }
.kf-info-content a { color: var(--c-primary); }

/* Artikel-Auswahl als Liste statt Tabelle */
.kf-articles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.kf-article {
  display: grid;
  grid-template-columns: auto 48px 1fr auto;
  gap: 0.5rem 0.85rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color var(--trans), background var(--trans);
}
.kf-article--selected {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
}
.kf-article__check {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.kf-article__check input[type="checkbox"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.kf-article__check-box {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--trans), border-color var(--trans);
}
.kf-article__check input:checked + .kf-article__check-box {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.kf-article__check input:checked + .kf-article__check-box::after {
  content: '✓';
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}
.kf-article__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border-light);
  background: var(--c-bg);
}
.kf-article__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--c-text-light);
}
.kf-article__info { min-width: 0; }
.kf-article__name {
  font-weight: 600;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kf-article__desc {
  font-size: 0.78rem;
  color: var(--c-text-muted);
}
.kf-article__sku {
  font-size: 0.72rem;
  color: var(--c-text-muted);
  margin-top: 0.1rem;
}
.kf-article__qty {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}
.kf-article__qty label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
}
.kf-article__qty input[type="number"] {
  width: 4em;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.85rem;
  text-align: center;
  background: var(--c-surface);
}
.kf-article__qty-max {
  font-size: 0.7rem;
  color: var(--c-text-muted);
}
@media (max-width: 539px) {
  .kf-article {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "check info qty"
      "img info qty";
    gap: 0.35rem 0.6rem;
  }
  .kf-article__check { grid-area: check; align-self: start; }
  .kf-article__img { grid-area: img; width: 40px; height: 40px; }
  .kf-article__info { grid-area: info; }
  .kf-article__qty { grid-area: qty; }
  .kf-article__name { white-space: normal; }
}

/* File-Upload */
.kf-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.kf-upload__input { display: none; }
.kf-upload__btn { cursor: pointer; }
.kf-upload__count {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.kf-upload__progress {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.kf-upload__progress progress {
  flex: 1;
  height: 0.5rem;
  border: none;
  border-radius: 999px;
  overflow: hidden;
}
.kf-upload__progress progress::-webkit-progress-bar {
  background: var(--c-border-light);
  border-radius: 999px;
}
.kf-upload__progress progress::-webkit-progress-value {
  background: var(--c-primary);
  border-radius: 999px;
}
.kf-upload__error {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--c-danger);
}

/* ── 39. Retoure-Historie (frühere Retouren) ─────────────────────── */
.retoure-history {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.retoure-history__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.85rem;
  align-items: start;
  padding: 0.7rem 0.9rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius);
}
.retoure-history__date {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c-primary);
  white-space: nowrap;
}
.retoure-history__date img {
  height: 0.95rem;
  opacity: 0.7;
}
.retoure-history__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.retoure-history__count {
  font-size: 0.82rem;
  color: var(--c-text-muted);
}
.retoure-history__trackings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}
.retoure-history__tracking {
  font-size: 0.78rem;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.55rem;
  word-break: break-all;
}
.retoure-history__tracking-label {
  color: var(--c-text-muted);
  font-weight: 600;
  margin-right: 0.25rem;
}
@media (max-width: 539px) {
  .retoure-history__item {
    grid-template-columns: 1fr;
  }
}
