/* =========================================================================
   BETREIBERPORTAL & SUPER-ADMIN — Dashboard und Anmeldeseiten.
   Baut auf den Tokens aus styles.css auf („Edelstahl & Glut").

   ⚠️ Diese Datei benutzte bis 30.07.2026 die Variablen des alten hellen
   Designs (--creme, --espresso, --tomate, --paper, --line, --radius-*).
   Nach dem Redesign gab es die nicht mehr → sämtliche Farben fielen aus und
   Portal wie Super-Admin sahen zerschossen aus. Wer hier etwas ergänzt,
   nimmt ausschließlich die Variablen aus styles.css.
   Vorgänger liegt als portal.css.alt-design daneben.
   ========================================================================= */

/* ---------- Anmeldeseiten (Login, Passwort) ---------- */
.pa-body { min-height: 100vh; background: var(--void); }
.pa-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.25rem 3rem; gap: 1.6rem; }
.pa-logo { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; color: var(--chalk); text-decoration: none; }
.pa-logo em { color: var(--ember); font-style: normal; }
.pa-logo .logo__mark, .pd-brand .logo__mark { color: var(--ember); }
.pa-logo__img { display: block; height: 64px; width: auto; border-radius: 50%; }
.pa-card {
  width: 100%; max-width: 430px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 92, 26, .07) 0%, transparent 62%), var(--pit);
  border: 1px solid var(--edge-soft); border-radius: var(--r-lg);
  box-shadow: 0 40px 80px -44px rgba(0, 0, 0, .9);
  padding: clamp(1.6rem, 4vw, 2.4rem);
}
.pa-card h1 { font-family: var(--font-display); font-size: 1.8rem; line-height: 1.1; letter-spacing: -.025em; }
.pa-sub { color: var(--ash); margin-top: .5rem; font-size: .95rem; }
.pa-error { margin-top: 1rem; background: rgba(255, 92, 26, .08); border: 1px solid rgba(255, 92, 26, .38); color: var(--ember-hot); padding: .7rem .9rem; border-radius: var(--r-sm); font-size: .92rem; }
.pa-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.pa-form label, .pd-fform label { display: flex; flex-direction: column; gap: .38rem; font-size: .85rem; font-weight: 500; color: var(--chalk-2); }
.pa-form input, .pd-fform input {
  padding: .76rem .92rem; border: 1px solid var(--edge); border-radius: var(--r-sm);
  background: var(--steel); color: var(--chalk); font: inherit; font-size: .98rem;
  transition: border-color .16s, box-shadow .16s;
}
.pa-form input::placeholder, .pd-fform input::placeholder { color: var(--ash-dim); }
.pa-form input:focus, .pd-fform input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-glow); }
.pa-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1rem; margin-top: 1.4rem; font-size: .9rem; }
.pa-links a { color: var(--ember-hot); text-decoration: none; font-weight: 600; }
.pa-links a:hover { text-decoration: underline; }

/* ---------- Dashboard-Grundgerüst ---------- */
.pd-body { margin: 0; min-height: 100vh; background: var(--void); color: var(--chalk); display: grid; grid-template-columns: 256px 1fr; }
.pd-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.pd-side {
  position: sticky; top: 0; height: 100vh;
  background: var(--pit); border-right: 1px solid var(--edge-soft); color: var(--chalk);
  display: flex; flex-direction: column; padding: 1.3rem 1rem; gap: 1.2rem; z-index: 30;
}
.pd-brand { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; color: var(--chalk); text-decoration: none; }
.pd-brand em { color: var(--ember); font-style: normal; }
.pd-brand__img { display: block; height: 42px; width: auto; border-radius: 50%; }
.as-brandtag { font-family: var(--font-mono); font-size: .82rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); }

