:root {
  --ink: #17191b;
  --ink-soft: #4f5660;
  --muted: #78818c;
  --line: #e2e5e8;
  --line-strong: #cbd0d6;
  --canvas: #f5f6f7;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --sidebar: #181a1c;
  --sidebar-2: #212426;
  --sidebar-text: #dce0e5;
  --yellow: #ffc400;
  --yellow-deep: #e5aa00;
  --yellow-soft: #fff6cc;
  --green: #148d4d;
  --green-soft: #def7e8;
  --blue: #2367d1;
  --blue-soft: #e6efff;
  --red: #c83c37;
  --red-soft: #ffe8e7;
  --shadow-sm: 0 1px 2px rgba(18, 24, 30, 0.05), 0 3px 12px rgba(18, 24, 30, 0.035);
  --shadow-md: 0 16px 40px rgba(21, 26, 31, 0.09), 0 2px 8px rgba(21, 26, 31, 0.04);
  --radius: 10px;
  --sidebar-width: 224px;
  --topbar-height: 64px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
select,
textarea { font: inherit; }

button { cursor: pointer; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(35, 103, 209, 0.38);
  outline-offset: 2px;
}

a { color: inherit; text-decoration: none; }

svg { display: block; }

.noscript-message {
  max-width: 560px;
  margin: 12vh auto;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: var(--sidebar-text);
}

.brand-lockup {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: var(--yellow);
  color: var(--ink);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -1.35px;
  line-height: 1;
}

.wordmark .mark {
  display: inline-block;
  padding: 4px 6px 5px;
  background: var(--yellow);
  border: 2px solid currentColor;
  border-right-width: 1px;
  border-radius: 4px 0 0 4px;
  letter-spacing: -1.1px;
}

.wordmark .one {
  display: inline-block;
  padding: 5px 7px 6px 5px;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  font-style: italic;
  letter-spacing: -1.2px;
}

.wordmark--large { font-size: 27px; }
.wordmark--small { font-size: 16px; }
.wordmark--small .mark { padding: 3px 4px; border-width: 1.5px; }
.wordmark--small .one { padding: 3px 5px 4px 3px; border-width: 1.5px; }

.sidebar-nav {
  flex: 1;
  padding: 18px 10px 14px;
  overflow-y: auto;
}

.nav-group-label {
  margin: 9px 12px 8px;
  color: #7d848b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin: 3px 0;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b9bec4;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link:active { transform: translateY(1px); }
.nav-link.is-active { background: var(--yellow); color: var(--ink); }
.nav-link .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-link .nav-count { margin-left: auto; color: inherit; opacity: .65; font-size: 12px; }

.sidebar-footer {
  margin: 10px;
  padding: 14px 13px;
  border: 1px solid #383d41;
  border-radius: 9px;
  background: #222527;
}

.sidebar-footer .btn { border-color: #4a4f53; color: #fff; }
.sidebar-footer .btn:hover { border-color: #747a7f; background: #2d3134; }

.support-title { display: flex; align-items: center; gap: 8px; color: var(--yellow); font-weight: 800; }
.support-title .icon { width: 18px; height: 18px; }
.support-copy { margin: 7px 0 12px; color: #a9afb6; font-size: 12px; line-height: 1.5; }

.main-shell { min-height: 100vh; margin-left: var(--sidebar-width); }

.topbar {
  position: sticky;
  z-index: 12;
  top: 0;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mobile-menu-button, .topbar-icon, .user-menu { border: 0; background: transparent; color: var(--ink); }
.mobile-menu-button { display: none; padding: 7px; border-radius: 6px; }
.topbar-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-left: 1px solid var(--line); padding-left: 15px; box-sizing: content-box; }
.topbar-icon .icon { width: 19px; height: 19px; }

.breadcrumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.breadcrumbs span:last-child { overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; }
.breadcrumbs .icon { width: 14px; height: 14px; color: #a2a8ae; }

.user-menu { display: flex; align-items: center; gap: 9px; padding: 4px 0 4px 10px; border-left: 1px solid var(--line); text-align: left; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #2c3135; color: #fff; font-size: 11px; font-weight: 800; }
.user-meta { display: grid; gap: 0; line-height: 1.2; }
.user-meta strong { font-size: 12px; }
.user-meta span { color: var(--muted); font-size: 11px; }
.user-menu > .icon { width: 15px; height: 15px; color: var(--muted); }

.page-content { padding: 28px 28px 48px; }
.content-wrap { max-width: 1500px; margin: 0 auto; }

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 9px 12px;
  background: #fffaf0;
  border: 1px solid #f2df9b;
  border-radius: 8px;
  color: #6c5d2b;
  font-size: 12px;
}
.demo-banner strong { color: #3d3620; }
.demo-banner .icon { width: 16px; height: 16px; flex: 0 0 auto; }
.demo-banner > span { display: inline-flex; align-items: center; gap: 8px; }
.demo-banner button { padding: 0; border: 0; background: none; color: #685200; font-weight: 800; text-decoration: underline; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.05; letter-spacing: -.055em; }
.page-heading p { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn:hover { border-color: #9ca4ad; box-shadow: 0 2px 7px rgba(18,24,30,.08); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--yellow); border-color: var(--yellow); }
.btn--primary:hover { background: #f6ba00; border-color: #f6ba00; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--dark:hover { background: #303438; border-color: #303438; }
.btn--danger { background: #fff; border-color: #e9a2a0; color: var(--red); }
.btn--danger:hover { background: var(--red-soft); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { border-color: var(--line); background: var(--surface-soft); }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 11px; }
.btn--square { width: 34px; padding: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card--flush { overflow: hidden; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 14px; }
.card-header h2, .card-header h3 { margin: 0; letter-spacing: -.035em; }
.card-header h2 { font-size: 16px; }
.card-header h3 { font-size: 14px; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 0 18px 18px; }
.card-header + .card-body { padding-top: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.stat-card { min-height: 118px; padding: 15px 16px; }
.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: #f0f2f4; color: var(--ink); }
.stat-icon .icon { width: 19px; height: 19px; }
.stat-icon--yellow { background: var(--yellow-soft); color: #a67d00; }
.stat-icon--green { background: var(--green-soft); color: var(--green); }
.stat-icon--blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon--red { background: var(--red-soft); color: var(--red); }
.stat-value { margin: 11px 0 0; font-size: 27px; font-weight: 850; letter-spacing: -.065em; line-height: 1; }
.stat-label { margin-top: 5px; color: var(--muted); font-size: 12px; }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; margin-top: 8px; color: var(--green); font-size: 11px; font-weight: 800; }
.stat-trend .icon { width: 13px; height: 13px; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 13px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.toolbar > .select { width: auto; min-width: 135px; flex: 0 1 160px; }
.toolbar > .btn { flex: 0 0 auto; }
.search-field { position: relative; flex: 1 1 190px; min-width: 150px; }
.search-field .icon { position: absolute; top: 50%; left: 11px; width: 16px; height: 16px; color: var(--muted); transform: translateY(-50%); }
.input, .select, .textarea { width: 100%; min-height: 37px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--ink); font-size: 12px; }
.search-field .input { padding-left: 34px; }
.textarea { min-height: 82px; padding-top: 9px; resize: vertical; }
.input::placeholder { color: #9ba2aa; }
.input:hover, .select:hover, .textarea:hover { border-color: #9ea7b0; }
.input:disabled, .select:disabled { background: #f0f2f4; color: #8a929b; cursor: not-allowed; }
.select { appearance: auto; }
.field { display: grid; gap: 6px; }
.field label, .field-label { color: #535c66; font-size: 11px; font-weight: 700; }
.field-hint { color: var(--muted); font-size: 10px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }

.status-chip { display: inline-flex; align-items: center; gap: 6px; width: max-content; min-height: 25px; padding: 0 9px; border-radius: 999px; background: #eef0f2; color: #5c6670; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-chip::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.status-chip--active { background: var(--green-soft); color: var(--green); }
.status-chip--draft { background: var(--blue-soft); color: var(--blue); }
.status-chip--paused { background: #f0f1f2; color: #69727c; }
.status-chip--warning { background: var(--yellow-soft); color: #9b7700; }
.status-chip--error { background: var(--red-soft); color: var(--red); }

.table-wrap { overflow: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.data-table th { padding: 11px 13px; background: #fbfcfc; color: #7a838d; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px 13px; border-top: 1px solid #edf0f2; color: #30363c; font-size: 12px; vertical-align: middle; }
.data-table td > .icon { display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover, .data-table tbody tr.is-selected { background: #fff9dc; }
.data-table tbody tr.is-selected { box-shadow: inset 3px 0 0 var(--yellow); }
.data-table .checkbox { width: 16px; height: 16px; accent-color: var(--yellow-deep); }
.table-primary { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.table-primary > .table-thumb { flex: 0 0 auto; }
.table-thumb { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(145deg, #fff7c6, #f4be00); color: var(--ink); }
.table-thumb .icon { width: 17px; height: 17px; }
.table-primary strong { display: block; font-size: 12px; }
.table-primary span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.table-action { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); }
.table-action:hover { border-color: var(--line); background: #fff; color: var(--ink); }
.table-action .icon { width: 16px; height: 16px; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 16px; }
.activity-list { display: grid; gap: 0; }
.activity-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: start; gap: 10px; padding: 13px 0; border-bottom: 1px solid #eef0f2; }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--yellow-soft); color: #9c7600; }
.activity-dot .icon { width: 14px; height: 14px; }
.activity-item strong { font-size: 12px; }
.activity-item p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.activity-time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.progress-list { display: grid; gap: 15px; }
.progress-row { display: grid; gap: 7px; }
.progress-label { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.progress-label span:last-child { color: var(--muted); font-weight: 800; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #eef0f2; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--yellow); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 14px; align-items: start; }
.detail-panel { position: sticky; top: 84px; }
.detail-preview { display: flex; justify-content: center; padding: 4px 0 17px; }
.detail-rows { display: grid; gap: 0; margin-top: 4px; }
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #edf0f2; font-size: 11px; }
.detail-row span { color: var(--muted); }
.detail-row strong { text-align: right; }
.detail-actions { display: grid; gap: 7px; margin-top: 15px; }
.detail-actions .btn { width: 100%; }
.mini-code { margin-top: 16px; padding: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #f8fafb; color: #4d5660; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }

.empty-state { display: grid; place-items: center; gap: 7px; min-height: 220px; padding: 28px; color: var(--muted); text-align: center; }
.empty-state .icon { width: 30px; height: 30px; color: #a6adb5; }
.empty-state strong { color: var(--ink); }

.builder-layout { display: grid; grid-template-columns: 212px minmax(305px, 1fr) minmax(330px, 1.04fr) 256px; gap: 12px; align-items: start; }
.builder-panel { min-width: 0; overflow: hidden; }
.builder-panel .card-header { padding: 15px 14px 11px; }
.builder-panel .card-body { padding: 0 14px 14px; }
.builder-panel .card-header h2 { font-size: 15px; }
.builder-panel .card-header p { font-size: 11px; line-height: 1.35; }
.catalog-list { display: grid; gap: 6px; }
.catalog-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 8px; border: 1px solid #edf0f2; border-radius: 7px; background: #fbfcfc; color: var(--ink); text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.catalog-item:hover { border-color: #d1a900; background: #fffbed; transform: translateX(2px); }
.catalog-item:active { transform: translateX(2px) scale(.99); }
.catalog-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border-radius: 6px; background: #eff1f3; color: #4d555e; }
.catalog-icon .icon { width: 14px; height: 14px; }
.catalog-item-text { min-width: 0; }
.catalog-item-text strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-item-text span { display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-add { margin-left: auto; color: #a2a9b0; }
.catalog-add .icon { width: 13px; height: 13px; }

.component-list { display: grid; gap: 8px; }
.component-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.component-card:hover { border-color: #c3a830; }
.component-card.is-selected { border-color: #ddb600; box-shadow: 0 0 0 2px rgba(255,196,0,.18); }
.component-card.is-disabled { opacity: .58; }
.component-head { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 9px; }
.drag-handle { display: inline-grid; place-items: center; width: 18px; height: 22px; cursor: grab; color: #a5adb5; }
.drag-handle:active { cursor: grabbing; }
.drag-handle .icon { width: 14px; height: 14px; }
.component-head .catalog-icon { width: 24px; height: 24px; }
.component-name { flex: 1; min-width: 0; font-size: 11px; font-weight: 800; }
.component-meta { color: var(--muted); font-size: 10px; }
.component-body { display: grid; gap: 9px; padding: 0 10px 11px 38px; }
.component-body .field-row { gap: 8px; }
.component-remove { display: inline-grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #a2a9b0; }
.component-remove:hover { background: var(--red-soft); color: var(--red); }
.component-remove .icon { width: 14px; height: 14px; }
.component-drag-over { border-color: var(--yellow-deep); background: #fffaf0; }
.builder-empty { padding: 24px 12px; border: 1px dashed #c9cfd5; border-radius: 8px; color: var(--muted); font-size: 11px; text-align: center; }

.toggle { position: relative; display: inline-flex; align-items: center; width: 34px; height: 20px; flex: 0 0 auto; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { position: absolute; inset: 0; border-radius: 20px; background: #d5d9dd; transition: background .18s ease; }
.toggle-track::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); content: ""; transition: transform .18s ease; }
.toggle input:checked + .toggle-track { background: var(--yellow); }
.toggle input:checked + .toggle-track::after { transform: translateX(14px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid rgba(35,103,209,.3); outline-offset: 2px; }
.check-field { display: inline-flex; align-items: center; gap: 7px; color: #4f5962; font-size: 11px; }
.check-field input { width: 16px; height: 16px; margin: 0; accent-color: var(--yellow-deep); }
.check-field > .icon { width: 15px; height: 15px; flex: 0 0 auto; }

.preview-panel .card-body { padding-bottom: 16px; }
.preview-switcher, .segmented-control { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f5f6f7; }
.segment-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; flex: 1; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: #515a63; font-size: 11px; font-weight: 800; }
.segment-button:hover { background: #fff; }
.segment-button.is-active { background: var(--yellow); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segment-button .icon { width: 15px; height: 15px; }
.preview-stage { display: grid; place-items: center; min-height: 565px; margin-top: 11px; overflow: hidden; border: 1px solid #e7eaed; border-radius: 8px; background: radial-gradient(circle at 50% 10%, #fff 0, #f2f4f5 76%); }
.preview-stage.is-desktop { min-height: 360px; padding: 20px; }

.phone-shell { position: relative; width: 236px; height: 480px; padding: 7px; border: 7px solid #202427; border-radius: 33px; background: #151719; box-shadow: 0 17px 30px rgba(19, 24, 28, .22), inset 0 0 0 1px #60666b; }
.phone-shell::before { position: absolute; z-index: 2; top: 0; left: 50%; width: 92px; height: 17px; border-radius: 0 0 13px 13px; background: #151719; content: ""; transform: translateX(-50%); }
.phone-shell::after { position: absolute; top: 80px; right: -10px; width: 3px; height: 42px; border-radius: 0 3px 3px 0; background: #33383c; content: ""; }
.phone-screen { width: 100%; height: 100%; overflow: hidden; border-radius: 22px; background: var(--widget-bg, #fff); }
.desktop-preview-window { width: 100%; max-width: 470px; overflow: hidden; border: 1px solid #bcc2c8; border-radius: 11px; background: #fff; box-shadow: 0 15px 30px rgba(17,24,29,.16); }
.desktop-browser-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-bottom: 1px solid #e1e4e7; background: #f6f7f8; }
.browser-dot { width: 6px; height: 6px; border-radius: 50%; background: #b7bdc3; }
.browser-url { height: 12px; flex: 1; margin-left: 9px; border-radius: 3px; background: #e5e8ea; }

.preview-widget { --widget-primary: #ffc400; --widget-secondary: #1a1d1f; --widget-text: #191c1e; --widget-bg: #fff; --widget-radius: 10px; width: 100%; max-width: 310px; min-height: 430px; overflow: hidden; background: var(--widget-bg); color: var(--widget-text); font-family: var(--widget-font, Inter, ui-sans-serif, system-ui, sans-serif); }
.phone-screen .preview-widget { min-height: 100%; max-width: none; }
.preview-widget-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 13px 10px; background: var(--widget-primary); color: var(--widget-secondary); }
.preview-widget-top .wordmark { font-size: 16px; }
.preview-widget-top .wordmark .mark { border-width: 1.5px; padding: 3px 4px; }
.preview-widget-top .wordmark .one { border-width: 1.5px; padding: 3px 5px 4px 3px; }
.preview-vehicle { display: grid; place-items: center; width: 25px; height: 25px; }
.preview-vehicle .icon { width: 23px; height: 23px; }
.preview-widget-content { padding: 13px; }
.preview-widget h3 { margin: 0; font-size: 18px; letter-spacing: -.045em; line-height: 1.08; }
.preview-widget .preview-subtitle { margin: 4px 0 13px; color: #69737d; font-size: 10px; }
.preview-field { display: grid; gap: 4px; margin-top: 9px; }
.preview-field-label { color: var(--widget-text); font-size: 9px; font-weight: 750; }
.preview-required { color: #d13f36; }
.preview-input { display: flex; align-items: center; gap: 7px; min-height: 31px; padding: 0 8px; border: 1px solid #d9dde1; border-radius: 6px; background: #fff; color: #89919a; font-size: 9px; }
.preview-input .icon { width: 13px; height: 13px; flex: 0 0 auto; color: #5e6871; }
.preview-input .preview-input-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-toggle-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 9px; border: 1px solid #e0e3e5; border-radius: 7px; background: #fbfcfc; }
.preview-toggle-row > .icon { width: 16px; height: 16px; }
.preview-toggle-copy { min-width: 0; flex: 1; }
.preview-toggle-copy strong { display: block; font-size: 10px; }
.preview-toggle-copy span { display: block; margin-top: 2px; color: #8a929a; font-size: 8px; }
.preview-mini-toggle { width: 26px; height: 16px; border-radius: 99px; background: var(--widget-primary); }
.preview-mini-toggle::after { display: block; width: 10px; height: 10px; margin: 3px 3px 0 auto; border-radius: 50%; background: #fff; content: ""; }
.preview-cta { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; margin-top: 14px; border: 0; border-radius: var(--widget-radius); background: var(--widget-primary); color: var(--widget-secondary); font-size: 11px; font-weight: 850; }
.preview-cta .icon { width: 15px; height: 15px; }
.preview-divider { display: flex; align-items: center; gap: 7px; margin: 10px 0; color: #a0a7ae; font-size: 9px; }
.preview-divider::before, .preview-divider::after { height: 1px; flex: 1; background: #e4e7e9; content: ""; }
.preview-whatsapp { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; border: 1px solid #25a85a; border-radius: var(--widget-radius); color: #148c4a; font-size: 9px; font-weight: 800; }
.preview-whatsapp .icon { width: 14px; height: 14px; }
.preview-footnote { display: flex; justify-content: space-between; gap: 7px; margin-top: 15px; color: #7f8891; font-size: 8px; }
.preview-footnote span { display: inline-flex; align-items: center; gap: 3px; }
.preview-footnote .icon { width: 11px; height: 11px; color: #3e474f; }

.design-stack { display: grid; gap: 9px; }
.design-section { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.design-section h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: -.02em; }
.logo-preview { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; border-radius: 7px; background: #f0f2f3; }
.logo-preview .btn { min-height: 29px; }
.color-field { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 8px; }
.color-field input[type=color] { width: 26px; height: 28px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.design-stack .field + .field { margin-top: 9px; }
.radio-list { display: grid; gap: 8px; }
.radio-option { display: flex; gap: 8px; align-items: flex-start; color: #4f5963; font-size: 11px; }
.radio-option input { margin: 2px 0 0; accent-color: var(--yellow-deep); }
.radio-option strong { display: block; color: var(--ink); }
.radio-option span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }

.publish-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(315px, .65fr); gap: 14px; align-items: start; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #eceff1; }
.tab-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; border: 0; border-radius: 5px; background: transparent; color: #56606a; font-size: 12px; font-weight: 800; }
.tab-button:hover { color: var(--ink); }
.tab-button.is-active { background: var(--yellow); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.07); }
.tab-button .icon { width: 16px; height: 16px; }
.publish-block { margin-top: 13px; padding: 18px; }
.publish-title { display: flex; align-items: flex-start; gap: 10px; }
.publish-title-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 8px; background: var(--yellow-soft); color: #977300; }
.publish-title-icon .icon { width: 18px; height: 18px; }
.publish-title h2 { margin: 0; font-size: 17px; letter-spacing: -.04em; }
.publish-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.code-block { position: relative; margin-top: 15px; padding: 14px 118px 14px 14px; overflow: auto; border: 1px solid #dde2e6; border-radius: 8px; background: #f7f9fa; color: #3c4751; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.code-block code { display: block; min-width: 430px; }
.code-block .btn { position: absolute; top: 10px; right: 10px; }
.publish-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; margin-top: 14px; }
.publish-fields .field:first-child { grid-column: span 2; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.domain-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 5px; background: #f0f2f4; color: #5f6871; font-size: 10px; }
.domain-chip button { display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #929aa2; }
.domain-chip .icon { width: 12px; height: 12px; }
.inline-add { display: flex; gap: 7px; }
.inline-add .input { flex: 1; }
.website-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 17px; }
.qr-layout { display: grid; grid-template-columns: 176px 1fr; gap: 19px; margin-top: 18px; align-items: start; }
.qr-art { display: grid; place-items: center; width: 170px; height: 170px; padding: 12px; border: 1px solid #d8dde1; border-radius: 8px; background: #fff; }
.qr-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; width: 142px; height: 142px; padding: 4px; background: #fff; }
.qr-cell { background: #17191b; }
.qr-cell.is-empty { background: transparent; }
.qr-finder { position: relative; display: grid; place-items: center; background: #17191b; }
.qr-finder::before { width: 62%; height: 62%; background: #fff; content: ""; }
.qr-finder::after { position: absolute; width: 28%; height: 28%; background: #17191b; content: ""; }
.qr-center { position: absolute; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; border: 3px solid #17191b; border-radius: 5px; background: var(--yellow); color: var(--ink); }
.qr-center .icon { width: 17px; height: 17px; }
.qr-details { display: grid; gap: 12px; }
.qr-details h3 { margin: 0; font-size: 14px; }
.download-row { display: flex; flex-wrap: wrap; gap: 7px; }
.muted-callout { display: flex; gap: 8px; margin-top: 14px; padding: 10px; border: 1px solid #efe4b7; border-radius: 7px; background: #fffaf0; color: #6d612f; font-size: 11px; }
.muted-callout .icon { width: 15px; height: 15px; flex: 0 0 auto; }
.status-card { margin-top: 13px; padding: 16px; }
.status-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.status-card h3 { margin: 0; font-size: 14px; }
.status-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.status-card .detail-rows { margin-top: 13px; }
.status-action { margin-top: 13px; }
.status-action .btn { width: 100%; }

.analytics-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.analytics-filters .field { flex: 1 1 140px; min-width: 128px; }
.analytics-filters .field:first-child { flex-basis: 170px; }
.analytics-filters .input, .analytics-filters .select { background: #fff; }
.analytics-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.analytics-kpi { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow-sm); }
.analytics-kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.analytics-kpi-label .icon { width: 15px; height: 15px; color: #a17b00; }
.analytics-kpi-value { margin-top: 8px; font-size: 22px; font-weight: 850; letter-spacing: -.06em; line-height: 1; }
.analytics-kpi-change { margin-top: 5px; color: var(--green); font-size: 10px; font-weight: 800; }
.analytics-main-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(285px, .75fr); gap: 14px; align-items: start; }
.funnel { display: grid; gap: 8px; padding-top: 3px; }
.funnel-step { position: relative; display: grid; grid-template-columns: 98px minmax(0,1fr) 48px; align-items: center; gap: 9px; }
.funnel-step-label { color: #59626b; font-size: 10px; font-weight: 700; text-align: right; }
.funnel-bar-wrap { height: 30px; overflow: hidden; border-radius: 4px; background: #f0f2f3; }
.funnel-bar { display: flex; align-items: center; height: 100%; padding-left: 10px; border-radius: inherit; background: var(--yellow); color: #514000; font-size: 10px; font-weight: 850; }
.funnel-step:nth-child(2) .funnel-bar { background: #ffd64d; }
.funnel-step:nth-child(3) .funnel-bar { background: #ffe27d; }
.funnel-step:nth-child(4) .funnel-bar { background: #ffebad; }
.funnel-step:nth-child(5) .funnel-bar { background: #fff3cf; }
.funnel-percent { color: var(--muted); font-size: 10px; font-weight: 800; }
.funnel-note { margin: 12px 0 0 107px; color: var(--muted); font-size: 10px; }
.chart-legend { display: grid; gap: 9px; margin-top: 15px; }
.legend-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.legend-label { display: inline-flex; align-items: center; gap: 7px; color: #59626b; }
.legend-swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.legend-swatch--dark { background: #2f3539; }
.legend-swatch--muted { background: #bfc5ca; }
.legend-row strong { font-size: 11px; }
.donut-wrap { display: grid; place-items: center; margin: 9px 0 3px; }
.donut { display: grid; place-items: center; width: 154px; height: 154px; border-radius: 50%; background: conic-gradient(var(--yellow) 0 58%, #2f3539 58% 78%, #bfc5ca 78% 100%); }
.donut::after { display: grid; place-items: center; width: 98px; height: 98px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 18px; font-weight: 850; content: "6.214"; }
.analytics-tabs { margin-top: 14px; }
.analytics-table-card { margin-top: 12px; }
.analytics-table-card .card-header { align-items: center; }
.sparkline { width: 100%; height: 115px; }
.sparkline polyline { fill: none; stroke: var(--yellow-deep); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sparkline .grid-line { stroke: #edf0f2; stroke-width: 1; }
.chart-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }

.toast-region { position: fixed; z-index: 50; right: 22px; bottom: 22px; display: grid; gap: 8px; width: min(360px, calc(100vw - 30px)); }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 12px 13px; border: 1px solid #d8dde1; border-radius: 9px; background: rgba(255,255,255,.98); box-shadow: var(--shadow-md); animation: toast-in .2s ease both; }
.toast-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border-radius: 7px; background: var(--green-soft); color: var(--green); }
.toast-icon .icon { width: 14px; height: 14px; }
.toast--info .toast-icon { background: var(--blue-soft); color: var(--blue); }
.toast--warning .toast-icon { background: var(--yellow-soft); color: #947100; }
.toast strong { display: block; font-size: 11px; }
.toast span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.mobile-overlay { display: none; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1360px) {
  .builder-layout { grid-template-columns: 190px minmax(285px, 1fr) minmax(300px, .9fr) 235px; }
  .page-content { padding-right: 20px; padding-left: 20px; }
}

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .builder-layout { grid-template-columns: 190px minmax(300px, 1fr) minmax(310px, .95fr); }
  .design-panel { grid-column: span 3; }
  .analytics-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .publish-grid { grid-template-columns: minmax(0,1fr) 310px; }
}

@media (max-width: 960px) {
  :root { --sidebar-width: 0px; }
  .sidebar { width: 244px; transform: translateX(-102%); box-shadow: 16px 0 40px rgba(0,0,0,.22); transition: transform .22s ease; }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .main-shell { margin-left: 0; }
  .mobile-menu-button { display: inline-grid; place-items: center; }
  .mobile-menu-button .icon { width: 20px; height: 20px; }
  .mobile-overlay { position: fixed; z-index: 15; inset: 0; display: block; background: rgba(10,12,14,.45); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  .app-shell.sidebar-open .mobile-overlay { opacity: 1; pointer-events: auto; }
  .topbar { padding: 0 16px; }
  .breadcrumbs { font-size: 12px; }
  .builder-layout { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .design-panel { grid-column: auto; }
  .preview-panel { grid-column: span 2; }
  .publish-grid { grid-template-columns: 1fr; }
  .publish-preview-panel { order: -1; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
}

@media (max-width: 700px) {
  .topbar { height: 58px; }
  .topbar-right { gap: 7px; }
  .user-meta, .topbar-icon { display: none; }
  .user-menu { border-left: 0; padding-left: 0; }
  .breadcrumbs span:not(:last-child), .breadcrumbs .icon { display: none; }
  .page-content { padding: 18px 12px 34px; }
  .demo-banner { align-items: flex-start; }
  .page-heading { display: block; margin-bottom: 17px; }
  .page-heading h1 { font-size: 28px; }
  .heading-actions { margin-top: 14px; }
  .heading-actions .btn { flex: 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { min-height: 106px; padding: 12px; }
  .stat-value { font-size: 23px; }
  .stat-icon { width: 32px; height: 32px; }
  .overview-grid, .analytics-main-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; }
  .toolbar > .select { flex: 1 1 130px; }
  .builder-layout { grid-template-columns: 1fr; }
  .preview-panel { grid-column: auto; }
  .preview-stage { min-height: 540px; }
  .design-panel { grid-column: auto; }
  .publish-block { padding: 14px; }
  .tabs { grid-template-columns: 1fr; }
  .tab-button { min-height: 36px; }
  .code-block { padding: 70px 10px 10px; }
  .code-block code { min-width: 0; font-size: 10px; }
  .publish-fields, .website-fields { grid-template-columns: 1fr; }
  .publish-fields .field:first-child { grid-column: auto; }
  .qr-layout { grid-template-columns: 1fr; }
  .qr-art { margin: 0 auto; }
  .analytics-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .analytics-kpi-value { font-size: 20px; }
  .funnel-step { grid-template-columns: 78px minmax(0,1fr) 40px; gap: 6px; }
  .funnel-note { margin-left: 84px; }
  .activity-time { display: none; }
}

@media (max-width: 430px) {
  .stats-grid, .analytics-kpis { grid-template-columns: 1fr; }
  .heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .heading-actions .btn:first-child:last-child { grid-column: span 2; }
  .field-row { grid-template-columns: 1fr; }
  .phone-shell { transform: scale(.93); transform-origin: center center; margin: -17px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
