/* ============================================================
   RecruiterFox – Zentrale Stylesheet
   Aufbau:
   1. CSS-Variablen (Design Tokens)
   2. Reset & Basis
   3. Typografie
   4. Layout-Helfer
   5. Navigation / Header
   6. Buttons
   7. Formulare
   8. Footer
   9. Utilities
   ============================================================ */


/* ── 1. DESIGN TOKENS ─────────────────────────────────────── */
:root {
    /* AKTUALISIERT: Deine neuen Brand-Farben aus dem Screenshot */
    --color-brand-blue:   #39bbf8;
    --color-brand-violet: #7a3ded;
    --color-brand-red:    #d3005e;
    --color-brand-green:  #00ce9b;
    --color-brand-yellow: #ffc24c;

    /* Mapping der Markenfarben auf die Funktionsvariablen */
    --color-violet:        var(--color-brand-violet);
    --color-violet-mid:    #A855F7;
    --color-violet-light:  #C084FC;
    --color-violet-tint:   #F3EFFE;
    --color-violet-tint2:  #EDE9FE;
    --color-sky:           var(--color-brand-blue);
    --color-sky-tint:      #E0F2FE;
    --color-navy:          #1E3A5F;
    
    --nav-height: 80px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Gradient aktualisiert mit neuen Farben */
    --grad: linear-gradient(135deg, var(--color-brand-violet) 0%, var(--color-brand-blue) 100%);

    /* Text */
    --color-text:          #212121;
    --color-text-muted:    #6B6B6B;
    --color-text-light:    #9CA3AF;

    /* Hintergründe & Border */
    --color-bg:            #FFFFFF;
    --color-bg-soft:       #F9F9FB;
    --color-border:        #E9D5FF;
    --color-border-soft:   #F0E6FF;

    /* AKTUALISIERT: Statusfarben für systemweite Konsistenz */
    --color-success:       var(--color-brand-green);
    --color-success-tint:  #ECFDF5;
    --color-warning:       var(--color-brand-yellow);
    --color-warning-tint:  #FFFBEB;
    --color-danger:        var(--color-brand-red);
    --color-danger-tint:   #FEF2F2;

    /* Abstände, Radien & Schatten (unverändert) */
    --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px;
    --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px;
    --shadow-sm: 0 1px 4px rgba(124,58,237,0.06);
    --shadow-md: 0 4px 16px rgba(124,58,237,0.10);
    --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


/* ── 2. RESET & BASIS ─────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}


/* ── 3. TYPOGRAFIE ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { color: var(--color-text); }

a {
    color: var(--color-violet);
    text-decoration: none;
    transition: opacity 0.2s;
}
a:hover { opacity: 0.75; }

strong { font-weight: 600; }

/* Gradient-Text Utility */
.text-grad {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ── 4. LAYOUT ────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--space-3xl) 1.5rem;
}

.section-sm {
    padding: var(--space-2xl) 1.5rem;
}

/* Hintergrundvarianten für Sektionen */
.bg-white      { background: var(--color-bg); }
.bg-soft       { background: var(--color-bg-soft); }
.bg-violet     { background: var(--color-violet-tint); }
.bg-sky        { background: var(--color-sky-tint); }
.bg-navy       { background: var(--color-navy); }


/* ── 5. NAVIGATION / HEADER ───────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-sm);
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    gap: var(--space-xl);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Nav-Links */
nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
    margin: 0;
    padding: 0;
}

nav ul li a {
    font-size: 0.92rem;
    font-weight: 400;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

nav ul li a:hover {
    color: var(--color-violet);
    opacity: 1;
}

/* Auth-Bereich rechts in der Nav */
.auth-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.auth-nav .header-pricing-link {
    background: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%);
    color: #fff;
    box-shadow: 0 3px 12px rgba(126, 34, 206, 0.42);
}

.auth-nav .header-pricing-link i {
    color: inherit;
}

