/* ============================================================
   admin.rebom.click — Premium Hanbang Clinic Theme v2
   ============================================================ */

:root {
  /* Hanbang clinic palette */
  --bg:           #f6f8f7;
  --bg-soft:      #eef3f1;
  --bg-card:      #ffffff;
  --bg-sidebar:   linear-gradient(180deg, #0f3d34 0%, #0a2a23 100%);
  --bg-topbar:    rgba(255,255,255,.85);

  --ink:          #0f172a;
  --ink-soft:     #475569;
  --ink-muted:    #64748b;
  --line:         #e2e8f0;
  --line-soft:    #eef2f1;

  /* Primary: deep medical teal with gold accent */
  --brand:        #0f766e;
  --brand-2:      #14b8a6;
  --brand-soft:   #ccfbf1;
  --brand-deep:   #134e3a;
  --brand-glow:   rgba(20,184,166,.35);

  /* Accents */
  --accent:       #c9a86a;     /* warm gold (한방 wood/herbs) */
  --accent-soft:  #f5e8d3;
  --herb:         #84cc16;     /* fresh leaf */
  --warmth:       #f97316;     /* moxibustion */

  --good:         #16a34a;
  --warn:         #d97706;
  --bad:          #dc2626;
  --info:         #2563eb;

  --shadow-sm:    0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.03);
  --shadow:       0 2px 8px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:    0 8px 24px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.05);
  --shadow-lg:    0 20px 60px rgba(15,23,42,.15), 0 4px 12px rgba(15,23,42,.06);
  --shadow-glow:  0 0 0 4px var(--brand-glow);

  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  --sidebar-w:    252px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

html, body {
  height: 100%;
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at top right, rgba(20,184,166,.06) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(201,168,106,.05) 0%, transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
}

a { color: var(--brand); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .8; }
button { font-family: inherit; }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar (premium) ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  color: #e6f4ef;
  padding: 24px 16px;
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.04), 4px 0 24px rgba(11,59,50,.15);
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: inherit; text-decoration: none;
}
.brand:hover { opacity: 1; }
.brand .logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.3) 0%, transparent 60%),
    linear-gradient(135deg, var(--accent) 0%, #b8945a 100%);
  display: grid; place-items: center;
  font-weight: 900; color: var(--brand-deep); font-size: 19px;
  letter-spacing: -.5px;
  box-shadow: 0 4px 16px rgba(201,168,106,.4), inset 0 1px 0 rgba(255,255,255,.4);
  position: relative;
}
.brand .logo::after {
  content: ''; position: absolute; inset: 4px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.2);
}
.brand .meta .name {
  font-weight: 800; font-size: 14px; color: #ffffff;
  letter-spacing: .02em;
}
.brand .meta .sub {
  font-size: 11px; color: #7fc4b3;
  margin-top: 2px; letter-spacing: .04em;
}

.nav-section { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: #7fc4b3; padding: 10px 12px 6px;
  font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px;
  border-radius: 11px;
  color: #c6e0d6;
  font-size: 13px; font-weight: 500;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  position: relative;
  text-decoration: none;
}
.nav-item:hover {
  background: rgba(255,255,255,.05);
  color: #ffffff; opacity: 1;
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(20,184,166,.22) 0%, rgba(20,184,166,.06) 100%);
  color: #ffffff;
  font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--brand-2));
  box-shadow: 0 0 8px var(--brand-glow);
}
.nav-item svg { width: 17px; height: 17px; opacity: .9; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11px; color: #7fc4b3;
  line-height: 1.6;
}
.sidebar-footer .ip {
  color: #ffffff;
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 11px;
}
.sidebar-footer .ver {
  display: inline-block;
  background: rgba(201,168,106,.15);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px; font-weight: 700;
  letter-spacing: .1em;
  margin-top: 4px;
}

/* ── Main ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-width: 0;
}

.topbar {
  background: var(--bg-topbar);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,.6);
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 {
  font-size: 17px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -.02em;
}
.topbar h1 .pill {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--brand-soft), #a7f3d0);
  color: var(--brand-deep);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
}
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--ink-muted); }
.topbar .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(22,163,74,.5);
  animation: pulse 2.5s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); }
  70% { box-shadow: 0 0 0 9px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

.content { padding: 32px; }

/* ── Card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(248,250,250,.5) 0%, rgba(255,255,255,0) 100%);
}
.card-head h2 {
  font-size: 14px; font-weight: 800; color: var(--ink);
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
}
.card-head .sub { font-size: 12px; color: var(--ink-muted); font-weight: 500; }
.card-body { padding: 20px 22px; }

/* ── Stat grid (premium) ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.stat .label {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.stat .value {
  font-size: 34px; font-weight: 900;
  color: var(--ink); margin-top: 8px;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--ink) 0%, var(--brand-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .delta { font-size: 11px; color: var(--ink-muted); margin-top: 6px; }
.stat.gold::before { background: linear-gradient(90deg, var(--accent), #e8c896); }
.stat.gold .value { background: linear-gradient(135deg, var(--ink) 0%, #92702c 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat.herb::before { background: linear-gradient(90deg, var(--herb), #bef264); }
.stat.warmth::before { background: linear-gradient(90deg, var(--warmth), #fdba74); }

/* ── Hero (premium) ── */
.hero {
  background:
    radial-gradient(ellipse at top right, rgba(201,168,106,.18) 0%, transparent 60%),
    linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 100%);
  color: #ffffff;
  padding: 30px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 26px;
  display: flex; align-items: center; gap: 24px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.1);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -40px; bottom: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(201,168,106,.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero .icon-wrap {
  width: 68px; height: 68px;
  background: rgba(255,255,255,.13);
  border-radius: 18px;
  display: grid; place-items: center;
  font-size: 32px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
  flex-shrink: 0;
}
.hero h2 {
  font-size: 24px; margin-bottom: 8px;
  letter-spacing: -.02em; font-weight: 800;
}
.hero p {
  color: #c6e0d6; font-size: 13.5px;
  max-width: 600px; line-height: 1.7;
}

/* ── Table ── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.table th {
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-muted); background: #fafbfa; font-weight: 700;
}
.table tr:hover td { background: #fbfcfb; }
.table .mono {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--ink-soft);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .02em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  letter-spacing: -.005em;
}
.btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  opacity: 1;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #ffffff !important;
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(15,118,110,.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 100%);
  border-color: var(--brand-2);
  box-shadow: 0 4px 14px rgba(15,118,110,.45);
}
.btn-gold {
  background: linear-gradient(135deg, var(--accent) 0%, #b8945a 100%);
  color: var(--brand-deep) !important;
  border-color: var(--accent);
  font-weight: 700;
}
.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff !important;
  border-color: #dc2626;
}
.btn-danger:hover { box-shadow: 0 4px 14px rgba(220,38,38,.4); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-muted); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-deep); border-color: transparent; }

/* Form */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--ink-soft); margin-bottom: 7px;
  letter-spacing: -.005em;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  transition: border-color .15s, box-shadow .15s;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}
