:root {
  --sidebar-bg: #1A1A1A;
  --sidebar-active: #1B50F5;
  --sidebar-text: #9CA3AF;
  --sidebar-text-active: #FFFFFF;
  --header-bg: #FFFFFF;
  --page-bg: #F0EBE1;
  --card-bg: #FFFFFF;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.07);
  --card-radius: 14px;
  --ink: #1A1612;
  --ink-soft: #6B6057;
  --blue: #1B50F5;
  --blue-h: #0A38D4;
  --gold: #E8A020;
  --sidebar-w: 260px;
  --header-h: 64px;
}

html, body {
  height: 100%;
}

body.app-body {
  font-family: 'Outfit', sans-serif;
  background: var(--page-bg);
  color: var(--ink);
  overflow: hidden;
}

.app * {
  box-sizing: border-box;
}

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  z-index: 50;
}

.sidebar a {
  text-decoration: none;
  color: inherit;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 12px 10px;
}

.sidebar-logo {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--blue);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  overflow-x: hidden;
  align-items: stretch;
}

.nav-item,
.bottom-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: none;
  border: none;
  background: none;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  width: 100%;
  outline: none;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: none;
  font-size: 0.9rem;
}

.nav-item::before,
.nav-item::after {
  content: none !important;
}

.nav-item::before,
.nav-item::after {
  content: none !important;
}

.nav-item svg,
.bottom-nav-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
  display: block;
}

.nav-item span {
  display: inline-block;
}

.nav-item:hover {
  background: none;
  color: var(--sidebar-text);
}

.nav-item.active,
.bottom-nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 600;
}

.nav-item.active svg {
  fill: #fff;
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.855rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.user-pro {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 1px;
}

.user-pro::before {
  content: '●';
  font-size: 0.55rem;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Team read-only banner */
.team-readonly-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(27,80,245,0.07);
  border-bottom: 1px solid rgba(27,80,245,0.18);
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1B50F5;
}

/* Hide edit actions in read-only team view */
.team-lead-readonly #lead-detail-edit,
.team-lead-readonly #lead-detail-schedule,
.team-lead-readonly #lead-detail-status,
.team-lead-readonly #lead-comment-input,
.team-lead-readonly #lead-comment-add,
.team-lead-readonly #lead-visit-outcome,
.team-lead-readonly #lead-deal-close {
  display: none !important;
}

