/* ============================================================
   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);
}

.cvwerk-cmp-badge,
#cvwerk-cmp-badge {
    display: none !important;
}

.cvwerk-cmp-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: #9ca3af;
    font-size: 11.5px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

.cvwerk-cmp-btn:hover {
    color: #f3f4f6;
}

.cvwerk-cmp-icon {
    width: 13px;
    height: 13px;
    display: inline-block;
    vertical-align: -1px;
    color: #60a5fa;
    flex-shrink: 0;
}

.cvwerk-cmp-sep {
    opacity: 0.35;
    user-select: none;
}

.cvwerk-cmp-attestation {
    color: #6b7280;
    font-size: 11px;
}

/* Google CMP Floating Revocation Badge site-wide suppression (Official revocation link is located cleanly in the footer) */
#ft-floating-toolbar,
.ft-container,
.ft-menu,
.ft-button-holder,
#ft-reg-bubble,
.ft-reg-bubble,
.ft-symbol-font-load-test,
[id*="ft-floating-toolbar"],
.googlefc-floating-button,
.googlefc-floating-button-container,
.googlefc-floating-button-icon,
.fc-floating-button,
.fc-revocation-link-dialog,
.fc-dialog.fc-revocation-link-dialog,
.fc-consent-preferences-button,
.fc-ab-root .fc-revocation-button,
div[class*="googlefc-floating-button"],
button[class*="googlefc-floating-button"],
div[class*="fc-revocation"]:not(#cvwerk-editor-cookie-btn),
button[class*="fc-revocation"]:not(#cvwerk-editor-cookie-btn),
.google-revocation-link-placeholder,
[class*="google-revocation"],
[id*="google-revocation"],
[id*="googlefc-floating"],
[class*="googlefc-floating"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    clip: rect(0, 0, 0, 0) !important;
}

.fc-consent-root:has(.fc-revocation-link-dialog:only-child) {
    display: none !important;
    pointer-events: none !important;
}

.fc-dialog-container:has(.fc-revocation-link-dialog:only-child) {
    display: none !important;
    pointer-events: none !important;
}

@media print {
    .cvwerk-cmp-badge,
    #cvwerk-cmp-badge,
    #ft-floating-toolbar,
    .ft-container,
    .googlefc-floating-button,
    .fc-revocation-link-dialog,
    .fc-consent-root,
    .fc-dialog-container,
    .fc-ab-root,
    .fc-consent-preferences-button,
    [class*="googlefc"],
    [id*="googlefc"],
    [class*="revocation"],
    ins.adsbygoogle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
        width: 0 !important;
        height: 0 !important;
        pointer-events: none !important;
    }
}

