:root {
  font-family: "DM Sans", sans-serif;
  color: #20233a;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #20233a;
  --muted: #8b91a5;
  --line: #edf0f5;
  --purple: #035ba4;
  --purple-dark: #02477f;
  --green: #2a9d77;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.eyebrow { color: #9a8ff2; letter-spacing: .14em; font-size: 10px; font-weight: 700; margin: 0 0 9px; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 28px; position: relative; overflow: hidden; background: #fff; }
.login-card { z-index: 1; width: min(100%, 430px); background: white; padding: 42px; border: 1px solid #eef0f6; border-radius: 20px; box-shadow: 0 24px 70px #33325e12; }
.brand { display: flex; align-items: center; gap: 10px; color: #272944; text-decoration: none; font-family: "Manrope", sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -.05em; }
.brand-light { color: #9b9db0; font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; background: #035ba4; border-radius: 10px; color: white; font-family: "Manrope", sans-serif; font-size: 21px; font-weight: 800; }
.brand-login { margin-bottom: 42px; }
.login-card h1 { font-family: "Manrope", sans-serif; font-size: 30px; letter-spacing: -.04em; margin: 0 0 8px; }
.login-card > .muted { font-size: 14px; margin: 0 0 27px; }
.form-stack { display: grid; gap: 17px; }
.text-button { justify-self: end; border: 0; padding: 0; margin-top: -7px; background: transparent; color: #7669df; font-size: 11px; font-weight: 600; }
.text-button:hover { color: #02477f; text-decoration: underline; }
.auth-switch { display: flex; justify-content: center; margin-top: 16px; }
.pending-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 0 22px; border-radius: 15px; background: #eaf4fb; color: #035ba4; font-size: 24px; }
.pending-card h1 { font-size: 25px; }
.pending-email { margin: 16px 0 22px; padding: 11px 12px; border-radius: 9px; background: #f5f8fb; color: #58667a; font-size: 12px; text-align: center; }
.pending-card .button + .button { margin-top: 9px; }
label { display: grid; gap: 8px; color: #50546b; font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #e6e8f0; border-radius: 9px; outline: none; transition: border-color .16s, box-shadow .16s; }
input, select { height: 43px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #b1b5c3; }
input:focus, select:focus, textarea:focus { border-color: #035ba4; box-shadow: 0 0 0 3px #035ba41c; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 9px; min-height: 42px; padding: 0 17px; font-size: 12px; font-weight: 700; transition: transform .16s, background .16s, box-shadow .16s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .65; cursor: wait; }
.button-primary { background: var(--purple); color: #fff; box-shadow: 0 5px 12px #035ba42b; }
.button-primary:hover:not(:disabled) { background: var(--purple-dark); }
.button-full { width: 100%; margin-top: 6px; min-height: 46px; }
.button-secondary { background: #f3f4f9; color: #555b70; }
.button-secondary:hover { background: #e9eaf4; }
.login-footnote { color: #a4a8b7; text-align: center; font-size: 11px; margin: 22px 0 0; }
.error-message { color: #bd4545; font-size: 12px; min-height: 0; margin: 0; }
.error-message.success-message { color: #268360; }
.error-message:not(:empty) { margin-top: 12px; }
.login-decoration { position: absolute; inset: 0; pointer-events: none; }
.decoration-orb { position: absolute; display: block; border-radius: 50%; filter: blur(1px); }
.orb-one { width: 410px; height: 410px; right: -130px; top: -190px; background: linear-gradient(140deg, #eeeafe, #f8f6ff); }
.orb-two { width: 250px; height: 250px; left: -120px; bottom: -120px; background: linear-gradient(140deg, #eeebff, #f7f6ff); }
.decoration-line { position: absolute; width: 1px; height: 390px; right: 12%; top: 26%; transform: rotate(38deg); background: #ece9fa; }

.app-view { min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; width: 244px; display: flex; flex-direction: column; padding: 27px 17px 18px; z-index: 2; }
.sidebar-brand { padding: 0 9px; }
.workspace-label { margin: 47px 11px 13px; font-size: 9px; color: #a8adbb; letter-spacing: .13em; font-weight: 700; }
.sidebar nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #858a9e; padding: 11px 12px; font-size: 12px; font-weight: 600; border-radius: 8px; }
.nav-link.active, .nav-link:hover { color: #035ba4; background: #eaf4fb; }
.nav-icon { display: grid; place-items: center; font-size: 16px; width: 17px; }
.sidebar-bottom { margin-top: auto; }
.help-card { display: grid; gap: 8px; padding: 15px 13px; margin-bottom: 18px; border-radius: 11px; background: linear-gradient(145deg, #f4f2ff, #faf9ff); }
.help-icon { color: #035ba4; font-size: 17px; }
.help-card strong { color: #4a4771; font-size: 11px; }
.help-card > span:last-child { color: #9795ad; font-size: 10px; line-height: 1.5; }
.user-block { display: flex; gap: 9px; align-items: center; padding: 13px 3px 0; border-top: 1px solid var(--line); }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; background: #e7e4ff; color: #6658d5; font-size: 11px; font-weight: 700; }
.user-details { display: grid; gap: 4px; min-width: 0; flex: 1; }
.user-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #44485d; }
.user-details span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; color: #a0a5b3; }
.icon-button { display: grid; place-items: center; border: 0; background: transparent; color: #9297a8; border-radius: 7px; }
.icon-button:hover { background: #f1f0fa; color: #6658d5; }
.signout-button { width: 30px; height: 30px; font-size: 17px; }
.main-content { margin-left: 244px; min-height: 100vh; }
.topbar { height: 67px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); padding: 0 43px; }
.breadcrumb { color: #a1a5b3; font-size: 11px; }
.breadcrumb span { padding: 0 9px; color: #d3d5de; }
.breadcrumb strong { color: #656a7f; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.live-indicator { display: flex; align-items: center; gap: 7px; color: #777e91; font-size: 10px; }
.live-indicator i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #52bd93; box-shadow: 0 0 0 3px #52bd931d; }
.avatar-small { width: 29px; height: 29px; border-radius: 9px; }
.page-content { max-width: 1300px; padding: 42px 43px 55px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 29px; }
.page-heading h1 { font-family: "Manrope", sans-serif; font-size: clamp(22px, 2.4vw, 29px); letter-spacing: -.045em; margin: 0 0 9px; color: #24263c; }
.heading-dot { color: #8a7df0; }
.page-heading .muted, .panel-heading .muted { font-size: 12px; margin: 0; }
.plus { font-size: 19px; font-weight: 400; line-height: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { min-height: 127px; background: white; border: 1px solid #eff0f5; border-radius: 12px; padding: 16px 17px 14px; box-shadow: 0 3px 11px #26314a05; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #777d91; font-size: 10px; font-weight: 600; }
.stat-icon { display: grid; place-items: center; width: 27px; height: 27px; color: #035ba4; background: #eaf4fb; border-radius: 8px; font-size: 14px; }
.icon-lilac { color: #9574db; background: #f5efff; }
.icon-amber { color: #d99449; background: #fff5e9; }
.icon-mint { color: #3aab83; background: #eaf8f2; }
.stat-value { display: block; margin-top: 12px; color: #25273e; font: 800 24px "Manrope", sans-serif; letter-spacing: -.04em; }
.stat-caption { display: block; margin-top: 3px; color: #a2a6b4; font-size: 9px; }
.leads-panel { background: white; border: 1px solid #eff0f5; border-radius: 12px; box-shadow: 0 3px 11px #26314a05; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 20px 18px; }
.panel-heading h2 { font: 700 15px "Manrope", sans-serif; margin: 0 0 5px; color: #303249; letter-spacing: -.02em; }
.table-actions { display: flex; gap: 9px; }
.search-box { position: relative; width: 196px; display: block; }
.search-box > span { position: absolute; z-index: 1; left: 10px; top: 7px; color: #9da2b1; font-size: 20px; line-height: 1; }
.search-box input { height: 34px; border-color: #eceef3; padding-left: 31px; font-size: 10px; }
.filter-select { height: 34px; width: 126px; padding: 0 9px; border-color: #eceef3; color: #777d91; font-size: 10px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #fafbfc; }
th { padding: 11px 15px; color: #a1a6b4; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 20px; }
td { padding: 13px 15px; border-top: 1px solid #f0f1f5; color: #62677c; font-size: 10px; white-space: nowrap; }
tbody tr:hover { background: #fcfcff; }
.learner-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.learner-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: #f0efff; color: #7367dc; font-size: 9px; font-weight: 700; }
.learner-avatar.tone-1 { background: #eaf7f2; color: #3c9e78; }
.learner-avatar.tone-2 { background: #fff2e8; color: #c97b49; }
.learner-avatar.tone-3 { background: #f8eef5; color: #ad6d99; }
.learner-info { display: grid; gap: 4px; }
.learner-info strong { color: #41455b; font-size: 10px; font-weight: 700; }
.learner-info span { color: #a5a9b6; font-size: 9px; }
.stage-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; color: #6c63c9; background: #f1efff; font-size: 9px; font-weight: 600; }
.stage-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.stage-contacted { color: #ad7a34; background: #fff7e9; }
.stage-trial-booked { color: #477eab; background: #eef7ff; }
.stage-enrolled { color: #2e966e; background: #eaf8f1; }
.stage-not-interested { color: #a0a2ad; background: #f2f3f5; }
.followup-overdue { color: #c95050; font-weight: 700; }
.row-actions { display: flex; justify-content: flex-end; gap: 3px; }
.row-action { width: 27px; height: 27px; font-size: 13px; }
.panel-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f0f1f5; padding: 13px 20px; color: #a1a6b4; font-size: 9px; }
.footer-spark { color: #8b7df0; margin-left: 3px; }
.loading-state { padding: 50px 20px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #9a9eae; font-size: 11px; }
.spinner { width: 15px; height: 15px; border: 2px solid #e6e3fc; border-top-color: #7668e4; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { margin: 0 auto 11px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #f2f0ff; color: #7668e4; font-size: 19px; }
.empty-state h3 { margin: 0 0 6px; font: 700 13px "Manrope", sans-serif; color: #45495f; }
.empty-state p { margin: 0 0 15px; color: #a0a4b3; font-size: 10px; }
.empty-state .button { min-height: 34px; }
.compact-empty { padding: 34px 20px; }
.compact-empty p { margin-bottom: 0; }
.app-error { padding: 0 20px; }

.lead-dialog { width: min(100% - 32px, 620px); max-width: none; max-height: min(92vh, 760px); padding: 0; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 25px 100px #19193430; }
.lead-dialog::backdrop { background: #20213970; backdrop-filter: blur(3px); }
.dialog-form { padding: 27px 30px 24px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 23px; }
.dialog-heading h2 { margin: 0 0 6px; font: 800 21px "Manrope", sans-serif; letter-spacing: -.04em; }
.dialog-heading .muted { font-size: 11px; margin: 0; }
.close-button { width: 30px; height: 30px; font-size: 24px; font-weight: 300; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 13px; }
.form-grid label { font-size: 11px; }
.full-field { grid-column: 1 / -1; }
.required { color: #c85757; }
.form-grid input, .form-grid select { height: 39px; font-size: 11px; }
.form-grid textarea { font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid #eff0f5; padding-top: 17px; margin-top: 19px; }
.dialog-actions .button { min-width: 97px; min-height: 38px; }

@media (max-width: 1100px) {
  .sidebar { width: 205px; }
  .main-content { margin-left: 205px; }
  .topbar { padding: 0 28px; }
  .page-content { padding: 34px 28px 45px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .sidebar { width: 58px; padding: 18px 8px; align-items: center; }
  .sidebar-brand { padding: 0; }
  .sidebar-brand > span:last-child, .workspace-label, .nav-link:not(.active), .nav-link.active { font-size: 0; }
  .sidebar nav { margin-top: 35px; width: 100%; }
  .nav-link { justify-content: center; padding: 12px 0; }
  .nav-icon { font-size: 18px; }
  .help-card, .user-details, .signout-button { display: none; }
  .user-block { border: 0; padding: 0; }
  .main-content { margin-left: 58px; }
  .topbar { height: 56px; padding: 0 16px; }
  .breadcrumb { font-size: 10px; }
  .topbar-right { gap: 10px; }
  .live-indicator { font-size: 0; }
  .page-content { padding: 28px 16px 35px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .page-heading .button { width: 100%; }
  .page-heading .muted { line-height: 1.5; }
  .stats-grid { gap: 9px; margin-bottom: 18px; }
  .stat-card { min-height: 112px; padding: 12px; }
  .stat-top { gap: 5px; font-size: 9px; }
  .stat-value { font-size: 22px; margin-top: 10px; }
  .panel-heading { align-items: flex-start; flex-direction: column; padding: 17px 14px; }
  .table-actions { width: 100%; }
  .search-box { width: auto; flex: 1; }
  .filter-select { width: 115px; }
  th, td { padding-left: 10px; padding-right: 10px; }
  th:first-child, td:first-child { padding-left: 14px; }
  .panel-footer { padding: 12px 14px; }
}
@media (max-width: 430px) {
  .login-card { padding: 30px 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .dialog-form { padding: 23px 20px 18px; }
  .panel-footer > span:last-child { display: none; }
  .stat-caption { font-size: 8px; }
}