.pd-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.pd-nav__item {
  display: flex; align-items: center; gap: .75rem; padding: .68rem .8rem; border-radius: var(--r-sm);
  color: var(--chalk-2); text-decoration: none; font-weight: 500; font-size: .94rem;
  transition: background .16s, color .16s;
}
.pd-nav__item svg { width: 19px; height: 19px; opacity: .7; }
.pd-nav__item:hover { background: var(--steel-2); color: var(--chalk); }
.pd-nav__item.is-active { background: var(--sear); color: #FFFFFF; font-weight: 600; box-shadow: 0 8px 22px -12px rgba(255, 92, 26, .8); }
.pd-nav__item.is-active svg { opacity: 1; }

.pd-side__foot { border-top: 1px solid var(--edge-soft); padding-top: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.pd-shopchip { display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.pd-shopchip strong { display: block; color: var(--chalk); font-size: .9rem; }
.pd-shopchip small { color: var(--ash-dim); }
.pd-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pd-dot.is-on { background: var(--go); box-shadow: 0 0 0 3px rgba(63, 191, 106, .2); }
.pd-dot.is-off { background: var(--ash-dim); }
.pd-logout { color: var(--ash); text-decoration: none; font-size: .9rem; font-weight: 500; }
.pd-logout:hover { color: var(--ember-hot); }

.pd-main { min-width: 0; display: flex; flex-direction: column; }
.pd-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
  padding: 1rem clamp(1.1rem, 3vw, 2.2rem);
  background: rgba(10, 9, 8, .78); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--edge-soft);
}
.pd-top h1 { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em; flex: 1; }
.pd-content { padding: clamp(1.2rem, 3vw, 2.2rem); display: flex; flex-direction: column; gap: 1.3rem; max-width: 1180px; width: 100%; }

/* Begrüßung + Status */
.pd-hello { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.pd-hello h2 { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.025em; }
.pd-status { display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .85rem; border-radius: 999px; font-size: .84rem; font-weight: 600; }
.pd-status.is-on { background: rgba(63, 191, 106, .12); color: var(--go); border: 1px solid rgba(63, 191, 106, .35); }
.pd-status.is-off { background: rgba(255, 244, 232, .05); color: var(--ash); border: 1px solid var(--edge); }

/* Flächen */
.pd-panel { background: var(--pit); border: 1px solid var(--edge-soft); border-radius: var(--r); padding: 1.4rem 1.5rem; }
.pd-panel h3 { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: -.02em; margin-bottom: .9rem; }
.pd-cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }

/* Kennzahlen */
.pd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.pd-stat { background: var(--pit); border: 1px solid var(--edge-soft); border-radius: var(--r); padding: 1.25rem 1.35rem; }
.pd-stat__k { display: block; font-size: .8rem; color: var(--ash); font-weight: 500; }
.pd-stat__v { display: block; font-family: var(--font-mono); font-size: 1.9rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.15; margin-top: .35rem; color: var(--chalk); }
.pd-stat__note { display: block; font-size: .78rem; color: var(--ash-dim); margin-top: .35rem; }
.pd-stat--accent {
  background: radial-gradient(120% 100% at 50% 0%, rgba(255, 92, 26, .12) 0%, transparent 62%), var(--steel);
  border-color: var(--edge-hot);
}
.pd-stat--accent .pd-stat__v { color: var(--ember-hot); }

/* Meldungen */
.pd-alert {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .9rem;
  background: rgba(255, 92, 26, .07); border: 1px solid var(--edge-hot); border-radius: var(--r); padding: 1rem 1.3rem;
}
.pd-tip, .pd-inline-tip { background: rgba(233, 161, 59, .08); border: 1px solid rgba(233, 161, 59, .32); border-radius: var(--r); padding: 1rem 1.3rem; font-size: .94rem; color: var(--chalk-2); }
.pd-tip a, .pd-inline-tip a { color: var(--warn); font-weight: 600; text-decoration: none; }
.pd-inline-tip { padding: .7rem 1rem; font-size: .87rem; }
.pd-flash { border-radius: var(--r-sm); padding: .85rem 1.2rem; font-weight: 500; font-size: .92rem; }
.pd-flash.is-ok { background: rgba(63, 191, 106, .1); color: var(--go); border: 1px solid rgba(63, 191, 106, .35); }
.pd-flash.is-err { background: rgba(255, 92, 26, .08); color: var(--ember-hot); border: 1px solid var(--edge-hot); }

/* Schnellzugriff */
.pd-quick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pd-quick a {
  padding: .8rem .9rem; border: 1px solid var(--edge); border-radius: var(--r-sm);
  text-decoration: none; color: var(--chalk-2); font-weight: 500; font-size: .92rem;
  background: var(--steel); transition: transform .16s, border-color .16s, color .16s;
}
.pd-quick a:hover { transform: translateY(-2px); border-color: var(--edge-hot); color: var(--chalk); }

/* Tabellen */
.pd-table { width: 100%; border-collapse: collapse; }
.pd-table th {
  text-align: left; font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ash); font-weight: 500; padding: .3rem .7rem .7rem; border-bottom: 1px solid var(--edge);
}
.pd-table td { padding: .85rem .7rem; border-bottom: 1px solid var(--edge-soft); vertical-align: middle; color: var(--chalk-2); }
.pd-table tbody tr:last-child td { border-bottom: 0; }
.pd-table .r { text-align: right; }
.pd-rowact { display: flex; gap: .6rem; justify-content: flex-end; align-items: center; }
.pd-link { color: var(--ember-hot); font-weight: 600; text-decoration: none; }
.pd-link:hover { text-decoration: underline; }
.pd-badge { display: inline-block; padding: .24rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 600; border: 1px solid transparent; }
.pd-badge.is-open { background: rgba(233, 161, 59, .12); color: var(--warn); border-color: rgba(233, 161, 59, .35); }
.pd-badge.is-paid { background: rgba(63, 191, 106, .12); color: var(--go); border-color: rgba(63, 191, 106, .35); }
.pd-badge.is-cancel { background: rgba(255, 244, 232, .05); color: var(--ash); border-color: var(--edge); }
.pd-hint { font-size: .85rem; color: var(--ash); }
.pd-hint a { color: var(--ember-hot); font-weight: 600; }
.pd-empty { text-align: center; padding: 2.5rem 1rem; font-size: 2rem; color: var(--ash-dim); }
.pd-empty p { font-size: .96rem; margin-top: .6rem; color: var(--ash); }

