/* Marketpreneurs brand system. Keep official palette and font files intact. */
@font-face { font-family: Inter; src: url('../fonts/brand/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Manrope; src: url('../fonts/brand/manrope-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
:root {
  --brand-navy: #122865; --brand-navy-strong: #122865; --brand-blue: #122865;
  --brand-coral: #E94E5E; --brand-coral-dark: #122865; --brand-coral-light: #f5b4bb;
  --ink: #111827; --muted: #475569; --subtle: #536174;
  --line: #E2E6EC; --line-strong: #b8c1ce; --canvas: #FBFBFC;
  --surface: #FFFFFF; --surface-soft: #F3F5F8;
  --green-700: #122865; --green-600: #122865; --green-50: #F3F5F8;
  --radius: 8px; --radius-lg: 10px; --shadow-sm: none; --shadow: none;
  font-family: Inter, sans-serif;
}
[hidden] { display: none !important; }
body { color: var(--ink); }
h1, h2, h3, h4, .brand-wordmark, .home-stat > strong, .stat-value { font-family: Manrope, Inter, sans-serif; letter-spacing: -.025em; }
h1 { font-weight: 800; } h2, h3 { font-weight: 700; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--brand-coral); outline-offset: 3px; }
button:disabled { opacity: .55; cursor: not-allowed; }
.sidebar { background: var(--brand-navy); width: 244px; }
.main-shell { margin-left: 244px; }
.sidebar > .brand-lockup { background: #fff; color: var(--brand-navy); min-height: 86px; border-bottom: 1px solid var(--line); padding: 12px 17px; }
.brand-mark { width: 44px; height: 44px; flex-basis: 44px; filter: none; background: #fff; border-radius: 4px; }
.brand-mark::before { display: none; }
.brand-mark img { width: 34px; height: 34px; transform: none; }
.brand-waba { color: var(--brand-navy) !important; }
.brand-preneurs { color: var(--brand-coral) !important; }
.brand-lockup small { color: var(--muted); }
.nav-list { padding: 22px 12px; }
.nav-item { min-height: 46px; margin-bottom: 5px; border-radius: 6px; color: #d8dfee; font-size: 13px; font-weight: 500; gap: 13px; }
.nav-item > span { color: currentColor; }
.nav-item.active { background: #ffffff13; box-shadow: inset 3px 0 var(--brand-coral); color: #fff; }
.nav-item.active > span { color: #fff; }
.nav-item:hover { background: #ffffff0d; color: #fff; }
.nav-item-primary { margin-top: 22px; border: 1px solid #ffffff50; background: transparent; color: #fff; }
.nav-label { color: #b2bfdd; font-size: 10px; letter-spacing: .13em; margin: 30px 12px 12px; }
.sidebar-footer { border-top: 1px solid #ffffff20; }
.sidebar-footer .account-card { color: #fff; }
.sidebar-footer .account-card span { color: #cbd5e1; }
.topbar { min-height: 72px; background: #fff; backdrop-filter: none; padding-inline: 32px; }
.breadcrumbs { font-size: 12px; }
.sender-switcher, .connection-pill { border-radius: 6px; background: #fff; border-color: var(--line); }
/* WebKit includes native select internals in the page's scroll bounds unless contained. */
.sender-switcher { position: relative; min-width: 0; max-width: 100%; overflow: hidden; }
.sender-switcher .sr-only { top: 0; left: 0; }
.main-shell, .page, .page-head > div, .card, .card-head > *, .table-wrap { min-width: 0; }
.table-wrap { max-width: 100%; }
.page { padding: 32px; }
.page-head h1 { font-size: clamp(26px, 2.3vw, 34px); letter-spacing: -.03em; }
.page-head p { font-size: 13px; color: var(--muted); }
.eyebrow { color: var(--brand-navy); letter-spacing: .12em; font-weight: 600; }
.eyebrow::before { content: ''; display: inline-block; width: 16px; height: 2px; margin: 0 8px 3px 0; background: var(--brand-coral); }
.card { border-radius: 8px; box-shadow: none; border-color: var(--line); }
.card-head h2 { font-size: 17px; }
.btn { border-radius: 6px; min-height: 40px; font-size: 12px; font-weight: 600; box-shadow: none; }
.btn-primary, .btn-primary:hover { color: #fff; border-color: var(--brand-navy); background: var(--brand-navy); box-shadow: none; }
.btn-primary:hover { filter: brightness(1.17); }
.control { border-radius: 6px; background: #fff; font-size: 13px; }
.control:focus { border-color: var(--brand-navy); box-shadow: none; }
.data-table th { font-size: 10px; color: var(--muted); background: var(--surface-soft); font-weight: 600; letter-spacing: .045em; }
.data-table td { font-size: 12px; }
.simple-hero { background: #fff; border-left: 4px solid var(--brand-navy); }
.simple-hero-copy h2 { font-size: clamp(25px, 3vw, 36px); }
.simple-steps > div { border-radius: 6px; }
.home-stat > strong { color: var(--brand-navy); }
.login-visual { background: var(--brand-navy); }
.login-visual::before, .login-visual::after { display: none; }
.login-mock-card { box-shadow: none; border-radius: 8px; backdrop-filter: none; }
.login-form h1 { letter-spacing: -.03em; }
.workspace-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.workspace-link { display: block; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.workspace-link:hover { border-color: var(--brand-navy); }
.workspace-link svg { color: var(--brand-navy); margin-bottom: 15px; }
.workspace-link strong { display: block; font: 700 16px Manrope, sans-serif; }
.workspace-link p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.contact-add { padding: 20px 22px; margin-bottom: 20px; }
.contact-add > summary { color: var(--brand-navy); font: 700 15px Manrope, sans-serif; cursor: pointer; }
.contact-add form { margin-top: 18px; }
.contact-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.contact-form-grid label, .contact-status-form label { display: block; font-size: 12px; line-height: 1.7; }
.contact-form-grid .control, .contact-status-form .control { display: block; width: 100%; min-height: 40px; margin-top: 6px; }
.contact-add .check-row { margin: 18px 0; }
.contact-status-form { display: grid; gap: 12px; padding-top: 12px; min-width: 220px; }
.contact-status-form .check-row { white-space: normal; }
.workspace-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.workspace-filter-bar .control { min-height: 40px; width: auto; max-width: 100%; }
.workspace-filter-bar input { flex: 1; min-width: 180px; }
.workspace-empty { padding: 32px; text-align: center; font-size: 13px; color: var(--muted); }
.workspace-pagination { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 16px 22px; color: var(--muted); font-size: 12px; }
.report-metric-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.report-metric { padding: 20px; min-width: 0; }
.report-metric > span, .performance-counts span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.report-metric > strong { display: block; font: 800 clamp(25px,2.3vw,36px) Manrope, sans-serif; color: var(--brand-navy); }
.report-explainer { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 14px 0 24px; }
.report-activity, .campaign-performance, .report-issues { margin: 22px 0; }
.activity-chart { display: flex; gap: 8px; align-items: flex-end; padding: 20px 24px; height: 210px; overflow-x: auto; }
.activity-day { flex: 1; display: flex; min-width: 13px; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; color: var(--muted); font-size: 10px; }
.activity-bar { background: var(--brand-navy); min-width: 9px; border-radius: 3px 3px 0 0; }
.activity-bar[data-empty=true] { background: var(--line); }
.activity-values { padding: 0 24px 18px; font-size: 11px; color: var(--muted); }
.activity-values summary { cursor: pointer; }
.activity-values .table-wrap { max-height: 260px; overflow-y: auto; margin-top: 12px; }
.performance-counts { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; padding: 20px 24px; }
.performance-counts strong { color: var(--brand-navy); font: 800 25px Manrope, sans-serif; }
@media (max-width:1180px) { .report-metric-grid, .performance-counts { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width:640px) { .report-metric-grid, .performance-counts { grid-template-columns: repeat(2,minmax(0,1fr)); } .report-metric { padding: 16px; } }
@media (max-width:640px) { .contact-form-grid { grid-template-columns: 1fr; } .workspace-filter-bar .control { flex: 1; min-width: 130px; } }
@media (max-width: 1180px) { .sidebar { width: 222px; } .main-shell { margin-left: 222px; } .page, .topbar { padding-inline: 24px; } }
@media (max-width: 900px) { .main-shell { margin-left: 0; } .sidebar { width: 244px; } .page { padding: 24px 20px; } .topbar { padding-inline: 20px; } }
@media (max-width: 640px) { .page { padding: 22px 16px; } .topbar { padding-inline: 16px; } .workspace-links { grid-template-columns: 1fr; gap: 10px; } .workspace-link { padding: 18px; } .page-head h1 { font-size: 27px; } .btn { min-height: 42px; } }
@media (max-width: 640px) {
  .topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; height: auto; min-height: 108px; padding: 8px 16px; }
  .menu-button, .topbar-back { width: 44px; height: 44px; }
  .topbar-navigation { min-width: 0; margin: 0; gap: 10px; }
  .breadcrumbs { flex: 1; min-width: 0; font-size: 13px; }
  .breadcrumbs > a, .breadcrumbs > b { display: none; }
  .topbar-actions { grid-column: 1 / -1; min-width: 0; }
  .sender-switcher { width: 100%; min-height: 44px; padding: 5px 10px; }
  .sender-switcher select { flex: 1; width: 100%; min-width: 0; max-width: 100%; min-height: 32px; }
  .topbar .connection-pill { display: inline-flex; min-height: 36px; white-space: normal; }
  .page { padding: 24px 16px 32px; }
  .page-head { gap: 18px; }
  .page-head p { font-size: 14px; }
  .head-actions { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
  .head-actions > .inline-form { display: flex; flex: 1 1 140px; }
  .head-actions > .btn { flex: 1 1 140px; }
  .head-actions .inline-form .btn { width: 100%; }
  .btn, .tab { min-height: 44px; font-size: 13px; }
  .btn { white-space: normal; }
  .nav-item { font-size: 14px; min-height: 48px; }
  /* Keep input text readable and avoid iOS focus zoom without disabling pinch zoom. */
  body input.control, body select.control, body textarea.control,
  body .sender-switcher select, body .conversation-composer textarea { font-size: 16px; }
  .control { max-width: 100%; min-height: 44px; }
  .field:has(> select.control) { min-width: 0; overflow: hidden; }
  .field > select.control:focus-visible { outline-offset: -3px; }
  .card-head { flex-wrap: wrap; padding: 16px; }
  .card-head > .btn { width: 100%; }
  .template-library-tools { gap: 14px; }
  .template-library-tools .tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; border: 0; background: none; overflow: visible; }
  .template-library-tools .tab { display: grid; place-items: center; flex: 1 1 90px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 12px; }
  .template-library-tools .tab.active { border-color: var(--brand-navy); color: var(--brand-navy); box-shadow: inset 0 -2px var(--brand-navy); }
  .template-filters { width: 100%; gap: 10px; }
  .template-filters .search-control { min-width: 0; }
  .template-filters .control, .template-filters .btn { width: 100%; min-height: 44px; }
  .template-filters .search-control::before { display: none; }
  .workspace-filter-bar { display: grid; grid-template-columns: minmax(0, 1fr); }
  .workspace-filter-bar .control { width: 100%; min-width: 0; }
  .contact-status-form { min-width: 0; }
  .contact-status-form .check-row { align-items: flex-start; }
  .wizard-shell, .message-create-layout { grid-template-columns: minmax(0, 1fr); }
  .wizard-shell > *, .message-create-layout > * { min-width: 0; max-width: 100%; }
  .campaign-phone-preview > .health-card { width: 100%; max-width: 330px; }
  .friendly-funnel { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .friendly-funnel > i { display: none; }
  .workspace-pagination { flex-wrap: wrap; justify-content: space-between; padding: 16px; }
  .data-table.mobile-records { position: relative; display: block; width: 100%; }
  .mobile-records > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
  .mobile-records > tbody { display: block; }
  .data-table.mobile-records > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 16px; border-bottom: 1px solid var(--line); }
  .data-table.mobile-records > tbody > tr:last-child { border-bottom: 0; }
  .data-table.mobile-records > tbody > tr > td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
  .mobile-records td::before { content: attr(data-mobile-label); display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 500; }
  .mobile-records td:first-child, .mobile-records td.mobile-record-wide { grid-column: 1 / -1; }
  .mobile-records td:first-child::before { display: none; }
  .mobile-records .cell-main { align-items: flex-start; }
  .mobile-records .cell-copy { min-width: 0; }
  .mobile-records .cell-copy strong, .mobile-records td:first-child > strong { font-size: 15px; font-weight: 700; }
  .mobile-records .cell-copy span, .mobile-records .small { font-size: 12px; }
  .mobile-records .status { min-height: 28px; font-size: 11px; white-space: normal; }
  .mobile-records .btn { width: 100%; }
  .mobile-records .campaign-progress-cell { min-width: 0; }
  .mobile-records .template-detail-row { padding-top: 0; }
  .mobile-records .template-detail-row .alert { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
