/* Pixl panel. Brand: teal badge, coral pixel, cream text on deep sea green. */

:root {
  --bg: #071216;
  --bg2: #0b1d23;
  --deep: #06252e;
  --teal: #0e5e66;
  --aqua: #19a7a0;
  --mint: #6ef0c8;
  --coral: #ff8f6b;
  --coral2: #ffb38f;
  --cream: #fff4e8;
  --text: #e9f6f2;
  --muted: #8fb3b3;
  --dim: #5f8486;
  --line: rgba(110, 240, 200, 0.09);
  --line2: rgba(110, 240, 200, 0.16);
  --glass: rgba(12, 34, 40, 0.62);
  --glass2: rgba(16, 44, 51, 0.72);
  --ok: #6ef0c8;
  --warn: #ffd27a;
  --bad: #ff6b6b;
  --off: #8fb3b3;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.65);
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
::selection { background: rgba(255, 143, 107, 0.35); }

/* ── background ─────────────────────────────────────────────────── */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(25, 167, 160, 0.28), transparent 60%),
    radial-gradient(700px 500px at -5% 20%, rgba(14, 94, 102, 0.35), transparent 60%),
    radial-gradient(600px 420px at 20% 105%, rgba(255, 143, 107, 0.13), transparent 60%),
    linear-gradient(180deg, #081a1f 0%, var(--bg) 55%);
}
.bg-fx::before {
  /* pixel grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(110, 240, 200, 0.11) 1px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-fx::after {
  /* a few lit pixels */
  content: "";
  position: absolute;
  top: 120px;
  left: 12%;
  width: 8px;
  height: 8px;
  background: var(--coral);
  transform: rotate(45deg);
  box-shadow: 340px 60px 0 -1px rgba(110, 240, 200, 0.7), 820px -40px 0 -2px rgba(255, 179, 143, 0.6), 1100px 220px 0 -1px rgba(110, 240, 200, 0.45), 160px 380px 0 -2px rgba(255, 143, 107, 0.5);
  opacity: 0.8;
  animation: twinkle 6s ease-in-out infinite;
}
@keyframes twinkle { 50% { opacity: 0.35; } }

/* ── glass ──────────────────────────────────────────────────────── */

