:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --panel: #ffffff;
  --panel-alt: #f7f8fb;
  --ink: #20222a;
  --muted: #6f7180;
  --line: #dfe5ea;
  --accent: #223558;
  --accent-strong: #1a2a48;
  --accent-soft: #eeeafe;
  --accent-cool: #58bdd0;
  --sidebar: #1b2942;
  --sidebar-strong: #131f36;
  --purple: #6d4aec;
  --purple-strong: #5b37d8;
  --purple-soft: #eeeafe;
  --purple-softer: #f6f3ff;
  --surface-muted: #f4f6fa;
  --gold: #edbe13;
  --yellow: #edbe13;
  --yellow-soft: #fdf6e8;
  --warn: #c08316;
  --danger: #b42318;
  --ok: #2f9b68;
  --focus: #6d4aec;
  --shadow: 0 10px 26px rgba(32, 34, 42, 0.07);
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

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

button {
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 500;
  box-shadow: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

button:hover {
  transform: none;
  background: var(--accent-strong);
  box-shadow: none;
}

button.secondary {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #d0d5dd;
  box-shadow: none;
}

button.slim {
  padding: 7px 11px;
  font-size: 13px;
}

/* Keep the leading message icon centred with the label instead of sitting on
   the text baseline. */
button.editWhatsappSettings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button.editWhatsappSettings svg {
  flex-shrink: 0;
}

.link-button {
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--accent);
  box-shadow: none;
  justify-self: start;
}

.link-button:hover {
  background: transparent;
  text-decoration: underline;
}

button.warning {
  background: var(--warn);
}

button.danger {
  background: #ffffff;
  color: var(--danger);
  border: 1px solid #f3b9ae;
  box-shadow: none;
  padding: 7px 10px;
}

button.danger:hover {
  background: #fff2f0;
  color: var(--danger);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid rgba(143, 99, 170, 0.22);
  outline-offset: 2px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #344054;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.shell {
  min-height: 100vh;
  display: grid;
  /* minmax(0, 1fr) lets the main column shrink below its content's intrinsic
     width so a wide child (e.g. a table) scrolls inside its own container
     instead of stretching the whole page. */
  grid-template-columns: 216px minmax(0, 1fr);
}

.sidebar {
  background: var(--sidebar);
  color: #ffffff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.sidebar::after {
  display: none;
}

.brand {
  display: grid;
  gap: 4px;
}

.brand strong {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand span,
.sidebar small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  padding: 0 10px;
  min-height: 34px;
  box-shadow: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  transition: background 0.15s, color 0.15s;
}

.nav .nav-full {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.nav-icon svg {
  width: 14px;
  height: 14px;
}

.nav button.active {
  background: var(--yellow);
  color: #20222a;
}

.nav button.active .nav-icon {
  background: rgba(0, 0, 0, 0.08);
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav button.active:hover {
  background: #ebc12a;
  color: #20222a;
}

.nav-short {
  display: none;
}

.nav-mobile-icon,
.nav-count {
  display: none;
}

.main {
  padding: 18px 24px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.topbar,
.panel,
.auth-card,
.setup-card,
.metric,
.card-row {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: none;
}

.topbar {
  border-radius: 0;
  padding: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.topbar-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-strong);
  font-size: 12px;
  font-weight: 600;
}

.topbar h1,
.panel h2,
.auth-card h1,
.setup-card h1 {
  margin: 0;
}

.topbar h1 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.topbar-actions button.slim {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.topbar-actions button.slim svg {
  flex-shrink: 0;
}

.topbar-upgrade-btn:not(.secondary):not(.danger) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f5c842 0%, #e8a818 100%);
  color: #3a2c05;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid #d4a020;
  box-shadow: 0 2px 8px rgba(212, 160, 32, 0.25);
}

.topbar-upgrade-btn:not(.secondary):not(.danger):hover {
  background: linear-gradient(135deg, #ebc12a 0%, #d99a10 100%);
  color: #3a2c05;
  box-shadow: 0 4px 12px rgba(212, 160, 32, 0.35);
}

.topbar-upgrade-btn svg {
  flex-shrink: 0;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 7px 14px 7px 10px;
  border-radius: 8px;
  background: #f0ebf5;
  border: 1px solid #e0d5eb;
  color: #4f3763;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-pill svg {
  flex-shrink: 0;
  color: #8f63aa;
}

.panel {
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 14px;
  border-color: var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel h2 {
  font-size: 18px;
  font-weight: 500;
}

.panel h3,
.setup-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.section-heading p {
  margin: 6px 0 0;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.compact-form {
  align-items: end;
}

.upload-panel {
  gap: 22px;
  border-color: #dce3e8;
  box-shadow: 0 14px 36px rgba(32, 34, 42, 0.07);
}

/* Calm, always-on capture guidance. Deliberately static advice rather than a
   per-image verdict: a blur score on a card-in-hand photo measures the
   background as much as the text, so it would wrongly reject good scans. */
.quality-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 6px 0 0;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--purple-soft, #f0e7f7);
  color: #4a4459;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
}

.quality-hint svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--purple, #8f63aa);
}

/* Upload sub-tabs: Scan / Upload | Pending */
.upload-wrap {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.upload-subtabs {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 5px;
  border: 1px solid #cfe1df;
  border-radius: 10px;
  background: #edf6f5;
}

.upload-subtab {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 650;
  color: #55606c;
  cursor: pointer;
}

.upload-subtab.active {
  background: #fff;
  color: var(--purple-strong, #6c3fa4);
  box-shadow: 0 2px 8px rgba(32, 34, 42, 0.08);
}

/* Without these the global button:hover painted a dark accent background
   behind the dark tab label, making the text unreadable on hover. */
.upload-subtab:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  box-shadow: none;
}

.upload-subtab.active:hover {
  background: #fff;
  color: var(--purple-strong, #6c3fa4);
  box-shadow: 0 2px 8px rgba(32, 34, 42, 0.08);
}

/* Pending sub-tab */
.pending-panel {
  display: grid;
  gap: 16px;
}

.pending-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pending-head h2 {
  margin: 0 0 4px;
}

.pending-head-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.pending-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(32, 34, 42, 0.05);
  min-width: 0;
}

.pending-card-media {
  position: relative;
  width: 84px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f3f5;
}

.pending-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-noimg {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  color: var(--muted);
}

.pending-tag {
  position: absolute;
  left: 3px;
  bottom: 3px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(27, 41, 66, 0.82);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
}

.pending-card-body {
  display: grid;
  gap: 5px;
  align-content: start;
  min-width: 0;
}

.pending-card-body strong {
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-voice-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #2f9b68;
}

.pending-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.pending-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.pending-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 40px 20px;
}

.pending-empty-icon {
  color: var(--purple, #8f63aa);
  opacity: 0.7;
}

.pending-empty h2 {
  margin: 0;
}

.pending-empty p {
  max-width: 440px;
}

.destination-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid #e2e8ec;
  border-radius: 10px;
  background: #fafbfc;
}

.destination-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.destination-field select {
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid #d0dbe0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.destination-kicker {
  color: #6b7d8a;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.new-exhibition-settings {
  display: grid;
  gap: 12px;
  padding: 4px 0 2px;
}

.new-exhibition-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.new-exhibition-heading > div {
  display: grid;
  gap: 5px;
}

.new-exhibition-heading h3,
.new-exhibition-heading p {
  margin: 0;
}

.new-exhibition-heading h3 {
  font-size: 18px;
  font-weight: 600;
}

.new-exhibition-heading p,
.optional-label {
  color: var(--muted);
}

.new-exhibition-fields {
  padding: 14px;
  border: 1px solid #dce5e8;
  border-radius: 8px;
  background: #f8fafb;
}

.new-exhibition-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.new-exhibition-actions p {
  margin: 0;
  font-size: 13px;
}

.inline-form-error {
  padding: 10px 12px;
  border: 1px solid #efb5ad;
  border-radius: 6px;
  color: #9f2417;
  background: #fff5f3;
  font-size: 13px;
}

.optional-label {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 400;
}

.upload-options {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-top: 2px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  border-radius: 8px;
  padding: 14px;
  border-color: transparent;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 26px;
}

.upload-steps {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.upload-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 15px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.upload-step-num {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #8f63aa;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.upload-steps strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}

.upload-steps small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.dropzone {
  border: 1.5px dashed #c5d4d1;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafa 0%, #f1f6f5 100%);
  padding: 36px 28px 24px;
  display: grid;
  gap: 6px;
  text-align: center;
  justify-items: center;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone.drag-over {
  border-color: var(--purple);
  background: linear-gradient(180deg, #f5f0fa 0%, #ede6f4 100%);
}

.dropzone-text {
  display: grid;
  gap: 4px;
}

.dropzone-text strong {
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}

.dropzone-text p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.dropzone-hint {
  margin: 0;
  font-size: 12.5px;
  color: #8a9aaa;
  letter-spacing: 0.01em;
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #dce8e5;
  color: var(--purple);
  box-shadow: 0 4px 14px rgba(143, 99, 170, 0.12);
}

.dropzone-icon svg {
  width: 26px;
  height: 26px;
}

.dropzone input {
  margin: auto;
  max-width: 360px;
}

.dropzone-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.dropzone-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e4edeb;
  width: 100%;
  font-size: 12px;
  color: #8a9aaa;
}

.dropzone-footer svg {
  flex-shrink: 0;
  color: #a3b8b2;
}

.upload-picker {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 24px;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.upload-picker:hover {
  background: #2a6459;
  border-color: #2a6459;
}

.upload-picker:active {
  transform: scale(0.98);
}

@media (max-width: 640px) {
  .upload-steps {
    grid-template-columns: 1fr;
  }
}

.upload-picker.camera {
  background: #ffffff;
  color: var(--purple);
  border-color: #d4c6e0;
}

.upload-picker.camera:hover {
  background: #f7f2fb;
  border-color: var(--purple);
}

.pair-toggle {
  justify-self: center;
  width: auto;
  max-width: min(680px, 100%);
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 4px 8px 0;
}

.pair-toggle input {
  flex: 0 0 18px;
  margin: 0;
}

.pair-toggle span {
  display: block;
}

.upload-options-toggle {
  justify-self: center;
  margin: 2px auto 0;
}

.export-all-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.hidden-file {
  position: absolute;
  width: 1px !important;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-list,
.review-list,
.contact-list,
.audit-list {
  display: grid;
  gap: 12px;
}

.file-list {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.file-item,
.card-row,
.contact-row,
.audit-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
  box-shadow: none;
}

.file-item {
  padding: 13px 15px;
  box-shadow: 0 5px 16px rgba(32, 34, 42, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.file-item:hover {
  border-color: #dbcec5;
  box-shadow: 0 8px 22px rgba(32, 34, 42, 0.08);
}

.file-item,
.contact-row,
.audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-thumb {
  width: 58px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #f1f4f3;
  flex: 0 0 auto;
}

.card-side-previews {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
}

.card-side-previews figure {
  display: grid;
  gap: 3px;
  margin: 0;
  text-align: center;
}

.card-side-previews figcaption {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.file-side-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.danger-link {
  color: var(--danger);
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
}

.upload-processing {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid #d9d8df;
  border-left: 4px solid var(--purple);
  border-radius: 8px;
  background: #f8f7fb;
  box-shadow: 0 10px 28px rgba(32, 34, 42, 0.08);
}

.processing-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.processing-copy h3,
.processing-copy p {
  margin: 0;
}

.processing-copy h3 {
  font-size: 17px;
  font-weight: 600;
}

.processing-copy p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.processing-spinner,
.inline-spinner {
  display: inline-block;
  border-radius: 50%;
  border-style: solid;
  border-color: #d8cbe1;
  border-top-color: var(--purple);
  animation: processing-spin 0.8s linear infinite;
}

.processing-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-width: 4px;
}

.inline-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.processing-track {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5e1e9;
}

.processing-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: inherit;
  background: var(--accent);
  animation: processing-track 1.5s ease-in-out infinite;
  transition: width 0.8s ease;
}

.processing-tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 20px;
}

.processing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.processing-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.upload-is-processing .file-item {
  border-color: #dfd7e5;
  background: #fdfcff;
}

.upload-is-processing .new-exhibition-settings,
.upload-is-processing .destination-selector,
.upload-is-processing .dropzone {
  pointer-events: none;
  opacity: 0.68;
}

.upload-submit-actions {
  align-items: center;
}

@keyframes processing-spin {
  to { transform: rotate(360deg); }
}

@keyframes processing-track {
  0% { transform: translateX(-105%); }
  55% { transform: translateX(195%); }
  100% { transform: translateX(300%); }
}

.card-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}

.card-image {
  width: 100%;
  aspect-ratio: 1.45;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #eef4f5;
}

.missing-image {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.review-panel {
  gap: 16px;
  padding: 20px;
}

.review-stats-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid #e2e8ec;
  border-radius: 10px;
  background: #fafbfc;
}

.review-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7d8a;
}

.review-stat svg {
  color: var(--purple);
  flex-shrink: 0;
}

.review-stat.ready svg {
  color: #3d9e6b;
}

.review-stat strong {
  font-size: 18px;
  color: var(--ink);
}

.review-stat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.review-limit-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-limit-notice p {
  margin: 4px 0 0;
  font-size: 13px;
}

.review-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: #8a9aaa;
}

.review-footer svg {
  flex-shrink: 0;
  color: #a3b8b2;
}

.queued-card-compact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

.queued-row-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f0f3f5;
  color: #6b7d8a;
  font-size: 12px;
  font-weight: 700;
}

.queued-thumb {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
  background: #f1f4f3;
}

.queued-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.queued-card-info strong {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queued-card-info .status {
  font-size: 11px;
}

.queued-card-spinner-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.queued-card-spinner-wrap p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
}

.queued-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.queued-card-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.review-card {
  padding: 18px;
  border-color: #d9e2e6;
  box-shadow: 0 8px 24px rgba(32, 34, 42, 0.06);
}

.review-card-media {
  min-width: 0;
}

.review-card-media > p {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.review-card-form {
  min-width: 0;
  gap: 16px;
}

.review-card-actions {
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.review-card-actions button {
  min-height: 38px;
}

.queued-card-body {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px 0;
}

.queued-card-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  border-top-color: var(--purple);
  animation: queued-spin 0.8s linear infinite;
}

@keyframes queued-spin {
  to { transform: rotate(360deg); }
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-check {
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
}

.critical-field-warning input {
  border-color: #d77b72;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.06);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  background: #f3f1f5;
  color: #48434f;
}

.status.ok {
  background: #e7f6ef;
  color: var(--ok);
}

.status.warn {
  background: var(--yellow-soft);
  color: var(--warn);
}

.status.bad {
  background: #fff0ee;
  color: var(--danger);
}

.voice-summary {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #dfd4e8;
  border-radius: 8px;
  background: #fbf7ff;
  color: #4f3763;
  font-size: 12px;
}

.voice-summary strong {
  color: var(--purple);
  font-weight: 600;
}

.voice-summary audio,
.voice-note-panel audio {
  width: 100%;
  max-width: 100%;
}

.voice-note-panel {
  display: grid;
  gap: 14px;
}

.dialog-icon.voice {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.mic-symbol,
.button-mic-icon {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.mic-symbol::before,
.button-mic-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 16px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  transform: translateX(-50%);
}

.mic-symbol::after,
.button-mic-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 2px;
  height: 4px;
  background: currentColor;
  transform: translateX(-50%);
}

.button-mic-icon {
  width: 8px;
  height: 11px;
  margin-right: 6px;
  border-width: 1.5px;
  vertical-align: -2px;
  transform: translateY(-1px);
}

.button-mic-icon::before {
  bottom: -4px;
  width: 10px;
  height: 5px;
  border-width: 1.5px;
}

.button-mic-icon::after {
  bottom: -6px;
  height: 2px;
}

.voice-recorder {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f8f8;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.voice-recorder.recording {
  border-color: rgba(57, 137, 128, 0.65);
  background: #edf8f6;
  box-shadow: 0 0 0 3px rgba(57, 137, 128, 0.1);
}

.voice-live-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.voice-live-header > div:last-child {
  display: grid;
  gap: 2px;
}

.voice-live-header strong {
  font-size: 15px;
  font-weight: 600;
}

.voice-live-header span:not(.mic-symbol) {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.voice-mic-orb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #8f63aa;
}

.voice-recorder.recording .voice-mic-orb {
  background: #8f63aa;
  color: #fff;
  animation: voice-pulse 1.4s ease-out infinite;
}

.voice-waveform {
  width: 100%;
  height: 76px;
  display: block;
  border-radius: 6px;
  background: #fff;
}

.voice-record-actions,
.voice-apply-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.voice-stop {
  background: #fff;
  color: var(--danger);
  border: 1px solid #e9b7b1;
}

.voice-stop:hover {
  color: #fff;
  background: var(--danger);
}

.stop-symbol {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 1px;
  background: currentColor;
}

.voice-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.voice-note-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-note-controls .voice-delete {
  color: var(--danger);
  border: 1px solid #e9b7b1;
  background: #fff;
}

.voice-note-controls .voice-delete:hover {
  color: #fff;
  background: var(--danger);
}

.voice-apply-row {
  justify-content: flex-end;
  padding-top: 2px;
}

.voice-result {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f9fa;
}

@keyframes voice-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 127, 119, 0.34); }
  70% { box-shadow: 0 0 0 10px rgba(47, 127, 119, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 127, 119, 0); }
}

.collection-summary {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 0.8fr 0.8fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f8f8;
}

.collection-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.collection-summary strong {
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sheet-actions {
  padding-top: 2px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.row-actions button {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}


.muted {
  color: var(--muted);
}

.notice {
  border-left: 4px solid var(--accent);
  background: var(--purple-soft);
  padding: 12px;
  border-radius: 6px;
}

.notice.compact {
  font-size: 14px;
  padding: 10px 12px;
}

.flash-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  box-shadow: 0 7px 20px rgba(31, 32, 39, 0.06);
}

.flash-dismiss {
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  font-size: 22px;
  line-height: 1;
}

.flash-dismiss:hover {
  background: rgba(31, 32, 39, 0.07);
}

.review-complete-state {
  min-height: 320px;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 10px;
  padding: 40px 20px;
}

.review-complete-state h2,
.review-complete-state p {
  margin: 0;
}

.review-complete-state h2 {
  font-size: 22px;
}

.review-complete-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e8f6ef;
  color: #3d9e6b;
  margin-bottom: 6px;
}

.review-complete-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 6px;
}

.review-complete-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid #e2e8ec;
  border-radius: 10px;
  background: #fafbfc;
  min-width: 140px;
}

.review-complete-stat svg {
  flex-shrink: 0;
  color: #3d9e6b;
}

.review-complete-stat div {
  display: grid;
  gap: 1px;
  text-align: left;
}

.review-complete-stat strong {
  font-size: 20px;
  color: var(--ink);
}

.review-complete-stat span {
  font-size: 12px;
  color: #6b7d8a;
}

.review-complete-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.review-complete-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  justify-content: center;
}

.notice.bad {
  border-color: var(--danger);
  background: #fff2f0;
}

.notice-list {
  margin: 0;
  padding-left: 18px;
}

.notice-list li {
  margin: 4px 0;
}

.notice-list li:first-child {
  margin-top: 0;
}

.notice-list li:last-child {
  margin-bottom: 0;
}

.notice-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 500;
  text-decoration: none;
}

