:root {
  color-scheme: light;
  --ink: #0a1742;
  --muted: #63708c;
  --line: rgba(102, 123, 173, 0.16);
  --blue: #1264f4;
  --violet: #7650ea;
  --cyan: #1ecde9;
  --success: #13a976;
  --danger: #dc4d67;
  --shadow: 0 28px 75px rgba(34, 51, 105, 0.14);
  font-family: Inter, "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f8fbff;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #f8fbff;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(18, 100, 244, 0.24);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auth-page {
  position: fixed;
  isolation: isolate;
  inset: 0;
  min-height: 100svh;
  overflow: auto;
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 14% 18%, rgba(32, 207, 235, 0.13), transparent 26%),
    radial-gradient(circle at 84% 78%, rgba(119, 72, 241, 0.14), transparent 30%),
    linear-gradient(135deg, #fff 0%, #fbfdff 46%, #f7f6ff 100%);
}

.auth-page::before {
  content: "";
  position: fixed;
  z-index: -3;
  inset: 0;
  background: url("../images/service-glass-lightfield.webp") center / cover no-repeat;
  opacity: 0.4;
  filter: saturate(0.85) brightness(1.12);
  transform: scale(1.07);
  pointer-events: none;
}

.auth-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.16) 45%, rgba(255, 255, 255, 0.46));
  pointer-events: none;
}

.aurora,
.dashboard-aurora {
  position: fixed;
  z-index: -2;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  filter: blur(75px);
  pointer-events: none;
  animation: aurora-drift 12s ease-in-out infinite alternate;
}

.aurora-cyan { top: -190px; left: 17%; background: rgba(40, 214, 237, 0.19); }
.aurora-violet { right: -160px; bottom: -210px; background: rgba(128, 78, 246, 0.2); animation-delay: -5s; }

.auth-stage {
  width: min(1420px, 100%);
  min-height: calc(100svh - 40px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr);
  align-items: center;
  gap: clamp(34px, 6vw, 92px);
}

.auth-hero {
  position: relative;
  width: min(740px, 100%);
  min-height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  justify-self: center;
  padding: 36px 18px 42px;
}

.brand-visual {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(540px, 92%);
  height: 465px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
}

.brand-visual::before {
  content: "";
  position: absolute;
  width: 348px;
  height: 348px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(219,245,255,.11) 52%, rgba(232,222,255,.16));
  box-shadow: 0 38px 80px rgba(41,64,127,.1), inset 0 1px 1px rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(145%);
}

.brand-visual::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 52px;
  bottom: 43px;
  border-radius: 50%;
  background: rgba(69, 70, 188, 0.13);
  filter: blur(24px);
  transform: perspective(260px) rotateX(72deg);
}

.brand-visual img {
  position: relative;
  z-index: 3;
  width: 360px;
  height: 360px;
  object-fit: contain;
  user-select: none;
  filter: saturate(1.2) contrast(1.04) drop-shadow(0 30px 30px rgba(62,77,204,.16));
  animation: brand-float 6.5s ease-in-out infinite;
}

.brand-halo {
  position: absolute;
  z-index: 1;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: conic-gradient(from 110deg, rgba(37,215,234,.21), rgba(60,110,247,.12), rgba(129,69,243,.2), rgba(37,215,234,.21));
  filter: blur(23px);
  animation: halo-spin 16s linear infinite;
}

.brand-orbit {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(100, 123, 205, 0.14);
  border-radius: 50%;
}

.brand-orbit-one { width: 442px; height: 174px; transform: rotate(-15deg); }
.brand-orbit-two { width: 402px; height: 228px; transform: rotate(26deg); }

.brand-glass-dot {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(201,237,255,.3) 52%, rgba(197,180,255,.2));
  box-shadow: 0 14px 28px rgba(41,61,118,.12), inset 2px 2px 4px rgba(255,255,255,.9);
}

