:root {
  color-scheme: dark;
  --bg: #050608;
  --panel: #0e1116;
  --panel-strong: #0a0d11;
  --panel-soft: #131821;
  --panel-elevated: rgba(12, 15, 20, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f6f9;
  --text-soft: #c8d0d9;
  --muted: #98a0aa;
  --muted-strong: #b5bcc5;
  --accent: #efff2c;
  --accent-strong: #bfd813;
  --cyan: #34d6ff;
  --green: #7df2b6;
  --yellow: #f2d75e;
  --orange: #ffac57;
  --red: #ff7b68;
  --purple: #6f31ff;
  --pink: #ff4f95;
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --shadow-lg: 0 22px 44px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 34px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 12px 24px rgba(0, 0, 0, 0.18);
  --ring: 0 0 0 3px rgba(239, 255, 44, 0.14);
  --max-width: 440px;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f4ec;
  --panel: #ffffff;
  --panel-strong: #f0ece2;
  --panel-soft: #f6f1e6;
  --panel-elevated: rgba(255, 251, 244, 0.96);
  --line: rgba(50, 43, 33, 0.08);
  --line-strong: rgba(50, 43, 33, 0.14);
  --text: #181511;
  --text-soft: #433b30;
  --muted: #736757;
  --muted-strong: #5c5244;
  --accent: #c5d928;
  --accent-strong: #98a40f;
  --cyan: #1682aa;
  --green: #2b9d66;
  --yellow: #b89318;
  --orange: #cb7a19;
  --red: #ca5b4d;
  --purple: #6440d8;
  --pink: #d94a7b;
  --shadow-lg: 0 22px 44px rgba(74, 58, 39, 0.12);
  --shadow-md: 0 16px 34px rgba(74, 58, 39, 0.1);
  --shadow-sm: 0 12px 24px rgba(74, 58, 39, 0.08);
  --ring: 0 0 0 3px rgba(152, 164, 15, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    linear-gradient(118deg, rgba(239, 255, 44, 0.14) 0%, rgba(239, 255, 44, 0) 30%),
    radial-gradient(980px 480px at 18% -4%, rgba(239, 255, 44, 0.18) 0%, rgba(239, 255, 44, 0) 58%),
    radial-gradient(900px 440px at 100% 10%, rgba(255, 79, 149, 0.1) 0%, rgba(255, 79, 149, 0) 44%),
    radial-gradient(700px 320px at 60% 100%, rgba(111, 49, 255, 0.1) 0%, rgba(111, 49, 255, 0) 48%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background:
    linear-gradient(104deg, transparent 0 47%, rgba(255, 255, 255, 0.04) 49%, transparent 51%) 0 0 / 360px 100%,
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 120px 100%;
}

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

a {
  color: inherit;
}

:is(button, input, textarea, select, a):focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.hidden {
  display: none !important;
}

.orb {
  display: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 20px), var(--max-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0 calc(28px + env(safe-area-inset-bottom, 0px));
}

.shell {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.shell--loading,
.shell--request,
.shell--company {
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.shell--app {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 24, 31, 0.94) 0%, rgba(9, 11, 16, 0.98) 100%);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.brand-mark::before {
  content: "";
  width: 34px;
  height: 34px;
  position: relative;
  z-index: 1;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3E%3Cpath d='M16 13C12.686 13 10 15.686 10 19V35C10 38.314 12.686 41 16 41H22V51L33 41H48C51.314 41 54 38.314 54 35V19C54 15.686 51.314 13 48 13H16Z' fill='%2334D6FF'/%3E%3Cpath d='M28 22L43 29.5L28 37V22Z' fill='%23EFFF2C'/%3E%3C/svg%3E")
    center / contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(52, 214, 255, 0.22));
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  background: radial-gradient(circle at 26% 24%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 55%);
}

.brand-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-copy {
  min-width: 0;
}

.brand-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.brand-version {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border: 1px solid rgba(239, 255, 44, 0.18);
  border-radius: 999px;
  background: rgba(239, 255, 44, 0.08);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-theme="light"] .brand-version {
  border-color: rgba(152, 164, 15, 0.22);
  background: rgba(152, 164, 15, 0.08);
  color: var(--accent-strong);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2rem, 8vw, 2.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: 12ch;
}

h2 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.muted {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.loading-line {
  width: min(320px, 100%);
  height: 10px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.loading-bar {
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  animation: loadingBar 1.6s ease-in-out infinite;
}

.hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.request-card,
.dev-login {
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 20, 26, 0.94) 0%, rgba(9, 11, 16, 0.98) 100%);
  box-shadow: var(--shadow-md);
}

.company-screen {
  width: 100%;
  padding: 22px 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(118deg, rgba(239, 255, 44, 0.09) 0%, rgba(239, 255, 44, 0) 34%),
    linear-gradient(180deg, rgba(17, 20, 26, 0.94) 0%, rgba(9, 11, 16, 0.98) 100%);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 18px;
}

.company-screen__copy {
  display: grid;
  gap: 12px;
}

.company-screen__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.company-picker-card {
  appearance: none;
  min-height: 132px;
  padding: 18px 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  display: grid;
  align-content: space-between;
  gap: 18px;
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.company-picker-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(239, 255, 44, 0.18);
  background:
    linear-gradient(180deg, rgba(239, 255, 44, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.company-picker-card:active:not(:disabled) {
  transform: scale(0.985);
}

.company-picker-card:disabled {
  cursor: default;
}

.company-picker-card.is-active {
  border-color: rgba(239, 255, 44, 0.28);
  background:
    linear-gradient(140deg, rgba(239, 255, 44, 0.18) 0%, rgba(239, 255, 44, 0.06) 52%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: 0 18px 30px rgba(191, 216, 19, 0.14);
}

.company-picker-card.is-pending {
  border-color: rgba(52, 214, 255, 0.26);
  background:
    linear-gradient(140deg, rgba(52, 214, 255, 0.16) 0%, rgba(52, 214, 255, 0.06) 52%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: 0 18px 30px rgba(52, 214, 255, 0.12);
}

.company-picker-card__title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.18rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.company-picker-card__state {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.field span {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select,
.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field textarea {
  min-height: 108px;
}

.field input::placeholder,
.field textarea::placeholder,
.field select::placeholder,
.search-box input::placeholder {
  color: #6f7882;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-box input:focus {
  border-color: rgba(239, 255, 44, 0.32);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--ring);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-small {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.84rem;
}

.btn-chip {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.btn-solid {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: rgba(239, 255, 44, 0.18);
  color: #0a0d11;
  box-shadow: 0 16px 26px rgba(191, 216, 19, 0.22);
}

.btn-solid:hover:not(:disabled) {
  filter: brightness(1.02);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(239, 255, 44, 0.18);
  background: rgba(239, 255, 44, 0.06);
}

.btn-soft {
  border-color: rgba(52, 214, 255, 0.16);
  background: rgba(52, 214, 255, 0.08);
  color: var(--text);
}

.btn-soft:hover:not(:disabled) {
  background: rgba(52, 214, 255, 0.12);
}

.btn-pulse {
  position: relative;
  z-index: 0;
  animation: ctaPulse 2.4s ease-in-out infinite;
}

.btn-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px solid rgba(239, 255, 44, 0.2);
  border-radius: 22px;
  z-index: -1;
  pointer-events: none;
  animation: ctaRing 2.4s ease-out infinite;
}

.request-card .btn,
.dev-login .btn,
.sheet-actions .btn {
  width: 100%;
}

.topbar,
.hero-panel,
.segment-panel,
.metrics-panel,
.ranking-panel,
.controls-panel,
.leads-panel,
.agenda-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(16, 19, 25, 0.94) 0%, rgba(9, 11, 15, 0.96) 100%);
  box-shadow: var(--shadow-md);
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(10px);
}

body[data-theme="light"] .topbar,
body[data-theme="light"] .hero-panel,
body[data-theme="light"] .segment-panel,
body[data-theme="light"] .metrics-panel,
body[data-theme="light"] .ranking-panel,
body[data-theme="light"] .controls-panel,
body[data-theme="light"] .leads-panel,
body[data-theme="light"] .agenda-panel {
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.96) 0%, rgba(245, 239, 229, 0.98) 100%);
}

body[data-theme="light"] .request-card,
body[data-theme="light"] .dev-login,
body[data-theme="light"] .metric-card,
body[data-theme="light"] .segment-card,
body[data-theme="light"] .ranking-card,
body[data-theme="light"] .ranking-row,
body[data-theme="light"] .lead-card,
body[data-theme="light"] .meta-box,
body[data-theme="light"] .filter-tile,
body[data-theme="light"] .detail-card,
body[data-theme="light"] .detail-hero,
body[data-theme="light"] .detail-metric,
body[data-theme="light"] .detail-note,
body[data-theme="light"] .option-row--toggle,
body[data-theme="light"] .admin-card,
body[data-theme="light"] .admin-card__note,
body[data-theme="light"] .lookup-option,
body[data-theme="light"] .sheet-panel {
  background: rgba(255, 255, 255, 0.88);
}

body[data-theme="light"] .company-screen {
  background:
    linear-gradient(118deg, rgba(152, 164, 15, 0.1) 0%, rgba(152, 164, 15, 0) 34%),
    linear-gradient(180deg, rgba(255, 251, 244, 0.97) 0%, rgba(245, 239, 229, 0.99) 100%);
}

body[data-theme="light"] .company-picker-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 244, 235, 0.98) 100%);
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  appearance: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 255, 44, 0.18);
  background: rgba(239, 255, 44, 0.08);
}

.icon-btn.is-active {
  border-color: rgba(239, 255, 44, 0.24);
  background: rgba(239, 255, 44, 0.12);
  color: var(--accent);
}

.hero-panel {
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(108deg, rgba(239, 255, 44, 0.12) 0%, rgba(239, 255, 44, 0) 34%),
    linear-gradient(114deg, transparent 52%, rgba(255, 255, 255, 0.05) 52.3%, transparent 52.8%);
  pointer-events: none;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  top: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 255, 44, 0.18) 0%, rgba(239, 255, 44, 0) 72%);
  pointer-events: none;
}

