:root {
    --navy:      #0F1B3C;
    --navy-2:    #1A2F6F;
    --navy-3:    #243A80;
    --red:       #C8281A;
    --gold:      #C9A84C;
    --gold-lt:   #E2C76A;
    --white:     #F5F3EE;
    --off-white: #EAE7E0;
    --text:      #2d3748;
    --dim:       #6a7280;
    --border:    #e2e0db;
    --ease:      cubic-bezier(.16,1,.3,1);
    --green:     #22c55e;
    --amber:     #f59e0b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Barlow', sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}
a   { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.auth-back {
    position: fixed; top: 20px; left: 24px; z-index: 100;
    display: inline-flex; align-items: center; gap: 7px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: rgba(255,255,255,.7);
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(10,18,45,.4);
    backdrop-filter: blur(6px);
    transition: color .25s, border-color .25s, background .25s;
}
.auth-back:hover {
    color: #fff;
    border-color: rgba(255,255,255,.4);
    background: rgba(10,18,45,.6);
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-left {
    background: var(--navy);
    position: sticky; top: 0; height: 100vh;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        -55deg,
        transparent, transparent 40px,
        rgba(255,255,255,.018) 40px, rgba(255,255,255,.018) 41px
    );
    pointer-events: none;
}

.auth-left::after {
    content: '';
    position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
    background: linear-gradient(to bottom, var(--gold), transparent 70%);
}

.auth-left__inner {
    position: relative; z-index: 1;
    height: 100%; padding: 100px 56px 56px;
    display: flex; flex-direction: column; justify-content: center; gap: 40px;
}

.auth-logo img {
    height: 80px; width: auto; object-fit: contain;
    opacity: .92;
}

.auth-left__heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 600; color: var(--white);
    line-height: 1.22; letter-spacing: -.01em;
}

.auth-left__sub {
    font-family: 'Barlow', sans-serif;
    font-size: 14px; font-weight: 300;
    color: rgba(245,243,238,.5);
    line-height: 1.85; margin-top: 12px;
}

.auth-left__features {
    list-style: none; display: flex; flex-direction: column; gap: 14px;
    margin-top: 4px;
}
.auth-left__features li {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Barlow', sans-serif;
    font-size: 13.5px; font-weight: 400;
    color: rgba(245,243,238,.62);
}
.auth-left__features svg { color: var(--gold); flex-shrink: 0; }

.auth-left__deco {
    position: absolute; bottom: -30px; right: -30px;
    pointer-events: none;
}
.auth-deco-box {
    position: absolute; border: 1px solid rgba(201,168,76,.12);
}
.auth-deco-box--1 { width: 200px; height: 200px; bottom: 40px; right: 40px; transform: rotate(15deg); }
.auth-deco-box--2 { width: 120px; height: 120px; bottom: 90px; right: 80px; background: rgba(200,40,26,.06); transform: rotate(38deg); }
.auth-deco-box--3 { width: 60px;  height: 60px;  bottom: 130px; right: 50px; border-color: rgba(201,168,76,.2); transform: rotate(60deg); }

.auth-right {
    background: var(--off-white);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px; min-height: 100vh; overflow-y: auto;
}

.auth-right__inner {
    width: 100%; max-width: 460px;
}

.auth-tabs {
    display: grid; grid-template-columns: 1fr 1fr;
    position: relative; margin-bottom: 36px;
    border-bottom: 2px solid var(--border);
}

.auth-tab {
    padding: 14px 10px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--dim); background: none; border: none;
    cursor: pointer; transition: color .25s; position: relative; z-index: 1;
}
.auth-tab--active { color: var(--navy); }
.auth-tab:hover   { color: var(--navy); }

.auth-tabs__bar {
    position: absolute; bottom: -2px; left: 0;
    width: 50%; height: 2px;
    background: var(--red);
    transition: transform .35s var(--ease);
}

.auth-panel { display: none; }
.auth-panel--active { display: block; }

.auth-panel__intro { margin-bottom: 28px; }
.auth-panel__intro h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 600; color: var(--navy);
    margin-bottom: 6px;
}
.auth-panel__intro p {
    font-size: 14px; font-weight: 300;
    color: var(--dim); line-height: 1.7;
}

.auth-alert {
    padding: 12px 16px; margin-bottom: 20px;
    font-size: 13.5px; line-height: 1.6;
    border-left: 3px solid transparent;
}
.auth-alert p { margin: 0; }
.auth-alert p + p { margin-top: 4px; }
.auth-alert--error   { background: #fff5f5; border-color: var(--red);   color: #7f1d1d; }
.auth-alert--success { background: #f0fdf4; border-color: var(--green); color: #166534; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-form__row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}

.auth-field { display: flex; flex-direction: column; gap: 8px; }

.auth-label-row {
    display: flex; align-items: center; justify-content: space-between;
}

.auth-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 10.5px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--navy);
}
.auth-req { color: var(--red); margin-left: 2px; }

