:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #101722;
  --panel-strong: #15202d;
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef5f3;
  --muted: #9aa8ac;
  --accent: #37d6bd;
  --accent-2: #f5c46b;
  --danger: #ff7b86;
  --success: #70e2a3;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

/* AzubiPlus CRM */
.logo-link { display: inline-flex; align-items: center; padding: 0; overflow: hidden; border-radius: 10px; background: #fff; }
.logo-link img { display: block; width: 150px; height: 46px; object-fit: contain; }
.auth-logo { display: block; width: min(230px, 80%); max-height: 90px; object-fit: contain; margin: 0 auto 24px; border-radius: 12px; background: #fff; }
.sheet-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.sheet-form label { min-width: 0; }
.sheet-form input { width: 100%; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crm-azubi-block { padding: 20px; border: 1px solid var(--line, rgba(148,163,184,.25)); border-radius: 16px; background: rgba(148,163,184,.06); }
.crm-azubi-block .panel-head { margin-bottom: 14px; }
.crm-new-lead-button { float: right; margin: -54px 18px 12px 0; position: relative; z-index: 2; }
.crm-board-group.is-collapsed .crm-new-lead-button { margin-bottom: 10px; }
@media (max-width: 760px) { .sheet-form { grid-template-columns: 1fr; } .logo-link img { width: 120px; } }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-strong: #eef4f8;
  --line: rgba(15, 32, 46, 0.12);
  --text: #10202c;
  --muted: #647685;
  --accent: #008b7d;
  --accent-2: #b27308;
  --danger: #b82235;
  --success: #147c4e;
  --shadow: 0 20px 58px rgba(20, 42, 58, 0.11);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 max(16px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.88);
  backdrop-filter: blur(18px);
}

.brand-link {
  color: var(--text);
  font-weight: 800;
}

.topbar nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.topbar nav a,
.ghost-button,
.primary-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.topbar nav a {
  color: #cddbd8;
}

.ghost-button {
  border: 1px solid var(--line);
  background: transparent;
  color: #cddbd8;
  box-shadow: none;
}

.theme-toggle {
  min-width: 76px;
}

.primary-link {
  background: var(--accent);
  color: #04100e;
}

.secondary-link {
  border: 1px solid rgba(245, 196, 107, 0.32);
  background: rgba(245, 196, 107, 0.14);
  color: #ffe0a2;
}

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 68vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__image {
  background: url("assets/hero-insurance.png") center right / cover no-repeat;
  opacity: 0.82;
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.96) 0%, rgba(7, 9, 13, 0.82) 38%, rgba(7, 9, 13, 0.4) 78%),
    linear-gradient(0deg, rgba(7, 9, 13, 1) 0%, rgba(7, 9, 13, 0) 42%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  padding: 104px 0 42px;
}

.hero__copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 8ch;
  font-size: clamp(3.6rem, 11vw, 7.9rem);
  line-height: 0.91;
}

h2 {
  font-size: 1.65rem;
}

.hero__copy > p:not(.eyebrow):not(.advisor-chip) {
  max-width: 620px;
  margin: 24px 0 0;
  color: #d7e3e0;
  font-size: 1.08rem;
  line-height: 1.65;
}

.advisor-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 22px;
  padding: 0 14px;
  border: 1px solid rgba(55, 214, 189, 0.24);
  border-radius: 8px;
  background: rgba(55, 214, 189, 0.09);
  color: #d9f4f0;
  font-weight: 700;
}

.advisor-chip strong {
  margin-left: 6px;
}

.hero__stats {
  align-self: end;
  display: grid;
  gap: 12px;
}

