/* ============================================================
   Purewood Lead Tracker — Enterprise UI
   Redesign to match the Purewood "Enterprise PO" identity:
   crimson + near-black + soft light surfaces, Plus Jakarta Sans.
   Class names kept intact so existing markup just gets restyled.
   ============================================================ */

:root {
  /* Brand */
  --red:        #C8102E;
  --red-dark:   #A20D25;
  --red-soft:   #FBE9EC;
  --red-line:   #F2C9D1;

  /* Neutrals */
  --ink:        #0E0E10;   /* near-black panel / table head */
  --ink-2:      #1B1418;   /* warm black for gradients */
  --text:       #16181D;   /* headings */
  --body:       #353A42;   /* body text */
  --muted:      #6B7280;   /* secondary text */
  --line:       #E6E8EE;   /* hairline borders */
  --line-2:     #EEF0F4;
  --card:       #FFFFFF;
  --bg:         #F4F6FA;   /* app background */
  --bg-2:       #EAEEF5;

  /* Status accents */
  --blue:   #1D6FE0;
  --amber:  #C77700;
  --green:  #1B8A4B;
  --purple: #6A1B9A;
  --indigo: #2D3CA6;

  --radius-lg: 20px;
  --radius:    14px;
  --radius-sm: 11px;
  --shadow:    0 1px 2px rgba(16,18,32,.05), 0 8px 24px rgba(16,18,32,.06);
  --shadow-lg: 0 24px 70px rgba(16,18,32,.22);
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { text-decoration: none; color: inherit; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: translateY(14px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Form Controls ── */
.form-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 14px; background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.form-input::placeholder { color: #9AA1AD; }
.form-input:focus { border-color: var(--red); box-shadow: 0 0 0 3.5px rgba(200,16,46,.12); }
.form-label { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: .01em; }
.form-label i { font-size: 13px; color: var(--muted); }
.form-group { margin-bottom: 14px; }
.form-section-title { font-size: 10.5px; font-weight: 800; color: var(--red); letter-spacing: .12em; text-transform: uppercase; margin: 18px 0 10px; display: flex; align-items: center; gap: 7px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 4px; }
.form-grid-2 .full-col { grid-column: 1 / -1; }

/* ── Input with icon ── */
.input-icon-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--muted); pointer-events: none; }
.input-icon-wrap .form-input { padding-left: 36px; }
.pass-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--muted); font-size: 16px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13.5px; font-weight: 700; border-radius: var(--radius-sm); padding: 11px 20px; cursor: pointer; border: 1.5px solid transparent; font-family: inherit; transition: background .15s, color .15s, transform .08s, box-shadow .15s; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(200,16,46,.28); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 8px 22px rgba(200,16,46,.34); }
.btn-ghost { background: #fff; color: var(--body); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); border-color: #D7DBE3; }
.btn-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--red-soft); }
.btn-nav { background: #fff; color: var(--body); border: 1.5px solid var(--line); font-size: 12.5px; padding: 8px 13px; font-weight: 600; }
.btn-nav:hover { background: var(--bg); border-color: #D7DBE3; }
.btn-sm { font-size: 12px; padding: 7px 13px; }
.btn-full { width: 100%; }
.mt-8 { margin-top: 10px; }
.ms-auto { margin-left: auto; }

/* ── Alerts ── */
.alert { display: flex; align-items: center; gap: 8px; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; margin-bottom: 16px; font-weight: 600; }
.alert-error { background: var(--red-soft); border: 1.5px solid var(--red-line); color: var(--red-dark); }

/* ── Toast ── */
.toast { display: none; position: fixed; bottom: 20px; right: 16px; left: 16px; z-index: 9999; border-radius: var(--radius); padding: 14px 18px; font-size: 13.5px; font-weight: 600; color: #fff; box-shadow: var(--shadow-lg); align-items: center; gap: 11px; animation: slideIn .25s var(--ease); max-width: 440px; }
@media (min-width: 500px) { .toast { left: auto; right: 24px; bottom: 24px; } }

/* ============================================================
   AUTH — Enterprise split-panel
   ============================================================ */
.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px 18px;
  background: linear-gradient(135deg, #EEF1F7 0%, #DCE3EF 100%);
}
.auth-shell {
  width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr 1fr;
  background: #fff; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg);
  animation: popIn .5s var(--ease);
}

/* Left dark brand panel */
.auth-brandside {
  position: relative; padding: 54px 52px; color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(200,16,46,.28) 0%, rgba(200,16,46,0) 46%),
    linear-gradient(165deg, #0C0C0E 0%, #161013 58%, #1E0E12 100%);
  display: flex; flex-direction: column;
}
.auth-logo-badge { width: 96px; height: 96px; border-radius: 50%; background: #F7F4EE; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 7px rgba(255,255,255,.06), 0 14px 34px rgba(0,0,0,.45); margin: 14px 0 auto; }
.auth-logo-badge img { width: 64px; height: 64px; object-fit: contain; border-radius: 50%; }
.auth-headline { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; margin-top: 18px; }
.auth-headline .accent { color: var(--red); }
.auth-sub { margin-top: 18px; font-size: 14.5px; line-height: 1.7; color: rgba(255,255,255,.62); max-width: 30ch; }
.auth-dots { display: flex; gap: 8px; margin-top: 30px; }
.auth-dot { width: 10px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.22); transition: width .35s var(--ease), background .35s var(--ease); }
.auth-dot.active { width: 30px; background: var(--red); }

/* Right form panel */
.auth-formside { padding: 56px 56px; background: linear-gradient(180deg,#FBFCFE 0%, #F4F6FA 100%); display: flex; flex-direction: column; justify-content: center; }
.auth-formside-inner { width: 100%; max-width: 360px; margin: 0 auto; }
.auth-h1 { font-size: 30px; font-weight: 800; color: var(--text); letter-spacing: -.02em; text-align: center; }
.auth-h1-sub { text-align: center; color: var(--muted); font-size: 14px; margin-top: 6px; margin-bottom: 30px; }
.auth-field-label { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 9px; display: block; }
.auth-link { display: block; text-align: center; color: var(--red); font-weight: 700; font-size: 14px; margin-top: 18px; }
.auth-link:hover { color: var(--red-dark); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { font-size: 12px; color: var(--muted); font-weight: 600; }
.auth-secure-note { margin-top: 22px; text-align: center; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 5px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.auth-back:hover { color: var(--text); }

/* OTP boxes */
.otp-boxes { display: flex; gap: 9px; justify-content: center; margin: 6px 0 22px; }
.otp-box { width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 800; border-radius: 12px; border: 1.5px solid var(--line); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; background:#fff; }
.otp-box:focus { border-color: var(--red); box-shadow: 0 0 0 3.5px rgba(200,16,46,.12); }
.otp-sent-banner { background: var(--red-soft); border: 1.5px solid var(--red-line); border-radius: 12px; padding: 13px 15px; margin-bottom: 20px; display: flex; align-items: center; gap: 11px; }
.otp-sent-icon { width: 38px; height: 38px; background: var(--red); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: 18px; }
.otp-sent-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.otp-sent-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.otp-actions { display: flex; gap: 8px; margin-top: 8px; }

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 460px; }
  .auth-brandside { padding: 40px 36px 30px; }
  .auth-logo-badge { width: 76px; height: 76px; margin: 4px 0 18px; }
  .auth-logo-badge img { width: 50px; height: 50px; }
  .auth-headline { font-size: 30px; }
  .auth-sub { display: none; }
  .auth-dots { display: none; }
  .auth-formside { padding: 36px 30px 40px; }
}

/* ============================================================
   DASHBOARD — top bar
   ============================================================ */
.dash-nav {
  background: #fff; color: var(--text); padding: 0 22px; display: flex; align-items: center; gap: 12px;
  min-height: 62px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(16,18,32,.02), 0 6px 18px rgba(16,18,32,.04);
  position: sticky; top: 0; z-index: 100; flex-wrap: wrap;
}
.nav-logo { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; background: #F7F4EE; border: 1px solid var(--line); padding: 3px; flex-shrink: 0; }
.nav-brand { line-height: 1.2; }
.nav-brand-name { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.nav-brand-sub { font-size: 9px; letter-spacing: .16em; color: var(--muted); font-weight: 600; }
.nav-tabs { display: flex; gap: 4px; margin-left: 18px; }
.nav-tab { display: flex; align-items: center; gap: 6px; background: transparent; color: var(--muted); border: none; border-radius: 99px; padding: 8px 15px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.nav-tab:hover { background: var(--bg); color: var(--text); }
.nav-tab.active { background: var(--red-soft); color: var(--red); font-weight: 700; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-user { display: flex; align-items: center; gap: 9px; padding-left: 4px; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.nav-user-name { font-size: 13px; font-weight: 700; line-height: 1.15; color: var(--text); }
.nav-user-role { font-size: 9.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.report-status { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 11px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }

.dash-content { padding: 22px 24px; max-width: 1320px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-heading > i { width: 40px; height: 40px; border-radius: 11px; background: var(--red-soft); color: var(--red) !important; display: flex; align-items: center; justify-content: center; font-size: 19px !important; }
.page-heading-title { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.page-heading-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* ── KPI cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 16px; }
.stat-wide { grid-column: span 1; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 16px 18px 18px;
  border: 1px solid var(--line); border-left-width: 1px !important;
  box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,18,32,.06), 0 14px 32px rgba(16,18,32,.10); }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent, var(--red)); }
.stat-top { display: flex; justify-content: space-between; align-items: center; }
.stat-label { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.stat-val { font-size: 34px; font-weight: 800; line-height: 1.05; margin-top: 12px; letter-spacing: -.02em; color: var(--text); }
.stat-card .stat-val { position: relative; display: inline-block; }
.stat-card .stat-val::after { content: ""; display: block; width: 30px; height: 3px; border-radius: 99px; background: var(--accent, var(--red)); margin-top: 8px; }

/* ── Follow-up action tiles ── */
.followup-widgets { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 18px; }
.followup-widget { border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; border: 1px solid transparent; box-shadow: var(--shadow); }
.followup-widget i { font-size: 22px; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fw-val { font-size: 26px; font-weight: 800; line-height: 1; }
.fw-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .85; margin-top: 3px; }
.followup-widget > div:last-child { display: flex; flex-direction: column; }
.fw-today    { background: #EEF5FF; border-color: #D6E6FF; color: var(--blue); }
.fw-today i  { background: #DCEAFF; }
.fw-overdue  { background: #FEF0F2; border-color: #F6D2D9; color: var(--red); }
.fw-overdue i{ background: #FBDDE2; }
.fw-upcoming { background: #ECF8F1; border-color: #CFEEDC; color: var(--green); }
.fw-upcoming i { background: #D7F0E1; }

/* ── Charts (kept available if re-enabled) ── */
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.chart-title { font-size: 11px; font-weight: 800; color: var(--text); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.chart-title i { color: var(--red); }
.leaderboard-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; overflow-x: auto; box-shadow: var(--shadow); }

/* ── Filter bar ── */
.filter-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search-wrap { position: relative; flex: 1 1 240px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--muted); pointer-events: none; }
.search-input { padding-left: 36px !important; }
.filter-wrap { position: relative; }
.filter-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--muted); pointer-events: none; z-index: 1; }
.filter-select { padding-left: 34px !important; min-width: 160px; }
.lead-count { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 5px; white-space: nowrap; }

/* ── Table ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; min-width: 900px; }
.table-head th { padding: 12px 10px; text-align: left; font-weight: 700; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,.08); background: var(--ink); color: rgba(255,255,255,.92); }
.table-head th i { color: rgba(255,255,255,.5); }
.table-row { cursor: pointer; border-bottom: 1px solid var(--line-2); transition: background .1s; }
.table-row:hover { background: #FBFAFB; }
.table-row td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); color: var(--body); }
.td-num { color: var(--red); font-weight: 800; text-align: center; background: #FCFCFD; }
.td-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-email { color: var(--red); font-size: 11.5px; }
.td-muted { color: var(--muted); font-size: 11.5px; }
.table-empty { padding: 3.4rem; text-align: center; color: var(--muted); font-size: 13.5px; }
.del-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; opacity: .35; transition: opacity .15s, color .15s; padding: 2px; }
.table-row:hover .del-btn { opacity: 1; color: var(--red); }

/* ── Modals ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(14,14,16,.55); backdrop-filter: blur(2px); z-index: 1000; justify-content: center; align-items: center; padding: 18px; animation: fadeIn .2s ease; }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border-radius: 18px; width: 100%; max-height: 93vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: popIn .26s var(--ease); }
.modal-header { background: linear-gradient(135deg, #131215 0%, #1E1216 100%); border-radius: 18px 18px 0 0; padding: 17px 22px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 10; border-bottom: 2px solid var(--red); }
.modal-title { font-weight: 800; font-size: 16px; color: #fff; display: flex; align-items: center; gap: 9px; letter-spacing: -.01em; }
.modal-title i { color: var(--red); }
.modal-close-btn { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; font-size: 16px; transition: background .15s; }
.modal-close-btn:hover { background: rgba(255,255,255,.22); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 12px; }

/* ── Lead detail ── */
.detail-body { overflow-y: auto; flex: 1; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.detail-info-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 16px 18px; }
.info-section-title { font-size: 11px; font-weight: 800; color: var(--red); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.info-item { display: flex; align-items: flex-start; gap: 10px; }
.info-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--red-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--red); font-size: 13px; margin-top: 1px; }
.info-label { font-size: 9.5px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.info-val { font-size: 13px; color: var(--text); font-weight: 600; margin-top: 2px; word-break: break-word; }

/* ── Comments ── */
.comment-section { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 16px 18px; }
.comment-section-title { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800; color: var(--red); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.comment-count-badge { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.comments-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; margin-bottom: 13px; }
.no-comments { text-align: center; padding: 22px 0; color: var(--muted); font-size: 12.5px; }
.comment-item { display: flex; gap: 11px; align-items: flex-start; }
.comment-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0; }
.comment-avatar-sm { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.comment-author { font-size: 12.5px; font-weight: 800; color: var(--text); }
.role-badge { font-size: 9px; font-weight: 800; border-radius: 5px; padding: 2px 7px; text-transform: uppercase; letter-spacing: .04em; }
.role-badge.admin { background: var(--red); color: #fff; }
.role-badge.user { background: #E9EEF6; color: var(--indigo); }
.comment-time { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.comment-bubble { background: #F6F7FA; border-radius: 4px 12px 12px 12px; padding: 10px 14px; font-size: 13px; color: var(--body); line-height: 1.65; border: 1px solid var(--line); }
.add-comment-wrap { display: flex; gap: 9px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 14px; }
.comment-input-wrap { flex: 1; position: relative; }
.comment-textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 46px 10px 13px; font-size: 13.5px; resize: none; color: var(--text); outline: none; font-family: inherit; transition: border-color .15s; line-height: 1.5; }
.comment-textarea:focus { border-color: var(--red); }
.comment-send-btn { position: absolute; right: 8px; bottom: 8px; background: var(--red); border: none; border-radius: 9px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; font-size: 15px; transition: background .15s; }
.comment-send-btn:hover { background: var(--red-dark); }
.comment-send-btn:disabled { background: #D7DBE3; cursor: default; }

/* ── Close-lead button ── */
.btn-close-lead { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; border-radius: var(--radius-sm); padding: 9px 16px; cursor: pointer; border: 1.5px solid var(--red); background: var(--red-soft); color: var(--red); font-family: inherit; transition: all .15s; }
.btn-close-lead:hover { background: var(--red); color: #fff; }

/* ── Overdue row ── */
.overdue-row { box-shadow: inset 3px 0 0 var(--red); }
.overdue-row td:nth-child(9) { color: var(--red) !important; font-weight: 700; }

#activity-list { min-height: 80px; }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D7DBE3; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #BFC4CF; background-clip: content-box; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-tabs .nav-tab span { display: none; }
  .nav-user-info { display: none; }
  .btn-text { display: none; }
  .dash-content { padding: 14px 14px; }
  .followup-widgets { grid-template-columns: 1fr; }
  .modal-overlay.active { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 18px 18px 0 0; max-height: 96vh; }
  .info-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-2 .full-col { grid-column: 1; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-val { font-size: 27px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .ms-auto { margin-left: 0; }
}
