/* ============================================================
   place2charge · Auth Styles
   Gemeinsame Styles für Login, Passwort-Reset und Passwort-Reset-Complete.
   ============================================================ */

:root {
    --primary:        #004E91;
    --ac:             #32A9DD;
    --primary-900:    #001F3F;
    --primary-800:    #002E5A;
    --primary-50:     #F3F8FC;
    --primary-100:    #EAF2F9;
    --ink:            #001F3F;
    --ink-muted:      #4A6380;
    --ink-subtle:     #6D86A1;
    --ink-whisper:    #A0B2C2;
    --border:         #E4EBF1;
    --danger:         #D93025;
    --danger-bg:      #FEF0F0;
    --success:        #0F8A4E;
    --success-bg:     #EAF7F0;
    --grad-btn:       linear-gradient(135deg, var(--primary) 0%, var(--ac) 50%, var(--primary) 100%);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background:
        radial-gradient(ellipse 60% 50% at 15% 0%, rgba(50,169,221,0.22) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 95% 100%, rgba(50,169,221,0.10) 0%, transparent 60%),
        linear-gradient(135deg, var(--primary-800) 0%, #001A33 55%, #002548 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.09) 1px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.p2c-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 32px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p2c-card {
    position: relative;
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    min-height: 500px;
    box-shadow:
        0 40px 80px -24px rgba(0,20,50,0.55),
        0 2px 8px rgba(0,20,50,0.12),
        inset 0 0 0 1px rgba(255,255,255,0.6);
}

/* Variante ohne Hero: einspaltig, schmaler */
.p2c-card--single {
    grid-template-columns: 1fr;
    max-width: 560px;
    min-height: 0;
}

/* ---------- LEFT (Hero, nur Login) ---------- */
.p2c-left {
    position: relative;
    padding: 44px 40px 36px;
    background: linear-gradient(180deg, var(--primary-50) 0%, var(--primary-100) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-width: 0;
}

.p2c-geo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.8;
}

.p2c-left > *:not(.p2c-geo) {
    position: relative;
    z-index: 1;
}

.p2c-logo img {
    height: 40px;
    width: auto;
    display: block;
    margin-bottom: 1rem;
}

.p2c-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ac);
    margin: 0 0 14px;
}

.p2c-headline {
    font-size: 38px;
    font-weight: 500;
    line-height: 1.12;
    color: var(--ink);
    margin: 0 0 14px;
    letter-spacing: -0.025em;
    max-width: 380px;
}
.p2c-headline em {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--primary);
    font-size: 1.1em;
}

.img-support {
    width: 30px;
}
.circle-container {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.p2c-sub {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-muted);
    margin: 0 0 26px;
    max-width: 370px;
}

.p2c-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.p2c-badge {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,78,145,0.15);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.p2c-badge::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--ac);
}

.p2c-legal {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--ink-subtle);
}
.p2c-legal a {
    color: var(--ink-subtle);
    text-decoration: none;
    transition: color 0.15s;
}
.p2c-legal a:hover { color: var(--primary); }
.p2c-legal .sep { color: #C3D4E2; }

/* ---------- RIGHT (Form) ---------- */
.p2c-right {
    padding: 48px 44px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Wenn ohne Hero: kompakteres Padding oben */
.p2c-card--single .p2c-right {
    padding: 40px 44px;
}

/* Inline-Logo für Single-Column-Varianten */
.p2c-right-logo {
    display: none;
    margin: 0 0 18px;
}
.p2c-right-logo img {
    height: 36px;
    width: auto;
    display: block;
}
.p2c-card--single .p2c-right-logo {
    display: block;
}

.p2c-form-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ac);
    margin: 0 0 8px;
}

.p2c-form-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.p2c-form-desc {
    font-size: 14px;
    color: var(--ink-subtle);
    margin: 0 0 28px;
    line-height: 1.55;
}

.p2c-alert {
    background: var(--danger-bg);
    border: 1px solid #fbd0d0;
    color: var(--danger);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.p2c-alert--success {
    background: var(--success-bg);
    border-color: #c9ead7;
    color: var(--success);
}
.p2c-alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.p2c-field { margin-bottom: 14px; }

.p2c-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.p2c-field-hint {
    font-size: 12px;
    color: var(--ink-subtle);
    margin: 6px 0 0;
    line-height: 1.5;
}
/* Djangos Password-Validator liefert die Passwort-Regeln als <ul>. */
.p2c-field-hint ul {
    margin: 4px 0 0;
    padding-left: 18px;
}
.p2c-field-hint li { margin: 2px 0; }

.p2c-field-error {
    font-size: 12px;
    color: var(--danger);
    margin: 6px 0 0;
    line-height: 1.5;
}

/* Server-seitiger Fehler-State für Inputs (Django-Formular hat Fehler) */
.p2c-input--error,
.p2c-input--error:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(217,48,37,0.14);
    background: #fff;
}

/* Kleine zentrierte Zeile für "Zurück zum Login"-Links unter dem Formular */
.p2c-back-link-row {
    text-align: center;
    margin: 18px 0 0;
    font-size: 12px;
}

.p2c-input-wrap { position: relative; }

.p2c-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: #F7FAFC;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.p2c-input:focus {
    border-color: var(--ac);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(50,169,221,0.16);
}
.p2c-input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}
.p2c-input::placeholder { color: var(--ink-whisper); }

/* Modifier: Platz rechts für Sichtbar-Toggle */
.p2c-input--has-toggle { padding-right: 44px; }

.p2c-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8CA0B5;
    pointer-events: none;
}