.notice-action:hover {
  text-decoration: underline;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(32, 34, 42, 0.62);
}

.dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
}

.dialog-close:hover {
  border-color: var(--line);
  background: #f7f4f1;
  color: var(--ink);
}

.dialog.wide-dialog {
  width: min(980px, 100%);
}

.dialog-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: #fff5df;
  color: var(--warn);
}

.dialog-icon.danger {
  background: #fff0ee;
  color: var(--danger);
}

.dialog-content {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 8px;
  padding-right: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.dialog h2 {
  margin: 0;
  font-size: 22px;
}

.dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.dialog-detail {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f8f8;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
  background: #fff;
}

/* Pay-to-start prompt shown when an unpaid account tries to scan. Single-column
   layout (no side icon) with a full-width header and two clean plan columns. */
.dialog.payment-modal {
  width: min(660px, 100%);
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.dialog.payment-modal .dialog-icon { display: none; }
.dialog.payment-modal .dialog-content {
  padding: 30px 30px 10px;
  overflow-y: auto;
  text-align: center;
}
.dialog.payment-modal h2 { font-size: 21px; margin: 0 0 6px; }
.dialog.payment-modal > .dialog-content > p,
.dialog.payment-modal p#dialogBody { color: var(--muted); max-width: 460px; margin: 0 auto; }
.dialog.payment-modal .dialog-close { top: 18px; right: 18px; }
.dialog.payment-modal .dialog-actions {
  padding: 14px 30px;
  border-top: 1px solid var(--line);
  background: #faf9fc;
}

.pay-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  text-align: left;
  margin: 22px 0 8px;
}
.pay-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.pay-group-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.pay-group-tag { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.pay-options { display: grid; gap: 10px; }
.pay-option {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  row-gap: 1px;
  column-gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.pay-option:hover {
  border-color: var(--purple, #8f63aa);
  box-shadow: 0 6px 18px rgba(143, 99, 170, 0.16);
  transform: translateY(-1px);
}
.pay-option.recommended {
  border-color: var(--purple, #8f63aa);
  box-shadow: 0 0 0 1px var(--purple, #8f63aa) inset;
}
.pay-option-badge {
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--purple, #8f63aa);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pay-option-name { grid-column: 1; font-size: 13px; font-weight: 650; color: var(--ink); }
.pay-option-price { grid-column: 2; grid-row: 1 / span 2; font-size: 20px; font-weight: 700; color: var(--ink); }
.pay-option-scans { grid-column: 1; font-size: 11.5px; color: var(--muted); }
@media (max-width: 560px) {
  .dialog.payment-modal { width: min(440px, calc(100% - 20px)); }
  .dialog.payment-modal .dialog-content { padding: 22px 18px 6px; }
  .dialog.payment-modal h2 { font-size: 19px; }
  .pay-groups { grid-template-columns: 1fr; gap: 14px; margin: 16px 0 6px; }
  .pay-group-head { margin-bottom: 8px; padding-bottom: 6px; }
  .pay-options { gap: 8px; }
  .pay-option { padding: 9px 12px; border-radius: 10px; }
  .pay-option-price { font-size: 17px; }
  .dialog.payment-modal .dialog-actions { padding: 12px 18px; }
}

.dialog.plan-required-dialog {
  width: min(660px, 100%);
  gap: 20px;
  padding: 30px;
  border-color: #cdd9e8;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(19, 34, 57, 0.28);
}

.dialog-icon.credit {
  width: 48px;
  height: 48px;
  background: #e5edf8;
  color: #345b96;
  font-size: 1.55rem;
}

.plan-required-dialog .dialog-content {
  gap: 12px;
  padding-right: 22px;
}

.plan-required-dialog .dialog-content h2 {
  color: #172943;
  font-size: 1.75rem;
  line-height: 1.15;
}

.plan-required-dialog .dialog-content > p {
  max-width: 500px;
  font-size: 1rem;
}

.plan-credit-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ccd9ea;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f8fc, #eef4fb);
}

.plan-credit-preview-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 750;
}

.plan-credit-preview > div {
  display: grid;
  gap: 2px;
}

.plan-credit-preview strong {
  color: #172943;
  font-size: 1rem;
  font-weight: 750;
}

.plan-credit-preview small {
  color: #647084;
  font-size: 0.82rem;
}

.plan-required-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.plan-required-steps > div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e0e6ee;
  border-radius: 10px;
  background: #fff;
}

.plan-required-steps span {
  display: grid;
  width: 25px;
  height: 25px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 50%;
  background: #e8eef7;
  color: #345b96;
  font-size: 0.72rem;
  font-weight: 750;
}

.plan-required-steps strong {
  color: #263a59;
  font-size: 0.82rem;
  font-weight: 750;
}

.plan-required-steps small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.plan-required-dialog .dialog-actions {
  padding-top: 2px;
}

.plan-required-dialog .dialog-actions button {
  min-width: 126px;
  min-height: 44px;
}

@media (max-width: 640px) {
  .dialog.plan-required-dialog {
    gap: 14px;
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .plan-required-dialog .dialog-content {
    padding-right: 0;
  }

  .plan-required-dialog .dialog-content h2 {
    padding-right: 28px;
    font-size: 1.45rem;
  }

  .plan-required-steps {
    grid-template-columns: 1fr;
  }

  .plan-required-steps > div {
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    padding: 10px;
  }

  .plan-required-steps span {
    grid-row: 1 / 3;
    margin: 0;
  }

  .plan-required-dialog .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .plan-required-dialog .dialog-actions button {
    width: 100%;
    min-width: 0;
  }
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-wrap.setup-wrap {
  align-content: center;
  background:
    linear-gradient(180deg, rgba(255, 248, 241, 0.86), rgba(251, 250, 247, 0.96)),
    var(--bg);
}

.auth-wrap.public-page {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  background: #ffffff;
}

.public-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 10px max(18px, calc((100vw - 1240px) / 2 + 4px));
  background: #1b2942;
  border-bottom: 1px solid #2a3a5c;
  position: sticky;
  top: 0;
  z-index: 100;
}

.public-brand {
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
}

.public-brand strong {
  font-size: 23px;
  line-height: 1.1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.public-brand span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.public-links,
.public-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Google Play badge beside the hero CTA. The artwork is Google's official asset
   and their brand guidelines forbid recolouring or redrawing it, so it is only
   ever scaled - the aspect ratio stays that of the source 646x250 PNG. */
.store-badge {
  display: inline-flex;
  line-height: 0;
  border-radius: 8px;
  transition: opacity .15s ease, transform .15s ease;
}
.store-badge img { width: 180px; height: auto; display: block; }
.store-badge:hover { opacity: .85; transform: translateY(-1px); }
.store-badge:focus-visible { outline: 2px solid #6c3fa4; outline-offset: 3px; }

@media (max-width: 640px) {
  .hero-actions { flex-wrap: wrap; }
  .store-badge img { width: 160px; }
}

.public-links {
  flex: 1;
  justify-content: flex-start;
  gap: clamp(20px, 3vw, 42px);
}

.public-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  text-decoration: none;
  font-weight: 500;
}

.public-links a:hover {
  color: #ffffff;
}

.public-hero {
  /* Full-bleed background so the purple gradient reaches the screen edges
     instead of leaving white gutters; inner content stays aligned to 1240px
     via the horizontal padding. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.12fr);
  align-items: center;
  gap: 20px;
  padding: 34px max(22px, calc((100vw - 1240px) / 2)) 26px;
  background:
    radial-gradient(circle at 84% 24%, rgba(143, 99, 170, 0.14), transparent 55%),
    linear-gradient(90deg, #ffffff 0%, #ffffff 34%, #f7f4fc 62%, #efe7f9 100%);
}

.hero-copy {
  display: grid;
  gap: 18px;
  padding-left: 28px;
}

.public-hero .section-kicker {
  margin-bottom: 0;
}

/* The product name is the h1 so the rendered page's main heading matches the
   OAuth consent-screen app name ("Card2Leads"); the tagline sits just below. */
.hero-brand {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1b2942;
}

.hero-headline {
  max-width: 700px;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: 0;
  color: #060f3f;
}

.hero-headline em {
  display: block;
  font-style: italic;
  color: var(--purple);
}

.hero-text {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions button {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
}

.public-actions button {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 14px;
}

.hero-visual {
  display: grid;
  place-items: center;
  max-width: 860px;
  margin-inline: auto;
}

.hero-illustration {
  width: 100%;
  max-width: 820px;
  height: auto;
  filter: drop-shadow(0 16px 30px rgba(45, 57, 81, 0.1));
}

/* One grid for all six cards: 3 equal columns x 2 rows, sitting in the
   headline's own column so they start directly under it. Every box is the
   same width by construction rather than by tuning column ratios to match. */
.feature-strip {
  display: grid;
  gap: 14px;
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, 1fr);
  align-self: start;
}

.feature-strip article {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon title" "desc desc";
  align-items: center;
  gap: 3px 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(32, 34, 42, 0.05);
}

.feature-strip article .feature-icon {
  grid-area: icon;
  width: 27px;
  height: 27px;
  border-radius: 8px;
}

.feature-strip article strong {
  grid-area: title;
}

.feature-strip article p {
  grid-area: desc;
  margin-top: 1px;
  font-size: 12.5px;
}

.feature-strip strong {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink);
}

.feature-strip p,
.public-section p,
.auth-intro li {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: var(--purple-soft);
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.feature-strip article .feature-icon svg {
  width: 14px;
  height: 14px;
}

.public-section {
  width: min(1240px, calc(100% - 44px));
  margin-top: 26px;
  margin-left: auto;
  margin-right: auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.features-section {
  display: grid;
  /* Column 1 carries the headline and all six cards, so it must stay wide
     enough for the headline to wrap in 2-3 lines rather than ladder down one
     word per line. */
  grid-template-columns: minmax(0, 2.2fr) minmax(200px, 0.9fr) minmax(240px, 1fr);
  grid-template-rows: auto auto;
  gap: 26px 16px;
  align-items: start;
  overflow: hidden;
  padding-right: 14px;
}

.features-copy {
  display: grid;
  gap: 14px;
  grid-column: 1;
  grid-row: 1;
}

.features-copy h2 {
  margin-bottom: 0;
}

.features-copy h2 em {
  display: block;
  font-style: italic;
  color: var(--purple);
}

/* Spans both rows so its height never pushes the cards down away from the
   headline — the cards sit directly under the heading regardless. */
.features-mid-illustration {
  display: grid;
  place-items: start end;
  grid-column: 2;
  grid-row: 1 / 3;
}

.features-mid-illustration img {
  width: 100%;
  max-width: 260px;
  height: auto;
  filter: drop-shadow(0 14px 26px rgba(45, 57, 81, 0.1));
}

.workflow-flow {
  width: 100%;
  padding: 4px 8px;
  grid-column: 3;
  grid-row: 1 / 3;
}

.workflow-timeline {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  position: relative;
  display: grid;
  gap: 4px;
  max-width: 280px;
}

.workflow-timeline::before {
  content: "";
  position: absolute;
  /* .wf-item has 10px left padding, and the node is 41px wide — this must
     land exactly on the node's horizontal center (10 + 41/2) or the line
     visibly cuts through the icons off-center instead of through their middle. */
  left: 30.5px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(34, 53, 88, 0.12);
}

.wf-item {
  position: relative;
  display: grid;
  grid-template-columns: 41px 1fr;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 10px;
  border-radius: 12px;
  transition: background-color 0.15s ease;
}

.wf-item:hover {
  background: rgba(34, 53, 88, 0.035);
}

.wf-node {
  width: 41px;
  height: 41px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #fff;
  border: 1.5px solid rgba(34, 53, 88, 0.16);
  z-index: 1;
}

.wf-item-final .wf-node {
  color: #fff;
  background: var(--ok);
  border-color: var(--ok);
}

.wf-node svg {
  width: 18px;
  height: 18px;
}

.wf-body {
  padding-top: 2px;
}

.wf-step {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.wf-item-final .wf-step {
  color: var(--ok);
}

.wf-body strong {
  display: block;
  font-size: 15.5px;
  font-weight: 650;
  color: var(--ink);
  margin-top: 2px;
}


.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: center;
}

.public-section h2 {
  margin: 0 0 12px;
  color: #060f3f;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: 0;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: #b0851f;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-kicker::after {
  content: "";
  width: 78px;
  height: 2px;
  background: var(--gold);
}

.flow-steps {
  display: grid;
  gap: 10px;
}

.flow-steps span {
  padding: 14px 16px;
  border-radius: 8px;
  background: #f8f6ff;
  color: #2b3148;
  font-weight: 500;
}

.public-feature-grid {
  width: min(1240px, calc(100% - 44px));
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border: 0;
  padding: 0;
  background: transparent;
}

/* "What is Card2Leads?" and Google integration sections */
.about-section,
.google-section {
  display: grid;
  gap: 14px;
}

.about-section h2,
.google-section h2 {
  margin: 0;
  max-width: 640px;
}

.about-lead,
.google-section-lead {
  font-size: 16px;
  font-weight: 550;
  color: var(--ink);
  max-width: 760px;
}

.google-section-head {
  display: grid;
  gap: 12px;
}

.google-integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.google-integration-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(32, 34, 42, 0.05);
}

.google-integration-grid strong {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}

.google-section-note {
  max-width: 820px;
}

.google-section-link a {
  font-weight: 650;
  color: var(--purple);
  text-decoration: none;
}

.google-section-link a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .google-integration-grid {
    grid-template-columns: 1fr;
  }
}

.public-panel,
.demo-panel,
.public-access-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(32, 34, 42, 0.07);
}

.public-panel {
  min-height: 300px;
  padding: 26px;
  display: grid;
  align-content: start;
  gap: 20px;
  overflow: hidden;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.public-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(32, 34, 42, 0.1);
}

/* The artwork carries its own scene and background, so it sits directly on
   the panel rather than inside a tinted frame. */
.panel-illustration {
  width: 50%;
  max-width: 320px;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: contain;
  justify-self: center;
  border-radius: 10px;
}

.public-panel h2 {
  font-size: clamp(22px, 2.2vw, 27px);
}

.demo-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1fr);
  gap: 28px;
  align-items: center;
  background: #1b2942;
  color: #fff;
}

.demo-copy {
  display: grid;
  gap: 10px;
}

.demo-panel h2,
.demo-panel p,
.demo-panel .section-kicker {
  color: #fff;
}

.demo-panel p {
  color: rgba(255, 255, 255, 0.72);
}

.demo-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.demo-steps article {
  display: grid;
  gap: 8px;
  min-height: 170px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.demo-steps strong {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--yellow);
  color: #20222a;
}

.demo-steps span {
  font-weight: 600;
}

.demo-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-actions button {
  min-height: 42px;
}

.demo-actions .secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.guest-demo {
  grid-column: 1 / -1;
  padding: 22px;
  background: #fff;
  color: var(--text);
  border: 1px solid #d9dbe3;
  border-radius: 8px;
}

.guest-demo-head,
.pricing-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.guest-demo-head {
  margin-bottom: 18px;
  color: var(--muted);
}

.demo-sample-files,
.demo-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.demo-sample-files > div,
.demo-review-grid > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e2e3e8;
  background: #fafafa;
  border-radius: 6px;
}

.demo-sample-files span,
.demo-review-grid span {
  color: var(--muted);
  font-size: 0.88rem;
}

.demo-export-wrap {
  overflow-x: auto;
  margin-bottom: 18px;
}

.demo-export-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.demo-export-wrap th,
.demo-export-wrap td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e3e8;
}

.pricing-section {
  display: grid;
  gap: 28px;
}

.pricing-heading {
  align-items: end;
}

.pricing-heading > p {
  max-width: 520px;
  color: var(--muted);
}

.pricing-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.pricing-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 18px;
  border: 1px solid #d4dae1;
  border-radius: 999px;
  background: #eef1f4;
  color: #4f5968;
  font-size: 0.86rem;
  font-weight: 750;
  text-transform: uppercase;
}