/* Tarifwahl */
.pd-tarif-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.pd-tarif-head h2 { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.025em; }
.pd-plangrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.pd-plan {
  position: relative; display: flex; flex-direction: column; gap: .2rem;
  padding: 1.15rem 1.2rem 1.25rem; background: var(--steel);
  border: 1px solid var(--edge); border-radius: var(--r); cursor: pointer;
  transition: border-color .16s, transform .16s, background .16s;
}
.pd-plan:hover { transform: translateY(-2px); border-color: var(--edge-hot); }
.pd-plan input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pd-plan:has(input:checked) {
  border-color: var(--edge-hot);
  background: radial-gradient(120% 100% at 50% 0%, rgba(255, 92, 26, .12) 0%, transparent 66%), var(--steel-2);
}
.pd-plan:has(input:focus-visible) { outline: 2px solid var(--ember-hot); outline-offset: 2px; }
.pd-plan.is-current { border-color: var(--edge-hot); }
.pd-plan__badge:empty { display: none; }
.pd-plan__badge { align-self: flex-start; font-family: var(--font-mono); font-size: .64rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ember); background: rgba(255, 92, 26, .12); padding: .16rem .5rem; border-radius: 4px; margin-bottom: .45rem; }
.pd-plan__name { font-family: var(--font-mono); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ash); }
.pd-plan__price { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 600; letter-spacing: -.04em; color: var(--chalk); }
.pd-plan__price small { font-size: .78rem; font-family: var(--font-body); color: var(--ash); font-weight: 400; letter-spacing: 0; }
.pd-plan:has(input:checked) .pd-plan__price { color: var(--ember-hot); }
.pd-plan__meta { font-size: .8rem; color: var(--ash-dim); margin-top: .3rem; }
.pd-tarif-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 1.3rem; }

