:root {
    --yn-navy: #0F172A;
    --yn-slate: #1E293B;
    --yn-ivory: #F8F9FA;
    --yn-white: #FFFFFF;
    --yn-charcoal: #121212;
    --yn-text: #334155;
    --yn-muted: #64748B;
    --yn-border: #DDE3EA;
    --yn-bronze: #C9A96E;
    --yn-gold: #D4AF37;
    --yn-danger: #B42318;
    --yn-radius: 18px;
    --yn-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--yn-navy); }
body.auth-page {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--yn-text);
    font-family: "Montserrat", Arial, sans-serif;
    background:
        radial-gradient(circle at 16% 15%, rgba(201, 169, 110, .18), transparent 30rem),
        radial-gradient(circle at 88% 90%, rgba(212, 175, 55, .10), transparent 26rem),
        linear-gradient(145deg, var(--yn-navy), var(--yn-slate));
}
button, input { font: inherit; }
a { color: inherit; }

.auth-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    isolation: isolate;
}
.auth-shell__frame {
    position: relative;
    z-index: 2;
    width: min(100%, 470px);
}
.auth-shell__ornament {
    position: fixed;
    z-index: 0;
    border: 1px solid rgba(201, 169, 110, .16);
    border-radius: 999px;
    pointer-events: none;
}
.auth-shell__ornament--one { width: 360px; height: 360px; top: -170px; right: -110px; }
.auth-shell__ornament--two { width: 250px; height: 250px; bottom: -125px; left: -80px; }

.auth-card {
    width: 100%;
    padding: 34px 42px 30px;
    overflow: hidden;
    background: var(--yn-white);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: var(--yn-radius);
    box-shadow: var(--yn-shadow);
}
.auth-card__brand {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 132px;
    margin: -4px 0 4px;
}
.auth-card__logo {
    display: block;
    width: auto;
    max-width: 160px;
    height: 132px;
    object-fit: contain;
}
.auth-card__intro { text-align: center; margin-bottom: 24px; }
.auth-card__eyebrow {
    margin: 0 0 7px;
    color: var(--yn-bronze);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.auth-card h1 {
    margin: 0;
    color: var(--yn-navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 5vw, 2.55rem);
    line-height: 1.05;
}
.auth-card__lead { margin: 10px auto 0; max-width: 340px; color: var(--yn-muted); font-size: .92rem; line-height: 1.6; }

.auth-form { display: grid; gap: 18px; }
.form-field { display: grid; gap: 8px; }
.form-field label { color: var(--yn-slate); font-size: .82rem; font-weight: 700; }
.input-icon, .password-control { position: relative; }
.input-icon > .bx {
    position: absolute;
    left: 16px;
    top: 50%;
    z-index: 1;
    color: #7A8797;
    font-size: 1.2rem;
    transform: translateY(-50%);
    pointer-events: none;
}
.input-icon input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 46px;
    color: var(--yn-charcoal);
    background: #FBFCFD;
    border: 1px solid var(--yn-border);
    border-radius: 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input-icon input:focus {
    background: var(--yn-white);
    border-color: var(--yn-bronze);
    box-shadow: 0 0 0 4px rgba(201, 169, 110, .15);
}
.password-control button {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--yn-muted);
    background: transparent;
    border: 0;
    border-radius: 9px;
    transform: translateY(-50%);
    cursor: pointer;
}
.password-control button:hover, .password-control button:focus-visible { color: var(--yn-navy); background: #EEF2F6; outline: none; }
.auth-form__meta { display: flex; justify-content: flex-end; margin-top: -5px; }
.auth-form__meta a, .auth-card__link { color: var(--yn-slate); font-size: .82rem; font-weight: 700; text-decoration: none; }
.auth-form__meta a:hover, .auth-card__link:hover { color: var(--yn-bronze); text-decoration: underline; }
.auth-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    margin-top: 2px;
    color: var(--yn-white);
    background: var(--yn-navy);
    border: 1px solid var(--yn-navy);
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(15, 23, 42, .18);
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.auth-form__submit:hover { background: var(--yn-slate); transform: translateY(-1px); box-shadow: 0 15px 28px rgba(15, 23, 42, .22); }
.auth-form__submit:focus-visible { outline: 3px solid rgba(201,169,110,.45); outline-offset: 2px; }
.auth-card__security-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 21px 0 0; color: #7A8797; font-size: .75rem; text-align: center; }
.auth-card__security-note .bx { color: var(--yn-bronze); font-size: 1rem; }
.flash-message, .form-errors, .form-error {
    margin: 0 0 16px;
    padding: 12px 14px;
    color: #7A271A;
    background: #FEF3F2;
    border: 1px solid #FECDCA;
    border-radius: 10px;
    font-size: .84rem;
    line-height: 1.5;
}

@media (max-width: 520px) {
    .auth-shell { padding: 22px 14px; align-items: center; }
    .auth-shell__frame { width: 100%; min-width: 0; }
    .auth-card { padding: 26px 22px 24px; border-radius: 15px; }
    .auth-card__brand { min-height: 116px; }
    .auth-card__logo { height: 116px; max-width: 142px; }
}
@media (max-width: 360px) {
    .auth-card { padding-inline: 17px; }
    .auth-card__lead { font-size: .86rem; }
}
