/*
 * My Visa Tools visual system
 * Cloudflare dashboard reference: neutral working surfaces, clear hierarchy,
 * compact controls and semantic SVG actions. See ../DESIGN.md.
 */

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

:root {
  --color-ground: #fafafa;
  --color-ink: #171717;
  --color-ink-muted: #525252;
  --color-ink-faint: #666666;
  --color-surface: #ffffff;
  --color-surface-raised: #fafafa;
  --color-surface-inset: #f3f4f6;
  --color-brand: #0051c3;
  --color-brand-hover: #004099;
  --color-brand-soft: #edf4ff;
  --color-teal: #20b8b2;
  --color-success: #16854b;
  --color-warn: #b66713;
  --color-danger: #c23b35;
  --crm-status-neutral: #64748b;
  --crm-status-muted: #94a3b8;
  --crm-status-info: #2563eb;
  --crm-status-success: #16a34a;
  --crm-status-warning: #d97706;
  --crm-status-danger: #dc2626;
  --crm-status-received: #7c3aed;
  --crm-status-received-bg: #f5f3ff;
  --crm-status-success-text: #166534;
  --crm-status-success-surface: #dcfce7;
  --crm-status-danger-text: #991b1b;
  --crm-status-danger-surface: #fee2e2;
  --crm-text-neutral: #475569;
  --crm-status-muted-bg: #f1f5f9;
  --crm-status-info-bg: #eff6ff;
  --crm-status-success-bg: #f0fdf4;
  --crm-status-warning-bg: #fffbeb;
  --crm-status-danger-bg: #fef2f2;
  --crm-status-neutral-wash: rgb(100 116 139 / 13%);
  --crm-status-muted-wash: rgb(148 163 184 / 13%);
  --crm-status-success-wash: rgb(22 163 74 / 13%);
  --crm-status-warning-wash: rgb(217 119 6 / 13%);
  --crm-status-danger-wash: rgb(220 38 38 / 13%);
  --color-hairline: #e5e7eb;
  --color-hairline-strong: #cbd0d7;
  --color-grid: transparent;
  --focus-ring: rgba(0, 81, 195, 0.18);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --crm-radius-6: 6px;
  --crm-radius-8: 8px;
  --crm-radius-12: 12px;
  --space-compact: 0.625rem;
  --sidebar-expanded: 248px;
  --sidebar-collapsed: 68px;
  --control-height: 38px;
  --font-ui: var(--font-inter), system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: var(--font-geist-mono), "Cascadia Code", ui-monospace, monospace;
}
html { background: var(--color-ground); }

.brand-logo-toolbar { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.brand-logo-toolbar label, .brand-logo-card label, .brand-logo-add label { font-weight: 700; font-size: 12px; }
.brand-logo-toolbar select, .brand-logo-card input, .brand-logo-add input {
  min-height: 38px; border: 1px solid var(--color-hairline-strong); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-ink); padding: 8px 10px; font: inherit;
}
.brand-logo-toolbar select { min-width: min(360px, 70vw); }
.brand-logo-status { margin: 12px 0; color: var(--color-brand); font-weight: 600; }
.brand-logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.brand-logo-card, .brand-logo-add {
  background: var(--color-surface); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.brand-logo-card-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.brand-logo-card h2, .brand-logo-add h2 { font-size: 17px; line-height: 1.3; }
.brand-logo-card-head p, .brand-logo-add p, .brand-logo-meta { color: var(--color-ink-muted); font-size: 12px; }
.brand-logo-card code, .brand-logo-add code { color: var(--color-ink-muted); font-size: 11px; }
.brand-logo-preview { min-height: 100px; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--color-surface-inset); border-radius: var(--radius-md); }
.brand-logo-preview-dark { background: #0B1220; }
.brand-logo-preview img { max-width: 100%; max-height: 72px; object-fit: contain; }
.brand-logo-card input[type="file"] { width: 100%; }
.brand-logo-card button, .brand-logo-add button {
  min-height: 38px; align-self: flex-start; padding: 8px 14px; border: 0; border-radius: var(--radius-md);
  color: white; background: var(--color-brand); font: inherit; font-weight: 700; cursor: pointer;
}
.brand-logo-card button:disabled, .brand-logo-add button:disabled { opacity: .5; cursor: not-allowed; }
.brand-logo-add { margin-top: 20px; }
.brand-logo-add-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.brand-logo-add-fields label { display: flex; flex-direction: column; gap: 6px; }

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--type-portal-body-size);
  line-height: var(--type-portal-body-line);
  font-weight: var(--type-body-weight);
  color: var(--color-ink);
  background: var(--color-ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

::selection { color: var(--color-ink); background: #cfe0ff; }

.crm-shell {
  display: flex;
  min-height: 100dvh;
  background: var(--color-ground);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
}

.crm-skip-link {
  position: fixed;
  left: 12px;
  top: 10px;
  z-index: 100;
  padding: 8px 12px;
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  transform: translateY(-160%);
}
.crm-skip-link:focus { transform: translateY(0); }

/* Sidebar: expanded is the product default; the compact rail is user-controlled. */
.crm-sidebar {
  width: var(--sidebar-expanded);
  height: 100dvh;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: visible;
  color: var(--color-ink-muted);
  background: var(--color-surface);
  border-right: 1px solid var(--color-hairline);
  transition: width 180ms cubic-bezier(.22, 1, .36, 1);
}

.crm-sidebar[data-collapsed="true"] { width: var(--sidebar-collapsed); }

.crm-sidebar-logo {
  min-height: 64px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--color-hairline);
  overflow: hidden;
}

.crm-sidebar-lockup {
  width: 168px;
  height: auto;
  max-width: 100%;
  max-height: 42px;
  display: block;
  object-fit: contain;
  object-position: left center;
}
.crm-sidebar[data-collapsed="true"] .crm-sidebar-lockup { width: 38px; }


.crm-sidebar-nav {
  flex: 1;
  overflow-x: visible;
  overflow-y: auto;
  padding: 12px 8px 20px;
}

.crm-nav-section + .crm-nav-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-hairline);
}

.crm-nav-group {
  min-height: 22px;
  padding: 0 10px 7px;
  color: var(--color-ink-faint);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  white-space: nowrap;
}

.crm-nav-item {
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-ink-muted);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.crm-nav-item:hover {
  color: var(--color-ink);
  background: var(--color-surface-inset);
  border-color: var(--color-hairline);
}

.crm-nav-item.active {
  color: var(--color-brand);
  background: var(--color-brand-soft);
  border-color: #c6dbfa;
}

.crm-nav-item.active::before {
  content: "";
  width: 2px;
  height: 18px;
  position: absolute;
  left: -1px;
  top: 9px;
  background: var(--color-brand);
}

.crm-icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }

.crm-sidebar-footer {
  border-top: 1px solid var(--color-hairline);
  background: var(--color-surface-raised);
}

.crm-user {
  min-height: 62px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--color-hairline);
  overflow: hidden;
}
.crm-user:hover { background: var(--color-surface-inset); }

.crm-user-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid #c6dbfa;
  border-radius: 50%;
  background: var(--color-brand-soft);
  color: var(--color-brand);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.crm-user-copy { min-width: 164px; overflow: hidden; }