.hero__stats div {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  min-height: 70px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(12, 19, 28, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero__stats span {
  color: var(--accent-2);
  font-weight: 800;
}

.hero__stats strong {
  font-size: 0.96rem;
}

.form-band {
  padding: 54px 0 76px;
  background:
    linear-gradient(180deg, #07090d 0%, #0b1118 42%, #080b10 100%);
}

.form-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(16, 23, 34, 0.86);
  box-shadow: var(--shadow);
}

.side-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.status-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.status-list span {
  padding: 12px 14px;
  border: 1px solid rgba(55, 214, 189, 0.2);
  background: rgba(55, 214, 189, 0.07);
  color: #cfe8e4;
  font-size: 0.9rem;
}

form {
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(14, 20, 29, 0.92);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label,
fieldset {
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
}

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

.inline-check input {
  width: 18px;
  min-height: 18px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 15, 22, 0.82);
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.form-grid > .wide {
  grid-column: 1 / -1;
}

.conditional-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 22px;
  margin: 10px 0 12px;
  padding: 28px;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(55, 214, 189, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(55, 214, 189, 0.095), rgba(245, 196, 107, 0.035)),
    rgba(9, 15, 22, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.conditional-section label {
  min-width: 0;
}

.conditional-section[hidden] {
  display: none;
}

.section-title {
  grid-column: 1 / -1;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title .eyebrow {
  margin-bottom: 8px;
}

.section-title h2 {
  font-size: 1.18rem;
}

label span,
legend {
  color: #dce8e5;
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #0a0f16;
  color: var(--text);
  outline: none;
  padding: 12px 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(55, 214, 189, 0.72);
  box-shadow: 0 0 0 4px rgba(55, 214, 189, 0.13);
  background: #0d141d;
}

fieldset {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
}

.rating {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) repeat(5, 54px) minmax(110px, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.rating > span {
  color: var(--muted);
  font-size: 0.84rem;
}

.rating label {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 48px;
  cursor: pointer;
}

.rating input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rating b {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f16;
  color: #dbe8e5;
}

.rating input:checked + b {
  border-color: rgba(55, 214, 189, 0.9);
  background: rgba(55, 214, 189, 0.16);
  color: #ffffff;
}

.actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

#form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

#form-status.is-success {
  color: var(--success);
}

#form-status.is-error,
.error {
  color: var(--danger);
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #04100e;
  cursor: pointer;
  font-weight: 800;
  padding: 0 22px;
  box-shadow: 0 16px 32px rgba(55, 214, 189, 0.22);
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.error {
  min-height: 18px;
  font-size: 0.78rem;
}

.has-error input,
.has-error select,
.has-error textarea {
  border-color: rgba(255, 123, 134, 0.8);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(120deg, rgba(55, 214, 189, 0.1), transparent 38%),
    linear-gradient(180deg, #07090d, #0d141d);
}

.auth-shell {
  width: min(440px, 100%);
}

.auth-shell-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  width: min(920px, 100%);
  gap: 22px;
  align-items: stretch;
}

.auth-panel,
.panel {
  border: 1px solid var(--line);
  background: rgba(14, 20, 29, 0.94);
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 30px;
}

.auth-art {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 32px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.95), rgba(7, 9, 13, 0.68)),
    url("assets/hero-insurance.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.auth-art h1 {
  max-width: 8ch;
  font-size: clamp(3rem, 7vw, 5rem);
}

.auth-art p:not(.eyebrow) {
  max-width: 420px;
  margin: 22px 0 0;
  color: #d7e3e0;
  line-height: 1.6;
}

.auth-panel h1 {
  max-width: none;
  margin-bottom: 24px;
  font-size: 2.4rem;
  line-height: 1;
}

.compact-form {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.form-note,
.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-note.is-success {
  color: var(--success);
}

.form-note.is-error {
  color: var(--danger);
}

.info-note {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(55, 214, 189, 0.2);
  border-radius: 8px;
  background: rgba(55, 214, 189, 0.07);
  color: #cfe8e4;
  font-size: 0.86rem;
  line-height: 1.45;
}

.info-note strong {
  color: var(--text);
}

.dashboard {
  padding: 48px 0 76px;
}

.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-head h1 {
  max-width: none;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.98;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.panel {
  padding: 24px;
}

.panel h2 {
  font-size: 1.35rem;
}

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

.metric-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(245, 196, 107, 0.28);
  border-radius: 8px;
  background: rgba(245, 196, 107, 0.09);
  color: #ffe0a2;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.dashboard-metrics {
  margin-bottom: 24px;
}

.metric-card {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(55, 214, 189, 0.18);
  border-radius: 8px;
  background: rgba(55, 214, 189, 0.06);
}

.metric-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.15;
}

.crm-call-card {
  display: grid;
  gap: 6px;
}

.crm-call-card-head {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.crm-call-card-head span {
  margin-bottom: 0;
}

.crm-call-period-select {
  width: auto;
  min-width: 92px;
  max-width: 112px;
  min-height: 24px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.table-input {
  min-height: 36px;
  margin: 0 0 8px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.small-input {
  width: 82px;
}

.table-actions {
  min-width: 150px;
}

.small-button {
  min-height: 34px;
  width: auto;
  margin: 0 0 8px;
  padding: 0 10px;
  box-shadow: none;
  font-size: 0.78rem;
}

.small-button.secondary {
  border: 1px solid rgba(245, 196, 107, 0.32);
  background: rgba(245, 196, 107, 0.14);
  color: #ffe0a2;
}

.danger-button {
  border: 1px solid rgba(255, 123, 134, 0.34);
  background: rgba(255, 123, 134, 0.12);
  color: #ffb5bd;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  margin: 0 0 8px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: none;
  font-size: 1rem;
}

.icon-button.danger {
  border-color: rgba(255, 123, 134, 0.34);
  background: rgba(255, 123, 134, 0.12);
  color: #ffb5bd;
}

.modal {
  width: min(560px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.wide-modal {
  width: min(980px, calc(100% - 28px));
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.modal-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 20, 29, 0.98);
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}

.crm-modal-head-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.crm-modal-top-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.crm-modal-status-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.crm-modal-head-actions .small-button,
.crm-modal-head-actions .icon-button {
  margin-bottom: 0;
}

.crm-modal-head-actions .primary-link {
  width: auto;
  min-height: 34px;
  margin-bottom: 0;
  padding: 0 14px;
}

.crm-offer-button {
  justify-self: end;
  min-width: 150px;
  margin-bottom: 0;
}

.crm-offer-view-slot {
  display: flex;
  align-items: end;
}

.crm-offer-view-slot .primary-link {
  width: auto;
  min-height: 44px;
  margin-bottom: 0;
  padding: 0 14px;
}

.crm-offer-grid {
  grid-template-columns: 1fr;
}

.crm-offer-grid label.wide {
  grid-column: 1;
}

.crm-offer-price-table {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(100, 255, 218, 0.22);
  border-radius: 8px;
  background: rgba(7, 18, 32, 0.64);
}

.crm-offer-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.72fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.crm-offer-price-table.is-cat-offer .crm-offer-row {
  grid-template-columns: minmax(92px, 0.72fr) repeat(2, minmax(0, 1fr));
}

.crm-offer-row-head {
  align-items: center;
  color: #8fb0ca;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-offer-row > strong {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #e7f2ff;
  font-size: 0.84rem;
}

.crm-offer-row label {
  margin-bottom: 0;
}

.crm-offer-row label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.crm-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.crm-status-select select {
  min-height: 34px;
  width: auto;
  min-width: 150px;
  padding: 6px 10px;
  border-color: rgba(138, 164, 255, 0.24);
  background: rgba(138, 164, 255, 0.09);
  color: #dce4ff;
  font-size: 0.8rem;
  font-weight: 900;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.academy-shell {
  padding: 38px 0 72px;
}

.academy-head h1 {
  max-width: none;
}

.academy-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.academy-sidebar {
  position: sticky;
  top: 88px;
}

.academy-nav-section {
  display: grid;
  gap: 14px;
  padding-top: 12px;
}

.academy-section-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.academy-section-tabs button {
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 0.82rem;
}

.academy-section-tabs button.is-active {
  border-color: rgba(55, 214, 189, 0.44);
  background: rgba(55, 214, 189, 0.14);
  color: var(--text);
}

.academy-nav-section + .academy-nav-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.academy-nav-section h3 {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.academy-nav-group {
  display: grid;
  gap: 8px;
}

.academy-nav-group > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.academy-module-link {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.academy-module-link.is-active {
  border-color: rgba(55, 214, 189, 0.62);
  background: rgba(55, 214, 189, 0.12);
}

.academy-module-link.is-locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.academy-module-link.is-locked strong::before {
  content: "Gesperrt · ";
  color: var(--accent-2);
  font-size: 0.78rem;
}

.academy-module-link small {
  color: var(--muted);
  font-weight: 800;
}

.academy-stage {
  min-height: 620px;
}

.academy-module-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.academy-module-head h2 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.academy-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.academy-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #0a0f16;
  color: #dce8e5;
  box-shadow: none;
  text-align: left;
}

.academy-step span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-2);
}

.academy-step.is-active {
  border-color: rgba(245, 196, 107, 0.58);
}

.academy-step.is-done,
.academy-step.is-unlocked {
  border-color: rgba(55, 214, 189, 0.5);
}

.academy-lesson {
  display: grid;
  gap: 18px;
}

.academy-lesson-title span {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.academy-lesson-title h3 {
  margin: 6px 0 0;
  font-size: 1.4rem;
}

.academy-video-frame {
  overflow: hidden;
  border: 1px solid rgba(55, 214, 189, 0.18);
  border-radius: 8px;
  background: #05080c;
  aspect-ratio: 16 / 9;
}

.academy-video-frame video,
.academy-video-placeholder {
  width: 100%;
  height: 100%;
}

.academy-video-frame video {
  display: block;
  background: #000;
}

.academy-video-placeholder {
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.academy-video-placeholder strong {
  color: var(--text);
  font-size: 1.2rem;
}

.academy-copy {
  margin: 0;
  color: #d7e3e0;
  line-height: 1.7;
}

.academy-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid rgba(245, 196, 107, 0.22);
  border-radius: 8px;
  background: rgba(245, 196, 107, 0.06);
  box-shadow: none;
}

.academy-upload .form-note {
  grid-column: 1 / -1;
}

.academy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.academy-quiz {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.academy-quiz.is-locked {
  opacity: 0.72;
}

.academy-quiz-form {
  display: grid;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.academy-question {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.academy-question legend {
  padding: 0 0 10px;
  color: var(--text);
  font-size: 1rem;
}

.quiz-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}

.quiz-option input {
  width: 18px;
  min-height: 18px;
}

.crm-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

.crm-head-actions select {
  width: min(320px, 100%);
}

.crm-tabs {
  margin-bottom: 18px;
}

.crm-board-chrome {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(10, 16, 24, 0.72);
}

.crm-board-tabs,
.crm-board-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.crm-board-tabs {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.crm-board-tab,
.crm-toolbar-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-weight: 800;
  box-shadow: none;
}

.crm-board-tab:hover,
.crm-toolbar-chip:hover,
.crm-board-tab.is-active {
  border-color: rgba(55, 214, 189, 0.45);
  background: rgba(55, 214, 189, 0.1);
  color: var(--text);
}

.crm-search-shell {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
  width: min(420px, 100%);
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.crm-search-shell span {
  color: var(--muted);
  font-weight: 900;
}

.crm-search-shell input {
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
}

.crm-board {
  display: grid;
  gap: 14px;
}

.crm-board-group {
  --group-accent: var(--mint);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--group-accent);
  border-radius: 8px;
  background: rgba(13, 20, 30, 0.86);
}

.crm-board-group:nth-child(2n) {
  --group-accent: #f5c46b;
}

.crm-board-group:nth-child(3n) {
  --group-accent: #8aa4ff;
}

.crm-board-group.is-empty {
  opacity: 0.72;
}

.crm-board-group-head {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.crm-board-group-head strong,
.crm-board-group-head small {
  display: block;
}

.crm-board-group-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.crm-group-chevron {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(55, 214, 189, 0.12);
  color: var(--group-accent);
  font-weight: 900;
  transition: transform 0.16s ease;
}

.crm-board-group.is-collapsed .crm-group-chevron {
  transform: rotate(-90deg);
}

.crm-board-group.is-collapsed .crm-board-table-wrap {
  display: none;
}

.crm-board-table-wrap {
  overflow-x: auto;
}

.crm-board-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.crm-reminder-table {
  min-width: 980px;
}

.crm-board-table th,
.crm-board-table td {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  vertical-align: middle;
}

.crm-board-table th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-board-row {
  cursor: pointer;
  transition: background 0.14s ease;
}

.crm-board-row:hover {
  background: rgba(55, 214, 189, 0.055);
}

.crm-lead-main button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 190px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.crm-lead-main strong {
  color: var(--text);
}

.crm-attempt-pill {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(var(--attempt-rgb), 0.62);
  border-radius: 8px;
  background: rgb(var(--attempt-rgb));
  color: #ffffff;
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 900;
}

.crm-attempt-pill:hover {
  filter: brightness(1.08);
}

.crm-board-table td.crm-reminder-name {
  text-align: center;
}

.crm-board-table td.crm-reminder-name button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  text-align: center;
}

.crm-board-table td.crm-reminder-name strong {
  display: block;
  width: 100%;
  line-height: 1.25;
}

.crm-lead-main span,
.crm-cell-stack small {
  color: var(--muted);
  font-size: 0.82rem;
}

.crm-cell-stack {
  display: grid;
  gap: 3px;
}

.crm-status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(138, 164, 255, 0.24);
  border-radius: 8px;
  background: rgba(138, 164, 255, 0.09);
  color: #dce4ff;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
}

.crm-status-pill.is-success {
  border-color: rgba(55, 214, 189, 0.3);
  background: rgba(55, 214, 189, 0.11);
  color: #bff7ec;
}

.crm-status-pill.is-warning {
  border-color: rgba(245, 196, 107, 0.32);
  background: rgba(245, 196, 107, 0.11);
  color: #ffe0a2;
}

.crm-status-pill.is-muted {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
}

.crm-row-actions {
  white-space: nowrap;
}

.crm-empty-row {
  color: var(--muted);
  text-align: center;
}

.crm-potential-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.crm-potential-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 1px solid rgba(245, 196, 107, 0.2);
  border-radius: 8px;
  background: rgba(245, 196, 107, 0.06);
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.crm-potential-card span,
.crm-potential-card small {
  color: var(--muted);
}

.crm-empty-state {
  display: grid;
  gap: 10px;
  min-height: 220px;
  align-content: center;
}

.crm-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.crm-detail-grid .wide {
  grid-column: 1 / -1;
}

.crm-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.crm-attempt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

[data-call-phone] {
  cursor: pointer;
}

.crm-lead-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crm-info-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.crm-info-box-head {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.crm-info-box-head strong,
.crm-info-box-head small {
  display: block;
}

.crm-info-box-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.crm-info-box .crm-lead-fields {
  padding: 14px;
}

.crm-info-box.is-collapsed .crm-lead-fields {
  display: none;
}

.crm-info-box.is-collapsed .crm-group-chevron {
  transform: rotate(-90deg);
}

.crm-field-chip,
.crm-history-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.crm-field-chip span,
.crm-history-item small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-field-chip strong,
.crm-history-item span {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
}

.crm-history {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
}

.crm-animal-blocks {
  display: grid;
  gap: 12px;
}

.crm-animal-block {
  padding: 14px;
  border: 1px solid rgba(55, 214, 189, 0.18);
  border-radius: 8px;
  background: rgba(55, 214, 189, 0.055);
}

.crm-animal-block h3 {
  margin: 0;
}

.crm-animal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crm-animal-grid span {
  display: grid;
  gap: 4px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.crm-animal-grid strong {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  color: #dce8e5;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero__content,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .hero__content {
    gap: 32px;
    padding-top: 92px;
  }

  .hero__stats {
    max-width: 520px;
  }

  .side-panel {
    position: static;
  }

  .dashboard-head,
  .dashboard-grid,
  .academy-layout {
    grid-template-columns: 1fr;
  }

  .academy-sidebar {
    position: static;
  }

  .dashboard-head {
    display: grid;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-shell-wide {
    grid-template-columns: 1fr;
  }

  .auth-art {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 22px, 1160px);
  }

  h1 {
    font-size: 4.2rem;
  }

  form,
  .side-panel {
    padding: 18px;
  }

  .form-grid,
  .conditional-section,
  .rating,
  .actions {
    grid-template-columns: 1fr;
  }

  .rating {
    display: flex;
    flex-wrap: wrap;
  }

  .rating > span {
    width: 100%;
  }

  .actions {
    display: grid;
  }

  button {
    width: 100%;
  }

  .topbar {
    position: static;
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .topbar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .auth-panel,
  .auth-art,
  .panel {
    padding: 18px;
  }

  .primary-link {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .academy-module-head,
  .academy-upload,
  .academy-actions,
  .crm-head-actions,
  .crm-detail-actions,
  .crm-detail-grid,
  .crm-lead-fields {
    display: grid;
  }

  .crm-detail-grid,
  .crm-lead-fields,
  .crm-animal-grid {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="light"] body {
  background:
    linear-gradient(180deg, #f9fbfd 0%, #edf4f7 100%);
}

:root[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.88);
}

:root[data-theme="light"] .topbar nav a,
:root[data-theme="light"] .ghost-button {
  color: #314655;
}

:root[data-theme="light"] .primary-link,
:root[data-theme="light"] button {
  color: #ffffff;
}

:root[data-theme="light"] .hero__image {
  opacity: 0.38;
}

:root[data-theme="light"] .hero__shade {
  background:
    linear-gradient(90deg, rgba(248, 251, 253, 0.98) 0%, rgba(248, 251, 253, 0.88) 43%, rgba(248, 251, 253, 0.5) 82%),
    linear-gradient(0deg, rgba(244, 247, 251, 1) 0%, rgba(244, 247, 251, 0) 46%);
}

:root[data-theme="light"] .hero__copy > p:not(.eyebrow):not(.advisor-chip),
:root[data-theme="light"] .academy-copy,
:root[data-theme="light"] td {
  color: #314655;
}

:root[data-theme="light"] .form-band,
:root[data-theme="light"] .auth-page {
  background:
    linear-gradient(180deg, #f4f7fb 0%, #eaf2f5 100%);
}

:root[data-theme="light"] .auth-art {
  background:
    linear-gradient(90deg, rgba(248, 251, 253, 0.94), rgba(248, 251, 253, 0.62)),
    url("assets/hero-insurance.png") center / cover no-repeat;
}

:root[data-theme="light"] .auth-art p:not(.eyebrow) {
  color: #314655;
}

:root[data-theme="light"] form,
:root[data-theme="light"] .auth-panel,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .side-panel,
:root[data-theme="light"] .modal-panel {
  background: rgba(255, 255, 255, 0.94);
}

:root[data-theme="light"] .hero__stats div,
:root[data-theme="light"] .conditional-section,
:root[data-theme="light"] .crm-board-chrome,
:root[data-theme="light"] .crm-board-group,
:root[data-theme="light"] .crm-info-box,
:root[data-theme="light"] .crm-offer-price-table {
  background: rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] .rating b,
:root[data-theme="light"] .academy-step {
  border-color: rgba(15, 32, 46, 0.16);
  background: #ffffff;
  color: var(--text);
}

:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus {
  background: #ffffff;
}

:root[data-theme="light"] label span,
:root[data-theme="light"] legend,
:root[data-theme="light"] .academy-step,
:root[data-theme="light"] .crm-status-select select,
:root[data-theme="light"] .crm-offer-row > strong {
  color: #1d3343;
}

:root[data-theme="light"] .advisor-chip,
:root[data-theme="light"] .status-list span,
:root[data-theme="light"] .info-note,
:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .academy-module-link.is-active,
:root[data-theme="light"] .crm-board-tab:hover,
:root[data-theme="light"] .crm-toolbar-chip:hover,
:root[data-theme="light"] .crm-board-tab.is-active,
:root[data-theme="light"] .crm-animal-block {
  background: rgba(0, 139, 125, 0.08);
  color: #17453f;
}

:root[data-theme="light"] .secondary-link,
:root[data-theme="light"] .small-button.secondary,
:root[data-theme="light"] .metric-pill,
:root[data-theme="light"] .crm-status-pill.is-warning,
:root[data-theme="light"] .crm-potential-card,
:root[data-theme="light"] .academy-upload {
  background: rgba(178, 115, 8, 0.08);
  color: #825506;
}

:root[data-theme="light"] .crm-board-tabs,
:root[data-theme="light"] .crm-board-table th,
:root[data-theme="light"] .crm-board-table td,
:root[data-theme="light"] .section-title,
:root[data-theme="light"] th,
:root[data-theme="light"] td {
  border-color: rgba(15, 32, 46, 0.1);
}

:root[data-theme="light"] .crm-board-tab,
:root[data-theme="light"] .crm-toolbar-chip,
:root[data-theme="light"] .crm-call-period-select,
:root[data-theme="light"] .crm-search-shell,
:root[data-theme="light"] .academy-section-tabs,
:root[data-theme="light"] .academy-module-link,
:root[data-theme="light"] .academy-question,
:root[data-theme="light"] .crm-field-chip,
:root[data-theme="light"] .crm-history-item,
:root[data-theme="light"] .crm-info-box-head,
:root[data-theme="light"] .crm-board-group-head {
  background: rgba(15, 32, 46, 0.035);
  color: var(--text);
}

:root[data-theme="light"] .crm-board-table td,
:root[data-theme="light"] .crm-cell-stack span,
:root[data-theme="light"] .crm-lead-main strong,
:root[data-theme="light"] .crm-lead-main button,
:root[data-theme="light"] .crm-field-chip strong,
:root[data-theme="light"] .crm-history-item span,
:root[data-theme="light"] .crm-animal-grid span {
  color: #0c1f2e;
}

:root[data-theme="light"] .crm-lead-main span,
:root[data-theme="light"] .crm-cell-stack small,
:root[data-theme="light"] .crm-board-table th,
:root[data-theme="light"] .crm-field-chip span,
:root[data-theme="light"] .crm-history-item small,
:root[data-theme="light"] .crm-animal-grid strong {
  color: #4c6273;
}

:root[data-theme="light"] .crm-attempt-pill {
  border-color: rgba(var(--attempt-rgb), 0.5);
  background: rgb(var(--attempt-rgb));
  color: #ffffff;
}

:root[data-theme="light"] .crm-status-pill,
:root[data-theme="light"] .crm-status-select select {
  background: rgba(61, 91, 180, 0.08);
  color: #243f86;
}

:root[data-theme="light"] .crm-status-pill.is-success {
  background: rgba(0, 139, 125, 0.08);
  color: #0f6f63;
}

:root[data-theme="light"] .crm-status-pill.is-muted,
:root[data-theme="light"] .icon-button {
  background: rgba(15, 32, 46, 0.04);
  color: var(--muted);
}

:root[data-theme="light"] .danger-button,
:root[data-theme="light"] .icon-button.danger {
  background: rgba(184, 34, 53, 0.08);
  color: #9d2030;
}

:root[data-theme="light"] .modal::backdrop {
  background: rgba(15, 32, 46, 0.28);
}