.hero-copy,
.metrics-grid {
  position: relative;
  z-index: 1;
}

.hero-copy {
  padding: 22px;
}

.hero-copy--compact {
  padding-bottom: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(239, 255, 44, 0.16);
  background: rgba(239, 255, 44, 0.08);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin-top: 12px;
  max-width: 13ch;
  font-size: clamp(2.2rem, 8vw, 3.05rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.hero-title--home {
  max-width: none;
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 0.02em;
}

.hero-title__line {
  display: flex;
  align-items: flex-end;
  gap: 0.18em;
  white-space: nowrap;
}

.hero-title__emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.56em;
  line-height: 1;
  transform: translateY(-0.05em);
}

.hero-copy .lead {
  margin-top: 12px;
}

.status-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(239, 255, 44, 0.18);
  background: rgba(239, 255, 44, 0.08);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
}

.status-note.is-scheduled {
  border-color: rgba(52, 214, 255, 0.18);
  background: rgba(52, 214, 255, 0.08);
}

.metrics-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 16px 18px 18px;
}

.metric-card {
  min-height: 164px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 20, 26, 0.94) 0%, rgba(9, 11, 16, 0.98) 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metric-card--action {
  justify-content: flex-start;
}

.metric-card[data-metric="total"] {
  border-color: rgba(239, 255, 44, 0.16);
  background:
    radial-gradient(circle at 100% 0, rgba(239, 255, 44, 0.1), rgba(239, 255, 44, 0) 58%),
    linear-gradient(135deg, rgba(30, 38, 14, 0.82) 0%, rgba(14, 17, 12, 0.88) 46%, rgba(8, 10, 12, 0.94) 100%);
}

