:root {
  --navy: #0f172a;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --bg: #f1f5f9;
  --card: #ffffff;
  --muted: #64748b;
  --line: #e2e8f0;
  --sidebar: #0f172a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--navy);
  overflow-x: hidden;
}
a { text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0f172a, #1e293b);
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  z-index: 1040;
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { font-size: 1.6rem; color: var(--cyan); }
.sidebar-brand small { display: block; color: #94a3b8; font-size: .75rem; }
.sidebar-nav { padding: .8rem .7rem 1.5rem; display: grid; gap: .25rem; }
.sidebar-nav a {
  color: #cbd5e1;
  padding: .85rem .9rem;
  border-radius: 10px;
  display: flex;
  gap: .65rem;
  align-items: center;
  font-weight: 500;
  min-height: 44px;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(37,99,235,.25);
  color: #fff;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 1035;
}
.sidebar-overlay.show { display: block; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: .7rem .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title {
  font-weight: 700;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
}
.topbar-user .btn { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.content { padding: 1rem; padding-bottom: calc(1rem + var(--safe-bottom)); }
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .9rem 1rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
  height: 100%;
}
.stat-card .label { color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.25; }
.stat-card .value { font-size: 1.35rem; font-weight: 800; margin-top: .15rem; word-break: break-word; }
.stat-card .icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; color: #fff; font-size: 1rem; flex-shrink: 0;
}
.card-soft {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.stat-card-link { display: block; height: 100%; }
.stat-card-link:hover .stat-card { border-color: #bfdbfe; box-shadow: 0 10px 28px rgba(37,99,235,.08); }
.dash-toolbar .btn-sm { min-height: 36px; }
.dash-filters .form-control-sm,
.dash-filters .form-select-sm { min-height: 38px; font-size: 0.92rem; }
.dash-lead-table .btn-sm { min-height: 34px; }
.dash-col-menu .dropdown-item-text { cursor: pointer; border-radius: 6px; }
.dash-col-menu .dropdown-item-text:hover { background: #f8fafc; }
.dash-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: .35rem; }
.dash-row-actions .btn { min-height: 34px; }
.lead-more-btn {
  background: #334155 !important;
  border-color: #334155 !important;
  color: #fff !important;
  font-weight: 600;
}
.lead-more-btn:hover,
.lead-more-btn:focus {
  background: #1e293b !important;
  border-color: #1e293b !important;
  color: #fff !important;
}
.lead-actions-popup .modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
}
.lead-actions-popup .modal-header {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  flex-shrink: 0;
}
#leadWorkbenchModal {
  z-index: 1060;
}
.modal-backdrop.show {
  z-index: 1055;
}
#leadWorkbenchModal .modal-dialog {
  margin: .75rem auto;
  max-width: 420px;
}
#leadWorkbenchModal .modal-content {
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
}
#leadWorkbenchModal #lwmForm {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
#leadWorkbenchModal .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}
#leadWorkbenchModal .modal-footer {
  flex-shrink: 0;
  gap: .5rem;
  padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--line);
}
#leadWorkbenchModal .modal-footer .btn {
  min-height: 44px;
  min-width: 96px;
}
body.modal-open .mobile-bottom-nav {
  visibility: hidden !important;
  pointer-events: none !important;
}
@media (max-width: 575.98px) {
  #leadWorkbenchModal .modal-dialog {
    margin: .5rem;
    max-width: none;
    max-height: calc(100dvh - 1rem);
  }
  #leadWorkbenchModal .modal-content {
    max-height: calc(100dvh - 1rem);
  }
  #leadWorkbenchModal .modal-footer {
    display: flex !important;
    justify-content: stretch;
  }
  #leadWorkbenchModal .modal-footer.d-none {
    display: none !important;
  }
  #leadWorkbenchModal .modal-footer .btn {
    flex: 1;
  }
}
.lwm-action-list {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.user-status-btn-list {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.user-status-btn {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem .9rem;
  border-radius: 12px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  min-height: 48px;
}
.user-status-btn i {
  width: 1.25rem;
  text-align: center;
  font-size: 1.15rem;
  color: var(--blue);
}
.user-status-label { flex: 1; }
.user-status-count {
  min-width: 1.75rem;
  text-align: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--muted);
  background: #f1f5f9;
  border-radius: 999px;
  padding: .15rem .55rem;
}
.user-status-btn:hover,
.user-status-btn:focus {
  background: #eff6ff;
  color: var(--blue);
}
.user-status-btn:hover .user-status-count,
.user-status-btn:focus .user-status-count {
  background: #dbeafe;
  color: var(--blue);
}
.lead-action-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .85rem .9rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--navy);
  font-weight: 600;
  min-height: 48px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.lead-action-item:hover,