.pricing-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 7px 18px rgba(34, 53, 88, 0.2);
}

.pricing-panel {
  display: grid;
  gap: 18px;
}

.pricing-panel[hidden] {
  display: none !important;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.price-card {
  position: relative;
  display: flex;
  min-height: 250px;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid #dedfe5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(25, 26, 34, 0.06);
}

.price-card.featured {
  border-color: #7693bf;
  background: linear-gradient(180deg, #f7f9fd 0%, #ffffff 58%);
  box-shadow: 0 14px 30px rgba(64, 91, 133, 0.13);
}

.popular-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e7eef9;
  color: #345b96;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price-card h3 {
  margin: 16px 0 10px;
}

.price-card p {
  flex: 1;
  color: var(--muted);
}

.price-card.compact {
  min-height: 215px;
  padding: 20px;
}

.plan-cancel {
  margin: 0 0 16px;
  color: #4d607c;
  font-size: 0.86rem;
  font-weight: 650;
}

.price-label {
  color: var(--ok);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.upload-allowance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px auto 0;
  padding: 6px 14px;
  border-radius: 20px;
  background: #eaf7f0;
  color: #2d7a50;
  font-size: 13px;
  font-weight: 600;
}

.upload-allowance svg {
  flex-shrink: 0;
  color: #3d9e6b;
}

.pricing-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.pricing-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid #cfdbea;
  border-left: 4px solid #6688b8;
  border-radius: 10px;
  background: #f5f8fc;
  color: #35445d;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 8px 20px rgba(54, 76, 110, 0.08);
}

.pricing-note-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dce7f5;
  color: #345b96;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.pricing-note strong {
  color: #263a59;
  font-weight: 750;
}

.pricing-note-copy {
  display: grid;
  gap: 2px;
}

.pricing-note-copy > strong {
  font-size: 1rem;
}

.pricing-note-action.secondary {
  min-width: 148px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  white-space: nowrap;
}

