/* Geteilter Link – Empfängerseite share.imperax.de/<id>.
   1:1 aus dem Klon (~/Desktop/imperax-clone-src/share/share.css) und den
   Palette-Bausteinen, die die Seite braucht (.btn, .input, .field, .cd,
   .ds-spin, .brand, .fico, .ds-av, Datentabelle .dt, Toast). Farben,
   Masse und Rundungen kommen NUR aus tokens.css (design/tokens.json).
   Keine Inline-Stile: die CSP der Seite erlaubt nur dieses Stylesheet. */

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg-sunken); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); line-height: 1.47; letter-spacing: -.01em; -webkit-font-smoothing: antialiased }
h1, h2, h3, p { margin: 0 }
button { font-family: inherit }

/* ---- Palette: Knöpfe (immer gefüllt, auch Abbrechen) ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--h-control); padding: 0 14px; border: 0; border-radius: var(--radius-s); cursor: pointer; font-size: var(--fs-body); font-weight: var(--fw-medium); white-space: nowrap; transition: background .12s; color: inherit }
.btn svg { width: 14px; height: 14px }
.btn-primary { background: var(--accent-fill); color: var(--on-fill) }
.btn-primary:hover { background: var(--accent-fill-hover) }
.btn-neutral { background: var(--neutral-fill); color: var(--ink) }
.btn-neutral:hover { background: var(--neutral-fill-hover) }
.btn.btn-icon { width: var(--h-control); padding: 0 }
.btn-icon svg { width: 16px; height: 16px; flex-shrink: 0 }
.btn-icon.btn-sm { width: var(--h-control-sm) }
.btn-icon.btn-sm svg { width: 14px; height: 14px }
.btn-sm { height: var(--h-control-sm); padding: 0 10px; font-size: var(--fs-small) }
.btn[disabled], .btn[disabled]:hover { background: var(--neutral-fill); color: var(--ink-3); opacity: 1; cursor: not-allowed }

/* ---- Palette: Eingabefeld + Feldbeschriftung ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4) }
.field label { font-size: var(--fs-small); font-weight: var(--fw-medium); color: var(--ink-2) }
.input { height: var(--h-control); padding: 0 10px; border: 1px solid var(--line-control); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font-size: var(--fs-body); font-family: inherit; width: 100% }
.input:focus, .input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.input:disabled { background: var(--bg-sunken); color: var(--ink-3); border-color: var(--line); cursor: not-allowed }
.input.bad { border-color: var(--crit) }

/* ---- Palette: Kleinkram ---- */
.small { font-size: var(--fs-small) }
.muted { color: var(--ink-3) }
.tnum { font-variant-numeric: tabular-nums }
.hint { font-size: var(--fs-small); color: var(--ink-3) }
.mono { font-family: var(--mono); font-size: var(--fs-small) }
.grow { flex: 1; min-width: 0 }
.ds-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite }
@keyframes spin { to { transform: rotate(360deg) } }
.ico { width: var(--h-control); height: var(--h-control); border-radius: var(--radius); display: grid; place-items: center; flex-shrink: 0 }
.ico svg { width: 15px; height: 15px }
.ico.info { background: var(--info-soft); color: var(--info) }
.ico.crit { background: var(--crit-soft); color: var(--crit) }

/* ---- Palette: Marke, Dateisymbol, Avatar ---- */
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0 }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; display: block }
.brand-name { font-size: var(--fs-body); font-weight: var(--fw-semibold); white-space: nowrap }
.fico { width: 40px; height: 48px; border-radius: 6px; position: relative; display: grid; place-items: end center; padding-bottom: 6px; font-size: var(--fs-micro); font-weight: var(--fw-semibold); color: var(--on-fill); flex-shrink: 0 }
.fico::before { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: linear-gradient(225deg, var(--surface) 50%, color-mix(in srgb, var(--on-fill) 45%, transparent) 50%); border-radius: 0 6px 0 4px }
.fico.cx-fico-s { width: 24px; height: 30px; font-size: 7px; padding-bottom: 3px; border-radius: 4px }
.fico.cx-fico-s::before { width: 8px; height: 8px; border-radius: 0 4px 0 3px }
.fico.pdf { background: var(--crit-fill) }
.fico.png { background: var(--brand-1) }
.fico.csv { background: var(--good-fill) }
.ds-av { width: var(--h-control); height: var(--h-control); border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--on-fill); background: var(--accent-fill); position: relative; flex-shrink: 0 }
.ds-av.c2 { background: var(--good-fill) }
.ds-av.c3 { background: var(--crit-fill) }
.ds-av.c4 { background: var(--neutral-fill); color: var(--ink) }