.brand-dot-one { width: 42px; height: 42px; top: 80px; right: 34px; }
.brand-dot-two { width: 24px; height: 24px; left: 20px; top: 232px; }
.brand-dot-three { width: 17px; height: 17px; right: 62px; bottom: 74px; background: linear-gradient(145deg, #b9fbff, #8566f3); }

.auth-hero-copy {
  position: relative;
  z-index: 5;
  max-width: 570px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow,
.card-kicker {
  margin: 0 0 9px;
  color: #2767d7;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.auth-hero-copy h2 {
  margin: 0;
  color: #0a1744;
  font-size: clamp(42px, 4.15vw, 62px);
  line-height: 1.08;
  letter-spacing: -.065em;
}

.auth-hero-copy h2 span {
  color: transparent;
  background: linear-gradient(104deg, #086fdf 0%, #385cf1 49%, #7d43e9 100%);
  background-clip: text;
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 19px;
  margin-top: 23px;
  color: #596582;
  font-size: 12px;
  font-weight: 650;
}

.auth-benefits span { display: inline-flex; align-items: center; gap: 7px; }
.auth-benefits i { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, #21cdea, #6049ec); box-shadow: 0 0 0 4px rgba(73,107,234,.08); }

.auth-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 455px;
  justify-self: end;
  overflow: hidden;
  padding: 40px 38px 30px;
  border: 1px solid transparent;
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.68), rgba(247,251,255,.43) 54%, rgba(243,238,255,.38)) padding-box,
    conic-gradient(from 205deg, rgba(255,255,255,.98), rgba(94,211,238,.58), rgba(255,255,255,.92), rgba(121,90,238,.5), rgba(255,255,255,.98)) border-box;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.96);
  backdrop-filter: blur(30px) saturate(165%);
}

.auth-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: 32px;
  background: radial-gradient(300px 170px at 10% -4%, rgba(255,255,255,.92), transparent 70%), radial-gradient(220px 170px at 102% 105%, rgba(124,86,239,.12), transparent 74%);
  pointer-events: none;
}

.card-glint {
  position: absolute;
  top: 1px;
  left: 11%;
  width: 62%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff 18%, #fff 70%, transparent);
}

.auth-card-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.14;
  letter-spacing: -.055em;
}