.pricing-note-action.secondary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.pricing-subscription-block {
  display: grid;
  gap: 18px;
}

.pricing-subscription-block > div:first-child {
  max-width: 680px;
}

.pricing-subscription-block h3 {
  margin: 4px 0 8px;
}

.subscription-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-choice-group {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5e7ee;
}

.billing-choice-group h4 {
  margin: 0 0 4px;
}

.billing-choice-group[hidden] {
  display: none !important;
}

.billing-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 430px;
  margin-top: 18px;
  padding: 5px;
  border: 1px solid #d5dee9;
  border-radius: 12px;
  background: #e9eef4;
}

.billing-mode-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #566273;
  box-shadow: none;
}

.billing-mode-tabs button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 14px rgba(34, 53, 88, 0.2);
}

.billing-plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-plan-option {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 4px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid #d5dde7;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 6px 16px rgba(35, 49, 70, 0.05);
}

.billing-plan-option:hover:not(:disabled) {
  border-color: #8ca4c5;
  background: #f8fafd;
}

.billing-plan-option.recommended {
  border-color: #7693bf;
  background: #f7f9fd;
}

.billing-plan-option:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.billing-plan-name {
  color: #52627a;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-plan-option strong {
  color: #172943;
  font-size: 1.25rem;
  font-weight: 750;
}

.billing-plan-option small {
  color: var(--muted);
  line-height: 1.35;
}

.billing-recommended-label {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #345b96;
  font-size: 0.62rem;
  font-weight: 750;
  text-transform: uppercase;
}

.credit-pack-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #cad8e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(54, 76, 110, 0.07);
}

.credit-pack-card.locked {
  background: #f8f9fb;
}

.credit-pack-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #dce7f5;
  color: #345b96;
  font-size: 1.5rem;
  font-weight: 700;
}

.credit-pack-copy {
  display: grid;
  gap: 3px;
}

.credit-pack-copy h4,
.credit-pack-copy p {
  margin: 0;
}

.credit-pack-copy p {
  color: var(--muted);
}

.credit-balance {
  width: fit-content;
  margin-top: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e6f3ee;
  color: #277453;
  font-size: 0.75rem;
  font-weight: 700;
}

.credit-pack-buy {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.credit-pack-buy > strong {
  color: #172943;
  font-size: 1.25rem;
  font-weight: 750;
}

.credit-pack-buy > span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 1180px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subscription-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.usage-meter {
  height: 8px;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 4px;
  background: #e9e9ec;
}

.usage-meter span {
  display: block;
  height: 100%;
  background: var(--ok);
}

.public-access-card {
  width: min(980px, calc(100% - 44px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1fr);
  gap: 24px;
  padding: 28px;
}

.access-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

.access-copy h2 {
  margin: 0;
  color: #060f3f;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.18;
  font-weight: 600;
}

.access-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.public-access-card .auth-form {
  padding: 0;
}

.policy-page {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 32px 20px;
}

.policy-page h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
}

.policy-page p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.auth-card {
  width: min(920px, 100%);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.auth-intro {
  padding: 26px 30px 34px;
  background: var(--sidebar);
  color: #fff;
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 640px;
}

.auth-intro p {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.6;
}

.auth-illustration {
  width: min(100%, 620px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  justify-self: center;
  border-radius: 8px;
  margin-bottom: 10px;
}

.auth-form {
  padding: 30px;
  display: grid;
  gap: 14px;
  align-content: center;
}

.google-login {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid #dfd4e8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.whatsapp-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  border: 1px solid #cbe9d3;
  border-radius: 6px;
  background: #f2fbf5;
  color: #128c46;
  font-weight: 600;
  cursor: pointer;
}
.whatsapp-login:hover {
  border-color: #25d366;
  background: #eafaef;
}
.whatsapp-login svg { color: #25d366; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.setup-card {
  width: min(860px, 100%);
  border-radius: 8px;
  padding: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #ddd9d5;
  box-shadow: 0 24px 60px rgba(28, 29, 36, 0.14), 0 4px 14px rgba(28, 29, 36, 0.07);
}

.setup-card h1 {
  margin: 0;
  color: #fff;
  font-size: 32px;
  font-weight: 500;
}

.setup-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 40px;
  background: #292a33;
}

.setup-hero > div > p:last-child {
  max-width: 520px;
  margin: 9px 0 0;
  color: #d6d7dd;
  font-size: 15px;
}

.setup-hero .eyebrow {
  color: #f5a33c;
}

.setup-hero .setup-logout {
  border-color: #646671;
  background: transparent;
  color: #fff;
}

.setup-hero .setup-logout:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.setup-body {
  display: grid;
  gap: 18px;
  padding: 36px 40px 40px;
  background: #fff;
}

.setup-form {
  gap: 22px;
}

.setup-form label {
  gap: 9px;
}

.setup-form input {
  min-height: 54px;
  background: #fff;
}

.setup-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 120, 26, 0.13);
}

.optional-label {
  margin-left: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.setup-reassurance {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0;
  padding: 15px 17px;
  border: 1px solid #d7e9e3;
  border-left: 4px solid var(--ok);
  border-radius: 6px;
  background: #f3f9f7;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.setup-reassurance p {
  margin: 0;
}

.setup-reassurance strong {
  color: var(--ink);
  font-weight: 600;
}

.setup-check {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.setup-actions {
  margin-top: 0;
  gap: 12px;
}

.setup-actions button {
  min-width: 150px;
  min-height: 48px;
}

.setup-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.setup-flow div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d9e7e5;
  border-radius: 8px;
  background: #f5f9fa;
  color: var(--muted);
}

.setup-flow strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.setup-flow span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 13px;
  border: 1px solid #d9e7e5;
  border-radius: 8px;
  background: #f3f8f8;
}

.setup-preview div {
  display: grid;
  gap: 2px;
}

.setup-preview span,
.checkbox-label small {
  color: var(--muted);
  font-size: 12px;
}

.setup-preview strong {
  font-size: 14px;
  font-weight: 500;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border-radius: 8px;
  background: var(--purple-soft);
}

.auth-tabs button {
  width: 100%;
}

.auth-tabs button.active {
  background: var(--purple);
  color: #fff;
}

.checkbox-label {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  font-weight: 650;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.checkbox-label span {
  display: block;
  min-width: 0;
}

.account-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-alt);
}

.account-profile-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.account-profile-info {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.account-profile-info strong {
  font-size: 15px;
}

.account-profile-plan {
  flex: 0 0 auto;
}

.plan-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: #6a4f0a;
  font-size: 13px;
  font-weight: 600;
}

.billing-block-primary {
  border-color: #cfe3e0;
  background: #f3f8f8;
}

.account-secondary-heading {
  margin-top: 6px;
}

.account-grid {
  display: grid;
  gap: 12px;
}

.account-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.support-form {
  display: grid;
  gap: 10px;
}
.support-form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--muted, #5b6472);
}
.support-form input,
.support-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: inherit;
  background: #fff;
  box-sizing: border-box;
}
.support-form textarea {
  resize: vertical;
  min-height: 84px;
}

.danger-zone {
  border-color: #f3b9ae;
  background: #fffafa;
}

.table-wrap {
  overflow-x: auto;
}

.contacts-workspace {
  gap: 12px;
}

.workspace-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 5px;
  border: 1px solid #cfe1df;
  border-radius: 8px;
  background: #edf6f5;
  box-shadow: 0 4px 14px rgba(32, 34, 42, 0.05);
}

.workspace-tabs button {
  min-height: 40px;
  padding: 8px 18px;
  border-color: transparent;
  background: transparent;
  color: #555c68;
  font-weight: 600;
  box-shadow: none;
}

.workspace-tabs button.active {
  border-color: #8f63aa;
  background: #8f63aa;
  color: #fff;
  box-shadow: 0 4px 10px rgba(47, 127, 119, 0.2);
}

.workspace-tabs button:hover {
  background: #dcecea;
  color: var(--ink);
}

.workspace-tabs button.active:hover {
  background: #276d67;
  color: #fff;
}

/* ---- Contacts & Exports module ---- */
.contacts-panel {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}


.contacts-primary {
  display: grid;
  gap: 16px;
  min-width: 0;
}

/* Workflow cards */
.contacts-workflow-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.workflow-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  /* Cards sit in narrow grid tracks; keep any long label or wide control
     (e.g. the export menu) clipped to the card instead of spilling out. */
  overflow: hidden;
}

.workflow-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workflow-card-top strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.25;
}

.workflow-step {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.workflow-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.workflow-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
}

.workflow-icon svg {
  width: 17px;
  height: 17px;
}

.icon-violet {
  background: var(--purple-soft);
  color: var(--purple);
}

.icon-blue {
  background: #e3edfd;
  color: #2f6fd0;
}

.icon-green {
  background: #dff5e8;
  color: #1f8a56;
}

.icon-plain {
  background: #fff;
  border: 1px solid var(--line);
}

.workflow-desc {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.workflow-desc span:not(.workflow-chip) {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.workflow-chip {
  align-self: flex-start;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--purple-soft);
  color: var(--purple-strong);
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-chip.file {
  background: var(--surface-muted);
  color: var(--ink);
  font-weight: 500;
}

.workflow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.workflow-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.workflow-btn.primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

.workflow-btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.workflow-btn.ghost:hover:not(:disabled) {
  border-color: var(--purple);
  color: var(--purple-strong);
}

.workflow-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

select.workflow-btn {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  justify-content: flex-start;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236f7180' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.workflow-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.workflow-action-slot,
.workflow-action-slot .export-sync-menu {
  display: block;
  width: 100%;
}

.workflow-action-slot .export-sync-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--accent);
  border-color: var(--accent);
  box-sizing: border-box;
  overflow: hidden;
}

/* Keep the icon and the caret from being squeezed by the nowrap label. */
.workflow-action-slot .export-sync-menu summary svg {
  flex-shrink: 0;
}

/* The popover is absolutely positioned, so it must escape the card's
   overflow clipping — anchor it to the card and let it render above. */
.workflow-card:has(.export-sync-menu[open]) {
  overflow: visible;
}

.workflow-action-slot .export-sync-popover {
  right: 0;
  left: auto;
  min-width: 210px;
}

/* Stats bar */
.contacts-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.contacts-stat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}

.contacts-stat-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
}

.contacts-stat-icon svg {
  width: 17px;
  height: 17px;
}

