/* theme.css */
:root {
    /* Weicher Erdton (Sand / Camel) für Akzente */
    --primary-earth: #D4A373;
    --primary-dark: #b88b5d;
    
    /* Helle Entspannte Farben */
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    
    /* Weiche Textfarben statt hartem Schwarz */
    --text-main: #334155; 
    --text-muted: #64748b;
    
    --border-light: rgba(0,0,0,0.05);
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    scroll-behavior: smooth;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Wrapper for sticky footer */
.page-content {
    flex: 1;
}

/* TICKET / ERROR MESSAGES */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}
.alert-error { background: rgba(225, 29, 72, 0.1); color: #e11d48; border: 1px solid rgba(225,29,72,0.3); }
.alert-success { background: rgba(46, 204, 113, 0.1); color: #00b894; border: 1px solid rgba(0,184,148,0.3); }

/* HEADER */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
    text-decoration: none;
}
.logo span { color: var(--primary-earth); }
.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--primary-earth); }
.nav-links .btn {
    color: white;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}
.btn-primary {
    background: var(--primary-earth);
    color: white;
    box-shadow: 0 10px 20px rgba(212, 163, 115, 0.3);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(212, 163, 115, 0.4);
    color: white !important;
}
.btn-outline {
    background: transparent;
    color: var(--text-main) !important;
    border: 2px solid var(--primary-earth);
}
.btn-outline:hover {
    background: var(--primary-earth);
    color: white !important;
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/bg_nature.png');
    background-size: cover;
    background-position: center;
    /* Reduzierter Kontrast und leichter Blur für "Chill" Stimmung */
    filter: brightness(1.1) contrast(0.9);
    z-index: 0;
}
/* Weisses Overlay, um den Text besser lesbar zu machen gegenüber Natur */
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(249, 250, 251, 1));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}
.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--text-main);
}
.hero h1 span {
    color: var(--primary-earth);
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* FEATURES SECTION */
.features {
    padding: 100px 50px;
    background: var(--bg-light);
    max-width: 1200px;
    margin: 0 auto;
}
.features-header {
    text-align: center;
    margin-bottom: 80px;
}
.features-header h2 { font-size: 2.5rem; margin-bottom: 10px; color: var(--text-main); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}
.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 40px;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(212, 163, 115, 0.2);
}
.feature-card h3 { color: var(--text-main); font-size: 1.5rem; }
.feature-card p { color: var(--text-muted); line-height: 1.6; }

/* AUTH SECTION */
.auth-section {
    padding: 100px 20px;
    background: var(--bg-light);
    display: flex;
    justify-content: center;
}
.auth-container {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 50px;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}
.auth-container h2 { text-align: center; margin-bottom: 30px; font-size: 2rem; color: var(--text-main); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}
.form-group input:focus { border-color: var(--primary-earth); background: white; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 0.9rem; }
.auth-switch a { color: var(--primary-earth); text-decoration: none; font-weight: 600; }

/* STATUS CALLOUT (Logged In) */
.status-box {
    text-align: center;
    padding: 40px;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid var(--border-light);
}
.status-box p { color: var(--text-muted); }

/* FOOTER */
footer {
    background: var(--bg-white);
    padding: 50px;
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}
.footer-links { margin-bottom: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; margin: 0 15px; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--primary-earth); }

/* Dashboard Specific Container */
.dashboard-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 50px 20px;
    background-image: url('images/bg_nature.png');
    background-size: cover;
    background-position: center;
    position: relative;
}
.dashboard-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
}
.dashboard-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.9);
    border: 1px solid white;
    padding: 60px 50px;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}