.metric-card[data-metric="worked"] {
  border-color: rgba(125, 242, 182, 0.18);
  background:
    radial-gradient(circle at 100% 0, rgba(125, 242, 182, 0.1), rgba(125, 242, 182, 0) 56%),
    linear-gradient(135deg, rgba(15, 36, 28, 0.82) 0%, rgba(11, 17, 15, 0.88) 46%, rgba(8, 10, 12, 0.94) 100%);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: auto;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2.1rem, 7vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.metric-copy {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 28ch;
}

.metric-card__action {
  margin-top: 10px;
  width: fit-content;
  min-width: 132px;
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.metric-card[data-metric="total"] .metric-card__action {
  border-color: rgba(239, 255, 44, 0.14);
  background: linear-gradient(135deg, rgba(239, 255, 44, 0.18) 0%, rgba(191, 216, 19, 0.22) 100%);
  box-shadow: 0 12px 20px rgba(191, 216, 19, 0.08);
}

.metric-card[data-metric="worked"] .metric-card__action {
  border-color: rgba(125, 242, 182, 0.15);
  background: linear-gradient(135deg, rgba(125, 242, 182, 0.16) 0%, rgba(49, 157, 102, 0.22) 100%);
  box-shadow: 0 12px 20px rgba(49, 157, 102, 0.08);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}

.section-head__copy {
  min-width: 0;
}

.section-head--results {
  align-items: center;
}

.section-head--results .btn {
  flex-shrink: 0;
}

.segment-panel .section-head {
  padding-top: 22px;
}

.segment-panel .section-head h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.segment-panel .section-head .muted {
  margin-top: 6px;
  font-size: 0.88rem;
}

.segment-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 18px 18px 20px;
}

.segment-card {
  position: relative;
  overflow: hidden;
  min-height: 236px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 20, 26, 0.94) 0%, rgba(9, 11, 16, 0.98) 100%);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.segment-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -42px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  pointer-events: none;
}