.contacts-stat-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contacts-stat-num {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.contacts-stat-label {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right sidebar */
.contacts-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.side-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.side-panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.side-panel-head strong {
  font-size: 14px;
  font-weight: 650;
}

.side-panel-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--purple-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.side-panel-icon svg {
  width: 15px;
  height: 15px;
}

.team-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.team-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple-strong);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.team-list-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.team-list-text strong {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-list-text span {
  font-size: 11.5px;
  color: var(--muted);
}

.side-panel-empty {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.side-panel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.side-panel-btn:hover {
  border-color: var(--purple);
  color: var(--purple-strong);
}

.side-panel-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}

.tip-card {
  padding: 14px;
  border-radius: 14px;
  background: var(--purple-softer);
  border: 1px solid #e4dcff;
}

.tip-card.blue {
  background: #eff5fe;
  border-color: #d8e6fa;
}

.tip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.tip-head strong {
  font-size: 13px;
  font-weight: 650;
}

.tip-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #fff;
  color: var(--purple);
  display: grid;
  place-items: center;
}

.tip-card.blue .tip-icon {
  color: #2f6fd0;
}

.tip-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* Contacts main area */
.contacts-main-area {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  min-width: 0;
}

/* Keep all four workflow cards on one row until they'd get too narrow to
   read. Below this they fall back to a 2x2 grid. */
@media (max-width: 1180px) {
  .contacts-workflow-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.contacts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.contacts-toolbar h2 {
  margin: 0;
  font-size: 17px;
  white-space: nowrap;
}

.contacts-toolbar .search-field input {
  min-height: 36px;
  font-size: 13px;
}

.contacts-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contacts-export-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.contacts-toolbar input {
  width: min(320px, 30vw);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field-icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  padding-right: 30px;
  padding-left: 32px;
}

.search-clear {
  position: absolute;
  right: 4px;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.search-clear:hover {
  background: var(--line);
  color: var(--ink);
}

.search-active-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.search-active-note .link-button {
  font-size: 13px;
}

.export-sync-menu {
  position: relative;
}

.export-sync-menu summary {
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  white-space: nowrap;
}

.export-sync-menu summary::-webkit-details-marker {
  display: none;
}

.export-sync-menu summary::after {
  margin-left: 9px;
  content: "▾";
}

.export-sync-menu[open] summary::after {
  content: "▴";
}

.export-sync-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: 245px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(21, 28, 42, 0.16);
}

.export-sync-popover a,
.export-sync-popover button {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.export-sync-popover a:hover,
.export-sync-popover button:hover {
  background: #eaf4f3;
  color: #1f625d;
}

.export-sync-heading {
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.export-sync-note {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.integration-cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.integration-cta {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  min-height: 150px;
  padding: 16px 18px;
  border: 1px solid #cfe3e0;
  border-radius: 8px;
  background: #f1f8f7;
  box-shadow: 0 7px 20px rgba(28, 70, 66, 0.07);
}

.integration-cta > div {
  width: 100%;
  min-width: 0;
}

.integration-cta > .actions {
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
}

.integration-cta .button-link,
.integration-cta button {
  min-height: 34px;
  padding: 6px 10px;
  max-width: 100%;
  white-space: normal;
}

.integration-cta > .actions > .button-link,
.integration-cta > .actions > button {
  width: auto;
  min-width: 220px;
}

.integration-action {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.integration-action > .button-link,
.integration-action > button {
  justify-self: start;
  width: auto;
  min-width: 220px;
}

.google-contacts-sync-status {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid #2f877f;
  border-radius: 4px;
  background: #edf8f7;
  color: #245a56;
  font-size: 0.9rem;
  line-height: 1.4;
}

.google-contacts-sync-status.bad {
  border-left-color: #bd2b11;
  background: #fff1ee;
  color: #8c2412;
}

.google-contacts-context-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.google-contacts-context-form label {
  display: grid;
  gap: 7px;
}

.google-contacts-context-form .muted {
  grid-column: 1 / -1;
  margin: 0;
}

.integration-cta strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.integration-cta .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.google-permission-note {
  margin: 9px 0 0;
  padding-left: 9px;
  border-left: 3px solid #349a86;
  color: #385c57;
  font-size: 12px;
  line-height: 1.45;
}

.google-permission-note strong {
  display: inline;
  margin: 0;
  color: #176b5f;
  font-size: inherit;
  font-weight: 600;
}

.team-vcf-guide {
  margin: -2px 0 18px;
  overflow: hidden;
  border: 1px solid #d8dfea;
  border-radius: 8px;
  background: #fff;
}

.team-vcf-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
}

.team-vcf-guide-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-vcf-guide-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.team-vcf-guide-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.team-vcf-instructions {
  border-top: 1px solid #e4e8ef;
}

.team-vcf-instructions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.team-vcf-instructions summary::-webkit-details-marker {
  display: none;
}

.team-vcf-guide-label {
  flex: 0 0 auto;
  color: #237f73;
  font-size: 12px;
  font-weight: 600;
}

.team-vcf-instructions[open] .team-vcf-guide-label {
  font-size: 0;
}

.team-vcf-instructions[open] .team-vcf-guide-label::after {
  content: "Hide steps";
  font-size: 12px;
}

.team-vcf-guide-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px 18px 18px;
  background: #f8fafc;
}

.team-vcf-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.team-vcf-steps li {
  padding-left: 3px;
  color: #237f73;
}

.team-vcf-steps strong,
.team-vcf-steps span {
  display: block;
}

.team-vcf-steps strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.team-vcf-steps span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.team-vcf-action {
  width: auto;
}

.team-vcf-action p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.button-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.button-link.primary {
  background: var(--accent);
}

.button-link.primary:hover {
  background: var(--accent-strong);
}

.button-link.secondary {
  border-color: #9db8b5;
  background: #fff;
  color: #276d67;
}

.button-link.secondary:hover {
  background: #e7f2f0;
}

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f8f8;
}

.bulk-toolbar span {
  color: var(--muted);
  font-weight: 500;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  table-layout: fixed;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  background: #f7f1fb;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b5167;
  font-weight: 500;
}

.contacts-table {
  min-width: 900px;
}

.contacts-table th:nth-child(1),
.contacts-table td:nth-child(1) {
  width: 4%;
  text-align: center;
}

.contacts-table th:nth-child(2),
.contacts-table td:nth-child(2) {
  width: 20%;
}

.contacts-table th:nth-child(3),
.contacts-table td:nth-child(3) {
  width: 22%;
}

.contacts-table th:nth-child(4),
.contacts-table td:nth-child(4) {
  width: 15%;
}

.contacts-table th:nth-child(5),
.contacts-table td:nth-child(5) {
  width: 17%;
}

.contacts-table th:nth-child(6),
.contacts-table td:nth-child(6) {
  width: 22%;
  text-align: right;
}

.contact-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.contact-actions-cell {
  text-align: right;
}

.compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
}

.contacts-table tbody tr:hover {
  background: #f5f9fa;
}

.cell-main {
  color: var(--ink);
  font-weight: 500;
}

.cell-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.phone-value {
  white-space: nowrap;
  overflow-wrap: normal;
}

.status-stack {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
}

.contacts-table .status-stack {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.google-connection-panel,
.sheets-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.google-connection-panel {
  border-color: #cfe1df;
  background: var(--panel-alt);
}

.google-connection-panel h2,
.sheets-heading h2 {
  margin-bottom: 4px;
}

.google-connection-panel .eyebrow {
  margin-bottom: 5px;
  color: #8f63aa;
}

.sheet-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 7px 11px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.sheet-link.primary {
  background: var(--accent);
  color: #fff;
}

.sheet-link.primary:hover {
  background: var(--accent-strong);
}

.sheet-link.secondary {
  border: 1px solid #d0d5dd;
  background: #fff;
  color: var(--ink);
}

.sheet-link.secondary:hover {
  border-color: #9db8b5;
  background: var(--panel-alt);
}

.sheets-table {
  min-width: 820px;
  table-layout: fixed;
}

.sheets-table th:nth-child(1),
.sheets-table td:nth-child(1) {
  width: 29%;
}

.sheets-table th:nth-child(2),
.sheets-table td:nth-child(2) {
  width: 10%;
}

.sheets-table th:nth-child(3),
.sheets-table td:nth-child(3) {
  width: 16%;
}

.sheets-table th:nth-child(4),
.sheets-table td:nth-child(4) {
  width: 45%;
}

.sheets-table .row-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.storage-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.storage-type.file {
  background: var(--purple-soft);
  color: #704b87;
}

.storage-type.google {
  background: #e7f6ef;
  color: #257954;
}

.action-hint {
  font-size: 12px;
}

.danger-text {
  color: var(--danger);
  font-size: 12px;
}

.danger-text:hover {
  color: #8f1c14;
}

.numeric-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

strong {
  font-weight: 500;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .metrics,
  .setup-flow,
  .setup-preview,
  .grid.two,
  .grid.three,
  .auth-card,
  .form-grid,
  .card-row,
  .collection-summary,
  .span-2,
  .span-3 {
    grid-column: span 1;
  }

  .auth-intro {
    min-height: auto;
  }

  .setup-card {
    width: 100%;
  }

  .setup-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 26px 22px;
  }

  .setup-hero button {
    justify-self: start;
    width: max-content;
  }

  .setup-body {
    padding: 26px 22px 30px;
  }

  .processing-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .destination-selector {
    grid-template-columns: 1fr;
  }

  .card-row {
    grid-template-columns: 1fr;
  }

  .review-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .review-heading-actions {
    justify-content: flex-start;
  }

  .destination-selector > button {
    justify-self: start;
  }

  .new-exhibition-heading {
    flex-direction: column;
  }

  .auth-illustration {
    max-height: 240px;
  }

  .auth-wrap.public-page {
    padding: 0;
  }

  .public-nav {
    flex-wrap: wrap;
    align-items: center;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 12px 16px;
    gap: 10px 16px;
  }

  .public-brand {
    flex-basis: auto;
  }

  .public-links {
    display: none;
  }

  .public-actions {
    width: auto;
    flex-wrap: nowrap;
    margin-left: auto;
    gap: 8px;
  }

  .public-actions button,
  .hero-actions button {
    flex: 0 1 auto;
    padding: 8px 20px;
    font-size: 14px;
  }

  .public-hero,
  .split-section,
  .features-section,
  .public-feature-grid,
  .demo-panel,
  .public-access-card {
    grid-template-columns: 1fr;
  }

  .features-copy,
  .features-mid-illustration,
  .feature-strip,
  .workflow-flow {
    grid-column: 1;
    grid-row: auto;
  }

  .features-mid-illustration {
    place-items: center;
    justify-self: center;
  }

  .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .features-section {
    padding-right: 34px;
  }

  .public-hero {
    width: min(100% - 28px, 720px);
    gap: 22px;
    padding: 34px 0;
  }

  .hero-illustration {
    max-width: 560px;
  }

  .public-section,
  .public-panel {
    width: min(100% - 28px, 720px);
    padding: 24px;
  }

  .public-feature-grid {
    width: min(100% - 28px, 720px);
  }

  .features-mid-illustration img {
    max-width: 240px;
  }

  .demo-steps {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-access-card {
    width: min(100% - 28px, 720px);
    padding: 24px;
  }
}

@media (max-width: 760px) {
  /* Guard against any single wide child (a table, a long unbroken string)
     dragging the whole page — and the fixed bottom nav with it — wider than
     the screen, which forced users to pinch-zoom out. overflow-x: clip stops
     the spill without creating a scroll container (so sticky/fixed still work);
     content that must scroll horizontally uses its own .table-wrap. */
  .shell,
  .main {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }

  .pricing-section {
    gap: 20px;
  }

  .pricing-heading h2 {
    font-size: clamp(1.9rem, 9vw, 2.65rem);
    line-height: 1.08;
  }

  .pricing-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .pricing-tab {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 9px 10px;
    font-size: 0.78rem;
  }

  .price-card {
    min-height: 0;
    padding: 20px;
  }

  .price-card h3 {
    margin-top: 12px;
  }

  .pricing-subscription-block {
    padding: 18px;
  }

  .pricing-note {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    padding: 16px;
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .pricing-note-action.secondary {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
  }

  .billing-mode-tabs {
    max-width: none;
  }

  .billing-plan-grid {
    grid-template-columns: 1fr;
  }

  .billing-plan-option {
    min-height: 104px;
  }

  .credit-pack-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    padding: 16px;
  }

  .credit-pack-buy {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid #e0e6ee;
  }

  .credit-pack-buy > span {
    margin: 0;
  }

  .credit-pack-buy button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
    margin-top: 8px;
  }

  .google-contacts-context-form {
    grid-template-columns: 1fr;
  }

  .export-sync-menu {
    width: 100%;
  }

  .export-sync-menu > summary {
    width: 100%;
    justify-content: center;
  }

  .export-sync-popover {
    left: 0;
    right: auto;
    width: min(100%, 22rem);
  }

  body {
    background: #f4f7f8;
  }

  .shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 100;
    display: block;
    min-height: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
    border-top: 1px solid #dce3e8;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -10px 30px rgba(32, 34, 42, 0.13);
    backdrop-filter: blur(16px);
  }

  .sidebar .brand,
  .sidebar > small {
    display: none;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .nav button {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 62px;
    padding: 6px 3px 5px;
    border-radius: 8px;
    border: 0;
    color: #626d78;
    background: transparent;
    text-align: center;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    white-space: normal;
  }

  .nav button.active {
    color: #176b64;
    background: #e3f2f0;
    box-shadow: inset 0 2px 0 var(--purple);
  }

  .nav button.active:hover {
    color: #176b64;
    background: #e3f2f0;
  }

  .nav-full,
  .nav-icon {
    display: none;
  }

  .nav-short {
    display: block;
  }

  .nav-mobile-icon {
    display: grid;
    width: 24px;
    height: 23px;
    place-items: center;
    color: currentColor;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
  }

  .nav-count {
    position: absolute;
    top: 3px;
    left: calc(50% + 8px);
    display: grid;
    min-width: 17px;
    height: 17px;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 10px;
    color: #fff;
    background: #e7781d;
    font-size: 10px;
    line-height: 1;
  }

  .main {
    min-width: 0;
    padding: calc(12px + env(safe-area-inset-top)) 12px calc(92px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 58px;
    margin: calc(-12px - env(safe-area-inset-top)) -12px 0;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    border-bottom: 1px solid #d9e1e6;
    background: rgba(244, 247, 248, 0.96);
    backdrop-filter: blur(14px);
  }

  .topbar h1 {
    font-size: 18px;
    font-weight: 600;
  }

  .topbar .muted {
    display: block;
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .session-pill {
    display: none;
  }

  .topbar-actions button {
    min-height: 36px;
    min-width: max-content;
    padding: 7px 12px;
    font-size: 12px;
  }

  .panel {
    min-width: 0;
    padding: 15px;
    gap: 13px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(32, 34, 42, 0.055);
  }

  .panel h2 {
    font-size: 19px;
  }

  .upload-panel {
    gap: 16px;
  }

  .destination-selector {
    padding: 13px;
    gap: 12px;
    box-shadow: none;
  }

  .dropzone {
    padding: 24px 16px 18px;
    border-style: dashed;
    border-color: #c5d4d1;
    background: linear-gradient(180deg, #f8fafa 0%, #f1f6f5 100%);
  }

  .dropzone-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }

  .upload-picker {
    width: 100%;
    min-height: 46px;
    font-size: 13.5px;
    padding: 10px 14px;
  }

  .upload-picker.camera {
    grid-row: auto;
  }

  .pair-toggle {
    justify-self: stretch;
    max-width: 100%;
    padding: 6px 0 0;
  }

  .file-row,
  .processing-file-row {
    align-items: flex-start;
  }

  .review-panel {
    padding: 14px;
  }

  .review-heading {
    padding-bottom: 12px;
  }

  .review-heading-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .review-heading-actions button {
    width: 100%;
  }

  .review-card {
    padding: 12px;
    box-shadow: 0 8px 22px rgba(32, 34, 42, 0.06);
  }

  .review-card-form,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: 1;
  }

  .review-card-media img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    background: #eef2f4;
  }

  .review-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .review-card-actions button {
    width: 100%;
  }

  .sheets-heading,
  .google-connection-panel {
    align-items: stretch;
  }

  .contacts-toolbar {
    flex-wrap: wrap;
  }

  .contacts-toolbar-actions {
    width: 100%;
  }

  .contacts-toolbar-actions .search-field {
    flex: 1;
  }

  .sheets-heading .actions,
  .google-connection-panel .actions {
    width: 100%;
  }

  .sheets-heading .actions > *,
  .google-connection-panel .actions > * {
    flex: 1;
  }

  .integration-cta-grid {
    grid-template-columns: 1fr;
  }

  .integration-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .integration-cta .button-link,
  .integration-cta button {
    width: 100%;
  }

  .integration-action > .button-link,
  .integration-action > button {
    width: 100%;
    min-width: 0;
  }

  .team-vcf-guide-header {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .team-vcf-guide-header > .button-link {
    width: 100%;
  }

  .team-vcf-instructions summary {
    align-items: flex-start;
    padding: 12px 14px;
  }

  .team-vcf-guide-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px;
  }

  .team-vcf-steps {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .team-vcf-action {
    width: 100%;
  }

  .file-item {
    align-items: stretch;
    flex-direction: column;
  }

  .card-side-previews {
    width: 100%;
  }

  .card-side-previews figure,
  .card-side-previews .file-thumb {
    width: 100%;
  }

  .card-side-previews .file-thumb {
    height: 110px;
  }

  .file-side-actions {
    justify-content: flex-start;
  }

  .workspace-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .workspace-tabs button {
    min-width: 0;
  }

  .table-wrap {
    margin-inline: 0;
    border-radius: 7px;
    overflow: visible;
  }

  .contacts-table,
  .sheets-table {
    min-width: 0;
  }

  .contacts-table thead,
  .sheets-table thead {
    display: none;
  }

  .contacts-table,
  .contacts-table tbody,
  .contacts-table tr,
  .contacts-table td,
  .sheets-table,
  .sheets-table tbody,
  .sheets-table tr,
  .sheets-table td {
    display: block;
    width: 100% !important;
    max-width: none;
  }

  .contacts-table tr,
  .sheets-table tr {
    position: relative;
    margin-bottom: 10px;
    padding: 16px;
    border: 1px solid #dfe6ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(32, 34, 42, 0.065);
  }

  .contacts-table td,
  .sheets-table td {
    display: grid;
    grid-template-columns: minmax(74px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
    text-align: left;
  }

  .contacts-table td::before,
  .sheets-table td::before {
    content: attr(data-label);
    color: #747d88;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .contacts-table td:first-child {
    position: absolute;
    top: 16px;
    right: 16px;
    width: auto !important;
    padding: 0;
    z-index: 1;
  }

  .contacts-table td:first-child::before {
    display: none;
  }

  .contacts-table td:nth-child(2) {
    display: block;
    padding: 0 42px 13px 0;
    border-bottom: 1px solid #e7ecef;
  }

  .contacts-table td:nth-child(2)::before {
    display: block;
    margin-bottom: 5px;
    color: #8f63aa;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .contacts-table td:nth-child(2) .cell-main {
    font-size: 16px;
    line-height: 1.3;
  }

  .contacts-table td:nth-child(2) .cell-sub {
    margin-top: 3px;
    font-size: 14px;
  }

  .contacts-table td:nth-child(n+3):nth-child(-n+5) {
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 9px 0;
  }

  .contacts-table td:nth-child(n+3):nth-child(-n+5)::before {
    padding-top: 2px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .contact-actions-cell {
    grid-template-columns: 1fr;
    padding-top: 11px;
    border-top: 1px solid #e7ecef;
  }

  .contact-actions-cell::before {
    display: none;
  }

  .contact-action-group {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(58px, 0.75fr) minmax(64px, 0.8fr);
    gap: 7px;
    width: 100%;
  }

  .sheets-table .row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
  }

  .contact-action-group .compact-action {
    width: 100%;
    min-height: 40px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .contacts-toolbar-actions {
    flex-wrap: wrap;
  }

  .contacts-toolbar-actions input {
    width: 100%;
    min-height: 46px;
  }


  .contacts-export-actions {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .contacts-export-actions a,
  .contacts-export-actions button {
    width: 100%;
  }

  .contacts-export-actions .export-all-label {
    display: flex;
    align-items: center;
    color: #626d78;
    font-size: 12px;
    font-weight: 600;
  }

  .bulk-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bulk-toolbar button,
  .bulk-toolbar a {
    width: 100%;
  }

  .resend-verification {
    width: 100%;
    min-height: 46px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .dialog,
  .wide-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - env(safe-area-inset-top));
    margin: 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 10px 10px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 -18px 50px rgba(19, 24, 31, 0.24);
  }

  .voice-recorder {
    padding: 14px;
  }

  .voice-waveform {
    height: 86px;
  }

  .voice-record-actions,
  .voice-note-controls,
  .voice-apply-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .voice-record-actions button,
  .voice-note-controls button,
  .voice-apply-row button {
    width: 100%;
    min-height: 46px;
  }

  .voice-result .grid.two {
    grid-template-columns: 1fr;
  }

  .native-keyboard-open .sidebar {
    display: none;
  }

  .native-keyboard-open .main {
    padding-bottom: 16px;
  }
}

.native-app .public-page .public-hero,
.native-app .public-page .public-feature-grid,
.native-app .public-page .public-section,
.native-app .public-page .demo-panel,
.native-app .public-page .pricing-section {
  display: none;
}

.native-app .public-page .public-access-card {
  margin-top: 22px;
  margin-bottom: calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 16px 42px rgba(32, 34, 42, 0.1);
}

@media (max-width: 760px) {
  .native-app,
  .native-app body {
    min-height: 100%;
    overflow-x: hidden;
  }

  .native-app body {
    height: auto;
    overflow-y: auto;
    background: #f4f7f8;
  }

  .native-app body.app-public {
    height: 100%;
    overflow: hidden;
  }

  .native-app body.app-authenticated,
  .native-app body.app-onboarding {
    min-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .native-app .auth-wrap.public-page {
    height: 100dvh;
    min-height: 0;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding: 18px 0 calc(96px + env(safe-area-inset-bottom));
  }

  .native-app .public-page .public-nav {
    display: none;
  }

  .native-app .public-page .public-access-card {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    align-content: start;
    gap: 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .native-app .public-access-card .access-copy {
    gap: 7px;
    padding: 8px 2px 0;
  }

  .native-app .public-access-card .access-copy .section-kicker {
    font-size: 11px;
  }

  .native-app .public-access-card .access-copy h2 {
    max-width: 320px;
    font-size: 25px;
    line-height: 1.2;
  }

  .native-app .public-access-card .access-copy p {
    max-width: 420px;
    font-size: 14px;
    line-height: 1.5;
  }

  .native-app .public-access-card .auth-form {
    align-content: start;
    gap: 13px;
    padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
    border: 1px solid #dbe3e8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(32, 34, 42, 0.08);
  }

  .native-app .public-access-card .auth-form > h1 {
    font-size: 23px;
    line-height: 1.2;
  }

  .native-app .public-access-card .auth-tabs {
    gap: 5px;
    padding: 4px;
  }

  .native-app .public-access-card .auth-tabs button,
  .native-app .public-access-card .google-login,
  .native-app .public-access-card .actions button {
    min-height: 48px;
  }

  .native-app .public-access-card .auth-form label {
    gap: 7px;
    font-size: 14px;
  }

  .native-app .public-access-card .auth-form input {
    min-height: 48px;
    padding: 11px 12px;
    font-size: 16px;
  }

  .native-app .public-access-card .field-help,
  .native-app .public-access-card .checkbox-label {
    font-size: 12px;
    line-height: 1.45;
  }

  .native-app .public-access-card .checkbox-label input {
    min-height: 0;
  }

  .native-app .public-access-card .actions {
    display: grid;
  }

  .native-app .public-access-card .actions button {
    width: 100%;
  }

  .native-app.native-keyboard-open .public-access-card .access-copy {
    display: none;
  }

  .native-app.native-keyboard-open .public-page .public-access-card {
    min-height: 100%;
    padding-top: 10px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .native-app.native-keyboard-open .public-access-card .auth-form {
    box-shadow: none;
    scroll-margin-bottom: 32px;
  }
}

.native-app .native-intro {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  color: #171a24;
  background: #f4f7f8;
}

.native-splash {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  color: #fff;
  background:
    linear-gradient(145deg, rgba(58, 169, 147, 0.13), transparent 44%),
    #20232d;
}

.native-brand-mark {
  position: relative;
  width: 92px;
  height: 92px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 22px;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.24);
}

.native-brand-mark::before,
.native-brand-mark::after,
.native-brand-mark span::before,
.native-brand-mark span::after {
  position: absolute;
  width: 22px;
  height: 22px;
  content: "";
  border-color: #f59e0b;
}

.native-brand-mark::before {
  top: 15px;
  left: 15px;
  border-top: 4px solid #f59e0b;
  border-left: 4px solid #f59e0b;
}

.native-brand-mark::after {
  top: 15px;
  right: 15px;
  border-top: 4px solid #f59e0b;
  border-right: 4px solid #f59e0b;
}

.native-brand-mark span::before {
  bottom: 15px;
  left: 15px;
  border-bottom: 4px solid #55c3ad;
  border-left: 4px solid #55c3ad;
}

.native-brand-mark span::after {
  right: 15px;
  bottom: 15px;
  border-right: 4px solid #55c3ad;
  border-bottom: 4px solid #55c3ad;
}

.native-splash-copy {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.native-splash-copy h1 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}

.native-splash-copy p {
  margin: 0;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.native-splash-copy span {
  margin-top: 12px;
  color: #d7dde2;
  font-size: 16px;
}

.native-splash-loader {
  width: 112px;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
}

.native-splash-loader i {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: #f59e0b;
  animation: native-splash-progress 1.35s ease-in-out forwards;
}

.native-splash-skip {
  position: absolute;
  right: 22px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  min-height: 42px;
  padding: 0 8px;
  color: #fff;
  border: 0;
  background: transparent;
}

@keyframes native-splash-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(220%); }
}

.native-feature-slide {
  display: grid;
  grid-template-rows: auto minmax(230px, 42vh) auto auto auto;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom));
}

.native-intro-header,
.native-intro-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.native-wordmark {
  display: grid;
  gap: 1px;
}

.native-wordmark strong {
  font-size: 21px;
}

.native-wordmark span {
  color: #607080;
  font-size: 11px;
  text-transform: uppercase;
}

.native-intro-header .link-button {
  width: auto;
  min-height: 42px;
  padding: 0 4px;
  color: #5f6877;
}

.native-slide-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8f2f1;
  box-shadow: 0 18px 42px rgba(29, 43, 55, 0.11);
}

.native-feature-slide[data-native-slide="2"] .native-slide-visual {
  background: #eef0f7;
}

.native-scan-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  width: 100%;
}

.native-card-stack {
  position: relative;
  width: 104px;
  height: 86px;
}

.native-card-stack span {
  position: absolute;
  inset: 10px 0 0 8px;
  display: block;
  border: 1px solid #cfd8dd;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(36, 51, 63, 0.12);
}

.native-card-stack span:nth-child(1) { transform: rotate(-10deg); }
.native-card-stack span:nth-child(2) { transform: rotate(7deg); }
.native-card-stack span:nth-child(3) {
  background:
    linear-gradient(#59b9a6 0 0) 12px 13px / 24px 5px no-repeat,
    linear-gradient(#dce3e7 0 0) 12px 28px / 70px 4px no-repeat,
    linear-gradient(#dce3e7 0 0) 12px 39px / 56px 4px no-repeat,
    #fff;
  transform: rotate(0);
}

.native-flow-arrow {
  color: #3a9f8b;
  font-size: 30px;
}

.native-contact-preview {
  display: grid;
  grid-template-columns: 28px 72px;
  align-content: center;
  gap: 8px;
  width: 120px;
  height: 112px;
  padding: 16px 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(36, 51, 63, 0.13);
}

.native-contact-preview i {
  grid-row: span 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f7b63f;
}

.native-contact-preview b {
  height: 5px;
  border-radius: 3px;
  background: #d9e1e5;
}

.native-note-visual {
  display: grid;
  place-items: center;
  gap: 18px;
}

.native-mic-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: #fff;
  border: 8px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: #e77d1c;
  box-shadow: 0 10px 26px rgba(153, 74, 0, 0.2);
}

.native-wave-bars {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 40px;
}

.native-wave-bars i {
  width: 4px;
  height: 13px;
  border-radius: 2px;
  background: #8b68b3;
}

.native-wave-bars i:nth-child(3n + 1) { height: 30px; }
.native-wave-bars i:nth-child(2n) { height: 21px; }

.native-sheet-lines {
  display: grid;
  gap: 7px;
  width: 158px;
  padding: 13px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(36, 51, 63, 0.1);
}

.native-sheet-lines span {
  height: 6px;
  border-radius: 3px;
  background: #dce4e8;
}

.native-sheet-lines span:first-child {
  width: 70%;
  background: #65b6a5;
}

.native-slide-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

.native-slide-copy .section-kicker {
  margin: 0;
  color: #17806d;
  font-size: 11px;
}

.native-slide-copy h1 {
  margin: 0;
  max-width: 340px;
  font-size: 29px;
  line-height: 1.16;
}

.native-slide-copy > p:last-child {
  margin: 0;
  color: #5f6c79;
  font-size: 15px;
  line-height: 1.55;
}

.native-slide-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.native-slide-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8d1d6;
}

.native-slide-dots i.active {
  width: 22px;
  border-radius: 4px;
  background: #e77d1c;
}

.native-intro-actions {
  gap: 10px;
}

.native-intro-actions button {
  flex: 1;
  min-height: 50px;
}

.native-intro-actions button:only-child {
  margin-left: auto;
  flex: 0 0 58%;
}

@media (max-width: 640px) {
  .modal-backdrop {
    padding: 10px;
  }

  .dialog {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .destination-selector,
  .new-exhibition-fields {
    padding: 14px;
  }

  .public-links {
    display: none;
  }

  .hero-brand {
    font-size: 26px;
  }

  .hero-headline {
    font-size: 34px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-actions,
  .demo-actions {
    flex-direction: column;
  }

  .public-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    margin-left: auto;
    gap: 8px;
  }

  .hero-actions button,
  .demo-actions button {
    width: 100%;
  }

  .public-actions button {
    width: auto;
    padding: 7px 16px;
    font-size: 13px;
  }

  .demo-sample-files,
  .demo-review-grid {
    grid-template-columns: 1fr;
  }

  .feature-strip {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }

}

@media (max-width: 980px) {
  .google-connection-panel,
  .sheets-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

/* Team assignment */
.contacts-team-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.contacts-team-bar-copy {
  display: grid;
  gap: 2px;
}

.contacts-team-bar-copy strong {
  font-size: 14px;
  color: var(--ink);
}

.contacts-team-bar-copy small {
  color: var(--muted);
  font-size: 13px;
}

.contact-assign-cell {
  min-width: 150px;
}

.assign-select {
  width: 100%;
  max-width: 190px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.assign-select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.team-manager {
  display: grid;
  gap: 14px;
  text-align: left;
}

.team-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.team-member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: #f3f8f8;
  border: 1px solid #cfe3e0;
  border-radius: 9px;
  font-size: 14px;
}

.team-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
  background: #f3f8f8;
  border: 1px dashed #cfe3e0;
  border-radius: 9px;
}

.team-add-form {
  display: flex;
  gap: 8px;
}

.team-add-form input {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
}

.team-manager-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.link-danger {
  background: none;
  border: none;
  padding: 4px 6px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: auto;
}

.link-danger:hover {
  text-decoration: underline;
}

/* Dedicated auth screen (Zoho/Slack-style) */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--bg);
}

.auth-screen-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(32, 34, 42, 0.10);
  padding: 22px 28px 30px;
  display: grid;
  gap: 12px;
  position: relative;
}

.auth-screen-card .auth-back {
  justify-self: start;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 4px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-height: auto;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-screen-card .auth-close {
  position: absolute;
  top: 16px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.auth-screen-card .auth-close:hover {
  background: var(--yellow-soft);
  color: var(--ink);
}

.auth-screen-card .auth-back:hover {
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
}

.auth-screen-brand {
  display: grid;
  gap: 1px;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 4px;
}

.auth-screen-brand strong {
  font-size: 22px;
}

.auth-screen-brand span {
  color: var(--muted);
  font-size: 13px;
}

/* FAQ */
.faq-section {
  display: grid;
  gap: 18px;
}

.faq-head {
  display: grid;
  gap: 6px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.faq-grid details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.faq-grid summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.faq-grid summary::-webkit-details-marker {
  display: none;
}

.faq-grid summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.faq-grid details[open] summary::after {
  content: "\2013";
}

.faq-grid details p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* CTA band */
.public-cta {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 30px;
  border-radius: 0;
  background: linear-gradient(135deg, #1b2942 0%, #243456 100%);
  color: #fff;
}

.public-cta h2 {
  margin: 0 0 4px;
  color: #fff;
}

.public-cta-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.public-cta-actions {
  display: flex;
  gap: 12px;
}

/* Footer */
.public-footer {
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
  padding: 16px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.public-footer-brand {
  display: grid;
  gap: 1px;
}

.public-footer-brand strong {
  color: var(--ink);
}

.public-footer-brand span {
  color: var(--muted);
  font-size: 13px;
}

.public-footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.public-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.public-footer-links a:hover {
  color: var(--accent);
}

.public-footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* Billing / plan choices (Account tab) */
.plan-choices {
  display: grid;
  gap: 8px;
  margin: 6px 0 12px;
}

.plan-choices button {
  justify-content: flex-start;
  text-align: left;
}

.billing-block .actions {
  margin-top: 4px;
}

/* Contacts filters */
.contacts-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 2px;
}

.filter-field {
  display: grid;
  gap: 4px;
  flex: 1 1 150px;
  min-width: 0;
}

.filter-field span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.filter-field select {
  min-height: 34px;
  min-width: 0;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  cursor: pointer;
}

#clearContactFilters {
  flex: 0 0 auto;
  margin-bottom: 7px;
  font-size: 12.5px;
}

/* Contacts list (redesigned) */
.contacts-selectbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 2px 10px;
  margin-top: 0;
  border-bottom: 1px solid var(--line);
}

.selectall-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.contacts-count {
  margin-right: auto;
  font-size: 13px;
}

.selectbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Every row is its own grid container, so `auto` tracks would size to each
   row's own content and columns would not line up down the list. Give the
   trailing columns explicit widths so all rows share one alignment. */
.contact-card {
  display: grid;
  /* meta + actions are sized to their content (auto) — pinning them to a fixed
     px width narrower than their children made the columns overlap. */
  grid-template-columns: 18px 36px minmax(150px, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}

.contact-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Voice note, Google sync status, Team member.
   flex-shrink is off so the labels keep their full width and the name column
   absorbs the remaining space instead. */
.contact-meta > .contact-col {
  flex: 0 0 auto;
}

.contact-meta > .contact-col:nth-child(1) {
  width: 100px;
}

.contact-meta > .contact-col:nth-child(2) {
  width: 94px;
}

.contact-meta > .contact-col:nth-child(3) {
  width: 118px;
}

.contact-card:last-child {
  border-bottom: none;
}

.contact-card:hover {
  background: #faf8f5;
}

.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple-strong);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.contact-card-check {
  display: inline-flex;
  align-items: center;
}

.contact-card-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.contact-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.contact-card-head strong {
  font-size: 13.5px;
  line-height: 19px;
  font-weight: 650;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

/* Voice-note preview on the contact row, so a recorded note is visible at a glance. */
.contact-card-voice {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 16px;
  font-size: 12px;
  line-height: 16px;
  color: var(--purple-strong, #6c3fa4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-card-voice svg { flex-shrink: 0; }

/* Always occupies a line, empty or not, so every row is the same height */
.contact-card-line {
  min-height: 16px;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card-tag {
  justify-self: start;
  padding: 3px 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 5px;
  white-space: nowrap;
}

/* Per-row labelled columns */
.contact-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact-col-label {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* Reserved even when blank so synced and unsynced rows match in height */
.contact-col-sub {
  min-height: 14px;
  font-size: 10.5px;
  line-height: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.sync-badge svg {
  flex-shrink: 0;
}

.sync-badge.ok {
  background: #e4f7ec;
  color: #17794a;
}

.sync-badge.idle {
  background: #fdf0e3;
  color: #b3651a;
}

.sync-badge.bad {
  background: #fdeaea;
  color: var(--danger);
}

/* Row action buttons */
.row-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.row-btn svg {
  flex-shrink: 0;
  color: var(--muted);
}

/* The global button:hover paints a dark accent background, which made the
   label unreadable here — set the background explicitly to override it. */
.row-btn:hover {
  background: var(--purple-softer);
  border-color: var(--purple);
  color: var(--purple-strong);
  box-shadow: none;
}

.row-btn:hover svg {
  color: var(--purple);
}

.row-btn.danger {
  color: var(--danger);
}

.row-btn.danger svg {
  color: var(--danger);
}

.row-btn.danger:hover {
  background: #fdeaea;
  border-color: #f3c4c0;
  color: var(--danger);
}

.row-btn.whatsapp {
  color: #1c7c4a;
  border-color: #bfe6cf;
  background: #f1fbf5;
  text-decoration: none;
}

.row-btn.email {
  color: #3a52a8;
  border-color: #cdd7f0;
  background: #f3f5fd;
  text-decoration: none;
}
.row-btn.email svg { color: #5069c0; }
.row-btn.email:hover { border-color: #5069c0; background: #eef1fb; }

.row-btn.whatsapp svg {
  color: #25d366;
}

.row-btn.whatsapp:hover {
  background: #e2f6ea;
  border-color: #8fd6ac;
  color: #14663a;
}

/* Original-script line under the Latin name */
.contact-card-native {
  min-height: 16px;
  font-size: 12px;
  line-height: 16px;
  color: var(--purple-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Voice-note column */
.voice-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  font-family: inherit;
}

.voice-badge.has-note {
  background: var(--purple-soft);
  color: var(--purple-strong);
  cursor: pointer;
}

.voice-badge.has-note:hover {
  background: #e2daff;
}

.voice-badge.none {
  background: var(--surface-muted);
  color: var(--muted);
}

.review-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.contact-col .assign-select {
  width: 100%;
  /* Without this the select takes its width from the longest option and
     spills over the next column. */
  min-width: 0;
  font-size: 12px;
  padding: 5px 7px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.contact-card-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  min-width: 0;
}

.contact-empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 16px;
}

.contacts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 24px 40px;
}

.contacts-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--purple-soft);
  color: var(--purple);
  margin-bottom: 4px;
}

.contacts-empty-icon svg {
  width: 30px;
  height: 30px;
}

.contacts-empty h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.contacts-empty p {
  margin: 0;
  max-width: 380px;
  color: var(--muted);
}

.contacts-empty button {
  margin-top: 8px;
}

.selectbar-actions .danger {
  font-size: 13px;
}

/* Below this the fixed contact-row columns no longer fit the available
   width, so wrap the sync/assign/action groups onto a second line instead
   of letting the row overflow horizontally. */
@media (max-width: 1400px) {
  .contact-card {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    row-gap: 10px;
    padding: 14px 4px;
  }
  .contact-card-tag {
    grid-column: 4;
    justify-self: end;
  }
  .contact-meta,
  .contact-card-actions {
    grid-column: 3 / -1;
  }
  .contact-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 880px) {
  .account-profile-header {
    flex-wrap: wrap;
  }
  .account-profile-plan {
    width: 100%;
  }
  .contacts-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .contacts-workflow-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contacts-stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contacts-main-area {
    padding: 14px;
  }
  .contact-card {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    row-gap: 10px;
    padding: 14px 4px;
  }
  .contact-card-tag {
    grid-column: 4;
    justify-self: end;
  }
  .contact-meta,
  .contact-card-actions {
    grid-column: 3 / -1;
  }
  .contact-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* ---- Contacts & Exports: narrow phones (must stay last to beat the 880px block) ---- */
@media (max-width: 640px) {
  .contacts-workflow-cards,
  .contacts-stats-bar,
  .contacts-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .contacts-main-area {
    padding: 14px 12px;
  }

  .workflow-card,
  .contacts-stat {
    padding: 14px;
  }

  .contact-card {
    grid-template-columns: auto auto minmax(0, 1fr);
    row-gap: 10px;
    padding: 15px 2px;
  }

  .contact-avatar {
    width: 36px;
    height: 36px;
  }

  .contact-card {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .contact-card-tag,
  .contact-meta,
  .contact-card-actions {
    grid-column: 2 / -1;
  }

  .contact-card-tag {
    justify-self: start;
  }

  .contact-meta {
    gap: 12px;
  }

  .contact-meta {
    flex-wrap: wrap;
  }

  .contact-meta > .contact-col {
    width: auto;
    flex: 1 1 100px;
    min-width: 0;
  }

  /* Four actions now (WhatsApp, Voice note, Edit, Delete) — 2x2 on phones. */
  .contact-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .row-btn {
    justify-content: center;
    padding: 8px 6px;
    min-width: 0;
  }

  .contacts-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .contacts-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .filter-field select {
    min-width: 0;
    width: 100%;
  }
}

/* The exhibition chip is a sibling of the (truncated, nowrap) subtitle rather
   than sitting inside it, so on phones it drops to its own line instead of
   being clipped out of sight. */
@media (max-width: 640px) {
  .topbar-chip {
    display: inline-block;
    max-width: 100%;
    margin-left: 0;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---- WhatsApp campaign modal ---- */
.wa-campaign {
  display: grid;
  gap: 14px;
}

.wa-field {
  display: grid;
  gap: 5px;
}

.wa-field > span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.wa-field textarea,
.wa-field input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}

.wa-tokens {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
}

.wa-token {
  padding: 2px 7px;
  min-height: 0;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--purple-strong);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.wa-token:hover {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple-strong);
}

.wa-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}

.wa-preview-box {
  padding: 11px 13px;
  border-radius: 11px;
  background: #f1fbf5;
  border: 1px solid #cdeadb;
}

.wa-preview-label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1c7c4a;
}

.wa-preview {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.wa-skipped {
  margin: 0;
  font-size: 12px;
  color: var(--warn);
}

.wa-progress {
  font-size: 12.5px;
  color: var(--muted);
}

/* Team-member picker inside the download menu */
.export-member-select {
  width: 100%;
  margin: 2px 0 4px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.export-member-hint {
  display: block;
  padding: 0 10px 6px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

/* ================= Contacts data table =================
   Horizontally scrollable. The checkbox + contact columns stay pinned to the
   left and the actions column (with WhatsApp) stays pinned to the right, so
   the important controls remain reachable no matter how far you scroll. */
.c2l-table-wrap {
  width: 100%;
  /* x scrolls, y clipped: with overflow-y visible the browser promotes both
     axes to visible and the whole page scrolls sideways instead. */
  overflow: auto hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.c2l-table {
  /* Overrides the global `table` rule (fixed layout + collapse), which ignored
     the per-column min-widths and squashed every column on narrow screens. */
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

.c2l-table th,
.c2l-table td {
  overflow-wrap: normal;
}

.c2l-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 9px 12px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.c2l-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  vertical-align: middle;
}

.c2l-table tbody tr:last-child td {
  border-bottom: 0;
}

.c2l-table .c2l-row:hover td {
  background: #faf9ff;
}

/* Pinned columns */
.c2l-table .sticky-l1 {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 38px;
}

.c2l-table .sticky-l2 {
  position: sticky;
  left: 44px;
  z-index: 2;
  box-shadow: 6px 0 8px -6px rgba(32, 34, 42, 0.16), 1px 0 0 var(--line);
}

.c2l-table .sticky-r {
  position: sticky;
  right: 0;
  z-index: 2;
  box-shadow: -6px 0 8px -6px rgba(32, 34, 42, 0.16), -1px 0 0 var(--line);
}

.c2l-table thead .sticky-l1,
.c2l-table thead .sticky-l2,
.c2l-table thead .sticky-r {
  z-index: 4;
}

.c2l-table .c2l-row:hover .sticky-l1,
.c2l-table .c2l-row:hover .sticky-l2,
.c2l-table .c2l-row:hover .sticky-r {
  background: #faf9ff;
}

/* Contact identity cell */
.cell-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cell-contact-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cell-contact-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cell-contact-head strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-sub {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-native {
  font-size: 11.5px;
  color: var(--purple-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-text {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.saved-name {
  display: inline-block;
  max-width: 240px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--purple-softer);
  color: var(--purple-strong);
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Column sizing */
.c2l-table .col-check { width: 44px; }
.c2l-table .col-name { min-width: 216px; max-width: 260px; }
.c2l-table .col-saved { min-width: 208px; max-width: 250px; }
.c2l-table .col-mobile { min-width: 124px; }
.c2l-table .col-place { min-width: 146px; }
.c2l-table .col-exhibition { min-width: 106px; }
.c2l-table .col-voice { min-width: 96px; }
.c2l-table .col-sync { min-width: 112px; }
.c2l-table .col-team { min-width: 142px; }
.c2l-table .col-actions { width: auto; white-space: nowrap; }

.c2l-table .col-team .assign-select {
  width: 100%;
  min-width: 118px;
}

/* Scoped to the table so it beats the legacy .row-actions rule, which sets
   flex-wrap:wrap — that broke the four buttons onto three lines and tripled
   the row height. */
.c2l-table .row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.row-btn.icon-only {
  width: 30px;
  padding: 0;
  justify-content: center;
}

/* View toggle */
.view-toggle {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-muted);
}

.view-toggle-btn {
  min-height: 0;
  padding: 5px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.view-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  box-shadow: none;
}

.view-toggle-btn.active,
.view-toggle-btn.active:hover {
  background: #fff;
  color: var(--purple-strong);
  box-shadow: 0 1px 4px rgba(32, 34, 42, 0.1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .c2l-table .sticky-l2 {
    position: static;
    box-shadow: none;
  }
  .c2l-table .col-name {
    min-width: 190px;
  }
  .view-toggle {
    margin-left: auto;
  }
}

.add-city-btn {
  min-height: 0;
  padding: 4px 10px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--purple-strong);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
}

.add-city-btn:hover {
  background: var(--purple-softer);
  border-color: var(--purple);
  border-style: solid;
  color: var(--purple-strong);
  box-shadow: none;
}

.set-city-form {
  display: grid;
  gap: 12px;
}

/* An <a> and a <button> resolve their box heights differently; pin them so the
   four row actions sit on an exact baseline. */
.c2l-table .row-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
}

.c2l-table .row-btn.icon-only {
  width: 32px;
  padding: 0;
}

/* WhatsApp saved-message library */
.wa-template-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.wa-field-grow {
  flex: 1 1 200px;
  min-width: 0;
}

.wa-template-bar select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.wa-template-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.wa-vcf-note {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 13px;
  border: 1px solid #d8e6fa;
  border-radius: 11px;
  background: #eff5fe;
}

.wa-vcf-note span {
  flex: 1 1 240px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.wa-vcf-note a {
  white-space: nowrap;
  text-decoration: none;
}

.wa-preview {
  max-height: 220px;
  overflow-y: auto;
}

.wa-template-status {
  flex: 1 1 100%;
  min-height: 15px;
  font-size: 11.5px;
  color: var(--ok, #2f9b68);
}

.wa-template-status.bad {
  color: var(--danger);
}

/* "Just scanned" quick-send strip on the Review screen */
.recent-scans {
  margin: 14px 0 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.recent-scans-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.recent-scans-head strong {
  display: block;
  font-size: 14px;
}

.recent-scans-head .muted {
  font-size: 12px;
}

.recent-scans-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.recent-scans-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}

.recent-scan-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple-strong);
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.recent-scan-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.recent-scan-text strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-scan-text .muted {
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-scans .row-btn.whatsapp {
  height: 32px;
  padding: 0 12px;
  flex-shrink: 0;
}

/* Phones: the pinned actions column at its desktop width (208px) left barely
   70px for the contact name on a ~325px table, so only the buttons were
   visible. Drop the WhatsApp label to its icon and tighten the cell — the
   green button stays pinned and tappable, and the name is readable at rest. */
@media (max-width: 640px) {
  .c2l-table .col-actions {
    min-width: 0;
    width: 1%;
    padding-left: 8px;
    padding-right: 8px;
  }

  .c2l-table .row-actions {
    gap: 4px;
  }

  .c2l-table .row-btn.whatsapp span {
    display: none;
  }

  .c2l-table .row-btn.whatsapp {
    width: 32px;
    padding: 0;
    justify-content: center;
  }

  .c2l-table .col-name {
    min-width: 168px;
    max-width: none;
  }

  .c2l-table thead th,
  .c2l-table tbody td {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* ============================================================
   Mobile dialogs
   The backdrop sat at z-index 50 while the fixed bottom nav is at 100, so on a
   phone the nav painted over the dialog and its buttons were unreachable. A
   modal has to sit above every piece of app chrome.
   ============================================================ */
.modal-backdrop {
  z-index: 200;
}

@media (max-width: 760px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .dialog,
  .dialog.wide-dialog,
  .dialog.payment-modal {
    width: 100%;
    max-width: none;
    /* dvh, not vh: 100vh is the *largest* viewport, so the sheet ran underneath
       the browser's own top/bottom bars and the actions were cut off. */
    max-height: calc(100dvh - env(safe-area-inset-top) - 8px);
    margin: 0;
    border-radius: 14px 14px 0 0;
    /* The dialog itself must not scroll — its grid keeps the actions row
       visible while only the content between scrolls. */
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 18px 16px 0;
  }

  /* The side icon column costs width that phones do not have. */
  .dialog > .dialog-icon {
    display: none;
  }

  .dialog-content {
    padding-right: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: auto;
  }

  /* Always reachable, clear of the home indicator. */
  .dialog-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    gap: 8px;
    margin-top: 6px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
    flex-wrap: nowrap;
  }

  .dialog-actions > button,
  .dialog-actions > .button-link {
    flex: 1 1 0;
    min-width: 0;
    min-height: 46px;
  }

  .dialog-close {
    top: 10px;
    right: 10px;
  }

  /* The payment sheet supplies its own padding inside .dialog-content. */
  .dialog.payment-modal {
    padding: 0;
  }

  .dialog.payment-modal .dialog-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Only the WhatsApp/Email button stays pinned; voice, edit and delete scroll
   with the rest of the table so the columns behind them stay reachable. */
.c2l-table .col-reach {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.c2l-table .col-actions {
  width: auto;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .c2l-table .col-reach {
    padding-left: 8px;
    padding-right: 8px;
  }
  /* Full-width actions again now that they are no longer pinned. */
  .c2l-table .col-actions {
    min-width: 0;
  }
}


.google-name-preview {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #eef2ff;
  border-left: 3px solid #6d4aec;
}
.google-name-preview .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5a6076;
}
.google-name-preview strong {
  font-size: 13.5px;
  line-height: 1.45;
  color: #1b2942;
  word-break: break-word;
}
.google-name-preview .muted { font-size: 12px; }

/* A lead that has already been messaged on WhatsApp. The tick sits beside the
   action rather than replacing it, since messaging again is legitimate. */
.wa-sent {
  color: #137a4b;
  font-weight: 700;
  margin-right: 4px;
  font-size: 0.95rem;
}
.row-btn.whatsapp.sent {
  border-color: #137a4b;
}