.auth-card-heading > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-form { margin-top: 26px; }
.compact-form { margin-top: 22px; }
.field-group { min-width: 0; }
.field-label { display: block; margin: 0 0 8px 3px; color: #303d60; font-size: 12px; font-weight: 700; }
.field-label span { color: #8c96ab; font-weight: 550; }
.input-shell + .field-label,
.field-error + .field-label { margin-top: 15px; }

.input-shell {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(104,124,173,.18);
  border-radius: 17px;
  color: #8190ad;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 8px 20px rgba(45,67,126,.045);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-shell:focus-within {
  border-color: rgba(31,105,241,.48);
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 0 4px rgba(31,105,241,.08), 0 12px 24px rgba(42,73,141,.07);
}

.input-shell.has-error { border-color: rgba(220,77,103,.6); box-shadow: 0 0 0 4px rgba(220,77,103,.07); }
.input-shell input { width: 100%; min-width: 0; border: 0; outline: 0; color: #152347; background: transparent; font-size: 14px; }
.input-shell input::placeholder { color: #a0a9bd; }
.field-icon { flex: 0 0 auto; width: 21px; text-align: center; color: #7485a6; font-size: 19px; font-weight: 550; }
.lock-icon, .user-icon, .pulse-mini { position: relative; height: 21px; }
.lock-icon::before { content: ""; position: absolute; left: 5px; top: 8px; width: 11px; height: 10px; border: 2px solid currentColor; border-radius: 3px; }
.lock-icon::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 8px; border: 2px solid currentColor; border-bottom: 0; border-radius: 7px 7px 0 0; }
.user-icon::before { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 7px; border: 2px solid currentColor; border-radius: 50%; }
.user-icon::after { content: ""; position: absolute; left: 3px; bottom: 1px; width: 15px; height: 8px; border: 2px solid currentColor; border-bottom: 0; border-radius: 12px 12px 0 0; }
.pulse-mini::before { content: "⌁"; font-size: 22px; font-weight: 800; }

.password-toggle {
  flex: 0 0 auto;
  padding: 5px;
  color: #7483a0;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.code-action {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #3462cc;
  background: rgba(52, 98, 214, .09);
  font-size: 10px;
  font-weight: 750;
}

.field-error { min-height: 15px; margin: 4px 3px 0; color: var(--danger); font-size: 11px; }
.form-options { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 15px 2px 21px; }
.remember-control { display: inline-flex; align-items: center; gap: 8px; color: #5d6881; font-size: 12px; cursor: pointer; }
.remember-control input { position: absolute; opacity: 0; pointer-events: none; }
.custom-checkbox { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid rgba(92,111,155,.28); border-radius: 5px; background: rgba(255,255,255,.7); }
.remember-control input:checked + .custom-checkbox { border-color: transparent; background: linear-gradient(135deg, #1682ed, #6e4be9); }
.remember-control input:checked + .custom-checkbox::after { content: ""; width: 7px; height: 4px; border-left: 2px solid white; border-bottom: 2px solid white; transform: translateY(-1px) rotate(-45deg); }
.secure-note { color: #8490a7; font-size: 11px; }

.primary-button,
.check-button,
.visit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, background .18s;
}

.primary-button {
  width: 100%;
  min-height: 54px;
  gap: 12px;
  padding: 0 20px;
  border-radius: 17px;
  color: white;
  background: linear-gradient(106deg, #1176e8 0%, #365ff0 52%, #754ce7 100%);
  box-shadow: 0 17px 30px rgba(55,82,215,.25), inset 0 1px 0 rgba(255,255,255,.28);
  font-size: 14px;
  font-weight: 750;
}

.primary-button:hover { transform: translateY(-1px); box-shadow: 0 20px 34px rgba(55,82,215,.3); }
.button-arrow { font-size: 20px; line-height: 1; }
.auth-switch { margin: 20px 0 0; color: #7b869c; text-align: center; font-size: 12px; }
.auth-switch a { color: #2e61dc; font-weight: 750; text-decoration: none; }
.register-card { max-width: 600px; padding-top: 34px; }
.register-page .auth-stage { grid-template-columns: minmax(0, 1fr) minmax(520px, .95fr); }
.register-page .auth-hero { transform: scale(.94); }
.register-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.register-grid .field-label { margin-top: 0; }
.terms-note { margin: 4px 2px 17px; color: #7d889d; font-size: 11px; line-height: 1.55; }

.toast-region {
  position: fixed;
  z-index: 100;
  top: max(20px, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  gap: 9px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  min-width: min(360px, calc(100vw - 36px));
  padding: 13px 17px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 14px;
  color: #23304f;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 45px rgba(31,46,92,.18);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 650;
  animation: toast-in .24s ease both;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

.dashboard-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding-bottom: 72px;
  background:
    radial-gradient(circle at 9% 12%, rgba(31,205,232,.1), transparent 25%),
    radial-gradient(circle at 88% 30%, rgba(119,78,237,.1), transparent 28%),
    linear-gradient(145deg, #fbfdff 0%, #f7faff 48%, #f7f6ff 100%);
}

.dashboard-page::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  background: url("../images/service-glass-lightfield.webp") center / cover no-repeat;
  opacity: .19;
  filter: brightness(1.13) saturate(.8);
}

.dashboard-aurora-one { top: -260px; left: 20%; background: rgba(35,206,236,.18); }
.dashboard-aurora-two { right: -260px; top: 26%; background: rgba(119,78,237,.16); animation-delay: -4s; }

.dashboard-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding-top: 48px; }
.dashboard-announcement { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 13px 16px; border: 1px solid rgba(61, 105, 211, .16); border-radius: 15px; color: #42516f; background: rgba(255, 255, 255, .66); box-shadow: 0 10px 28px rgba(40, 57, 108, .06); backdrop-filter: blur(16px); }
.dashboard-announcement > span { flex: 0 0 auto; min-height: 20px; display: grid; place-items: center; padding: 0 8px; border-radius: 7px; color: white; background: linear-gradient(135deg, #2987e5, #6551e8); font-size: 9px; font-weight: 800; white-space: nowrap; }
.dashboard-announcement p { margin: 1px 0 0; white-space: pre-wrap; font-size: 11px; line-height: 1.65; }
.domain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.domain-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(99,120,168,.14);
  border-radius: 23px;
  background: rgba(255,255,255,.64);
  box-shadow: 0 18px 48px rgba(40,57,108,.08), inset 0 1px 0 rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.domain-card:hover { transform: translateY(-2px); border-color: rgba(58,102,220,.22); box-shadow: 0 22px 54px rgba(40,57,108,.12); }
.domain-card::after { content: ""; position: absolute; width: 120px; height: 120px; top: -70px; right: -65px; border-radius: 50%; background: rgba(71,110,233,.07); filter: blur(3px); }
.domain-card-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.domain-identity { display: flex; align-items: center; min-width: 0; }
.domain-identity > div { min-width: 0; }
.domain-identity h3 { margin: 0; overflow: hidden; color: #1a284b; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.domain-host { max-width: 180px; margin: 4px 0 0; overflow: hidden; color: #8792a7; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.route-guidance { display: inline-flex; align-items: center; gap: 5px; margin: 7px 0 0; color: #3563c9; font-size: 9px; font-weight: 750; }
.route-guidance i { width: 6px; height: 6px; border-radius: 50%; background: #3475e8; box-shadow: 0 0 0 3px rgba(52,117,232,.1); }
.domain-card[data-role="backup"] { border-color: rgba(198,139,49,.2); background: rgba(255,253,247,.68); }
.domain-card[data-role="backup"] .route-guidance { color: #a16c1a; }
.domain-card[data-role="backup"] .route-guidance i { background: #d2922e; box-shadow: 0 0 0 3px rgba(210,146,46,.12); }
.domain-card[data-role="backup"] .visit-button { background: linear-gradient(106deg, #8a7b6b, #aa7750); box-shadow: 0 8px 16px rgba(128,91,55,.14); }
.skeleton-card { min-height: 230px; pointer-events: none; }
.skeleton-card-top { display: grid; grid-template-columns: 1fr 72px; align-items: center; gap: 11px; }
.skeleton-block { position: relative; display: block; overflow: hidden; border-radius: 11px; background: rgba(217,226,241,.65); }
.skeleton-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.72) 48%, transparent 76%); transform: translateX(-100%); animation: skeleton-shimmer 1.25s ease-in-out infinite; }
.skeleton-title { width: min(132px, 85%); height: 15px; }
.skeleton-status { width: 72px; height: 25px; border-radius: 999px; }
.skeleton-panel { width: 100%; height: 48px; margin: 18px 0 15px; border-radius: 13px; }
.skeleton-actions { display: grid; grid-template-columns: .75fr 1.3fr; gap: 7px; }
.skeleton-actions .skeleton-block { height: 37px; }
.status-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 999px; color: #7d8799; background: rgba(112,126,157,.08); font-size: 9px; font-weight: 750; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; background: #99a2b4; }
.domain-card[data-state="testing"] .status-badge i { background: #3475e8; animation: status-pulse 1s infinite; }
.domain-card[data-state="online"] .status-badge { color: #0e8e67; background: rgba(19,169,118,.1); }
.domain-card[data-state="online"] .status-badge i { background: #13a976; box-shadow: 0 0 0 3px rgba(19,169,118,.11); }
.domain-card[data-state="offline"] .status-badge { color: #c4475e; background: rgba(220,77,103,.09); }
.domain-card[data-state="offline"] .status-badge i { background: #dc4d67; }
.domain-card[data-state="warning"] .status-badge { color: #a36b16; background: rgba(220,157,48,.11); }
.domain-card[data-state="warning"] .status-badge i { background: #d99a2b; }
.latency-panel { min-height: 48px; display: flex; align-items: center; justify-content: space-between; margin: 16px 0 15px; padding: 0 14px; border: 1px solid rgba(112,126,157,.1); border-radius: 13px; background: rgba(247,249,253,.62); transition: border-color .2s ease, background .2s ease; }
.latency-panel > span { color: #8994a8; font-size: 9px; font-weight: 700; }
.response-result { display: inline-flex; align-items: center; gap: 7px; }
.response-result i { width: 7px; height: 7px; border-radius: 50%; background: #a5afc0; box-shadow: 0 0 0 3px rgba(112,126,157,.08); }
.latency-value { color: #526078; font-size: 11px; font-weight: 750; }
.domain-card[data-state="testing"] .response-result i { background: #3475e8; box-shadow: 0 0 0 3px rgba(52,117,232,.1); animation: status-pulse 1s infinite; }
.domain-card[data-state="online"] .latency-panel { border-color: rgba(19,169,118,.13); background: rgba(236,250,245,.6); }
.domain-card[data-state="online"] .response-result i { background: #13a976; box-shadow: 0 0 0 3px rgba(19,169,118,.1); }
.domain-card[data-state="online"] .latency-value { color: #14845f; }
.domain-card[data-state="offline"] .latency-panel { border-color: rgba(220,77,103,.13); background: rgba(253,241,244,.58); }
.domain-card[data-state="offline"] .response-result i { background: #dc4d67; box-shadow: 0 0 0 3px rgba(220,77,103,.09); }
.domain-card[data-state="offline"] .latency-value { color: #bc4358; }
.domain-card[data-state="warning"] .latency-panel { border-color: rgba(217,154,43,.15); background: rgba(255,248,234,.6); }
.domain-card[data-state="warning"] .response-result i { background: #d99a2b; box-shadow: 0 0 0 3px rgba(217,154,43,.1); }
.domain-card[data-state="warning"] .latency-value { color: #9d6a18; }
.domain-card-actions { display: grid; grid-template-columns: .75fr 1.3fr; gap: 7px; }
.check-button, .visit-button { min-height: 37px; border-radius: 11px; font-size: 10px; font-weight: 750; }
.check-button { color: #345cbd; background: rgba(52,98,214,.09); }
.visit-button { gap: 6px; color: white; background: linear-gradient(106deg, #1878e5, #6b4ee7); box-shadow: 0 8px 16px rgba(58,83,202,.17); }

.empty-state { padding: 52px 24px; border: 1px dashed rgba(91,113,167,.23); border-radius: 26px; background: rgba(255,255,255,.43); text-align: center; }
.empty-orb { width: 58px; height: 58px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 19px; color: #4266dc; background: linear-gradient(145deg, rgba(31,191,231,.14), rgba(117,79,234,.15)); box-shadow: inset 0 1px 0 white; font-size: 25px; }
.empty-state h3 { margin: 0; font-size: 17px; }
.empty-state p { max-width: 480px; margin: 8px auto 18px; color: #78849a; font-size: 11px; line-height: 1.6; }

.admin-page,
.admin-login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(27, 197, 230, .12), transparent 25%),
    radial-gradient(circle at 88% 5%, rgba(116, 78, 234, .11), transparent 24%),
    linear-gradient(145deg, #f8fcff, #f7f7ff);
}

.admin-login-page { position: relative; display: grid; place-items: center; padding: 24px; overflow: hidden; }
.admin-login-glow { position: absolute; width: 440px; height: 440px; border-radius: 50%; background: rgba(89, 104, 237, .1); filter: blur(70px); transform: translate(44%, 24%); pointer-events: none; }
.admin-login-card { position: relative; width: min(100%, 430px); padding: 44px 42px 34px; border: 1px solid rgba(111, 131, 178, .18); border-radius: 30px; background: rgba(255, 255, 255, .82); box-shadow: 0 30px 80px rgba(37, 54, 103, .14); backdrop-filter: blur(24px); }
.admin-login-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 17px; color: white; background: linear-gradient(145deg, #1ba9e6, #6650ec); box-shadow: 0 14px 24px rgba(72, 81, 213, .24); font-size: 25px; font-weight: 800; }
.admin-login-card h1 { margin: 0; color: #111f49; }
.admin-login-card h1 { margin-bottom: 22px; font-size: 28px; }
.admin-form { display: grid; }
.admin-form label { margin: 14px 3px 7px; color: #485672; font-size: 11px; font-weight: 750; }
.admin-form > input, .admin-password-field { width: 100%; min-height: 47px; border: 1px solid rgba(101, 121, 165, .2); border-radius: 13px; color: #18264b; background: rgba(248, 251, 255, .9); font-size: 13px; outline: 0; transition: border-color .18s, box-shadow .18s, background .18s; }
.admin-form > input { padding: 0 14px; }
.admin-form > input:focus, .admin-password-field:focus-within { border-color: rgba(49, 105, 224, .6); background: #fff; box-shadow: 0 0 0 4px rgba(49, 105, 224, .09); }
.admin-password-field { display: flex; align-items: center; padding-right: 7px; }
.admin-password-field input { width: 100%; min-width: 0; padding: 0 7px 0 14px; border: 0; outline: 0; background: transparent; }
.admin-password-field button { padding: 7px; color: #5570a7; background: transparent; font-size: 11px; font-weight: 750; }
.admin-primary-button, .admin-secondary-button { display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 750; }
.admin-primary-button { min-height: 48px; margin-top: 22px; padding: 0 22px; color: white; background: linear-gradient(105deg, #1779e6, #654ce8); box-shadow: 0 12px 24px rgba(65, 80, 207, .21); font-size: 13px; }
.admin-back-link { display: block; margin-top: 20px; color: #64738f; text-align: center; text-decoration: none; font-size: 11px; font-weight: 700; }
.admin-alert { margin: 0 0 18px; padding: 12px 15px; border-radius: 12px; font-size: 12px; line-height: 1.5; }
.admin-alert.error { color: #a33c51; background: rgba(220, 77, 103, .1); }
.admin-alert.success { color: #0b8060; background: rgba(19, 169, 118, .1); }

.admin-container { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 16px 0 48px; }
.admin-header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 1px solid rgba(97, 119, 167, .14); }
.admin-brand { display: flex; align-items: center; gap: 12px; color: #142249; text-decoration: none; }
.admin-brand > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(145deg, #1ba9e6, #6650ec); font-weight: 800; }
.admin-brand strong { font-size: 15px; }
.admin-account { display: flex; align-items: center; gap: 13px; color: #5c6880; font-size: 11px; font-weight: 700; }
.admin-account button { padding: 9px 12px; border: 1px solid rgba(94, 114, 160, .17); border-radius: 10px; color: #596782; background: rgba(255, 255, 255, .65); font-size: 10px; font-weight: 750; }
.admin-panel { padding: 24px; border: 1px solid rgba(104, 124, 168, .16); border-radius: 22px; background: rgba(255, 255, 255, .75); box-shadow: 0 18px 45px rgba(45, 62, 106, .08); backdrop-filter: blur(20px); }
.admin-secondary-button { min-height: 47px; padding: 0 18px; color: #2d5fc7; background: rgba(45, 95, 199, .1); font-size: 11px; }
.admin-empty { padding: 40px; border: 1px dashed rgba(104, 124, 168, .23); border-radius: 18px; color: #8490a5; background: rgba(255, 255, 255, .5); text-align: center; font-size: 12px; }
.admin-compact-panel { margin-top: 18px; padding: 14px 16px; border-radius: 16px; }
.admin-settings-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.admin-settings-row label { color: #33415f; font-size: 11px; font-weight: 800; }
.admin-settings-row input { width: 100%; min-height: 40px; padding: 0 13px; border: 1px solid rgba(101, 121, 165, .18); border-radius: 10px; color: #263553; background: rgba(248, 251, 255, .9); font-size: 12px; outline: 0; }
.admin-settings-row input:focus { border-color: rgba(49, 105, 224, .55); box-shadow: 0 0 0 3px rgba(49, 105, 224, .08); }
.admin-settings-row .admin-secondary-button { min-height: 40px; padding: 0 16px; }
.admin-announcement-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(104, 124, 168, .11); }
.admin-announcement-row label { color: #33415f; font-size: 11px; font-weight: 800; }
.admin-announcement-row textarea { width: 100%; min-height: 48px; resize: vertical; padding: 10px 13px; border: 1px solid rgba(101, 121, 165, .18); border-radius: 10px; color: #263553; background: rgba(248, 251, 255, .9); font: inherit; font-size: 12px; line-height: 1.5; outline: 0; }
.admin-announcement-row textarea:focus { border-color: rgba(49, 105, 224, .55); box-shadow: 0 0 0 3px rgba(49, 105, 224, .08); }
.admin-announcement-row .admin-secondary-button { min-height: 40px; padding: 0 16px; }
.admin-table-panel { margin-top: 18px; overflow: hidden; border: 1px solid rgba(104, 124, 168, .15); border-radius: 17px; background: rgba(255, 255, 255, .78); box-shadow: 0 14px 34px rgba(45, 62, 106, .06); }
.admin-table-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 57px; padding: 10px 18px; border-bottom: 1px solid rgba(104, 124, 168, .12); }
.admin-table-title > div { display: flex; align-items: center; gap: 8px; }
.admin-table-title h2 { margin: 0; color: #18264b; font-size: 15px; }
.admin-table-title > div > span { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 7px; color: #4167c8; background: rgba(65, 103, 200, .09); font-size: 9px; font-weight: 800; }
.admin-table-add { padding: 8px 12px; border-radius: 9px; color: #2f64cc; background: rgba(47, 100, 204, .09); font-size: 10px; font-weight: 800; }
.admin-route-table { display: grid; }
.admin-table-head, .admin-table-row { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(220px, 1fr) minmax(300px, 1.3fr) 90px 112px; align-items: center; gap: 18px; }
.admin-table-head { min-height: 37px; padding: 0 18px; color: #929caf; background: rgba(246, 249, 253, .72); font-size: 9px; font-weight: 750; }
.admin-table-row { min-height: 58px; padding: 10px 18px; border-top: 1px solid rgba(104, 124, 168, .1); }
.admin-table-row:first-of-type { border-top: 0; }
.admin-table-row strong { overflow: hidden; color: #1c2a4d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-table-row code { overflow: hidden; color: #65728b; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.admin-inline-route-form { background: transparent; }
.admin-inline-route-form > input:not([type="hidden"]), .admin-inline-route-form > select { width: 100%; min-width: 0; min-height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; color: #253451; background: transparent; font-size: 10px; outline: 0; transition: border-color .16s, background .16s, box-shadow .16s; }
.admin-inline-route-form > input:not([type="hidden"]):hover, .admin-inline-route-form > select:hover { border-color: rgba(79, 111, 178, .14); background: rgba(246, 249, 255, .72); }
.admin-inline-route-form > input:focus, .admin-inline-route-form > select:focus { border-color: rgba(49, 105, 224, .58); box-shadow: 0 0 0 3px rgba(49, 105, 224, .08); }
.admin-inline-route-form > input[name="name"] { font-size: 12px; font-weight: 750; }
.admin-inline-route-form > input[name="base_url"], .admin-inline-route-form > input[name="health_url"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.admin-inline-route-form > select { cursor: pointer; }
.admin-inline-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.admin-inline-actions button { min-height: 34px; padding: 0 10px; border-radius: 8px; color: #66738b; background: rgba(91, 111, 155, .09); font-size: 9px; font-weight: 800; }
.admin-inline-actions button[type="submit"] { color: white; background: linear-gradient(105deg, #1779e6, #654ce8); }
.admin-inline-actions .admin-delete-button { color: #b7475a; background: rgba(183, 71, 90, .08); }
.admin-top-alert { margin-top: 16px; margin-bottom: 0; }

@keyframes brand-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes halo-spin { to { transform: rotate(360deg); } }
@keyframes aurora-drift { to { transform: translate3d(24px, 18px, 0) scale(1.06); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
@keyframes status-pulse { 50% { transform: scale(.55); opacity: .5; } }
@keyframes skeleton-shimmer { to { transform: translateX(100%); } }

@media (max-width: 1080px) {
  .auth-stage { grid-template-columns: minmax(0, .9fr) minmax(390px, 1fr); gap: 24px; }
  .auth-hero { min-height: 600px; transform: scale(.88); }
  .register-page .auth-stage { grid-template-columns: minmax(0, .75fr) minmax(500px, 1.1fr); }
  .domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .auth-page { position: relative; min-height: 100vh; }
  .auth-stage, .register-page .auth-stage { min-height: auto; grid-template-columns: 1fr; }
  .auth-hero { min-height: 220px; padding: 20px 0 10px; transform: none; }
  .brand-visual { top: -95px; height: 245px; transform: translateX(-50%) scale(.5); }
  .auth-hero-copy { margin-top: 128px; }
  .auth-hero-copy h2 { font-size: 36px; }
  .auth-card, .register-card { max-width: 600px; justify-self: center; }
  .dashboard-shell { width: min(100% - 30px, 680px); padding-top: 30px; }
  .domain-grid { grid-template-columns: 1fr; }
  .admin-table-head { display: none; }
  .admin-table-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; padding: 14px 16px; }
  .admin-table-row strong { font-size: 13px; }
  .admin-table-row code { grid-column: 1; }
  .admin-inline-route-form { grid-template-columns: 1fr; }
  .admin-inline-route-form > input:not([type="hidden"]), .admin-inline-route-form > select, .admin-inline-actions { grid-column: 1; }
  .admin-inline-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .auth-page { padding: 14px; }
  .auth-card, .register-card { padding: 30px 22px 24px; border-radius: 27px; }
  .auth-hero-copy h2 { font-size: 32px; }
  .auth-benefits { gap: 12px; }
  .register-grid { grid-template-columns: 1fr; gap: 0; }
  .admin-container { width: min(100% - 24px, 100%); padding-top: 12px; }
  .admin-header { min-height: 64px; }
  .admin-account > span { display: none; }
  .admin-panel { padding: 18px; }
  .admin-settings-row { grid-template-columns: 1fr auto; }
  .admin-settings-row label { grid-column: 1 / -1; }
  .admin-announcement-row { grid-template-columns: 1fr auto; }
  .admin-announcement-row label { grid-column: 1 / -1; }
  .admin-login-card { padding: 35px 24px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