.app-header {
  height: var(--header-h);
  flex-shrink: 0;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(26,22,18,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.header-left .user-welcome {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.header-subtitle {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.header-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header-right .pro-badge {
  background: var(--gold);
  color: #fff;
}

.btn-bell {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(26,22,18,0.18);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-bell svg {
  width: 17px;
  height: 17px;
  fill: var(--ink-soft);
}

.pro-badge {
  background: var(--gold);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 8px;
  letter-spacing: 0.03em;
}

.btn-logout {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 8px 18px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-logout:hover {
  opacity: 0.9;
}

.app-body .btn {
  font-family: 'Outfit', sans-serif;
  border-radius: 9px;
  font-weight: 600;
}

.btn-primary {
  background: var(--blue);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(27,80,245,0.25);
}

.btn-primary:hover {
  background: var(--blue-h);
}

.btn-outline {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(27,80,245,0.08);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 28px;
  background: var(--page-bg);
  overflow-x: hidden;
}

.app-mini-footer {
  margin: 20px 28px 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(26,22,18,0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-mini-footer-copy {
  flex: 1;
  text-align: left;
}

.app-mini-footer-help {
  flex: 1;
  text-align: right;
}

.stats-row .stat-card .stat-value,
.stat-num {
  font-family: 'Playfair Display', serif;
}

.page-content::-webkit-scrollbar {
  width: 5px;
}

.page-content::-webkit-scrollbar-thumb {
  background: rgba(26,22,18,0.15);
  border-radius: 3px;
}

#form-add-lead .lead-type-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

#form-add-lead .lead-type-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}

#form-add-lead input[type="checkbox"],
#form-lead-edit input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.app-reminder-banner {
  margin: 16px 28px 0;
  border: 1px solid rgba(26,22,18,0.12);
  border-radius: 12px;
  background: #E8E2D8;
}

.screen-title,
.page-content h2,
.page-content h3 {
  font-family: 'Playfair Display', serif;
  color: var(--ink);
}

.screen-title {
  font-size: 2rem;
  font-weight: 900;
  text-align: left;
}

.screen-subtitle {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: left;
}

.section-label {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 20px 0 12px;
  text-align: left;
}

.header-theme-wrap,
.theme-select {
  display: none !important;
}

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

.btn-add-prop,
.btn-add-lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.btn-add-prop {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: transparent;
}

.btn-add-lead {
  background: var(--blue);
  color: #fff;
}

.followup-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  background: #E8E2D8;
  border: 1px solid rgba(26,22,18,0.12);
  border-radius: 12px;
  overflow: hidden;
}


.followup-list li {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(26,22,18,0.08);
}

.followup-list li:last-child {
  border-bottom: none;
}

.followup-list .empty-state {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: block;
  background: transparent;
  padding: 22px 18px;
}

/* Follow-ups page */
#view-followups .screen-title,
#view-followups .screen-subtitle {
  text-align: left;
}

#view-followups .screen-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 4px;
}

#view-followups .screen-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  margin-bottom: 20px;
}

#view-followups .followup-task-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border: 1px solid rgba(26,22,18,0.12);
  border-radius: 12px;
  background: #EDE7D9;
  overflow: hidden;
}

#view-followups .followup-task-list li {
  margin: 0;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid rgba(26,22,18,0.08);
  border-radius: 0;
  background: transparent;
}

#view-followups .followup-task-list li:last-child {
  border-bottom: 0;
}

#view-followups .followup-task-list .empty-state {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.875rem;
  padding: 16px 18px;
  background: transparent;
}

#view-followups .followup-history-headbar {
  position: static;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
  min-height: 0;
}

#view-followups .followup-history-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.15;
  position: static;
  left: auto;
  transform: none;
  margin: 0 0 2px;
  text-align: left;
}

#view-followups .followup-history-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#view-followups .followup-history-month {
  min-width: 168px;
  height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(26,22,18,0.16);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 400;
}

#view-followups .followup-history-download-btn {
  min-width: 32px;
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border-width: 1px;
}

#view-followups .followup-history-subtitle {
  margin: 0 0 12px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--ink-soft);
}

#view-followups .followup-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(26,22,18,0.12);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

#view-followups .followup-history-list li {
  margin: 0;
  padding: 13px 20px;
  border: 0;
  border-bottom: 1px solid rgba(26,22,18,0.08);
  border-radius: 0;
  background: transparent;
}

#view-followups .followup-history-list li:last-child {
  border-bottom: 0;
}

#view-followups .followup-history-head {
  margin-bottom: 4px;
}

#view-followups .followup-history-head strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

#view-followups .followup-history-head .muted {
  font-size: 0.7rem;
  color: var(--ink-soft);
}

#view-followups .followup-history-text {
  font-size: 0.78rem;
  font-weight: 300;
  color: #5f554d;
}

/* Profile page */
#view-profile .screen-title,
#view-profile .screen-subtitle {
  text-align: left;
}

#view-profile .screen-title {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}

#view-profile .screen-subtitle {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

#view-profile .profile-card {
  padding: 20px 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(26,22,18,0.1);
}

#view-profile .profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

#view-profile .profile-tab-btn {
  border: 1px solid rgba(26,22,18,0.16);
  background: var(--page-bg);
  color: var(--ink-soft);
  border-radius: 10px;
  min-height: 42px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: none;
}

#view-profile .profile-tab-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 6px 14px rgba(27,80,245,0.2);
}

#view-profile .profile-membership-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(26,22,18,0.1);
}