.field .help { font-size: 11px; color: var(--ink-muted); margin-top: 6px; line-height: 1.5; }

/* Alerts */
.alert {
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 13px;
  border-left: 3px solid;
  background: #ffffff;
  margin-bottom: 16px;
  line-height: 1.6;
}
.alert.info { border-color: var(--info); background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%); color: #1e3a8a; }
.alert.warn { border-color: var(--warn); background: linear-gradient(90deg, #fffbeb 0%, #ffffff 100%); color: #78350f; }
.alert.ok   { border-color: var(--good); background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 100%); color: #14532d; }
.alert.err  { border-color: var(--bad);  background: linear-gradient(90deg, #fef2f2 0%, #ffffff 100%); color: #7f1d1d; }

/* Empty */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--ink-muted);
}
.empty .icon { font-size: 42px; margin-bottom: 12px; opacity: .55; }
.empty .msg { font-size: 14px; }

/* Misc */
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 280px; }
.muted { color: var(--ink-muted); }
.mono { font-family: ui-monospace, 'JetBrains Mono', monospace; }

/* ── Animations ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop      { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shimmer  { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes scanline { 0% { transform: translateY(-100%); } 100% { transform: translateY(2000%); } }
@keyframes blink    { 50% { opacity: .3; } }
@keyframes slideInRight { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes float    { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes glow     { 0%,100% { filter: drop-shadow(0 0 8px rgba(20,184,166,.6)); } 50% { filter: drop-shadow(0 0 20px rgba(20,184,166,.9)); } }

.anim-in    { animation: fadeInUp .4s ease-out both; }
.anim-pop   { animation: pop .35s cubic-bezier(.34,1.56,.64,1) both; }
.anim-fade  { animation: fadeIn .3s ease-out both; }
.anim-slide { animation: slideInRight .35s ease-out both; }

.skeleton {
  background: linear-gradient(90deg, #f1f5f4 25%, #e6efed 50%, #f1f5f4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 6px;
  height: 14px;
}

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(15,118,110,.25);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
}

/* ── TLD search cards ── */
.tld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tld-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 9px;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.tld-card.checking { background: linear-gradient(135deg, #f8fafa 0%, #ffffff 100%); }
.tld-card.available {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(20,184,166,.12), var(--shadow-md);
  transform: translateY(-2px);
}
.tld-card.taken { opacity: .65; }
.tld-card .domain {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 15px; font-weight: 800; color: var(--ink);
  letter-spacing: -.02em;
}
.tld-card .tld-tag {
  font-size: 10px; letter-spacing: .1em;
  background: var(--brand-soft); color: var(--brand-deep);
  padding: 3px 8px; border-radius: 6px;
  display: inline-block;
  font-weight: 800;
}
.tld-card .status {
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.tld-card .price { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.tld-card .price strong { color: var(--brand-deep); font-size: 17px; font-weight: 800; }
.tld-card .actions { margin-top: auto; padding-top: 10px; }

/* AI chips */
.ai-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.ai-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  animation: pop .3s ease-out both;
}
.ai-chip:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.ai-chip .meaning { font-size: 11px; color: var(--ink-muted); margin-left: 4px; }

/* Stepper */
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  background: #ffffff; padding: 20px 26px;
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.stepper .step { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; gap: 7px; }
.stepper .step .num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #e5e7eb; color: #6b7280;
  display: grid; place-items: center;
  font-weight: 900; font-size: 14px;
  transition: all .35s cubic-bezier(.4,0,.2,1);
}
.stepper .step.active .num {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 0 0 5px var(--brand-glow);
  animation: pop .3s ease-out;
}
.stepper .step.done .num {
  background: linear-gradient(135deg, var(--good), #15803d);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(22,163,74,.2);
}
.stepper .step .label { font-size: 11px; color: var(--ink-muted); font-weight: 600; }
.stepper .step.active .label { color: var(--brand-deep); font-weight: 800; }
.stepper .step.done .label { color: var(--good); font-weight: 700; }
.stepper .line {
  flex: 1; height: 3px; background: #e5e7eb;
  margin: 0 10px; position: relative; overflow: hidden;
  border-radius: 999px;
}
.stepper .line.done {
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  box-shadow: 0 0 8px var(--brand-glow);
}

/* Subdomain inline status */
.input-wrap { position: relative; }
.input-wrap .inline-status {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  animation: fadeIn .2s;
}
.input-wrap .inline-status.ok  { color: var(--good); }
.input-wrap .inline-status.no  { color: var(--bad); }
.input-wrap .inline-status.warn { color: var(--warn); }

/* AI inline (always-visible suggestion box) */
.ai-inline {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 50%, #fefce8 100%);
  border: 1.5px dashed var(--brand-2);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
  position: relative;
}
.ai-inline .head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 800; color: var(--brand-deep);
  margin-bottom: 10px;
  letter-spacing: -.005em;
}
.ai-inline .row {
  display: flex; gap: 8px;
  min-width: 0;
}
.ai-inline .row input {
  flex: 1; min-width: 0;
  padding: 10px 14px;
  border: 1.5px solid #99f6e4;
  border-radius: 10px;
  font-size: 13.5px;
  background: #fff;
}
.ai-inline .row input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

/* Step checklist */
.step-checklist {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1.5px solid #fde047;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 18px;
  font-size: 13px;
  transition: all .4s;
}
.step-checklist.allgood {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
  box-shadow: 0 0 0 4px rgba(34,197,94,.1);
}
.step-checklist h3 {
  font-size: 13px; font-weight: 800; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
  color: #713f12;
}
.step-checklist.allgood h3 { color: #14532d; }
.step-check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0;
  color: var(--ink-soft);
}
.step-check-item .mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
  background: #e5e7eb; color: #9ca3af;
  transition: all .25s;
}
.step-check-item.ok .mark {
  background: linear-gradient(135deg, var(--good), #15803d);
  color: #fff;
  animation: pop .3s ease-out;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
}
.step-check-item.no .mark { background: #fef3c7; color: #92400e; }
.step-check-item.ok { color: var(--ink); font-weight: 600; }
.step-check-item .label { font-size: 13px; }
.step-check-item .val {
  margin-left: auto;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-muted);
  background: rgba(255,255,255,.6);
  padding: 2px 8px;
  border-radius: 5px;
}

/* Disabled button */
.btn-primary:disabled, .btn:disabled {
  opacity: .5; cursor: not-allowed;
  background: #9ca3af !important; border-color: #9ca3af !important;
  box-shadow: none !important; transform: none !important;
}
.btn-primary:disabled:hover { background: #9ca3af !important; color: #fff !important; }

/* ── Toast (centered top, premium) ── */
#toastWrap {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999;
  pointer-events: none;
  width: 92%; max-width: 580px;
  align-items: center;
}
.toast {
  pointer-events: auto;
  min-width: 340px; max-width: 100%;
  background: #ffffff;
  border-left: 5px solid var(--info);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 25px 60px rgba(15,23,42,.25), 0 4px 12px rgba(15,23,42,.08);
  display: flex; align-items: flex-start; gap: 14px;
  animation: toastDrop .45s cubic-bezier(.34,1.56,.64,1) both;
}
.toast.exit { animation: fadeOut .25s ease-in forwards; }
@keyframes toastDrop { from { opacity: 0; transform: translateY(-30px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-20px); } }
.toast .icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 900; font-size: 15px;
  flex-shrink: 0;
}
.toast.success { border-left-color: var(--good); }
.toast.success .icon { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: var(--good); }
.toast.error   { border-left-color: var(--bad); }
.toast.error   .icon { background: linear-gradient(135deg, #fee2e2, #fecaca); color: var(--bad); }
.toast.warn    { border-left-color: var(--warn); }
.toast.warn    .icon { background: linear-gradient(135deg, #fef3c7, #fde68a); color: var(--warn); }
.toast.info    { border-left-color: var(--info); }
.toast.info    .icon { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: var(--info); }
.toast .body { flex: 1; min-width: 0; }
.toast .body .title { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 3px; letter-spacing: -.01em; }
.toast .body .msg { font-size: 13px; color: var(--ink-soft); line-height: 1.5; word-break: break-word; }
.toast .close {
  background: none; border: none; cursor: pointer;
  color: var(--ink-muted); font-size: 18px; padding: 0;
  width: 22px; height: 22px;
}

/* ============================================================
   AGENT REBOM Modal Overlay v2 (Cinematic)
   ============================================================ */
#agentOverlay {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(20,184,166,.15) 0%, rgba(7,30,25,.96) 60%),
    rgba(7,30,25,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid; place-items: center;
  z-index: 9000;
  animation: fadeIn .45s ease-out;
  padding: 20px;
  overflow-y: auto;
}
#agentOverlay.exit { animation: fadeOut .4s ease-in forwards; }
.agent-stage {
  width: 100%; max-width: 780px;
  background:
    radial-gradient(ellipse at top, rgba(20,184,166,.12) 0%, transparent 50%),
    linear-gradient(135deg, rgba(15,61,52,.95) 0%, rgba(7,30,25,.98) 100%);
  border: 1px solid rgba(94,234,212,.25);
  border-radius: 24px;
  padding: 36px 36px 28px;
  color: #fff;
  position: relative; overflow: hidden;
  box-shadow:
    0 40px 100px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(94,234,212,.15),
    inset 0 0 80px rgba(20,184,166,.05);
}
.agent-stage::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-2) 50%, transparent);
  animation: scanline 3s linear infinite;
}
.agent-stage::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(94,234,212,.02) 3px, rgba(94,234,212,.02) 4px);
  pointer-events: none;
}
.agent-stage > * { position: relative; z-index: 1; }
.agent-stage .head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.agent-stage h2 {
  font-size: 19px; letter-spacing: -.02em; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.agent-stage .badge-live {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(94,234,212,.18);
  color: var(--brand-2);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px; font-weight: 900;
  letter-spacing: .12em;
}
.agent-stage .badge-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-2); animation: blink 1.2s ease-in-out infinite;
}
.agent-stage .badge-recall {
  background: rgba(251,191,36,.18); color: #fde68a;
}
.agent-stage .badge-recall::before { background: #fde68a; }
.agent-stage .target-info {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 13px; color: #a7d7c8;
  margin-bottom: 10px;
}
.agent-stage .target-info strong { color: var(--brand-2); font-weight: 700; }

/* Robot stage */
.robot-stage {
  display: grid; place-items: center;
  padding: 14px 0 22px;
  position: relative;
  min-height: 280px;
}
.robot-stage::before {
  content: ''; position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  width: 180px; height: 14px;
  background: radial-gradient(ellipse, rgba(94,234,212,.4) 0%, transparent 70%);
  filter: blur(8px);
  animation: float 4s ease-in-out infinite;
}
.robot-svg {
  width: 260px; height: 260px;
  filter: drop-shadow(0 8px 24px rgba(94,234,212,.3));
  animation: float 4s ease-in-out infinite;
}

/* Each part: starts hidden, gets .show or .hide / .bye */
.robot-svg .part {
  opacity: 0;
  transform-origin: center;
  transition: opacity .6s ease, transform .8s cubic-bezier(.34,1.56,.64,1);
}
.robot-svg .part.show { opacity: 1; transform: translate(0,0) scale(1) rotate(0); }
.robot-svg .part.hide { opacity: 0 !important; }

/* Assembly directions per part */
.robot-svg .part-shield   { transform: scale(.2); opacity: 0; }
.robot-svg .part-shield.show { opacity: .65 !important; animation: shieldPulse 2.2s ease-in-out infinite; }
.robot-svg .part-legs     { transform: translateY(120px) scale(.5); }
.robot-svg .part-arm-l    { transform: translateX(-130px) rotate(-90deg); }
.robot-svg .part-arm-r    { transform: translateX(130px) rotate(90deg); }
.robot-svg .part-core     { transform: translateY(100px) scale(.4); }
.robot-svg .part-circuit  { transform: scale(.2); }
.robot-svg .part-head     { transform: translateY(-100px) scale(.4) rotate(-45deg); }
.robot-svg .part-eyes     { transform: scale(0); }
.robot-svg .part-eyes.show { animation: eyesOn 1.4s cubic-bezier(.34,1.56,.64,1) both; }
.robot-svg .part-antenna  { opacity: 0; }
.robot-svg .part-antenna.show { opacity: 1; animation: antennaBlink 1.4s ease infinite; }

@keyframes shieldPulse {
  0%,100% { transform: scale(1); opacity: .5; }
  50%     { transform: scale(1.08); opacity: .85; }
}
@keyframes eyesOn {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes antennaBlink {
  0%,100% { opacity: 1; filter: drop-shadow(0 0 6px rgba(94,234,212,1)); }
  50%     { opacity: .4; filter: drop-shadow(0 0 2px rgba(94,234,212,.5)); }
}

/* Disassembly (RECALL mode) */
.robot-svg.disassemble .part {
  transition: opacity .6s ease, transform 1s cubic-bezier(.55,-0.4,.6,1.5);
}
.robot-svg.disassemble .part-head.bye      { transform: translate(30px, -260px) rotate(180deg); opacity: 0; }
.robot-svg.disassemble .part-antenna.bye   { transform: translateY(-280px); opacity: 0; }
.robot-svg.disassemble .part-core.bye      { transform: translateY(280px) scale(.3); opacity: 0; }
.robot-svg.disassemble .part-arm-l.bye     { transform: translate(-280px, 80px) rotate(-300deg); opacity: 0; }
.robot-svg.disassemble .part-arm-r.bye     { transform: translate(280px, 80px) rotate(300deg); opacity: 0; }
.robot-svg.disassemble .part-circuit.bye   { transform: scale(2.5); opacity: 0; }
.robot-svg.disassemble .part-shield.bye    { transform: scale(3); opacity: 0 !important; animation: none; }
.robot-svg.disassemble .part-legs.bye      { transform: translateY(260px) rotate(20deg); opacity: 0; }
.robot-svg.disassemble .part-eyes.bye      { transform: scale(0); opacity: 0 !important; animation: none; }

/* Module list */
.module-list {
  display: flex; flex-direction: column; gap: 5px;
  margin-top: 6px;
  max-height: 320px; overflow-y: auto; padding-right: 6px;
}
.module-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 13px;
  color: rgba(255,255,255,.45);
  background: transparent;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.module-row.active {
  background: linear-gradient(90deg, rgba(94,234,212,.15) 0%, rgba(94,234,212,.02) 100%);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--brand-2), 0 0 0 1px rgba(94,234,212,.2);
  transform: translateX(6px);
}
.module-row.done { color: rgba(255,255,255,.85); }
.module-row .mark {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.25);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 900;
  flex-shrink: 0; transition: all .35s;
}
.module-row.active .mark {
  border-color: var(--brand-2);
  background: rgba(94,234,212,.2);
  box-shadow: 0 0 14px var(--brand-glow);
}
.module-row.active .mark::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-2); animation: blink 1s ease infinite;
}
.module-row.done .mark {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  border-color: var(--brand-2); color: var(--brand-deep);
}
.module-row.done .mark::after { content: '✓'; font-weight: 900; font-size: 12px; }
.module-row .ko {
  font-size: 11px; color: rgba(167,215,200,.6);
  display: block; margin-top: 1px;
}
.module-row .meta {
  margin-left: auto;
  font-family: ui-monospace, monospace;
  font-size: 10px; letter-spacing: .1em;
  color: rgba(167,215,200,.55);
}