.segment-card[data-zone="green"] {
  border-color: rgba(239, 255, 44, 0.18);
  background:
    radial-gradient(circle at 100% 0, rgba(239, 255, 44, 0.1), rgba(239, 255, 44, 0) 56%),
    linear-gradient(135deg, rgba(30, 38, 14, 0.82) 0%, rgba(14, 17, 12, 0.88) 46%, rgba(8, 10, 12, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 30px rgba(126, 142, 18, 0.1);
}

.segment-card[data-zone="green"]::after {
  background: radial-gradient(circle, rgba(239, 255, 44, 0.12), rgba(239, 255, 44, 0));
}

.segment-card[data-zone="yellow"] {
  border-color: rgba(242, 215, 94, 0.18);
  background:
    radial-gradient(circle at 100% 0, rgba(242, 215, 94, 0.11), rgba(242, 215, 94, 0) 58%),
    linear-gradient(135deg, rgba(42, 32, 16, 0.82) 0%, rgba(21, 17, 11, 0.88) 48%, rgba(8, 10, 12, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 30px rgba(190, 132, 29, 0.1);
}

.segment-card[data-zone="yellow"]::after {
  background: radial-gradient(circle, rgba(242, 215, 94, 0.13), rgba(242, 215, 94, 0));
}

.segment-card[data-zone="worked"] {
  border-color: rgba(125, 242, 182, 0.18);
  background:
    radial-gradient(circle at 100% 0, rgba(125, 242, 182, 0.1), rgba(125, 242, 182, 0) 56%),
    linear-gradient(135deg, rgba(15, 36, 28, 0.82) 0%, rgba(11, 17, 15, 0.88) 46%, rgba(8, 10, 12, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 30px rgba(49, 143, 96, 0.1);
}

.segment-card[data-zone="worked"]::after {
  background: radial-gradient(circle, rgba(125, 242, 182, 0.12), rgba(125, 242, 182, 0));
}

.segment-card[data-zone="orange"] {
  border-color: rgba(255, 172, 87, 0.2);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 172, 87, 0.16), rgba(255, 172, 87, 0) 52%),
    linear-gradient(180deg, rgba(30, 21, 14, 0.98) 0%, rgba(11, 10, 11, 0.98) 100%);
}

.segment-card[data-zone="orange"]::after {
  background: radial-gradient(circle, rgba(255, 172, 87, 0.18), rgba(255, 172, 87, 0));
}

.segment-card[data-zone="red"] {
  border-color: rgba(255, 123, 104, 0.2);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 123, 104, 0.16), rgba(255, 123, 104, 0) 52%),
    linear-gradient(180deg, rgba(30, 19, 20, 0.98) 0%, rgba(11, 10, 11, 0.98) 100%);
}

.segment-card[data-zone="red"]::after {
  background: radial-gradient(circle, rgba(255, 123, 104, 0.18), rgba(255, 123, 104, 0));
}

.segment-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.segment-card__title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.segment-card__priority {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.segment-card__description {
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 26ch;
}

.segment-card__count {
  margin-top: auto;
  padding-top: 28px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2.35rem, 7vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.segment-card__action {
  margin-top: 18px;
  width: 100%;
  min-height: 52px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.segment-card[data-zone="green"] .segment-card__action {
  border-color: rgba(239, 255, 44, 0.14);
  background: linear-gradient(135deg, rgba(239, 255, 44, 0.18) 0%, rgba(191, 216, 19, 0.22) 100%);
  color: var(--text);
  box-shadow: 0 12px 20px rgba(191, 216, 19, 0.08);
}

.segment-card[data-zone="yellow"] .segment-card__action {
  border-color: rgba(242, 215, 94, 0.15);
  background: linear-gradient(135deg, rgba(242, 215, 94, 0.18) 0%, rgba(196, 139, 31, 0.22) 100%);
  color: var(--text);
  box-shadow: 0 12px 20px rgba(196, 139, 31, 0.08);
}

.segment-card[data-zone="worked"] .segment-card__action {
  border-color: rgba(125, 242, 182, 0.15);
  background: linear-gradient(135deg, rgba(125, 242, 182, 0.16) 0%, rgba(49, 157, 102, 0.22) 100%);
  color: var(--text);
  box-shadow: 0 12px 20px rgba(49, 157, 102, 0.08);
}

.segment-card.is-active {
  outline: 2px solid rgba(239, 255, 44, 0.26);
  outline-offset: -2px;
}

.segment-card[data-zone="yellow"].is-active {
  outline-color: rgba(242, 215, 94, 0.28);
}

.segment-card[data-zone="worked"].is-active {
  outline-color: rgba(125, 242, 182, 0.28);
}

.quick-actions-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.96) 0%, rgba(9, 11, 16, 0.98) 100%);
  box-shadow: var(--shadow-md);
}

.quick-actions-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px 18px 18px;
}

.quick-action-card {
  appearance: none;
  min-height: 148px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 20, 26, 0.94) 0%, rgba(9, 11, 16, 0.98) 100%);
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.quick-action-card:hover {
  transform: translateY(-1px);
}

