:root {
  --navy: #123a59;
  --navy-deep: #0c2a43;
  --blue: #21628d;
  --gold: #c79a46;
  --red: #a6263e;
  --ink: #193247;
  --muted: #6b7e8e;
  --line: #e3eaf0;
  --canvas: #f4f7fa;
  --white: #fff;
  --shadow: 0 12px 36px rgba(16, 44, 68, .055);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 15px; }
a { color: var(--blue); }
.app-topbar { position: sticky; z-index: 100; top: 0; color: #fff; background: var(--navy-deep); box-shadow: 0 5px 20px rgba(8, 35, 56, .16); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1240px, calc(100% - 40px)); min-height: 76px; margin: auto; }
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-lockup img { width: 48px; height: 48px; border: 2px solid rgba(255,255,255,.78); border-radius: 50%; object-fit: cover; background: #fff; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { letter-spacing: .075em; font-size: 13px; }
.brand-copy small { margin-top: 5px; color: #b9c9d4; font-size: 9px; letter-spacing: .11em; }
.topbar-user { display: flex; align-items: center; gap: 13px; }
.topbar-links { display: flex; align-items: center; gap: 15px; margin-left: auto; padding: 0 16px; }
.topbar-links a { color: #d7e2e9; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.topbar-links a:hover { color: #fff; }
.user-copy { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.user-copy strong { font-size: 13px; }
.user-copy small { margin-top: 4px; color: #bed0db; font-size: 11px; }
.topbar-user form { margin: 0; }
.password-link { white-space: nowrap; }
.app-main { width: min(1240px, calc(100% - 40px)); min-height: calc(100vh - 128px); margin: 0 auto; padding: 34px 0 72px; }
.app-footer { padding: 20px; color: #7d8d99; text-align: center; font-size: 12px; }
.app-footer span { padding: 0 5px; color: var(--gold); }
.page-heading, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-heading { margin: 0 0 25px; }
.page-heading h1, .section-heading h2, .section-heading h1 { margin: 5px 0 7px; color: var(--navy-deep); font-weight: 700; letter-spacing: -.035em; }
.page-heading h1 { font-size: clamp(28px, 4vw, 36px); }
.page-heading p, .section-heading p { margin: 0; color: var(--muted); }
.eyebrow { display: block; color: #72889a; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-deep); --bs-btn-hover-border-color: var(--navy-deep); --bs-btn-active-bg: var(--navy-deep); --bs-btn-active-border-color: var(--navy-deep); }
.btn-outline-primary { --bs-btn-color: var(--navy); --bs-btn-border-color: #b9cad6; --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); --bs-btn-active-bg: var(--navy); }
.button-plus { margin-right: 5px; font-size: 18px; line-height: .8; vertical-align: -1px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card { position: relative; overflow: hidden; min-height: 144px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.metric-card::after { position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--blue); content: ""; }
.metric-green::after { background: #34816a; }
.metric-red::after { background: var(--red); }
.metric-gold::after { background: var(--gold); }
.metric-label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.metric-value { display: block; margin-top: 10px; color: var(--navy-deep); font-size: 34px; line-height: 1; letter-spacing: -.05em; }
.metric-hint { display: block; margin-top: 10px; color: #8a99a4; font-size: 11px; }
.content-panel { margin: 0 0 22px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow); }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { font-size: 21px; }
.section-heading p { font-size: 13px; }
.search-form { display: flex; align-items: center; gap: 8px; width: min(100%, 430px); }
.search-form .form-control { min-width: 120px; }
.leads-table { min-width: 760px; margin: 0; }
.leads-table > :not(caption) > * > * { padding: 14px 12px; border-bottom-color: #edf1f4; }
.leads-table thead th, .user-table thead th { color: #82919d; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.client-name { color: var(--ink); font-size: 13px; font-weight: 700; }
.client-phone { display: inline-block; margin-top: 3px; color: #708393; font-size: 12px; text-decoration: none; }
.client-phone:hover { color: var(--blue); text-decoration: underline; }
.remark-cell { max-width: 220px; color: #667b8a; font-size: 12px; }
.table-date { color: #617686; font-size: 12px; white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border: 1px solid transparent; border-radius: 100px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-new { color: #405a6c; border-color: #dbe5eb; background: #f2f6f8; }
.status-interested { color: #21684f; border-color: #c8e4d8; background: #eaf6f0; }
.status-not-interested { color: #963d4c; border-color: #efd0d5; background: #fcf0f1; }
.status-meeting { color: #775c21; border-color: #f0dfb2; background: #fff8e7; }
.status-later { color: #4e6288; border-color: #d5dcf0; background: #f1f3fb; }
.status-converted { color: #fff; border-color: #34816a; background: #34816a; }
.priority-label { display: inline-flex; padding: 4px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.priority-hot { color: #9a3345; background: #fcebed; }
.priority-warm { color: #8a6222; background: #fff3d9; }
.priority-cold { color: #47617b; background: #e9f0f5; }
.source-label { color: #617889; font-size: 11px; }
.lead-extra { margin-top: 3px; color: #80919d; font-size: 10px; }
.history-link { font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.lead-select-label { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #617889; font-size: 11px; }
.lead-select-label .form-check-input { margin: 0; }
.select-column { width: 34px; text-align: center; }
.select-column .form-check-input { margin: 0; }
.lead-card-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #edf1f4; }
.lead-card-details div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.lead-card-details span { color: #8494a0; font-size: 10px; }
.lead-card-details strong { overflow-wrap: anywhere; color: #435c6e; font-size: 11px; font-weight: 600; }
.lead-card-actions { display: flex; gap: 8px; }
.lead-card-actions > * { flex: 1; }
.lead-cards { display: none; }
.empty-state { padding: 42px 16px; text-align: center; }
.empty-mark { display: grid; width: 40px; height: 40px; place-items: center; margin: 0 auto 11px; border-radius: 50%; color: var(--navy); background: #eef3f6; font-size: 21px; }
.empty-state strong { display: block; color: var(--navy-deep); }
.empty-state p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.sticky-add { display: none; }
.modal-content { overflow: hidden; border: 0; border-radius: 17px; box-shadow: 0 24px 75px rgba(12, 42, 67, .24); }
.modal-header, .modal-footer { padding: 17px 21px; border-color: var(--line); }
.modal-header h2 { margin: 5px 0 0; color: var(--navy-deep); font-weight: 700; }
.modal-body { padding: 20px 21px; }
.modal-lead-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.form-label { margin-bottom: 6px; color: #324b5e; font-size: 12px; font-weight: 650; }
.form-control, .form-select { border-color: #d9e2e9; border-radius: 9px; color: var(--ink); font-size: 14px; }
.form-control:focus, .form-select:focus { border-color: #789ab1; box-shadow: 0 0 0 .2rem rgba(33, 98, 141, .11); }
.form-control::placeholder { color: #9ba8b2; }
.optional-label { color: #93a0a9; font-size: 10px; font-weight: 500; }
.form-hint { margin: 0; color: var(--muted); font-size: 12px; }
.filter-form { min-width: 220px; }
.filter-form .form-label { display: block; }
.team-total-pill { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid #dfe7ec; border-radius: 12px; color: var(--muted); background: #fff; font-size: 12px; }
.team-total-pill strong { color: var(--navy); font-size: 22px; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.team-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.team-card-heading { display: flex; align-items: center; gap: 10px; }
.team-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-size: 15px; font-weight: 700; }
.team-title { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.team-title strong { color: var(--navy-deep); font-size: 14px; }
.team-title span { color: var(--muted); font-size: 11px; }
.account-state { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 100px; font-size: 10px; font-weight: 700; }
.state-active { color: #21684f; background: #eaf6f0; }
.state-inactive { color: #963d4c; background: #fcf0f1; }
.team-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.team-card-stats div { display: flex; flex-direction: column; gap: 4px; }
.team-card-stats strong { color: var(--navy-deep); font-size: 20px; letter-spacing: -.03em; }
.team-card-stats span { color: var(--muted); font-size: 10px; }
.team-card-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 12px; border-top: 1px solid #edf1f4; color: #7b8d99; font-size: 11px; }
.section-tabs { display: flex; gap: 20px; margin: 3px 0 16px; border-bottom: 1px solid #dce5eb; }
.section-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 1px; color: #718494; font-size: 13px; font-weight: 600; text-decoration: none; }
.section-tab.active { color: var(--navy); }
.section-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--gold); content: ""; }
.section-tab span { padding: 2px 6px; border-radius: 50px; background: #edf2f5; font-size: 10px; }
.anchor-section { scroll-margin-top: 93px; }
.user-section-heading { align-items: center; }
.user-table { min-width: 930px; margin: 0; }
.user-table > :not(caption) > * > * { padding: 12px 9px; border-bottom-color: #edf1f4; }
.role-label { color: var(--navy); font-size: 12px; font-weight: 700; }
.role-form { display: flex; align-items: center; gap: 6px; min-width: 440px; }
.role-form .form-select { width: 125px; }
.role-form .js-reporting-tl { width: 145px; }
.role-form [hidden] { display: none; }
.inline-form { margin: 0; }
.team-section-heading { align-items: flex-end; }
.lead-filter-form { display: grid; grid-template-columns: minmax(190px, 1.35fr) repeat(4, minmax(130px, 1fr)) auto; align-items: end; gap: 10px; margin: 0 0 17px; padding: 14px; border: 1px solid #edf1f4; border-radius: 12px; background: #fbfcfd; }
.lead-filter-form .form-label { display: block; }
.filter-field { min-width: 0; }
.filter-field .form-control, .filter-field .form-select { min-height: 39px; font-size: 12px; }
.filter-actions { display: flex; gap: 6px; }
.filter-actions .btn { min-height: 39px; font-size: 12px; white-space: nowrap; }
.reassign-toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #dce8ee; border-radius: 12px; background: #f6fafc; }
.reassign-copy { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.reassign-copy strong { color: var(--navy); font-size: 12px; }
.reassign-copy span, .reassign-policy { color: var(--muted); font-size: 10px; }
.reassign-toolbar .form-select { width: min(260px, 32vw); min-height: 39px; font-size: 12px; }
.reassign-toolbar .btn { white-space: nowrap; }
.reassign-policy { margin: 0 0 10px; }
.performance-panel { overflow: hidden; }
.performance-table { min-width: 730px; margin: 0; }
.performance-table > :not(caption) > * > * { padding: 13px 11px; border-bottom-color: #edf1f4; font-size: 12px; }
.performance-table thead th { color: #82919d; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.performance-table td strong { color: var(--navy-deep); }
.conversion-pill { padding: 5px 8px; border-radius: 99px; color: #22644e; background: #eaf6f0; font-size: 11px; font-weight: 700; }
.rank-number { display: inline-grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: var(--navy); background: #edf3f6; font-size: 11px; font-weight: 700; }
.performance-cards { display: none; }
.admin-quick-stats { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 15px; margin: -7px 0 19px; padding: 13px 16px; border: 1px solid #e2eaf0; border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.admin-quick-stats > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-quick-stats span { color: var(--muted); font-size: 11px; }
.admin-quick-stats strong { color: var(--navy); font-size: 19px; }
.admin-quick-stats > a { font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.admin-quick-stats > a span { color: var(--gold); font-size: 16px; }
.heading-actions { display: flex; gap: 8px; }
.heading-actions .btn { white-space: nowrap; }
.upload-layout { display: grid; gap: 16px; }
.upload-panel, .upload-preview-panel { margin-bottom: 0; }
.upload-drop { padding: 17px; border: 1px dashed #b6c8d3; border-radius: 12px; background: #f9fbfc; }
.upload-drop .form-hint { margin-top: 9px; line-height: 1.5; }
.upload-preview-table { min-width: 570px; }
.distribution-form { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 13px; margin-top: 16px; }
.distribution-form .btn { grid-column: 1 / -1; }
.upload-target-pill { display: flex; flex-direction: column; gap: 4px; padding: 9px 11px; border: 1px solid #dce6ec; border-radius: 9px; background: #f6f9fb; }
.upload-target-pill span { color: var(--muted); font-size: 10px; }
.upload-target-pill strong { color: var(--navy); font-size: 13px; }
.admin-lead-heading { margin: 21px 0 0; }
.history-lead-card { padding: 20px; }
.history-client-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.history-client-head h2 { margin: 5px 0 0; color: var(--navy-deep); font-size: 23px; font-weight: 700; }
.history-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf1f4; }
.history-summary div { display: flex; flex-direction: column; gap: 4px; }
.history-summary span { color: #85949f; font-size: 10px; }
.history-summary strong { color: #405a6c; font-size: 12px; font-weight: 600; }
.history-timeline { position: relative; margin: 2px 0 0 6px; padding-left: 22px; border-left: 1px solid #dce5eb; }
.history-event { position: relative; margin: 0 0 23px; padding: 0 0 2px; }
.history-event:last-child { margin-bottom: 0; }
.history-dot { position: absolute; top: 3px; left: -28px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px #d7e2e9; }
.history-event-assignment .history-dot { background: var(--blue); }
.history-event-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.history-event-head > div { display: flex; flex-direction: column; gap: 3px; }
.history-event-head strong { color: var(--navy); font-size: 13px; }
.history-event-head span, .history-event time { color: #82919d; font-size: 10px; }
.history-status { display: flex; align-items: center; gap: 8px; margin: 9px 0; }
.history-arrow { color: #9aa7b0; }
.history-event p { margin: 8px 0 0; color: #556c7c; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.history-followup { margin-top: 7px; color: #6c812c; font-size: 11px; font-weight: 600; }
.required-label { color: #a6263e; font-size: 10px; }
.update-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.update-grid-wide { grid-column: 1 / -1; }
.mobile-add-inline { display: none; }
@media (max-width: 680px) {
  .topbar-inner { flex-wrap: wrap; }
  .topbar-links { gap: 9px; margin-left: 0; padding: 0; }
  .topbar-links a { font-size: 10px; }
  .topbar-user { margin-left: auto; }
  .page-heading .heading-actions { align-items: flex-end; flex-direction: column; }
  .heading-actions .btn { padding: 7px 9px; font-size: 11px; }
  .admin-quick-stats { grid-template-columns: 1fr 1fr; gap: 9px; padding: 12px; }
  .admin-quick-stats > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .admin-quick-stats > a { grid-column: 1 / -1; padding-top: 5px; }
  .lead-filter-form { grid-template-columns: 1fr 1fr; gap: 10px; padding: 11px; }
  .lead-filter-form .filter-phone { grid-column: 1 / -1; }
  .filter-actions { grid-column: 1 / -1; }
  .filter-actions .btn { flex: 1; }
  .reassign-toolbar { align-items: stretch; flex-direction: column; gap: 8px; padding: 12px; }
  .reassign-toolbar .form-select { width: 100%; }
  .performance-panel .leads-table-wrap { display: none; }
  .performance-cards { display: grid; gap: 9px; }
  .performance-card { padding: 13px; border: 1px solid #e7edf1; border-radius: 12px; background: #fff; }
  .performance-card > div:first-child { display: flex; flex-direction: column; gap: 4px; }
  .performance-card > div:first-child strong { color: var(--navy-deep); font-size: 13px; }
  .performance-card > div:first-child > span { color: var(--muted); font-size: 10px; }
  .performance-card dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 0; padding-top: 11px; border-top: 1px solid #edf1f4; }
  .performance-card dl div { display: flex; flex-direction: column; gap: 4px; }
  .performance-card dt { color: #82919d; font-size: 9px; font-weight: 500; }
  .performance-card dd { margin: 0; color: var(--navy); font-size: 14px; font-weight: 700; }
  .distribution-form { grid-template-columns: 1fr; }
  .distribution-form .btn { grid-column: 1; }
  .history-summary { grid-template-columns: 1fr 1fr; }
  .history-event-head { flex-direction: column; }
  .update-grid { grid-template-columns: 1fr; }
  .update-grid-wide { grid-column: 1; }
  .mobile-add-inline { display: inline-flex; align-items: center; white-space: nowrap; }
  .upload-preview-panel .leads-table-wrap { display: block; }
}
.alert { border: 0; border-radius: 10px; font-size: 13px; }
.back-link { display: inline-block; margin-bottom: 18px; font-size: 13px; text-decoration: none; }
.password-panel { max-width: 680px; margin: 0 auto; }
.password-form { max-width: 440px; }

/* Sign-in and registration */
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; max-width: 940px; min-height: 560px; margin: 18px auto 0; overflow: hidden; border: 1px solid #e0e8ee; border-radius: 20px; background: #fff; box-shadow: 0 22px 70px rgba(13, 42, 64, .11); }
.auth-panel { padding: clamp(27px, 5vw, 56px); }
.auth-intro { display: flex; flex-direction: column; justify-content: center; color: #fff; background: radial-gradient(circle at 90% 7%, rgba(199,154,70,.27), transparent 35%), linear-gradient(145deg, #164968, #0b2943 78%); }
.auth-intro .eyebrow { color: #d8bd88; }
.auth-intro h1 { margin: 19px 0 14px; font-size: clamp(28px, 4vw, 41px); font-weight: 700; line-height: 1.12; letter-spacing: -.04em; }
.auth-intro p { max-width: 315px; margin: 0; color: #c1d0d9; line-height: 1.65; }
.auth-rule { width: 46px; height: 2px; margin: 37px 0 18px; background: var(--gold); }
.auth-note { display: flex; align-items: center; gap: 9px; color: #d7e1e7; font-size: 12px; }
.signal-dot { width: 7px; height: 7px; border-radius: 50%; background: #d5ad5c; box-shadow: 0 0 0 4px rgba(213,173,92,.14); }
.auth-form-panel { align-self: center; }
.auth-heading { margin-bottom: 24px; }
.auth-heading h2 { margin: 7px 0; color: var(--navy-deep); font-size: 25px; font-weight: 700; letter-spacing: -.03em; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.auth-switch { margin: 22px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.auth-switch a { font-weight: 700; text-decoration: none; }
.auth-shell-register { min-height: 660px; }

@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid { grid-template-columns: 1fr; }
  .role-form { min-width: 420px; }
}
@media (max-width: 680px) {
  body { font-size: 14px; }
  .topbar-inner { width: calc(100% - 28px); min-height: 66px; }
  .brand-lockup { gap: 8px; }
  .brand-lockup img { width: 39px; height: 39px; }
  .brand-copy strong { font-size: 11px; }
  .brand-copy small { font-size: 8px; }
  .topbar-user { gap: 8px; }
  .user-copy { display: none; }
  .topbar-user .btn { padding: 5px 8px; font-size: 11px; }
  .password-link { display: none; }
  .app-main { width: calc(100% - 28px); min-height: calc(100vh - 116px); padding: 24px 0 82px; }
  .page-heading { align-items: flex-start; margin-bottom: 19px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { max-width: 280px; font-size: 13px; line-height: 1.45; }
  .desktop-add { display: none; }
  .metric-grid { gap: 10px; margin-bottom: 16px; }
  .metric-card { min-height: 118px; padding: 15px 14px; border-radius: 12px; }
  .metric-label { font-size: 11px; }
  .metric-value { margin-top: 10px; font-size: 29px; }
  .metric-hint { margin-top: 7px; font-size: 10px; line-height: 1.2; }
  .content-panel { padding: 17px 14px; border-radius: 14px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-heading h2 { font-size: 19px; }
  .search-form { width: 100%; }
  .search-form .btn { padding: 7px 9px; font-size: 12px; }
  .search-form .form-control { min-width: 0; font-size: 13px; }
  .leads-table-wrap { display: none; }
  .lead-cards { display: grid; gap: 10px; }
  .lead-card { padding: 14px; border: 1px solid #e7edf1; border-radius: 12px; background: #fff; }
  .lead-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
  .lead-card .client-name { font-size: 14px; }
  .lead-card .client-phone { padding: 2px 0; font-size: 13px; }
  .lead-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #edf1f4; }
  .lead-card-meta div { display: flex; flex-direction: column; gap: 4px; }
  .lead-card-meta span { color: #8494a0; font-size: 10px; }
  .lead-card-meta strong { color: #435c6e; font-size: 11px; font-weight: 600; }
  .lead-card-remark { margin: 11px 0; color: #697e8d; font-size: 12px; line-height: 1.45; }
  .lead-card-agent { margin-top: 7px; color: var(--muted); font-size: 11px; }
  .sticky-add { position: fixed; z-index: 80; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); left: 0; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
  .sticky-add .btn { width: min(100%, 430px); min-height: 52px; border-radius: 13px; box-shadow: 0 10px 28px rgba(12,42,67,.26); font-weight: 650; pointer-events: auto; }
  .filter-form { width: 100%; }
  .team-total-pill { align-self: flex-start; }
  .team-card { padding: 14px; }
  .team-card-stats { gap: 7px; }
  .team-card-stats strong { font-size: 18px; }
  .team-card-stats span { font-size: 9px; }
  .section-tabs { gap: 16px; overflow-x: auto; }
  .section-tab { flex: 0 0 auto; font-size: 12px; }
  .user-section-heading .btn { width: 100%; }
  .user-table-wrap { display: block; max-width: 100%; }
  .user-table { min-width: 860px; }
  .role-form { min-width: 430px; }
  .auth-shell { display: block; min-height: auto; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .auth-intro { min-height: 185px; padding: 27px 24px; }
  .auth-intro h1 { margin: 10px 0; font-size: 26px; }
  .auth-intro p { font-size: 13px; }
  .auth-rule, .auth-note { display: none; }
  .auth-form-panel { margin: 14px 0 0; padding: 24px 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
  .auth-heading h2 { font-size: 23px; }
  .auth-shell-register .auth-intro { min-height: 150px; }
  .password-panel { margin-top: 0; }
}
@media (max-width: 390px) {
  .topbar-inner { width: calc(100% - 20px); }
  .brand-lockup img { width: 35px; height: 35px; }
  .brand-copy small { letter-spacing: .06em; }
  .topbar-user .btn { padding: 5px 7px; }
  .app-main { width: calc(100% - 20px); }
  .metric-card { padding: 13px 11px; }
  .metric-value { font-size: 26px; }
}

.followup-reminder-panel {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) repeat(2, minmax(145px, .8fr));
  gap: 11px;
  align-items: stretch;
  margin: 0 0 18px;
  padding: 15px;
  border: 1px solid #dce7ed;
  border-radius: 15px;
  background: #f7fafc;
}
.followup-reminder-intro { display: flex; flex-direction: column; justify-content: center; padding: 2px 8px; }
.followup-reminder-intro .eyebrow { color: #8b7040; }
.followup-reminder-intro h2 { margin: 4px 0 5px; color: var(--navy-deep); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.followup-reminder-intro p { margin: 0; color: #718494; font-size: 11px; line-height: 1.45; }
.followup-reminder-count {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 115px;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.followup-reminder-count:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(23, 56, 77, .08); }
.followup-reminder-overdue { border-color: #f0dddc; background: #fff5f3; }
.followup-reminder-today { border-color: #dbe7ee; background: #edf5f9; }
.followup-reminder-count > span { color: #6e7f8b; font-size: 11px; font-weight: 650; }
.followup-reminder-count strong { margin-top: 2px; color: var(--navy-deep); font-size: 28px; line-height: 1.15; }
.followup-reminder-overdue strong { color: #a84643; }
.followup-reminder-count small { display: flex; justify-content: space-between; gap: 10px; width: 100%; margin-top: auto; padding-top: 8px; color: #617989; font-size: 10px; font-weight: 650; }
.followup-reminder-count small span { color: #a47c36; font-size: 14px; line-height: 1; }
@media (max-width: 680px) {
  .followup-reminder-panel { grid-template-columns: 1fr 1fr; gap: 8px; padding: 11px; }
  .followup-reminder-intro { grid-column: 1 / -1; padding: 2px 2px 4px; }
  .followup-reminder-intro h2 { font-size: 17px; }
  .followup-reminder-count { min-height: 105px; padding: 11px; }
  .followup-reminder-count strong { font-size: 25px; }
}
