:root {
  --xt-orange: #f28c00;
  --xt-orange-dark: #cb6d00;
  --xt-ink: #1d232a;
  --xt-muted: #667085;
  --xt-line: #e6e8ec;
  --xt-bg: #f5f6f8;
  --xt-danger: #c62828;
  --xt-success: #18864b;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.xt-auth-page {
  margin: 0;
  color: var(--xt-ink);
  background:
    radial-gradient(circle at 16% 5%, rgba(242, 140, 0, .16), transparent 34rem),
    linear-gradient(145deg, #fbf8f1 0%, #f3f5f8 55%, #edf1f5 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.xt-auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.xt-auth-card {
  width: min(440px, 100%);
  padding: 36px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 28px 80px rgba(31, 41, 55, .13);
  backdrop-filter: blur(18px);
}
.xt-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.xt-brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--xt-orange); font-weight: 900; }
.xt-brand-name { font-size: 17px; font-weight: 800; }
.xt-brand-sub { margin-top: 2px; color: var(--xt-muted); font-size: 12px; }
.xt-auth-card h1 { margin: 0 0 8px; font-size: 27px; }
.xt-lead { margin: 0 0 26px; color: var(--xt-muted); font-size: 14px; line-height: 1.7; }
.xt-field { display: grid; gap: 8px; margin-bottom: 17px; }
.xt-field label { font-size: 13px; font-weight: 700; }
.xt-input, .xt-select {
  width: 100%; height: 46px; padding: 0 13px; border: 1px solid #d7dce2; border-radius: 10px;
  background: #fff; color: var(--xt-ink); font: inherit; outline: none;
}
.xt-input:focus, .xt-select:focus { border-color: var(--xt-orange); box-shadow: 0 0 0 3px rgba(242,140,0,.12); }
.xt-button {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; cursor: pointer;
  color: #fff; background: var(--xt-orange); font: 700 14px/1 inherit; transition: .18s ease;
}
.xt-button:hover { background: var(--xt-orange-dark); transform: translateY(-1px); }
.xt-button:disabled { opacity: .55; cursor: wait; transform: none; }
.xt-button.secondary { color: var(--xt-ink); background: #eef0f3; }
.xt-button.secondary:hover { background: #e2e5e9; }
.xt-button.danger { background: var(--xt-danger); }
.xt-button.small { min-height: 34px; padding: 0 11px; font-size: 12px; }
.xt-button.full { width: 100%; }
.xt-message { min-height: 20px; margin: 14px 0 0; color: var(--xt-danger); font-size: 13px; line-height: 1.5; }
.xt-message.success { color: var(--xt-success); }
.xt-help { color: var(--xt-muted); font-size: 12px; line-height: 1.65; }

.xt-admin-page { margin: 0; min-height: 100vh; background: var(--xt-bg); color: var(--xt-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.xt-admin-top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px 24px; color: #fff; background: #181c20; box-shadow: 0 2px 16px rgba(0,0,0,.18); }
.xt-admin-top .xt-brand { margin: 0; }
.xt-admin-top .xt-brand-sub { color: #cbd0d6; }
.xt-top-actions { display: flex; align-items: center; gap: 10px; }
.xt-top-actions a { color: #fff; text-decoration: none; }
.xt-admin-main { width: min(1500px, 100%); margin: 0 auto; padding: 24px; }
.xt-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.xt-stat { padding: 19px; border: 1px solid var(--xt-line); border-radius: 14px; background: #fff; }
.xt-stat b { display: block; margin-top: 8px; font-size: 28px; }
.xt-stat span { color: var(--xt-muted); font-size: 12px; }
.xt-panel { margin-bottom: 20px; padding: 20px; border: 1px solid var(--xt-line); border-radius: 14px; background: #fff; }
.xt-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 15px; }
.xt-panel h2 { margin: 0; font-size: 18px; }
.xt-inline-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(210px, 1fr) auto; gap: 10px; }
.xt-tabs { display: flex; gap: 8px; margin-bottom: 15px; }
.xt-tab { padding: 9px 15px; border: 1px solid var(--xt-line); border-radius: 999px; background: #fff; cursor: pointer; }
.xt-tab.active { color: #fff; border-color: var(--xt-orange); background: var(--xt-orange); }
.xt-table-wrap { overflow: auto; border: 1px solid var(--xt-line); border-radius: 11px; }
.xt-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; }
.xt-table th, .xt-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--xt-line); vertical-align: middle; }
.xt-table th { position: sticky; top: 0; color: #4b5563; background: #f8f9fb; font-size: 12px; }
.xt-table tr:last-child td { border-bottom: 0; }
.xt-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.xt-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; background: #edf0f3; font-size: 11px; }
.xt-badge.ok { color: #0f6b3a; background: #e5f6ec; }
.xt-badge.warn { color: #985400; background: #fff0d8; }
.xt-badge.bad { color: #a32020; background: #fde8e8; }
.xt-empty { padding: 34px; color: var(--xt-muted); text-align: center; }
.xt-loading { opacity: .58; pointer-events: none; }

.xt-account-widget {
  position: fixed; right: 16px; top: 14px; z-index: 2147483000; display: flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 5px 6px 5px 12px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
  color: #20252a; background: rgba(255,255,255,.93); box-shadow: 0 6px 24px rgba(0,0,0,.17);
  font: 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; backdrop-filter: blur(12px);
}
.xt-account-widget a, .xt-account-widget button { padding: 7px 9px; border: 0; border-radius: 999px; color: inherit; background: #eceff2; font: inherit; text-decoration: none; cursor: pointer; }
.xt-account-widget button:hover, .xt-account-widget a:hover { background: #dfe3e7; }

@media (max-width: 860px) {
  .xt-stat-grid { grid-template-columns: 1fr 1fr; }
  .xt-inline-form { grid-template-columns: 1fr; }
  .xt-admin-main { padding: 14px; }
}
@media (max-width: 520px) {
  .xt-auth-shell { padding: 14px; }
  .xt-auth-card { padding: 25px 20px; }
  .xt-stat-grid { grid-template-columns: 1fr; }
  .xt-account-widget { right: 8px; top: 8px; }
  .xt-account-name { display: none; }
}

/* Login experience ------------------------------------------------------- */
body.xt-login-page {
  --xt-orange: #ff7f00;
  --xt-orange-dark: #de6e00;
  --xt-paper: #fffdf9;
  --xt-paper-warm: #f4efe3;
  --xt-ink: #2a2926;
  --xt-ink-soft: #5c584f;
  --xt-muted: #8e897e;
  --xt-line: #eae4d7;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 127, 0, .15), transparent 31rem),
    radial-gradient(circle at 92% 88%, rgba(183, 154, 106, .12), transparent 30rem),
    var(--xt-paper);
}

body.xt-login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 98, 54, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 98, 54, .035) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, .35) 58%, transparent);
  mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, .35) 58%, transparent);
}

.xt-login-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: 24px;
}

.xt-login-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
  width: min(1180px, 100%);
  min-height: clamp(624px, calc(100svh - 48px), 736px);
  overflow: hidden;
  border: 1px solid rgba(220, 212, 197, .78);
  border-radius: 28px;
  background: #fff;
  box-shadow:
    0 35px 90px -42px rgba(88, 67, 31, .35),
    0 10px 28px -18px rgba(88, 67, 31, .2);
}

.xt-login-visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--xt-ink);
  background:
    radial-gradient(circle at 74% 59%, rgba(255, 127, 0, .18), transparent 28%),
    linear-gradient(145deg, #fbf7ef 0%, #f3ecdd 100%);
}

.xt-login-visual::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, rgba(201, 145, 42, .32) 20%, rgba(201, 145, 42, .32) 80%, transparent);
}