.quick-action-card[data-quick-action="vacation"] {
  border-color: rgba(239, 255, 44, 0.16);
  background:
    radial-gradient(circle at 100% 0, rgba(239, 255, 44, 0.1), rgba(239, 255, 44, 0) 58%),
    linear-gradient(135deg, rgba(30, 38, 14, 0.82) 0%, rgba(14, 17, 12, 0.88) 46%, rgba(8, 10, 12, 0.94) 100%);
}

.quick-action-card[data-quick-action="push"] {
  border-color: rgba(255, 184, 86, 0.18);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 184, 86, 0.12), rgba(255, 184, 86, 0) 58%),
    linear-gradient(135deg, rgba(36, 24, 12, 0.84) 0%, rgba(18, 13, 10, 0.9) 48%, rgba(8, 10, 12, 0.96) 100%);
}

.quick-action-card[data-quick-action="support"] {
  border-color: rgba(52, 214, 255, 0.18);
  background:
    radial-gradient(circle at 100% 0, rgba(52, 214, 255, 0.12), rgba(52, 214, 255, 0) 58%),
    linear-gradient(135deg, rgba(14, 26, 36, 0.84) 0%, rgba(10, 14, 18, 0.9) 48%, rgba(8, 10, 12, 0.96) 100%);
}

.quick-action-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.4rem;
}

.quick-action-card__title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.quick-action-card__copy {
  color: var(--muted-strong);
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 28ch;
}

.ranking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 16px 18px 18px;
}

.ranking-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 20, 26, 0.94) 0%, rgba(9, 11, 16, 0.98) 100%);
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.ranking-index {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(239, 255, 44, 0.08);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
}

.ranking-name {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--text);
}

.ranking-subtitle {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.ranking-value {
  text-align: right;
}

.ranking-score {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.controls-panel {
  padding: 16px 18px 18px;
}

.controls-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.search-box input {
  min-height: 52px;
}

.controls-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.controls-actions .btn {
  flex: 1;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.company-pill {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.company-pill.is-active {
  border-color: rgba(239, 255, 44, 0.2);
  background: rgba(239, 255, 44, 0.1);
}

.chip,
.badge,
.flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.chip {
  border: 1px solid rgba(239, 255, 44, 0.18);
  background: rgba(239, 255, 44, 0.08);
  color: var(--text);
}

.chip button {
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border-radius: 999px;
  cursor: pointer;
}

.leads-panel {
  padding-bottom: 10px;
}

.lead-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 12px;
}

.lead-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 20, 26, 0.94) 0%, rgba(9, 11, 16, 0.98) 100%);
  box-shadow: var(--shadow-sm);
}