/* ---- Palette: Countdown (.cd) ---- */
.cd { display: flex; gap: var(--sp-2); align-items: flex-end }
.cd > div { background: var(--surface); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); text-align: center; min-width: 60px }
.cd b { display: block; font-size: var(--fs-display); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; line-height: 1.1 }
.cd small { font-size: var(--fs-caption); color: var(--ink-3) }

/* ---- Palette: Toast ---- */
.toasts { position: fixed; right: var(--sp-4); top: var(--sp-4); z-index: 200; display: flex; flex-direction: column; gap: var(--sp-2); max-width: calc(100vw - 2 * var(--sp-4)) }
.toast { display: flow-root; background: var(--surface); box-shadow: var(--shadow-pop); border-radius: var(--radius-m); padding: 11px 14px; font-size: var(--fs-body); width: 360px; max-width: 100%; animation: tin .18s ease-out }
.toast > svg { float: left; width: 16px; height: 16px; margin: 1px 10px 0 0 }
.toast.good svg { color: var(--good) }
.toast.crit svg { color: var(--crit) }
.toast.info svg { color: var(--info) }
@keyframes tin { from { transform: translateY(-8px); opacity: 0 } }

/* ---- Palette: Datentabelle (.dt) für die CSV-Vorschau ---- */
.dt-bar { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-3) }
.dt-bar .ds-search { flex: 1; min-width: 200px; max-width: 340px }
.ds-search { position: relative }
.ds-search svg { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--ink-3) }
.ds-search .input { padding-left: 32px }
.tablewrap { overflow-x: auto }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-body) }
.dt th { text-align: left; font-size: var(--fs-small); font-weight: var(--fw-medium); color: var(--ink-3); padding: 7px 10px; border-bottom: .5px solid var(--line-soft); white-space: nowrap; vertical-align: bottom }
.dt td { padding: 7px 10px; border-bottom: .5px solid var(--line-soft); white-space: nowrap; vertical-align: middle }
.dt tbody tr:hover td { background: var(--surface-hover) }
.dt th.sort { cursor: pointer; user-select: none }
.dt th.sort:hover { color: var(--ink) }
.dt th .arr { display: inline-block; width: 10px; margin-left: 4px; color: var(--accent) }
td.num, th.num { text-align: right }
.dt-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-3); font-size: var(--fs-small); color: var(--ink-3) }
.ds-pages { display: flex; gap: 4px; flex-wrap: wrap }
.ds-pages .ds-pgell { display: inline-grid; place-items: center; min-width: 20px; color: var(--ink-3); font-size: var(--fs-small) }
.ds-pages button { min-width: var(--h-control); height: var(--h-control); border: 0; border-radius: var(--radius); background: var(--surface); cursor: pointer; font-size: var(--fs-body); color: var(--ink); display: inline-grid; place-items: center }
.ds-pages button svg { width: 20px; height: 20px }
.ds-pages button[aria-current="page"] { background: var(--accent-fill); color: var(--on-fill); font-weight: var(--fw-semibold) }
.ds-pages button:disabled { color: var(--ink-3); cursor: default }
.ds-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: var(--sp-5) var(--sp-3) }
.ds-empty .ico { width: 48px; height: 48px }
.ds-empty .ico svg { width: 22px; height: 22px }
.ds-empty b { font-size: var(--fs-body) }