.xt-login-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 105px;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(240, 231, 213, .94));
}

.xt-visual-grid {
  position: absolute;
  inset: 0;
  opacity: .78;
  background-image:
    linear-gradient(rgba(122, 98, 54, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 98, 54, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(circle at 68% 58%, #000 0, transparent 72%);
  mask-image: radial-gradient(circle at 68% 58%, #000 0, transparent 72%);
}

.xt-coordinate {
  position: absolute;
  z-index: 2;
  color: #9c9383;
  font: 500 9px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .12em;
}

.xt-coordinate-top { top: 34px; right: 35px; }
.xt-coordinate-side {
  right: -51px;
  bottom: 182px;
  transform: rotate(-90deg);
}

.xt-visual-brand {
  position: absolute;
  top: 36px;
  left: 42px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 15px;
}

.xt-visual-brand img {
  display: block;
  width: 126px;
  height: auto;
}

.xt-visual-brand span {
  padding-left: 15px;
  border-left: 1px solid #d6cdbb;
  color: #746e64;
  font-size: 11px;
  letter-spacing: .08em;
}

.xt-visual-copy {
  position: absolute;
  top: 25%;
  left: 42px;
  z-index: 4;
  width: min(390px, calc(100% - 84px));
}

.xt-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #bd6a16;
  font: 700 10px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .14em;
}

.xt-eyebrow span { width: 26px; height: 2px; background: var(--xt-orange); }

.xt-visual-copy h2 {
  margin: 18px 0 0;
  color: var(--xt-ink);
  font-size: clamp(31px, 3vw, 45px);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -.035em;
}

.xt-visual-copy h2::first-line { color: #191816; }

.xt-visual-copy p {
  max-width: 290px;
  margin: 18px 0 0;
  color: var(--xt-ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.xt-station-art {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  width: min(60%, 390px);
  height: auto;
  filter: drop-shadow(0 30px 26px rgba(71, 53, 24, .2));
  transform: translateX(-50%);
  user-select: none;
}

.xt-signal-orbit {
  position: absolute;
  left: 50%;
  bottom: 92px;
  z-index: 1;
  width: 64%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 127, 0, .2);
  border-radius: 50%;
  transform: translateX(-50%);
}

.xt-signal-orbit::before,
.xt-signal-orbit::after,
.xt-signal-orbit i {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 127, 0, .16);
  border-radius: 50%;
}

.xt-signal-orbit::before { inset: 12%; }
.xt-signal-orbit::after { inset: 25%; }
.xt-signal-orbit i:nth-child(1) { inset: 38%; background: rgba(255, 127, 0, .07); }
.xt-signal-orbit i:nth-child(2) {
  top: 6%;
  left: 49.5%;
  width: 5px;
  height: 5px;
  border: 0;
  background: var(--xt-orange);
  box-shadow: 0 0 0 6px rgba(255, 127, 0, .09);
}
.xt-signal-orbit i:nth-child(3) {
  right: 8%;
  bottom: 30%;
  width: 4px;
  height: 4px;
  border: 0;
  background: #c9912a;
  box-shadow: 0 0 0 5px rgba(201, 145, 42, .1);
}

.xt-capabilities {
  position: absolute;
  left: 42px;
  bottom: 35px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 400px;
}

.xt-capabilities span {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(220, 212, 197, .9);
  border-radius: 999px;
  color: #5d574e;
  background: rgba(255, 253, 249, .84);
  box-shadow: 0 8px 18px -15px rgba(94, 70, 30, .32);
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.xt-capabilities b {
  margin-right: 5px;
  color: var(--xt-orange-dark);
  font: 700 9px/1 "SFMono-Regular", Consolas, monospace;
}

.xt-login-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  min-width: 0;
  padding: clamp(40px, 5.1vw, 68px);
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.xt-mobile-brand { display: none; }

.xt-access-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  min-height: 28px;
  margin-bottom: 25px;
  padding: 0 10px;
  border: 1px solid var(--xt-line);
  border-radius: 999px;
  color: #7f786c;
  background: #fffdf9;
  font: 700 9px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .11em;
}

.xt-access-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xt-orange);
  box-shadow: 0 0 0 4px rgba(255, 127, 0, .1);
}

.xt-access-tag span {
  margin-left: 3px;
  padding-left: 9px;
  border-left: 1px solid var(--xt-line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  font-weight: 600;
  letter-spacing: .08em;
}

.xt-login-card h1 {
  margin: 0;
  color: var(--xt-ink);
  font-size: clamp(31px, 3vw, 40px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.xt-login-card > .xt-lead {
  max-width: 370px;
  margin: 13px 0 29px;
  color: #777167;
  font-size: 13.5px;
  line-height: 1.75;
}

.xt-login-card form { width: 100%; }

.xt-login-card .xt-field {
  gap: 9px;
  margin-bottom: 17px;
}

.xt-login-card .xt-field label {
  color: #4e4a43;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.xt-input-wrap { position: relative; }

.xt-input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 2;
  width: 18px;
  height: 18px;
  color: #a39c90;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.xt-login-card .xt-input {
  height: 51px;
  padding: 0 47px;
  border: 1px solid #ddd7cc;
  border-radius: 12px;
  color: var(--xt-ink);
  background: #fffefb;
  font-size: 14px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.xt-login-card .xt-input::placeholder { color: #b4ada1; }

.xt-login-card .xt-input:hover { border-color: #c8c0b2; }

.xt-login-card .xt-input:focus {
  border-color: var(--xt-orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 127, 0, .1);
}

.xt-input-wrap:focus-within > svg { color: var(--xt-orange-dark); }

.xt-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #9c958a;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: .16s ease;
}

.xt-password-toggle:hover { color: var(--xt-orange-dark); background: var(--xt-orange-wash, #fff0dd); }

.xt-password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.xt-password-toggle[aria-pressed="true"] svg { opacity: .55; }

.xt-login-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 51px;
  margin-top: 25px;
  padding: 0 18px 0 22px;
  border-radius: 12px;
  background: var(--xt-orange);
  box-shadow: 0 15px 30px -17px rgba(222, 110, 0, .75);
  font-size: 14px;
  letter-spacing: .06em;
}

.xt-login-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.xt-login-button:hover { background: var(--xt-orange-dark); box-shadow: 0 18px 34px -17px rgba(222, 110, 0, .9); }
.xt-login-button:hover svg { transform: translateX(3px); }
.xt-login-button.is-loading svg { animation: xt-pulse-arrow 1s ease-in-out infinite alternate; }
@keyframes xt-pulse-arrow { to { transform: translateX(4px); opacity: .35; } }

.xt-login-card .xt-message {
  min-height: 19px;
  margin: 10px 0 0;
  font-size: 12px;
}

.xt-security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid #eee9df;
  border-radius: 11px;
  background: #faf8f3;
}

.xt-security-note svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: #9d8460;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.xt-security-note p {
  margin: 0;
  color: #827b70;
  font-size: 11px;
  line-height: 1.62;
}

.xt-login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid #f0ece4;
  color: #9b9489;
  font-size: 9px;
}

.xt-login-footer span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.xt-login-footer span i { width: 6px; height: 6px; border-radius: 50%; background: #62a878; box-shadow: 0 0 0 3px rgba(98, 168, 120, .1); }
.xt-login-footer em { font: 500 8px/1 "SFMono-Regular", Consolas, monospace; font-style: normal; letter-spacing: .09em; }

@media (max-width: 980px) {
  .xt-login-stage { grid-template-columns: minmax(0, .88fr) minmax(420px, 1.12fr); }
  .xt-visual-brand { left: 32px; }
  .xt-visual-copy { left: 32px; width: calc(100% - 64px); }
  .xt-visual-copy h2 { font-size: 33px; }
  .xt-visual-copy p { max-width: 240px; }
  .xt-capabilities { left: 32px; right: 24px; }
  .xt-station-art { right: auto; width: min(66%, 360px); opacity: .94; }
}

@media (max-width: 780px) {
  body.xt-login-page { overflow: auto; }
  body.xt-login-page::before { -webkit-mask-image: none; mask-image: none; opacity: .65; }
  .xt-login-shell { padding: 18px; }
  .xt-login-stage {
    display: block;
    width: min(480px, 100%);
    min-height: 0;
    border-radius: 24px;
  }
  .xt-login-visual { display: none; }
  .xt-login-card { padding: 40px 38px 32px; }
  .xt-mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 34px;
  }
  .xt-mobile-brand img { display: block; width: 115px; height: auto; }
  .xt-mobile-brand span { padding-left: 13px; border-left: 1px solid var(--xt-line); color: #827b70; font-size: 10px; line-height: 1.45; letter-spacing: .06em; }
}

@media (max-width: 520px) {
  .xt-login-shell { align-items: flex-start; padding: 0; }
  .xt-login-stage {
    width: 100%;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .xt-login-card { min-height: 100svh; padding: 30px 24px 24px; }
  .xt-mobile-brand { margin-bottom: 30px; }
  .xt-access-tag { margin-bottom: 21px; }
  .xt-login-card > .xt-lead { margin-bottom: 25px; }
  .xt-login-footer em { display: none; }
}

@media (max-height: 760px) and (min-width: 781px) {
  .xt-login-shell { padding: 16px; }
  .xt-login-stage { min-height: calc(100svh - 32px); }
  .xt-login-card { padding-top: 28px; padding-bottom: 28px; }
  .xt-access-tag { margin-bottom: 17px; }
  .xt-login-card > .xt-lead { margin-bottom: 20px; }
  .xt-login-card .xt-field { margin-bottom: 12px; }
  .xt-login-button { margin-top: 17px; }
  .xt-security-note { padding-top: 10px; padding-bottom: 10px; }
  .xt-login-footer { margin-top: 13px; padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .xt-login-page *, .xt-login-page *::before, .xt-login-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