.lead-card.is-worked {
  border-color: rgba(125, 242, 182, 0.26);
  background:
    radial-gradient(circle at 100% 0, rgba(125, 242, 182, 0.12), rgba(125, 242, 182, 0) 48%),
    linear-gradient(180deg, rgba(15, 28, 21, 0.94) 0%, rgba(9, 13, 11, 0.98) 100%);
}

.lead-card.is-ncz {
  border-color: rgba(152, 163, 178, 0.22);
  background:
    radial-gradient(circle at 100% 0, rgba(152, 163, 178, 0.1), rgba(152, 163, 178, 0) 48%),
    linear-gradient(180deg, rgba(21, 24, 30, 0.95) 0%, rgba(12, 15, 20, 0.99) 100%);
}

.lead-card.is-worked.is-ncz {
  border-color: rgba(125, 242, 182, 0.26);
  background:
    radial-gradient(circle at 100% 0, rgba(125, 242, 182, 0.12), rgba(125, 242, 182, 0) 48%),
    linear-gradient(180deg, rgba(15, 28, 21, 0.94) 0%, rgba(9, 13, 11, 0.98) 100%);
}

.lead-list--compact {
  padding-top: 12px;
}

.lead-card.is-compact .lead-card__meta {
  grid-template-columns: 1fr;
}

.lead-card__top {
  display: grid;
  gap: 10px;
}

.lead-card__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.lead-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.lead-card__name {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.lead-card__sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.lead-card__tg-meta {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  text-align: right;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  white-space: nowrap;
}

.score-pill[data-zone="green"] {
  border-color: rgba(239, 255, 44, 0.18);
  background: rgba(239, 255, 44, 0.08);
}

.score-pill[data-zone="yellow"] {
  border-color: rgba(242, 215, 94, 0.18);
  background: rgba(242, 215, 94, 0.08);
}

.score-pill[data-zone="orange"] {
  border-color: rgba(255, 172, 87, 0.18);
  background: rgba(255, 172, 87, 0.08);
}

.score-pill[data-zone="red"] {
  border-color: rgba(255, 123, 104, 0.18);
  background: rgba(255, 123, 104, 0.08);
}

.score-pill--tag {
  border-color: rgba(125, 242, 182, 0.24);
  background: rgba(125, 242, 182, 0.12);
  min-width: 44px;
  justify-content: center;
}

.counter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 123, 104, 0.22);
  background: rgba(255, 123, 104, 0.12);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 900;
}

.counter-pill--alert {
  min-width: 32px;
}

.lead-card__meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.meta-box {
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.meta-box__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.meta-box__value {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.lead-card__flags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.flag {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.flag.is-positive {
  border-color: rgba(125, 242, 182, 0.2);
  background: rgba(125, 242, 182, 0.1);
}

.flag.is-negative {
  border-color: rgba(255, 123, 104, 0.2);
  background: rgba(255, 123, 104, 0.1);
}

.lead-card__summary {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(239, 255, 44, 0.14);
  background:
    linear-gradient(108deg, rgba(239, 255, 44, 0.08) 0%, rgba(239, 255, 44, 0) 40%),
    rgba(255, 255, 255, 0.03);
}

.lead-card__summary-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lead-card__summary-text {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.lead-card__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.lead-card__actions .btn {
  flex: 0 0 auto;
  min-width: 112px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 18px 18px;
}

.pager-label {
  min-width: 84px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 8, 0.7);
  backdrop-filter: blur(6px);
}

.sheet-panel {
  position: absolute;
  inset: auto 0 0;
  max-height: min(88vh, 920px);
  overflow: auto;
  border-radius: 28px 28px 0 0;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 19, 25, 0.98) 0%, rgba(9, 11, 15, 0.99) 100%),
    radial-gradient(circle at 100% 0, rgba(239, 255, 44, 0.08), rgba(239, 255, 44, 0) 40%);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.36);
  padding: 18px 16px 22px;
}

.sheet-panel--detail,
.sheet-panel--admin {
  inset: 14px 10px 10px;
  border-radius: 26px;
}