.progress-stage { margin: 14px 0 18px; }
.progress-bar {
  height: 8px; background: rgba(255,255,255,.08);
  border-radius: 999px; overflow: hidden;
  border: 1px solid rgba(94,234,212,.1);
}
.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-2) 0%, var(--accent) 100%);
  border-radius: 999px;
  box-shadow: 0 0 14px var(--brand-glow);
  transition: width .8s cubic-bezier(.4,0,.2,1);
  width: 0%;
  position: relative;
  overflow: hidden;
}
.progress-bar .fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 2s linear infinite;
}
.progress-text {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px;
  font-family: ui-monospace, monospace;
  font-size: 12px; color: #a7d7c8;
}
.progress-text strong { color: #fff; font-size: 14px; }

.agent-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.agent-actions .btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  border: none; color: #fff !important;
  font-weight: 800;
  padding: 12px 28px;
  box-shadow: 0 8px 24px rgba(20,184,166,.4);
}
.agent-actions .btn-ghost {
  background: transparent;
  color: #a7d7c8;
  border: 1px solid rgba(255,255,255,.15);
}
.agent-actions .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }

/* Confirm modal (legacy) */
.confirm-bg {
  position: fixed; inset: 0;
  background: rgba(7,30,25,.7);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 9500;
  animation: fadeIn .25s ease-out;
}
.confirm-card {
  background: #fff; border-radius: 18px;
  width: 92%; max-width: 460px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: pop .35s cubic-bezier(.34,1.56,.64,1);
}
.confirm-card h3 { font-size: 18px; margin-bottom: 12px; }
.confirm-card p { color: var(--ink-soft); line-height: 1.6; margin-bottom: 18px; font-size: 13.5px; }
.confirm-card .row { display: flex; gap: 8px; justify-content: flex-end; }