.glass {
  background: linear-gradient(180deg, var(--glass2), var(--glass));
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card {
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head h3 { margin: 0; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card-head h3 .ico { color: var(--mint); }
.card-head .sub { color: var(--muted); font-size: 13px; }

/* ── nav ────────────────────────────────────────────────────────── */

.nav-wrap {
  position: sticky;
  top: 14px;
  z-index: 50;
  padding: 0 16px;
}
.nav {
  max-width: 1240px;
  margin: 0 auto;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 10px 0 10px;
  padding-inline-start: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: 0.3px; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(110, 240, 200, 0.25), 0 6px 18px -6px rgba(25, 167, 160, 0.8); }
.brand span { font-family: var(--font); background: linear-gradient(90deg, var(--cream), var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.nav-links a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a .ico { width: 16px; height: 16px; }
.nav-links a:hover { color: var(--text); background: rgba(110, 240, 200, 0.06); }
.nav-links a.active { color: var(--bg); background: linear-gradient(135deg, var(--mint), var(--aqua)); font-weight: 600; }
.nav-end { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.me {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  background: var(--deep);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}
.me img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn.nav-menu { display: none; }

@media (max-width: 1080px) {
  .nav-links a span { display: none; }
  .nav-links a { padding: 9px 11px; }
}
@media (max-width: 760px) {
  .nav { height: 58px; gap: 8px; }
  .icon-btn.nav-menu { display: grid; }
  .nav-new span { display: none; }
  .nav-new { padding: 0; width: 40px; justify-content: center; }
  .nav-links {
    position: absolute;
    top: 66px;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border-radius: var(--radius);
    background: rgba(9, 26, 31, 0.97);
    border: 1px solid var(--line2);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a span { display: inline; }
  .nav-links a { padding: 11px 14px; border-radius: 12px; }
}

/* ── layout ─────────────────────────────────────────────────────── */

.view {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 16px 40px;
  min-height: calc(100vh - 160px);
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 960px) { .g2, .g3, .g-main { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 18px; }
.section { margin-top: 46px; }
.label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
}
.label b { font-family: var(--mono); color: var(--coral); font-weight: 500; }
.label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to left, transparent, var(--line2)); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 16px 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.foot img { width: 22px; height: 22px; border-radius: 50%; opacity: 0.8; }

/* ── hero ───────────────────────────────────────────────────────── */

.hero { text-align: center; padding: 34px 0 10px; position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(14, 94, 102, 0.25);
  color: var(--mint);
  font-size: 13px;
  font-weight: 500;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(110, 240, 200, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(110, 240, 200, 0); } 100% { box-shadow: 0 0 0 0 rgba(110, 240, 200, 0); } }
.hero h1 {
  font-size: clamp(36px, 6.4vw, 72px);
  line-height: 1.15;
  margin: 22px auto 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
  max-width: 900px;
}
.grad {
  background: linear-gradient(100deg, var(--mint) 0%, var(--aqua) 45%, var(--coral2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 620px; margin: 0 auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* stats row */
.stats {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { padding: 24px 22px; position: relative; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat .num { font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; line-height: 1.1; font-family: var(--font); }
.stat .num small { font-size: 0.45em; color: var(--muted); font-weight: 500; margin-inline-start: 6px; }
.stat .cap { color: var(--muted); font-size: 13.5px; margin-top: 6px; display: flex; align-items: center; gap: 7px; }
.stat .cap .ico { width: 15px; height: 15px; color: var(--aqua); }
.stat.hot .num { color: var(--coral2); }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* alerts */
.alerts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 14px;
  border: 1px solid;
  background: rgba(255, 210, 122, 0.06);
  border-color: rgba(255, 210, 122, 0.22);
  color: #ffe2a8;
}
.alert.bad { background: rgba(255, 107, 107, 0.07); border-color: rgba(255, 107, 107, 0.28); color: #ffb4b4; }
.alert.ok { background: rgba(110, 240, 200, 0.06); border-color: rgba(110, 240, 200, 0.22); color: var(--mint); }
.alert .ico { width: 17px; height: 17px; flex-shrink: 0; }
a.alert:hover { filter: brightness(1.15); }

/* ── type cards ─────────────────────────────────────────────────── */

.types { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1080px) { .types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.type-card {
  border-radius: 20px;
  padding: 18px;
  transition: transform 0.25s, border-color 0.25s;
  overflow: hidden;
}
.type-card:hover { transform: translateY(-3px); border-color: var(--line2); }
.type-card::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  inset-inline-end: -40px;
  top: -40px;
  border-radius: 50%;
  background: var(--tc);
  opacity: 0.14;
  filter: blur(18px);
}
.type-card .t-name { color: var(--muted); font-size: 13.5px; margin-top: 14px; }
.type-card .t-num { font-size: 32px; font-weight: 700; line-height: 1.1; margin-top: 2px; }
.type-card .t-meta { display: flex; gap: 12px; color: var(--dim); font-size: 12.5px; margin-top: 8px; }
.tile {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--tc);
  background: color-mix(in srgb, var(--tc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc) 26%, transparent);
  flex-shrink: 0;
}
.tile .ico { width: 20px; height: 20px; }
.tile.lg { width: 64px; height: 64px; border-radius: 19px; }
.tile.lg .ico { width: 30px; height: 30px; }
.tile.sm { width: 34px; height: 34px; border-radius: 11px; }
.tile.sm .ico { width: 17px; height: 17px; }

.t-system { --tc: #19a7a0; }
.t-res { --tc: #ffb38f; }
.t-protection { --tc: #6ef0c8; }
.t-temp { --tc: #8ec5ff; }
.t-ticket { --tc: #ff8f6b; }
.t-music { --tc: #d2a8ff; }

/* ── list rows (ranked, like a chart) ───────────────────────────── */

.rank { display: flex; flex-direction: column; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 8px;
  border-radius: 14px;
  transition: background 0.2s;
}
.rank-row + .rank-row { border-top: 1px solid var(--line); }
a.rank-row:hover { background: rgba(110, 240, 200, 0.04); }
.rank-n { font-family: var(--mono); color: var(--dim); font-size: 15px; width: 26px; text-align: center; flex-shrink: 0; }
.rank-row:first-child .rank-n { color: var(--coral); }
.rank-main { flex: 1; min-width: 0; }
.rank-main .t1 { font-weight: 600; font-size: 14.5px; }
.rank-main .t2 { color: var(--muted); font-size: 12.5px; }
.rank-end { text-align: end; flex-shrink: 0; font-size: 13px; }

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--deep);
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.avatar.sq { border-radius: 11px; }
.avatar.sm { width: 26px; height: 26px; }
.avatar.lg { width: 48px; height: 48px; }
.avatar.ph { display: grid; place-items: center; color: var(--muted); font-weight: 600; font-size: 14px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: rgba(143, 179, 179, 0.1);
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill.type { color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent); }
.pill.soon { color: var(--warn); background: rgba(255, 210, 122, 0.1); }
.pill.late { color: var(--bad); background: rgba(255, 107, 107, 0.1); }
.pill.good { color: var(--mint); background: rgba(110, 240, 200, 0.1); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--off); flex-shrink: 0; display: inline-block; }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.s-ok .dot { background: var(--ok); box-shadow: 0 0 10px rgba(110, 240, 200, 0.8); }
.s-ok { color: var(--mint); }
.s-bad .dot { background: var(--bad); box-shadow: 0 0 10px rgba(255, 107, 107, 0.7); }
.s-bad { color: #ffb4b4; }
.s-warn .dot { background: var(--warn); }
.s-warn { color: var(--warn); }
.s-off { color: var(--muted); }
.s-end .dot { background: #3d5a5c; }
.s-end { color: var(--dim); }

/* ── buttons & inputs ───────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(110, 240, 200, 0.05);
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform 0.15s, filter 0.2s, background 0.2s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: rgba(110, 240, 200, 0.1); border-color: rgba(110, 240, 200, 0.3); }
.btn:active { transform: scale(0.97); }
.btn .ico { width: 17px; height: 17px; }
.btn.primary {
  border: 0;
  color: #2a0f05;
  background: linear-gradient(135deg, var(--coral2), var(--coral));
  box-shadow: 0 10px 26px -10px rgba(255, 143, 107, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.mint { border: 0; color: #032521; background: linear-gradient(135deg, var(--mint), var(--aqua)); box-shadow: 0 10px 26px -12px rgba(110, 240, 200, 0.7); }
.btn.danger { color: #ffb4b4; border-color: rgba(255, 107, 107, 0.3); background: rgba(255, 107, 107, 0.07); }
.btn.danger:hover { background: rgba(255, 107, 107, 0.15); border-color: rgba(255, 107, 107, 0.5); }
.btn.danger.solid { color: #fff; background: linear-gradient(135deg, #ff7b7b, #e04848); border: 0; }
.btn.ghost { background: transparent; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn.xs { height: 30px; padding: 0 11px; font-size: 12.5px; gap: 6px; }
.btn.xs .ico { width: 14px; height: 14px; }
.btn[disabled], .btn.busy { opacity: 0.5; pointer-events: none; }
.btn.busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
}
.icon-btn:hover { color: var(--text); background: rgba(110, 240, 200, 0.07); }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .ico { width: 15px; height: 15px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.field > small { color: var(--dim); font-size: 12.5px; }
.input, .textarea, .select {
  width: 100%;
  height: 46px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line2);
  background: rgba(4, 16, 20, 0.6);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 15px; resize: vertical; font-family: var(--mono); font-size: 13px; direction: ltr; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(25, 167, 160, 0.16); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input.ltr { direction: ltr; text-align: left; font-family: var(--mono); font-size: 14px; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.search { position: relative; flex: 1; min-width: 220px; }
.search .ico { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--dim); }
.search .input { padding-inline-start: 44px; border-radius: 999px; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(110, 240, 200, 0.03);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--line2); }
.chip.on { color: var(--bg); background: var(--mint); border-color: var(--mint); font-weight: 600; }
.chip .n { font-family: var(--mono); font-size: 12px; opacity: 0.75; }
.chip .ico { width: 15px; height: 15px; }
.chip.t-chip.on { background: var(--tc); border-color: var(--tc); }

/* ── page head ──────────────────────────────────────────────────── */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; font-weight: 700; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .count { font-family: var(--mono); font-size: 0.5em; color: var(--coral); vertical-align: middle; margin-inline-start: 8px; }
.back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--text); }
.back .ico { width: 16px; height: 16px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

/* ── subscription list ──────────────────────────────────────────── */

.sub-list { padding: 8px; }
.sub-row {
  display: grid;
  grid-template-columns: 44px minmax(110px, 0.8fr) minmax(150px, 1.3fr) minmax(130px, 1.2fr) 110px minmax(120px, 0.9fr) 20px;
  gap: 14px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 16px;
  transition: background 0.2s;
}
.sub-row + .sub-row { border-top: 1px solid var(--line); }
.sub-row:hover { background: rgba(110, 240, 200, 0.045); }
.sub-row .code { font-family: var(--mono); font-weight: 500; font-size: 14px; }
.sub-row .tl { color: var(--muted); font-size: 12.5px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .nm { font-size: 14px; font-weight: 500; min-width: 0; }
.who .id { font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.sub-row .chev { color: var(--dim); width: 16px; height: 16px; transform: scaleX(-1); }
.sub-head { color: var(--dim); font-size: 12.5px; padding: 6px 12px 10px; }
.sub-head:hover { background: none; }
@media (max-width: 960px) {
  .sub-head { display: none; }
  .sub-row { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "ic code state" "ic owner left" "ic guild guild"; row-gap: 6px; }
  .sub-row > :nth-child(1) { grid-area: ic; align-self: start; }
  .sub-row > :nth-child(2) { grid-area: code; }
  .sub-row > :nth-child(3) { grid-area: owner; }
  .sub-row > :nth-child(4) { grid-area: guild; }
  .sub-row > :nth-child(5) { grid-area: state; justify-self: end; }
  .sub-row > :nth-child(6) { grid-area: left; justify-self: end; text-align: end; }
  .sub-row > :nth-child(7) { display: none; }
}
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .ico { width: 40px; height: 40px; color: var(--dim); margin: 0 auto 10px; display: block; }

/* ── sub detail ─────────────────────────────────────────────────── */

.d-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.d-hero h1 { margin: 0; font-family: var(--mono); font-size: clamp(28px, 4vw, 40px); font-weight: 500; line-height: 1.1; direction: ltr; }
.d-hero .d-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.d-left { margin-inline-start: auto; text-align: end; }
.d-left .big { font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.15; }
.d-left .small { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .d-left { margin-inline-start: 0; text-align: start; width: 100%; } }

.timebar { height: 8px; border-radius: 999px; background: rgba(143, 179, 179, 0.12); overflow: hidden; margin-top: 18px; }
.timebar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--mint)); width: 0; transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.timebar.low > i { background: linear-gradient(90deg, var(--bad), var(--coral)); }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 20px; }
.kv-item { padding: 14px 16px; border-radius: 16px; background: rgba(4, 16, 20, 0.45); border: 1px solid var(--line); min-width: 0; }
.kv-item .k { color: var(--dim); font-size: 12.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.kv-item .k .ico { width: 14px; height: 14px; }
.kv-item .v { font-weight: 500; display: flex; align-items: center; gap: 10px; min-width: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .sep { width: 1px; background: var(--line2); margin: 4px 4px; }

.copy { cursor: pointer; border: 0; background: none; color: var(--dim); padding: 2px; display: inline-grid; place-items: center; border-radius: 6px; }
.copy:hover { color: var(--mint); }
.copy .ico { width: 14px; height: 14px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.metric { padding: 12px; border-radius: 14px; background: rgba(4, 16, 20, 0.45); border: 1px solid var(--line); text-align: center; }
.metric b { display: block; font-size: 19px; font-weight: 600; }
.metric span { color: var(--dim); font-size: 12px; }
@media (max-width: 520px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.bot-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; }
.bot-row + .bot-row { border-top: 1px solid var(--line); }
.bot-row .grow { flex: 1; min-width: 0; }

.timeline { position: relative; padding-inline-start: 20px; max-height: 520px; overflow: auto; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line2); }
.ev { position: relative; padding: 0 0 16px; }
.ev::before { content: ""; position: absolute; inset-inline-start: -19px; top: 7px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--teal); border: 1px solid var(--aqua); }
.ev:first-child::before { background: var(--coral); border-color: var(--coral2); }
.ev .t1 { font-weight: 500; font-size: 14px; }
.ev .t2 { color: var(--muted); font-size: 12.5px; word-break: break-word; }
.ev .t3 { color: var(--dim); font-size: 12px; }

.logs {
  background: #03100f;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  max-height: 460px;
  overflow: auto;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  color: #bfe9dc;
  margin: 0;
}
.logs.err { color: #ffc2b0; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(4, 16, 20, 0.55); border: 1px solid var(--line); }
.tabs button { border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500; }
.tabs button.on { background: var(--glass2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }

/* ── new sub ────────────────────────────────────────────────────── */

.type-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .type-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.type-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(4, 16, 20, 0.4);
  cursor: pointer;
  transition: all 0.2s;
  text-align: start;
}
.type-opt:hover { border-color: var(--line2); }
.type-opt.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 15%, transparent); }
.type-opt b { display: block; font-weight: 600; font-size: 14.5px; }
.type-opt small { color: var(--dim); font-size: 12px; }

/* ── bars, tables ───────────────────────────────────────────────── */

.meter { margin-top: 6px; }
.meter .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.meter .row b { color: var(--text); font-weight: 600; }
.bar { height: 10px; border-radius: 999px; background: rgba(143, 179, 179, 0.12); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--aqua), var(--mint)); transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bar.hot > i { background: linear-gradient(90deg, var(--coral), var(--warn)); }
.meter + .meter { margin-top: 16px; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; color: var(--dim); font-weight: 500; font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(110, 240, 200, 0.03); }
.tbl .num { font-family: var(--mono); font-size: 13px; direction: ltr; text-align: end; }

.result { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(110, 240, 200, 0.06); border: 1px solid rgba(110, 240, 200, 0.2); font-size: 14px; }
.result.bad { background: rgba(255, 107, 107, 0.06); border-color: rgba(255, 107, 107, 0.25); }

.joblog { margin-top: 14px; }
.upd-row { display: flex; align-items: center; gap: 14px; padding: 14px 8px; flex-wrap: wrap; }
.upd-row + .upd-row { border-top: 1px solid var(--line); }
.upd-row .grow { flex: 1; min-width: 180px; }
.upd-row .t1 { font-weight: 600; }
.upd-row .t2 { color: var(--muted); font-size: 13px; }

/* ── modal & toasts ─────────────────────────────────────────────── */

.modal-root:empty { display: none; }
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 10, 12, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
  animation: fade 0.2s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(180deg, #10303a, #0a1f25);
  border: 1px solid var(--line2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  animation: pop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1.1);
}
@keyframes pop { from { transform: scale(0.95) translateY(8px); opacity: 0; } }
.modal h3 { margin: 0 0 6px; font-size: 20px; }
.modal .desc { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.modal .foot-btns { display: flex; gap: 10px; justify-content: flex-start; margin-top: 22px; flex-wrap: wrap; }
.preview { margin-top: 12px; padding: 14px; border-radius: 14px; background: rgba(4, 16, 20, 0.5); border: 1px solid var(--line); font-size: 14px; min-height: 52px; }
.preview .arrow { color: var(--coral); margin: 0 6px; }

.toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 260px;
  max-width: 420px;
  padding: 13px 16px;
  border-radius: 16px;
  background: #0f2b32;
  border: 1px solid var(--line2);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: slide 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--mint); }
.toast.bad { border-color: rgba(255, 107, 107, 0.35); }
.toast.bad .ico { color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all 0.3s; }
@keyframes slide { from { opacity: 0; transform: translateY(14px); } }

/* ── login / center pages ───────────────────────────────────────── */

.center-page { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.login-card { width: min(460px, 100%); text-align: center; padding: 38px 30px; }
.login-card h2 { margin: 18px 0 8px; font-size: 26px; }
.login-card p { margin: 0 0 22px; }
.logo-lg { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto; box-shadow: 0 0 0 1px rgba(110, 240, 200, 0.25), 0 18px 50px -12px rgba(25, 167, 160, 0.8); }
.cmd { display: inline-block; font-family: var(--mono); background: rgba(4, 16, 20, 0.6); border: 1px solid var(--line2); color: var(--coral2); border-radius: 8px; padding: 1px 9px; direction: ltr; }
.steps { text-align: start; margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 14px; }
.steps li b { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(25, 167, 160, 0.16); color: var(--mint); font-family: var(--mono); font-weight: 500; flex-shrink: 0; }

.skeleton { border-radius: var(--radius); height: 140px; background: linear-gradient(90deg, rgba(110, 240, 200, 0.03), rgba(110, 240, 200, 0.07), rgba(110, 240, 200, 0.03)); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

.ico { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.mt { margin-top: 18px; }
.spacer { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