.lead-action-item:focus {
  background: #eff6ff;
  color: var(--blue);
}
.lead-action-item i {
  width: 1.25rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--blue);
}
.mobile-lead-actions-user {
  grid-template-columns: repeat(3, 1fr);
}
.btn-crm-dial {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.btn-crm-dial:hover,
.btn-crm-dial:focus {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}
.btn-crm-wa {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #fff !important;
}
.btn-crm-wa:hover,
.btn-crm-wa:focus {
  background: #15803d !important;
  border-color: #15803d !important;
  color: #fff !important;
}
.btn-crm-more {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
  color: #fff !important;
}
.btn-crm-more:hover,
.btn-crm-more:focus {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
  color: #fff !important;
}
.btn-crm-meet {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #fff !important;
}
.btn-crm-meet:hover,
.btn-crm-meet:focus {
  background: #0f766e !important;
  border-color: #0f766e !important;
  color: #fff !important;
}
.btn-crm-join {
  background: #ea580c !important;
  border-color: #ea580c !important;
  color: #fff !important;
}
.btn-crm-join:hover,
.btn-crm-join:focus {
  background: #c2410c !important;
  border-color: #c2410c !important;
  color: #fff !important;
}
.demo-alert-toast {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  max-width: 92vw;
  width: 380px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .25);
}
.mobile-lead-actions-demo {
  grid-template-columns: repeat(2, 1fr);
}
.mobile-lead-actions-demo {
  grid-template-columns: repeat(2, 1fr);
}
.manager-cat-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: .4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: .55rem .85rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.manager-cat-btn {
  flex: 0 0 auto;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--navy);
  font-weight: 600;
  font-size: .86rem;
  text-decoration: none;
  min-height: 36px;
  white-space: nowrap;
}
.manager-cat-btn.active,
.manager-cat-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
body.role-manager .content {
  padding-top: .75rem;
}