/* Shop-Kachel und Checkliste */
.pd-shopurl { display: flex; flex-direction: column; gap: .6rem; }
.pd-url { font-family: var(--font-mono); font-size: 1.05rem; color: var(--chalk); text-decoration: none; word-break: break-all; }
.pd-url:hover { color: var(--ember-hot); }
.pd-shopbtns { display: flex; flex-wrap: wrap; gap: .6rem; }
.pd-shopstate { display: flex; align-items: center; gap: .5rem; font-size: .87rem; color: var(--ash); }
.pd-check { display: flex; flex-direction: column; gap: .2rem; }
.pd-check li { display: flex; align-items: center; gap: .8rem; padding: .7rem .2rem; border-bottom: 1px solid var(--edge-soft); }
.pd-check li:last-child { border-bottom: 0; }
.pd-check__box { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--edge); display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: transparent; }
.pd-check li.is-done .pd-check__box { background: var(--go); border-color: var(--go); color: #FFFFFF; }
.pd-check li div { flex: 1; }
.pd-check li strong { display: block; font-size: .92rem; color: var(--chalk); }
.pd-check li.is-done strong { color: var(--ash); }
.pd-check li small { color: var(--ash-dim); font-size: .8rem; }
.pd-help p { font-size: .92rem; color: var(--chalk-2); }

/* Kontoformulare */
.pd-fform { display: flex; flex-direction: column; gap: .9rem; }
.pd-two { display: grid; grid-template-columns: 100px 1fr; gap: .7rem; }
.pd-hr { border: 0; border-top: 1px solid var(--edge-soft); margin: 1.2rem 0; }
.pd-logout--inline { display: inline-block; margin-top: .6rem; color: var(--ember-hot); }

/* Menü auf schmalen Bildschirmen */
.pd-burger, .pd-scrim { display: none; }

@media (max-width: 900px) {
  .pd-body { grid-template-columns: 1fr; }
  .pd-side { position: fixed; left: 0; top: 0; width: 256px; transform: translateX(-100%); transition: transform .25s var(--ease-out); }
  .pd-nav-toggle:checked ~ .pd-side { transform: translateX(0); }
  .pd-nav-toggle:checked ~ .pd-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 25; }
  .pd-burger { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: .3rem; }
  .pd-burger span { width: 22px; height: 2px; background: var(--chalk); border-radius: 2px; }
  .pd-cards2, .pd-stats { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .pd-quick { grid-template-columns: 1fr; }
  .pd-table thead { display: none; }
  .pd-table, .pd-table tbody, .pd-table tr, .pd-table td { display: block; width: 100%; }
  .pd-table tr { border: 1px solid var(--edge-soft); border-radius: var(--r-sm); margin-bottom: .8rem; padding: .4rem .6rem; }
  .pd-table td { border: 0; padding: .35rem .2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
  .pd-table td::before { content: attr(data-l); font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ash-dim); }
  .pd-rowact { justify-content: flex-end; }
}

/* ===================== SUPER-ADMIN (as-*) ===================== */
.as-body .pd-brand em { color: var(--ember); }
.as-body .pd-nav__item.is-active { background: var(--steel-3); color: var(--chalk); border: 1px solid var(--edge-hot); box-shadow: none; }
.as-badge { display: inline-block; font-family: var(--font-mono); font-size: .66rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--ember); background: rgba(255, 92, 26, .1); border: 1px solid var(--edge-hot); padding: .22rem .55rem; border-radius: 4px; }
.as-stats4 { grid-template-columns: repeat(4, 1fr); }
.as-shops .as-row { cursor: pointer; transition: background .16s; }
.as-shops .as-row:hover { background: rgba(255, 244, 232, .03); }
.as-shops .as-row td:first-child strong { color: var(--chalk); }
.pd-table td small { display: block; color: var(--ash-dim); font-size: .8rem; }
.as-detailhead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin: .4rem 0 .3rem; }
.as-detailhead h2 { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.025em; }
.as-dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; font-size: .92rem; margin-bottom: 1rem; }
.as-dl dt { color: var(--ash); }
.as-dl dd { font-weight: 500; color: var(--chalk); margin: 0; }
.as-dl .as-err { color: var(--ember-hot); font-weight: 400; }
.as-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.as-danger { border-color: var(--edge-hot); background: rgba(255, 92, 26, .04); }
.as-danger h3 { color: var(--ember-hot); }
.as-delform { display: flex; flex-direction: column; gap: .9rem; max-width: 440px; margin-top: 1rem; }
.as-delform label { display: flex; flex-direction: column; gap: .35rem; font-size: .87rem; font-weight: 500; color: var(--chalk-2); }
.as-delform input { padding: .72rem .9rem; border: 1px solid var(--edge); border-radius: var(--r-sm); background: var(--steel); color: var(--chalk); font: inherit; }
.as-delform input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-glow); }
.as-delform code { font-family: var(--font-mono); background: rgba(255, 92, 26, .12); color: var(--ember-hot); padding: .05rem .4rem; border-radius: 4px; }
.as-btn-danger { background: var(--ember-deep); color: #fff; border: 0; padding: .78rem 1.4rem; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; align-self: flex-start; transition: background .16s; }
.as-btn-danger:hover { background: #b8360a; }
.as-line { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin-bottom: .5rem; color: var(--chalk-2); }
.as-log { background: var(--steel-2); color: var(--chalk-2); border: 1px solid var(--edge-soft); padding: 1rem; border-radius: var(--r-sm); font-family: var(--font-mono); font-size: .78rem; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; }

/* ---------- Fehler & Vorfälle ---------- */
.as-inc { border: 1px solid var(--edge-soft); border-left: 3px solid var(--edge); border-radius: var(--r-sm); background: var(--steel); padding: .85rem 1.05rem; margin: .7rem 0; }
.as-inc--rep { border-color: var(--edge-hot); border-left-color: var(--ember); background: rgba(255, 92, 26, .05); }
.as-inc__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; }
.as-inc__code { font-family: var(--font-mono); font-weight: 600; color: var(--chalk); }
.as-inc__shop { font-weight: 600; color: var(--chalk-2); }
.as-inc__sep { color: var(--ash-dim); }
.as-inc__time { font-family: var(--font-mono); font-size: .82rem; color: var(--ash-dim); }
.as-inc__flag { display: inline-block; background: var(--ember); color: #FFFFFF; font-size: .66rem; font-weight: 700; letter-spacing: .08em; padding: .12rem .5rem; border-radius: 999px; }
.as-inc__msg { margin-top: .35rem; font-size: .92rem; color: var(--chalk-2); }
.as-inc__msg strong { color: var(--ember-hot); font-weight: 600; }
.as-inc__meta { margin-top: .25rem; font-family: var(--font-mono); font-size: .78rem; color: var(--ash-dim); word-break: break-word; }
.as-inc__note { margin-top: .5rem; padding: .55rem .75rem; border-radius: var(--r-xs); background: var(--steel-3); font-size: .9rem; color: var(--chalk-2); }
.as-inc__note a { color: var(--ember-hot); }
.as-inc details { margin-top: .6rem; }
.as-inc summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--ash); transition: color .16s; }
.as-inc summary:hover { color: var(--chalk-2); }
.as-inc pre { margin-top: .5rem; padding: .7rem .85rem; border-radius: var(--r-xs); border: 1px solid var(--edge-soft); font-family: var(--font-mono); white-space: pre-wrap; overflow-x: auto; }
.as-inc__ctx { background: var(--steel-2); color: var(--chalk-2); font-size: .75rem; }
.as-inc__trace { background: var(--steel-2); color: var(--ash); font-size: .72rem; max-height: 280px; overflow-y: auto; }
.as-inc__act { margin-top: .6rem; }

@media (max-width: 1000px) { .as-stats4 { grid-template-columns: 1fr 1fr; } }
