.stack { display: grid; gap: 14px; }
.quick-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 18px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(340px, .72fr); gap: 16px; }
.editor-sections { display: grid; gap: 14px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.social-row { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 10px; }

.dashboard .sidebar-brand { font-weight: 500; }
.dashboard .sidebar-brand__text strong { font-size: 17px; font-weight: 500; }
.dashboard .sidebar-brand__text small { font-size: 11px; letter-spacing: .03em; }
.dashboard .sidebar-nav { gap: 6px; }
.dashboard .nav-group-label { margin-top: 14px; }
.dashboard .nav-item {
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: .01em;
  padding: 10px 11px;
}
.dashboard .nav-item i {
  font-size: 17px;
  width: 18px;
  text-align: center;
}
.dashboard .nav-item.is-active {
  color: var(--primary);
  font-weight: 500;
  background: var(--primary-soft);
}
.dashboard .topbar-profile {
  min-height: 42px;
  border-radius: 12px;
}
.dashboard .topbar-profile__name { font-size: 13px; font-weight: 500; }
.dashboard .topbar-profile__role { font-size: 11px; }

.dashboard .dashboard-page-header__title {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dashboard .dashboard-page-header__desc { font-size: 13px; max-width: 700px; }
.dashboard .panel__title { font-weight: 500; }
.dashboard .panel__desc { font-size: 12.5px; }
.dashboard .btn-ghost {
  border: 1px solid var(--border);
  background: #fff;
  color: #334155;
}
.dashboard .metric-card { padding: 18px; }
.dashboard .metric-card__label { font-weight: 400; font-size: 12px; }
.dashboard .metric-card__value {
  font-size: clamp(23px, 2.4vw, 29px);
  font-weight: 550;
  letter-spacing: -0.03em;
}
.dashboard .metric-card__meta { font-size: 12px; }
.dashboard .data-table th { font-size: 11.5px; font-weight: 500; }
.dashboard .data-table td { font-size: 13.5px; }
.dashboard .btn { font-weight: 500; border-radius: 12px; }
.dashboard .breadcrumb { font-weight: 400; }
.dashboard .breadcrumb-item.active { font-weight: 500; }

.list-item-rich {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px;
}
.list-item-rich h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}
.list-item-rich p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.service-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}
.service-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.service-item__title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.file-input-wrap {
  position: relative;
  border: 1px dashed #d1d9e6;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.preview-shell { position: sticky; top: 84px; }
.mobile-card {
  margin: 0 auto;
  width: min(100%, 380px);
  border: 1px solid #dce3ee;
  border-radius: 20px;
  box-shadow: 0 8px 26px rgba(17, 17, 17, 0.06);
  background: #fff;
  overflow: hidden;
}
.mobile-hero {
  position: relative;
  min-height: 296px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(155deg, #1e3a5f, #12243f);
}
.mobile-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(2, 6, 23, .12), rgba(2, 6, 23, .68));
}
.mobile-hero__meta,
.mobile-hero__content {
  position: relative;
  z-index: 2;
}
.mobile-hero__meta .text-muted { color: #d2ddf0; font-size: 11px; letter-spacing: .08em; }
.mobile-hero__time { margin: 6px 0 0; font-size: 30px; font-weight: 500; letter-spacing: -0.03em; }
.mobile-hero__content { position: absolute; left: 18px; right: 18px; bottom: 18px; }
.mobile-hero__greeting { margin: 0; font-size: 14px; font-weight: 500; opacity: 0.9; }
.mobile-hero__name { margin: 0; font-size: 31px; line-height: 1.06; letter-spacing: -0.03em; font-weight: 500; }
.mobile-hero__title { margin: 6px 0 0; font-size: 13px; opacity: 0.86; }

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}
.mobile-actions .btn {
  border-radius: 10px;
  font-size: 12.5px;
  padding: 10px 10px;
}

.mobile-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}
.mobile-service {
  border: 1px solid #e2e8f1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.mobile-service__thumb {
  height: 96px;
  background: linear-gradient(135deg, #edf4ff, #dbe9ff);
}
.mobile-service__label {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  padding: 10px;
}

.mobile-footer {
  border-top: 1px solid #e8edf6;
  padding: 16px 14px;
  text-align: center;
}
.mobile-footer strong { font-size: 15px; font-weight: 500; }
.mobile-social {
  margin: 12px 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.mobile-social a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: #334155;
  display: grid;
  place-items: center;
  transition: var(--transition);
}
.mobile-social a:hover {
  color: var(--primary);
  border-color: #cddcf3;
}
.mobile-social i { font-size: 14px; }
.mobile-social a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
}

