:root {
    --blue: #1463d8;
    --blue-deep: #0b3d93;
    --blue-soft: #eaf3ff;
    --ink: #101828;
    --muted: #5b677a;
    --line: #9db7d9;
    --danger: #bd2637;
    --white: #ffffff;
}

* { box-sizing: border-box; }
body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #f6faff 0%, #ecf5ff 48%, #fafdff 100%);
}
.page-shell { display: grid; min-height: 100vh; place-items: center; padding: 48px 20px; }
.application-card {
    width: min(100%, 650px);
    padding: 42px 52px 48px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(88, 130, 184, .25);
    border-radius: 24px;
    box-shadow: 0 24px 68px rgba(34, 82, 143, .14), 0 2px 8px rgba(22, 67, 123, .08);
    animation: rise .45s ease-out both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.brand-lockup { display: flex; justify-content: center; margin-bottom: 25px; }
.logo-frame {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #c7dcf8;
    border-radius: 20px;
    background: linear-gradient(145deg, #edf6ff, #d7eaff);
    box-shadow: 0 10px 24px rgba(20,99,216,.14);
}
.logo-frame img { width: 100%; height: 100%; object-fit: contain; }
.logo-fallback { color: var(--blue-deep); font-size: 25px; font-weight: 850; letter-spacing: -.06em; }
.form-heading { margin-bottom: 30px; text-align: center; }
.eyebrow { margin: 0 0 9px; color: var(--blue); font-size: .73rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 2.5rem); letter-spacing: -.045em; line-height: 1.12; }
.form-heading > p:last-child { max-width: 460px; margin: 14px auto 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.field-group { margin-top: 20px; }
.field-group label { display: block; margin-bottom: 8px; color: #18263c; font-size: .94rem; font-weight: 740; }
.field-group label span { color: var(--blue); }
input {
    width: 100%;
    min-height: 52px;
    padding: 13px 15px;
    color: var(--ink);
    outline: none;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(18, 64, 119, .06), inset 0 1px 0 rgba(20,99,216,.03);
    font: inherit;
    font-size: 1rem;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
input::placeholder { color: #71809a; opacity: 1; }
input:hover { border-color: #5e8ed0; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(20,99,216,.16), 0 4px 9px rgba(20,99,216,.08); }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(189,38,55,.1); }
.field-hint, .field-error { min-height: 1.05rem; margin: 6px 0 0; font-size: .81rem; }
.field-hint { color: #68758b; }
.field-error { color: var(--danger); font-weight: 650; }
.primary-button, .secondary-button {
    display: inline-flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    letter-spacing: .01em;
    text-decoration: none;
}
.primary-button { width: 100%; margin-top: 27px; color: white; background: linear-gradient(135deg, #1970ed, #0b4db2); box-shadow: 0 12px 22px rgba(20,99,216,.25); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.primary-button:hover { filter: brightness(1.05); box-shadow: 0 15px 28px rgba(20,99,216,.31); transform: translateY(-1px); }
.primary-button:active { box-shadow: 0 6px 14px rgba(20,99,216,.22); transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: .78; transform: none; }
.secondary-button { min-width: 212px; margin-top: 16px; color: var(--blue-deep); border: 2px solid #8eafe0; background: white; }
.form-alert { margin: 0 0 20px; padding: 13px 15px; color: #972435; border: 1px solid #f0b4bd; border-radius: 11px; background: #fff4f5; font-size: .92rem; line-height: 1.45; }
.success-view { padding: 16px 0 5px; text-align: center; }
.success-view > p:last-of-type { max-width: 390px; margin: 14px auto 0; color: var(--muted); line-height: 1.6; }
.success-icon { display: grid; width: 74px; height: 74px; margin: 0 auto 25px; place-items: center; color: white; border-radius: 50%; background: linear-gradient(145deg, #287df6, #0c4ca9); box-shadow: 0 14px 28px rgba(20,99,216,.26); font-size: 38px; font-weight: 800; }
.trap-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 560px) { .page-shell { padding: 20px 12px; } .application-card { padding: 30px 23px 34px; border-radius: 19px; } .logo-frame { width: 64px; height: 64px; border-radius: 17px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
