@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #20302b;
    --muted: #68756f;
    --brand: #c5101d;
    --brand-dark: #981019;
    --brand-soft: #fff0df;
    --accent: #f47a20;
    --yellow: #ffd20a;
    --surface: rgba(255, 255, 255, .92);
    --line: #e5e8e6;
    --danger: #a83d46;
    --success: #28745a;
    --shadow: 0 28px 70px rgba(44, 37, 40, .13);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 15%, rgba(255, 210, 10, .2), transparent 28rem),
        radial-gradient(circle at 90% 80%, rgba(244, 122, 32, .14), transparent 30rem),
        #fff8ed;
    font-family: "Manrope", system-ui, sans-serif;
}

button, input, select { font: inherit; }
a { color: var(--brand); }

.site-shell {
    width: min(1160px, calc(100% - 32px));
    min-height: 100vh;
    margin: auto;
    padding: 12px 0;
    display: grid;
    place-items: center;
}

.auth-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(380px, 1.1fr);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
    backdrop-filter: blur(18px);
    height: min(590px, calc(100vh - 24px));
    min-height: 520px;
}

.brand-panel {
    position: relative;
    min-height: 0;
    padding: clamp(24px, 4vw, 48px);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(150deg, #ad0d19, #e4431f 58%, #f58a1f);
}

.brand-panel::before,
.brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.16);
}
.brand-panel::before { width: 360px; height: 360px; right: -160px; top: -100px; }
.brand-panel::after { width: 250px; height: 250px; left: -120px; bottom: -100px; }

.brand-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.brand-logo {
    position: relative;
    width: 158px;
    height: 158px;
    margin: 2px auto 0;
    padding: 15px;
    border-radius: 28px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 20px 40px rgba(111, 19, 11, .2);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 14px;
    background: rgba(255,255,255,.12);
}
.brand-panel__copy { position: relative; margin: 28px auto 0; max-width: 440px; text-align: center; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.brand-panel .eyebrow { color: var(--yellow); }
.brand-panel h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.35rem); line-height: 1.02; letter-spacing: -.055em; }
.brand-panel p { max-width: 38rem; margin: 16px 0 0; color: rgba(255,255,255,.84); font-size: .94rem; line-height: 1.6; }
.trust-row { position: absolute; left: 28px; right: 28px; bottom: 24px; display: flex; gap: 10px; align-items: center; justify-content: center; color: rgba(255,255,255,.78); font-size: .78rem; }

.auth-panel { padding: clamp(28px, 5vw, 58px); display: flex; align-items: center; }
.auth-content { width: min(100%, 500px); margin: auto; }
.step-label { display: flex; gap: 8px; margin-bottom: 24px; }
.step-label span { width: 34px; height: 5px; border-radius: 999px; background: #e7dfE3; }
.step-label span.active { background: var(--brand); }
.auth-content h2, .form-header h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -.045em; }
.lead { margin: 12px 0 22px; color: var(--muted); line-height: 1.6; }

