:root {
    --bg-top: #0b35cc;
    --bg-mid: #4576ff;
    --bg-bottom: #f5f8ff;
    --card-white: rgba(255, 255, 255, 0.94);
    --panel-blue: linear-gradient(160deg, #0b35cc 0%, #2458ef 40%, #5b88ff 100%);
    --text-strong: #102d52;
    --text-soft: #5f7090;
    --line: rgba(80, 118, 214, 0.24);
    --shadow: 0 32px 80px rgba(19, 46, 107, 0.18);
    --focus: 0 0 0 4px rgba(68, 116, 255, 0.18);
    --success-bg: rgba(24, 138, 90, 0.12);
    --success-text: #166b49;
    --error-bg: rgba(210, 59, 78, 0.12);
    --error-text: #b32947;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-strong);
    background:
        radial-gradient(circle at top left, rgba(148, 181, 255, 0.45), transparent 30%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 36%, #dce7ff 70%, var(--bg-bottom) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.page-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.ambient {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.5;
    pointer-events: none;
}

.ambient-one {
    width: 16rem;
    height: 16rem;
    top: 8%;
    left: -4rem;
    background: rgba(141, 195, 255, 0.48);
}

.ambient-two {
    width: 22rem;
    height: 22rem;
    right: -8rem;
    bottom: -6rem;
    background: rgba(255, 255, 255, 0.62);
}

.login-layout {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card {
    position: relative;
    width: min(100%, 27rem);
    border-radius: 2rem;
    overflow: hidden;
    background: var(--card-white);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    animation: rise-in 0.8s ease-out;
}

.brand-panel {
    position: relative;
    padding: 1.3rem 1.4rem 2rem;
    color: #fff;
    text-align: center;
    background: var(--panel-blue);
    overflow: hidden;
}

.brand-panel::before,
.brand-panel::after {
    content: '';
    position: absolute;
    inset: auto;
    border-radius: 50%;
    pointer-events: none;
}

.brand-panel::before {
    width: 14rem;
    height: 14rem;
    left: -3rem;
    bottom: -6rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
}

.brand-panel::after {
    width: 11rem;
    height: 11rem;
    right: -3rem;
    top: -4rem;
    background: radial-gradient(circle, rgba(121, 190, 255, 0.24), transparent 68%);
}

.top-pulse {
    display: inline-block;
    width: 4.8rem;
    height: 0.9rem;
    border-radius: 999px;
    background: rgba(10, 28, 92, 0.35);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
}

.logo-frame {
    display: grid;
    place-items: center;
    margin: 1.35rem auto 1.5rem;
    padding: 1rem;
    width: min(100%, 15rem);
    border-radius: 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.brand-logo {
    width: 100%;
    height: auto;
    display: block;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.76);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(1.85rem, 6vw, 2.25rem);
    line-height: 1.1;
    font-weight: 700;
}

.subtext {
    margin: 0.7rem auto 0;
    max-width: 15rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
}

.form-panel {
    padding: 1.5rem 1.35rem 1.4rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
}

.status-banner {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-banner.success {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-banner.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-strong);
}

.field input {
    width: 100%;
    padding: 0.98rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-strong);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field input::placeholder {
    color: #8b9ab6;
}

.field input:focus {
    outline: none;
    border-color: rgba(50, 93, 229, 0.8);
    box-shadow: var(--focus);
    transform: translateY(-1px);
}

.field.is-invalid input,
.field input[aria-invalid='true'] {
    border-color: rgba(210, 59, 78, 0.55);
    box-shadow: 0 0 0 4px rgba(210, 59, 78, 0.1);
}

.field-error {
    min-height: 1.1rem;
    font-size: 0.76rem;
    color: var(--error-text);
}

.form-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.15rem;
}

.text-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: #2458ef;
    transition: color 180ms ease, opacity 180ms ease;
}

.text-link:hover {
    color: #123dc1;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.2rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.primary-btn {
    border: none;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #1947dd 0%, #3468ff 52%, #6c97ff 100%);
    box-shadow: 0 16px 28px rgba(39, 88, 234, 0.26);
}

.primary-btn:hover,
.primary-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 22px 32px rgba(39, 88, 234, 0.3);
}

.secondary-btn {
    border: 1px solid rgba(46, 90, 231, 0.35);
    background: rgba(255, 255, 255, 0.65);
    color: #214fe1;
}

.secondary-btn:hover,
.secondary-btn:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(46, 90, 231, 0.62);
    background: rgba(235, 241, 255, 0.9);
}

.helper-note {
    margin: 0;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    background: rgba(36, 88, 239, 0.08);
    color: #31518c;
    font-size: 0.84rem;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (min-width: 768px) {
    .login-layout {
        padding: 2rem;
    }

    .login-card {
        width: min(100%, 28.75rem);
    }

    .brand-panel {
        padding: 1.45rem 1.8rem 2.3rem;
    }

    .form-panel {
        padding: 1.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}