/* 2job Custom Styling & Brand Colors */

html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

:root {
    --brand-50: #eff6ff;
    --brand-100: #dbeafe;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-900: #1e3a8a;
    --slate-icon-dark: #475569;
    --slate-icon-light: #94a3b8;
}

.bg-brand-50 { background-color: #eff6ff !important; }
.bg-brand-100 { background-color: #dbeafe !important; }
.bg-brand-600 { background-color: #2563eb !important; }
.bg-brand-700 { background-color: #1d4ed8 !important; }
.text-brand-600 { color: #2563eb !important; }
.text-brand-700 { color: #1d4ed8 !important; }
.text-brand-800 { color: #1e40af !important; }
.border-brand-100 { border-color: #dbeafe !important; }
.border-brand-200 { border-color: #bfdbfe !important; }
.border-brand-500 { border-color: #3b82f6 !important; }
.border-brand-600 { border-color: #2563eb !important; }
.hover\:bg-brand-700:hover { background-color: #1d4ed8 !important; }
.hover\:text-brand-600:hover { color: #2563eb !important; }
.hover\:text-brand-800:hover { color: #1e40af !important; }

/* Slate Palette Definitions */
.bg-slate-50 { background-color: #f8fafc !important; }
.bg-slate-100 { background-color: #f1f5f9 !important; }
.bg-slate-200 { background-color: #e2e8f0 !important; }
.bg-slate-700 { background-color: #334155 !important; }
.bg-slate-800 { background-color: #1e293b !important; }
.bg-slate-900 { background-color: #0f172a !important; }
.text-slate-400 { color: #94a3b8 !important; }
.text-slate-500 { color: #64748b !important; }
.text-slate-600 { color: #475569 !important; }
.text-slate-700 { color: #334155 !important; }
.text-slate-800 { color: #1e293b !important; }
.text-slate-900 { color: #0f172a !important; }
.border-slate-100 { border-color: #f1f5f9 !important; }
.border-slate-200 { border-color: #e2e8f0 !important; }
.border-slate-300 { border-color: #cbd5e1 !important; }

/* Emerald Palette Definitions (Grün für 2FA, Backups, Bestätigungen) */
.bg-emerald-50 { background-color: #ecfdf5 !important; }
.bg-emerald-100 { background-color: #d1fae5 !important; }
.bg-emerald-200 { background-color: #a7f3d0 !important; }
.bg-emerald-500 { background-color: #10b981 !important; }
.bg-emerald-600 { background-color: #059669 !important; }
.bg-emerald-700 { background-color: #047857 !important; }
.hover\:bg-emerald-700:hover { background-color: #047857 !important; }
.hover\:bg-emerald-100:hover { background-color: #d1fae5 !important; }
.text-emerald-300 { color: #6ee7b7 !important; }
.text-emerald-600 { color: #059669 !important; }
.text-emerald-700 { color: #047857 !important; }
.text-emerald-800 { color: #065f46 !important; }
.text-emerald-900 { color: #064e3b !important; }
.border-emerald-100 { border-color: #d1fae5 !important; }
.border-emerald-200 { border-color: #a7f3d0 !important; }
.border-emerald-300 { border-color: #6ee7b7 !important; }

/* Rose Palette Definitions (Rot für Fehler, Sperren, Löschen) */
.bg-rose-50 { background-color: #fff1f2 !important; }
.bg-rose-100 { background-color: #ffe4e6 !important; }
.bg-rose-600 { background-color: #e11d48 !important; }
.bg-rose-700 { background-color: #be123c !important; }
.hover\:bg-rose-100:hover { background-color: #ffe4e6 !important; }
.hover\:bg-rose-700:hover { background-color: #be123c !important; }
.text-rose-600 { color: #e11d48 !important; }
.text-rose-700 { color: #be123c !important; }
.text-rose-800 { color: #9f1239 !important; }
.text-rose-900 { color: #881337 !important; }
.border-rose-100 { border-color: #ffe4e6 !important; }
.border-rose-200 { border-color: #fecdd3 !important; }
.border-rose-300 { border-color: #fda4af !important; }

/* Amber Palette Definitions (Gelb/Orange für Warnungen, 2FA-Reset) */
.bg-amber-50 { background-color: #fffbeb !important; }
.bg-amber-100 { background-color: #fef3c7 !important; }
.bg-amber-500 { background-color: #f59e0b !important; }
.bg-amber-600 { background-color: #d97706 !important; }
.hover\:bg-amber-100:hover { background-color: #fef3c7 !important; }
.text-amber-700 { color: #b45309 !important; }
.text-amber-800 { color: #92400e !important; }
.text-amber-900 { color: #78350f !important; }
.border-amber-200 { border-color: #fde68a !important; }
.border-amber-300 { border-color: #fcd34d !important; }
.bg-slate-900 { background-color: #0f172a !important; }
.text-slate-900 { color: #0f172a !important; }
.text-slate-800 { color: #1e293b !important; }
.text-slate-700 { color: #334155 !important; }
.text-slate-600 { color: #475569 !important; }
.text-slate-500 { color: #64748b !important; }
.text-slate-400 { color: #94a3b8 !important; }
.text-slate-300 { color: #cbd5e1 !important; }
.border-slate-100 { border-color: #f1f5f9 !important; }
.border-slate-200 { border-color: #e2e8f0 !important; }
.border-slate-300 { border-color: #cbd5e1 !important; }
.border-slate-700 { border-color: #334155 !important; }
.border-slate-800 { border-color: #1e293b !important; }

/* Material Design Two-Tone Graue Icons */
.material-icons-two-tone {
    font-family: 'Material Icons Two Tone', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    color: var(--slate-icon-dark) !important;
}

/* Fallback falls Fonts noch laden */
.material-icons-two-tone {
    font-size: 1.15rem;
    line-height: 1;
}

/* HTMX Transition */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator {
    opacity: 1;
}

/* OpenStreetMap Custom 2Job Map Pin */
.custom-2job-pin {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Hero Search Form: Einheitliche Höhe & dezenter dunkelgrauer Fokusrahmen */
.hero-search-label {
    display: block !important;
    height: 16px !important;
    line-height: 16px !important;
    margin-bottom: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.hero-search-input,
.hero-search-select {
    display: block !important;
    width: 100% !important;
    height: 32px !important;
    line-height: 32px !important;
    padding: 0 8px !important;
    margin: 0 !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.hero-search-input:focus,
.hero-search-select:focus,
.hero-search-input:focus-visible,
.hero-search-select:focus-visible {
    outline: none !important;
    border: 1px solid #475569 !important; /* Dünner dunkelgrauer Rahmen (Slate-600) statt fett blau */
    box-shadow: none !important; /* Kein blaues Leuchten / Ring */
    background-color: rgba(241, 245, 249, 0.6) !important;
}

/* Bottom Navigation Bar (Haupt-Navigation fixiert am unteren Bildschirmrand) */
.bottom-nav-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
    padding-bottom: max(0.25rem, env(safe-area-inset-bottom, 0px)) !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}

.bottom-nav-bar a.text-brand-600 svg path[stroke],
.bottom-nav-bar a.text-brand-600 svg rect[stroke],
.bottom-nav-bar a.text-brand-600 svg circle[stroke],
.bottom-nav-bar .bg-brand-50 svg path[stroke],
.bottom-nav-bar .bg-brand-50 svg rect[stroke],
.bottom-nav-bar .bg-brand-50 svg circle[stroke] {
    stroke: #2563eb !important;
}

html.dark .bottom-nav-bar {
    background-color: rgba(15, 23, 42, 0.96) !important;
    border-top-color: #334155 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
}

html.dark .bottom-nav-bar a.text-brand-600 svg path[stroke],
html.dark .bottom-nav-bar a.text-brand-600 svg rect[stroke],
html.dark .bottom-nav-bar a.text-brand-600 svg circle[stroke],
html.dark .bottom-nav-bar .bg-brand-50 svg path[stroke],
html.dark .bottom-nav-bar .bg-brand-50 svg rect[stroke],
html.dark .bottom-nav-bar .bg-brand-50 svg circle[stroke] {
    stroke: #60a5fa !important;
}

/* Mobile Karte: Feste, 100% blickdichte Kachel für Pin-Details (keine Transparenz!) */
#mobile-pin-detail-card {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-top: 1px solid #cbd5e1 !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.28) !important;
}

html.dark #mobile-pin-detail-card {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border-top-color: #334155 !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6) !important;
}

/* Glassmorphism Frosted Hero Box - 50% Weißer transparenter Hintergrund */
.hero-glass-box {
    background-color: rgba(255, 255, 255, 0.50) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 2px solid rgba(255, 255, 255, 0.70) !important;
}

html.dark .hero-glass-box {
    background-color: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 2px solid rgba(255, 255, 255, 0.20) !important;
}

/* ==============================================================
   Dark Mode Styles (System-Modus, Dunkel & Hell)
   ============================================================== */
html.dark {
    color-scheme: dark;
}

html.dark, html.dark body {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

header {
    background-color: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

html.dark header {
    background-color: rgba(15, 23, 42, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-color: #1e293b !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
}

html.dark header .text-slate-800 {
    color: #f8fafc !important;
}

html.dark header a,
html.dark header button {
    color: #cbd5e1 !important;
}

html.dark header a:hover,
html.dark header button:hover {
    background-color: #1e293b !important;
    color: #60a5fa !important;
}

/* Aktiver Menüpunkt im Header (Dark Mode) */
html.dark header .bg-brand-50 {
    background-color: rgba(37, 99, 235, 0.22) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.45) !important;
}

html.dark header .bg-brand-50 svg {
    color: #60a5fa !important;
}

html.dark header .bg-brand-50 svg path[stroke],
html.dark header .bg-brand-50 svg rect[stroke],
html.dark header .bg-brand-50 svg circle[stroke] {
    stroke: #60a5fa !important;
}

/* Inaktive Icons im Header im Dark Mode */
html.dark header svg path[stroke="#475569"],
html.dark header svg rect[stroke="#475569"],
html.dark header svg circle[stroke="#475569"] {
    stroke: #94a3b8 !important;
}

html.dark header a:hover svg path[stroke="#475569"],
html.dark header a:hover svg rect[stroke="#475569"],
html.dark header a:hover svg circle[stroke="#475569"],
html.dark header button:hover svg path[stroke="#475569"],
html.dark header button:hover svg rect[stroke="#475569"],
html.dark header button:hover svg circle[stroke="#475569"] {
    stroke: #60a5fa !important;
}

/* Footer Icons: Angenehm aufgehellt für perfekten Kontrast auf dunklem Hintergrund */
footer svg path[stroke="#475569"],
footer svg rect[stroke="#475569"],
footer svg circle[stroke="#475569"],
footer svg line[stroke="#475569"],
footer svg polygon[stroke="#475569"] {
    stroke: #cbd5e1 !important;
    transition: stroke 0.2s ease;
}

footer svg path[fill="#94a3b8"],
footer svg rect[fill="#94a3b8"],
footer svg circle[fill="#94a3b8"] {
    fill: #e2e8f0 !important;
    opacity: 0.65 !important;
    transition: fill 0.2s ease, opacity 0.2s ease;
}

footer svg[stroke="currentColor"] {
    stroke: #cbd5e1 !important;
}

/* Hover-Effekt im Footer: Icon leuchtet weiß/hellblau auf */
footer a:hover svg path[stroke="#475569"],
footer a:hover svg rect[stroke="#475569"],
footer a:hover svg circle[stroke="#475569"],
footer a:hover svg line[stroke="#475569"],
footer a:hover svg[stroke="currentColor"],
footer button:hover svg path[stroke="#475569"],
footer button:hover svg rect[stroke="#475569"],
footer button:hover svg circle[stroke="#475569"] {
    stroke: #ffffff !important;
}

footer a:hover svg path[fill="#94a3b8"],
footer a:hover svg rect[fill="#94a3b8"],
footer a:hover svg circle[fill="#94a3b8"],
footer button:hover svg path[fill="#94a3b8"],
footer button:hover svg rect[fill="#94a3b8"],
footer button:hover svg circle[fill="#94a3b8"] {
    fill: #60a5fa !important;
    opacity: 0.9 !important;
}

/* Mobile Bottom Navigation Bar (Dark Mode) */
html.dark .bottom-nav-bar {
    background-color: rgba(15, 23, 42, 0.96) !important;
    border-color: #1e293b !important;
}

html.dark .bottom-nav-bar a {
    color: #94a3b8 !important;
}

html.dark .bottom-nav-bar a.text-brand-600 {
    color: #60a5fa !important;
}

html.dark .bottom-nav-bar .bg-brand-50 {
    background-color: rgba(37, 99, 235, 0.22) !important;
    color: #60a5fa !important;
}

html.dark .bottom-nav-bar svg path[stroke="#475569"] {
    stroke: #94a3b8 !important;
}

/* Dashboard Header & allgemeine Karten (Dark Mode) */
html.dark .bg-white {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

html.dark .bg-slate-50 {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
}

html.dark .bg-slate-100 {
    background-color: #273549 !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* Badges im Dark Mode (Dashboard & Filter) */
html.dark .bg-amber-100 {
    background-color: rgba(245, 158, 11, 0.20) !important;
    color: #fde68a !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
html.dark .bg-blue-100 {
    background-color: rgba(37, 99, 235, 0.20) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(37, 99, 235, 0.35) !important;
}
html.dark .bg-purple-100 {
    background-color: rgba(168, 85, 247, 0.20) !important;
    color: #e9d5ff !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
}
html.dark .bg-emerald-100 {
    background-color: rgba(16, 185, 129, 0.20) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
html.dark .bg-indigo-50 {
    background-color: rgba(99, 102, 241, 0.20) !important;
    color: #c7d2fe !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
}
html.dark .bg-amber-50 {
    background-color: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
    color: #fef3c7 !important;
}
html.dark .text-amber-900,
html.dark .text-amber-800 {
    color: #fde68a !important;
}
html.dark .text-amber-700 {
    color: #fcd34d !important;
}
html.dark .text-indigo-700 {
    color: #c7d2fe !important;
}

/* ==========================================================================
   Startseite Hero & Booking Finder (Dark Mode)
   ========================================================================== */
html.dark #hero-section {
    background-color: #0b1120 !important;
    border-bottom: 1px solid #1e293b !important;
}

html.dark #hero-section img {
    filter: brightness(0.35) contrast(1.15) !important;
    opacity: 0.38 !important;
}

html.dark #hero-section .hero-bg-overlay {
    background: radial-gradient(ellipse at 50% 30%, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.85) 70%, #0b1120 100%),
                linear-gradient(to bottom, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.75) 60%, #0b1120 100%) !important;
}

html.dark .hero-glass-box {
    background-color: rgba(15, 23, 42, 0.82) !important;
    border: none !important;
    box-shadow: none !important;
}

html.dark .hero-glass-box h1 {
    color: #ffffff !important;
}

html.dark .hero-glass-box h1 span {
    color: #60a5fa !important;
    text-decoration-color: #3b82f6 !important;
}

html.dark .hero-glass-box p {
    color: #cbd5e1 !important;
}

html.dark .hero-eyebrow-tag {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border: none !important;
    box-shadow: none !important;
    color: #f1f5f9 !important;
}

/* Booking Finder auf der Startseite (Dark Mode) */
html.dark .hero-search-wrapper {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: none !important;
}

html.dark .hero-search-inner,
html.dark #filter-form .bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark .hero-search-inner > div,
html.dark #filter-form .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: #334155 !important;
}

html.dark #filter-form .hover\:bg-slate-50\/80:hover {
    background-color: #273549 !important;
}

html.dark .hero-search-icon-box {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #94a3b8 !important;
}

html.dark .hero-search-icon-box svg path,
html.dark .hero-search-icon-box svg circle,
html.dark .hero-search-icon-box svg rect {
    stroke: #94a3b8 !important;
}

html.dark .hero-search-label {
    color: #94a3b8 !important;
}

html.dark .hero-search-input,
html.dark .hero-search-select {
    color: #f8fafc !important;
    background-color: transparent !important;
}

html.dark .hero-search-input::placeholder {
    color: #64748b !important;
}

/* Schnellfinder Chips (Dark Mode) */
html.dark .schnellfinder-label {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

html.dark .schnellfinder-chip {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html.dark .schnellfinder-chip:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}

html.dark .schnellfinder-chip input:checked + span,
html.dark .schnellfinder-chip:has(input:checked) {
    background-color: #1e3a8a !important;
    border-color: #3b82f6 !important;
    color: #93c5fd !important;
}

/* View Switcher Bar (Dark Mode) */
html.dark .job-view-switcher-bar {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #job-count-indicator {
    color: #cbd5e1 !important;
}

html.dark #job-count-indicator strong {
    color: #60a5fa !important;
}

html.dark .job-view-switcher-group {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

html.dark .job-view-switcher-group button {
    color: #94a3b8 !important;
}

html.dark .job-view-switcher-group button:hover {
    color: #f8fafc !important;
}

html.dark .job-view-switcher-group button.bg-white {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border: 1px solid #3b82f6 !important;
}

/* ==========================================================================
   Job Cards (Dark Mode)
   ========================================================================== */
html.dark .job-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

html.dark .job-card:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

/* Category Label im Job Card (Fix für Lesbarkeit & Kontrast) */
html.dark .job-card-category {
    color: #cbd5e1 !important;
}

html.dark .job-card-category span {
    color: #cbd5e1 !important;
    font-weight: 600 !important;
}

html.dark .job-card-category svg path,
html.dark .job-card-category svg rect,
html.dark .job-card-category svg circle {
    stroke: #60a5fa !important;
}

/* Job Card Title & Link */
html.dark .job-card h3 a,
html.dark .job-card-title {
    color: #ffffff !important;
}

html.dark .job-card h3 a:hover,
html.dark .job-card-title:hover {
    color: #60a5fa !important;
}

/* Job Card Meta Line (Arbeitgeber, Ort, Stunden, Startdatum) */
html.dark .job-card-meta {
    color: #94a3b8 !important;
}

html.dark .job-card-meta span {
    color: #cbd5e1 !important;
}

html.dark .job-card-meta strong {
    color: #f1f5f9 !important;
}

html.dark .job-card-meta svg path,
html.dark .job-card-meta svg circle {
    stroke: #94a3b8 !important;
}

/* Vergütung Pill */
html.dark .job-card-wage {
    background-color: #0f172a !important;
    color: #38bdf8 !important;
    border-color: #334155 !important;
}

html.dark .job-card-wage span {
    color: #38bdf8 !important;
}

html.dark .job-card-wage svg path,
html.dark .job-card-wage svg circle {
    stroke: #38bdf8 !important;
}

/* Type Badges: Privat vs Gewerbe */
html.dark .job-card-badge-type {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

html.dark .job-card-badge-type svg path,
html.dark .job-card-badge-type svg rect {
    stroke: #94a3b8 !important;
}

/* Type Badges: Angebot vs Gesuch */
html.dark .job-card-badge-offer {
    background-color: rgba(37, 99, 235, 0.20) !important;
    color: #93c5fd !important;
    border-color: rgba(37, 99, 235, 0.40) !important;
}

html.dark .job-card-badge-request {
    background-color: rgba(245, 158, 11, 0.20) !important;
    color: #fde68a !important;
    border-color: rgba(245, 158, 11, 0.40) !important;
}

/* Job Card Description */
html.dark .job-card-desc,
html.dark .job-card p.text-slate-600 {
    color: #cbd5e1 !important;
}

/* Job Card Footer & Slot Badges */
html.dark .job-card-footer {
    border-top-color: #334155 !important;
}

html.dark .job-card-slot {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

html.dark .job-card-slot svg path,
html.dark .job-card-slot svg circle {
    stroke: #94a3b8 !important;
}

html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300 {
    border-color: #334155 !important;
}

html.dark .text-slate-900 {
    color: #f8fafc !important;
}

html.dark .text-slate-800 {
    color: #f1f5f9 !important;
}

html.dark .text-slate-700 {
    color: #cbd5e1 !important;
}

html.dark .text-slate-600 {
    color: #cbd5e1 !important;
}

html.dark .text-slate-500 {
    color: #94a3b8 !important;
}

html.dark .text-slate-400 {
    color: #94a3b8 !important;
}

html.dark input, 
html.dark select, 
html.dark textarea {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

html.dark .shadow-sm,
html.dark .shadow-md,
html.dark .shadow-lg,
html.dark .shadow-xl {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4) !important;
}

/* Tabellen-Listenansicht (Dark Mode) */
html.dark #job-table-view {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #job-table-view table thead tr {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

html.dark #job-table-view table tbody tr {
    border-color: #334155 !important;
}

html.dark #job-table-view table tbody tr:hover {
    background-color: rgba(51, 65, 85, 0.5) !important;
}

/* ==========================================================================
   Moderne Tooltip-Komponente (erscheint schwebend über/unter den Icons)
   ========================================================================== */
[data-tooltip],
[data-tooltip-bottom] {
    position: relative !important;
}

[data-tooltip]::before,
[data-tooltip-bottom]::before {
    position: absolute;
    left: 50%;
    padding: 5px 9px;
    background-color: rgba(15, 23, 42, 0.96);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1), visibility 160ms;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 1000;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
}

[data-tooltip-bottom]::before {
    content: attr(data-tooltip-bottom);
    top: calc(100% + 8px);
    bottom: auto;
    transform: translateX(-50%) translateY(-4px);
}

[data-tooltip]::after,
[data-tooltip-bottom]::after {
    content: '';
    position: absolute;
    left: 50%;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1), visibility 160ms;
    z-index: 1000;
}

[data-tooltip]::after {
    bottom: calc(100% + 3px);
    transform: translateX(-50%) translateY(4px);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.96) transparent transparent transparent;
}

[data-tooltip-bottom]::after {
    top: calc(100% + 3px);
    bottom: auto;
    transform: translateX(-50%) translateY(-4px);
    border-width: 0 5px 5px 5px;
    border-style: solid;
    border-color: transparent transparent rgba(15, 23, 42, 0.96) transparent;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::before,
[data-tooltip]:focus-visible::after,
[data-tooltip-bottom]:hover::before,
[data-tooltip-bottom]:hover::after,
[data-tooltip-bottom]:focus-visible::before,
[data-tooltip-bottom]:focus-visible::after {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Dark Mode Tooltip Anpassung */
html.dark [data-tooltip]::before,
html.dark [data-tooltip-bottom]::before {
    background-color: rgba(30, 41, 59, 0.98);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

html.dark [data-tooltip]::after {
    border-color: rgba(30, 41, 59, 0.98) transparent transparent transparent;
}

html.dark [data-tooltip-bottom]::after {
    border-color: transparent transparent rgba(30, 41, 59, 0.98) transparent;
}

/* =====================================================================
   Custom UI Toggle Switch Component (Hochkontrast-Schalter mit Knopf)
   ===================================================================== */
.ui-toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
    vertical-align: middle;
}

.ui-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    margin: 0;
    pointer-events: none;
}

.ui-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1; /* slate-300: klarer Kontrast */
    border: 2px solid #94a3b8; /* slate-400 */
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.ui-toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Aktiv / Checked State: 2job Blau */
.ui-toggle-switch input:checked + .ui-toggle-slider {
    background-color: #2563eb !important;
    border-color: #1d4ed8 !important;
}

.ui-toggle-switch input:checked + .ui-toggle-slider::before {
    transform: translateX(24px) !important;
    background-color: #ffffff !important;
}

.ui-toggle-switch input:focus-visible + .ui-toggle-slider {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.ui-toggle-switch:hover .ui-toggle-slider {
    filter: brightness(0.96);
}

#btn-create-backup {
    background-color: #059669 !important;
    color: #ffffff !important;
    border: 1px solid #047857 !important;
    display: inline-flex !important;
    align-items: center !important;
}

#btn-create-backup:hover {
    background-color: #047857 !important;
}

html.dark #btn-create-backup {
    background-color: #059669 !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
}

/* ==========================================================================
   Registrierung: Kompakte Sicherheitshinweise & DSGVO-Texte
   ========================================================================== */
.reg-security-notice {
    font-size: 10px !important;
    line-height: 1.45 !important;
    padding: 7px 10px !important;
}

.reg-dsgvo-notice {
    font-size: 10.5px !important;
    line-height: 1.45 !important;
}

.reg-activation-notice {
    font-size: 10.5px !important;
    line-height: 1.45 !important;
    padding: 7px 10px !important;
}

/* ==========================================================================
   Legal Modal (Datenschutz & Impressum) im Dark Mode
   ========================================================================== */
html.dark #legal-modal .legal-modal-container {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html.dark #legal-modal .legal-modal-header {
    background-color: rgba(30, 41, 59, 0.95) !important;
    border-color: #334155 !important;
}

html.dark #legal-modal .legal-modal-header h3 {
    color: #f8fafc !important;
}

html.dark #legal-modal .legal-modal-tabs {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

html.dark #legal-modal .legal-modal-tabs button.bg-slate-100 {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
}

html.dark #legal-modal .legal-modal-tabs button.bg-slate-100:hover {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark #legal-modal .legal-modal-body {
    color: #cbd5e1 !important;
}

html.dark #legal-modal .legal-modal-body h4 {
    color: #f8fafc !important;
}

html.dark #legal-modal .legal-modal-body p,
html.dark #legal-modal .legal-modal-body ul,
html.dark #legal-modal .legal-modal-body li {
    color: #cbd5e1 !important;
}

html.dark #legal-modal .legal-modal-body strong {
    color: #f8fafc !important;
}

html.dark #legal-modal .legal-modal-footer {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

/* --- Passwortfelder: Augen-Icon zum Anzeigen/Verbergen (siehe static/js/app-utils.js) --- */
.pw-field {
    position: relative;
    display: block;
}
.pw-field > input {
    padding-right: 2.75rem !important;
}
.pw-toggle {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: color 120ms, background-color 120ms;
}
.pw-toggle:hover {
    color: #0f172a;
    background-color: rgba(148, 163, 184, 0.18);
}
.pw-toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}
html.dark .pw-toggle {
    color: #94a3b8;
}
html.dark .pw-toggle:hover {
    color: #f1f5f9;
    background-color: rgba(148, 163, 184, 0.2);
}
/* Browser-eigenes Auge (Edge) ausblenden, damit es nicht doppelt erscheint */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* --- Navigation: "Bereiche" (Jobbereiche & Infos) – Dropdown Desktop / Panel Smartphone --- */
.nav-areas-dropdown[hidden],
.nav-areas-sheet[hidden] {
    display: none !important;
}
.nav-areas-chevron {
    transition: transform 150ms;
}
[aria-expanded="true"] > .nav-areas-chevron {
    transform: rotate(180deg);
}
.nav-areas-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    width: 16.5rem;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
.nav-areas-heading {
    padding: 0.25rem 0.6rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}
.nav-areas-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.nav-areas-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.6rem;
    border-radius: 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    transition: background-color 120ms, color 120ms;
}
.nav-areas-link:hover,
.nav-areas-link:focus-visible {
    background: #eff6ff;
    color: #2563eb;
    outline: none;
}
.nav-areas-divider {
    height: 1px;
    margin: 0.35rem 0.6rem;
    background: #e2e8f0;
}
html.dark .nav-areas-divider {
    background: #1e293b;
}
.nav-areas-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    z-index: 49;
    padding: 0 0.75rem 0.5rem;
}
.nav-areas-sheet-inner {
    max-width: 28rem;
    margin: 0 auto;
    padding: 0.6rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.1rem;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.16);
}
.nav-areas-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    color: #64748b;
}
.nav-areas-close:hover {
    background: #f1f5f9;
}
html.dark .nav-areas-dropdown,
html.dark .nav-areas-sheet-inner {
    background: #0f172a;
    border-color: #1e293b;
}
html.dark .nav-areas-link {
    color: #e2e8f0;
}
html.dark .nav-areas-link:hover,
html.dark .nav-areas-link:focus-visible {
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
}
html.dark .nav-areas-close:hover {
    background: #1e293b;
}

/* Bottom-Nav (Smartphone): kompakte Beschriftung, damit 5 Punkte nebeneinander passen.
   Hinweis: text-[9px] existiert im statischen Tailwind 2.2 nicht und wird hier gezielt definiert. */
.bottom-nav-bar .text-\[9px\] {
    font-size: 10px;
    line-height: 1.2;
}
.bottom-nav-bar > div > a,
.bottom-nav-bar > div > button {
    min-width: 0;
}

/* ==========================================================================
   Arbitrary-Value-Klassen (Tailwind-3-Syntax wie text-[11px], max-w-[1680px])
   Das statische Tailwind 2.2 (ohne JIT) kennt diese Klassen nicht, sie wären
   sonst wirkungslos. Hier werden alle in app/templates und app/static/js
   verwendeten Varianten nachgebildet. Neue Arbitrary-Klassen bitte hier ergänzen.
   ========================================================================== */

/* Schriftgrößen (wie in Tailwind 3 nur font-size, Zeilenhöhe bleibt geerbt) */
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }

/* Breiten und Höhen */
.max-w-\[120px\] { max-width: 120px; }
.max-w-\[130px\] { max-width: 130px; }
.max-w-\[140px\] { max-width: 140px; }
.max-w-\[170px\] { max-width: 170px; }
.max-w-\[180px\] { max-width: 180px; }
.max-w-\[1650px\] { max-width: 1650px; }
.max-w-\[1680px\] { max-width: 1680px; }
.min-h-\[72px\] { min-height: 72px; }
.max-h-\[90vh\] { max-height: 90vh; }
.max-h-\[calc\(85dvh-120px\)\] { max-height: calc(85vh - 120px); max-height: calc(85dvh - 120px); }
.max-h-\[calc\(88dvh-70px\)\] { max-height: calc(88vh - 70px); max-height: calc(88dvh - 70px); }

/* Ebenen */
.z-\[70\] { z-index: 70; }
.z-\[80\] { z-index: 80; }

/* Filter */
.backdrop-blur-\[0\.5px\] {
    /* Tailwind 2 bräuchte zusätzlich .backdrop-filter; wie in Tailwind 3 direkt wirksam */
    -webkit-backdrop-filter: blur(0.5px);
    backdrop-filter: blur(0.5px);
}

/* :has()-Varianten (ausgewählte Kontotyp-Karte bei der Registrierung) */
.has-\[\:checked\]\:border-brand-600:has(:checked) { border-color: #2563eb !important; }
.has-\[\:checked\]\:bg-brand-50\/40:has(:checked) { background-color: rgba(239, 246, 255, 0.4) !important; }
html.dark .dark\:has-\[\:checked\]\:bg-brand-950\/30:has(:checked) { background-color: rgba(23, 37, 84, 0.3) !important; }

/* Responsive Varianten (Tailwind-2-Breakpoints: sm 640, md 768, lg 1024, xl 1280) */
@media (min-width: 1024px) {
    .lg\:w-\[420px\] { width: 420px; }
}
