:root {
    --wine: #470506;
    --wine-deep: #250203;
    --gold: #f2b632;
    --ink: #1c191a;
    --muted: #746d6e;
    --line: #e8e1e1;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: #f7f3f0; font-family: Arial, Helvetica, sans-serif; }
button, input { font: inherit; }

.login-shell { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(420px, .75fr); min-height: 100vh; }
.login-visual { position: relative; display: flex; align-items: flex-end; min-height: 100vh; overflow: hidden; padding: clamp(38px, 6vw, 90px); color: #fff; background: linear-gradient(180deg, rgba(31,2,3,.16), rgba(37,2,3,.92)), url('../../img/bg.jpg') center/cover; }
.login-visual::after { position: absolute; right: -100px; bottom: -200px; width: 480px; height: 480px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 160px rgba(255,255,255,.02); content: ""; }
.back-home { position: absolute; z-index: 2; top: 38px; left: clamp(38px,6vw,90px); display: inline-flex; align-items: center; gap: 10px; color: rgba(255,255,255,.84); font-size: .86rem; font-weight: 700; text-decoration: none; }
.back-home:hover { color: #ffd573; }
.visual-content { position: relative; z-index: 1; max-width: 730px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; color: #ffd573; font-size: .76rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { width: 35px; height: 2px; background: var(--gold); content: ""; }
.visual-content h1 { margin: 0 0 25px; color: #fff; font-size: clamp(3.2rem,6vw,6.4rem); line-height: .96; letter-spacing: -.055em; }
.visual-content > p { max-width: 650px; margin: 0 0 32px; color: rgba(255,255,255,.72); font-size: 1.07rem; line-height: 1.75; }
.commitment { display: inline-flex; align-items: center; gap: 12px; padding: 15px 19px; color: rgba(255,255,255,.88); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); font-size: .87rem; font-weight: 700; }
.commitment i { color: var(--gold); }

.login-panel { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 45px clamp(28px,4vw,70px); background: #fff; }
.login-card { width: 100%; max-width: 470px; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 54px; }
.brand img { width: 58px; height: 58px; object-fit: contain; }
.brand strong, .brand span { display: block; }
.brand strong { color: var(--wine); font-size: 1.25rem; letter-spacing: .08em; }
.brand span { margin-top: 3px; color: var(--muted); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.login-heading > span { display: block; margin-bottom: 9px; color: var(--wine); font-size: .74rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.login-heading h2 { margin: 0 0 10px; font-size: clamp(2rem,3.2vw,2.75rem); line-height: 1.12; letter-spacing: -.035em; }
.login-heading p { margin: 0 0 30px; color: var(--muted); }

.login-alert { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 24px; padding: 14px 16px; border-left: 3px solid; font-size: .87rem; line-height: 1.5; }
.login-alert.error { color: #7d1618; background: #fff1f1; border-color: #b52226; }
.login-alert.success { color: #176139; background: #effbf4; border-color: #268c54; }
.login-alert i { margin-top: 2px; }
.field-group { margin-bottom: 20px; }
.field-group label { display: block; margin-bottom: 8px; color: #383233; font-size: .82rem; font-weight: 700; }
.field-control { position: relative; display: flex; align-items: center; height: 56px; border: 1px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .2s; }
.field-control:focus-within { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(71,5,6,.08); }
.field-control > i { width: 49px; color: #9a8f90; text-align: center; }
.field-control input { flex: 1; min-width: 0; height: 100%; padding: 0 15px 0 0; color: var(--ink); background: transparent; border: 0; outline: 0; }
.password-toggle { width: 52px; height: 100%; color: #8d8283; background: transparent; border: 0; cursor: pointer; }
.password-toggle:hover { color: var(--wine); }

.captcha-group { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: end; }
.captcha-image-wrap { position: relative; height: 58px; margin-bottom: 20px; overflow: hidden; background: var(--wine); }
.captcha-image-wrap img { display: block; width: 170px; height: 58px; object-fit: cover; }
.captcha-image-wrap button { position: absolute; top: 0; right: 0; width: 42px; height: 58px; color: #fff; background: rgba(0,0,0,.38); border: 0; cursor: pointer; }
.captcha-image-wrap button:hover { background: rgba(0,0,0,.6); }
.captcha-group .field-group { min-width: 0; }
.login-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 58px; margin-top: 6px; padding: 0 22px; color: #fff; background: var(--wine); border: 0; cursor: pointer; font-size: .83rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; transition: background .2s, transform .2s; }
.login-button:hover { background: #711012; transform: translateY(-2px); }
.security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 40px; color: #918788; font-size: .74rem; text-align: center; }
.security-note i { color: var(--wine); }
.login-card footer { padding-top: 22px; color: #9a9091; border-top: 1px solid var(--line); font-size: .75rem; text-align: center; }

@media (max-width: 1050px) {
    .login-shell { grid-template-columns: 1fr 480px; }
    .visual-content h1 { font-size: clamp(3rem,6vw,4.8rem); }
}

@media (max-width: 850px) {
    .login-shell { display: block; }
    .login-visual { min-height: 410px; padding: 100px 30px 45px; }
    .back-home { top: 28px; left: 30px; }
    .visual-content h1 { font-size: clamp(2.8rem,12vw,4.4rem); }
    .login-panel { min-height: auto; padding: 55px 25px; }
    .brand { margin-bottom: 42px; }
}

@media (max-width: 520px) {
    .login-visual { min-height: 370px; }
    .visual-content h1 { font-size: 2.75rem; }
    .visual-content > p { font-size: .92rem; }
    .captcha-group { grid-template-columns: 1fr; gap: 0; }
    .captcha-image-wrap { width: 170px; margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .field-control, .login-button { transition: none; }
}