.dashboard-card h1 { font-size: 2.5rem; margin-bottom: 20px; margin-top: 0; color: var(--text-main); }
.dashboard-card p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 40px; }
.icon-box { font-size: 4rem; margin-bottom: 20px; }
.status-badge {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.status-pending { background: rgba(212, 163, 115, 0.15); color: #b88b5d; border: 1px solid rgba(212,163,115,0.4); }
.status-approved { background: rgba(46, 204, 113, 0.15); color: #00b894; border: 1px solid rgba(0,184,148,0.4); }

/* Map Tool Specific Container */
.map-tool-container {
    padding: 120px 20px 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.map-wrapper {
    position: relative;
    background: var(--bg-white);
    padding: 15px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

#lond-map {
    height: 600px;
    width: 100%;
    border-radius: 12px;
    cursor: crosshair;
    z-index: 10;
}

.map-controls-overlay {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 25px;
    border-radius: 50px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    gap: 15px;
    align-items: center;
}

.map-controls-overlay .btn {
    padding: 8px 20px;
    font-size: 0.95rem;
}
.map-controls-overlay .btn-outline {
    border-color: var(--primary-earth) !important;
    color: var(--primary-earth) !important;
}
.map-controls-overlay .btn-outline.active {
    background: var(--primary-earth) !important;
    color: white !important;
}

.results-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    min-height: 200px;
}
.results-panel h2 {
    color: var(--text-main);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.plz-card {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    transition: transform 0.2s ease;
}
.plz-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.plz-card span {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 5px;
}

.loading {
    text-align: center;
    color: var(--primary-earth);
    font-weight: 600;
    display: none;
    margin-top: 20px;
}

/* Map custom styles for lasso */
.leaflet-grab { cursor: move; }
.drawing-mode { cursor: crosshair !important; }
.drawing-mode .leaflet-interactive { cursor: crosshair !important; }

/* ========================================
   CV UPLOAD STYLES
   ======================================== */

/* Dropzone */
.cv-dropzone {
    border: 2px dashed rgba(212, 163, 115, 0.35);
    border-radius: 16px;
    padding: 40px 20px;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(212, 163, 115, 0.03);
}
.cv-dropzone:hover {
    border-color: var(--primary-earth);
    background: rgba(212, 163, 115, 0.06);
    transform: translateY(-2px);
}
.cv-dropzone-active {
    border-color: var(--primary-earth) !important;
    background: rgba(212, 163, 115, 0.1) !important;
    box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.15);
}
.cv-dropzone-content {
    pointer-events: none;
}
.cv-dropzone-icon {
    margin-bottom: 12px;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.cv-dropzone:hover .cv-dropzone-icon {
    opacity: 1;
    transform: translateY(-4px);
}
.cv-dropzone-text {
    font-size: 1rem;
    color: var(--text-main);
    margin: 0 0 6px 0;
    font-weight: 500;
}
.cv-dropzone-link {
    color: var(--primary-earth);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cv-dropzone-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Existing CV Display */
.cv-existing-info {
    padding: 10px 0;
}
.cv-file-icon {
    margin-bottom: 10px;
    opacity: 0.9;
}
.cv-filename {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
    margin: 8px 0;
    word-break: break-all;
}
.cv-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 12px 0;
}
.cv-meta-badge {
    background: rgba(212, 163, 115, 0.1);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.cv-upload-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 8px 0 15px 0;
}
.cv-replace-btn {
    padding: 8px 25px !important;
    font-size: 0.9rem !important;
    margin-top: 5px;
}
.cv-cancel-btn {
    margin-top: 12px;
    padding: 6px 20px !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cv-cancel-btn:hover {
    color: var(--text-main) !important;
}

/* Upload Progress */
.cv-progress-container {
    padding: 30px 0;
    text-align: center;
}
.cv-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(212, 163, 115, 0.15);
    border-top-color: var(--primary-earth);
    border-radius: 50%;
    margin: 0 auto 16px auto;
    animation: cvSpin 0.8s linear infinite;
}
@keyframes cvSpin {
    to { transform: rotate(360deg); }
}
.cv-progress-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 0 16px 0;
}
.cv-progress-bar-track {
    height: 6px;
    background: rgba(212, 163, 115, 0.12);
    border-radius: 10px;
    overflow: hidden;
    max-width: 250px;
    margin: 0 auto;
}
.cv-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-earth), var(--primary-dark));
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Result Modal */
.cv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cv-modal-overlay.cv-modal-visible {
    opacity: 1;
}
.cv-modal {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 50px 40px 40px 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
    text-align: center;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}
.cv-modal-visible .cv-modal {
    transform: scale(1) translateY(0);
}
.cv-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s ease;
}
.cv-modal-close:hover {
    color: var(--text-main);
}
.cv-modal-icon {
    margin-bottom: 16px;
}
.cv-modal-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin: 0 0 10px 0;
    font-weight: 700;
}
.cv-modal-body {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.cv-modal-action {
    padding: 12px 35px !important;
}

/* Result Details */
.cv-result-details {
    text-align: left;
    margin-top: 15px;
}
.cv-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.cv-result-row:last-child {
    border-bottom: none;
}
.cv-result-label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}
.cv-result-value {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: right;
    word-break: break-all;
    max-width: 60%;
}
.cv-result-preview {
    margin-top: 15px;
    text-align: left;
}
.cv-result-preview-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}
.cv-result-preview-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cv-dropzone {
        padding: 30px 15px;
    }
    .cv-modal {
        padding: 40px 25px 30px 25px;
        border-radius: 20px;
    }
    .cv-meta-badges {
        flex-direction: column;
        align-items: center;
    }
}
