/* University Taxi Pro — Login
   Direction: midnight campus green + electric lime
*/

:root {
    --ink: #071412;
    --forest: #0f2e28;
    --moss: #1a4a40;
    --mist: #e6f2ed;
    --fog: #9bb5ab;
    --lime: #c8f542;
    --lime-deep: #a8d62a;
    --panel: #f7faf8;
    --line: rgba(7, 20, 18, 0.12);
    --danger: #c43c2c;
    --danger-bg: #fdecea;
    --radius: 14px;
    --font-display: "Bricolage Grotesque", Georgia, serif;
    --font-body: "Sora", system-ui, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body.login-page {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.login-stage {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ——— Hero (full-bleed visual plane) ——— */
.login-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(200, 245, 66, 0.14), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 15%, rgba(26, 74, 64, 0.9), transparent 50%),
        linear-gradient(165deg, #0a2420 0%, var(--ink) 45%, #05100e 100%);
    color: var(--mist);
    padding: clamp(2rem, 5vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-glow {
    position: absolute;
    inset: -20% -10% auto auto;
    width: 55%;
    height: 55%;
    background: radial-gradient(circle, rgba(200, 245, 66, 0.22), transparent 70%);
    animation: glowDrift 12s var(--ease) infinite alternate;
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(230, 242, 237, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 242, 237, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
    pointer-events: none;
}

.hero-route {
    position: absolute;
    inset: 8% 5% auto;
    width: min(92%, 640px);
    height: auto;
    color: rgba(200, 245, 66, 0.55);
    pointer-events: none;
}

.route-path {
    stroke-dashoffset: 0;
    animation: routeDraw 2.8s var(--ease) both;
}

.route-pin {
    fill: var(--lime);
}

.route-pin--start {
    opacity: 0.55;
}

.route-pulse {
    fill: none;
    stroke: var(--lime);
    stroke-width: 2;
    opacity: 0;
    transform-origin: 560px 80px;
    animation: pinPulse 2.4s ease-out 1.2s infinite;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 18ch;
    animation: riseIn 0.9s var(--ease) 0.15s both;
}

.hero-brand {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 5.5vw, 4.25rem);
    line-height: 0.95;
    letter-spacing: -0.035em;
    color: #fff;
}

.hero-tagline {
    margin: 1rem 0 0;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 400;
    color: var(--fog);
    max-width: 22ch;
    line-height: 1.45;
}

.hero-meta {
    position: relative;
    z-index: 1;
    margin: 2.5rem 0 0;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(200, 245, 66, 0.75);
    animation: riseIn 0.9s var(--ease) 0.35s both;
}

/* ——— Form panel ——— */
.login-panel {
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.panel-inner {
    width: 100%;
    max-width: 380px;
    animation: riseIn 0.85s var(--ease) 0.2s both;
}

.panel-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--moss);
}

.panel-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.panel-sub {
    margin: 0.6rem 0 0;
    color: #5a7168;
    font-size: 0.95rem;
    line-height: 1.45;
}

.alert {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.alert--error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(196, 60, 44, 0.2);
}

.alert.is-hidden,
.alert[hidden] {
    display: none;
}

.login-form {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--forest);
}

.field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.field-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--moss);
    text-decoration: none;
}

.field-link:hover {
    color: var(--ink);
}

.field input[type="email"],
.field input[type="password"],
.password-wrap input {
    width: 100%;
    appearance: none;
    border: 1.5px solid var(--line);
    background: #fff;
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
    color: #9aafa5;
}

.field input:hover {
    border-color: rgba(15, 46, 40, 0.28);
}

.field input:focus {
    outline: none;
    border-color: var(--moss);
    box-shadow: 0 0 0 3px rgba(26, 74, 64, 0.15);
}

.field input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(196, 60, 44, 0.12);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 4.25rem;
}

.toggle-pass {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--moss);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    border-radius: 8px;
}

.toggle-pass:hover {
    background: rgba(15, 46, 40, 0.06);
    color: var(--ink);
}

.check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.875rem;
    color: #3d534a;
    cursor: pointer;
    user-select: none;
}

.check input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--moss);
    cursor: pointer;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.35rem;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 1rem 1.25rem;
    background: var(--ink);
    color: var(--lime);
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s var(--ease), color 0.2s ease;
}

.btn-primary:hover {
    background: var(--forest);
    color: #fff;
}

.btn-primary:active {
    transform: scale(0.985);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

.btn-primary.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-primary svg {
    transition: transform 0.25s var(--ease);
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

.panel-foot {
    margin: 1.75rem 0 0;
    font-size: 0.75rem;
    color: #7a9188;
    line-height: 1.5;
}

.panel-foot code {
    font-size: 0.7rem;
    background: rgba(15, 46, 40, 0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    color: var(--forest);
}

/* ——— Motion ——— */
@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-8%, 6%) scale(1.08); }
}

@keyframes routeDraw {
    from {
        stroke-dasharray: 900;
        stroke-dashoffset: 900;
        opacity: 0;
    }
    to {
        stroke-dasharray: 8 12;
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@keyframes pinPulse {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(2.4);
    }
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
    .login-stage {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(240px, 38vh) 1fr;
    }

    .login-hero {
        justify-content: flex-end;
        padding: 1.5rem 1.5rem 1.75rem;
    }

    .hero-brand {
        font-size: clamp(2rem, 8vw, 2.75rem);
        max-width: none;
    }

    .hero-copy {
        max-width: none;
    }

    .hero-route {
        inset: 5% auto auto 55%;
        width: 55%;
        opacity: 0.7;
    }

    .hero-meta {
        margin-top: 1.25rem;
    }

    .login-panel {
        align-items: flex-start;
        padding-top: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