#view-profile .profile-plan,
#view-profile .profile-renewal {
  font-size: 1.05rem;
  color: #4f5f7a;
  margin: 0 0 2px;
}

#view-profile .profile-plan strong,
#view-profile .profile-renewal strong {
  color: var(--ink);
  font-weight: 700;
}

#view-profile #profile-upgrade-btn {
  min-width: 98px;
  height: 38px;
  border-radius: 10px;
  border-width: 2px;
  font-size: 0.86rem;
  font-weight: 700;
}

#view-profile .billing-card {
  margin-top: 0;
  padding: 14px;
  border-radius: 12px;
  background: #f4f1ea;
  border: 1px solid rgba(26,22,18,0.1);
}

#view-profile .profile-renewal[style*="margin-bottom: 6px"] {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px !important;
}

#view-profile .profile-billing-history {
  gap: 10px;
}

#view-profile .billing-item {
  background: #f4f1ea;
  border: 1px solid rgba(26,22,18,0.1);
  border-radius: 10px;
  padding: 12px 10px;
}

#view-profile .billing-item > div:first-child {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

#view-profile .billing-item .muted {
  color: #59698a;
  font-size: 0.82rem;
  line-height: 1.35;
}

#view-profile .billing-invoice-download {
  margin-top: 10px;
  min-height: 36px;
  border-width: 2px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

#view-profile .profile-tab-panel[data-profile-panel="profile"] label,
#view-profile .profile-tab-panel[data-profile-panel="membership"] label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

#view-profile .profile-tab-panel input,
#view-profile .profile-tab-panel select,
#view-profile .profile-tab-panel textarea {
  border: 1px solid rgba(26,22,18,0.15);
  border-radius: 10px;
  background: #fff;
}

#view-profile #form-profile .btn-primary {
  margin-top: 10px;
  min-height: 42px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

#view-profile #form-profile label {
  font-size: 0.6rem;
  letter-spacing: 0.07em;
}

#view-profile #form-profile input,
#view-profile #form-profile select,
#view-profile #form-profile textarea {
  font-size: 0.78rem;
  padding: 7px 11px;
}

#view-profile #form-profile textarea {
  min-height: 52px;
}

#view-profile #form-profile .btn-primary {
  min-height: 40px;
  font-size: 0.9rem;
}

#view-profile .team-seat-actions .btn {
  margin-top: 12px;
}

#view-profile .team-card-note {
  text-align: left;
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

#view-profile .team-pending-title {
  margin-top: 16px;
}

#view-profile .team-invite-helper {
  margin: 8px 0 0;
  font-size: 0.76rem;
  text-align: right;
  max-width: 220px;
}

#view-profile .team-member-actions .btn,
#view-profile .team-item-actions .btn {
  min-width: 96px;
  height: 34px;
  padding: 0 12px;
  border-width: 2px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 20px 22px;
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lead-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.lead-preview-list .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 18px 20px;
  border: 1px solid rgba(26,22,18,0.08);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.lead-preview-list li {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 16px 18px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(26,22,18,0.08);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 168px;
}

.lead-preview-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(26,22,18,0.12);
}

/* Leads search & filter card */
.leads-filter-card {
  background: #E8E2D8;
  border: 1px solid rgba(26,22,18,0.12);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leads-search-full {
  width: 100%;
  box-sizing: border-box;
  flex: none;
}

.leads-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.leads-filter-row .filter-select {
  flex: 1 1 120px;
}

.leads-filter-sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.leads-filter-sort-row .leads-total-label {
  margin-right: auto;
}

.leads-filter-sort-row .filter-select {
  min-width: 150px;
}

.lead-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lead-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.lead-head-right-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lead-forwarded-from {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 400;
  opacity: 0.55;
  white-space: nowrap;
  margin-top: 6px;
}

.lead-forward-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lead-forward-icon-btn svg {
  width: 13px;
  height: 13px;
}

.lead-forward-icon-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.lead-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.lead-phone {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 2px;
  margin-bottom: 8px;
  display: block;
}

.lead-area {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 3px;
  display: block;
}

.lead-budget {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
}

.dashboard-lead-followup {
  font-size: 0.74rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(26,22,18,0.1);
  width: 100%;
}

.dashboard-lead-followup.has-date::before {
  content: '📅';
  font-size: 0.85rem;
}

.dashboard-lead-followup:not(.has-date) {
  opacity: 0.45;
}

.card,
.stat-card,
.lead-card,
.bulk-upload-section,
.today-empty,
.profile-card,
.app-table,
.team-card,
.followup-card,
.visit-card,
.app-confirm-card,
.lead-card-list li,
.lead-detail-card,
.lead-edit-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(26,22,18,0.08);
}

