:root {
  --bg: #0f172a;
  --bg-panel: #111827;
  --bg-card: #1e293b;
  --bg-card-hover: #263349;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --orange-3bb: #ff6b00;
  --green-ais: #74b72e;
  --green-line: #06c755;
  --blue-accent: #38bdf8;
  --amber: #f59e0b;
  --danger: #ef4444;
  --line-chat-bg: #8cabd9;
  --radius: 12px;
  --font-sans: 'Prompt', 'Segoe UI', Tahoma, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at top left, #172554 0%, var(--bg) 45%, #090d16 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* Topbar */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.badge-3bb {
  background: var(--orange-3bb);
  color: #fff;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.badge-plus {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.badge-ais {
  background: var(--green-ais);
  color: #0b1a00;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.topbar h1 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}

.subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-pill.online {
  border-color: rgba(6, 199, 85, 0.45);
  color: #6ee7b7;
}
.status-pill.online .dot {
  background: var(--green-line);
  box-shadow: 0 0 8px var(--green-line);
}

.status-pill.offline {
  border-color: rgba(245, 158, 11, 0.45);
  color: #fcd34d;
}
.status-pill.offline .dot {
  background: var(--amber);
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.16s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange-3bb), #e05300);
  color: #fff;
}
.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-outline {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--bg-card-hover);
}

.btn-danger-outline {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.18);
}