.auth-forgot {
    font-family: 'Barlow', sans-serif;
    font-size: 12.5px; color: var(--red);
    transition: opacity .2s;
}
.auth-forgot:hover { opacity: .7; }

.auth-input {
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--border);
    padding: 12px 16px;
    font-family: 'Barlow', sans-serif;
    font-size: 14px; font-weight: 300;
    color: var(--navy);
    outline: none; border-radius: 0;
    -webkit-appearance: none; appearance: none;
    transition: border-color .25s, box-shadow .25s;
}
.auth-input::placeholder { color: #c0b9b0; }
.auth-input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(15,27,60,.08);
}

.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 46px; }

.auth-eye {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 44px; background: none; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #b0a9a0; transition: color .2s;
}
.auth-eye:hover { color: var(--navy); }

.auth-remember {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.auth-remember input[type="checkbox"] { display: none; }
.auth-remember__box {
    width: 17px; height: 17px;
    border: 1.5px solid var(--border); background: #fff;
    flex-shrink: 0; position: relative;
    transition: background .2s, border-color .2s;
}
.auth-remember input:checked + .auth-remember__box {
    background: var(--navy); border-color: var(--navy);
}
.auth-remember input:checked + .auth-remember__box::after {
    content: '';
    position: absolute; top: 2px; left: 5px;
    width: 5px; height: 9px;
    border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(45deg);
}
.auth-remember__label {
    font-size: 13.5px; font-weight: 300; color: var(--dim);
}

.auth-submit {
    width: 100%; padding: 14px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    background: var(--navy); color: var(--white);
    border: 1.5px solid var(--navy); cursor: pointer;
    position: relative; overflow: hidden; isolation: isolate;
    transition: border-color .35s, color .35s;
}
.auth-submit::before {
    content: ''; position: absolute; inset: 0;
    background: var(--red); transform: translateX(-101%);
    transition: transform .35s var(--ease); z-index: -1;
}
.auth-submit:hover::before  { transform: translateX(0); }
.auth-submit:hover { border-color: var(--red); color: var(--white); }

.auth-switch {
    text-align: center;
    font-size: 13.5px; font-weight: 300; color: var(--dim);
}
.auth-switch__btn {
    background: none; border: none; cursor: pointer;
    font-size: 13.5px; font-weight: 500;
    color: var(--red); padding: 0;
    transition: opacity .2s;
}
.auth-switch__btn:hover { opacity: .7; }

.auth-strength-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-strength-bar {
    display: flex; gap: 4px; margin-top: 8px; height: 4px;
}
.auth-strength-bar__seg {
    flex: 1; background: var(--border);
    transition: background .3s ease;
}

.auth-rules {
    list-style: none; margin-top: 10px;
    display: flex; flex-direction: column; gap: 5px;
}
.auth-rule {
    font-size: 12.5px; font-weight: 300; color: #a0a8b0;
    padding-left: 18px; position: relative;
    transition: color .25s;
}
.auth-rule::before {
    content: '✗';
    position: absolute; left: 0; font-size: 11px; color: #c0b9b0;
}
.auth-rule--pass              { color: var(--green); }
.auth-rule--pass::before      { content: '✓'; color: var(--green); }

.auth-match-msg {
    font-size: 12.5px; display: block; min-height: 16px; margin-top: 4px;
}
.auth-match-msg--ok  { color: var(--green); }
.auth-match-msg--bad { color: var(--red); }


@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-left  { display: none; }
    .auth-back  { color: var(--navy); border-color: rgba(15,27,60,.2); background: rgba(255,255,255,.7); }
    .auth-back:hover { background: rgba(15,27,60,.2); border-color:#c0b9b0; color:rgba(81, 5, 5, 0.7); }
    .auth-right { min-height: 100vh; padding: 80px 24px 40px; background: var(--off-white); }
}

@media (max-width: 480px) {
    .auth-right__inner { max-width: 100%; }
    .auth-form__row { grid-template-columns: 1fr; }
    .auth-tab { font-size: 11.5px; padding: 12px 6px; }
    .auth-input { padding: 11px 14px; font-size: 15px; }
    .auth-submit { padding: 15px; font-size: 12.5px; }
}

@media (max-width: 360px) {
    .auth-right { padding: 72px 16px 32px; }
    .auth-panel__intro h3 { font-size: 20px; }
}