.lead-card-list li {
  display: flex;
  flex-direction: column;
  min-height: 160px;
}

#leads-list.lead-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 14px;
}

#leads-list.lead-card-list .lead-meta {
  margin-bottom: 8px;
}

#leads-list.lead-card-list .lead-followup {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(26,22,18,0.1);
  width: 100%;
  font-size: 0.74rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#leads-list.lead-card-list .lead-followup .muted {
  color: inherit;
  font-size: inherit;
}

#leads-list.lead-card-list .lead-followup.has-date::before {
  content: '📅';
  font-size: 0.85rem;
}

#leads-list.lead-card-list .lead-followup:not(.has-date) {
  opacity: 0.45;
}

#leads-list.lead-card-list li {
  margin-bottom: 0;
  min-width: 0;
}

#view-cold-callers .cold-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

#view-cold-callers .screen-subtitle {
  max-width: 640px;
}

#view-cold-callers .cold-toolbar .search-input {
  height: 40px;
  padding: 0 14px;
  font-size: 0.95rem;
  border-radius: 10px;
}

#view-cold-callers .cold-delete-all-btn {
  border-color: #f5b6b0;
  color: #ef4444;
  background: transparent;
}

#view-cold-callers .cold-delete-all-btn:hover {
  background: #fff0f0;
}

#view-cold-callers .cold-total-row {
  justify-content: flex-start;
  margin-top: -4px;
}

#view-cold-callers .cold-file-upload-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

#view-cold-callers .pro-badge-header {
  align-items: flex-start;
}

#view-cold-callers .pro-badge-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

#view-cold-callers .pro-badge-header .badge {
  background: var(--gold);
  color: #fff;
  margin-top: 2px;
}

#view-add-lead #add-lead-bulk-upload-section .pro-badge-header,
#view-add-lead #add-lead-99acres-section .pro-badge-header {
  align-items: flex-start;
}

#view-add-lead #add-lead-bulk-upload-section .pro-badge-header h3,
#view-add-lead #add-lead-99acres-section .pro-badge-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

#view-add-lead #add-lead-bulk-upload-section .pro-badge-header .badge,
#view-add-lead #add-lead-99acres-section .pro-badge-header .badge {
  background: var(--gold);
  color: #fff;
  margin-top: 2px;
}

#view-add-lead #add-lead-bulk-upload-section .file-upload-wrapper,
#view-add-lead #add-lead-99acres-section .file-upload-wrapper {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

#view-add-lead #add-lead-bulk-upload-section .file-input,
#view-add-lead #add-lead-99acres-section .file-input {
  margin-bottom: 0;
  height: 40px;
  border-radius: 10px;
  border-style: solid;
  border-color: rgba(26,22,18,0.15);
  padding: 8px 12px;
  background: #f0ebe3;
  font-size: 0.9rem;
}

#view-add-lead #add-lead-bulk-upload-section .file-input::file-selector-button,
#view-add-lead #add-lead-99acres-section .file-input::file-selector-button {
  display: none;
}

#view-add-lead #add-lead-bulk-upload-section .file-input::-webkit-file-upload-button,
#view-add-lead #add-lead-99acres-section .file-input::-webkit-file-upload-button {
  display: none;
}