/* ============================================================
   Modal system (alert/confirm replacement) — animated layers
   ============================================================ */
.modal-bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(13,148,136,.15) 0%, rgba(7,30,25,.85) 60%),
    rgba(7,30,25,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center;
  z-index: 9500;
  animation: fadeIn .3s ease-out;
  padding: 20px;
  overflow-y: auto;
}
.modal-bg.exit { animation: fadeOut .35s ease-in forwards; }
.modal-card {
  background: #ffffff;
  border-radius: 22px;
  width: 100%; max-width: 480px;
  padding: 36px 32px 28px;
  box-shadow: 0 40px 100px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.5);
  animation: modalIn .45s cubic-bezier(.34,1.56,.64,1) both;
  position: relative; overflow: hidden;
  text-align: center;
}
.modal-card.modal-wide { max-width: 620px; }
.modal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
}
.modal-bg.exit .modal-card { animation: modalOut .35s ease-in forwards; }
@keyframes modalIn {
  0%   { opacity: 0; transform: scale(.6) translateY(40px) rotate(-3deg); }
  60%  { transform: scale(1.04) translateY(-4px) rotate(.5deg); }
  100% { opacity: 1; transform: scale(1) translateY(0) rotate(0); }
}
@keyframes modalOut {
  to { opacity: 0; transform: scale(.85) translateY(20px); }
}
.modal-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 900;
  position: relative;
  animation: pop .5s .15s cubic-bezier(.34,1.56,.64,1) both;
}
.modal-icon::after {
  content: ''; position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px dashed;
  opacity: .3;
  animation: spin 12s linear infinite;
}
.modal-icon-default { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; }
.modal-icon-default::after { border-color: var(--brand); }
.modal-icon-danger  { background: linear-gradient(135deg, #fee2e2, #fecaca); color: var(--bad); }
.modal-icon-danger::after { border-color: var(--bad); }
.modal-icon-gold    { background: linear-gradient(135deg, var(--accent), #b8945a); color: var(--brand-deep); }
.modal-icon-gold::after { border-color: var(--accent); }
.modal-icon-info    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: var(--info); }
.modal-icon-info::after { border-color: var(--info); }

.modal-card h3 {
  font-size: 19px; font-weight: 800;
  color: var(--ink); margin-bottom: 14px;
  letter-spacing: -.01em;
}
.modal-body {
  margin-bottom: 22px;
  text-align: left;
}
.modal-body p { color: var(--ink-soft); line-height: 1.7; font-size: 14px; }
.modal-body .field { margin-bottom: 14px; text-align: left; }
.modal-body .field label { font-size: 12px; font-weight: 700; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.modal-body .field input, .modal-body .field textarea, .modal-body .field select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 14px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.modal-body .field input:focus, .modal-body .field textarea:focus, .modal-body .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-glow);
}
.modal-body .field .help { font-size: 11px; color: var(--ink-muted); margin-top: 5px; }
.modal-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.modal-actions .btn { padding: 11px 22px; font-size: 14px; }

/* ============================================================
   Keyword Master + Color Palette
   ============================================================ */
.km-status {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.km-status .badge-on  { background:#5eead4;color:#0b3b32;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.05em }
.km-status .badge-off { background:#fef3c7;color:#92400e;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.05em }
.km-status .phone { font-family: ui-monospace,monospace; font-size:14px; font-weight:700 }
.km-status a { color:#fde68a; text-decoration:underline }

.km-table th { cursor: pointer; user-select: none; }
.km-table th.sortable::after { content:' ⇅'; opacity:.4; font-size:10px }
.km-table th.sort-asc::after { content:' ▲'; opacity:1; color:var(--brand) }
.km-table th.sort-desc::after { content:' ▼'; opacity:1; color:var(--brand) }
.km-table .num { text-align: right; font-family: ui-monospace,monospace; }
.km-table tr.kw-row { cursor: pointer; transition: background .15s; }
.km-table tr.kw-row:hover { background: var(--brand-soft) !important; }
.km-table .send-btn { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color:#fff; border:none; padding:4px 10px; border-radius:6px; font-size:11px; font-weight:700; cursor:pointer }

/* Color palette */
.palette-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.palette-card {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer; transition: all .2s;
  background: #fff;
  display: flex; flex-direction: column; gap: 8px;
}
.palette-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand-2); }
.palette-card.selected {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px var(--brand-glow);
  background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 70%);
}
.palette-swatches { display:flex; gap:0; border-radius:8px; overflow:hidden; height:32px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.palette-swatches > div { flex:1; }
.palette-name { font-size:12px; font-weight:700; display:flex; align-items:center; gap:6px; color: var(--ink); }
.palette-name .ic { font-size:14px; }

/* Random checkbox */
.random-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  color: #78350f;
  cursor: pointer;
  user-select: none;
}
.random-toggle input { width:16px; height:16px; cursor:pointer; accent-color: var(--accent); }
.random-toggle.on {
  background: linear-gradient(135deg, var(--accent), #b8945a);
  color: var(--brand-deep);
  box-shadow: 0 4px 14px rgba(201,168,106,.4);
}

/* Site listbox (builder) */
.site-listbox {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 13px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfa 100%);
  padding: 6px;
  outline: none;
}
.site-listbox:focus { border-color: var(--brand-2); box-shadow: 0 0 0 5px var(--brand-glow); }
.site-listbox option {
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 3px;
}
.site-listbox option:checked {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
  color: #fff !important;
  font-weight: 700;
}
.site-listbox option:hover { background: var(--brand-soft); }

/* ============================================================
   Fixed bottom CTA (install page)
   ============================================================ */
.fixed-cta {
  position: fixed;
  bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 80;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 18px;
  box-shadow: 0 20px 50px rgba(15,23,42,.18), 0 4px 12px rgba(15,23,42,.06);
  display: flex; align-items: center; gap: 14px;
  font-size: 13px;
  animation: ctaSlideUp .4s cubic-bezier(.34,1.56,.64,1);
  max-width: 92vw;
}
.fixed-cta.ready {
  border-color: var(--brand-2);
  box-shadow: 0 20px 50px rgba(20,184,166,.3), 0 4px 12px rgba(20,184,166,.15);
  animation: ctaPulse 2s ease-in-out infinite;
}
@keyframes ctaSlideUp {
  from { transform: translate(-50%, 100px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes ctaPulse {
  0%,100% { box-shadow: 0 20px 50px rgba(20,184,166,.3), 0 4px 12px rgba(20,184,166,.15), 0 0 0 0 rgba(20,184,166,.4); }
  50%     { box-shadow: 0 20px 50px rgba(20,184,166,.5), 0 4px 12px rgba(20,184,166,.25), 0 0 0 10px rgba(20,184,166,0); }
}
.fixed-cta .status {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--ink-soft);
  white-space: nowrap;
}
.fixed-cta .status-dots {
  display: inline-flex; gap: 4px;
}
.fixed-cta .status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #e5e7eb;
  transition: all .3s;
}
.fixed-cta .status-dot.ok {
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
}
.fixed-cta .label {
  font-size: 12px; color: var(--ink-muted);
  white-space: nowrap;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis;
}
.fixed-cta .label.ready { color: var(--brand-dark); font-weight: 700; }
.fixed-cta button {
  background: linear-gradient(135deg, #9ca3af, #6b7280) !important;
  color: #fff !important;
  border: none !important;
  padding: 11px 24px !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  cursor: not-allowed !important;
  transition: all .25s;
}
.fixed-cta.ready button {
  background: linear-gradient(135deg, var(--brand-2), var(--brand)) !important;
  cursor: pointer !important;
  box-shadow: 0 6px 18px rgba(15,118,110,.35);
}
.fixed-cta.ready button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(15,118,110,.5);
}
.fixed-cta button .spinner { border-color: rgba(255,255,255,.3) !important; border-top-color: #fff !important; }

@media (max-width: 700px) {
  .fixed-cta { padding: 6px 6px 6px 12px; gap: 8px; font-size: 12px; bottom: 12px; }
  .fixed-cta .label { display: none; }
  .fixed-cta button { padding: 9px 16px !important; font-size: 13px !important; }
}

/* 본문 하단 여백 (fixed CTA가 가리지 않도록) */
.has-fixed-cta { padding-bottom: 100px; }

/* Slim recent jobs bar (install page top) */
.latest-bar {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  border: 1.5px solid var(--brand-2);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  flex-wrap: wrap;
}
.latest-bar .lbl {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-deep); font-weight: 800;
  padding: 2px 8px;
  background: rgba(20,184,166,.15);
  border-radius: 999px;
}
.latest-bar .fqdn {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-weight: 700; color: var(--ink);
}
.latest-bar .when { font-size: 11px; color: var(--ink-muted); font-family: ui-monospace,monospace; }
.latest-bar .icons { margin-left: auto; display: flex; gap: 6px; }
.latest-bar .icon-pill {
  background: #fff; border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  color: var(--ink-soft);
  text-decoration: none;
}
.latest-bar .icon-pill:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }

/* 접힌 이력 section */
.history-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all .15s;
}
.history-toggle:hover { border-color: var(--brand); color: var(--brand-deep); }
.history-toggle .arrow { transition: transform .25s; margin-left: auto; }
.history-toggle.open .arrow { transform: rotate(180deg); }
.history-toggle .count {
  background: var(--brand-soft); color: var(--brand-deep);
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
}
.history-panel { display: none; animation: fadeIn .3s; margin-bottom: 18px; }
.history-panel.show { display: block; }

/* Compact hero */
.hero-slim {
  padding: 18px 22px !important;
  margin-bottom: 14px !important;
  gap: 14px !important;
}
.hero-slim h2 { font-size: 18px !important; margin-bottom: 4px !important; }
.hero-slim p { font-size: 12.5px !important; line-height: 1.55 !important; max-width: 720px !important; }
.hero-slim .icon-wrap { width: 48px !important; height: 48px !important; font-size: 24px !important; border-radius: 12px !important; }

/* Tip / 안내 patch */
.tip {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde047;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.7;
}
.tip strong { color: #92400e; font-weight: 800; }
.tip .kbd { display: inline-block; padding: 2px 8px; background: #fff; border: 1px solid #d97706; border-radius: 5px; font-family: ui-monospace,monospace; font-size: 11px; color: #78350f; font-weight: 700; }

.edit-counter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: #fff;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  letter-spacing: -.005em;
}
.edit-counter .n {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--accent), #b8945a);
  color: var(--brand-deep);
  border-radius: 50%;
  font-weight: 900;
  font-size: 12px;
  padding: 0 6px;
}
.edit-counter.zero { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.edit-counter.zero .n { background: #fff; color: #6b7280; }

.history-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 280px; overflow-y: auto;
}
.history-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 14px;
  background: #fafbfa;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: 12.5px;
}
.history-row .when {
  font-family: ui-monospace,monospace;
  font-size: 11px; color: var(--ink-muted);
  white-space: nowrap;
}
.history-row .topic {
  font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history-row .meta {
  font-size: 11px;
  color: var(--ink-muted);
  font-family: ui-monospace,monospace;
}
.history-row .ai-tag { background: #5eead4; color: var(--brand-deep); padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; }

/* One-click auto build CTA */
.magic-build {
  background:
    radial-gradient(ellipse at top right, rgba(251,191,36,.3) 0%, transparent 50%),
    linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 50%, #5eead4 100%);
  border: none;
  color: #fff !important;
  padding: 16px 28px !important;
  border-radius: 16px;
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: -.01em;
  cursor: pointer;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(15,118,110,.4), inset 0 1px 0 rgba(255,255,255,.2);
  transition: all .25s cubic-bezier(.4,0,.2,1);
  display: inline-flex; align-items: center; gap: 10px;
}
.magic-build:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 36px rgba(15,118,110,.55), inset 0 1px 0 rgba(255,255,255,.3);
}
.magic-build:disabled { opacity: .6; cursor: wait; transform: none !important; }
.magic-build::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%);
  transform: translateX(-100%);
}
.magic-build:hover::before { animation: shineSweep 1s ease; }
@keyframes shineSweep { to { transform: translateX(100%); } }
.magic-build .sparkle {
  font-size: 22px;
  animation: sparkle 2s ease-in-out infinite;
}
@keyframes sparkle {
  0%,100% { transform: rotate(0) scale(1); }
  25%     { transform: rotate(15deg) scale(1.2); }
  50%     { transform: rotate(-10deg) scale(.95); }
  75%     { transform: rotate(8deg) scale(1.1); }
}

.magic-bar {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px dashed var(--accent);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
  position: relative;
}
.magic-bar .desc { flex: 1; min-width: 220px; }
.magic-bar .desc h3 {
  font-size: 15px; font-weight: 800; color: #78350f;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
}
.magic-bar .desc p { font-size: 12.5px; color: #92400e; line-height: 1.55; margin: 0; }

/* 페이지 상시 기획 입력 카드 */
.plan-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fde047;
  border-radius: 16px;
  padding: 0;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}
.plan-card .pc-head {
  padding: 14px 20px;
  background: linear-gradient(135deg, #c9a86a, #b8945a);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.plan-card .pc-head h2 {
  font-size: 14px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  color: #fff !important;
}
.plan-card .pc-body { padding: 18px 20px; }
.plan-card textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 13px;
  background: #fff;
  resize: vertical;
  line-height: 1.7;
}
.plan-card textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-glow); }