.btn-outline-crm-dial {
  color: #2563eb !important;
  border-color: #2563eb !important;
  background: #eff6ff !important;
}
.btn-outline-crm-wa {
  color: #16a34a !important;
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
}
.btn-outline-crm-more {
  color: #7c3aed !important;
  border-color: #7c3aed !important;
  background: #f5f3ff !important;
}
.user-hub-card {
  min-height: 108px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.user-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.stat-card-link { text-decoration: none; display: block; }
.workbench-card .mobile-lead-actions .btn {
  font-size: .82rem;
  padding: .45rem .4rem;
}

/* User account: no tab/filter buttons under header on mobile */
@media (max-width: 991.98px) {
  body.role-user .user-desktop-tabs,
  body.role-user .nav.nav-pills,
  body.role-user .content > .d-flex.flex-wrap.gap-2.justify-content-between {
    display: none !important;
  }
}

/* User mobile: only Name, Category, Action */
@media (max-width: 767.98px) {
  body.role-user .col-user-hide-mobile,
  body.role-user .dash-col-menu label:has([data-col="priority"]),
  body.role-user .dash-col-menu label:has([data-col="city"]),
  body.role-user .dash-col-menu label:has([data-col="email"]),
  body.role-user .dash-col-menu label:has([data-col="assigned"]),
  body.role-user .dash-col-menu label:has([data-col="followup"]) {
    display: none !important;
  }
  body.role-user .dash-lead-table th,
  body.role-user .dash-lead-table td {
    white-space: nowrap;
  }
  body.role-user .dash-lead-table th:first-child,
  body.role-user .dash-lead-table td:first-child {
    white-space: normal;
    min-width: 120px;
  }
}

@media (max-width: 575.98px) {
  .dash-hide-xs { display: none !important; }
  .dash-lead-table-wrap { overflow-x: auto; }
  .dash-row-actions .btn { min-height: 40px; }
  .lead-actions-popup .modal-dialog {
    margin: .75rem;
    max-width: none;
  }
}
.lead-category-btn {
  min-height: 38px !important;
  height: 38px !important;
  padding: 5px 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: .35rem !important;
  min-width: auto !important;
  width: auto !important;
  flex: 0 0 auto !important;
}
.lead-category-btn i { font-size: 14px !important; }
.quick-actions .lead-category-btn {
  min-width: auto !important;
  min-height: 38px !important;
  height: 38px !important;
}
@media (max-width: 767.98px) {
  .quick-actions .lead-category-btn {
    min-width: auto !important;
    min-height: 38px !important;
    height: 38px !important;
    flex: 0 0 auto !important;
  }
}
.lead-category-btn.active.btn-outline-danger,
.lead-category-btn.active.btn-outline-info,
.lead-category-btn.active.btn-outline-success,
.lead-category-btn.active.btn-outline-purple {
  color: #fff;
}
.lead-category-btn.active.btn-outline-danger { background: #dc3545; border-color: #dc3545; }
.lead-category-btn.active.btn-outline-info { background: #0dcaf0; border-color: #0dcaf0; color: #053b4a; }
.lead-category-btn.active.btn-outline-success { background: #198754; border-color: #198754; }
.btn-outline-purple {
  color: #7c3aed;
  border-color: #7c3aed;
  background: #fff;
}
.btn-outline-purple:hover,
.btn-outline-purple:focus {
  color: #fff;
  background: #7c3aed;
  border-color: #7c3aed;
}
.lead-category-btn.active.btn-outline-purple {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.lead-cat-chip.active.btn-outline-danger { background: #dc3545; border-color: #dc3545; color: #fff; }
.lead-cat-chip.active.btn-outline-info { background: #0dcaf0; border-color: #0dcaf0; color: #053b4a; }
.lead-cat-chip.active.btn-outline-success { background: #198754; border-color: #198754; color: #fff; }
.lead-cat-chip.active.btn-outline-secondary { background: #6c757d; border-color: #6c757d; color: #fff; }
.lead-category-btn.active.btn-outline-secondary { background: #6c757d; border-color: #6c757d; color: #fff; }
.lead-filter-row {
  min-width: 0;
}
.lead-filter-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.lead-filter-form .form-control,
.lead-filter-form .form-select,
.lead-filter-form .btn {
  flex: 0 0 auto;
  min-height: 36px !important;
  height: 36px;
  font-size: .85rem;
}
.lead-filter-form .lead-filter-search {
  flex: 1 1 180px;
  min-width: 140px;
  max-width: 260px;
}
.lead-filter-form .form-select {
  width: auto;
  min-width: 120px;
  max-width: 150px;
}
.lead-filter-form .btn {
  white-space: nowrap;
  padding: .25rem .75rem;
}
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.table { margin-bottom: 0; }
.table thead th { white-space: nowrap; font-size: .78rem; color: var(--muted); }
.table td, .table th { vertical-align: middle; }
.quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.quick-actions form { display: inline-flex; margin: 0; vertical-align: middle; }
.quick-actions .btn,
.quick-actions .btn.btn-sm {
  height: 32px;
  min-height: 32px;
  min-width: 0;
  padding: 0 .65rem;
  font-size: .8125rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.quick-actions .btn i { font-size: .875rem; line-height: 1; }
.btn, .form-control, .form-select {
  min-height: 42px;
}
.btn-sm { min-height: 36px; }
.form-label { font-weight: 600; font-size: .88rem; }
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 45%, #06b6d4);
  padding: 1rem;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.badge { font-weight: 600; }
.timeline { border-left: 3px solid #cbd5e1; margin-left: .8rem; padding-left: 1.2rem; }
.timeline-item { position: relative; margin-bottom: 1.2rem; }
.timeline-item::before {
  content: '';
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue);
  position: absolute; left: -1.55rem; top: .35rem;
}

/* Mobile filter / action bars */
.toolbar-mobile {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: stretch;
}
.toolbar-mobile > * { flex: 1 1 auto; }
.nav-pills {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: .35rem;
  padding-bottom: .25rem;
}
.nav-pills .nav-link {
  white-space: nowrap;
  border-radius: 999px;
  padding: .45rem .9rem;
  min-height: 38px;
}
.nav-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-tabs .nav-link { white-space: nowrap; }

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    transition: left .25s ease;
    box-shadow: 8px 0 30px rgba(0,0,0,.25);
  }
  .sidebar.show { left: 0; }
  #sidebarToggle {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Bottom mobile nav for key actions */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: .4rem .35rem calc(.45rem + var(--safe-bottom));
  box-shadow: 0 -8px 24px rgba(15,23,42,.1);
}
.mobile-bottom-nav a {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  padding: .4rem .1rem;
  border-radius: 12px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  -webkit-tap-highlight-color: transparent;
}
.mobile-bottom-nav a span { line-height: 1.1; }
.mobile-bottom-nav a i { font-size: 1.25rem; line-height: 1; }
.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover { color: var(--blue); background: #eff6ff; }
.mobile-bottom-nav a.mobile-nav-call {
  color: #fff;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  margin: 0 .15rem;
  box-shadow: 0 6px 14px rgba(22,163,74,.35);
}
.mobile-bottom-nav a.mobile-nav-call.active,
.mobile-bottom-nav a.mobile-nav-call:hover {
  color: #fff;
  background: linear-gradient(180deg, #16a34a, #15803d);
}

/* Mobile lead cards */
.mobile-lead-list { display: grid; gap: .65rem; }
.mobile-lead-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15,23,42,.05);
}
.mobile-lead-main {
  display: block;
  padding: .85rem .9rem .55rem;
  color: inherit;
}
.mobile-lead-name { font-weight: 700; font-size: 1.02rem; margin-bottom: .15rem; }
.mobile-lead-meta { color: var(--muted); font-size: .86rem; margin-bottom: .45rem; }
.mobile-lead-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.mobile-lead-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .4rem;
  padding: .55rem .7rem .75rem;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.mobile-lead-actions .btn {
  min-height: 44px !important;
  height: 44px;
  padding: 0 .35rem;
  font-size: .82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
}

/* Sticky actions on customer view (mobile) */
.mobile-sticky-actions {
  position: sticky;
  top: 56px;
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .4rem;
  margin: 0 -.75rem .85rem;
  padding: .55rem .75rem;
  background: rgba(241,245,249,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.mobile-sticky-actions .btn {
  min-height: 44px !important;
  height: 44px;
  padding: 0 .2rem;
  font-size: .78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
}

@media (max-width: 991.98px) {
  .mobile-bottom-nav { display: flex; }
}

@media (max-width: 575.98px) {
  .stat-card .label { font-size: .72rem; }
  .login-card { padding: 1.15rem; border-radius: 14px; width: min(100%, 420px); }
  .login-page { padding: .85rem; align-items: flex-start; padding-top: max(1.5rem, env(safe-area-inset-top)); }
  .login-card .form-control,
  .login-card .form-control-lg,
  .login-card .btn,
  .login-card .btn-lg {
    min-height: 48px !important;
    font-size: 16px !important;
  }
  h1.h4, .h4 { font-size: 1.15rem; }
  .pagination { flex-wrap: wrap; }
  .lead-filter-form {
    gap: .4rem;
  }
  .lead-filter-form .lead-filter-search {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
  .lead-filter-form .form-select,
  .lead-filter-form .btn {
    min-height: 44px !important;
    height: 44px;
  }
}

@media (max-width: 767.98px) {
  .content { padding: .75rem; padding-bottom: calc(6.25rem + var(--safe-bottom)); }
  .topbar { padding: .65rem .75rem; }
  .topbar-title { font-size: .95rem; }
  .topbar-user .btn span.user-name { display: none; }
  .stat-card { padding: .75rem .85rem; }
  .stat-card .value { font-size: 1.2rem; }
  .stat-card .icon { width: 34px; height: 34px; font-size: .9rem; }
  .card-soft { border-radius: 12px; }
  .table { font-size: .88rem; }
  .table td, .table th { padding: .55rem .6rem; }
  .btn { font-size: .9rem; }
  .quick-actions .btn,
  .quick-actions .btn.btn-sm { height: 40px; min-height: 40px; min-width: 0; padding: 0 .7rem; }
  .dropdown-menu { min-width: 10rem; }
  .row.g-2 > [class*="col-"],
  .row.g-3 > [class*="col-"] { margin-bottom: 0; }
  form.row.g-2 .col-md-2,
  form.row.g-2 .col-md-3,
  form.row.g-2 .col-md-4 { flex: 0 0 100%; max-width: 100%; }
  .d-flex.gap-2.flex-wrap .btn { flex: 1 1 auto; }
  .alert { font-size: .9rem; }
  /* Prevent iOS zoom on focus */
  .form-control, .form-select, textarea.form-control {
    font-size: 16px !important;
    min-height: 46px;
  }
  .btn:not(.btn-sm) { min-height: 46px; }
  .dash-lead-table .btn-sm,
  .dash-toolbar .btn-sm {
    min-height: 42px !important;
    padding-left: .75rem;
    padding-right: .75rem;
  }
}

/* Call recording floating bar */
.crm-recording-bar {
  position: fixed;
  left: 50%;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1080;
  width: min(520px, calc(100% - 1.5rem));
}
.crm-recording-inner {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  background: #7f1d1d;
  color: #fff;
  border-radius: 999px;
  padding: .55rem .85rem;
  box-shadow: 0 10px 30px rgba(127, 29, 29, .35);
}
.crm-recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fecaca;
  animation: crmRecPulse 1s ease-in-out infinite;
}
@keyframes crmRecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.85); }
}
.crm-recording-label { font-weight: 600; font-size: .9rem; }
.crm-recording-timer { font-variant-numeric: tabular-nums; opacity: .9; margin-right: auto; }
.crm-rec-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
  margin: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .15);
}

@media print {
  .sidebar, .topbar, .no-print, .mobile-bottom-nav, .sidebar-overlay, .mobile-sticky-actions, .crm-recording-bar { display: none !important; }
  .main { width: 100%; }
  .content { padding: 0; }
}
