/* Authentication pages only. Standalone: does not load the application theme. */
:root {
  --a-blue: #3D6A92; --a-blue-dark: #2B4C6B; --a-sky: #8CCBEF; --a-red: #D12B2B; --a-amber: #F2A900;
  --a-bg: #F3F4F1; --a-surface: #fff; --a-ink: #15191F; --a-ink2: #4D545E; --a-line: #D5D8D2; --a-err: #B42318; --a-err-bg: #FDECEA; --a-ok: #067647; --a-ok-bg: #E7F6EC;
}
:root[data-theme="dark"] { --a-bg: #0F1215; --a-surface: #181C21; --a-ink: #EEF0F2; --a-ink2: #B5BBC3; --a-line: #2B3138; --a-err: #F5887E; --a-err-bg: #331818; --a-ok: #6CD08F; --a-ok-bg: #13291A; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--a-bg); color: var(--a-ink); line-height: 1.45; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-brand { background: linear-gradient(160deg, var(--a-blue) 0%, var(--a-blue-dark) 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand::after { content: ""; position: absolute; inset: auto -40px -40px auto; width: 260px; height: 260px; background: repeating-linear-gradient(135deg, var(--a-red) 0 18px, #fff 18px 36px); opacity: .14; transform: rotate(8deg); border-radius: 18px; }
.logo { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 26px; }
.logo i { width: 48px; height: 48px; border-radius: 8px; background: repeating-linear-gradient(135deg, var(--a-red) 0 8px, #fff 8px 16px); box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); }
.logo img { height: 60px; width: auto; max-width: 200px; object-fit: contain; flex: none; }
.auth-art { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; margin: 28px 0 18px; display: flex; align-items: center; justify-content: center; }
.auth-art img { max-width: 100%; max-height: 46vh; width: auto; height: auto; border-radius: 14px; box-shadow: 0 18px 40px rgba(8,24,40,.35); object-fit: contain; }
.logo b { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: #DCE7F1; }
.auth-brand h2 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; font-weight: 600; max-width: 18ch; }
.auth-brand p { margin: 0; color: #DCE7F1; max-width: 38ch; }
.auth-brand small { color: #B9CDDF; position: relative; z-index: 1; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.card { width: 100%; max-width: 420px; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 12px; padding: 32px 28px; box-shadow: 0 8px 28px rgba(15,18,21,.07); }
.card h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; }
.card .lead { margin: 0 0 22px; color: var(--a-ink2); font-size: 14.5px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.field input[type=email], .field input[type=password], .field input[type=text] { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--a-line); border-radius: 8px; background: var(--a-surface); color: var(--a-ink); }
.field input:focus { outline: 2px solid var(--a-sky); outline-offset: 1px; border-color: var(--a-blue); }
.field.invalid input { border-color: var(--a-err); }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--a-blue); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.pw button:focus-visible { outline: 2px solid var(--a-sky); }
.err { color: var(--a-err); font-size: 12.5px; margin-top: 5px; }
.alert { padding: 10px 12px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; }
.alert.ok { background: var(--a-ok-bg); color: var(--a-ok); }
.alert.bad { background: var(--a-err-bg); color: var(--a-err); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 13.5px; flex-wrap: wrap; }
.row label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
a { color: var(--a-blue); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
.btn { width: 100%; font: inherit; font-weight: 700; padding: 11px 14px; border: 0; border-radius: 8px; background: var(--a-blue); color: #fff; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.btn:hover { background: var(--a-blue-dark); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn .spin { display: none; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: s .7s linear infinite; }
.btn.loading .spin { display: inline-block; }
@keyframes s { to { transform: rotate(360deg); } }
.back { text-align: center; margin-top: 18px; font-size: 13.5px; }
.hint { color: var(--a-ink2); font-size: 12.5px; margin-top: 5px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-brand { padding: 18px 20px; } .logo { flex-direction: row; align-items: center; gap: 10px; } .logo img { height: 36px; max-width: 110px; } .logo i { width: 34px; height: 34px; } .logo b { font-size: 11px; } .auth-brand h2, .auth-brand p, .auth-brand small, .auth-art { display: none; } .auth-main { padding: 24px 16px 40px; align-items: flex-start; } .card { padding: 26px 20px; } }
@media (prefers-reduced-motion: reduce) { .btn .spin { animation-duration: 2s; } }

.auth { position: relative; }
.auth-lang { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; align-items: center; margin: 0; }
.auth-lang svg { position: absolute; left: 10px; width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; color: var(--a-ink2); pointer-events: none; }
.auth-lang select { background: var(--a-surface); color: var(--a-ink); border: 1px solid var(--a-line); border-radius: 18px; padding: 7px 26px 7px 32px; font: inherit; font-size: 13px; cursor: pointer; }
