/* =========================================================
   Corporate UI Theme
   Farben:
   Weiß:  #FFFFFF
   Orange:#FC7C00
   Blau:  #005EAA
   ========================================================= */

:root {
    --brand-white: #ffffff;
    --brand-orange: #fc7c00;
    --brand-blue: #005eaa;
    --brand-blue-dark: #003f7a;
    --brand-blue-soft: #eaf4ff;

    --text-main: #07142f;
    --text-muted: #5f6f89;

    --bg-main: #f4f9ff;
    --bg-soft: #ffffff;
    --border-soft: rgba(0, 94, 170, 0.12);

    --shadow-soft: 0 18px 55px rgba(0, 94, 170, 0.12);
    --shadow-card: 0 12px 35px rgba(0, 94, 170, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

/* =========================================================
   Base Layout
   ========================================================= */

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(0, 94, 170, 0.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(252, 124, 0, 0.10), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f5faff 42%, #eaf4ff 100%);
    overflow-x: hidden;
}

/* =========================================================
   Particle Background
   ========================================================= */

#particles-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(234, 244, 255, 0.94)),
        radial-gradient(circle at 15% 15%, rgba(0, 94, 170, 0.15), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(252, 124, 0, 0.11), transparent 26%);
}

#particles-overlay {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Subtiles Tech-Muster */
#particles-overlay::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.36;
    background-image:
        linear-gradient(rgba(0, 94, 170, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 94, 170, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 75%, transparent 100%);
}

/* =========================================================
   Auth Shell
   ========================================================= */

.auth-shell {
    position: relative;
}

.glass-card {
    position: relative;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.92));
    border: 1px solid rgba(0, 94, 170, 0.14);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    color: var(--text-main);
}

/* diagonale Fläche wie im Referenzbild */
.glass-card::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -25%;
    width: 70%;
    height: 70%;
    background:
        linear-gradient(135deg, rgba(0, 94, 170, 0.08), rgba(255, 255, 255, 0)),
        radial-gradient(circle, rgba(252, 124, 0, 0.12), transparent 55%);
    transform: rotate(-12deg);
    border-radius: 36px;
    pointer-events: none;
}

.glass-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(252, 124, 0, 0.85), transparent 22%) top left / 100% 3px no-repeat,
        linear-gradient(180deg, rgba(0, 94, 170, 0.18), transparent 35%);
    opacity: 0.75;
}

.glass-card > * {
    position: relative;
    z-index: 2;
}

/* =========================================================
   Typography
   ========================================================= */

.text-white {
    color: var(--text-main) !important;
}

.text-gray-300,
.text-gray-200 {
    color: var(--text-muted) !important;
}

.text-indigo-300,
.text-green-300 {
    color: var(--brand-orange) !important;
    letter-spacing: 0.22em;
}

h1,
h2,
h3 {
    color: var(--text-main);
    letter-spacing: -0.04em;
}

h2 {
    text-shadow: none;
}

/* =========================================================
   Logo
   ========================================================= */

.logo-glow {
    filter: drop-shadow(0 12px 24px rgba(0, 94, 170, 0.18));
}

.float-soft {
    animation: floatSoft 5s ease-in-out infinite;
}

@keyframes floatSoft {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* =========================================================
   Inputs
   ========================================================= */

.input-modern {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 94, 170, 0.16);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    box-shadow: 0 8px 22px rgba(0, 94, 170, 0.06);
    transition: all 0.22s ease;
}

.input-modern::placeholder {
    color: rgba(95, 111, 137, 0.72);
}

.input-modern:focus {
    border-color: var(--brand-blue);
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(0, 94, 170, 0.12),
        0 12px 26px rgba(0, 94, 170, 0.10);
}

/* =========================================================
   Buttons
   ========================================================= */

.btn-primary-modern {
    border: 0;
    background:
        linear-gradient(135deg, #006ed0 0%, var(--brand-blue) 55%, #003f7a 100%);
    color: #ffffff !important;
    box-shadow: 0 14px 28px rgba(0, 94, 170, 0.26);
    transition: all 0.22s ease;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 94, 170, 0.32);
    filter: brightness(1.04);
}