.modal-preview {
  margin-top: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-preview__box {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.simple-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.simple-list li {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
}

.analytics-chart {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding: 12px 8px 8px;
  border: 1px solid #e8eef7;
  border-radius: 12px;
  background: #fdfefe;
}
.bar-col {
  display: grid;
  justify-items: center;
  align-items: end;
  gap: 6px;
  height: 100%;
}
.bar-fill {
  width: 100%;
  max-width: 26px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #64a4ff, #1473e6);
  min-height: 10px;
}
.bar-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.bar-value {
  font-size: 10px;
  color: #64748b;
}
.mini-stats-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.mini-stat {
  border: 1px solid #e7edf7;
  border-radius: 11px;
  padding: 10px 11px;
  background: #fff;
}
.mini-stat p {
  margin: 0 0 5px;
  font-size: 11px;
  color: #64748b;
}
.mini-stat strong {
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
}
.source-list {
  display: grid;
  gap: 8px;
}
.source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e6edf7;
  border-radius: 11px;
  background: #fff;
  padding: 9px 10px;
}
.source-item span {
  font-size: 12px;
  color: #475569;
}
.source-item strong {
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
}
.dual-stat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dual-stat > div {
  border: 1px solid #e6edf7;
  border-radius: 11px;
  background: #fff;
  padding: 11px;
}
.dual-stat p {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}
.dual-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  font-weight: 500;
}
.device-stack {
  display: grid;
  gap: 8px;
}
.device-row {
  display: grid;
  grid-template-columns: 72px 1fr 42px;
  align-items: center;
  gap: 8px;
}
.device-row span {
  font-size: 11.5px;
  color: #475569;
}
.device-row strong {
  font-size: 11px;
  font-weight: 500;
  color: #0f172a;
}
.device-meter {
  height: 7px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}