.sheet-panel--prompt {
  inset: 50% auto auto 50%;
  width: min(calc(100% - 24px), 372px);
  max-height: none;
  transform: translate(-50%, -50%);
  border-radius: 26px;
  padding: 18px 18px 18px;
  background:
    radial-gradient(circle at 0 0, rgba(239, 255, 44, 0.18) 0%, rgba(239, 255, 44, 0) 38%),
    linear-gradient(180deg, rgba(16, 19, 25, 0.99) 0%, rgba(9, 11, 15, 0.99) 100%);
}

.sheet-panel--detail {
  padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding-top: 14px;
  background: linear-gradient(180deg, rgba(9, 11, 15, 0), rgba(9, 11, 15, 0.98) 42%);
}

.sheet-actions .btn {
  flex: 1;
}

.sheet-actions--prompt {
  position: static;
  margin-top: 4px;
  padding-top: 0;
  background: none;
}

.push-prompt {
  display: grid;
  gap: 12px;
}

.push-prompt__close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.push-prompt__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(239, 255, 44, 0.18);
  background: linear-gradient(180deg, rgba(239, 255, 44, 0.14) 0%, rgba(52, 214, 255, 0.08) 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
  font-size: 1.45rem;
}

.push-prompt__eyebrow {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.push-prompt__title {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.push-prompt__body {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.5;
}

.push-prompt__note {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  color: var(--muted-strong);
  font-size: 0.84rem;
  line-height: 1.45;
}

.filter-groups {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  grid-template-columns: 1fr;
  align-items: start;
}

.filter-tile {
  min-width: 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow: clip;
}

.filter-tile.is-open {
  grid-column: 1 / -1;
  border-color: rgba(239, 255, 44, 0.24);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16);
}

.filter-tile__trigger {
  width: 100%;
  border: 0;
  padding: 14px;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  text-align: left;
  cursor: pointer;
}

.filter-tile__title {
  font-size: 0.92rem;
  font-weight: 900;
}

.filter-tile__value {
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.35;
}

.filter-tile__meta {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.filter-tile__caret {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted-strong);
  font-size: 1rem;
  font-weight: 800;
}

.filter-tile__dropdown {
  padding: 0 14px 14px;
}

.filter-tile__hint,
.filter-empty {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.filter-tile__hint {
  margin-bottom: 10px;
}

.filter-empty {
  padding: 2px 0 6px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.option-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
}

.option-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-strong);
}

.option-row__label {
  font-size: 0.88rem;
  line-height: 1.38;
}

.option-row__meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.filter-inline {
  display: grid;
  gap: 10px;
}

.settings-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.settings-group {
  display: grid;
  gap: 12px;
}

