/* ============================================================
   CVwerk – Globales Theme ("Modern Professional Tool")
   Eine Datei, überall eingebunden (via tracking.php) → einheitlicher
   Look auf der GANZEN Seite: ruhige neutrale Fläche, Manrope, ein
   zurückhaltender Smaragd-Akzent.

   WICHTIG: Alle Regeln sind auf  body:not(.editor-body)  beschränkt.
   Der Editor (editor.php) hat sein eigenes Theme und darf NICHT
   angefasst werden (sonst würde die CV-Vorschau umgefärbt).
   ============================================================ */

:root {
    --canvas: #f4f4f2;
    --surface: #ffffff;
    --ink: #18181b;
    --ink-2: #52525b;
    --muted: #8a8a85;
    --line: #e7e7e3;
    --line-strong: #dcdcd6;
    --accent: #0f7a5a;
    --accent-hover: #0c6a4e;
    --accent-dark: #0b5f47;
    --accent-soft: rgba(15, 122, 90, 0.12);
    --font-ui: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Selbst gehostete Manrope (variabel) – ersetzt den 3rd-Party-Google-Fonts-Aufruf.
   Same-Origin + Preload (siehe tracking.php) → die Schrift ist meist schon beim
   ersten Paint da, daher KEIN verzögerter Font-Swap mehr → behebt das CLS-Problem
   (vorher reflowte der große Hero-Text beim späten Manrope-Swap). */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope-latin.woff2') format('woff2');
    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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Basis (alle Seiten außer Editor) ---------- */
body:not(.editor-body) {
    font-family: var(--font-ui) !important;
    color: var(--ink);
    background-color: var(--canvas) !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body:not(.editor-body) h1,
body:not(.editor-body) h2,
body:not(.editor-body) h3 {
    letter-spacing: -0.01em;
}

/* ---------- Marken-Akzent: Blau/Indigo/Lila → Smaragd ---------- */

/* Vollfarbige Flächen (Buttons, CTA-Bänder) */
body:not(.editor-body) .bg-blue-500,
body:not(.editor-body) .bg-blue-600,
body:not(.editor-body) .bg-blue-700,
body:not(.editor-body) .bg-indigo-500,
body:not(.editor-body) .bg-indigo-600,
body:not(.editor-body) .bg-indigo-700,
body:not(.editor-body) .bg-purple-600,
body:not(.editor-body) .bg-purple-700 {
    background-color: var(--accent) !important;
}

body:not(.editor-body) .hover\:bg-blue-700:hover,
body:not(.editor-body) .hover\:bg-blue-800:hover,
body:not(.editor-body) .hover\:bg-indigo-700:hover,
body:not(.editor-body) .hover\:bg-purple-700:hover {
    background-color: var(--accent-hover) !important;
}

/* Text */
body:not(.editor-body) .text-blue-500,
body:not(.editor-body) .text-blue-600,
body:not(.editor-body) .text-blue-700,
body:not(.editor-body) .text-indigo-600,
body:not(.editor-body) .text-purple-600 {
    color: var(--accent) !important;
}

body:not(.editor-body) .text-blue-800,
body:not(.editor-body) .text-indigo-800 {
    color: var(--accent-dark) !important;
}

body:not(.editor-body) .hover\:text-blue-600:hover,
body:not(.editor-body) .hover\:text-blue-700:hover,
body:not(.editor-body) .hover\:text-blue-800:hover {
    color: var(--accent-hover) !important;
}

/* Ränder */
body:not(.editor-body) .border-blue-500,
body:not(.editor-body) .border-blue-600,
body:not(.editor-body) .border-indigo-500,
body:not(.editor-body) .border-indigo-600 {
    border-color: var(--accent) !important;
}

/* Helle Tönungen → ruhige, leicht smaragdstichige Fläche */
body:not(.editor-body) .bg-blue-50,
body:not(.editor-body) .bg-blue-100,
body:not(.editor-body) .bg-indigo-50,
body:not(.editor-body) .bg-indigo-100,
body:not(.editor-body) .bg-purple-50 {
    background-color: #eef4f1 !important;
}

/* ---------- Verläufe flach + sinnvoll einfärben ---------- */
body:not(.editor-body) [class*="bg-gradient-to"] {
    background-image: none !important;
}

/* helle Verlaufs-Ursprünge → weiche neutrale Fläche */
body:not(.editor-body) .from-blue-50,
body:not(.editor-body) .from-blue-100,
body:not(.editor-body) .from-indigo-50,
body:not(.editor-body) .from-indigo-100,
body:not(.editor-body) .from-purple-50,
body:not(.editor-body) .from-gray-50,
body:not(.editor-body) .from-gray-100 {
    background-color: #eef4f1 !important;
}

/* kräftige Verlaufs-Ursprünge → Smaragd */
body:not(.editor-body) .from-blue-500,
body:not(.editor-body) .from-blue-600,
body:not(.editor-body) .from-blue-700,
body:not(.editor-body) .from-indigo-500,
body:not(.editor-body) .from-indigo-600,
body:not(.editor-body) .from-purple-600 {
    background-color: var(--accent) !important;
}

/* ---------- Fokus-Ringe ---------- */
body:not(.editor-body) .focus\:ring-blue-500:focus,
body:not(.editor-body) .focus\:ring-blue-600:focus,
body:not(.editor-body) .focus\:ring-indigo-500:focus {
    --tw-ring-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-soft) !important;
}

/* ---------- Feinschliff: weichere Karten & Buttons ---------- */
body:not(.editor-body) .rounded,
body:not(.editor-body) .rounded-lg {
    border-radius: 10px;
}

body:not(.editor-body) .shadow-lg {
    box-shadow: 0 1px 2px rgba(24, 24, 27, .04), 0 18px 44px -20px rgba(24, 24, 27, .22) !important;
}

/* ============================================================
   Auth-Seiten (login.php / register.php): zweispaltige Karte
   ============================================================ */
.auth-body { min-height: 100vh; min-height: 100dvh; margin: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 940px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 1px 2px rgba(24,24,27,.04), 0 30px 70px -32px rgba(24,24,27,.30); display: grid; grid-template-columns: 1fr; }
@media (min-width: 880px) { .auth-card { grid-template-columns: 1.05fr .95fr; } }
.auth-aside { display: none; }
@media (min-width: 880px) { .auth-aside { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 44px; background: radial-gradient(130% 130% at 0% 0%, #138a66, #0b5f47); color: #eafaf4; } }
.auth-aside .a-brand { font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; color: #fff; }
.auth-aside .a-tag { margin-top: 10px; color: rgba(255,255,255,.82); line-height: 1.55; font-size: .95rem; }
.auth-feat { display: flex; gap: 11px; align-items: flex-start; margin-top: 16px; font-size: .92rem; color: rgba(255,255,255,.92); }
.auth-feat i { margin-top: 2px; color: #a7ecd3; }
.auth-aside .a-foot { font-size: .8rem; color: rgba(255,255,255,.6); }
.auth-main { padding: 40px 28px; }
@media (min-width: 880px) { .auth-main { padding: 44px; } }
.auth-back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .85rem; text-decoration: none; font-weight: 500; }
.auth-back:hover { color: var(--ink); }
.auth-h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 18px 0 6px; }
.auth-sub { color: var(--ink-2); font-size: .95rem; margin-bottom: 22px; }
.premium-note { display: flex; align-items: center; gap: 9px; background: var(--accent-soft); color: #0b5f47; border: 1px solid rgba(15,122,90,.22); border-radius: 12px; padding: 11px 14px; font-size: .85rem; font-weight: 600; margin-bottom: 20px; }
.lbl { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.fld { width: 100%; padding: .72rem .9rem; border: 1px solid var(--line-strong); border-radius: 10px; font-size: .95rem; font-family: var(--font-ui); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
.fld::placeholder { color: #b4b4ad; }
.fld:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn-primary { width: 100%; padding: .8rem; border: none; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: .98rem; font-family: var(--font-ui); cursor: pointer; transition: background .15s; box-shadow: 0 1px 2px rgba(15,122,90,.25); }
.btn-primary:hover { background: var(--accent-hover); }
.link-accent { color: var(--accent); font-weight: 600; text-decoration: none; }
.link-accent:hover { text-decoration: underline; }
.alert-err { display: flex; align-items: center; gap: 8px; background: #fdecea; border: 1px solid #f3c7c0; color: #9b2c22; padding: 11px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 18px; }

/* ============================================================
   Einheitliche Kopfzeile auf allen Inhaltsseiten (index, faq, …):
   feine Smaragd-Markenleiste + Tiefe. Editor (body.editor-body) ist
   ausgenommen; Dashboard/Anschreiben haben eigene #id-Styles (gewinnen).
   ============================================================ */
body:not(.editor-body) header {
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0 3px 0 var(--accent), 0 1px 0 rgba(24, 24, 27, .03), 0 14px 30px -18px rgba(24, 24, 27, .35);
}

/* Menü-Links als feine Pills (Hover: Smaragd) – nur in der Kopfzeile */
body:not(.editor-body) header .hidden.lg\:flex a:not(.flex),
body:not(.editor-body) header nav a:not(.flex) {
    border-radius: 9px;
    transition: color .15s ease, background .15s ease;
}
body:not(.editor-body) header .hidden.lg\:flex a:not(.flex):hover,
body:not(.editor-body) header nav a:not(.flex):hover {
    color: var(--accent) !important;
    background: var(--accent-soft);
}
