:root {
  --bg-1: #0A231C;
  --bg-2: #051611;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-line: rgba(212, 175, 55, 0.18);
  --gold: #D4AF37;
  --bronze: #C5A059;
  --ink: #0A231C;
  --text: #EDE6D6;
  --muted: #9DB3AA;
  --danger: #FF9A8A;
  --ok: #8FE3B0;
  --metal: linear-gradient(145deg, #E6BC93 0%, #BC8760 42%, #D9A67B 70%, #A47250 100%);
  --brush: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, rgba(0,0,0,0.025) 1px 3px);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-1) 0%, var(--bg-2) 100%) fixed;
  padding-top: env(safe-area-inset-top, 0px);
  -webkit-font-smoothing: antialiased;
}
.noscript { padding: 24px; text-align: center; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.shell { max-width: 520px; margin: 0 auto; padding: 20px 18px 120px; }
.view { animation: rise 0.45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 10px; letter-spacing: 0.22em; font-size: 0.8rem; text-transform: uppercase; color: var(--bronze); }
.brand img { width: 34px; height: 34px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--bronze); background: var(--glass); border: 1px solid var(--glass-line); transition: 0.2s;
}
.icon-btn:hover { box-shadow: 0 0 18px rgba(212, 175, 55, 0.3); color: var(--gold); }

.hello small { color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.7rem; }
.hello h1 { margin: 4px 0 22px; font-size: 1.9rem; font-weight: 600; letter-spacing: 0.02em; overflow-wrap: anywhere; }

.metal {
  background: var(--brush), var(--metal); color: var(--ink); border-radius: 26px; padding: 20px 22px; margin-bottom: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.metal .label { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; }
.metal .value { font-size: 1.25rem; font-weight: 650; margin-top: 4px; overflow-wrap: anywhere; }
.badge { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-1); color: var(--gold); display: grid; place-items: center; box-shadow: 0 0 16px rgba(10, 35, 28, 0.6); flex: none; }

.idcard { background: #fff; color: var(--ink); border-radius: 24px; padding: 18px 22px; margin-bottom: 16px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.idcard .row { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; align-items: baseline; }
.idcard .row span:first-child { font-size: 0.7rem; letter-spacing: 0.16em; color: #5d7a70; }
.idcard .row span:last-child { font-weight: 650; overflow-wrap: anywhere; text-align: right; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.glass { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px; padding: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.glass .ico { color: var(--bronze); margin-bottom: 10px; }
.glass .label { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; }
.glass .value { margin-top: 4px; font-weight: 600; }
h2 { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bronze); margin: 22px 0 12px; font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--glass-line); }
.list li:last-child { border-bottom: 0; }
.list .ico { color: var(--ok); margin: 0; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--glass-line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: right; overflow-wrap: anywhere; }

.btn {
  width: 100%; min-height: 50px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 650; letter-spacing: 0.08em;
  color: var(--ink); background: var(--brush), var(--metal); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: filter 0.2s, transform 0.1s, box-shadow 0.2s;
}
.btn:hover { filter: brightness(1.08); box-shadow: 0 0 24px rgba(212, 175, 55, 0.35), 0 10px 22px rgba(0, 0, 0, 0.35); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn.ghost { background: var(--glass); color: var(--text); border: 1px solid var(--glass-line); box-shadow: none; }

.auth { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.auth .logo { width: 76px; height: 76px; margin: 0 auto 10px; display: block; }
.auth h1 { text-align: center; letter-spacing: 0.26em; font-size: 1.25rem; font-weight: 500; margin: 0 0 24px; text-transform: uppercase; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); margin-bottom: 18px; }
.tabs a { text-align: center; padding: 11px 0; border-radius: 999px; color: var(--muted); text-decoration: none; letter-spacing: 0.08em; font-size: 0.9rem; }
.tabs a[aria-current="page"] { background: var(--brush), var(--metal); color: var(--ink); font-weight: 650; }
label { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.field { position: relative; }
input {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: 16px; color: var(--text);
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(197, 160, 89, 0.3); transition: 0.2s;
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25); }
.field .icon-btn { position: absolute; right: 3px; top: 3px; border: 0; background: transparent; }
.field input { padding-right: 52px; }
.err { min-height: 22px; margin: 12px 2px 4px; color: var(--danger); font-size: 0.9rem; }
.rules { list-style: none; padding: 0; margin: 10px 2px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 0.8rem; color: var(--muted); }
.rules li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; border: 1px solid var(--bronze); }
.rules li.ok { color: var(--ok); }
.rules li.ok::before { background: var(--ok); border-color: var(--ok); }
.submit { margin-top: 12px; }

.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100% - 28px)); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px;
  background: rgba(5, 22, 17, 0.82); border: 1px solid var(--glass-line); border-radius: 999px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.85rem; letter-spacing: 0.08em; }
.nav a[aria-current="page"] { background: var(--brush), var(--metal); color: var(--ink); font-weight: 650; }

@media (min-width: 900px) {
  .shell { max-width: 760px; padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
