/* ============================================================
   TFP Manager Pro — Design-Tokens & App-Chrome
   Richtung „Galerie/Print": hell, chromlos, EIN Pine-Farbmoment
   (--signed) bei Unterschrift/Abschluss.
   WICHTIG: Dies ist NUR die App-Hülle. Das Vertragsdokument
   rendert über contract.css (DejaVu) und wird hier NICHT berührt.
   Selbst gehostete Schriften (kein CDN).
   ============================================================ */

@font-face {
    font-family: 'Hanken Grotesk';
    src: url(/assets/fonts/ui/hanken.woff2) format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Mono';
    src: url(/assets/fonts/ui/plexmono-400.woff2) format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Mono';
    src: url(/assets/fonts/ui/plexmono-500.woff2) format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}

:root {
    /* Farbe — helle Galerie-Basis */
    --paper:    #F5F5F3;
    --surface:  #FFFFFF;
    --ink:      #1A1A19;
    --ink-soft: #6B6B66;
    --line:     #E2E2DD;
    --signed:   #2F5D50;   /* NUR Abschluss/Unterschrift */
    --signed-on-dark: #7FA493; /* helleres Pine NUR fuer das Haekchen auf dunklem Icon */
    --danger:   #8A2E2E;

    /* Typo */
    --font-ui:   'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    /* Spacing-Skala (8px) */
    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
    --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

    --radius: 3px;
}

/* ---- Basis (App-Chrome) ---- */
.tfp-ui, body.tfp-ui {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.tfp-ui *, .tfp-ui *::before, .tfp-ui *::after { box-sizing: border-box; }

.tfp-ui h1, .tfp-ui h2, .tfp-ui h3 { color: var(--ink); font-weight: 600; line-height: 1.2; margin: 0 0 var(--s-3); }
.tfp-ui h1 { font-size: 26px; letter-spacing: -0.01em; }
.tfp-ui h2 { font-size: 20px; }
.tfp-ui h3 { font-size: 16px; }
.tfp-ui p  { margin: 0 0 var(--s-4); }
.tfp-ui a  { color: var(--ink); text-underline-offset: 2px; }
/* Buttons als Links muessen ueber '.tfp-ui a' gewinnen, sonst Text == Hintergrund (schwarz auf schwarz) */
.tfp-ui a.tfp-btn, .tfp-ui a.btn-primary, .tfp-ui a.download-btn, .tfp-ui a.btn.btn-primary { color: var(--paper); }
.tfp-ui a.tfp-btn--outline, .tfp-ui a.btn-outline { color: var(--ink); }

/* Eyebrow/Label (Mono) — juristische Präzision */
.tfp-eyebrow {
    font-family: var(--font-mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
}

/* ---- Card / „Print" ---- */
.tfp-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--s-6);
}

/* ---- Buttons (chromlos: ink gefüllt) ---- */
.tfp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    font-family: var(--font-ui); font-size: 15px; font-weight: 600; line-height: 1;
    padding: 13px 22px; border-radius: var(--radius); border: 1px solid var(--ink);
    background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
    transition: opacity .15s ease;
}
.tfp-btn:hover { opacity: .88; }
.tfp-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tfp-btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.tfp-btn--outline:hover { border-color: var(--ink); opacity: 1; }
.tfp-btn--signed { background: var(--signed); border-color: var(--signed); color: #fff; }
.tfp-btn[disabled] { opacity: .45; cursor: not-allowed; }
.tfp-btn svg { width: 18px; height: 18px; }

/* ---- Formularelemente ---- */
.tfp-field { margin-bottom: var(--s-4); }
.tfp-label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: var(--s-2); }
.tfp-input, .tfp-ui input[type=text], .tfp-ui input[type=email], .tfp-ui input[type=tel],
.tfp-ui input[type=password], .tfp-ui input[type=date], .tfp-ui textarea, .tfp-ui select {
    width: 100%; font-family: var(--font-ui); font-size: 15px; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 14px;
}
.tfp-ui input:focus, .tfp-ui textarea:focus, .tfp-ui select:focus {
    outline: none; border-color: var(--ink);
}
.tfp-ui input::placeholder, .tfp-ui textarea::placeholder { color: #b3b3ad; }

/* ---- Status-Label (Mono, ruhig) ---- */
.tfp-status {
    font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .04em;
    text-transform: uppercase; color: var(--ink-soft);
    border: 1px solid var(--line); border-radius: 2px; padding: 3px 8px; display: inline-block;
}
.tfp-status--signed { color: var(--signed); border-color: var(--signed); }   /* der eine Farbmoment */

/* ---- Hinweis / Hilfetext (Haarlinie statt bunter Box) ---- */
.tfp-note {
    border-left: 2px solid var(--line); background: #fafaf8;
    padding: 12px 14px; color: var(--ink-soft); font-size: 13px; line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
    .tfp-ui *, .tfp-btn { transition: none !important; animation: none !important; }
}