#view-add-lead #add-lead-bulk-upload-section #btn-upload-csv,
#view-add-lead #add-lead-99acres-section #btn-parse-acres-csv {
  min-width: 126px;
  height: 40px;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0 16px;
  border-width: 2px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#view-cold-callers .cold-file-upload-row .file-input {
  margin-bottom: 0;
  height: 40px;
  border-radius: 10px;
  border-style: solid;
  border-color: rgba(26,22,18,0.15);
  padding: 8px 12px;
  background: #f0ebe3;
  font-size: 0.9rem;
}

#view-cold-callers .cold-file-upload-row .file-input::file-selector-button {
  display: none;
}

#view-cold-callers .cold-file-upload-row .file-input::-webkit-file-upload-button {
  display: none;
}

#view-cold-callers .cold-file-upload-row #btn-upload-cold-csv {
  min-width: 126px;
  height: 40px;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0 16px;
  border-width: 2px;
  border-radius: 10px;
}

#cold-callers-list.cold-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 10px;
}

#cold-callers-list.cold-card-list li {
  margin-bottom: 0;
  padding: 13px 14px;
  min-height: auto;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(26,22,18,0.08);
}

#cold-callers-list .cold-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}

#cold-callers-list .cold-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

#cold-callers-list .cold-phone {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 1px;
}

#cold-callers-list .btn-del-card {
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid rgba(26,22,18,0.18);
  color: #6b6057;
  background: transparent;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

#cold-callers-list .btn-del-card:hover {
  background: #f5f5f5;
}

#cold-callers-list .cold-actions {
  display: flex;
  gap: 5px;
}

#cold-callers-list .btn-call,
#cold-callers-list .btn-whatsapp,
#cold-callers-list .btn-convert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 9px;
  min-height: 34px;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  font-weight: 700;
  padding: 0 10px;
  white-space: nowrap;
  cursor: pointer;
}

#cold-callers-list .btn-call {
  flex: 1;
}

#cold-callers-list .btn-whatsapp {
  flex: 1.2;
}

#cold-callers-list .btn-convert {
  flex: 2;
}

#cold-callers-list .btn-call {
  border: 1px solid rgba(26,22,18,0.2);
  color: #6b6057;
  background: transparent;
  padding-left: 6px;
  padding-right: 6px;
}

#cold-callers-list .btn-whatsapp {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: transparent;
  padding-left: 6px;
  padding-right: 6px;
}

#cold-callers-list .btn-convert {
  border: none;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 10px rgba(27,80,245,0.18);
}

#cold-callers-list .btn-convert[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* Lead detail overlay (match new theme) */
.view.overlay {
  background: var(--page-bg);
}

.view.overlay .overlay-header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(26,22,18,0.08);
  padding: 14px 20px;
}

.view.overlay .back-btn {
  font-family: 'Outfit', sans-serif;
  color: var(--blue);
  font-weight: 600;
}

.view.overlay .overlay-body {
  padding: 22px 20px 28px;
}

.lead-detail-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 14px;
}

.lead-detail-summary {
  gap: 10px;
  margin-bottom: 22px;
}

.lead-detail-row {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.lead-detail-icon {
  color: var(--blue);
}

.lead-detail-label {
  color: var(--ink);
  font-weight: 600;
}

.lead-detail-value {
  color: var(--ink-soft);
}

#view-lead-detail .lead-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}

#view-lead-detail .lead-detail-actions .btn {
  min-width: 0;
}

#view-lead-detail .lead-detail-actions .btn-ghost {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-weight: 600;
  justify-content: center;
}

#view-lead-detail .field label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

#view-lead-detail select,
#view-lead-detail input,
#view-lead-detail textarea {
  background: #fff;
  border: 1px solid rgba(26,22,18,0.15);
  border-radius: 10px;
}

#view-lead-detail .lead-history-list {
  border-radius: 12px;
  border: 1px solid rgba(26,22,18,0.1);
  background: #F6F2EA;
}