.crm-user-copy strong {
  display: block;
  overflow: hidden;
  color: var(--color-ink);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-user-copy small {
  display: block;
  margin-top: 2px;
  color: var(--color-ink-faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.crm-sidebar-actions { padding: 7px; }

.crm-sidebar-action {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--color-ink-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-align: left;
  justify-content: flex-start;
  white-space: nowrap;
}
.crm-sidebar-action:hover {
  color: var(--color-ink);
  background: var(--color-surface-inset);
  border-color: var(--color-hairline);
}

.crm-sidebar[data-collapsed="true"] .crm-sidebar-logo { padding-inline: 14px; }
.crm-sidebar[data-collapsed="true"] .crm-nav-label,
.crm-sidebar[data-collapsed="true"] .crm-user-copy,
.crm-sidebar[data-collapsed="true"] .crm-sidebar-action span { display: none; }
.crm-sidebar[data-collapsed="true"] .crm-nav-group {
  height: 8px;
  min-height: 8px;
  padding: 0;
  font-size: 0;
}
.crm-sidebar[data-collapsed="true"] .crm-sidebar-nav { padding-inline: 7px; }
.crm-sidebar[data-collapsed="true"] .crm-nav-item,
.crm-sidebar[data-collapsed="true"] .crm-sidebar-action {
  justify-content: center;
  padding-inline: 0;
}
.crm-sidebar[data-collapsed="true"] .crm-user { justify-content: center; padding-inline: 0; }

/* Native title tooltips remain outside the scroll container and never clip. */
.crm-sidebar-mobile-trigger,
.crm-sidebar-scrim { display: none; }

.crm-lead-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
}

.crm-lead-detail-layout > * { min-width: 0; }

.crm-lead-contact-grid {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* Structural content rails. */
.crm-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--color-ground);
  background-image: none;
}

.crm-main:focus { outline: none; }

.crm-input, input, .crm-btn { margin: 3px;}

.crm-topbar {
  min-height: 58px;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-hairline);
  backdrop-filter: blur(8px);
}

.crm-topbar-title {
  flex: 1;
  color: var(--color-ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
}
.crm-topbar-user { color: var(--color-ink-muted); font-size: 12px; }

.crm-content {
  width: 100%;
  flex: 1;
  padding: 30px;
}

.crm-card {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
padding: 25px;
}

.crm-card + .crm-card { margin-top: 20px; }

.crm-card-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--color-hairline);
  background: var(--color-surface-raised);
}

.crm-card-title {
  color: var(--color-ink-muted);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.crm-directory-search { margin: 0 0 1.25rem; }
.crm-directory-search input { width: min(100%, 360px); padding: .6rem .75rem; border: 1px solid var(--color-hairline); border-radius: 8px; background: var(--color-surface); color: var(--color-ink); }
.crm-directory-empty { padding: 1.5rem; color: var(--color-ink-muted); }
.crm-back-link { margin-right: .75rem; color: var(--color-ink-muted); font-size: .875rem; }
.crm-create-panel { margin-bottom: 1.25rem; }
.crm-create-panel summary { cursor: pointer; font-weight: 700; }
.crm-owned-form { display: grid; gap: 1rem; max-width: 560px; margin-top: 1rem; }
.crm-owned-form label { display: grid; gap: .35rem; font-size: .875rem; font-weight: 600; }
.crm-owned-form input,.crm-owned-form select,.crm-owned-form textarea { width: 100%; padding: .65rem .75rem; border: 1px solid var(--color-hairline); border-radius: 8px; background: var(--color-surface); color: var(--color-ink); font: inherit; }
.crm-owned-form button { justify-self: start; }
.crm-card > .field:first-child,
.crm-card > div.field { padding: 20px; }

/* Tables use dividers rather than elevation. */
.crm-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.crm-table th {
  height: 38px;
  padding: 0 16px;
  color: var(--color-ink-faint);
  background: var(--color-surface-inset);
  border-bottom: 1px solid var(--color-hairline);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}
.crm-table td {
  min-height: 46px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-hairline);
  color: var(--color-ink);
  font-size: 13px;
  vertical-align: middle;
}
.crm-table tr:last-child td { border-bottom: 0; }
.crm-table tbody tr { transition: background-color 120ms ease; }
.crm-table tbody tr:hover { background: var(--color-surface-raised); }

/* Stats become one connected grid with shared hairlines. */
.crm-stats {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0;
  border-top: 1px solid var(--color-hairline);
  border-left: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}

.crm-stat-tile {
  min-height: 112px;
  padding: 20px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
}

.crm-stat-label {
  margin-bottom: 11px;
  color: var(--color-ink-faint);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.crm-stat-value {
  color: var(--color-ink);
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1;
}

/* Controls */
.btn,
.crm-btn {
  min-height: var(--control-height);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--radius-md);
  color: var(--color-ink);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
}
.btn:hover:not(:disabled):not([aria-disabled="true"]),
.crm-btn:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-surface-inset);
  border-color: #a8afb9;
}
.btn:disabled,
.crm-btn:disabled { opacity: .48; cursor: not-allowed; }