.pds-mini {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(20,184,166,.08);
  border: 1.5px dashed var(--brand-2);
  border-radius: 10px;
}
.pds-mini .row {
  display: grid;
  grid-template-columns: 2fr 70px 1fr auto;
  gap: 8px; align-items: end;
}
.pds-mini select, .pds-mini input {
  width: 100%; padding: 8px 10px;
  border: 1.5px solid #99f6e4; border-radius: 8px;
  font-size: 12px; background: #fff;
}
.pds-mini .pds-manual-list {
  display: none; margin-top: 10px;
  max-height: 160px; overflow-y: auto;
  padding: 8px; background: #fff;
  border: 1px solid #99f6e4; border-radius: 8px;
}
.plan-card .saved-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.25); font-weight: 700;
}

/* ============================================================
   Progress Overlay (Build progress, big animation)
   ============================================================ */
.progress-overlay {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(20,184,166,.18) 0%, rgba(7,30,25,.92) 60%),
    rgba(7,30,25,.85);
  backdrop-filter: blur(14px);
  display: grid; place-items: center;
  z-index: 9700;
  animation: fadeIn .35s ease-out;
  padding: 24px;
}
.progress-overlay.exit { animation: fadeOut .35s ease-in forwards; }
.progress-card {
  background: linear-gradient(135deg, rgba(15,61,52,.97), rgba(7,30,25,.99));
  border: 1px solid rgba(94,234,212,.3);
  border-radius: 24px;
  padding: 40px 36px 32px;
  color: #fff;
  text-align: center;
  max-width: 500px; width: 100%;
  box-shadow: 0 40px 100px rgba(0,0,0,.5);
  position: relative; overflow: hidden;
  animation: pop .5s cubic-bezier(.34,1.56,.64,1);
}
.progress-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-2) 50%, transparent);
  animation: scanline 2.5s linear infinite;
}

