/* Recipient portal – the "Leitstand" style of the admin area, in the customer's colours.
   The accent colour comes from the customer's branding (/branding.css sets --accent). Since 0.30.0 (A98) a colour
   below 4.5:1 against white is saved anyway: the admin area warns and the accessibility statement of the portal
   then says "teilweise vereinbar". A bar in that colour carries the company (its logo on a white plate, so any logo stays readable); below,
   one quiet panel; the three steps of the procedure are drawn as a line with stations. */
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("vendor/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("vendor/fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --accent: #001e87;
  --bg: #eef1f5; --card: #ffffff; --soft: #f5f7fa; --text: #111827; --muted: #4b5565; --border: #d6dce5;
  --border-strong: #a9b2c1;
  --lamp-green: #13a150; --ok: #0d6f37; --ok-bg: #e6f5ec; --err: #b0000c; --err-bg: #fdeaea;
  --warn: #7a4f00; --warn-bg: #fff4d6; --lamp-amber: #f2b300;
  --radius: 8px; --node: 22px;
  --font: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0f1c; --card: #141a2b; --soft: #1a2134; --text: #e9ecf3; --muted: #a4adbf; --border: #283149;
          --border-strong: #46516e; --ok: #63d995; --ok-bg: #0d2c1d; --err: #ff8a8a; --err-bg: #3a0f14;
          --warn: #f5c95c; --warn-bg: #2f2408; color-scheme: dark; }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
       font: 16px/1.55 var(--font); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9;
       stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* ---------- the bar in the customer's colour; content aligned to the 560-px column below ---------- */
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
        min-height: 68px; padding: 12px max(16px, calc((100% - 560px) / 2)); margin: 0 0 32px;
        background: var(--accent); color: #fff; }
.head :focus-visible { outline-color: rgba(255, 255, 255, .85); }
.logo { display: block; max-height: 48px; max-width: 220px; padding: 6px 10px; background: #fff; border-radius: 6px; }
.company { margin: 0; font-weight: 800; font-size: 1.2rem; color: #fff; }
.user { margin: 0; color: #fff; font-size: .9rem; }
.user a, .user .linklike { color: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.language { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.language select, .language button { font: inherit; font-size: .85rem; padding: 5px 8px; border-radius: 6px; cursor: pointer;
                                     color: #fff; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .35); }
.language select option { color: #111827; background: #fff; }
.language button:hover, .language select:hover { background: rgba(0, 0, 0, .34); }

/* ---------- the panel ---------- */
.card { max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--border);
        border-radius: var(--radius); padding: 30px 32px; }
h1 { font-size: 1.55rem; line-height: 1.2; margin: 0 0 24px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 12px 0 6px; font-weight: 800; }
h3 { font-size: 1.02rem; margin: 20px 0 6px; }

/* ---------- the procedure: three stations on a line (1 notification, 2 password, 3 check and delivery) ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; margin: 0 0 28px;
         position: relative; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; position: relative;
            font-size: .82rem; color: var(--muted); }
/* the line between two stations; done parts in the accent colour */
.steps li + li::before { content: ""; position: absolute; top: calc(var(--node) / 2 - 2px); height: 4px; border-radius: 2px;
                         right: calc(50% + var(--node) / 2 + 4px); left: calc(-50% + var(--node) / 2 + 4px);
                         background: var(--border-strong); }
.steps li.done + li::before { background: var(--accent); }
.steps .num { width: var(--node); height: var(--node); border-radius: 50%; display: grid; place-items: center;
              font-weight: 800; font-size: .72rem; border: 3px solid var(--border-strong); background: var(--card);
              color: var(--muted); }
.steps .num .ico { width: 12px; height: 12px; stroke-width: 3.5; }
.steps li.done .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li.current .num { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--accent); }
.steps li.current { color: var(--text); font-weight: 700; }

/* ---------- the mail and its attachments ---------- */
.mail { display: flex; gap: 14px; padding: 14px 16px; background: var(--soft); border: 1px solid var(--border);
        border-radius: var(--radius); margin-bottom: 16px; }
.mail-ico { color: var(--accent); padding-top: 2px; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; margin: 0; font-size: .94rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }

.files { list-style: none; padding: 0; margin: 0 0 22px; }
.files li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 11px 14px; border: 1px solid var(--border);
            border-radius: var(--radius); margin-bottom: 8px; overflow-wrap: break-word; }
.files li .name { flex: 1 1 150px; min-width: 0; font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.files li .name small { font-weight: 400; }
.files li .pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700;
                  padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.files li .pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.files li.locked .ico { color: var(--muted); }
.files li.locked .pill { background: var(--soft); color: var(--muted); border: 1px solid var(--border); }
.files li.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: var(--ok-bg); }
.files li.ok .ico, .files li.ok .pill { color: var(--ok); }
.files li.ok .pill { background: var(--card); }
.files li.ok .pill::before { background: var(--lamp-green); }

/* ---------- password ---------- */
label { display: block; font-weight: 700; margin: 0 0 8px; }
.pw { position: relative; }
.pw input { width: 100%; padding: 14px 52px 14px 14px; font: inherit; font-size: 1.08rem; color: var(--text);
            background: var(--card); border: 1.5px solid var(--border-strong); border-radius: var(--radius);
            transition: border-color .15s, box-shadow .15s; }
.pw input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
          display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.reveal:hover, .reveal[aria-pressed="true"] { color: var(--accent); background: var(--soft); }
.field-hint { color: var(--muted); font-size: .86rem; margin: 8px 0 0; }
button.primary, a.button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  margin-top: 22px; min-height: 52px; padding: 12px 20px; font: inherit; font-size: 1.06rem; font-weight: 800;
  color: #fff; background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  transition: filter .15s; }
button.primary:hover, a.button:hover { filter: brightness(1.12); color: #fff; }
button.primary:active { transform: translateY(1px); }
button.primary:disabled { opacity: .65; cursor: progress; }
button.primary.busy .ico { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- messages ---------- */
.msg { display: flex; gap: 10px; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--border);
       border-left-width: 4px; margin: 0 0 16px; font-size: .95rem; background: var(--soft); }
.msg.error { border-color: var(--err); background: var(--err-bg); }
.msg.ok { border-color: var(--ok); background: var(--ok-bg); }
.msg.info { border-color: var(--accent); }
.msg.warn { border-color: var(--lamp-amber); background: var(--warn-bg); }
.note { display: flex; gap: 10px; margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--border);
        color: var(--muted); font-size: .88rem; }
.note .ico { color: var(--ok); margin-top: 1px; }

/* ---------- end states: a large lamp ---------- */
.state { text-align: center; padding: 8px 0 4px; }
.state .badge { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; margin-bottom: 6px; }
.state .badge .ico { width: 30px; height: 30px; stroke-width: 2.6; }
.state-ok .badge { background: var(--ok-bg); color: var(--ok); box-shadow: 0 0 0 6px color-mix(in srgb, var(--lamp-green) 18%, transparent); }
.state-error .badge { background: var(--err-bg); color: var(--err); box-shadow: 0 0 0 6px color-mix(in srgb, var(--err) 14%, transparent); }
.state-info .badge { background: var(--soft); color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent); }
.state p { color: var(--muted); margin: 0 auto 12px; max-width: 420px; }
.state .msg { text-align: left; }
.a11y p { max-width: 70ch; }

.footer { max-width: 560px; margin: 24px auto 0; padding: 0 16px 32px; color: var(--muted); font-size: .82rem;
          white-space: pre-line; text-align: center; }
.muted { color: var(--muted); font-weight: 400; }

@media (max-width: 480px) {
  .head { margin-bottom: 16px; min-height: 60px; }
  .logo { max-height: 40px; max-width: 160px; }
  .card { padding: 22px 16px; margin: 0 12px; }
  .steps li { font-size: .74rem; }
  .meta { grid-template-columns: 1fr; }
  .meta dd { margin-bottom: 4px; }
  .language button { padding: 5px 6px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Dark mode: the customer's colour is chosen for white backgrounds; lighten it for text and lines on dark (WCAG 1.4.3) */
@media (prefers-color-scheme: dark) {
  a, .mail-ico, .reveal:hover { color: color-mix(in srgb, var(--accent) 35%, #ffffff); }
  .head a, .user a { color: #fff; }
  .steps li.current .num { color: color-mix(in srgb, var(--accent) 35%, #ffffff);
                           border-color: color-mix(in srgb, var(--accent) 55%, #ffffff);
                           box-shadow: 0 0 0 4px var(--card), 0 0 0 6px color-mix(in srgb, var(--accent) 55%, #ffffff); }
  .state-info .badge { color: color-mix(in srgb, var(--accent) 35%, #ffffff); }
}