.btn-primary,
.crm-btn-primary {
  color: #f8fbff;
  background: var(--color-brand);
  border-color: var(--color-brand);
}
.btn-primary:hover:not(:disabled):not([aria-disabled="true"]),
.crm-btn-primary:hover:not(:disabled):not([aria-disabled="true"]) {
  color: #f8fbff;
  background: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
}
.btn-ghost { color: var(--color-ink-muted); background: var(--color-surface); }
.btn-danger { color: #fff8f6; background: var(--color-danger); border-color: var(--color-danger); }
.btn-danger:hover:not(:disabled):not([aria-disabled="true"]) {
  color: #fff;
  background: #a62e29;
  border-color: #a62e29;
}

.crm-shell :where(button, a, summary, input, select, textarea) {
  -webkit-tap-highlight-color: transparent;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.crm-shell :where(button, a, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}
.crm-shell :where(button):active:not(:disabled):not([aria-disabled="true"]),
.crm-shell :where(.btn, .crm-btn):active:not(:disabled):not([aria-disabled="true"]) {
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 12%);
}
.crm-shell :where(button:disabled, [aria-disabled="true"]) { cursor: not-allowed; }
.crm-shell :where(button):disabled { opacity: .5; }
:where(.crm-shell button:has(> .crm-icon), .crm-shell .btn:has(> .crm-icon), .crm-shell .crm-btn:has(> .crm-icon)) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.crm-shell :where(button, .btn, .crm-btn) > .crm-icon { width: 16px; height: 16px; flex-basis: 16px; }
:where(.crm-shell a:not(.btn):not(.crm-nav-item):not(.settings-card):has(> .crm-icon)) { display: inline-flex; align-items: center; gap: 6px; }
.crm-shell :where(.crm-back-link, .crm-topbar-back):hover { color: var(--color-brand); }
.crm-shell :where(summary):hover { color: var(--color-brand); }
.crm-shell :where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--color-brand); }
.crm-shell :where(input, select, textarea):disabled { color: var(--color-ink-muted); background: var(--color-surface-inset); cursor: not-allowed; }
.crm-shell :where(input, select, textarea):hover:not(:disabled):not(:focus) { border-color: #a8afb9; }
.crm-shell :where(input, select, textarea)[aria-invalid="true"] { border-color: var(--color-danger); }
.crm-shell :where(button, .btn, .crm-btn)[aria-busy="true"] { cursor: progress; }
.crm-shell .crm-segmented-control button:hover:not(:disabled) { color: var(--color-brand); background: var(--color-brand-soft); }

.crm-btn-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  color: var(--color-ink-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-sm);
}
.crm-btn-icon:hover:not(:disabled) { color: var(--color-ink); background: var(--color-surface-inset); }
.crm-btn-icon:disabled { opacity: .4; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  color: var(--color-ink-muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.field input,
.field select,
.field textarea,
.crm-content input:not([type="checkbox"]):not([type="radio"]),
.crm-content select,
.crm-content textarea {
  min-height: var(--control-height);
  padding: 8px 11px;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--radius-md);
  outline: none;
  font-size: 13px;
}
.field textarea,
.crm-content textarea { min-height: 96px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus,
.crm-content input:focus,
.crm-content select:focus,
.crm-content textarea:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Status vocabulary */
.badge {
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-hairline);
  border-radius: 999px;
  color: var(--color-ink-muted);
  background: var(--color-surface-inset);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-new { color: #174f9f; background: #edf4ff; border-color: #cfddfb; }
.badge-contacted { color: #81550f; background: #fff7de; border-color: #eddfae; }
.badge-qualified { color: #17643a; background: #e8f6ed; border-color: #cde7d5; }
.badge-proposal { color: #5f42a5; background: #f0ecfb; border-color: #ddd4f4; }
.badge-won { color: #11603a; background: #e1f5ea; border-color: #c3e4d0; }
.badge-lost { color: #903631; background: #fbeae8; border-color: #efceca; }

/* Portal components retain their interaction model but inherit the new tokens. */
.portal-stepper { display: flex; flex-direction: column; gap: 0; }
.portal-step { display: flex; gap: 13px; padding: 10px 0; position: relative; }
.portal-step-dot {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--color-ink-muted);
  background: var(--color-surface-inset);
  border: 1px solid var(--color-hairline-strong);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}
.portal-step.done .portal-step-dot { color: #f8fffb; background: var(--color-success); border-color: var(--color-success); }
.portal-step.current .portal-step-dot { color: #f8fbff; background: var(--color-brand); border-color: var(--color-brand); }
.portal-step:not(:last-child)::before {
  content: "";
  width: 1px;
  position: absolute;
  left: 10px;
  top: 28px;
  bottom: -6px;
  background: var(--color-hairline);
}
.portal-step.done:not(:last-child)::before { background: var(--color-success); }
.portal-step-label { font-size: 13px; font-weight: 650; }
.portal-step-meta { color: var(--color-ink-muted); font-size: 12px; }
.portal-progress-bar { height: 6px; overflow: hidden; background: var(--color-surface-inset); border-radius: 999px; }
.portal-progress-fill { height: 100%; background: var(--color-brand); transition: width 200ms ease-out; }
.chat-thread { max-height: 420px; padding: 20px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.chat-msg { max-width: 78%; padding: 9px 12px; border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); font-size: 13px; line-height: 1.45; }
.chat-msg.staff { align-self: flex-start; background: var(--color-surface-inset); }
.chat-msg.client { align-self: flex-end; color: #f8fbff; background: var(--color-brand); border-color: var(--color-brand); }
.chat-msg-meta { margin-top: 3px; font-size: 10px; opacity: .72; }

.sr-only {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 840px) {
  .crm-sidebar-mobile-trigger {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    position: fixed;
    left: 12px;
    top: 10px;
    z-index: 60;
    color: var(--color-ink);
    background: var(--color-surface);
    border: 1px solid var(--color-hairline-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(20, 29, 25, .06);
  }

  .crm-sidebar-collapse { display: none; }

  .crm-sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(20, 27, 24, .28);
    border: 0;
  }

  .crm-sidebar,
  .crm-sidebar[data-collapsed="true"] {
    width: min(284px, calc(100vw - 44px));
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    visibility: hidden;
    transform: translateX(-102%);
    box-shadow: 16px 0 40px rgba(20, 29, 25, .12);
    transition: transform 180ms cubic-bezier(.22, 1, .36, 1);
  }
  .crm-sidebar[data-mobile-open="true"] { visibility: visible; transform: translateX(0); }

    .crm-sidebar[data-collapsed="true"] .crm-nav-label,
  .crm-sidebar[data-collapsed="true"] .crm-user-copy,
  .crm-sidebar[data-collapsed="true"] .crm-sidebar-action span { display: block; }
  .crm-sidebar[data-collapsed="true"] .crm-nav-group {
    height: auto;
    min-height: 22px;
    padding: 0 10px 7px;
    font-size: 9px;
  }
  .crm-sidebar[data-collapsed="true"] .crm-nav-item,
  .crm-sidebar[data-collapsed="true"] .crm-sidebar-action,
  .crm-sidebar[data-collapsed="true"] .crm-user { justify-content: flex-start; padding-inline: 10px; }
  .crm-sidebar[data-collapsed="true"] :is(.crm-nav-item, .crm-sidebar-action, .crm-user)::after { display: none; }

  .crm-topbar { min-height: 58px; padding: 0 16px 0 64px; }
  .crm-content { padding: 20px 16px; }
  .crm-lead-detail-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .crm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-stat-tile { min-height: 96px; padding: 16px; }
  .crm-table { min-width: 680px; }
  .crm-card { overflow-x: auto; }
  .crm-content { padding-inline: 12px; }
  .crm-lead-contact-grid { grid-template-columns: minmax(0, 1fr); padding: 16px; }
}


body .vc-payment-page {
  --vc-payment-backdrop-image: url('/images/phuket-beach-login.webp');
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.crm-workflow-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.crm-workflow-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 1.25rem;
  align-items: start;
}

.crm-workflow-condition-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: end;
}

@media (max-width: 767px) {
  .crm-workflow-grid-2,
  .crm-workflow-condition-grid,
  .crm-workflow-builder-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-workflow-builder-layout > * {
    min-width: 0;
  }
}

/* Content administration: template inventory and isolated source-style drafts. */
.crm-topbar-back { margin-right: 12px; color: var(--color-ink-muted); font-size: 12px; }
.crm-section-intro { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.crm-section-intro h1 { margin: 4px 0 8px; font-size: 24px; line-height: 1.15; letter-spacing: -.025em; }
.crm-section-intro p:not(.crm-eyebrow) { max-width: 70ch; color: var(--color-ink-muted); }
/* CRM, public and specimen eyebrows share the four recipes in @visa/ui. */

.crm-auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #eef5ff 0%, #f8fafc 52%, #eefcfb 100%);
}
.crm-auth-card {
  width: min(100%, 520px);
  display: grid;
  gap: 16px;
  padding: 40px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: 0 28px 72px -42px rgba(11, 18, 32, .55);
}
.crm-auth-card h1,
.crm-auth-card p { margin: 0; }
.crm-auth-card h1 { color: var(--color-ink); font-size: clamp(28px, 5vw, 40px); line-height: 1.08; letter-spacing: -.035em; }
.crm-auth-card p:not(.crm-eyebrow) { color: var(--color-ink-muted); line-height: 1.65; }
.crm-auth-card .btn { justify-self: start; margin-top: 6px; }
.crm-table-subline { margin-top: 3px; display: block; color: var(--color-ink-muted); font-size: 11px; font-weight: 400; }
.crm-empty-state { padding: 24px; border: 1px solid var(--color-hairline); background: var(--color-surface-raised); }
.crm-empty-state p { max-width: 70ch; margin-top: 6px; color: var(--color-ink-muted); }
.crm-alert { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--color-hairline-strong); background: var(--color-surface-raised); font-size: 12px; }
.crm-alert-info { color: #174f9f; border-color: #cfddfb; background: #f4f7ff; }
.crm-alert-error { color: #903631; border-color: #efceca; background: #fff7f6; }
.template-source-block { min-width: min(100%, 320px); padding: 12px 14px; border: 1px solid var(--color-hairline); background: var(--color-surface); }
.template-source-block span { display: block; margin-bottom: 5px; color: var(--color-ink-faint); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.template-source-block code { overflow-wrap: anywhere; }
.template-preview-toolbar { align-items: center; justify-content: space-between; gap: 16px; }
.crm-segmented-control { display: inline-flex; border: 1px solid var(--color-hairline-strong); }
.crm-segmented-control button { min-height: 34px; padding: 0 12px; color: var(--color-ink-muted); background: var(--color-surface); border: 0; border-right: 1px solid var(--color-hairline); font-size: 11px; }
.crm-segmented-control button:last-child { border-right: 0; }
.crm-segmented-control button.active { color: var(--color-ink); background: var(--color-surface-inset); font-weight: 700; }
.template-preview-notice { margin: 0; padding: 9px 14px; color: var(--color-ink-muted); background: var(--color-surface-raised); border-bottom: 1px solid var(--color-hairline); font-size: 11px; }
.template-preview-stage { padding: 18px; overflow-x: auto; background: var(--color-surface-inset); }
.template-preview-frame { min-width: 320px; height: 620px; margin-inline: auto; display: block; border: 1px solid var(--color-hairline-strong); background: var(--color-surface); transition: width 180ms cubic-bezier(.22, 1, .36, 1); }
.template-discovery-frame { position: absolute; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.template-section-editor { display: grid; gap: 1.25rem; }
.template-publication-boundary { padding: 18px 20px; border-color: rgba(11,91,255,.28); background: rgba(11,91,255,.04); }
.template-publication-boundary p { max-width: 850px; margin: 5px 0 0; color: var(--color-muted); }
.template-section-row { overflow: hidden; }
.template-section-columns { display: grid; grid-template-columns: minmax(0,2fr) minmax(320px,1fr); min-height: 470px; }
.template-live-column { padding: 14px; background: var(--color-surface-inset); overflow: auto; }
.template-live-column iframe { width: 100%; height: 440px; border: 1px solid var(--color-hairline-strong); background: #fff; }
.template-code-column { min-width: 0; border-left: 1px solid var(--color-hairline); background: #1e1e1e; }
.template-code-column .crm-segmented-control { padding: 8px; background: var(--color-surface); border-bottom: 1px solid var(--color-hairline); }
.managed-template-guided-controls { height: 430px; overflow: auto; padding: 14px; background: var(--color-surface); color: var(--color-ink); }
.managed-template-guided-intro { margin-bottom: 12px; padding: 12px; border: 1px solid var(--color-hairline); border-radius: 10px; background: var(--color-surface-inset); }
.managed-template-guided-intro p { margin: 4px 0 0; color: var(--color-ink-muted); font-size: 12px; line-height: 1.5; }
.managed-template-node-group { margin: 10px 0; padding: 10px; border: 1px solid var(--color-hairline); border-radius: 10px; background: var(--color-surface); }
.managed-template-node-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.managed-template-node-heading span, .managed-template-copy-control > div span { color: var(--color-ink-muted); font-size: 11px; }
.managed-template-token-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 6px; margin: 10px 0; padding: 9px; border: 1px solid var(--color-hairline); border-radius: 8px; }
.managed-template-token-grid legend { padding: 0 5px; color: var(--color-ink-muted); font-size: 11px; }
.managed-template-token-grid label { display: flex; gap: 6px; align-items: flex-start; font-size: 11px; line-height: 1.35; }
.managed-template-node-children { padding-left: 9px; border-left: 2px solid var(--color-hairline); }
.managed-template-reorderable-item { margin: 10px 0; padding: 8px; border: 1px dashed var(--color-hairline); border-radius: 10px; }
.managed-template-reorder-controls { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.managed-template-reorder-controls > span { margin-right: auto; color: var(--color-ink-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.managed-template-reorder-controls .btn { min-height: 36px; }
.managed-template-control { margin: 9px 0; }
.managed-template-copy-control > div { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.managed-template-copy-control textarea { min-height: 58px; resize: vertical; font-size: 12px; line-height: 1.45; }
.template-shared-links { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 54px; padding: 9px 12px; color: #c9d3e8; background: #151922; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; }
.template-shared-links > span { margin-right: 3px; color: #8f9bb2; text-transform: uppercase; letter-spacing: .06em; }
.template-shared-links a { padding: 5px 8px; border: 1px solid rgba(125,162,255,.35); border-radius: 999px; color: #dce6ff; text-decoration: none; }
.template-shared-links a:hover { color: #fff; border-color: #7da2ff; background: rgba(125,162,255,.12); }
.template-shared-links small { margin-left: 5px; color: #8fafff; }
.template-revision-list { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 9px 12px; color: #c9d3e8; background: #151922; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; }
.template-revision-list > span { margin-right: 3px; color: #8f9bb2; text-transform: uppercase; letter-spacing: .06em; }
.template-revision-list .btn { min-height: 30px; padding: 5px 8px; color: #dce6ff; border-color: rgba(125,162,255,.35); }
.template-save-notice { position: sticky; bottom: 16px; z-index: 5; margin: 0 auto; padding: 10px 16px; border-radius: 999px; color: #fff; background: #0b5bff; box-shadow: var(--shadow-menu); }

.css-admin-file-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--color-hairline); background: var(--color-hairline); gap: 1px; }
.css-admin-file { min-height: 152px; padding: 20px; display: flex; flex-direction: column; gap: 7px; background: var(--color-surface); }
.css-admin-file:hover { background: var(--color-surface-raised); }
.css-admin-file strong { font-size: 18px; }
.css-admin-file code { color: var(--color-ink-muted); font-size: 11px; overflow-wrap: anywhere; }
.css-admin-file > span:last-child { margin-top: auto; color: var(--color-ink-muted); font-size: 11px; }
.css-admin-generated-list > div { padding: 16px 20px; display: grid; grid-template-columns: minmax(180px, .7fr) minmax(180px, .6fr) minmax(240px, 1.5fr); gap: 18px; border-bottom: 1px solid var(--color-hairline); }
.css-admin-generated-list > div:last-child { border-bottom: 0; }
.css-admin-generated-list span, .css-admin-generated-list p { color: var(--color-ink-muted); font-size: 12px; }
.css-admin-publish-boundary { margin-top: 20px; }
.css-admin-publish-boundary code { margin-top: 12px; display: inline-block; font-size: 11px; }
.css-admin-heading { align-items: center; }
.css-admin-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: 20px; align-items: start; }
.css-admin-editor-panel, .css-admin-preview-panel { min-width: 0; }
.css-admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.css-admin-toolbar > span:last-child { color: var(--color-ink-muted); font-size: 11px; }
.css-admin-editor { width: 100%; min-height: 620px; padding: 16px; display: block; resize: vertical; color: var(--color-ink); background: #fbfcfa; border: 0; border-bottom: 1px solid var(--color-hairline); border-radius: 0; font: 12px/1.55 var(--font-mono); tab-size: 2; }
.css-admin-actions { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.css-admin-message { margin: 0 16px 14px; color: var(--color-ink-muted); font-size: 12px; }
.css-admin-errors { margin: 0 16px 16px; padding: 12px 12px 12px 30px; color: var(--color-danger); background: #fff7f6; border: 1px solid #efceca; font-size: 12px; }
.css-admin-preview { width: 100%; min-height: 620px; display: block; border: 0; background: var(--color-surface); }
.css-admin-revisions > div { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--color-hairline); }
.css-admin-revisions > div:last-child { border-bottom: 0; }
.css-admin-revisions span { min-width: 0; display: flex; flex-direction: column; }
.css-admin-revisions small { color: var(--color-ink-muted); overflow-wrap: anywhere; }
.css-admin-empty-revisions { padding: 20px; color: var(--color-ink-muted); font-size: 12px; }

@media (max-width: 900px) {
  .css-admin-layout { grid-template-columns: minmax(0, 1fr); }
  .css-admin-preview { min-height: 480px; }
}

@media (max-width: 700px) {
  .crm-section-intro, .template-preview-toolbar, .css-admin-revisions > div { align-items: stretch; flex-direction: column; }
  .css-admin-file-grid { grid-template-columns: minmax(0, 1fr); }
  .css-admin-generated-list > div { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .crm-responsive-table { min-width: 0; }
  .crm-responsive-table thead { display: none; }
  .crm-responsive-table, .crm-responsive-table tbody, .crm-responsive-table tr, .crm-responsive-table td { display: block; width: 100%; }
  .crm-responsive-table tr { padding: 12px 14px; border-bottom: 1px solid var(--color-hairline); }
  .crm-responsive-table td { padding: 5px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .crm-responsive-table td[data-label]::before { content: attr(data-label); width: 112px; display: inline-block; color: var(--color-ink-faint); font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
  .template-preview-stage { padding: 10px; }
  .template-preview-frame { height: 520px; }
  .template-section-columns { grid-template-columns: 1fr; }
  .template-code-column { border-left: 0; border-top: 1px solid var(--color-hairline); }
  .css-admin-editor { min-height: 480px; }
}
.crm-field-label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--color-ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.credential-vault-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(160px, 1fr) minmax(220px, 1.5fr) auto;
  gap: 0.5rem;
  align-items: end;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-hairline);
}

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

/* Settings hubs and encrypted integration vault. */
.crm-content-narrow { max-width: 1080px; }
.settings-card-grid,
.integration-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.settings-card {
  min-height: 180px;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
}
.settings-card:hover { background: var(--color-surface-raised); border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); }
.settings-card > .crm-icon { width: 22px; height: 22px; color: var(--color-brand); }
.settings-card strong, .settings-card b { display: inline-flex; align-items: center; gap: 8px; }
.settings-card strong { font-size: 17px; }
.settings-card span { color: var(--color-ink-muted); line-height: 1.55; }
.settings-card b { margin-top: auto; color: var(--color-brand); font-size: 12px; }
.integration-vault { margin-bottom: 16px; }
.integration-section { margin-bottom: 24px; }
.integration-section > div:first-child { margin-bottom: 12px; }
.integration-section h2 { margin: 4px 0 6px; font-size: 20px; }
.integration-section > div:first-child > p:not(.crm-eyebrow) { max-width: 72ch; color: var(--color-ink-muted); }
.integration-preset-panel { padding: 16px; border-bottom: 1px solid var(--color-hairline); background: var(--color-surface-raised); }
.integration-preset-panel p { margin: 4px 0 12px; color: var(--color-ink-muted); }
.integration-preset-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.credential-vault-list { display: grid; gap: 12px; padding: 16px; }
.credential-secret-control { display: flex; gap: 6px; }
.credential-secret-control .crm-input { flex: 1; }
.integration-status { margin: 0; color: var(--color-ink-muted); }
.integration-card { min-height: 190px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.integration-card h2 { font-size: 17px; }
.integration-card p, .integration-policy p { color: var(--color-ink-muted); line-height: 1.55; }
.integration-card .btn { align-self: flex-start; margin-top: auto; }
.integration-policy { margin-top: 16px; }
.payment-settings-stack { display: grid; gap: 14px; }
.payment-settings-notice { padding: 12px 14px; border: 1px solid var(--color-hairline); border-radius: var(--radius-md); font-size: 13px; }
.payment-settings-notice.is-success { color: var(--color-success); background: #f0fbf5; }
.payment-settings-notice.is-error { color: var(--color-danger); background: #fff7f6; }
.payment-credential-editor { border-top: 1px solid var(--color-hairline); }
.payment-credential-heading { margin-bottom: 12px; display: flex; justify-content: space-between; gap: 12px; }
.payment-credential-heading strong { font-size: 13.5px; }
.payment-credential-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.payment-credential-retired { border-top: 1px solid var(--color-hairline); }
.payment-credential-retired summary { cursor: pointer; font-size: 12.5px; font-weight: 650; }
.payment-credential-retired .payment-credential-editor { margin-top: 12px; padding-inline: 0; border-top: 0; }
.payment-credential-actions { border-top: 1px solid var(--color-hairline); }

/* Appearance: token editor and representative public component catalogue. */
.design-system-page { max-width: 1600px; }
.design-system-intro { margin-bottom: 10px; }
.design-system-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.design-system-status { min-height: 22px; margin: 0 0 14px; color: var(--color-ink-muted); font-size: 12px; }
.design-system-layout { display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr); gap: 20px; align-items: start; }
.design-token-panel { max-height: calc(100dvh - 150px); position: sticky; top: 78px; overflow: auto; background: var(--color-surface); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); }
.design-token-group { padding: 16px; border: 0; border-bottom: 1px solid var(--color-hairline); }
.design-token-group:last-child { border-bottom: 0; }
.design-token-group legend { width: 100%; margin-bottom: 8px; color: var(--color-ink); font-weight: 750; }
.design-token-control { padding: 10px 0; display: grid; gap: 7px; border-bottom: 1px solid var(--color-hairline); }
.design-token-control:last-child { border-bottom: 0; }
.design-token-control > span:first-child { display: grid; gap: 2px; }
.design-token-control small { color: var(--color-ink-muted); line-height: 1.35; }
.design-token-control code { color: var(--color-ink-faint); font-size: 10px; }
.design-token-input { display: flex; gap: 7px; }
.design-token-input input[type="color"] { width: 42px; min-width: 42px; height: 38px; padding: 3px; border: 1px solid var(--color-hairline-strong); border-radius: var(--radius-sm); background: var(--color-surface); }
.design-token-input .crm-input { min-width: 0; flex: 1; font-family: var(--font-mono); font-size: 11px; }
.design-preview { overflow: hidden; color: var(--color-ink); background: var(--color-ground); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); font-family: var(--font-display); }
.design-preview-label { padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--color-ink-muted); background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border); font: 700 var(--type-label-size)/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.design-preview-label small { font-weight: 500; letter-spacing: .04em; }
.design-specimen { margin: 18px; overflow: hidden; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.design-specimen-heading { padding: 11px 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--color-ink); background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border); }
.design-specimen-heading strong { font-size: 13px; }
.design-specimen-heading span { color: var(--color-ink-muted); font-size: 11px; }
.ds-header { min-height: 74px; padding: 14px 18px; display: flex; align-items: center; gap: 18px; }
.ds-header > b { margin-right: auto; font-size: 18px; }
.ds-header nav { display: flex; align-items: center; gap: 16px; }
.ds-header nav a, .ds-header-account { color: var(--color-ink-body); font-size: 13px; font-weight: 650; text-decoration: none; }
.ds-header-account { color: var(--color-brand-blue-deep); }
.ds-type-stack { padding: 28px; display: grid; gap: 18px; }
.ds-display, .ds-h1, .ds-h2, .ds-h3, .ds-intro, .ds-body, .ds-quote, .ds-stat, .ds-nav-label, .ds-small, .ds-highlight { margin: 0; }
.ds-display { max-width: 12ch; font-size: var(--type-display-size); font-weight: var(--type-display-weight); line-height: var(--type-display-line); letter-spacing: var(--type-display-tracking); }
.ds-h1 { font-size: var(--type-h1-size); font-weight: var(--type-h1-weight); line-height: var(--type-h1-line); letter-spacing: var(--type-h1-tracking); }
.ds-h2 { font-size: var(--type-h2-size); font-weight: var(--type-h2-weight); line-height: var(--type-h2-line); letter-spacing: var(--type-h2-tracking); }
.ds-h3 { font-size: var(--type-h3-size); font-weight: var(--type-h3-weight); line-height: var(--type-h3-line); letter-spacing: var(--type-h3-tracking); }
.ds-intro { max-width: 66ch; color: var(--color-ink-body); font-size: var(--type-intro-size); line-height: var(--type-intro-line); font-weight: var(--type-intro-weight); }
.ds-body { max-width: 72ch; color: var(--color-ink-body); font-size: var(--type-body-size); line-height: var(--type-body-line); font-weight: var(--type-body-weight); font-family: var(--font-body); }

/* Appearance typography editor and its isolated live specimen. */
.typography-workbench { max-width: 1240px; }
.typography-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; }
.typography-toolbar span { color: var(--color-ink-muted); }
.typography-card { margin: 1.5rem 0; padding: clamp(1.25rem, 3vw, 2rem); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.typography-card h2 { margin: 0 0 .35rem; font-size: 1.4rem; }
.typography-card > p { margin: 0 0 1.5rem; color: var(--color-ink-secondary); }
.typography-role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.typography-role { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; background: var(--color-surface-muted); border-radius: var(--radius-md); }
.typography-role > label, .typography-upload label, .typography-token-grid label { font-size: .875rem; font-weight: 700; }
.typography-role select, .typography-token-grid input { width: 100%; }
.typography-upload { display: flex; flex-direction: column; gap: .5rem; }
.typography-upload input[type=file] { max-width: 100%; font-size: .8rem; }
.typography-upload small { overflow-wrap: anywhere; color: var(--color-ink-muted); }
.typography-style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.typography-style { padding: 1rem; background: var(--color-surface-muted); border-radius: var(--radius-md); }
.typography-style h3 { margin: 0 0 1rem; font-size: 1rem; }
.typography-token-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.typography-token-grid label { display: flex; flex-direction: column; gap: .3rem; }
.typography-token-grid input[aria-invalid=true] { border-color: var(--color-coral); }
.typography-preview { padding: clamp(1rem, 3vw, 2rem); background: var(--color-ground); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.typography-sample { padding: 1.25rem 0; border-bottom: 1px solid var(--color-border); }
.typography-sample:last-child { border-bottom: 0; }
.typography-sample > span { display: block; margin-bottom: .5rem; color: var(--color-ink-muted); font: 600 .7rem var(--font-mono); text-transform: uppercase; }
.typography-sample p { margin: 0; overflow-wrap: anywhere; }
.typography-role-display { font-family: var(--font-display); }
.typography-role-body { font-family: var(--font-body); }
.typography-role-ui { font-family: var(--font-ui); }
.typography-role-mono { font-family: var(--font-mono); }
.typography-role-serif { font-family: var(--font-serif); }
.typography-sample-display { font-size: var(--type-display-size); line-height: var(--type-display-line); font-weight: var(--type-display-weight); letter-spacing: var(--type-display-tracking); }
.typography-sample-main-h1 { font-size: var(--type-h1-size); line-height: var(--type-h1-line); font-weight: var(--type-h1-weight); letter-spacing: var(--type-h1-tracking); }
.typography-sample-standard-h2 { font-size: var(--type-h2-size); line-height: var(--type-h2-line); font-weight: var(--type-h2-weight); letter-spacing: var(--type-h2-tracking); }
.typography-sample-standard-h3 { font-size: var(--type-h3-size); line-height: var(--type-h3-line); font-weight: var(--type-h3-weight); letter-spacing: var(--type-h3-tracking); }
.typography-sample-intro-paragraph { font-size: var(--type-intro-size); line-height: var(--type-intro-line); font-weight: var(--type-intro-weight); }
.typography-sample-body-paragraph { font-size: var(--type-body-size); line-height: var(--type-body-line); font-weight: var(--type-body-weight); }
.typography-sample-portal-body { font-size: var(--type-portal-body-size); line-height: var(--type-portal-body-line); font-weight: var(--type-body-weight); }
.typography-sample-small-text { font-size: var(--type-small-size); line-height: var(--type-small-line); }
.typography-sample-editorial-quote { font-size: var(--type-quote-size); line-height: var(--type-quote-line); font-weight: var(--type-quote-weight); }
.typography-sample-statistics { font-size: var(--type-stat-size); line-height: var(--type-stat-line); font-weight: var(--type-stat-weight); }
.typography-sample-navigation { font-size: var(--type-nav-size); line-height: var(--type-nav-line); font-weight: var(--type-nav-weight); }
.typography-sample-eyebrows-and-labels { font-size: var(--type-label-size); line-height: var(--type-label-line); font-weight: var(--type-label-weight); letter-spacing: var(--type-label-tracking); }
.typography-history { display: flex; flex-wrap: wrap; gap: .75rem; }
.typography-history select { max-width: 440px; }

/* Owned public Media Library. Keep metadata and provenance legible on narrow screens. */
.media-library { max-width: 100%; }
.media-summary { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.media-summary span { padding: .45rem .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-surface); font-size: .82rem; }
.media-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(130px, 1fr)); gap: .65rem; margin: 1.25rem 0; }
.media-filters label { display: flex; flex-direction: column; gap: .3rem; font-size: .78rem; font-weight: 700; }
.media-filters .crm-input, .media-bulk .crm-input { min-width: 0; width: 100%; }
.media-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin: .75rem 0; }
.media-bulk > label { display: flex; align-items: center; gap: .4rem; }
.media-bulk select { max-width: 170px; }
.media-bulk > input { max-width: 250px; }
.media-table-wrap { overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.media-table { width: 100%; min-width: 1500px; border-collapse: collapse; font-size: .78rem; }
.media-table th, .media-table td { padding: .8rem; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.media-table th { position: sticky; top: 0; z-index: 1; background: var(--color-surface-muted); white-space: nowrap; }
.media-table td { max-width: 210px; overflow-wrap: anywhere; }
.media-table td small { display: block; margin-top: .3rem; color: var(--color-ink-muted); }
.media-asset { display: flex; gap: .65rem; min-width: 190px; }
.media-asset strong { display: block; max-width: 160px; overflow-wrap: anywhere; }
.media-asset a { display: inline-block; margin-top: .35rem; color: var(--color-brand-blue); }
.media-thumb { flex: none; width: 60px; height: 52px; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-muted); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-usage-link { display: block; margin-bottom: .25rem; color: var(--color-brand-blue); }
.media-table details code { display: block; padding: .25rem 0; font-size: .68rem; }
.media-muted { color: var(--color-ink-faint); }
.media-actions { display: flex; gap: .35rem; }
.media-actions .btn { min-width: 0; padding: .4rem .65rem; font-size: .74rem; }
.media-pagination { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin: 1rem 0; }
.media-note { max-width: 85ch; color: var(--color-ink-muted); font-size: .85rem; }
.media-dialog-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: auto; padding: 1rem; background: rgba(5, 8, 15, .65); }
.media-dialog { width: min(100%, 600px); max-height: calc(100dvh - 2rem); overflow: auto; padding: clamp(1rem, 3vw, 2rem); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-card); }
.media-dialog h2 { margin-top: 0; }.media-dialog p { overflow-wrap: anywhere; }
.media-dialog label { display: block; margin: .9rem 0; font-weight: 700; }
.media-dialog label .crm-input, .media-dialog label input[type=file] { display: block; width: 100%; margin-top: .3rem; }
.media-dialog textarea { resize: vertical; }
.media-dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
@media (max-width: 1100px) { .media-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 650px) { .media-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .media-filters label:first-child { grid-column: 1 / -1; } }
.ds-quote { max-width: 30ch; color: var(--color-ink); font: italic var(--type-quote-weight) var(--type-quote-size)/var(--type-quote-line) var(--font-serif); }
.ds-stat { color: var(--color-ink); font-size: var(--type-stat-size); line-height: var(--type-stat-line); font-weight: var(--type-stat-weight); letter-spacing: -.04em; }
.ds-nav-label { color: var(--color-ink-body); font: var(--type-nav-weight) var(--type-nav-size)/var(--type-nav-line) var(--font-ui); }
.ds-small { color: var(--color-ink-muted); font-size: var(--type-small-size); line-height: var(--type-small-line); }
.ds-highlight { color: var(--color-brand-blue-light); font-size: var(--type-h3-size); font-weight: 750; }
.ds-link, .ds-text-link { color: var(--color-brand-blue-deep); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ds-inline-row { padding: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ds-button { min-height: var(--control-height); padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-md); font: 700 14px/1 var(--font-ui); }
.ds-button-primary { color: #fff; background: var(--gradient-brand); box-shadow: var(--shadow-button); }
.ds-button-secondary { color: var(--color-ink); background: var(--color-surface); border-color: var(--color-border); }
.ds-button-light { color: var(--color-navy); background: var(--color-on-dark); }
.ds-pill { padding: 7px 11px; color: var(--color-brand-blue-deep); background: var(--color-tint-blue); border: 1px solid var(--color-border); border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; }
.ds-pill-dark { color: var(--color-on-dark); background: var(--color-navy); border-color: var(--color-navy); }
.ds-eyebrow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-eyebrow-grid > div { min-height: 100px; padding: 24px; display: flex; align-items: center; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.ds-eyebrow-grid > div:nth-child(2n) { border-right: 0; }
.ds-eyebrow-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.ds-dark-swatch { background: var(--color-dark); }
.ds-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-card { min-height: 270px; padding: 26px; display: flex; flex-direction: column; gap: 15px; border-right: 1px solid var(--color-border); }
.ds-card:last-child { border-right: 0; }
.ds-card-muted { background: var(--color-surface-muted); }
.ds-card .ds-link { margin-top: auto; }
.ds-banner { padding: 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--color-on-dark); background: var(--gradient-brand-teal); border-radius: 0 0 var(--banner-radius) var(--banner-radius); }
.ds-banner h2 { margin: 8px 0; font-size: var(--type-h2-size); line-height: var(--type-h2-line); letter-spacing: var(--type-h2-tracking); }
.ds-banner p:not(.ds-eyebrow) { margin: 0; color: var(--color-on-dark-body); }
.ds-chat { width: min(calc(100% - 48px), var(--livechat-width)); margin: 28px; padding: 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; color: var(--color-on-dark); background: var(--color-navy); border: 1px solid color-mix(in srgb, var(--color-surface) 22%, transparent); border-radius: var(--radius-lg); box-shadow: var(--shadow-menu); }
.ds-chat-mark { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: var(--gradient-brand); border-radius: var(--radius-pill); font-weight: 800; }
.ds-chat strong { display: block; }
.ds-chat p { margin: 3px 0 0; color: var(--color-on-dark-body); font-size: 12px; line-height: 1.4; }
.ds-chat button { min-height: 34px; padding: 0 11px; color: var(--color-on-dark); background: transparent; border: 1px solid color-mix(in srgb, var(--color-surface) 28%, transparent); border-radius: var(--radius-sm); }
.ds-footer { padding: 32px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; color: var(--color-on-dark); background: var(--color-dark); }
.ds-footer > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ds-footer p, .ds-footer a, .ds-footer small { color: var(--color-on-dark-body); font-size: 12px; text-decoration: none; }
.ds-footer small { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--color-hairline-dark); }

@media (max-width: 1100px) {
  .design-system-layout { grid-template-columns: minmax(0, 1fr); }
  .design-token-panel { max-height: none; position: static; }
}

@media (max-width: 760px) {
  .credential-vault-row { grid-template-columns: 1fr; }
  .credential-vault-wide { grid-column: auto; }
  .design-system-intro, .ds-banner { align-items: stretch; flex-direction: column; }
  .ds-header nav { display: none; }
  .ds-card-grid, .ds-eyebrow-grid { grid-template-columns: 1fr; }
  .ds-card, .ds-eyebrow-grid > div { border-right: 0; border-bottom: 1px solid var(--color-border); }
  .ds-eyebrow-grid > div:nth-last-child(2) { border-bottom: 1px solid var(--color-border); }
  .ds-footer { grid-template-columns: 1fr; }
  .ds-footer small { grid-column: auto; }
  .ds-chat { grid-template-columns: 40px minmax(0, 1fr); }
  .ds-chat button { grid-column: 1 / -1; }
}

/* Shared account-security scenery and the route-aware sign-in arrival. */
:root {
  --auth-photo: url('/images/phuket-beach-login.webp');
  --auth-ink: #0b1220;
  --auth-muted: #5d6a80;
  --auth-outline: rgba(255,255,255,.78);
  --auth-card-radius: 24px;
}
.vc-auth-security {
  min-height: 100dvh; position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; padding: 32px 20px;
  background: var(--auth-ink);
}
.vc-auth-security-photo, .vc-auth-security-shade {
  position: absolute; inset: -16px; z-index: -2; pointer-events: none;
}
.vc-auth-security-photo {
  background: var(--auth-photo) center / cover no-repeat;
  filter: blur(7px) saturate(.92); transform: scale(1.035);
}
.vc-auth-security-shade {
  z-index: -1; inset: 0;
  background: linear-gradient(135deg, rgba(4,20,48,.42), rgba(7,54,75,.2) 48%, rgba(255,255,255,.12));
}
.vc-auth-security-card {
  width: min(600px,100%); padding: clamp(28px,4vw,44px);
  color: var(--auth-ink); background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--auth-card-radius);
  box-shadow: 0 42px 110px -34px rgba(4,17,39,.72);
}
.vc-auth-security-brand { margin-bottom: 36px; }
.vc-auth-security-label {
  margin: 0 0 10px; color: var(--color-brand); font: 650 11px/1.4 var(--font-mono);
  letter-spacing: .15em;
}
.vc-auth-security-card h1 {
  margin: 0; font: 800 clamp(28px,4vw,36px)/1.12 var(--font-ui);
  letter-spacing: -.035em;
}
.vc-auth-security-intro { margin: 14px 0 22px; color: var(--auth-muted); line-height: 1.6; }
.vc-auth-security-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.vc-auth-security-actions .btn { min-height: 44px; display: inline-flex; align-items: center; }
.vc-auth-security-qr {
  display: flex; align-items: center; gap: 22px; margin: 0 0 22px; padding: 16px;
  border: 1px solid var(--color-hairline); border-radius: 16px; background: #fff;
}
.vc-auth-security-qr-image {
  width: 256px; height: 256px; flex: 0 0 256px; display: grid; place-items: center;
  overflow: hidden; border-radius: 10px; background: #fff;
}
.vc-auth-security-qr-image img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.vc-auth-security-qr-image p { max-width: 160px; margin: 0; color: var(--auth-muted); text-align: center; font-size: 13px; }
.vc-auth-security-qr figcaption { display: grid; gap: 8px; color: var(--auth-muted); font-size: 13px; line-height: 1.5; }
.vc-auth-security-qr figcaption strong { color: var(--auth-ink); font-size: 15px; }
@media (max-width: 590px) {
  .vc-auth-security-qr { flex-direction: column; text-align: center; }
}
.vc-auth-security-manual {
  margin: 0 0 22px; border: 1px solid var(--color-hairline); border-radius: 14px;
  background: #fff;
}
.vc-auth-security-manual summary { padding: 16px 18px; color: var(--auth-muted); cursor: pointer; font-weight: 650; }
.vc-auth-security-secret {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 0 18px 18px;
}
.vc-auth-security-secret code { flex: 1; min-width: 180px; font-size: 14px; word-break: break-all; }
.vc-auth-security-form, .vc-auth-security-form label { display: grid; gap: 12px; }
.vc-auth-security-form label { gap: 7px; font-weight: 650; }
.vc-auth-security-form .crm-input { min-height: 46px; }
.vc-auth-security-form > .btn { min-height: 46px; }
.vc-auth-security-hint { color: var(--auth-muted); font-size: 13px; }
.vc-auth-security-recovery {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px;
  margin: 0 0 22px; padding: 16px; border: 1px solid var(--color-hairline); border-radius: 14px;
}
.vc-auth-security-recovery code { font-size: 13px; overflow-wrap: anywhere; }

.vc-auth-arrival-wait { min-height: 100dvh; background: var(--auth-ink); }
.vc-auth-arrival-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.vc-auth-arrival {
  position: fixed; inset: 0; z-index: 9999; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; background: var(--auth-ink);
  opacity: 1; transition: opacity 650ms ease;
}
.vc-auth-arrival-photo, .vc-auth-arrival-shade { position: absolute; inset: -5%; z-index: -2; pointer-events: none; }
.vc-auth-arrival-photo {
  background: var(--auth-photo) center / cover no-repeat;
  filter: blur(13px) saturate(.9); transform: scale(1.05); opacity: .88;
  transition: filter 1250ms ease, transform 1200ms cubic-bezier(.55,.04,.95,.35), opacity 650ms ease;
}
.vc-auth-arrival-shade {
  z-index: -1; inset: 0; background: linear-gradient(130deg, rgba(8,40,93,.7), rgba(8,70,98,.34));
  transition: opacity 650ms ease;
}
.vc-auth-arrival-blueprint {
  width: min(940px,88vw); min-height: min(540px,70vh);
  display: grid; grid-template-columns: 1.05fr .95fr;
  border: 2px solid var(--auth-outline); border-radius: var(--auth-card-radius);
  box-shadow: 0 40px 100px rgba(0,0,0,.15); overflow: hidden;
  background: rgba(255,255,255,.12); backdrop-filter: blur(5px);
  opacity: 1; transform: scale(1);
  transition: opacity 420ms ease, transform 650ms ease;
}
.vc-auth-arrival-blueprint-brand {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px; border-right: 2px solid var(--auth-outline);
}
.vc-auth-arrival-blueprint-brand span {
  display: block; height: 20px; border: 2px solid var(--auth-outline); border-radius: 5px;
  animation: vc-auth-outline 520ms ease both;
}
.vc-auth-arrival-blueprint-brand span:nth-child(1) { width: 45%; }
.vc-auth-arrival-blueprint-brand span:nth-child(2) { width: 75%; height: 56px; }
.vc-auth-arrival-blueprint-brand span:nth-child(3) { width: 24%; height: 12px; }
.vc-auth-arrival-blueprint-form { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 48px; }
.vc-auth-arrival-line {
  display: block; height: 44px; border: 2px solid var(--auth-outline); border-radius: 10px;
  animation: vc-auth-outline 520ms ease both;
  transition: opacity 360ms ease, transform 360ms ease;
}
.vc-auth-arrival-line--title { width: 45%; height: 35px; border-radius: 5px; }
.vc-auth-arrival-line--intro { width: 78%; height: 14px; border-radius: 4px; }
.vc-auth-arrival-line--tabs { height: 52px; }
.vc-auth-arrival-line--field { height: 50px; }
.vc-auth-arrival-line--button { height: 50px; }
.vc-auth-arrival-word {
  position: absolute; padding: 0 16px; color: #fff; text-align: center;
  font: 900 clamp(48px,12vw,180px)/1 var(--font-ui);
  letter-spacing: -.065em; text-shadow: 0 14px 45px rgba(1,22,50,.18);
  opacity: 0; transform: translateY(18px) scale(.97);
  transition: opacity 460ms ease, transform 600ms ease;
}
.vc-auth-arrival--welcome .vc-auth-arrival-blueprint,
.vc-auth-arrival--zoom .vc-auth-arrival-blueprint { opacity: 0; transform: scale(.94); }
.vc-auth-arrival--welcome .vc-auth-arrival-blueprint { transition-delay: 300ms; }
.vc-auth-arrival--welcome .vc-auth-arrival-line:nth-child(1) { transition-delay: 0ms; }
.vc-auth-arrival--welcome .vc-auth-arrival-line:nth-child(2) { transition-delay: 60ms; }
.vc-auth-arrival--welcome .vc-auth-arrival-line:nth-child(3) { transition-delay: 120ms; }
.vc-auth-arrival--welcome .vc-auth-arrival-line:nth-child(4) { transition-delay: 180ms; }
.vc-auth-arrival--welcome .vc-auth-arrival-line:nth-child(5) { transition-delay: 240ms; }
.vc-auth-arrival--welcome .vc-auth-arrival-line { opacity: 0; transform: translateY(-12px); }
.vc-auth-arrival--welcome .vc-auth-arrival-word { opacity: 1; transform: translateY(0) scale(1); }
.vc-auth-arrival--welcome .vc-auth-arrival-photo { filter: blur(2px) saturate(1); }
.vc-auth-arrival--zoom .vc-auth-arrival-word { opacity: 0; transform: translateY(-20px) scale(1.04); }
.vc-auth-arrival--zoom .vc-auth-arrival-photo { filter: blur(0) saturate(1); transform: scale(1.45); }
.vc-auth-arrival--zoom .vc-auth-arrival-shade { opacity: .28; }
.vc-auth-arrival--reveal { opacity: 0; pointer-events: none; }
.vc-auth-arrival--reveal .vc-auth-arrival-photo { transform: scale(1.7); opacity: 0; }
.vc-auth-arrival--reveal .vc-auth-arrival-shade { opacity: 0; }
@keyframes vc-auth-outline { from { background: rgba(255,255,255,.6); } to { background: transparent; } }
@media (max-width: 760px) {
  .vc-auth-security-card { padding: 28px 22px; }
  .vc-auth-arrival-blueprint { width: min(450px,88vw); grid-template-columns: 1fr; min-height: 430px; }
  .vc-auth-arrival-blueprint-brand { display: none; }
  .vc-auth-arrival-blueprint-form { padding: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .vc-auth-arrival, .vc-auth-arrival * { animation: none !important; transition: none !important; }
  .vc-auth-arrival-blueprint, .vc-auth-arrival-word { display: none; }
  .vc-auth-arrival-photo { filter: none; transform: none; }
}

/* Admin broken-link action queue. */
.crm-broken-links__tabs{display:flex;gap:8px;margin:22px 0}
.crm-broken-links__tabs a{padding:9px 16px;border:1px solid var(--color-hairline);border-radius:999px;background:var(--color-surface);font-weight:700}
.crm-broken-links__tabs a[aria-current="page"]{border-color:var(--color-brand);background:var(--color-brand-soft);color:var(--color-brand)}
.crm-broken-links__list{display:grid;gap:14px}.crm-broken-links__notice{padding:25px}
.crm-broken-links__item{padding:24px}.crm-broken-links__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.crm-broken-links__heading h2{margin:7px 0 0;font-size:18px;overflow-wrap:anywhere}.crm-broken-links__heading h2 a{color:var(--color-brand)}
.crm-broken-links__item dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}
.crm-broken-links__item dt{color:var(--color-ink-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.crm-broken-links__item dd{margin:4px 0 0;overflow-wrap:anywhere}.crm-broken-links__item label{display:grid;gap:7px;font-weight:700}
.crm-broken-links__item textarea{width:100%;padding:11px;border:1px solid var(--color-hairline-strong);border-radius:10px;background:var(--color-surface)}
.crm-broken-links__actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:13px}.crm-broken-links__feedback{margin-top:10px;color:var(--color-danger)}
@media(max-width:620px){.crm-broken-links__item dl{grid-template-columns:1fr}.crm-broken-links__item{padding:18px}}

.css-admin-history { margin-top: 1.25rem; }

.crm-shell .crm-card-pad > code { display: block; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }

.crm-shell { --crm-font-ui: var(--font-inter), system-ui, -apple-system, "Segoe UI", sans-serif; font-family: var(--crm-font-ui); }
.crm-shell :is(.crm-nav-group, .crm-card-title, .crm-table th, .crm-stat-label, .field label, .badge) { font-family: var(--crm-font-ui); }