.auth-nav .header-pricing-link:hover {
    opacity: 1;
    background: linear-gradient(135deg, #5b21b6 0%, #9333ea 100%);
    box-shadow: 0 5px 16px rgba(126, 34, 206, 0.52);
}

.header-help-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 1.5px solid rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    color: var(--color-violet);
    background: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.header-help-link:hover {
    color: white;
    background: var(--color-violet);
    border-color: var(--color-violet);
    opacity: 1;
}

.header-help-link:focus-visible {
    outline: 2px solid var(--color-violet);
    outline-offset: 2px;
}

.public-site-header {
    width: 100%;
    flex-shrink: 0;
}

.public-header-logout {
    display: inline;
    margin: 0;
}

body.public-header-overlay-page {
    padding-top: calc(var(--nav-height) + 2rem);
}

body.public-header-overlay-page > .public-site-header {
    position: fixed;
    inset: 0 0 auto;
}

@media (max-width: 800px) {
    .public-site-header nav ul {
        display: none;
    }
}

.user-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.welcome-text {
    color: var(--color-text);
    font-weight: 400;
}

.nav-btn-link {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.88rem;
    font-family: var(--font-base);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.nav-btn-link:hover {
    color: var(--color-violet);
    background: var(--color-violet-tint);
}


/* ── 6. BUTTONS ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 9px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-base);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: opacity 0.2s, transform 0.15s, background 0.2s;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* Primär – Vollton Violet */
.btn-primary {
    background: var(--color-violet);
    color: #fff;
}

/* Gradient – für Hero & Hauptaktionen */
.btn-grad {
    background: var(--grad);
    color: #fff;
}

/* Outline – sekundäre Aktion */
.btn-outline {
    background: transparent;
    color: var(--color-violet);
    border: 1.5px solid var(--color-violet-light);
}
.btn-outline:hover {
    background: var(--color-violet-tint);
    opacity: 1;
}

/* Ghost – für Nav und Inline-Aktionen */
.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1.5px solid var(--color-border);
}
.btn-ghost:hover {
    background: var(--color-bg-soft);
    color: var(--color-text);
    opacity: 1;
}

/* Danger */
.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

/* Success */
.btn-success {
    background: var(--color-success);
    color: #fff;
}

/* Größen */
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 13px 32px; font-size: 1rem; }
.btn-full { width: 100%; }


/* ── 7. FORMULARE ─────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text);
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-violet-light);
    font-size: 0.9rem;
    pointer-events: none;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-base);
    font-size: 0.92rem;
    color: var(--color-text);
    background: #FAFAFA;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.input-group input,
.input-group textarea {
    padding-left: 38px;
}

.input-group input[type="password"],
.input-group input.password-visible {
    padding-right: 38px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px 6px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--color-violet);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-violet);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237C3AED' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}


/* ── 8. FOOTER ────────────────────────────────────────────── */

footer {
    background: var(--color-navy);
    color: #FFFFFF;
    padding: 0;
    text-align: left;
    font-size: 0.88rem;
    width: 100%;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding: 4rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
    height: 50px;
    width: auto;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 1rem;
    line-height: 1.6;
}

.footer-col h4 {
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 0;
}

.footer-col ul li a:hover {
    color: #FFFFFF;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

footer a {
    color: inherit;
    transition: color 0.2s;
}

footer a:hover {
    color: #FFFFFF;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;

    background: #ffffff;
    border-top: 1px solid #dddddd;

    padding: 20px 24px;

    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text p {
    margin: 8px 0;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-button {
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
}

.cookie-button-secondary {
    background: transparent;
    border: 1px solid #666666;
}

.cookie-button-primary {
    border: 1px solid transparent;
}

.footer-link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

@media (max-width: 700px) {

    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-button {
        flex: 1;
    }
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
}

/* ── 9. UTILITIES ─────────────────────────────────────────── */

/* Badges & Pills (Allgemein) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}
.badge-violet { background: var(--color-violet-tint); color: var(--color-violet); border: 1px solid var(--color-border); }
.badge-sky { background: var(--color-sky-tint); color: #0369A1; }
.badge-success { background: var(--color-success-tint); color: var(--color-success); }
.badge-warning { background: var(--color-warning-tint); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-tint); color: var(--color-danger); }

/* Karten & Divider */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.divider { color: var(--color-border); }

/* Toast & Scrollbar */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--color-violet); color: white;
    padding: 12px 20px; border-radius: var(--radius-md);
    font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow-lg);
    z-index: 9999; opacity: 0; transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-violet-light); border-radius: 3px; }