/* ---- Die Seite (Klon share.css) ---- */
body.shp { min-height: 100vh; background: var(--bg); padding: var(--sp-5) var(--sp-4) }
#main.shp-main { max-width: 1000px; margin: 0 auto; padding: 0 }
.shp-win { border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden }
.shp-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); border-bottom: .5px solid var(--line-soft) }
.shp-top .brand { cursor: default }
.shp-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); min-height: 440px }
.shp-msg { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); max-width: 420px; margin: auto; padding: var(--sp-6, 40px) 0; width: 100% }
.shp-msg h3 { font-size: var(--fs-display); font-weight: var(--fw-semibold); letter-spacing: -.02em; line-height: 1.15 }
.shp-msg h3.shp-bad { color: var(--crit) }
.shp-msg p { margin: 0 }
.shp-msg .ico { width: 44px; height: 44px; border-radius: 12px }
.shp-msg .ico svg { width: 20px; height: 20px }
.shp-kf { width: 100%; text-align: left; margin: var(--sp-2) 0 0 }
.shp-ki { font-family: var(--mono); font-size: var(--fs-small) }
.shp-msg > .btn { align-self: stretch }
.shp-tries { margin-top: 2px }
.cd.shp-cd { justify-content: center; margin-top: var(--sp-2) }
.cd.shp-cd > div { background: var(--surface-hover) }
.shp-file { display: flex; align-items: center; gap: var(--sp-3); min-width: 0 }
.shp-file .grow { flex: 1; min-width: 0 }
.shp-file b { overflow-wrap: anywhere }
.shp-meta { margin-top: 2px }
.shp-by { white-space: nowrap }
.shp-by .ds-av { display: inline-grid; place-items: center; width: 18px; height: 18px; font-size: var(--fs-micro); vertical-align: middle; position: relative; top: -1px; margin: 0 4px 0 2px }
.shp-tools { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2) }
.shp-pdf { display: block; min-height: 320px; overflow: auto; padding: var(--sp-4); border-radius: var(--radius-chip); background: var(--bg-sunken); scrollbar-width: auto; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-x pan-y pinch-zoom }
.shp-pdf.drag { cursor: grabbing }
.shp-pdf canvas { display: block; margin: 0 auto var(--sp-3); box-shadow: var(--shadow-card); border-radius: 2px; background: #fff }
.shp-img { display: grid; place-items: center; padding: var(--sp-4); border-radius: var(--radius-chip); background: var(--bg-sunken); min-height: 300px }
.shp-img img { max-width: 100%; height: auto; border-radius: 2px; box-shadow: var(--shadow-card) }
.shp-csv { min-width: 0 }
.shp-enc { display: flex; align-items: center; gap: 6px; text-align: right; min-width: 0 }
.shp-enc svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--good) }
.shp-privacy { max-width: 1000px; margin: var(--sp-4) auto 0; font-size: var(--fs-small); color: var(--ink-3) }
.shp-privacy p { margin: 0 0 4px }
.shp-privacy b { color: var(--ink-2); font-weight: var(--fw-medium) }
.hidden { display: none !important }
@media (max-width: 640px) {
  body.shp { padding: var(--sp-3) var(--sp-3) }
  .shp-body { padding: var(--sp-4) }
  .shp-top { padding: var(--sp-3) var(--sp-4) }
  .shp-file { flex-wrap: wrap }
  .shp-enc span { display: none }
}

/* Wurzel ohne Kennung: dieselbe 404 wie registration/recruitment.imperax.de (Nutzer 19.10.2026) */
.shp-end { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--sp-8) var(--sp-4) }
.shp-end .shp-ring { width: 92px; height: 92px; fill: none; stroke: var(--ink-3); stroke-width: 6; stroke-linecap: round }
.shp-end .shp-ring .dot { stroke-width: 9 }
.shp-end h2 { margin: 14px 0 0; font-size: 25px; font-weight: 650; letter-spacing: -.4px; color: var(--ink) }
.shp-end p { margin: 6px 0 0; color: var(--ink-3); font-size: 15px; max-width: 340px }
