:root {
  --bg: #12182a; --line: #35415d; --line-soft: #262f47; --text: #edf2ff;
  --muted: #aeb8cf; --accent: #55b5f5; --accent-ink: #0a1a2b;
  --danger: #f06e7c; --shadow: 0 24px 70px #04070f8c; --radius-lg: 22px;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--text); background: var(--bg); color-scheme: dark;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; background:
  radial-gradient(circle at 12% 0%, #1e3a6a66 0, transparent 32rem),
  radial-gradient(circle at 92% 92%, #0d4a7c40 0, transparent 28rem), var(--bg); color: var(--text); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; min-height: 44px; display: inline-flex; align-items: center; transform: translateY(-150%); padding: 10px 14px; border-radius: 8px; background: #fff; color: #111; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #f4d477; outline-offset: 3px; }

.admin-bar { position: sticky; top: 0; z-index: 50; min-height: 68px; display: flex; align-items: center; gap: 22px; padding: 10px clamp(16px, 4vw, 54px); border-bottom: 1px solid #2f3a57cc; background: #141b2ded; backdrop-filter: blur(16px); }
.admin-brand { min-height: 44px; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #63c2fb, #1575b5); color: #fff; font-weight: 950; box-shadow: 0 8px 24px #1575b561; }
.admin-brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.admin-brand strong { font-size: 15px; }
.admin-brand small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.admin-account { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.admin-account > span { max-width: 220px; display: flex; flex-direction: column; text-align: right; }
.admin-account small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; }
.admin-account strong { overflow: hidden; margin-top: 2px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-weight: 800; font-size: 12px; transition: transform .15s, background .15s, border-color .15s; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button.primary { border-color: #2f9fe0; background: linear-gradient(180deg, #3ba7e6, #1575b5); color: #fff; box-shadow: 0 8px 22px #1575b541; }
.button.primary:hover { background: linear-gradient(180deg, #55b5f5, #1a83c6); }
.button.quiet { border-color: var(--line); background: #1f2740; color: var(--text); }
.button.quiet:hover { border-color: #4a5679; background: #273049; }
.button.full { width: 100%; min-height: 46px; }

main { width: min(1180px, 100%); min-height: calc(100vh - 128px); margin: 0 auto; padding: clamp(24px, 5vw, 58px) clamp(14px, 4vw, 36px) 60px; }
#main-content:focus { outline: 0; }
.loading-view { min-height: 55vh; display: flex; align-items: center; justify-content: center; gap: 18px; }
.loading-view h1 { margin: 0 0 4px; font-size: 20px; }
.loading-view p { margin: 0; color: var(--muted); }
.loader { width: 38px; height: 38px; flex: none; border: 3px solid #28493a; border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-view { min-height: min(720px, calc(100vh - 150px)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr); align-items: stretch; gap: clamp(22px, 4vw, 56px); padding: clamp(24px, 5vw, 64px); border: 1px solid #dde4ef; border-radius: 28px; background: #f7f9fc; color: #17213d; box-shadow: 0 24px 80px #02070547; }
.auth-card { width: 100%; max-width: 520px; min-height: 570px; display: flex; flex-direction: column; justify-content: center; justify-self: end; padding: clamp(28px, 5vw, 54px); border: 1px solid #2b3450; border-radius: var(--radius-lg); background: #0b1020; color: var(--text); box-shadow: var(--shadow); }
.auth-card-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 42px; }
.auth-card-brand > span:last-child { min-width: 0; display: grid; gap: 2px; }
.auth-card-brand strong { font-size: 16px; }
.auth-card-brand small { max-width: 260px; overflow: hidden; color: #8f9ab5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.auth-step-copy { margin-bottom: 24px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: 1.25px; text-transform: uppercase; }
.auth-card h1, .state-view h1 { margin: 7px 0 9px; font-size: clamp(28px, 4vw, 40px); line-height: 1.08; letter-spacing: -1.1px; }
.auth-step-copy > p, .state-view > p { margin: 0; color: var(--muted); line-height: 1.55; }
.admin-form { display: grid; gap: 15px; }
.admin-form label { display: grid; gap: 7px; }
.admin-form label > span { font-size: 11px; font-weight: 800; }
input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #3b4a6c; border-radius: 10px; background: #0e1526; color: var(--text); outline: 0; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #55b5f533; }
.form-error { margin: 0; padding: 10px 12px; border: 1px solid #7d4552; border-radius: 9px; background: #351d24; color: #ffd6dc; font-size: 11px; line-height: 1.45; }
.security-note { display: flex; align-items: flex-start; gap: 7px; margin: 19px 0 0 !important; color: #9aa5bf !important; font-size: 12px; line-height: 1.45; }
.security-note span { color: var(--accent); }
.auth-intro { align-self: center; max-width: 670px; padding: clamp(4px, 2vw, 28px); }
.auth-intro h2 { max-width: 620px; margin: 12px 0 14px; font-size: clamp(30px, 3vw, 42px); line-height: 1.08; letter-spacing: -1.3px; }
.auth-intro > p { max-width: 610px; margin: 0; color: #55627d; font-size: 15px; line-height: 1.65; }
.auth-capabilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 44px; padding-top: 28px; border-top: 1px solid #dce3ee; }
.auth-capabilities article { min-width: 0; display: grid; align-content: start; gap: 7px; padding: 17px; border: 1px solid #dee5f0; border-radius: 14px; background: #fff; }
.auth-capabilities article > span { color: #1163a0; font-size: 10px; font-weight: 900; }
.auth-capabilities strong { color: #17213d; font-size: 13px; }
.auth-capabilities small { color: #5b6882; font-size: 11px; line-height: 1.5; }

.state-view { max-width: 560px; min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: auto; text-align: center; }
.state-icon { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 19px; border: 1px solid #8b5561; border-radius: 19px; background: #351e26; color: var(--danger); font-size: 30px; font-weight: 900; }
.admin-footer { min-height: 60px; display: flex; justify-content: space-between; gap: 20px; padding: 18px clamp(16px, 4vw, 54px); border-top: 1px solid var(--line-soft); color: #6b7794; font-size: 10px; }
.admin-footer span:first-child { color: #98a3bd; font-weight: 850; }

@media (max-width: 850px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-intro { display: none; }
  .auth-card { min-height: 0; justify-self: center; margin: auto; }
}
@media (max-width: 620px) {
  .admin-bar { gap: 12px; padding: 9px 12px; }
  .admin-account > span { display: none; }
  main { padding: 24px 10px 42px; }
  .auth-view { min-height: calc(100vh - 150px); padding: 0; border: 0; background: transparent; box-shadow: none; }
  .auth-card { min-height: min(610px, calc(100vh - 170px)); padding: 28px 22px; border-radius: 18px; }
  .auth-card-brand { margin-bottom: 30px; }
  .admin-footer { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