.device-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8cbcff, #1473e6);
}
.marketing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.campaign-card {
  border: 1px solid #e7edf7;
  border-radius: 12px;
  background: #fff;
  padding: 11px;
}
.campaign-card p {
  margin: 0;
  color: #64748b;
  font-size: 11px;
}
.campaign-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.campaign-card span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
}
.campaign-card.google { border-color: #dbe9ff; }
.campaign-card.facebook { border-color: #d7e8ff; }
.campaign-card.tiktok { border-color: #ecdfff; }
.campaign-card.organic { border-color: #d9efdf; }

.segmented-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  background: #f3f6fb;
  border: 1px solid #e1e8f3;
  border-radius: 12px;
  padding: 4px;
}
.segment-btn {
  min-width: 120px;
  border-radius: 9px;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  color: #475569;
  font-size: 13px;
  font-weight: 400;
}
.segment-btn.is-active {
  background: #fff;
  color: #0f172a;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.page-preview-frame {
  width: 100%;
  min-height: 76svh;
  border: 0;
  border-radius: 0 0 14px 14px;
  background: #fff;
}

.quick-stat-item {
  border: 1px solid #e7edf7;
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px;
}
.quick-stat-item p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}
.quick-stat-item strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 500;
  color: #0f172a;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
}
.status-pill--new { background: #ecfeff; color: #0e7490; }
.status-pill--contacted { background: #eff6ff; color: #1d4ed8; }
.status-pill--closed { background: #ecfdf5; color: #047857; }

.cell-note {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-wrap--mobile {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.simple-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
  padding: 14px;
  z-index: 120;
}
.simple-modal.show { display: flex; }
.simple-modal__card {
  width: min(100%, 520px);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.24);
}
.simple-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid #e7edf7;
}
.simple-modal__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}
.simple-modal__body { padding: 14px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.detail-grid div {
  border: 1px solid #e8eef7;
  border-radius: 11px;
  padding: 10px;
}
.detail-grid p {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}
.detail-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
}

.line-chart {
  height: 210px;
  border: 1px solid #e8eef7;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.line-point-col {
  position: relative;
  height: 100%;
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 6px;
}
.line-point {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #1473e6;
  box-shadow: 0 0 0 3px rgba(20, 115, 230, 0.15);
}
.line-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
}
.line-point-col strong {
  font-size: 10px;
  font-weight: 500;
  color: #334155;
}

.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e8eef7;
  border-radius: 11px;
  background: #fff;
  padding: 10px 11px;
}
.source-row span {
  font-size: 12px;
  color: #475569;
}
.source-row strong {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
}
.source-row--direct { border-color: #dbe7fb; }
.source-row--whatsapp { border-color: #d7f3e2; }
.source-row--google { border-color: #fce9cc; }
.source-row--facebook { border-color: #dce8ff; }
.source-row--tiktok { border-color: #f3ddf6; }

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: 1fr; }
  .editor-layout { grid-template-columns: 1fr; }
  .preview-shell { position: static; }
  .mini-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .stack { gap: 12px; }
  .dashboard .panel__body { padding: 14px; }
  .dashboard .panel__header { padding: 14px; }
  .dashboard .btn { width: 100%; justify-content: center; }
  .dashboard .metric-card__value { font-size: 24px; }
  .dual-stat { grid-template-columns: 1fr; }
  .marketing-grid { grid-template-columns: 1fr; }
  .form-grid-2,
  .link-grid,
  .social-row { grid-template-columns: 1fr; }
  .mobile-services { grid-template-columns: 1fr; }
  .segmented-toggle { width: 100%; margin-top: 10px; }
  .segment-btn { min-width: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .page-preview-frame { min-height: 64svh; }
}

/* Legacy pages standardized to Viscard design tokens */
.viscard-launcher {
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg-soft);
  font-family: var(--font-sans);
}
.viscard-launcher .launcher-card {
  width: min(100%, 440px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}
.viscard-launcher h1 {
  margin: 0 0 6px;
  font-size: var(--fs-title);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}
.viscard-launcher .muted {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: var(--fs-body);
}
.viscard-launcher .launcher-actions {
  display: grid;
  gap: 10px;
}
.viscard-launcher .demo {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: var(--fs-meta);
  line-height: var(--lh-relaxed);
}

.legacy-user-page {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-family: var(--font-sans);
}
.legacy-user-page .wrap {
  max-width: 1140px;
  margin: 18px auto;
  padding: 0 14px;
}
.legacy-user-page .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.legacy-user-page .legacy-title {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}
.legacy-user-page .chip {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
}
.legacy-user-page .link {
  color: var(--primary);
  text-decoration: none;
  font-size: var(--fs-label);
}
.legacy-user-page .layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 14px;
}
.legacy-user-page .menu,
.legacy-user-page .panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.legacy-user-page .menu {
  overflow: hidden;
  align-self: start;
}
.legacy-user-page .menu a {
  display: block;
  padding: 11px 12px;
  text-decoration: none;
  border-bottom: 1px solid #edf2f9;
  color: var(--text-muted);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
}
.legacy-user-page .menu a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: var(--fw-semibold);
}
.legacy-user-page .panel {
  padding: 16px;
}
.legacy-user-page .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.legacy-user-page .card {
  background: #f8fafe;
  border: 1px solid #e5ebf3;
  border-radius: 12px;
  padding: 12px;
}
.legacy-user-page label {
  display: block;
  margin: 8px 0 5px;
  font-size: var(--fs-label);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}
.legacy-user-page input,
.legacy-user-page select,
.legacy-user-page textarea {
  width: 100%;
  min-height: var(--input-height);
  padding: 10px var(--input-padding-x);
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
}
.legacy-user-page input:focus,
.legacy-user-page select:focus,
.legacy-user-page textarea:focus {
  outline: none;
  border-color: #9ac4fa;
  box-shadow: 0 0 0 3px rgba(20, 115, 230, 0.12);
}
.legacy-user-page button {
  margin-top: 10px;
  min-height: var(--button-height);
  padding: 0 var(--button-padding-x);
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  cursor: pointer;
}
.legacy-user-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body);
}
.legacy-user-page th,
.legacy-user-page td {
  padding: 10px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}
.legacy-user-page th {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
}
.legacy-user-page .msg {
  padding: 10px 12px;
  border-radius: 12px;
  background: #ecfeff;
  color: #0f766e;
  font-size: var(--fs-label);
  margin-bottom: 12px;
  border: 1px solid #bae6fd;
}
@media (max-width: 900px) {
  .legacy-user-page .layout { grid-template-columns: 1fr; }
  .legacy-user-page .grid { grid-template-columns: 1fr; }
}