.p2c-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--ink-whisper);
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.p2c-pw-toggle:hover { color: var(--ink); background: rgba(0,78,145,0.06); }
.p2c-pw-toggle:focus-visible {
    outline: 2px solid rgba(50,169,221,0.5);
    outline-offset: 1px;
}

.p2c-forgot-row {
    text-align: right;
    margin: -4px 0 22px;
}

.p2c-forgot {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}
.p2c-forgot:hover { color: var(--ac); }

.p2c-submit {
    width: 100%;
    height: 48px;
    background: var(--grad-btn);
    background-size: 220% 100%;
    background-position: 0% 50%;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: background-position 0.5s ease, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 6px 20px -6px rgba(0,78,145,0.45);
}
.p2c-submit:hover {
    background-position: 100% 50%;
    box-shadow: 0 8px 24px -6px rgba(0,78,145,0.55);
}
.p2c-submit:active { transform: scale(0.985); }
.p2c-submit:focus-visible {
    outline: 3px solid rgba(50,169,221,0.4);
    outline-offset: 2px;
}

.p2c-copy {
    text-align: center;
    font-size: 11px;
    color: var(--ink-subtle);
    margin-top: 22px;
}

/* ---------- Geo / SVG Animationen (nur Login) ---------- */
.pulse-ring {
    transform-origin: center;
    transform-box: fill-box;
    animation: pulse-ring 7s cubic-bezier(0.16, 0.84, 0.44, 1) infinite;
    opacity: 0;
}
@keyframes pulse-ring {
    0%   { opacity: 0.35; transform: scale(0.3); }
    45%  { opacity: 0;    transform: scale(2.2); }
    100% { opacity: 0;    transform: scale(2.2); }
}
.station-1  .pulse-ring { animation-delay: 0s;   }
.station-2  .pulse-ring { animation-delay: 1.3s; }
.station-3  .pulse-ring { animation-delay: 2.7s; }
.station-4  .pulse-ring { animation-delay: 4.1s; }
.station-5  .pulse-ring { animation-delay: 5.5s; }
.station-6  .pulse-ring { animation-delay: 0.8s; }
.station-7  .pulse-ring { animation-delay: 2.2s; }
.station-8  .pulse-ring { animation-delay: 3.6s; }
.station-9  .pulse-ring { animation-delay: 5.0s; }
.station-10 .pulse-ring { animation-delay: 0.4s; }
.station-11 .pulse-ring { animation-delay: 1.9s; }
.station-12 .pulse-ring { animation-delay: 3.3s; }
.station-13 .pulse-ring { animation-delay: 4.7s; }
.station-14 .pulse-ring { animation-delay: 6.1s; }
.station-15 .pulse-ring { animation-delay: 1.1s; }
.station-16 .pulse-ring { animation-delay: 2.5s; }
.station-17 .pulse-ring { animation-delay: 3.9s; }
.station-18 .pulse-ring { animation-delay: 5.3s; }
.station-19 .pulse-ring { animation-delay: 0.6s; }
.station-20 .pulse-ring { animation-delay: 2.0s; }

.station-core { fill: var(--primary); }
.connection   { stroke: var(--ac); stroke-width: 0.2; fill: none; opacity: 0.25; }
.grid-dot     { fill: var(--ac); opacity: 0.22; }

@media (prefers-reduced-motion: reduce) {
    .pulse-ring { animation: none; opacity: 0.25; }
    .p2c-geo-inner { transition: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .p2c-shell { padding: 0; }
    .p2c-card {
        grid-template-columns: 1fr;
        min-height: 100vh;
        border-radius: 0;
        max-width: none;
        box-shadow: none;
    }
    .p2c-card--single {
        min-height: 100vh;
    }
    .p2c-left {
        padding: 40px 32px 48px;
        min-height: 320px;
    }
    .p2c-headline { font-size: 28px; max-width: 100%; }
    .p2c-sub      { font-size: 14px; max-width: 100%; margin-bottom: 22px; }
    .p2c-right {
        padding: 40px 32px 48px;
        background: #fff;
        border-radius: 28px 28px 0 0;
        margin-top: -24px;
        position: relative;
        z-index: 2;
    }
    .p2c-card--single .p2c-right {
        padding: 40px 32px 48px;
        border-radius: 0;
        margin-top: 0;
    }
    .p2c-legal { display: none; }
}

@media (max-width: 460px) {
    .p2c-left  { padding: 32px 22px 40px; min-height: 280px; }
    .p2c-right { padding: 32px 22px 36px; }
    .p2c-card--single .p2c-right { padding: 32px 22px 36px; }
    .p2c-headline    { font-size: 24px; }
    .p2c-form-title  { font-size: 24px; }
    .p2c-logo img    { height: 34px; margin-bottom: 1rem; }
}

/* Legal-Footer auf kleinen Screens (auch im single-Layout) */
.p2c-legal-mobile {
    display: none;
    justify-content: center;
    gap: 14px;
    font-size: 11px;
    color: var(--ink-subtle);
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    margin-top: 24px;
    flex-wrap: wrap;
}
.p2c-legal-mobile a {
    color: var(--ink-subtle);
    text-decoration: none;
}
.p2c-legal-mobile a:hover { color: var(--primary); }

@media (max-width: 900px) {
    .p2c-legal-mobile { display: flex; }
}

/* Im Single-Layout immer zeigen (da es keinen Hero mit Legal-Nav gibt) */
.p2c-card--single .p2c-legal-mobile {
    display: flex;
}