.settings-group + .settings-group {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-group__head {
  display: grid;
  gap: 4px;
}

.settings-group__head h3 {
  margin: 0;
  font-size: 1rem;
}

.settings-status {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  line-height: 1.5;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-row--toggle {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

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

.detail-content {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-bottom: 12px;
}

.detail-hero {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(239, 255, 44, 0.16);
  background:
    linear-gradient(108deg, rgba(239, 255, 44, 0.08) 0%, rgba(239, 255, 44, 0) 34%),
    linear-gradient(180deg, rgba(16, 19, 25, 0.98) 0%, rgba(9, 11, 15, 0.99) 100%);
  box-shadow: var(--shadow-md);
}

.detail-hero .flag {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.detail-hero .flag.is-positive {
  border-color: rgba(125, 242, 182, 0.2);
  background: rgba(125, 242, 182, 0.1);
}

.detail-hero .flag.is-negative {
  border-color: rgba(255, 123, 104, 0.2);
  background: rgba(255, 123, 104, 0.1);
}

.detail-hero__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.detail-hero__name {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-hero__meta {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-metric {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.detail-metric__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.detail-metric__value {
  margin-top: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.detail-grid {
  display: grid;
  gap: 12px;
}

.detail-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.detail-card--compact {
  padding: 14px;
}

.detail-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
}

.detail-row__label {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.detail-row__value {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.detail-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.detail-bullets li {
  list-style: none;
  position: relative;
  padding-left: 16px;
  color: var(--text-soft);
  line-height: 1.5;
}

.detail-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.detail-note {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  line-height: 1.55;
  white-space: pre-line;
}

.detail-note--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

.detail-inline {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.detail-actions-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.detail-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.detail-footer-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(10, 12, 16, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 -12px 26px rgba(0, 0, 0, 0.24);
}

.admin-block {
  margin-top: 18px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.admin-card {
  padding: 15px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.admin-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-card__title {
  font-size: 0.96rem;
  font-weight: 900;
}

.admin-card__sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-card__note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 0.86rem;
  white-space: pre-line;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-actions .btn {
  flex: 1 1 10rem;
}

.lookup-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.lookup-option {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  color: var(--text);
}

.lookup-option strong {
  display: block;
  font-size: 0.88rem;
}

.lookup-option span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.support-card {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.support-tile {
  min-height: 220px;
  padding: 22px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(7, 9, 12, 0.76);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.support-tile--contact {
  box-shadow: 0 22px 46px rgba(191, 216, 19, 0.08);
}

.support-tile--guide {
  background:
    radial-gradient(circle at top right, rgba(52, 214, 255, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(7, 9, 12, 0.76);
}

.support-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(239, 255, 44, 0.22);
  background: linear-gradient(135deg, rgba(239, 255, 44, 0.2), rgba(52, 214, 255, 0.16));
}

.support-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-name {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.4;
}

.support-copy {
  color: var(--text-soft);
  line-height: 1.55;
  max-width: 34ch;
}

.support-copy a {
  color: var(--accent);
}

.support-tile .btn {
  margin-top: auto;
}

.support-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.company-tile {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  min-height: 52px;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 900;
}

.company-tile.is-active {
  border-color: rgba(239, 255, 44, 0.22);
  background: rgba(239, 255, 44, 0.1);
}

.admin-empty,
.empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  min-width: min(92vw, 320px);
  max-width: 92vw;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(239, 255, 44, 0.16);
  background: rgba(10, 12, 16, 0.96);
  color: var(--text);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 80;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.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;
}

@keyframes loadingBar {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(145%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes ctaPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

@keyframes ctaRing {
  0% {
    transform: scale(0.95);
    opacity: 0.72;
  }
  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

@media (min-width: 720px) {
  .filter-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .metrics-grid {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  }

  .segment-grid--paired {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  }

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

@media (min-width: 980px) {
  .page {
    width: min(calc(100% - 36px), 1180px);
    padding-top: 18px;
  }

  .filter-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shell--app {
    gap: 14px;
  }
}

@media (max-width: 680px) {
  .page {
    width: min(calc(100% - 16px), var(--max-width));
    padding-top: 10px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .controls-panel {
    top: 70px;
  }

  .topbar,
  .hero-panel,
  .segment-panel,
  .metrics-panel,
  .quick-actions-panel,
  .ranking-panel,
  .controls-panel,
  .leads-panel,
  .agenda-panel {
    border-radius: 22px;
  }

  .hero-copy,
  .metrics-grid,
  .section-head,
  .controls-panel,
  .lead-list,
  .pager {
    padding-left: 14px;
    padding-right: 14px;
  }

  .segment-grid,
  .lead-card__meta,
  .detail-hero__meta {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .company-picker-grid {
    gap: 10px;
  }

  .company-picker-card {
    min-height: 120px;
    padding: 16px 14px;
    border-radius: 22px;
  }

  .detail-inline,
  .detail-actions-grid {
    grid-template-columns: 1fr;
  }

  .lead-card__title,
  .admin-card__head,
  .detail-hero__title {
    flex-direction: column;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .sheet-panel {
    padding: 16px 14px 20px;
  }

  .sheet-panel--detail,
  .sheet-panel--admin {
    inset: 0;
    max-height: 100vh;
    border-radius: 24px 24px 0 0;
  }

  .sheet-panel--prompt {
    inset: 50% auto auto 50%;
    width: min(calc(100% - 24px), 372px);
    max-height: none;
    transform: translate(-50%, -50%);
    border-radius: 26px;
    padding: 18px 18px 18px;
  }

  .support-tile {
    min-height: auto;
    padding: 18px 16px;
  }

  .detail-footer-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .segment-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .controls-actions,
  .lead-card__actions,
  .sheet-actions {
    flex-direction: column;
  }

  .detail-actions-grid {
    grid-template-columns: 1fr;
  }

  .lead-card__actions .btn,
  .admin-actions .btn {
    flex-basis: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