.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label, .group-label { display: block; margin: 0 0 9px; font-size: .84rem; font-weight: 800; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; left: 17px; top: 50%; width: 20px; color: #8b9691; transform: translateY(-50%); pointer-events: none; }
.field input, .field select {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: #fff;
    transition: .2s ease;
}
.field .input-wrap input { padding-left: 50px; }
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.email-hint {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: -4px 0 22px;
    padding: 9px 13px;
    border: 1px solid rgba(214, 63, 36, .18);
    border-radius: 12px;
    background: rgba(255, 184, 0, .09);
    color: var(--muted);
    font-size: .84rem;
}
.email-hint strong { color: var(--ink); letter-spacing: .01em; }

.btn {
    display: inline-flex;
    min-height: 52px;
    padding: 0 23px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { width: 100%; color: #fff; background: linear-gradient(100deg, var(--brand), #e33e1d); box-shadow: 0 12px 28px rgba(197,16,29,.22); }
.btn-primary:hover { background: linear-gradient(100deg, var(--brand-dark), #c83218); box-shadow: 0 15px 32px rgba(197,16,29,.28); }
.btn-secondary { color: var(--brand); background: var(--brand-soft); }
.text-link { border: 0; padding: 0; color: var(--brand); background: none; cursor: pointer; font-weight: 700; text-decoration: none; }

.notice { margin: 0 0 22px; padding: 14px 16px; border-radius: 13px; font-size: .86rem; line-height: 1.55; }
.notice-error { color: #7d2730; background: #fff0f1; border: 1px solid #f6ced2; }
.notice-success { color: #1d614a; background: #eaf8f1; border: 1px solid #c9eadb; }
.notice-info { color: #4b5466; background: #f0f3f8; border: 1px solid #dce3ed; }
.auth-footer { margin: 17px 0 0; color: var(--muted); text-align: center; font-size: .76rem; line-height: 1.5; }
.support-action { margin-top: 12px; text-align: center; }
.support-action .btn { min-height: 42px; padding: 0 16px; font-size: .78rem; }

.otp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin: 12px 0 24px; }
.otp-grid input { width: 100%; height: 62px; padding: 0; border: 1px solid var(--line); border-radius: 13px; outline: none; text-align: center; font-size: 1.45rem; font-weight: 800; }
.otp-grid input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

.form-shell { width: min(1020px, calc(100% - 30px)); margin: 0 auto; padding: 28px 0 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.topbar .brand-mark { color: var(--brand-dark); }
.topbar .brand-mark__icon { color: #fff; border: 0; background: var(--brand); }
.top-logo { width: 78px; height: 58px; object-fit: contain; display: block; }
.form-header { margin-bottom: 28px; }
.application-card { padding: clamp(24px, 5vw, 52px); border: 1px solid rgba(255,255,255,.8); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.section { padding: 0 0 34px; margin: 0 0 34px; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-title { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 22px; }
.section-number { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--brand); background: var(--brand-soft); font-weight: 800; }
.section-title h2 { margin: 3px 0 4px; font-size: 1.08rem; }
.section-title p { margin: 0; color: var(--muted); font-size: .82rem; }

.chip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: flex; min-height: 48px; padding: 11px 14px; align-items: center; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: #fff; font-size: .85rem; font-weight: 600; transition: .18s ease; }
.chip input:checked + span { color: var(--brand-dark); border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 3px 0 var(--brand); }
.chip input:focus-visible + span { outline: 3px solid rgba(113,59,85,.22); }

.dropzone { position: relative; display: grid; min-height: 155px; padding: 24px; place-items: center; border: 1.5px dashed #c8cecb; border-radius: 17px; text-align: center; background: #fbfbfa; transition: .2s ease; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.dropzone strong { display: block; margin: 8px 0 4px; }
.dropzone small { color: var(--muted); }
.current-file { display: flex; margin-top: 12px; padding: 13px 15px; align-items: center; justify-content: space-between; gap: 12px; border-radius: 12px; background: #f3f5f4; font-size: .83rem; }
.form-actions { display: flex; justify-content: flex-end; }
.form-actions .btn-primary { width: auto; min-width: 220px; }

@media (max-width: 800px) {
    .site-shell { width: min(100% - 20px, 600px); padding: 10px 0; }
    .auth-layout { grid-template-columns: 1fr; height: auto; min-height: 0; border-radius: 23px; }
    .brand-panel { min-height: 158px; padding: 13px 24px; }
    .brand-logo { width: 62px; height: 62px; padding: 5px; border-radius: 14px; }
    .brand-panel__copy { margin-top: 8px; }
    .brand-panel h1 { font-size: 1.65rem; }
    .brand-panel .eyebrow { margin-bottom: 5px; font-size: .66rem; }
    .brand-panel p:not(.eyebrow), .trust-row { display: none; }
    .auth-panel { padding: 22px 24px 24px; }
    .step-label { margin-bottom: 14px; }
    .lead { margin: 8px 0 16px; }
    .field { margin-bottom: 14px; }
    .field input, .field select { min-height: 48px; }
    .btn { min-height: 48px; }
    .auth-footer { margin-top: 10px; }
    .auth-content--request .lead { margin-bottom: 11px; font-size: .82rem; line-height: 1.45; }
    .auth-content--request .field { margin-bottom: 10px; }
    .field-row, .chip-grid { grid-template-columns: 1fr; }
    .otp-grid { gap: 5px; }
    .otp-grid input { height: 52px; border-radius: 10px; }
    .topbar { margin-bottom: 26px; }
    .application-card { border-radius: 21px; }
    .form-actions .btn-primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