.progress-spinner {
  position: relative;
  width: 100px; height: 100px;
  margin: 0 auto 24px;
}
.progress-spinner .orb {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(94,234,212,.9), rgba(13,148,136,.6) 50%, rgba(13,148,136,0) 70%);
  filter: drop-shadow(0 0 30px rgba(94,234,212,.7));
  animation: orbPulse 2s ease-in-out infinite;
}
.progress-spinner .orb-trail {
  position: absolute; inset: -10px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--brand-2);
  animation: spin 2s linear infinite;
}
.progress-spinner::after {
  content: '✨'; position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 36px;
  animation: sparkle 3s ease-in-out infinite;
}
@keyframes orbPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.1); opacity: .85; }
}

.progress-title {
  font-size: 20px; font-weight: 800;
  margin-bottom: 8px; letter-spacing: -.01em;
}
.progress-sub {
  font-size: 13.5px; color: #a7d7c8;
  line-height: 1.6;
  margin-bottom: 22px;
  min-height: 22px;
}

.progress-steps {
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
  background: rgba(0,0,0,.2);
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(94,234,212,.15);
}
.prog-step {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0;
  color: rgba(255,255,255,.45);
  font-size: 13px;
  transition: all .3s;
}
.prog-step.active { color: #fff; font-weight: 700; transform: translateX(4px); }
.prog-step.done { color: rgba(255,255,255,.85); }
.prog-step .mark {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.25);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 900;
  flex-shrink: 0;
  transition: all .3s;
}
.prog-step.active .mark {
  border-color: var(--brand-2);
  background: rgba(94,234,212,.2);
  box-shadow: 0 0 12px var(--brand-glow);
}
.prog-step.active .mark::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-2); animation: blink 1s ease infinite;
}
.prog-step.done .mark {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  border-color: var(--brand-2); color: var(--brand-deep);
}
.prog-step.done .mark::after { content: '✓'; font-weight: 900; font-size: 12px; }