.btn-xs {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-xs:hover {
  color: #fff;
  border-color: var(--blue-accent);
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* Mobile Tabs */
.mobile-tabs {
  display: none;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  gap: 8px;
}

.mobile-tab {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}
.mobile-tab.active {
  background: var(--orange-3bb);
  color: #fff;
  border-color: var(--orange-3bb);
  font-weight: 600;
}

/* Workspace 3 Columns */
.workspace {
  display: grid;
  grid-template-columns: 380px minmax(360px, 1.15fr) minmax(320px, 0.95fr);
  gap: 14px;
  padding: 14px 18px 20px;
  flex: 1;
  align-items: start;
}

.panel {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.65);
}

.panel-header h2 {
  font-size: 0.96rem;
  font-weight: 600;
}
.panel-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tag-line, .tag-tech, .tag-crm {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.tag-line {
  background: rgba(6, 199, 85, 0.16);
  color: #4ade80;
  border: 1px solid rgba(6, 199, 85, 0.35);
}
.tag-tech {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.tag-crm {
  background: rgba(255, 107, 0, 0.16);
  color: #fdba74;
  border: 1px solid rgba(255, 107, 0, 0.35);
}

/* Sim Controls */
.sim-controls {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-row label {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.control-row select,
.control-row input {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 9px;
  outline: none;
}

.control-row select:focus,
.control-row input:focus {
  border-color: var(--orange-3bb);
}

/* Phone Frame */
.phone-frame {
  background: #0b101d;
  border: 3px solid #334155;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 625px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.phone-notch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 18px;
  background: #1b2436;
  font-size: 0.7rem;
  color: #cbd5e1;
}

.phone-speaker {
  width: 64px;
  height: 5px;
  background: #0f172a;
  border-radius: 99px;
}

.line-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: #222b3d;
  border-bottom: 1px solid #334155;
}

.line-back {
  font-size: 1.35rem;
  color: #cbd5e1;
  line-height: 1;
}

.line-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-3bb), var(--green-ais));
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.line-title-wrap {
  flex: 1;
  min-width: 0;
}

.line-title {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.verified-shield {
  background: var(--green-line);
  color: #fff;
  font-size: 0.62rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}

.line-sub {
  font-size: 0.68rem;
  color: #94a3b8;
}

.line-reset-chat {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #e2e8f0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
}
.line-reset-chat:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Pre-Follow Screen */
.pre-follow-screen {
  flex: 1;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  display: grid;
  place-items: center;
  padding: 20px;
}

.oa-card {
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.oa-avatar-lg {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-3bb), var(--green-ais));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
}
.oa-avatar-lg span {
  font-size: 0.72rem;
}

.oa-card h3 {
  font-size: 1rem;
}

.oa-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.oa-campaign-pill {
  font-size: 0.72rem;
  background: #0f172a;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  color: #cbd5e1;
}
.oa-campaign-pill strong {
  color: var(--amber);
}

.btn-line-add {
  margin-top: 4px;
  width: 100%;
  background: var(--green-line);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(6, 199, 85, 0.32);
  transition: transform 0.15s ease;
}
.btn-line-add:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.oa-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Active LINE Chat */
.line-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--line-chat-bg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-row {
  display: flex;
  gap: 7px;
  align-items: flex-end;
  max-width: 92%;
}

.msg-row.bot {
  align-self: flex-start;
}

.msg-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange-3bb);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.msg-bubble {
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 0.77rem;
  line-height: 1.45;
  white-space: pre-line;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.msg-row.bot .msg-bubble {
  background: #ffffff;
  color: #0f172a;
  border-top-left-radius: 4px;
}

.msg-row.user .msg-bubble {
  background: #8de055;
  color: #0b1a00;
  border-top-right-radius: 4px;
}

.msg-time {
  font-size: 0.62rem;
  color: #1e293b;
  opacity: 0.75;
  white-space: nowrap;
}

/* Voucher Card inside Chat */
.flex-card {
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  width: 252px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  font-size: 0.75rem;
}

.flex-card-head {
  background: linear-gradient(135deg, var(--orange-3bb), #ff8c24);
  color: #fff;
  padding: 8px 11px;
  font-weight: 600;
}
.flex-card-head.green {
  background: linear-gradient(135deg, #16a34a, var(--green-ais));
}

.flex-card-body {
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.voucher-box {
  background: #fff7ed;
  border: 1px dashed var(--orange-3bb);
  border-radius: 8px;
  padding: 7px 10px;
  text-align: center;
}
.voucher-code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #c2410c;
  letter-spacing: 0.8px;
}
.voucher-ssid {
  font-size: 0.68rem;
  color: #475569;
}

.flex-btn {
  border: none;
  border-radius: 7px;
  padding: 6px 8px;
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  background: #0f172a;
  color: #fff;
}
.flex-btn.accent {
  background: var(--orange-3bb);
}
.flex-btn.line {
  background: var(--green-line);
}

/* Bundle Carousel inside Chat */
.carousel-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 280px;
}
.carousel-item {
  min-width: 205px;
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
}
.carousel-item-head {
  padding: 7px 10px;
  background: #0f172a;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
}
.carousel-item-head span {
  color: var(--orange-3bb);
}
.carousel-item-body {
  padding: 8px 10px;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.price-tag {
  font-size: 0.9rem;
  font-weight: 700;
  color: #c2410c;
}

/* Quick Replies */
.quick-replies {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  background: rgba(15, 23, 42, 0.18);
}

.qr-chip {
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-weight: 500;
  cursor: pointer;
}
.qr-chip:hover {
  background: #fff;
}

/* Rich Menu */
.rich-menu-bar {
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  padding: 5px 6px 7px;
}

.rich-menu-label {
  font-size: 0.64rem;
  color: #475569;
  text-align: center;
  margin-bottom: 4px;
  font-weight: 500;
}

.rich-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.rm-btn {
  font-family: var(--font-sans);
  border: none;
  border-radius: 8px;
  padding: 7px 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  transition: filter 0.14s ease, transform 0.12s ease;
}
.rm-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.rm-icon {
  font-size: 1.05rem;
}
.rm-text {
  font-size: 0.69rem;
  line-height: 1.2;
  font-weight: 600;
}

.rm-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.rm-green { background: linear-gradient(135deg, #16a34a, #15803d); }
.rm-blue { background: linear-gradient(135deg, #0284c7, #0369a1); }
.rm-dark { background: linear-gradient(135deg, #334155, #1e293b); }

/* Center & Right Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
}

.card-header-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

/* Architecture Pipeline */
.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.pipe-step {
  flex: 1;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 4px;
  text-align: center;
  transition: 0.2s ease;
}

.pipe-step.active {
  border-color: var(--green-line);
  background: rgba(6, 199, 85, 0.16);
  box-shadow: 0 0 12px rgba(6, 199, 85, 0.25);
  transform: translateY(-2px);
}

.pipe-icon {
  font-size: 1rem;
}

.pipe-label {
  font-size: 0.66rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.pipe-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pipeline-log {
  font-size: 0.74rem;
  color: #93c5fd;
  background: #0f172a;
  border-left: 3px solid var(--blue-accent);
  padding: 7px 9px;
  border-radius: 6px;
}

/* Lampang SVG Map */
.map-legend {
  display: flex;
  gap: 9px;
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.leg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.leg i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-t1 { background: var(--orange-3bb); }
.dot-t2 { background: var(--green-ais); }
.dot-t3 { background: var(--blue-accent); }
.dot-cust { background: #f43f5e; }

.map-container {
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

#lampang-map {
  width: 100%;
  height: auto;
  display: block;
}

.nearest-banner {
  font-size: 0.75rem;
  background: rgba(255, 107, 0, 0.1);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fed7aa;
  line-height: 1.4;
}

/* JSON Code Inspector */
.json-code {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  line-height: 1.45;
  background: #090d16;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  color: #a5f3fc;
  overflow-x: auto;
  max-height: 225px;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}
.kpi-val {
  font-size: 1.15rem;
  font-weight: 700;
}
.kpi-lbl {
  font-size: 0.66rem;
  color: var(--text-muted);
}
.kpi-ready .kpi-val { color: #4ade80; }
.kpi-contacted .kpi-val { color: #38bdf8; }
.kpi-installed .kpi-val { color: var(--orange-3bb); }

/* Group Alert Feed */
.badge-live {
  font-size: 0.66rem;
  background: rgba(6, 199, 85, 0.18);
  color: #4ade80;
  padding: 2px 7px;
  border-radius: 999px;
}

.group-alert-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 165px;
  overflow-y: auto;
}

.alert-empty {
  font-size: 0.74rem;
  color: var(--text-muted);
  padding: 8px;
  background: #0f172a;
  border-radius: 8px;
}

.alert-item {
  background: #0f172a;
  border-left: 3px solid var(--green-line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.73rem;
  line-height: 1.42;
  white-space: pre-line;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Leads List */
.badge-count {
  font-size: 0.7rem;
  color: #cbd5e1;
  background: #0f172a;
  padding: 2px 8px;
  border-radius: 999px;
}

.leads-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 390px;
  overflow-y: auto;
}

.lead-item {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.lead-item:hover {
  border-color: var(--blue-accent);
}
.lead-item.selected {
  border-color: var(--orange-3bb);
  background: rgba(255, 107, 0, 0.06);
}

.lead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.lead-name {
  font-size: 0.8rem;
  font-weight: 600;
}
.lead-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.38;
}

.lead-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.status-select {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: #fff;
}

.pill-campaign {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  padding: 2px 6px;
  border-radius: 5px;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.modal-header h3 {
  font-size: 0.96rem;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.modal-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.preset-btn {
  font-family: var(--font-sans);
  text-align: left;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--text);
  cursor: pointer;
  transition: 0.15s ease;
}
.preset-btn:hover {
  border-color: var(--green-line);
  background: rgba(6, 199, 85, 0.08);
}
.preset-btn strong {
  display: block;
  font-size: 0.78rem;
}
.preset-btn span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.custom-coord-box {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.custom-title {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.coord-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 6px;
}
.coord-inputs input {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  padding: 6px 8px;
  background: #1e293b;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Tent Card Preview */
.qr-modal-card {
  max-width: 440px;
}
.tent-card-preview {
  background: linear-gradient(165deg, #fff7ed 0%, #ffffff 55%, #ecfdf5 100%);
  color: #0f172a;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.tent-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tent-tag {
  background: #0f172a;
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.tent-card-preview h4 {
  font-size: 1.05rem;
  line-height: 1.3;
  color: #9a3412;
}
.tent-card-preview p {
  font-size: 0.76rem;
  color: #334155;
}
.qr-render-box {
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  display: grid;
  place-items: center;
}
.tent-url {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #475569;
}
.tent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Responsive */
@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .mobile-tabs {
    display: flex;
  }
  .panel {
    display: none;
  }
  .panel.active-tab {
    display: flex;
  }
  .phone-frame {
    max-width: 390px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .preset-grid,
  .coord-inputs {
    grid-template-columns: 1fr;
  }
}

