:root {
  --bg: #050b18;
  --bg-elev: #0a1224;
  --card: rgba(10, 18, 36, .82);
  --card-solid: #0c1528;
  --line: rgba(80, 170, 255, .12);
  --line-strong: rgba(80, 170, 255, .28);
  --text: #eef4ff;
  --muted: #8b9bb8;
  --accent: #22d3ee;
  --accent2: #a78bfa;
  --ok: #4ade80;
  --warn: #fb923c;
  --danger: #f87171;
  --gold: #fbbf24;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --purple: #a78bfa;
  --orange: #fb923c;
  --green: #4ade80;
  --pink: #f472b6;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --font: "Outfit", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Outfit", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 8% -10%, rgba(34, 211, 238, .16), transparent 58%),
    radial-gradient(720px 420px at 96% 0%, rgba(167, 139, 250, .14), transparent 55%),
    radial-gradient(640px 380px at 50% 110%, rgba(45, 212, 191, .08), transparent 60%),
    linear-gradient(165deg, #040914 0%, #07111f 46%, #050b16 100%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(80, 170, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 170, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#login-container, #login, #app-shell, #app, .wrap, .toast, .modal-bg { position: relative; z-index: 1; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .9rem; }
.tiny { font-size: .78rem; color: var(--muted); }
.link { color: #7dd3fc; text-align: none; text-decoration: none; }
.link:hover { text-decoration: underline; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); }
  50% { opacity: .7; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.glass, .login-card, .panel, .stat, .topbar, .top {
  background: var(--card);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 12px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.04em;
  color: #041018;
  background: linear-gradient(135deg, #22d3ee, #818cf8 55%, #c084fc);
  box-shadow: 0 0 22px rgba(34, 211, 238, .35);
}
.brand-text h1, .brand-text h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: .01em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.brand-text .sub { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  animation: pulseDot 1.8s ease-in-out infinite;
  display: inline-block;
}

.btn {
  appearance: none; border: 0; border-radius: 11px;
  padding: 10px 15px; cursor: pointer; font-weight: 700;
  letter-spacing: .01em;
  background: linear-gradient(135deg, #22d3ee, #818cf8 60%, #c084fc);
  color: #041018;
  transition: filter .15s, transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(34, 211, 238, .28); }
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  box-shadow: none;
}
.btn.secondary:hover { border-color: var(--line-strong); filter: none; background: rgba(255,255,255,.08); }
.btn.danger { background: linear-gradient(135deg, #f43f5e, #be123c); color: #fff; }
.btn.ok { background: linear-gradient(135deg, #14b8a6, #0d9488); color: #fff; }
.btn.block { width: 100%; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  box-shadow: none;
}

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .86rem; }
.mark-red, .field label.mark-red, .hint.mark-red, .tiny.mark-red {
  color: #ef4444;
  font-weight: 700;
}
.stat.mark-stat-red { --stat-accent: #ef4444; }
.stat.mark-stat-red h3,
.stat.mark-stat-red .n { color: #ef4444 !important; }
.field input, .field select, .field textarea,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.32);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
input:focus, select:focus, textarea:focus {
  border-color: rgba(34, 211, 238, .55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .14);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(34, 211, 238, .14); color: #67e8f9;
  font-size: .75rem; font-weight: 600;
}
.pill.green { background: rgba(74,222,128,.16); color: #86efac; }
.pill.red { background: rgba(248,113,113,.16); color: #fca5a5; }
.pill.gray { background: rgba(148,163,184,.16); color: #cbd5e1; }
.pill.orange { background: rgba(251,146,60,.16); color: #fdba74; }
.pill.purple { background: rgba(167,139,250,.16); color: #c4b5fd; }
.pill.gold { background: rgba(251,191,36,.16); color: #fbbf24; }
.pill.cyan { background: rgba(34,211,238,.16); color: #67e8f9; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 16px 56px; }
#app-shell { display: none; max-width: 1240px; margin: 0 auto; padding: 22px 18px 64px; animation: fadeUp .4s ease both; }

.topbar, .top {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  padding: 16px 20px; margin-bottom: 16px;
}
.topbar .actions, .toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { margin-bottom: 12px; }

.grid-stats, .stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) { .grid-stats, .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid-stats, .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  position: relative;
  padding: 16px 16px 14px;
  overflow: hidden;
  animation: fadeUp .5s ease both;
  transition: border-color .2s, transform .2s;
}
.stat::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--stat-accent, var(--accent));
  opacity: .95;
}
.stat:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.stat h3, .stat .k {
  margin: 0 0 8px;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .04em;
}
.stat .n, .stat .v {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--stat-accent, #f8fbff);
  text-shadow: 0 0 24px color-mix(in srgb, var(--stat-accent, #22d3ee) 35%, transparent);
  word-break: break-word;
}
.stat .sub { margin-top: 6px; color: var(--muted); font-size: .75rem; }
.stat.c-cyan { --stat-accent: var(--cyan); }
.stat.c-teal { --stat-accent: var(--teal); }
.stat.c-purple { --stat-accent: var(--purple); }
.stat.c-white { --stat-accent: #f8fbff; }
.stat.c-green { --stat-accent: var(--green); }
.stat.c-orange { --stat-accent: var(--orange); }
.stat.c-pink { --stat-accent: var(--pink); }
.stat.c-gold { --stat-accent: var(--gold); }

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  position: sticky;
  top: 10px;
  z-index: 12;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(5, 11, 24, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#step-domains, #tpl-panel, #config-panel, #safe-panel {
  scroll-margin-top: 88px;
}
.flow-step {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 16, 32, .72);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .15s, background .2s;
}
.flow-step:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  background: rgba(34, 211, 238, .07);
}
.flow-step .n {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(34,211,238,.4), rgba(129,140,248,.4));
  font-weight: 800; font-size: .85rem;
}
.flow-step.optional .n {
  background: rgba(255,255,255,.1);
}
.flow-step .t { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.flow-step .opt {
  display: inline-block; margin-left: 6px;
  font-size: .72rem; color: var(--muted); font-weight: 600;
}
.step-badge {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #818cf8);
  color: #041018; font-size: .78rem; font-weight: 800;
  flex: 0 0 auto;
}
.step-badge.optional {
  background: rgba(255,255,255,.16);
  color: #eef4ff;
}
.step-sub {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
}
.step-sub h4 {
  margin: 0 0 10px;
  font-size: .95rem;
  font-family: var(--display);
}
.adv-fold {
  margin: 4px 0 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px 14px 12px;
  background: rgba(0,0,0,.16);
}
.adv-fold > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  list-style: none;
}
.adv-fold > summary::-webkit-details-marker { display: none; }
.adv-fold > summary::before {
  content: "▸ ";
  color: var(--accent);
}
.adv-fold[open] > summary::before { content: "▾ "; }
.hop-pick {
  margin: 0 0 14px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: 14px;
  background: rgba(34, 211, 238, .05);
}
.result-box {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.22);
}
.domain-check-item:has(input:checked) {
  border-color: rgba(34, 211, 238, .55);
  background: rgba(34, 211, 238, .1);
}
.domain-check-list > .tiny {
  display: block;
  padding: 8px 4px;
}
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}
@media (max-width: 860px) { .flow-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .flow-steps { grid-template-columns: 1fr; } }

.panel { padding: 18px 20px; margin-bottom: 16px; }
.panel h3 {
  margin: 0 0 14px;
  font-size: 1.02rem;
  font-family: var(--display);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.panel-head h3 { margin: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; } }
.hint { color: var(--muted); font-size: .84rem; line-height: 1.55; margin: 0 0 12px; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; letter-spacing: .04em; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(34, 211, 238, .05); }
tbody tr.active { background: rgba(56, 189, 248, .08); }
tbody tr.app-data:hover + tr.app-actions-tr { background: rgba(34, 211, 238, .05); }
tbody tr.app-data td { border-bottom: none; padding-bottom: 4px; }
tbody tr.app-actions-tr td {
  border-bottom: 1px solid var(--line);
  padding-top: 0;
  padding-bottom: 12px;
}
tr.stat-total td {
  color: var(--text);
  font-weight: 700;
  border-top: 1px solid var(--line-strong);
}

.table-scroll {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.22);
}
.table-scroll.logs-scroll { max-height: 420px; }
.table-scroll.stat-3rows { max-height: 160px; }
.table-scroll table { margin: 0; }
.table-scroll thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--card-solid);
  box-shadow: 0 1px 0 var(--line);
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}
.empty-icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, .08);
  border: 1px dashed var(--line-strong);
  font-size: 1.4rem;
}
.empty-title { color: var(--text); font-weight: 600; margin-bottom: 4px; }
.empty-sub { font-size: .84rem; }

.tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.tab {
  appearance: none; border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: .86rem;
}
.tab.on {
  background: linear-gradient(135deg, rgba(34,211,238,.22), rgba(129,140,248,.22));
  border-color: rgba(34, 211, 238, .45);
  color: #fff;
}

.dash-mid {
  display: grid;
  grid-template-columns: 1.45fr .75fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}
@media (max-width: 980px) { .dash-mid { grid-template-columns: 1fr; } }
.chart-wrap {
  position: relative;
  min-height: 280px;
}
.chart-wrap .empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(5, 11, 24, .55);
}
.chart-wrap .empty-state.hidden { display: none !important; }
.create-stack { display: flex; flex-direction: column; gap: 12px; }
.create-card {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  background: rgba(8, 16, 32, .7);
  text-decoration: none;
  color: inherit;
  min-height: 132px;
  transition: border-color .2s, transform .2s, background .2s;
}
.create-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: rgba(34, 211, 238, .06);
}
.create-card .kicker {
  font-size: .72rem; letter-spacing: .14em; color: var(--accent);
  font-weight: 700; margin-bottom: 8px;
}
.create-card h4 { margin: 0 0 6px; font-size: 1.05rem; }
.create-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }

#login-container {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 28px 18px 40px;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  animation: fadeUp .45s ease both;
}
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: min(400px, 100%); padding: 34px 30px; align-self: center; flex-shrink: 0; border-color: var(--line-strong); }
.login-header { text-align: center; margin-bottom: 24px; }
.login-header h1 { margin: 0 0 8px; font-family: var(--display); font-size: 1.28rem; font-weight: 700; }
.login-header p { margin: 0; color: var(--muted); font-size: .92rem; }
.login-brand { flex: 1; min-width: 0; padding: 10px 6px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.28);
  color: #bbf7d0; font-size: .78rem; font-weight: 600;
  margin-bottom: 16px;
}
.login-brand .hero-title {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
  background: linear-gradient(120deg, #7dd3fc 8%, #22d3ee 42%, #4ade80 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-brand .hero-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.65;
  max-width: 54ch;
}
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) {
  #login-container { flex-direction: column; align-items: center; }
}
@media (max-width: 640px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-block {
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--line);
  transition: border-color .2s, transform .2s;
}
.feat-block:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.feat-block h3 {
  margin: 0 0 8px; font-size: .92rem; color: var(--accent);
  font-weight: 700; font-family: var(--display);
}
.feat-block ul { margin: 0; padding: 0 0 0 1.1em; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.feat-block li { margin-bottom: 4px; }
.feat-block strong { color: #e8eefc; font-weight: 600; }
.error-message, .err { color: #f0a8a2; margin-top: 10px; min-height: 1.2em; font-size: .9rem; }

.monitor {
  margin-top: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 22, .72);
  overflow: hidden;
}
.monitor-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .08em;
}
.monitor-dots { display: flex; gap: 6px; }
.monitor-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.monitor-dots i:nth-child(1) { background: #f87171; }
.monitor-dots i:nth-child(2) { background: #fbbf24; }
.monitor-dots i:nth-child(3) { background: #4ade80; }
.monitor-body { padding: 14px 14px 12px; }
.monitor-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.monitor-kpis .mk .lab { color: var(--muted); font-size: .72rem; }
.monitor-kpis .mk .num { font-size: 1.15rem; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.monitor-log { font-family: var(--mono); font-size: .72rem; color: #93c5fd; line-height: 1.7; }
.monitor-log b { color: var(--ok); font-weight: 600; }

.domain-check-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
}
.domain-check-item {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(0,0,0,.22); cursor: pointer;
  transition: border-color .15s;
}
.domain-check-item:hover { border-color: rgba(34, 211, 238, .4); }
.domain-check-item input[type="checkbox"] {
  flex-shrink: 0; width: 16px; height: 16px; margin: 2px 0 0;
  accent-color: #22d3ee;
}
.domain-check-item .dom-meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.domain-check-item .dom-url { font-size: .86rem; line-height: 1.35; word-break: break-all; color: var(--text); }
.domain-check-item .dom-remark { align-self: flex-start; }

.modal-bg {
  position: fixed; inset: 0;
  background: rgba(2, 8, 18, .72);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 50;
  backdrop-filter: blur(6px);
}
.modal { width: min(460px, 100%); padding: 20px; }
.modal h3 { margin-top: 0; font-family: var(--display); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.toast {
  position: fixed; right: 16px; bottom: 16px;
  background: var(--card-solid); border: 1px solid var(--line-strong);
  padding: 12px 14px; border-radius: 12px; z-index: 60;
  display: none; max-width: 360px; box-shadow: var(--shadow);
}
.link-box {
  font-size: .82rem; word-break: break-all;
  background: rgba(0,0,0,.28); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; margin: 4px 0;
  font-family: var(--mono);
}
.app-links-scroll {
  max-height: 124px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.app-link-row {
  height: 62px;
  box-sizing: border-box;
  padding: 2px 0 0;
}
.app-link-row .tiny { margin: 0 0 2px; line-height: 1.3; }
.app-link-row .link-box {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.app-remark-red {
  display: block;
  margin-top: 12px;
  color: #f87171;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.app-name-cell { overflow: visible; }
.app-actions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
}
.app-actions-row .btn {
  padding: 6px 10px;
  font-size: .78rem;
  white-space: nowrap;
  flex: none;
}

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tpl-card {
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(0,0,0,.24); overflow: hidden; cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tpl-card:hover { border-color: rgba(34,211,238,.45); transform: translateY(-2px); }
.tpl-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,211,238,.18); }
.tpl-thumb { aspect-ratio: 9/14; background: #070d18; position: relative; overflow: hidden; }
.tpl-thumb iframe {
  width: 360%; height: 360%; border: 0;
  transform: scale(.278); transform-origin: 0 0;
  pointer-events: none; background: #fff;
}
.tpl-card .meta { padding: 10px 12px; }
.tpl-card .meta strong { display: block; font-size: .9rem; margin-bottom: 4px; }
.tpl-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tpl-actions .btn { padding: 7px 10px; font-size: .78rem; }
.preview-shell { width: min(1100px, 100%); max-height: 92vh; overflow: auto; padding: 16px 18px; }
.preview-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
@media (max-width: 860px) { .preview-layout { grid-template-columns: 1fr; } }
.phone-frame {
  width: min(320px, 100%); margin: 0 auto;
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  background: #000; box-shadow: 0 16px 40px rgba(0,0,0,.45); aspect-ratio: 9/16;
}
.phone-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.view-layout { display: grid; grid-template-columns: 1.1fr .9fr .7fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .view-layout { grid-template-columns: 1fr; } }
.qr-box {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.22);
}
.qr-box img { width: 180px; height: 180px; background: #fff; border-radius: 8px; padding: 8px; }
.side-actions { display: flex; flex-direction: column; gap: 10px; }
.side-actions .btn { width: 100%; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.asset-card {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(0,0,0,.22); padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.asset-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #111; }
.asset-card .ph {
  width: 100%; aspect-ratio: 1; border-radius: 8px; background: #10182a;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .75rem; text-align: center; padding: 6px;
}
.asset-card .path { font-size: .72rem; color: var(--muted); word-break: break-all; min-height: 2.2em; }
.text-edit-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: rgba(0,0,0,.18); }
.text-edit-item { margin-bottom: 10px; }
.text-edit-item label { font-size: .78rem; color: var(--muted); display: block; margin-bottom: 4px; }
.text-edit-item textarea { min-height: 54px; width: 100%; }

.dev-cell { display: flex; align-items: center; gap: 8px; }
.dev-ico {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(34,211,238,.12); color: #67e8f9; font-size: .7rem;
}

.screen-page { max-width: none; padding: 14px 16px 20px; min-height: 100vh; }
.screen-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.screen-title {
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: .12em;
  margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.screen-head .right { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.screen-grid {
  display: grid;
  grid-template-columns: 1.7fr .9fr;
  gap: 14px;
  min-height: calc(100vh - 210px);
}
@media (max-width: 1100px) {
  .screen-head { grid-template-columns: 1fr; }
  .screen-head .right { justify-content: flex-start; }
  .screen-grid { grid-template-columns: 1fr; }
}
.map-card, .side-card {
  padding: 16px;
  min-height: 280px;
}
.map-canvas-wrap { position: relative; height: min(58vh, 560px); }
#geo-map { width: 100%; height: 100%; display: block; }
.map-tag, .side-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: .65rem;
  letter-spacing: .12em;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: middle;
}
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row .lab { display: flex; justify-content: space-between; font-size: .84rem; margin-bottom: 5px; }
.bar-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #818cf8);
}
.os-empty { height: 180px; display: grid; place-items: center; }

.share-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 1100px) { .share-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .share-grid { grid-template-columns: repeat(2, 1fr); } }
.foot { color: var(--muted); font-size: .78rem; text-align: center; margin-top: 18px; }