/* Tooltip & Toast Engine (app.js) */
#js-tooltip {
    position: fixed; background: rgba(30, 58, 95, 0.95);
    color: white; font-size: 0.75rem; font-weight: 400;
    padding: 6px 10px; border-radius: 6px; white-space: normal; max-width: 300px; line-height: 1.45;
    pointer-events: none; z-index: 99999; opacity: 0; transition: opacity 0.15s;
}
#js-tooltip.visible { opacity: 1; }
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast-msg { background: var(--color-violet); color: white; padding: 10px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-size: 0.9rem; font-weight: 500; opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.toast-msg.visible { opacity: 1; transform: translateY(0); }
.toast-msg.toast-error   { background: var(--color-brand-red); } /* Nutzt jetzt Brand Red */
.toast-msg.toast-info    { background: var(--color-navy); }
.toast-msg.toast-success { background: var(--color-brand-green); } /* Nutzt jetzt Brand Green */




/* --- Info Tooltip Styling --- */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.info-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.info-icon {
    font-size: 1.1rem;
    color: var(--color-violet-light);
    cursor: help;
    transition: color 0.2s;
}

.info-icon:hover {
    color: var(--color-brand-violet);
}

.info-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 140%; /* Erscheint über dem Icon */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 280px;
    background: var(--color-navy);
    color: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    z-index: 1100;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; /* Verhindert Flackern */
}

/* Kleiner Pfeil nach unten */
.info-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--color-navy) transparent transparent transparent;
}

.info-container:hover .info-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.info-container:focus-within .info-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.info-container.tooltip-below .info-tooltip {
    top: 140%;
    bottom: auto;
    transform: translateX(-50%) translateY(-10px);
}

.info-container.tooltip-below:hover .info-tooltip,
.info-container.tooltip-below:focus-within .info-tooltip {
    transform: translateX(-50%) translateY(0);
}

.info-container.tooltip-below .info-tooltip::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent var(--color-navy) transparent;
}

.info-tooltip strong {
    color: var(--color-brand-blue);
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-tooltip ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-tooltip li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 12px;
}

.info-tooltip li::before {
    content: "•";
    color: var(--color-brand-violet);
    position: absolute;
    left: 0;
}





/* ============================================================
   DASHBOARD SPECIFIC TABLE BORDERS
   ============================================================ */


		/* --- Optimierte Status-Rahmen (Keine Überlappung mehr) --- */

/* Gemeinsame Basis für Status-Zeilen */
tr.row-accepted td, 
tr.row-rejected td {
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

/* Angenommen (Grün) */
tr.row-accepted td {
    border-top-color: var(--color-success) !important;
    border-bottom-color: var(--color-success) !important;
    background-color: rgba(0, 206, 155, 0.08) !important; /* Nutzt dein Brand-Green */
}
tr.row-accepted td:first-child {
    border-left: 2px solid var(--color-success);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}
tr.row-accepted td:last-child {
    border-right: 2px solid var(--color-success);
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Abgelehnt (Rot) */
tr.row-rejected td {
    border-top-color: var(--color-danger) !important;
    border-bottom-color: var(--color-danger) !important;
    background-color: rgba(211, 0, 94, 0.08) !important; /* Nutzt dein Brand-Red */
}
tr.row-rejected td:first-child {
    border-left: 2px solid var(--color-danger);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}
tr.row-rejected td:last-child {
    border-right: 2px solid var(--color-danger);
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* ============================================================
   DASHBOARD SPECIFIC OVERRIDES (Laut Screenshot)
   ============================================================ */

/* TOKEN BADGE 
   Violett, weiße dünne Outline, kein Shading */
#tokenBadge {
    background: var(--color-brand-violet) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: none !important;
    color: white !important;
}
#tokenBadge i { color: white !important; background: none !important; -webkit-text-fill-color: white !important; }



/* TABELLEN FARBEN (Dateien & Score) 
   Anforderung: Use Blue */
#candidateTable td a, 
#candidateTable td strong.score-val {
    color: var(--color-brand-blue) !important;
    font-weight: 600;
}

/* AMPEL SYSTEM (Analyse Buttons) 
   Flache Farben ohne Shading */
.btn-status-green { background: var(--color-brand-green) !important; border: 1px solid white !important; }
.btn-status-red   { background: var(--color-brand-red) !important; border: 1px solid white !important; }
.btn-status-yellow { background: var(--color-brand-yellow) !important; border: 1px solid white !important; }