.progress-meta {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(167,215,200,.6);
  font-family: ui-monospace, monospace;
  letter-spacing: .05em;
  min-height: 14px;
}

/* ============================================================
   Install page — tag picker + prominent inputs + visible AI
   ============================================================ */
.tag-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px;
}
.tag-pick {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 18px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 13.5px; font-weight: 600;
  color: var(--ink);
  transition: all .2s cubic-bezier(.4,0,.2,1);
  font-family: inherit;
  position: relative;
}
.tag-pick:hover {
  border-color: var(--brand-2);
  background: var(--brand-soft);
  color: var(--brand-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tag-pick.selected {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 18px rgba(15,118,110,.45), inset 0 1px 0 rgba(255,255,255,.2);
  transform: translateY(-1px);
}
.tag-pick.selected::before {
  content: '✓'; font-weight: 900; color: #5eead4; margin-right: 2px;
}
.tag-pick .meta {
  font-size: 11px; opacity: .7; font-weight: 500;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(0,0,0,.05);
}
.tag-pick.selected .meta { background: rgba(255,255,255,.15); opacity: .9; }

/* prominent input style for AGENT REBOM form */
.field-prominent label {
  font-size: 13px !important; font-weight: 800 !important;
  color: var(--brand-deep) !important;
  display: flex; align-items: center; gap: 6px;
}
.field-prominent label .num {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  font-size: 11px; font-weight: 900;
}
.field-prominent input[type="text"] {
  font-size: 17px !important;
  padding: 14px 18px !important;
  border-width: 2px !important;
  font-weight: 600;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfa 100%);
}
.field-prominent input[type="text"]:focus {
  background: #ffffff;
  border-color: var(--brand-2) !important;
  box-shadow: 0 0 0 5px var(--brand-glow), 0 4px 16px rgba(15,118,110,.15) !important;
}

/* AI suggestion box — more prominent */
.ai-inline.prominent {
  background:
    radial-gradient(ellipse at top right, rgba(201,168,106,.12) 0%, transparent 50%),
    linear-gradient(135deg, #ecfeff 0%, #f0fdfa 50%, #fefce8 100%);
  border: 2px solid var(--brand-2);
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 12px;
  position: relative;
  box-shadow: 0 4px 14px rgba(20,184,166,.12);
}
.ai-inline.prominent::before {
  content: 'AI'; position: absolute; top: -10px; right: 16px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px; font-weight: 900;
  letter-spacing: .12em;
  box-shadow: 0 4px 10px var(--brand-glow);
}
.ai-inline.prominent .head {
  font-size: 14px !important;
  margin-bottom: 12px !important;
}
.ai-inline.prominent .row input {
  padding: 11px 14px !important;
  font-size: 14px !important;
  border-width: 2px !important;
}
.ai-inline.prominent .row .btn {
  padding: 11px 18px;
  font-size: 13px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px var(--brand-glow);
  font-weight: 800;
}

/* Hamburger trigger */
.hamburger {
  display: none;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hamburger:hover { border-color: var(--brand); }
.hamburger svg { width: 18px; height: 18px; color: var(--brand-deep); }

.sidebar-scrim {
  display: none;
  position: fixed; inset: 0;
  background: rgba(7,30,25,.55); backdrop-filter: blur(4px);
  z-index: 9;
}
.sidebar-scrim.show { display: block; animation: fadeIn .2s; }

/* ============================================================
   Site Builder
   ============================================================ */
.builder-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.site-picker {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.site-picker label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; }
.site-picker select { margin-top: 8px; }
.selection-summary {
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
}
.selection-summary::before {
  content: ''; position: absolute; right: -20px; bottom: -20px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(201,168,106,.2) 0%, transparent 70%);
  border-radius: 50%;
}
.selection-summary .count {
  font-size: 38px; font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.selection-summary .info { flex: 1; }
.selection-summary .info .lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #c6e0d6; font-weight: 700; }
.selection-summary .info .name { font-size: 15px; font-weight: 700; margin-top: 4px; font-family: ui-monospace,monospace; }

.cat-tabs {
  display: flex; gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.cat-tab {
  flex-shrink: 0;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s;
  color: var(--ink-soft);
}
.cat-tab:hover { border-color: var(--brand); color: var(--brand-deep); }
.cat-tab.active {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(15,118,110,.35);
}
.cat-tab .badge {
  background: rgba(255,255,255,.2);
  color: inherit;
  font-size: 10px;
  padding: 1px 7px;
  font-weight: 800;
}
.cat-tab:not(.active) .badge { background: var(--brand-soft); color: var(--brand-deep); }

.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.comp-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 14px;
  cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
}
.comp-card:hover {
  border-color: var(--brand-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.comp-card.added {
  border-color: var(--brand-2);
  background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 70%);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.comp-card.added::after {
  content: '✓ 추가됨';
  position: absolute; top: 8px; right: 8px;
  background: var(--good); color: #fff;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  animation: pop .3s ease-out;
}
.comp-card .ic {
  font-size: 28px;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--brand-soft), #fff);
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.comp-card.added .ic {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
}
.comp-card .nm {
  font-size: 14px; font-weight: 800; color: var(--ink);
  letter-spacing: -.01em;
}
.comp-card .dc {
  font-size: 12px; color: var(--ink-muted);
  line-height: 1.5;
  flex: 1;
}
.comp-card .tags {
  display: flex; gap: 5px; flex-wrap: wrap;
  margin-top: 4px;
}
.comp-card .tag {
  font-size: 9px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f4; color: var(--ink-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Site info panel */
.site-info {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.si-head {
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 100%);
  color: #fff;
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.si-head .url {
  font-family: ui-monospace, monospace;
  font-size: 15px; font-weight: 700;
  word-break: break-all;
}
.si-head .url a { color: #5eead4; text-decoration: none; }
.si-head .url a:hover { text-decoration: underline; opacity: 1; }
.si-head .open-btn {
  background: rgba(255,255,255,.15);
  color: #fff !important; border: 1px solid rgba(255,255,255,.2);
  padding: 8px 16px; border-radius: 9px;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  transition: all .15s;
  text-decoration: none;
}
.si-head .open-btn:hover { background: rgba(255,255,255,.25); opacity: 1; }

.si-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
}
.si-cell {
  padding: 14px 20px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.si-cell:nth-child(2n) { border-right: none; }
@media (max-width: 900px) { .si-cell { border-right: none !important; } }
.si-cell .lbl {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 700;
}
.si-cell .val {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px;
}
.si-cell .val-text {
  flex: 1; min-width: 0;
  font-family: ui-monospace, monospace;
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.si-cell .val-text.secret { letter-spacing: 2px; }
.si-cell .copy {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.si-cell .copy:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: var(--brand-soft);
}
.si-cell.full { grid-column: 1 / -1; border-right: none !important; }
.si-section-label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-deep); font-weight: 800;
  padding: 14px 20px 10px;
  background: linear-gradient(90deg, rgba(20,184,166,.08), transparent);
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 7px;
}

.chip-mini {
  display: inline-flex; align-items: center;
  font-size: 11px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.builder-bar {
  position: sticky; bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 20px;
  margin-top: 24px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 14px 40px rgba(15,23,42,.12);
  z-index: 4;
}
.builder-bar .selected-preview { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.builder-bar .chip-mini {
  font-size: 11px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
  :root { --sidebar-w: 240px; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    z-index: 10;
    box-shadow: 8px 0 30px rgba(7,30,25,.4);
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar h1 { font-size: 15px; gap: 8px; }
  .topbar h1 .pill { font-size: 9px; padding: 3px 8px; }
  .topbar .right { display: none; }
  .content { padding: 18px 14px; }

  /* Hero shrinks */
  .hero { padding: 22px 20px; gap: 16px; border-radius: 16px; }
  .hero .icon-wrap { width: 52px; height: 52px; font-size: 24px; border-radius: 14px; }
  .hero h2 { font-size: 19px; margin-bottom: 6px; }
  .hero p { font-size: 12.5px; }

  /* Card head: stack vertically on mobile so RECALL button is visible */
  .card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 16px;
  }
  .card-head h2 { font-size: 13px; }
  .card-head > button,
  .card-head > .btn,
  .card-head > a.btn {
    align-self: flex-start;
    width: auto;
  }
  .card-body { padding: 14px 16px; }

  /* Tables: horizontal scroll */
  .card-body[style*="padding:0"] { padding: 0 !important; }
  .table { font-size: 12px; min-width: 540px; }
  .table th, .table td { padding: 10px 10px; }
  /* table wrap */
  .card-body > table.table,
  .card > .card-body > table.table { display: block; }
  .card > div.card-body { overflow-x: auto; }

  /* Stat grid 2 cols on mobile */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
  .stat { padding: 14px 14px; }
  .stat .value { font-size: 24px; }
  .stat .label { font-size: 10px; }

  /* Stepper: compact */
  .stepper { padding: 14px 12px; }
  .stepper .step .num { width: 30px; height: 30px; font-size: 12px; }
  .stepper .step .label { font-size: 10px; }
  .stepper .line { margin: 0 6px; }

  /* TLD grid 1 col */
  .tld-grid { grid-template-columns: 1fr; gap: 10px; }

  /* AI inline row stacks */
  .ai-inline .row { flex-direction: column; }
  .ai-inline .row .btn { align-self: flex-start; }

  /* Agent modal mobile */
  #agentOverlay { padding: 12px; }
  .agent-stage { padding: 22px 18px 18px; border-radius: 18px; }
  .agent-stage h2 { font-size: 15px; }
  .agent-stage .badge-live { padding: 3px 8px; font-size: 9px; }
  .agent-stage .target-info { font-size: 11px; }
  .robot-svg { width: 200px; height: 200px; }
  .robot-stage { min-height: 220px; padding: 8px 0 14px; }
  .module-list { max-height: 240px; }
  .module-row { padding: 8px 10px; font-size: 12px; gap: 9px; }
  .module-row .ko { font-size: 10px; }
  .module-row .meta { display: none; }
  .module-row .mark { width: 20px; height: 20px; font-size: 10px; }

  /* Toast: fit screen */
  #toastWrap { top: 12px; width: calc(100% - 24px); }
  .toast { min-width: 0; padding: 12px 14px; border-radius: 10px; }
  .toast .body .title { font-size: 13px; }
  .toast .body .msg { font-size: 12px; }

  /* Form: install fields */
  .field input, .field select, .field textarea { font-size: 14px; padding: 10px 12px; }
  .field label { font-size: 12px; }

  /* Records: add form wraps */
  form[onsubmit*="addRecord"] { grid-template-columns: 1fr !important; }

  /* Confirm modal mobile */
  .confirm-card { padding: 20px; border-radius: 14px; }
  .confirm-card h3 { font-size: 16px; }
  .confirm-card p { font-size: 12.5px; }

  /* Buttons in action cells */
  .table td .btn-sm { padding: 5px 7px; font-size: 11px; }
}

@media (max-width: 500px) {
  .stat-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 14px; }
  .topbar h1 .pill { display: none; }
  .stepper .step .label { display: none; }
  .robot-svg { width: 170px; height: 170px; }
  .agent-actions { flex-direction: column; }
  .agent-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 900px) {
  .builder-top { grid-template-columns: 1fr; }
  .comp-grid { grid-template-columns: 1fr; }
  .cat-tabs { padding-bottom: 8px; }
  .builder-bar { flex-direction: column; align-items: stretch; }
}