.btn-primary-modern:active {
    transform: translateY(0);
}

.btn-secondary-modern {
    border: 1px solid rgba(0, 94, 170, 0.16);
    background: rgba(255, 255, 255, 0.84);
    color: var(--brand-blue) !important;
    box-shadow: 0 10px 24px rgba(0, 94, 170, 0.08);
    transition: all 0.22s ease;
}

.btn-secondary-modern:hover {
    border-color: rgba(252, 124, 0, 0.55);
    color: var(--brand-orange) !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(252, 124, 0, 0.13);
}

/* dezenter Pulse, nicht zu verspielt */
.pulse-soft {
    animation: pulseSoft 3.2s ease-in-out infinite;
}

@keyframes pulseSoft {
    0%, 100% {
        box-shadow: 0 14px 28px rgba(0, 94, 170, 0.25);
    }
    50% {
        box-shadow: 0 18px 38px rgba(0, 94, 170, 0.34);
    }
}

/* =========================================================
   Theme Toggle
   ========================================================= */

.theme-toggle {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(0, 94, 170, 0.14);
    box-shadow: 0 10px 24px rgba(0, 94, 170, 0.10);
    transition: all 0.22s ease;
}

.theme-toggle:hover {
    color: var(--brand-orange);
    border-color: rgba(252, 124, 0, 0.5);
    transform: translateY(-2px);
}

/* =========================================================
   Error Box
   ========================================================= */

.error-box {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(252, 124, 0, 0.09);
    border: 1px solid rgba(252, 124, 0, 0.26);
    color: #9a4300;
    font-size: 0.92rem;
    font-weight: 600;
}

.subtle-divider {
    border-color: rgba(0, 94, 170, 0.12) !important;
}

/* =========================================================
   Cloudflare Turnstile Styling
   ========================================================= */

.cf-turnstile {
    display: flex;
    justify-content: center;
    padding: 0.25rem 0;
}

/* =========================================================
   Dark Mode Variante
   ========================================================= */

.dark body {
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(0, 94, 170, 0.22), transparent 32%),
        radial-gradient(circle at bottom right, rgba(252, 124, 0, 0.14), transparent 28%),
        linear-gradient(135deg, #07111f 0%, #0b1c34 50%, #07111f 100%);
}

.dark #particles-background {
    background:
        linear-gradient(135deg, rgba(7, 17, 31, 0.98), rgba(9, 26, 49, 0.96)),
        radial-gradient(circle at 15% 15%, rgba(0, 94, 170, 0.24), transparent 32%),
        radial-gradient(circle at 85% 80%, rgba(252, 124, 0, 0.16), transparent 26%);
}

.dark .glass-card {
    background:
        linear-gradient(145deg, rgba(10, 25, 47, 0.88), rgba(7, 17, 31, 0.82));
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.35);
}

.dark .glass-card::before {
    background:
        linear-gradient(135deg, rgba(0, 94, 170, 0.22), rgba(255, 255, 255, 0)),
        radial-gradient(circle, rgba(252, 124, 0, 0.18), transparent 55%);
}

.dark .text-white,
.dark h1,
.dark h2,
.dark h3 {
    color: #ffffff !important;
}

.dark .text-gray-300,
.dark .text-gray-200 {
    color: rgba(225, 235, 247, 0.78) !important;
}

.dark .input-modern {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.dark .input-modern::placeholder {
    color: rgba(225, 235, 247, 0.55);
}

.dark .input-modern:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(252, 124, 0, 0.72);
    box-shadow:
        0 0 0 4px rgba(252, 124, 0, 0.13),
        0 14px 32px rgba(0, 0, 0, 0.22);
}

.dark .btn-secondary-modern {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.16);
}

.dark .theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.14);
}

.dark .error-box {
    background: rgba(252, 124, 0, 0.12);
    border-color: rgba(252, 124, 0, 0.32);
    color: #ffb26b;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 640px) {
    .glass-card {
        border-radius: 22px;
    }

    .glass-card::before {
        width: 100%;
        height: 50%;
        top: -10%;
        right: -45%;
    }

    .input-modern {
        font-size: 0.9rem;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }
}