#view-lead-detail .lead-history-list li {
  border-bottom: 1px solid rgba(26,22,18,0.08);
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 12px 14px;
}

#view-lead-detail .lead-history-list li:last-child {
  border-bottom: none;
}

.mobile-only {
  display: none;
}

.btn-menu {
  display: none;
}

.bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  .lead-preview-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .mobile-only { display: flex; }
  .btn-menu { display: inline-flex; align-items: center; justify-content: center; }
  .app { height: auto; min-height: 100vh; overflow: visible; }
  body.app-body { overflow: visible; }
  .main { overflow: visible; }
  .page-content { padding-bottom: 90px; }
  .app-header {
    padding: 10px 16px;
    height: auto;
    align-items: flex-start;
  }
  .header-left .user-welcome {
    font-size: 1.2rem;
  }
  .header-right {
    gap: 8px;
    flex-wrap: wrap;
  }
  .qa-btns { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-preview-list { grid-template-columns: 1fr; }
  #leads-list.lead-card-list { grid-template-columns: 1fr !important; }
  #cold-callers-list.cold-card-list { grid-template-columns: 1fr; }
  #view-cold-callers .cold-toolbar { grid-template-columns: 1fr; }
  #view-cold-callers .cold-file-upload-row { grid-template-columns: 1fr; }
  #view-add-lead #add-lead-bulk-upload-section .file-upload-wrapper,
  #view-add-lead #add-lead-99acres-section .file-upload-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .bottom-nav.mobile-only {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 78px;
    background: var(--sidebar-bg);
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
    justify-content: space-around;
    align-items: center;
    padding: 12px 12px 12px;
    box-sizing: border-box;
    z-index: 60;
  }

  .bottom-nav.mobile-only .bottom-nav-item {
    flex: 1;
    flex-direction: column;
    padding: 8px 6px;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sidebar-text);
    border-radius: 10px;
  }

  .bottom-nav.mobile-only .bottom-nav-item:hover {
    background: transparent;
    color: var(--sidebar-text);
  }

  .bottom-nav.mobile-only .bottom-nav-item.active {
    background: #1B50F5;
    color: #fff;
  }

  .bottom-nav.mobile-only .nav-icon {
    width: 18px;
    height: 18px;
  }

  .bottom-nav.mobile-only .nav-label {
    font-size: inherit;
    letter-spacing: 0;
    color: inherit;
  }

  .bottom-nav.mobile-only .nav-icon svg {
    fill: currentColor;
  }
}

/* Leads layout toggle */
.leads-layout-toggle {
  display: flex;
  gap: 2px;
  margin-left: 4px;
}
.layout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 6px;
  background: transparent;
  color: var(--muted-color, #888);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.layout-btn:hover {
  background: var(--hover-bg, #f0f0f0);
  color: var(--text-color, #333);
}
.layout-btn.active {
  background: var(--primary, #1B50F5);
  border-color: var(--primary, #1B50F5);
  color: #fff;
}

/* Leads table view */
.leads-table-wrapper {
  overflow-x: auto;
  margin-bottom: 12px;
}
.leads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 0.88rem;
}
.leads-table thead th {
  text-align: left;
  padding: 4px 14px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft, #888);
  white-space: nowrap;
}
.leads-table tbody tr {
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  border-radius: var(--card-radius);
  cursor: pointer;
  transition: box-shadow 0.12s;
}
.leads-table tbody tr:hover {
  box-shadow: 0 2px 12px rgba(26,22,18,0.12);
}
.leads-table tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  border-top: 1px solid rgba(26,22,18,0.08);
  border-bottom: 1px solid rgba(26,22,18,0.08);
}
.leads-table tbody td:first-child {
  border-left: 1px solid rgba(26,22,18,0.08);
  border-radius: var(--card-radius) 0 0 var(--card-radius);
}
.leads-table tbody td:last-child {
  border-right: 1px solid rgba(26,22,18,0.08);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
}
