:root {
  --black: #09090b;
  --soft-black: #141417;
  --white: #ffffff;
  --muted: #a1a1aa;
  --line: rgba(255,255,255,.1);
  --red: #ef233c;
  --red-dark: #b00020;
  --orange: #ff8a00;
  --orange-dark: #d96400;
  --green: #22c55e;
  --blue: #38bdf8;
  --radius: 22px;
  --shadow: 0 25px 80px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.landing-body, .auth-body, .dashboard-body {
  background:
    radial-gradient(circle at 20% 10%, rgba(239,35,60,.25), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255,138,0,.22), transparent 24%),
    linear-gradient(135deg, #050505 0%, #151515 100%);
}
.employee-theme { --accent: var(--orange); --accent-dark: var(--orange-dark); }
.admin-theme { --accent: var(--red); --accent-dark: var(--red-dark); }
.glass {
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-radius: 24px; margin: 24px auto; max-width: 1160px;
}
.brand { font-weight: 800; letter-spacing: -1px; font-size: 24px; }
.brand span { color: var(--red); }
.employee-theme .brand span { color: var(--orange); }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.ghost-link { padding: 10px 14px; border-radius: 999px; background: rgba(239,35,60,.12); color: #fff; transition: .25s; }
.ghost-link.employee { background: rgba(255,138,0,.14); }
.ghost-link:hover { transform: translateY(-2px); background: rgba(255,255,255,.16); }
.hero-shell { width: min(1180px, calc(100% - 32px)); margin: auto; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 60px 0 90px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-size: 13px; font-weight: 700; }
h1 { font-size: clamp(42px, 7vw, 82px); line-height: .95; letter-spacing: -4px; margin: 12px 0 22px; }
.hero-text { max-width: 660px; color: #d4d4d8; font-size: 19px; line-height: 1.7; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 14px; color: white; font-weight: 800; transition: .25s; }
.btn:hover { transform: translateY(-3px); filter: brightness(1.1); }
.primary-red { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.primary-orange { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }
.btn.secondary { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); }
.hero-card { min-height: 430px; border-radius: 34px; position: relative; overflow: hidden; padding: 34px; }
.pulse-ring { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(239,35,60,.2); right: -80px; top: -80px; animation: pulse 2.8s infinite; }
.dashboard-preview { position: relative; z-index: 2; background: #111; border: 1px solid rgba(255,255,255,.1); border-radius: 26px; padding: 22px; transform: rotate(-2deg); }
.preview-header { display: flex; gap: 8px; margin-bottom: 26px; }
.preview-header span { width: 11px; height: 11px; border-radius: 50%; background: #3f3f46; }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric-row div { background: rgba(255,255,255,.06); border-radius: 18px; padding: 18px; }
.metric-row strong { display: block; font-size: 32px; }
.metric-row small { color: var(--muted); }
.lead-line { height: 48px; border-radius: 14px; margin-top: 14px; background: linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); position: relative; overflow: hidden; }
.lead-line:after { content:""; position:absolute; height:100%; width:45%; left:0; top:0; border-radius: inherit; }
.lead-line.converted:after { background: var(--green); width:75%; }
.lead-line.interested:after { background: var(--orange); width:55%; }
.lead-line.unanswered:after { background: var(--red); width:35%; }
.floating-badge { position: absolute; right: -18px; bottom: -18px; padding: 15px 18px; border-radius: 999px; background: white; color: #111; font-weight: 800; box-shadow: var(--shadow); }
.auth-wrapper { width: min(440px, calc(100% - 28px)); margin: 40px auto; }
.auth-card { padding: 30px; border-radius: var(--radius); }
.auth-card h1 { font-size: 36px; letter-spacing: -2px; margin-bottom: 8px; }
.auth-card p { color: var(--muted); line-height: 1.6; }
.form { display: grid; gap: 15px; margin-top: 20px; }
.form label { display: grid; gap: 8px; color: #e4e4e7; font-weight: 700; font-size: 14px; }
.input, textarea, select {
  width: 100%; border-radius: 14px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07); color: white; padding: 14px 15px; outline: none;
  transition: .2s;
}
select option { color: #111; }
.input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.small-link { color: var(--accent); font-weight: 800; }
.notice { border-radius: 14px; padding: 12px; background: rgba(255,255,255,.08); color: #eee; display:none; }
.notice.show { display: block; }
.dashboard-layout { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar { padding: 24px; border-right: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.38); position: sticky; top:0; height:100vh; }
.nav-list { display: grid; gap: 10px; margin-top: 34px; }
.nav-btn { padding: 13px 14px; border-radius: 14px; color: #f4f4f5; background: transparent; text-align: left; font-weight: 800; transition:.2s; }
.nav-btn.active, .nav-btn:hover { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); transform: translateX(4px); }
.logout-btn { margin-top: 30px; width: 100%; }
.content { padding: 28px; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 24px; }
.page-head h2 { margin: 0; font-size: clamp(28px, 4vw, 46px); letter-spacing: -2px; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(160px,1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card, .panel { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 20px; }
.stat-card strong { display: block; font-size: 34px; }
.stat-card span { color: var(--muted); }
.panel { margin-bottom: 18px; }
.panel h3 { margin-top: 0; }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid rgba(255,255,255,.08); }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 13px 12px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; vertical-align: top; }
th { color: #fafafa; background: rgba(255,255,255,.08); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
td { color: #e4e4e7; }
.badge { display:inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.1); font-weight: 800; font-size: 12px; }
.status-Converted { background: rgba(34,197,94,.2); color:#bbf7d0; }
.status-Interested { background: rgba(56,189,248,.2); color:#bae6fd; }
.status-Follow-Up { background: rgba(255,138,0,.22); color:#fed7aa; }
.status-Not-Answered, .status-Wrong-Number, .status-Not-Required { background: rgba(239,35,60,.18); color:#fecdd3; }
.hidden { display:none !important; }
.reveal { animation: rise .7s ease both; }
.delay-1 { animation-delay: .16s; }
@keyframes rise { from { opacity:0; transform: translateY(24px); } to { opacity:1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity:.65; } 50% { transform: scale(1.18); opacity:.25; } }
@media (max-width: 920px) { .hero-grid, .dashboard-layout { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .card-grid { grid-template-columns: repeat(2,1fr); } h1 { letter-spacing: -2px; } }
@media (max-width: 560px) { .topbar, .page-head { flex-direction: column; align-items:flex-start; } .card-grid { grid-template-columns: 1fr; } .content { padding: 16px; } .auth-card { padding: 22px; } }
.otp-panel { margin-top: 18px; }
.otp-input { text-align: center; letter-spacing: 8px; font-size: 22px; font-weight: 800; }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.18); color: #fff; }

.text-center { text-align: center; text-decoration: none; }

/* Theme switch */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--white);
  font-weight: 800;
  transition: .25s;
}
.theme-toggle:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }
.theme-toggle .theme-icon { font-size: 17px; }
.theme-toggle .theme-label { font-size: 14px; }

body.light-mode {
  --black: #f7f7fb;
  --soft-black: #ffffff;
  --white: #101014;
  --muted: #5f6472;
  --line: rgba(10,10,20,.12);
  --shadow: 0 18px 60px rgba(15,23,42,.12);
  background: #f7f7fb;
  color: #101014;
}
body.light-mode.landing-body,
body.light-mode.auth-body,
body.light-mode.dashboard-body {
  background:
    radial-gradient(circle at 20% 10%, rgba(239,35,60,.10), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255,138,0,.12), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #f2f4f8 100%);
}
body.light-mode .glass,
body.light-mode .stat-card,
body.light-mode .panel {
  background: rgba(255,255,255,.88);
  border-color: rgba(15,23,42,.12);
  box-shadow: var(--shadow);
}
body.light-mode .sidebar {
  background: rgba(255,255,255,.86);
  border-right-color: rgba(15,23,42,.12);
}
body.light-mode .nav-btn { color: #111827; }
body.light-mode .nav-btn.active,
body.light-mode .nav-btn:hover { color: #fff; }
body.light-mode .input,
body.light-mode textarea,
body.light-mode select {
  background: #ffffff;
  color: #111827;
  border-color: rgba(15,23,42,.18);
}
body.light-mode .form label,
body.light-mode td,
body.light-mode .auth-card p,
body.light-mode .hero-text { color: #374151; }
body.light-mode th {
  color: #111827;
  background: rgba(15,23,42,.06);
}
body.light-mode th,
body.light-mode td { border-bottom-color: rgba(15,23,42,.10); }
body.light-mode .table-wrap { border-color: rgba(15,23,42,.12); }
body.light-mode .btn.secondary,
body.light-mode .btn.ghost,
body.light-mode .theme-toggle {
  background: rgba(15,23,42,.06);
  border-color: rgba(15,23,42,.14);
  color: #111827;
}
body.light-mode .notice { background: rgba(15,23,42,.06); color: #111827; }
body.light-mode .dashboard-preview { background: #ffffff; border-color: rgba(15,23,42,.12); }
body.light-mode .metric-row div,
body.light-mode .lead-line { background: rgba(15,23,42,.06); }
body.light-mode .floating-badge { background: #111827; color: #fff; }
body.light-mode .ghost-link { color: #111827; background: rgba(239,35,60,.08); }
body.light-mode.employee-theme .ghost-link { background: rgba(255,138,0,.10); }

/* PDF extraction preview */
.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.preview-head p { color: var(--muted); margin-top: 6px; }
.preview-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 190px;
  font-weight: 800;
}
.preview-ok,
.preview-error {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.preview-ok { background: rgba(20, 184, 96, .18); color: #74f5a5; }
.preview-error { background: rgba(239, 35, 60, .18); color: #ff9aaa; }
.preview-wrap { max-height: 430px; overflow: auto; }
.preview-table {
  width: 100%;
  min-width: 1240px;
  table-layout: fixed;
  border-collapse: collapse;
}
.preview-table th,
.preview-table td {
  vertical-align: middle;
  padding: 12px 14px;
}
.preview-table th:nth-child(1), .preview-table td:nth-child(1) { width: 90px; }
.preview-table th:nth-child(2), .preview-table td:nth-child(2) { width: 520px; }
.preview-table th:nth-child(3), .preview-table td:nth-child(3) { width: 190px; }
.preview-table th:nth-child(4), .preview-table td:nth-child(4) { width: 270px; }
.preview-table th:nth-child(5), .preview-table td:nth-child(5) { width: 170px; }
.mini-input,
.mini-select,
.mini-textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
}
.mini-input[data-preview-field="clientName"],
.client-name-input {
  display: block;
  width: 100%;
  height: 48px;
  line-height: 48px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.mini-input[data-preview-field="srNo"] { min-width: 0; text-align: center; }
.mini-textarea { min-height: 48px; resize: vertical; }
.row-warning td { background: rgba(239, 35, 60, .06); }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(239, 35, 60, .18);
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}
.preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
body.light-mode .preview-ok { color: #047857; background: rgba(16,185,129,.14); }
body.light-mode .preview-error { color: #b91c1c; background: rgba(239,35,60,.12); }
body.light-mode .icon-btn { color: #b91c1c; border-color: rgba(15,23,42,.14); }
@media (max-width: 760px) {
  .preview-head { flex-direction: column; }
  .preview-meta { align-items: flex-start; }
  .preview-actions .btn { width: 100%; }
}

/* Employee-wise all leads view */
.empty-state {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-weight: 700;
}
.lead-toolbar,
.lead-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.lead-toolbar h3,
.lead-table-head h3 { margin: 0; }
.lead-toolbar p { margin: 6px 0 0; color: var(--muted); }
.lead-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.close-leads-btn {
  min-width: 120px;
}

.small-btn {
  width: auto;
  min-width: 130px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
}
.employee-lead-grid {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 4px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.employee-lead-grid::-webkit-scrollbar {
  height: 10px;
}
.employee-lead-grid::-webkit-scrollbar-track {
  background: rgba(255,255,255,.08);
  border-radius: 999px;
}
.employee-lead-grid::-webkit-scrollbar-thumb {
  background: rgba(239, 35, 60, .8);
  border-radius: 999px;
}
.employee-lead-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  min-width: 330px;
  max-width: 330px;
  flex: 0 0 330px;
  scroll-snap-align: start;
}
.employee-lead-card.selected {
  border-color: rgba(239, 35, 60, .7);
  box-shadow: 0 0 0 2px rgba(239, 35, 60, .14);
}
.employee-lead-card strong {
  display: block;
  font-size: 18px;
  word-break: break-word;
}
.employee-lead-card span { color: var(--muted); }
.mini-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}
.lead-detail-panel {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 18px;
  overflow-x: auto;
}
.lead-list-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
}
.lead-list-table th:nth-child(1), .lead-list-table td:nth-child(1) { width: 85px; }
.lead-list-table th:nth-child(2), .lead-list-table td:nth-child(2) { width: 320px; }
.lead-list-table th:nth-child(3), .lead-list-table td:nth-child(3) { width: 170px; }
.lead-list-table th:nth-child(4), .lead-list-table td:nth-child(4) { width: 240px; }
.lead-list-table th:nth-child(5), .lead-list-table td:nth-child(5) { width: 160px; }
.lead-list-table th:nth-child(6), .lead-list-table td:nth-child(6) { width: 170px; }
.lead-list-table th:nth-child(7), .lead-list-table td:nth-child(7) { width: 220px; }
.one-line-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.light-mode .empty-state,
body.light-mode .employee-lead-card {
  background: rgba(15,23,42,.04);
  border-color: rgba(15,23,42,.1);
}
body.light-mode .lead-detail-panel { border-top-color: rgba(15,23,42,.12); }
@media (max-width: 760px) {
  .lead-toolbar,
  .lead-table-head { align-items: flex-start; flex-direction: column; }
  .small-btn { width: 100%; }
}

/* Employee live website presence */
.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .2px;
}
.presence-badge i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}
.presence-badge.online {
  color: #7dffc5;
  background: rgba(0, 166, 90, .16);
}
.presence-badge.online i {
  background: #13d17a;
  box-shadow: 0 0 0 4px rgba(19,209,122,.16), 0 0 14px rgba(19,209,122,.75);
}
.presence-badge.offline {
  color: #ffb0b8;
  background: rgba(220, 38, 38, .16);
}
.presence-badge.offline i {
  background: #ef233c;
  box-shadow: 0 0 0 4px rgba(239,35,60,.16), 0 0 12px rgba(239,35,60,.55);
}
.employee-table th,
.employee-table td {
  vertical-align: middle;
}
body.light-mode .presence-badge.online {
  color: #057a45;
  background: rgba(16, 185, 129, .16);
}
body.light-mode .presence-badge.offline {
  color: #b91c1c;
  background: rgba(239, 68, 68, .14);
}

/* Lead view/delete controls */
.lead-actions,
.lead-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn.danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 30px rgba(220, 38, 38, .22);
}
.btn.danger:hover { transform: translateY(-1px); filter: brightness(1.05); }
.hidden-leads-note {
  color: var(--muted);
  font-weight: 800;
  background: rgba(255,255,255,.05);
  border-radius: 16px;
  padding: 18px;
  overflow: visible;
}
body.light-mode .hidden-leads-note { background: rgba(15,23,42,.04); }
@media (max-width: 760px) {
  .lead-actions,
  .lead-card-actions { width: 100%; }
  .lead-actions .btn,
  .lead-card-actions .btn { flex: 1 1 100%; }
}

/* Employee management table improvements */
#employeeList.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.employee-scroll-hint {
  display: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
}
.manage-employee-table {
  min-width: 1120px;
  table-layout: fixed;
}
.manage-employee-table th:nth-child(1), .manage-employee-table td:nth-child(1) { width: 260px; }
.manage-employee-table th:nth-child(2), .manage-employee-table td:nth-child(2) { width: 190px; }
.manage-employee-table th:nth-child(3), .manage-employee-table td:nth-child(3) { width: 230px; }
.manage-employee-table th:nth-child(4), .manage-employee-table td:nth-child(4) { width: 150px; }
.manage-employee-table th:nth-child(5), .manage-employee-table td:nth-child(5) { width: 230px; }
.manage-employee-table th:nth-child(6), .manage-employee-table td:nth-child(6) { width: 190px; }
.table-action-btn {
  min-height: 38px;
  min-width: 140px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
}
@media (max-width: 980px) {
  .employee-scroll-hint { display: block; }
}

/* Employee delete filter controls */
.employee-manage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
}
.employee-delete-control {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.compact-select {
  min-width: 260px;
  height: 48px;
  padding: 0 14px;
}
.small-text {
  margin: 4px 0 0;
  font-size: 0.9rem;
}
@media (max-width: 760px) {
  .employee-manage-bar { align-items: stretch; flex-direction: column; }
  .employee-delete-control { flex-direction: column; align-items: stretch; }
  .compact-select { min-width: 100%; width: 100%; }
}

@media (max-width: 520px) {
  .employee-lead-card {
    min-width: 280px;
    max-width: 280px;
    flex-basis: 280px;
  }
}

/* Final employee summary horizontal scroller fix */
.lead-toolbar {
  align-items: flex-start;
  flex-wrap: wrap;
}
.lead-toolbar > div:first-child {
  min-width: 260px;
  flex: 1 1 420px;
}
.lead-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}
.employee-lead-grid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  grid-template-rows: 1fr;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 18px;
  margin: 8px 0 20px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.employee-lead-card {
  min-width: 0;
  max-width: none;
  width: auto;
  flex: initial;
  scroll-snap-align: start;
  box-sizing: border-box;
}
.employee-lead-card strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  max-width: 100%;
}
.employee-lead-card .mini-stats {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-card-actions {
  flex-wrap: nowrap;
}
.lead-card-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  padding-left: 12px;
  padding-right: 12px;
}
.content-panel,
.admin-section,
.card,
.table-wrap {
  max-width: 100%;
  box-sizing: border-box;
}
body.light-mode .employee-lead-grid::-webkit-scrollbar-track {
  background: rgba(15,23,42,.08);
}
body.light-mode .employee-lead-grid::-webkit-scrollbar-thumb {
  background: rgba(220,38,38,.75);
}
@media (max-width: 760px) {
  .employee-lead-grid {
    grid-auto-columns: minmax(250px, 84vw);
  }
  .lead-actions {
    width: 100%;
    justify-content: stretch;
  }
  .lead-actions .btn {
    flex: 1 1 140px;
  }
  .lead-card-actions {
    width: 100%;
    flex-wrap: nowrap;
  }
  .lead-card-actions .btn {
    flex: 1 1 0;
  }
}

/* Strict fix: keep employee card scrolling INSIDE the card section only */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.dashboard-layout,
.content,
.panel,
.card,
.content-panel,
.admin-section {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.content {
  overflow-x: hidden;
}
.panel {
  overflow: hidden;
}
.lead-toolbar {
  max-width: 100%;
  overflow: hidden;
}
.employee-lead-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 16px;
  padding: 8px 6px 18px;
  margin: 10px 0 20px;
  box-sizing: border-box;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.employee-lead-card {
  flex: 0 0 320px !important;
  width: 320px !important;
  max-width: 320px !important;
  min-width: 320px !important;
  box-sizing: border-box;
}
.employee-lead-card strong,
.employee-lead-card .mini-stats {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.lead-card-actions .btn {
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}
@media (max-width: 760px) {
  .employee-lead-card {
    flex-basis: 280px !important;
    width: 280px !important;
    max-width: 280px !important;
    min-width: 280px !important;
  }
}

/* No-scroll employee summary layout: cards wrap cleanly inside section */
.employee-lead-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: unset !important;
  flex-wrap: unset !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 8px 0 18px !important;
  margin: 10px 0 20px !important;
  scroll-snap-type: none !important;
}
.employee-lead-card {
  flex: unset !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
.lead-card-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}
.lead-card-actions .btn {
  flex: 1 1 130px !important;
  width: auto !important;
}
@media (max-width: 760px) {
  .employee-lead-grid {
    grid-template-columns: 1fr !important;
  }
  .employee-lead-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* Employee dashboard lead-view improvements */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.action-row.compact {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.employee-leads-table {
  width: 100%;
  table-layout: fixed;
}
.employee-leads-table th,
.employee-leads-table td {
  vertical-align: middle;
}
.employee-leads-table th:nth-child(1),
.employee-leads-table td:nth-child(1) { width: 56px; }
.employee-leads-table th:nth-child(2),
.employee-leads-table td:nth-child(2) { width: 42%; }
.employee-leads-table th:nth-child(3),
.employee-leads-table td:nth-child(3) { width: 150px; }
.employee-leads-table th:nth-child(4),
.employee-leads-table td:nth-child(4) { width: 150px; }
.employee-leads-table th:nth-child(5),
.employee-leads-table td:nth-child(5) { width: 160px; }
.employee-leads-table th:nth-child(6),
.employee-leads-table td:nth-child(6) { width: 190px; }
.employee-leads-table th:nth-child(7),
.employee-leads-table td:nth-child(7) { width: 110px; }
.serial-cell {
  font-weight: 700;
}
.client-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone-cell,
.phone-cell a {
  white-space: nowrap;
  word-break: keep-all;
  font-variant-numeric: tabular-nums;
}
.toast-message {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  max-width: 360px;
  padding: 15px 18px;
  border-radius: 18px;
  font-weight: 800;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  animation: toastIn .2s ease-out;
}
.toast-message.error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.toast-message.hidden {
  display: none;
}
@keyframes toastIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (max-width: 900px) {
  .section-title-row { align-items: flex-start; flex-direction: column; }
  .employee-leads-table { min-width: 980px; }
}


/* Employee status/activity upgrades */
.employee-lead-card.clickable-card { cursor: pointer; }
.employee-lead-card.clickable-card:hover { transform: translateY(-2px); border-color: rgba(244, 63, 94, .65); }
.employee-lead-card small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; line-height: 1.3; }
.nav-link { display: block; padding: 14px 18px; border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 800; }
.nav-link.active, .nav-link:hover { background: var(--accent); color: white; }
.search-input { max-width: 420px; min-width: 260px; }
.status-grid .stat-card strong { font-size: 20px; }
.status-history-table td { vertical-align: middle; }
@media (max-width: 700px) { .lead-table-head { align-items: stretch; } .search-input { max-width: none; min-width: 0; width: 100%; } }


/* Employee My Leads summary card layout */
.employee-self-summary {
  display: grid;
  grid-template-columns: minmax(280px, 420px);
  gap: 16px;
  margin: 14px 0 20px;
}
.employee-dashboard-lead-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(249, 115, 22, .14), rgba(255,255,255,.04));
  box-shadow: 0 18px 45px rgba(0,0,0,.15);
}
.employee-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.employee-card-top strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-card-top span:not(.badge) {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.employee-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  color: var(--muted);
  margin: 12px 0 18px;
  font-size: 14px;
}
.employee-card-actions {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
.employee-card-actions .btn {
  flex: 1 1 150px !important;
}
.employee-table-panel {
  margin-top: 12px;
}
.leads-open-title {
  padding: 4px 0 14px;
}
body.light-mode .employee-dashboard-lead-card {
  background: linear-gradient(135deg, rgba(249, 115, 22, .12), rgba(255,255,255,.9));
}
@media (max-width: 720px) {
  .employee-self-summary { grid-template-columns: 1fr; }
  .employee-card-top { flex-direction: column; }
  .employee-mini-stats { grid-template-columns: 1fr; }
}


/* Boss approval workflow */
.boss-theme { --accent: var(--red); --accent-dark: var(--red-dark); }
.ghost-link.boss { background: rgba(239,35,60,.18); }
.auth-top-row { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.approval-gate {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 14px 16px;
  margin: -8px 0 20px;
  display: grid;
  gap: 4px;
}
.approval-gate.pending { background: rgba(255,138,0,.16); border-color: rgba(255,138,0,.35); }
.approval-gate.approved { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.35); }
.approval-gate strong { font-size: 16px; }
.approval-gate span { color: var(--muted); }
.nav-btn.needs-approval::after { content: " Locked"; font-size: 11px; color: #fed7aa; margin-left: 6px; }
.boss-stat-grid { margin-bottom: 18px; }
.boss-admin-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:16px; }
.boss-admin-card {
  display:flex; justify-content:space-between; gap:16px; align-items:flex-start;
  background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1);
  border-radius:18px; padding:18px;
}
.boss-admin-card strong, .boss-admin-card span, .boss-admin-card small { display:block; }
.boss-admin-card span { margin-top:5px; color:#e5e7eb; }
.boss-admin-card small { margin-top:6px; color:var(--muted); }
.boss-actions { display:grid; gap:8px; min-width:130px; }
.approval-badge { display:inline-flex; padding:6px 10px; border-radius:999px; font-weight:800; font-size:12px; text-transform:capitalize; background:rgba(255,255,255,.12); }
.approval-badge.approved { background:rgba(34,197,94,.18); color:#bbf7d0; }
.approval-badge.pending { background:rgba(255,138,0,.18); color:#fed7aa; }
.approval-badge.rejected { background:rgba(239,35,60,.18); color:#fecdd3; }
body.light-mode .boss-admin-card { background:#fff; border-color:rgba(15,23,42,.12); }
body.light-mode .boss-admin-card span { color:#334155; }
body.light-mode .approval-gate span { color:#475569; }
@media (max-width: 720px) { .boss-admin-card { flex-direction:column; } .boss-actions { width:100%; } }

/* Mobile-friendly responsive upgrade */
img, svg, video, canvas { max-width: 100%; height: auto; }
.muted { color: var(--muted); }

@media (max-width: 1100px) {
  .hero-grid { gap: 30px; }
  .hero-card { min-height: 360px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 24px 18px; }
}

@media (max-width: 920px) {
  .dashboard-layout {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: grid;
    gap: 12px;
    backdrop-filter: blur(14px);
  }
  .sidebar .brand {
    font-size: 22px;
  }
  .nav-list {
    display: flex;
    gap: 8px;
    margin-top: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .nav-btn,
  .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 11px 14px;
    font-size: 14px;
  }
  .nav-btn.active,
  .nav-btn:hover {
    transform: none;
  }
  .logout-btn {
    margin-top: 0;
    width: auto;
    justify-self: start;
    min-height: 42px;
    padding: 0 18px;
  }
  .page-head {
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .hero-shell { width: min(100% - 24px, 720px); }
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 34px 0 56px;
  }
  .hero-card {
    min-height: 310px;
    order: -1;
  }
  .dashboard-preview {
    transform: none;
  }
  h1 {
    font-size: clamp(40px, 12vw, 64px);
    letter-spacing: -2px;
  }
  .hero-text {
    font-size: 16px;
  }
  .topbar {
    width: calc(100% - 24px);
    margin: 12px auto;
    padding: 12px;
    border-radius: 18px;
  }
  .topbar-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .ghost-link {
    padding: 9px 12px;
    font-size: 14px;
  }
  .theme-toggle {
    min-height: 38px;
    padding: 0 12px;
  }
  .auth-wrapper {
    margin: 18px auto 32px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }
  .content {
    padding: 18px 12px;
  }
  .page-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 18px;
  }
  .page-head h2 {
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -1px;
    word-break: break-word;
  }
  .eyebrow {
    font-size: 11px;
  }
  .panel,
  .stat-card {
    border-radius: 16px;
    padding: 16px;
  }
  .card-grid,
  .status-grid,
  .boss-stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card strong {
    font-size: 24px;
  }
  .stat-card span {
    font-size: 13px;
  }
  .form {
    gap: 12px;
  }
  .btn {
    width: 100%;
    min-height: 46px;
  }
  .lead-toolbar,
  .lead-table-head,
  .section-title-row,
  .preview-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .lead-actions,
  .lead-table-actions,
  .preview-actions,
  .action-row.compact {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .employee-lead-grid,
  .boss-admin-grid {
    grid-template-columns: 1fr !important;
  }
  .employee-lead-card,
  .employee-dashboard-lead-card,
  .boss-admin-card {
    border-radius: 16px;
    padding: 16px;
  }
  .lead-card-actions,
  .employee-card-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  .table-wrap,
  .preview-wrap,
  .lead-detail-panel,
  #employeeList.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table,
  .preview-table,
  .lead-list-table,
  .employee-leads-table,
  .manage-employee-table {
    min-width: 760px;
  }
  th, td {
    padding: 11px 10px;
    font-size: 14px;
  }
  .toast-message {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .landing-body,
  .auth-body,
  .dashboard-body {
    background:
      radial-gradient(circle at 0% 0%, rgba(239,35,60,.18), transparent 34%),
      radial-gradient(circle at 100% 0%, rgba(255,138,0,.16), transparent 34%),
      linear-gradient(135deg, #050505 0%, #151515 100%);
  }
  body.light-mode.landing-body,
  body.light-mode.auth-body,
  body.light-mode.dashboard-body {
    background:
      radial-gradient(circle at 0% 0%, rgba(239,35,60,.08), transparent 34%),
      radial-gradient(circle at 100% 0%, rgba(255,138,0,.10), transparent 34%),
      linear-gradient(135deg, #fff 0%, #f5f6fb 100%);
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .brand {
    font-size: 22px;
  }
  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .topbar-actions .theme-toggle {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .ghost-link {
    text-align: center;
  }
  .hero-grid {
    padding-top: 22px;
  }
  .hero-card {
    min-height: 250px;
    padding: 18px;
    border-radius: 22px;
  }
  .dashboard-preview {
    padding: 16px;
    border-radius: 20px;
  }
  .metric-row {
    gap: 8px;
  }
  .metric-row div {
    padding: 12px;
  }
  .metric-row strong {
    font-size: 24px;
  }
  .lead-line {
    height: 38px;
  }
  .floating-badge {
    right: 10px;
    bottom: 10px;
    padding: 11px 13px;
    font-size: 12px;
  }
  h1 {
    font-size: clamp(38px, 14vw, 54px);
    line-height: 1;
  }
  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 20px;
    border-radius: 18px;
  }
  .auth-card h1 {
    font-size: 30px;
  }
  .auth-top-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .auth-top-row .theme-toggle {
    justify-self: start;
  }
  .sidebar {
    padding: 12px;
  }
  .nav-list {
    gap: 6px;
  }
  .nav-btn,
  .nav-link {
    padding: 10px 12px;
  }
  .logout-btn {
    width: 100%;
  }
  .content {
    padding: 14px 10px;
  }
  .page-head {
    grid-template-columns: 1fr;
  }
  .page-head .theme-toggle {
    justify-self: start;
  }
  .card-grid,
  .status-grid,
  .boss-stat-grid {
    grid-template-columns: 1fr;
  }
  .employee-mini-stats,
  .mini-stats {
    display: grid;
    grid-template-columns: 1fr;
    white-space: normal !important;
  }
  .employee-card-top strong {
    max-width: 100%;
  }
  .input,
  textarea,
  select {
    padding: 13px 14px;
    border-radius: 12px;
  }
  .preview-meta {
    min-width: 0;
  }
  .search-input {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .topbar-actions {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 36px;
  }
  .page-head h2 {
    font-size: 26px;
  }
  .panel,
  .stat-card,
  .auth-card {
    padding: 14px;
  }
}

/* Employee My Leads mobile card layout fix */
@media (max-width: 640px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .dashboard-layout,
  .content,
  .dash-section,
  .panel,
  .employee-table-panel,
  .table-wrap {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .employee-self-summary {
    width: 100%;
  }

  .employee-dashboard-lead-card {
    width: 100%;
    max-width: 100%;
  }

  .leads-open-title {
    gap: 14px;
    margin-bottom: 12px;
  }

  .employee-leads-table {
    min-width: 0 !important;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 14px;
  }

  .employee-leads-table thead {
    display: none;
  }

  .employee-leads-table tbody,
  .employee-leads-table tr,
  .employee-leads-table td {
    display: block;
    width: 100%;
  }

  .employee-leads-table tr {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,.045);
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
  }

  body.light-mode .employee-leads-table tr {
    border-color: rgba(15,23,42,.12);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
  }

  .employee-leads-table td {
    position: relative;
    min-height: 44px;
    padding: 12px 14px 12px 132px !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: normal;
    word-break: break-word;
    font-size: 14px;
  }

  body.light-mode .employee-leads-table td {
    border-bottom-color: rgba(15,23,42,.08);
  }

  .employee-leads-table td:last-child {
    border-bottom: 0;
    padding-left: 14px !important;
  }

  .employee-leads-table td::before {
    position: absolute;
    left: 14px;
    top: 13px;
    width: 104px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    content: "";
  }

  .employee-leads-table td:nth-child(1)::before { content: "Sr."; }
  .employee-leads-table td:nth-child(2)::before { content: "Client"; }
  .employee-leads-table td:nth-child(3)::before { content: "Number"; }
  .employee-leads-table td:nth-child(4)::before { content: "Requirement"; }
  .employee-leads-table td:nth-child(5)::before { content: "Status"; }
  .employee-leads-table td:nth-child(6)::before { content: "Remarks"; }

  .employee-leads-table .serial-cell,
  .employee-leads-table .phone-cell,
  .employee-leads-table .client-cell {
    white-space: normal !important;
  }

  .employee-leads-table .phone-cell,
  .employee-leads-table .phone-cell a {
    white-space: nowrap !important;
    word-break: keep-all !important;
    letter-spacing: .01em;
  }

  .employee-leads-table select,
  .employee-leads-table textarea,
  .employee-leads-table .save-lead {
    width: 100%;
    max-width: 100%;
  }

  .employee-leads-table textarea {
    min-height: 76px;
  }

  .employee-leads-table .save-lead {
    margin-top: 2px;
  }
}

/* Final mobile lead card fix: keep labels/values aligned and stop vertical letter stacking */
@media (max-width: 720px) {
  .employee-leads-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 14px !important;
    table-layout: auto !important;
  }

  .employee-leads-table thead {
    display: none !important;
  }

  .employee-leads-table tbody {
    display: grid !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .employee-leads-table tr {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: rgba(255,255,255,.045) !important;
  }

  body.light-mode .employee-leads-table tr {
    border-color: rgba(15,23,42,.12) !important;
    background: #fff !important;
  }

  .employee-leads-table td {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 42px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.35 !important;
    font-size: 14px !important;
  }

  body.light-mode .employee-leads-table td {
    border-bottom-color: rgba(15,23,42,.08) !important;
  }

  .employee-leads-table td:last-child {
    border-bottom: 0 !important;
    display: block !important;
  }

  .employee-leads-table td::before {
    content: attr(data-label) !important;
    position: static !important;
    display: block !important;
    width: auto !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }

  .employee-leads-table td:nth-child(1)::before { content: "Sr." !important; }
  .employee-leads-table td:nth-child(2)::before { content: "Client" !important; }
  .employee-leads-table td:nth-child(3)::before { content: "Number" !important; }
  .employee-leads-table td:nth-child(4)::before { content: "Requirement" !important; }
  .employee-leads-table td:nth-child(5)::before { content: "Status" !important; }
  .employee-leads-table td:nth-child(6)::before { content: "Remarks" !important; }
  .employee-leads-table td:nth-child(7)::before { content: "" !important; display: none !important; }

  .employee-leads-table .serial-cell,
  .employee-leads-table .client-cell,
  .employee-leads-table .phone-cell {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .employee-leads-table .phone-cell,
  .employee-leads-table .phone-cell a {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  .employee-leads-table select,
  .employee-leads-table textarea,
  .employee-leads-table .save-lead {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .employee-leads-table textarea {
    min-height: 72px !important;
  }
}

/* Mobile polish for employee dashboard: nav theme button, non-overlapping summary, clean lead cards */
.sidebar-theme-toggle {
  display: none;
}

@media (max-width: 720px) {
  .dashboard-body.employee-theme .sidebar {
    position: relative;
    width: 100%;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 18px 18px;
    padding: 14px 14px 16px;
    gap: 12px;
    overflow: hidden;
  }

  .dashboard-body.employee-theme .sidebar .brand {
    display: block;
    margin-bottom: 8px;
  }

  .dashboard-body.employee-theme .employee-mobile-nav {
    display: grid;
    grid-template-columns: minmax(88px, auto) minmax(78px, auto) minmax(92px, auto);
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .dashboard-body.employee-theme .employee-mobile-nav .nav-btn,
  .dashboard-body.employee-theme .employee-mobile-nav .theme-toggle {
    min-height: 48px;
    padding: 11px 12px;
    border-radius: 15px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    width: 100%;
  }

  .dashboard-body.employee-theme .sidebar-theme-toggle {
    display: inline-flex;
  }

  .dashboard-body.employee-theme .page-head > .theme-toggle {
    display: none;
  }

  .dashboard-body.employee-theme .logout-btn {
    margin-top: 8px;
    min-height: 54px;
  }

  .dashboard-body.employee-theme .content {
    padding: 24px 12px 36px;
  }

  .dashboard-body.employee-theme .page-head {
    margin-bottom: 18px;
  }

  .dashboard-body.employee-theme .page-head h2 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .employee-self-summary,
  .employee-dashboard-lead-card,
  .employee-table-panel,
  .employee-leads-table,
  .employee-leads-table tbody,
  .employee-leads-table tr,
  .employee-leads-table td {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  .employee-self-summary {
    display: block !important;
    margin: 18px 0 22px !important;
    width: 100% !important;
  }

  .employee-dashboard-lead-card {
    width: 100% !important;
    padding: 18px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
  }

  .employee-card-top {
    display: block !important;
    margin-bottom: 14px !important;
  }

  .employee-card-top strong {
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    font-size: 19px !important;
  }

  .employee-card-top .badge {
    margin-top: 12px !important;
    display: inline-flex !important;
  }

  .employee-mini-stats {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin: 16px 0 18px !important;
  }

  .employee-card-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .employee-card-actions .btn,
  .leads-open-title .btn {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 54px !important;
    margin: 0 !important;
    flex: none !important;
  }

  .employee-table-panel {
    margin-top: 16px !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  .leads-open-title {
    display: block !important;
    padding: 0 0 14px !important;
    margin: 0 0 12px !important;
  }

  .leads-open-title h3 {
    margin: 0 0 8px !important;
  }

  .employee-leads-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border-spacing: 0 14px !important;
  }

  .employee-leads-table tbody {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .employee-leads-table tr {
    display: block !important;
    width: 100% !important;
    border-radius: 20px !important;
    overflow: hidden !important;
  }

  .employee-leads-table td {
    display: grid !important;
    grid-template-columns: 118px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 14px 16px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  .employee-leads-table td::before {
    position: static !important;
    width: auto !important;
    white-space: nowrap !important;
    content: attr(data-label) !important;
  }

  .employee-leads-table td:nth-child(1)::before { content: "Sr." !important; }
  .employee-leads-table td:nth-child(2)::before { content: "Client" !important; }
  .employee-leads-table td:nth-child(3)::before { content: "Number" !important; }
  .employee-leads-table td:nth-child(4)::before { content: "Requirement" !important; }
  .employee-leads-table td:nth-child(5)::before { content: "Status" !important; }
  .employee-leads-table td:nth-child(6)::before { content: "Remarks" !important; }

  .employee-leads-table td:last-child {
    display: block !important;
    padding: 16px !important;
  }

  .employee-leads-table td:last-child::before {
    display: none !important;
  }

  .employee-leads-table .client-cell {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
  }

  .employee-leads-table .phone-cell,
  .employee-leads-table .phone-cell a {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  .employee-leads-table select,
  .employee-leads-table textarea,
  .employee-leads-table .save-lead {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .employee-leads-table .save-lead {
    min-height: 54px !important;
  }
}

@media (max-width: 390px) {
  .dashboard-body.employee-theme .employee-mobile-nav {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-body.employee-theme .sidebar-theme-toggle {
    grid-column: 1 / -1;
  }
  .employee-leads-table td {
    grid-template-columns: 96px minmax(0, 1fr) !important;
    padding: 13px 14px !important;
  }
}
