[hidden] { display: none !important; }

.auth-page,
.dashboard-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(45, 212, 191, .18), transparent 32%),
    radial-gradient(circle at 92% 16%, rgba(14, 165, 233, .1), transparent 30%),
    var(--bg);
}
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(100, 116, 139, .2) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}
.auth-top {
  position: relative;
  z-index: 5;
  padding: 18px 0 0;
}
.auth-top-inner {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.auth-back {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.auth-back:hover { color: var(--accent-text); }

.auth-shell {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
  min-height: calc(100vh - 180px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 452px);
  align-items: center;
  gap: 64px;
  padding: 54px 0 62px;
}
.auth-aside { max-width: 500px; }
.auth-aside .eyebrow { margin-bottom: 22px; }
.auth-aside h2 {
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  line-height: 1.06;
  letter-spacing: -.055em;
}
.auth-lead {
  max-width: 440px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.auth-points {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}
.auth-points li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}
.auth-points li span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 10px;
}
.auth-quote {
  margin-top: 30px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 14px;
  background: rgba(255, 255, 255, .55);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.auth-quote-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.auth-quote code {
  display: block;
  margin-top: 9px;
  overflow: hidden;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-card {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 32px 80px -38px rgba(15, 23, 42, .36), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px);
}
.auth-card-head { margin-bottom: 24px; }
.auth-kicker {
  display: inline-block;
  color: var(--accent-text);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.auth-card-head h1 {
  margin-top: 8px;
  font-size: 1.65rem;
  letter-spacing: -.045em;
  line-height: 1.18;
}
.auth-card-head p {
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
}
.auth-card-head a { color: var(--accent-text); font-weight: 800; }
.auth-card-head a:hover { text-decoration: underline; }

.field { display: block; margin-bottom: 15px; }
.field-label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}
.field input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: 0;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field input::placeholder { color: #94a3b8; }
.field input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .13);
}
.field.invalid input { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .08); }
.field-hint {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 9.5px;
  line-height: 1.45;
}
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 58px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--accent-text);
  font-size: 9.5px;
  font-weight: 800;
  transform: translateY(-50%);
}
.password-toggle:hover { background: var(--accent-tint); }

.form-error {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}
.auth-submit { margin-top: 3px; min-height: 46px; }
.auth-submit[disabled] { cursor: wait; opacity: .72; transform: none; }
.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}
.auth-submit.loading .btn-spinner { display: inline-block; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-note {
  margin-top: 17px;
  color: #94a3b8;
  font-size: 9.5px;
  line-height: 1.55;
}
.auth-footer {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 24px;
  color: #94a3b8;
  font-size: 9.5px;
}

/* Dashboard */
.dash-shell {
  width: min(100% - 32px, 1080px);
  margin-inline: auto;
  padding: 34px 0 64px;
}
.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 26px;
  padding: 10px 13px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #854d0e;
  font-size: 10.5px;
  line-height: 1.5;
}
.demo-banner-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: #f59e0b;
}
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.dash-head h1 {
  margin-top: 8px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -.055em;
  line-height: 1.1;
}
.dash-head p { margin-top: 9px; color: var(--muted); font-size: 12.5px; }
.dash-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 800;
}
.dash-state i, .dash-status i, .demo-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.dash-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-sm);
}
.dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dash-label {
  display: block;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.dash-card-head strong {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
}
.dash-tag {
  padding: 3px 6px;
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  background: var(--accent-tint);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
}
.key-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.key-value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-btn {
  flex: 0 0 auto;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}
.icon-btn:hover { border-color: var(--accent-line); color: var(--accent-text); }
.dash-note {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 9.5px;
  line-height: 1.55;
}
.dash-metric {
  display: block;
  margin-top: 8px;
  font-size: 1.55rem;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  color: var(--accent-text);
  font-size: 9px;
  font-weight: 700;
}
.dash-link {
  display: inline-flex;
  gap: 5px;
  margin-top: 14px;
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 800;
}
.dash-panel {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #1e293b;
  border-radius: 16px;
  background: #0b1220;
  box-shadow: 0 24px 56px -34px rgba(2, 6, 23, .55);
}
.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  background: #111b2e;
}
.dash-panel-head .auth-kicker { color: #5eead4; }
.dash-panel-head h2 { margin-top: 3px; color: #f8fafc; font-size: 15px; letter-spacing: -.03em; }
.dash-panel-head .btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .26); color: #e2e8f0; }
.dash-code {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #cbd5e1;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.8;
}
.dash-code .tok-key { color: #7dd3fc; }
.dash-code .tok-str { color: #6ee7b7; }
.dash-code .tok-num { color: #fcd34d; }
.dash-panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  color: #94a3b8;
  font-size: 9.5px;
}
.dash-panel-foot span { display: inline-flex; align-items: center; gap: 6px; }
.dash-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.dash-steps article {
  display: flex;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .7);
}
.dash-steps article > span {
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}
.dash-steps strong { font-size: 10.5px; }
.dash-steps p { margin-top: 4px; color: #94a3b8; font-size: 9.5px; line-height: 1.5; }
.dash-nav { display: flex; align-items: center; gap: 12px; }
.dash-nav > a { color: var(--muted); font-size: 11px; font-weight: 700; }
.dash-nav > a:hover { color: var(--accent-text); }
.dash-loading {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 42vh;
  color: var(--faint);
  font-size: 12px;
}
.loading-ring {
  width: 26px;
  height: 26px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: auth-spin .8s linear infinite;
}
.loader-fallback {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 330px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.loader-fallback strong { font-size: 13px; }
.loader-fallback p { color: var(--muted); font-size: 11px; line-height: 1.55; }
.loader-actions { display: flex; gap: 7px; margin-top: 5px; }
.loader-actions .btn { min-height: 34px; }
.dash-error {
  width: min(100% - 32px, 560px);
  margin: 70px auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}
.dash-error h1 { font-size: 1.4rem; letter-spacing: -.04em; }
.dash-error p { margin: 9px 0 18px; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }
  .auth-aside { max-width: 580px; }
  .auth-quote { display: none; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .key-card { grid-column: 1 / -1; }
  .dash-steps { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .auth-top { padding-top: 12px; }
  .auth-top-inner { align-items: flex-start; }
  .auth-back { font-size: 10px; }
  .brand-sub { display: none; }
  .auth-aside h2 { font-size: 2rem; }
  .auth-aside .auth-points { grid-template-columns: 1fr 1fr; gap: 8px; }
  .auth-card { padding: 22px; border-radius: 18px; }
  .auth-card-head h1 { font-size: 1.45rem; }
  .auth-footer { flex-direction: column; gap: 5px; }
  .dash-head { flex-direction: column; gap: 12px; }
  .dash-grid { grid-template-columns: 1fr; }
  .key-card { grid-column: auto; }
  .dash-panel-head { align-items: flex-start; flex-direction: column; }
  .dash-panel-foot { align-items: flex-start; flex-direction: column; gap: 5px; }
  .dash-nav > a { display: none; }
  .dash-code { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-ring, .btn-spinner { animation: none; }
}
