/*
 *= require_tree .
 *= require_self
 */

@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Rajdhani:wght@500;600;700&display=swap");

/* ---------- BASE ---------- */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f9fafb;
  color: #111827;
  --accent-color: #2563eb;
  --card-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(680px 260px at 12% -12%, rgba(147, 197, 253, 0.16), transparent 60%),
    radial-gradient(620px 240px at 88% -18%, rgba(56, 189, 248, 0.12), transparent 58%),
    linear-gradient(180deg, #f6f9fd 0%, #edf3fb 52%, #e7eef8 100%);
}

.home-page {
  background-color: #0b1220;
  margin: 0;
  padding: 0;
}

.home-page > :first-child {
  margin-top: 0 !important;
}

.home-page .navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

.marketing-page {
  padding-top: 0;
}

.marketing-page .navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

.marketing-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(11, 18, 32, 0.94) !important;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.home-page .marketing-navbar {
  background: #212529 !important;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.marketing-page .marketing-navbar {
  background: #212529 !important;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.marketing-page .marketing-navbar .navbar-brand {
  color: #fff;
}

body.marketing-page .marketing-navbar .navbar-brand:hover,
body.marketing-page .marketing-navbar .navbar-brand:focus {
  color: #fff;
}

body.marketing-page .marketing-navbar .nav-link {
  color: rgba(255, 255, 255, 0.55);
}

body.marketing-page .marketing-navbar .nav-link:hover,
body.marketing-page .marketing-navbar .nav-link:focus {
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- LAYOUT ---------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.inline {
  display: inline-block;
}

main.container {
  margin-top: 24px;
}

/* ---------- NAVIGATION (legacy-safe) ---------- */

.app-header {
  background: #111827;
  color: #ffffff;
}

.app-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 18px;
  font-weight: 600;
}

.nav a {
  color: #d1d5db;
  margin-left: 20px;
  text-decoration: none;
  font-size: 14px;
}

.nav a:hover {
  color: #ffffff;
}

/* ---------- STATUS BADGES (AUTHORITATIVE) ---------- */

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.contact-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 2px;
}

.contact-link:hover {
  text-decoration-color: #94a3b8;
}

.returning-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Status colors - single source of truth */
.status-new {
  background: #eef2ff;
  color: #3730a3;
}

.status-contacted {
  background: #ecfeff;
  color: #155e75;
}

.status-completed {
  background: #f0fdf4;
  color: #166534;
}

.status-closed_won {
  background: #f0fdf4;
  color: #166534;
}

.status-lost {
  background: #fef2f2;
  color: #b91c1c;
}

.status-closed_lost {
  background: #fef2f2;
  color: #b91c1c;
}

.status-canceled {
  background: #fef2f2;
  color: #b91c1c;
}

/* ---------- GLOBAL COMPONENTS ---------- */

/* Buttons: Primary = main action, Secondary = supporting, Destructive = irreversible, Tertiary = low emphasis */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  box-sizing: border-box;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.btn:active:not(:disabled):not([disabled]) {
  transform: translateY(1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-primary {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.btn-secondary:hover {
  border-color: #cbd5f5;
  background: #f8fafc;
}

.btn-tertiary {
  background: transparent;
  color: #334155;
  border-color: transparent;
}

.btn-tertiary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-destructive {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-destructive:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-account {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.btn-account:hover {
  background: #f8fafc;
  border-color: #cbd5f5;
}

.btn-pill {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 500;
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.btn-pill.is-active {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.16);
}

.btn-block {
  width: 100%;
}

.btn-menu {
  justify-content: flex-start;
}

.btn-icon {
  gap: 8px;
  letter-spacing: -0.01em;
}

.btn-icon__glyph {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* ---------- AUTH ---------- */

.auth-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

.auth-shell-wide {
  max-width: 460px;
}

.auth-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px 32px 32px;
  box-shadow: var(--card-shadow);
}

.auth-title {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  margin: 0 0 24px 0;
  color: #6b7280;
  font-size: 14px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field-last {
  margin-bottom: 20px;
}

.auth-field-tight-right {
  padding-right: 14px;
}

.auth-label {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 4px;
}

.auth-input {
  height: 32px;
  padding: 4px 8px;
  border-color: #e5e7eb;
  background: #ffffff;
  border-radius: 8px;
}

.auth-input:focus {
  border-color: var(--accent-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.recaptcha-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.recaptcha-wrapper .g-recaptcha {
  margin-left: auto;
  margin-right: auto;
}

.auth-meta {
  text-align: right;
  margin-top: 10px;
}

.auth-helper {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.auth-link {
  color: #475569;
  font-size: 13px;
  text-decoration: none;
}

.auth-link:hover {
  color: #1f2937;
}

.auth-link-strong {
  color: #111827;
  font-weight: 600;
}

.auth-submit {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 8px;
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  color: #6b7280;
}

.auth-note {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #9ca3af;
}

.auth-page .auth-card {
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.88) 0%, rgba(8, 15, 29, 0.96) 100%);
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.38);
}

.auth-page .auth-title,
.auth-page .section-heading {
  color: #f8fbff;
}

.auth-page .auth-subtitle,
.auth-page .auth-helper,
.auth-page .auth-footer {
  color: #bfd0e6;
}

.auth-page .auth-label {
  color: #dbeafe;
}

.auth-page .auth-link {
  color: #93c5fd;
}

.auth-page .auth-link:hover {
  color: #bfdbfe;
}

.auth-page .auth-link-strong {
  color: #e2e8f0;
}

.auth-page .input-control,
.auth-page .auth-input {
  background: rgba(15, 23, 42, 0.74);
  border-color: rgba(148, 163, 184, 0.36);
  color: #e2e8f0;
}

.auth-page .input-control::placeholder,
.auth-page .auth-input::placeholder {
  color: #7f91ab;
}

.auth-page .input-control:focus,
.auth-page .auth-input:focus {
  border-color: rgba(96, 165, 250, 0.88);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
  background: rgba(15, 23, 42, 0.88);
}

.auth-page .btn-primary {
  background: linear-gradient(140deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.95));
  border-color: rgba(147, 197, 253, 0.56);
  color: #eff6ff;
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.35);
}

.auth-page .btn-primary:hover {
  border-color: rgba(191, 219, 254, 0.75);
  background: linear-gradient(140deg, rgba(59, 130, 246, 0.98), rgba(37, 99, 235, 0.98));
}

.auth-page .btn-secondary {
  background: rgba(30, 41, 59, 0.62);
  border-color: rgba(148, 163, 184, 0.36);
  color: #dbeafe;
}

.auth-page .btn-secondary:hover {
  background: rgba(51, 65, 85, 0.72);
  border-color: rgba(147, 197, 253, 0.45);
}

.auth-page .btn-tertiary {
  color: #bfdbfe;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.52);
}

.auth-page .btn-tertiary:hover {
  background: rgba(30, 41, 59, 0.74);
  color: #e2e8f0;
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 56px 16px 84px;
  }

  .auth-card {
    padding: 22px 20px 24px;
  }
}

.policy-page {
  padding: 80px 0 48px;
}

.policy-card {
  max-width: 860px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 32px;
}

.policy-title {
  margin: 0 0 12px 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.policy-intro {
  margin: 0 0 20px 0;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.7;
}

.policy-section + .policy-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.policy-section h2 {
  margin: 0 0 8px 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.policy-section h3 {
  margin: 12px 0 6px 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.policy-section p {
  margin: 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}
.policy-section ul,
.policy-section ol {
  margin: 8px 0 0 20px;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}

.policy-section li {
  margin: 0 0 6px 0;
}

.app-footer {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  margin-top: 24px;
}

.app-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6b7280;
  font-size: 13px;
}

.app-footer__links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-footer__link {
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
}

.app-footer__link:hover {
  color: #111827;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: var(--card-shadow);
}

.page-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 6px 0 0 0;
  color: #6b7280;
  font-size: 14px;
}

.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.panel + .panel {
  margin-top: 14px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ops-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.operations-page .ops-stack .panel {
  border-color: #dbe4f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.ops-stack .table-shell {
  margin-top: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ops-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.ops-overview-card {
  display: grid;
  gap: 12px;
}

.ops-workflow-panel {
  display: grid;
  gap: 12px;
}

.ops-collapsible {
  display: grid;
  gap: 12px;
}

.ops-collapsible__summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.ops-collapsible__subtitle {
  margin-top: 0;
}

.ops-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.ops-workflow-card {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: linear-gradient(160deg, #f8fbff 0%, #f8fafc 100%);
  padding: 14px;
}

.ops-playbook-grid {
  gap: 14px;
}

.ops-playbook-card {
  display: grid;
  gap: 8px;
}

.ops-playbook-list {
  margin: 2px 0 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
}

.ops-playbook-list li {
  overflow-wrap: anywhere;
}

.ops-playbook-list li::marker {
  color: #64748b;
  font-weight: 700;
}

.ops-queue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.ops-queue-card {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: linear-gradient(160deg, #f8fbff 0%, #f8fafc 100%);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.ops-queue-count {
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.ops-queue-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-workflow-list {
  margin: 10px 0 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
}

.ops-workflow-list li {
  overflow-wrap: anywhere;
}

.ops-list-meta {
  margin-top: 12px;
}

.ops-list-tight {
  margin-top: 8px;
}

.ops-inline-action-form {
  display: inline-block;
  margin-left: 8px;
}

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

.ops-overview-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.ops-metric {
  background: linear-gradient(160deg, #f8fbff 0%, #f8fafc 100%);
  border: 1px solid #dce5f1;
  border-radius: 12px;
  padding: 14px;
}

.ops-metrics > .ops-metric:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.ops-metric__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.ops-metric__value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.ops-company-list {
  display: grid;
  gap: 16px;
}

.ops-section {
  display: grid;
  gap: 12px;
}

.ops-section-card {
  display: grid;
  gap: 10px;
}

.ops-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ops-section-heading {
  display: grid;
  gap: 4px;
}

.ops-section-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ops-section-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.ops-create-pod-form {
  margin: 0;
}

.ops-panel-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ops-create-pod-controls {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ops-create-pod-controls .input-control {
  flex: 1 1 180px;
  min-width: 0;
}

.ops-warning-text {
  margin: 0;
  color: #b45309;
  font-size: 13px;
}

.ops-company-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 3px solid #dbe4f0;
}

.ops-pod-card--assembling {
  border-top-color: #0ea5e9;
}

.ops-pod-card--active {
  border-top-color: #22c55e;
}

.ops-pod-card--replacing {
  border-top-color: #f59e0b;
}


.ops-company-card--active {
  border-top-color: #16a34a;
}

.ops-company-card--deactivated {
  border-top-color: #dc2626;
}

.ops-company-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ops-company-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ops-company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.ops-company-meta span:not(.ops-badge) {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ops-company-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-company-status {
  display: grid;
  gap: 8px;
  text-align: right;
}

.ops-company-status--left {
  text-align: left;
}

.ops-company-status--left .ops-status-row {
  justify-content: flex-start;
}

.ops-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ops-status-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
}

.ops-company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.ops-company-grid--expanded {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ops-field {
  background: linear-gradient(170deg, #f8fbff 0%, #f8fafc 100%);
  border: 1px solid #dde6f2;
  border-radius: 12px;
  padding: 12px;
}

.ops-field--span {
  grid-column: 1 / -1;
}

.ops-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.ops-value {
  margin-top: 6px;
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.ops-company-actions .dash-meta {
  margin: 0;
  align-self: center;
}

.ops-company-actions--split {
  justify-content: space-between;
  align-items: flex-start;
}

.ops-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
}

.ops-action-group .dash-meta {
  margin: 0;
  max-width: 420px;
}

.ops-seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 12px;
}

.ops-seat-card {
  background: linear-gradient(170deg, #f8fbff 0%, #f8fafc 100%);
  border: 1px solid #dde6f2;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.ops-seat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ops-seat-health {
  display: grid;
  gap: 6px;
}

.ops-seat-health .dash-meta {
  margin: 0;
}

.ops-seat-actions {
  display: grid;
  gap: 8px;
}

.ops-seat-actions .dash-meta,
.ops-seat-actions .dash-meta.danger {
  margin: 0;
}

.ops-inline-form {
  display: grid;
  gap: 8px;
}

.ops-inline-form .input-control {
  min-width: 0;
  width: 100%;
}

.ops-inline-form .btn {
  justify-self: start;
}

.ops-empty-state .dash-meta {
  margin: 0;
}

.ops-toolbar-panel {
  margin-bottom: 0;
}

.ops-table .dash-table th {
  white-space: nowrap;
}

.ops-table .dash-table td {
  vertical-align: top;
}

.ops-table .table-shell {
  overflow-x: auto;
}

.ops-table .dash-table {
  min-width: 760px;
}

.ops-table-actions {
  display: grid;
  gap: 8px;
}

.ops-table-actions .btn {
  justify-self: start;
}

.ops-table-actions .button_to,
.ops-table-actions form {
  margin: 0;
}

.ops-table-actions .ops-inline-form {
  min-width: 180px;
}

.ops-table-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ops-table-pagination__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-cell {
  display: grid;
  gap: 6px;
}

.ops-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  background: #edf2f7;
  color: #475569;
}

.ops-badge--yes {
  background: #dcfce7;
  color: #166534;
}

.ops-badge--info {
  background: #e0f2fe;
  color: #075985;
}

.ops-badge--warn {
  background: #fef3c7;
  color: #92400e;
}

.ops-badge--danger {
  background: #fee2e2;
  color: #991b1b;
}

.ops-badge--active {
  background: #ecfdf5;
  color: #065f46;
}

.ops-badge--deactivated {
  background: #fee2e2;
  color: #991b1b;
}

.ops-badge--pod-live {
  background: #dcfce7;
  color: #166534;
}

.ops-badge--pod-assembling {
  background: #e0f2fe;
  color: #0369a1;
}

.ops-badge--pod-replacing {
  background: #ffedd5;
  color: #c2410c;
}


.ops-notes {
  background: linear-gradient(170deg, #f8fbff 0%, #f8fafc 100%);
  border: 1px solid #dde6f2;
  border-radius: 12px;
  padding: 12px;
}

.ops-notes-form {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ops-notes-input {
  min-width: 0;
  width: 100%;
  flex: 1 1 320px;
}

@media (max-width: 900px) {
  .ops-overview-grid {
    grid-template-columns: 1fr;
  }

  .ops-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-create-pod-controls {
    width: 100%;
  }

  .ops-create-pod-controls .input-control {
    width: 100%;
  }

  .ops-company-status {
    text-align: left;
  }

  .ops-company-meta span:not(.ops-badge) {
    padding: 2px 7px;
  }

  .ops-status-row {
    justify-content: flex-start;
  }

  .ops-company-actions--split {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-queue-count {
    font-size: 26px;
  }

  .ops-queue-actions {
    justify-content: flex-start;
  }

  .ops-table .dash-table {
    min-width: 860px;
  }

  .ops-table-pagination {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .ops-metrics {
    grid-template-columns: 1fr;
  }

  .ops-metrics > .ops-metric:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

.table-shell {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.table-shell--wide {
  overflow-x: auto;
}

.table-shell--wide .dash-table {
  min-width: 1600px;
}

.leads-table-shell {
  max-height: 520px;
  overflow-y: scroll;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

.leads-table-shell .dash-table {
  table-layout: fixed;
  width: 100%;
}

.leads-table-shell .dash-table thead th,
.contacts-table-shell .dash-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}

.leads-table-shell .dash-table th:nth-child(1),
.leads-table-shell .dash-table td:nth-child(1) {
  width: 30%;
}

.leads-table-shell .dash-table th:nth-child(2),
.leads-table-shell .dash-table td:nth-child(2) {
  width: 18%;
}

.leads-table-shell .dash-table th:nth-child(3),
.leads-table-shell .dash-table td:nth-child(3) {
  width: 16%;
}

.leads-table-shell .dash-table th:nth-child(4),
.leads-table-shell .dash-table td:nth-child(4) {
  width: 16%;
}

.leads-table-shell .dash-table th:nth-child(5),
.leads-table-shell .dash-table td:nth-child(5) {
  width: 20%;
}

.contacts-table-shell {
  max-height: 520px;
  overflow-y: scroll;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

.contacts-table-shell .dash-table {
  table-layout: fixed;
  width: 100%;
}

.leads-table-shell .dash-table td,
.contacts-table-shell .dash-table td {
  vertical-align: top;
}

.contacts-table-shell .dash-table th:nth-child(1),
.contacts-table-shell .dash-table td:nth-child(1) {
  width: 36%;
}

.contacts-table-shell .dash-table th:nth-child(2),
.contacts-table-shell .dash-table td:nth-child(2) {
  width: 16%;
}

.contacts-table-shell .dash-table th:nth-child(3),
.contacts-table-shell .dash-table td:nth-child(3) {
  width: 28%;
}

.contacts-table-shell .dash-table th:nth-child(4),
.contacts-table-shell .dash-table td:nth-child(4) {
  width: 20%;
}

body.contacts-index {
  overflow: auto;
}

main.contacts-index-main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
}

main.contacts-index-main .contacts-results {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

main.contacts-index-main .contacts-table-shell {
  max-height: 400px;
  overflow-y: scroll;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

@media (max-width: 840px) {
  .leads-table-shell,
  .contacts-table-shell,
  main.contacts-index-main .contacts-table-shell {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .leads-table-shell .dash-table,
  .contacts-table-shell .dash-table {
    table-layout: auto;
    min-width: 700px;
  }

  .leads-table-shell .dash-table thead th,
  .contacts-table-shell .dash-table thead th {
    position: static;
  }

  .leads-table-shell .dash-table th:nth-child(n),
  .leads-table-shell .dash-table td:nth-child(n),
  .contacts-table-shell .dash-table th:nth-child(n),
  .contacts-table-shell .dash-table td:nth-child(n) {
    width: auto;
    white-space: nowrap;
  }

  main.contacts-index-main {
    height: auto;
    min-height: 0;
  }
}

.form-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.settings-form {
  --settings-grid-gap: 1.5rem;
  --settings-grid-column-gap: 2rem;
}

.settings-layout {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.account-settings-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  align-items: start;
  column-gap: 16px;
}

.account-settings-main,
.account-settings-side {
  display: grid;
  gap: 14px;
}

.account-settings-main .settings-card,
.account-settings-side .settings-card {
  margin-top: 0;
}

.settings-layout .settings-card {
  border-color: #dbe4f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.settings-card--readonly {
  opacity: 0.72;
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.settings-card-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.settings-card-subtitle {
  margin: 6px 0 0 0;
  color: #64748b;
  font-size: 13px;
}

.settings-grid {
  /* Settings page uses a 4-column grid; most fields span 2 columns for uniform rows. */
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--settings-grid-gap) var(--settings-grid-column-gap);
  width: 100%;
  max-width: 980px;
  margin-right: auto;
}

.settings-grid--compact {
  max-width: 760px;
}

.settings-span-2 {
  grid-column: span 2;
}

.settings-span-4 {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-span-2,
  .settings-span-4 {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-span-2,
  .settings-span-4 {
    grid-column: span 1;
  }
}
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-section + .settings-section {
  margin-top: 18px;
}

.settings-section-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.settings-section-title--compact {
  margin-bottom: 0;
}

.settings-divider {
  margin: 18px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.settings-help {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.settings-help--tight {
  margin-top: 4px;
}

.settings-help--warn {
  color: #9a3412;
}

.settings-list {
  font-size: 13px;
  color: #475569;
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.settings-list--framed {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 16px;
}

.settings-actions {
  display: flex;
  align-items: center;
}

.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-card {
  padding: 20px;
  margin-top: 12px;
}

.settings-inline-alert {
  color: #b45309;
}

.settings-routing-destination,
.settings-network-block,
.settings-referral-block {
  border: 1px solid #dde6f2;
  border-radius: 12px;
  background: linear-gradient(170deg, #f8fbff 0%, #f8fafc 100%);
  padding: 12px;
}

.settings-routing-destination {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-routing-destination-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-routing-destination .input-control {
  max-width: 360px;
}

.settings-routing-destination .settings-help {
  max-width: 720px;
}

.settings-network-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-network-list {
  display: grid;
  gap: 10px;
}

.settings-network-group {
  border: 1px solid #dde6f2;
  border-radius: 12px;
  background: linear-gradient(170deg, #f8fbff 0%, #f8fafc 100%);
  padding: 12px;
}

.settings-network-head {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.settings-network-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.settings-network-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: #0f172a;
}

.settings-network-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-network-seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.settings-network-seat {
  border: 1px solid #dce5f1;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.settings-network-seat--open {
  background: #fffbeb;
  border-color: #fde68a;
}

.settings-network-seat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.settings-network-seat-trade {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #334155;
}

.settings-network-seat-company {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.settings-network-seat-company--open {
  color: #9a3412;
  font-weight: 500;
}

.settings-referral-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-referral-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-referral-list {
  display: grid;
  gap: 10px;
}

.settings-referral-group {
  border: 1px solid #dde6f2;
  border-radius: 12px;
  background: linear-gradient(170deg, #f8fbff 0%, #f8fafc 100%);
  padding: 12px;
}

.settings-referral-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.settings-referral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.settings-referral-card {
  border: 1px solid #dce5f1;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}

.settings-referral-number {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.settings-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.01em;
  font-weight: 600;
  background: #edf2f7;
  color: #475569;
}

.settings-chip--ok {
  background: #dcfce7;
  color: #166534;
}

.settings-chip--warn {
  background: #fef3c7;
  color: #92400e;
}

.settings-chip--danger {
  background: #fee2e2;
  color: #991b1b;
}

.settings-chip--pending {
  background: #e0f2fe;
  color: #075985;
}

.settings-chip--owner {
  background: #fef3c7;
  color: #92400e;
}

.settings-chip--neutral {
  background: #edf2f7;
  color: #475569;
}

.settings-chip--muted {
  background: #e5e7eb;
  color: #4b5563;
}

.settings-subsection {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.settings-subsection-title {
  margin: 0;
  font-size: 15px;
  color: #374151;
}

.settings-user-list {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.settings-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 0.9fr) auto;
  grid-template-areas: "main tags time actions";
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid #e5e7eb;
}

.settings-user-list .settings-user-row:first-child {
  border-top: none;
}

.settings-user-row--owner {
  background: #fffdf5;
  border-left: 3px solid #f59e0b;
}

.settings-user-row--muted {
  background: #f9fafb;
}

.settings-user-main {
  grid-area: main;
  min-width: 0;
}

.settings-user-name {
  font-size: 14px;
  color: #111827;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-user-full-name {
  font-weight: 600;
  line-height: 1.35;
}

.settings-user-email {
  font-size: 13px;
  color: #64748b;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.settings-user-tags {
  grid-area: tags;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  align-content: flex-start;
  justify-self: start;
}

.settings-user-tags .settings-chip {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.settings-user-time {
  grid-area: time;
  font-size: 12px;
  color: #6b7280;
  text-align: right;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  justify-self: end;
}

.settings-user-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  align-self: start;
  min-width: 0;
}

.settings-user-actions .button_to,
.settings-user-actions .btn {
  max-width: 100%;
}

.settings-user-actions .btn {
  white-space: nowrap;
}

.settings-row-btn {
  padding: 0.35rem 0.6rem;
  font-size: 12px;
  border-color: #d1d5db;
}

.account-card {
  margin-top: 0;
}

.account-actions {
  margin-top: 12px;
}

.account-banner {
  margin: 0 0 12px 0;
  border-radius: 10px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  padding: 10px 12px;
  font-size: 13px;
}

.account-banner--warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.account-billing-list {
  display: grid;
  gap: 8px;
}

.account-billing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dde6f2;
  background: linear-gradient(170deg, #f8fbff 0%, #f8fafc 100%);
  border-radius: 10px;
  padding: 10px 12px;
}

.account-billing-label {
  font-size: 13px;
  color: #475569;
}

.account-billing-value {
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.account-note {
  margin-top: 12px;
}

.account-export-form {
  display: grid;
  gap: 12px;
}

.account-profile-field .input-control {
  max-width: 100%;
}

.form-label {
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
}

.input-control {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 14px;
  background: #f8fafc;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-control--readonly,
.input-control:disabled {
  background: #f1f5f9;
  color: #475569;
}

.settings-form .input-control {
  padding: 0.4rem 0.65rem;
}

.input-control:focus {
  outline: none;
  border-color: var(--accent-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.section-heading {
  margin: 0 0 10px 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

@media (min-width: 981px) {
  .account-settings-side .settings-user-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main actions"
      "tags time";
  }
}

@media (max-width: 720px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-hero__top,
  .leads-workspace__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .leads-workspace__toolbar {
    align-items: flex-start;
  }

  .leads-workspace__filters {
    width: 100%;
    flex-basis: 100%;
  }

  .leads-workspace__filters .leads-filter-row {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .account-settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-user-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "main"
      "tags"
      "time"
      "actions";
    align-items: flex-start;
  }

  .settings-user-time {
    text-align: left;
    justify-self: start;
  }

  .settings-user-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .settings-routing-destination .input-control {
    max-width: 100%;
  }

  .account-profile-field .input-control {
    max-width: 100%;
  }

  .settings-user-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "main"
      "tags"
      "time"
      "actions";
  }

  .account-billing-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-billing-value {
    text-align: left;
  }
}

/* ---------- DASHBOARD ---------- */

.dash-hero {
  display: grid;
  gap: 12px;
}

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

.dash-hero__filters {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 16px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}

.dash-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.dash-subtitle {
  margin: 6px 0 0 0;
  color: #6b7280;
  font-size: 14px;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dash-card {
  background: #ffffff;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: var(--card-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dash-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.dash-card__label {
  font-size: 13px;
  color: #6b7280;
  letter-spacing: 0.01em;
}

.dash-card__value {
  font-size: 36px;
  font-weight: 700;
  margin: 6px 0 10px 0;
  letter-spacing: -0.01em;
}

.dash-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: color 150ms ease, transform 150ms ease;
}

.dash-card__link:hover {
  color: #1d4ed8;
  transform: translateX(2px);
}

.dash-section {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.dash-page {
  display: grid;
  gap: 14px;
}

.dash-page .dash-section {
  margin-top: 0;
}

.dash-section--snapshot #dashboard-card-grid {
  margin-top: 10px;
}

.dash-section--network {
  border-color: #dbe4f0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-section-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.dash-section-intro {
  margin: 4px 0 0 0;
}

.dash-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.dash-split--network {
  margin-top: 12px;
}

.dash-grid--compact {
  margin-top: 10px;
}

.dash-subsection {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-subsection__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-subsection__title {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.dash-subsection__meta {
  margin: 0;
}

.dashboard-performance-table {
  border-color: #dbe4f0;
  box-shadow: none;
}

.dashboard-performance-table .dash-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-performance-table .dash-table td:first-child {
  font-weight: 600;
}

.dash-table-empty {
  padding: 12px;
  color: #6b7280;
}

.table-shell--compact {
  margin-top: 0;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
}

.dash-table thead {
  background: #f8fafc;
}

.dash-table th {
  padding: 12px;
  font-size: 13px;
  color: #6b7280;
  text-align: left;
}

.dash-table td {
  padding: 12px;
  font-size: 14px;
  color: #0f172a;
  border-top: 1px solid #e5e7eb;
}

.dash-table tr {
  transition: background 140ms ease;
}

.dash-table tr:hover {
  background: #f8fafc;
}

.lead-source-block .dash-meta + .dash-meta {
  margin-top: 2px;
}

.lead-row.is-new,
.contact-row.is-new {
  animation: row-enter 0.35s ease-out;
}

@keyframes row-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pagination-loading {
  font-size: 12px;
  color: #64748b;
}

.btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.pagination-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  user-select: none;
}

.pagination-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-color);
}

.pagination-toggle__state {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[hidden] {
  display: none !important;
}

.dash-meta {
  color: #6b7280;
  font-size: 13px;
}

/* ---------- LEAD PAGE ---------- */

.leads-page {
  display: grid;
  gap: 12px;
}

.leads-workspace {
  display: grid;
  gap: 12px;
}

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

.leads-workspace__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.leads-workspace__filters {
  flex: 1 1 420px;
}

.leads-workspace__filters .leads-filter-row {
  justify-content: flex-end;
}

.lead-counter-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid #dce5f1;
  background: linear-gradient(170deg, #f8fbff 0%, #f8fafc 100%);
  border-radius: 999px;
  padding: 5px 10px;
}

.lead-counter-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
}

.lead-counter-value {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.leads-filter-panel {
  margin-top: 0;
  background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
}

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

.leads-filter-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 600;
}

.leads-table-shell--embedded {
  margin-top: 0;
  border-radius: 12px;
  box-shadow: none;
}

.leads-status-link {
  text-decoration: none;
}

.lead-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--card-shadow);
}

.lead-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lead-header__actions--stack {
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.lead-header__back-link {
  min-width: 130px;
}

.lead-kicker {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 600;
}

.lead-title {
  margin: 6px 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.lead-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.lead-subtitle__meta {
  margin-left: 8px;
}

.lead-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.section-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 16px 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  margin: 6px 0 0 0;
  color: #6b7280;
  font-size: 13px;
}

.section-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 12px;
}

.lead-summary-grid--flush {
  margin-bottom: 0;
}

.summary-label {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-value {
  margin: 6px 0 0 0;
  font-weight: 700;
}

.summary-meta {
  margin: 6px 0 0 0;
  color: #64748b;
  font-size: 13px;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.slot-pill {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: #ffffff;
}

.slot-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  flex: 0 0 10px;
}

.slot-indicator__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
}

.slot-indicator__dot--medium {
  background: #f4d07d;
}

.slot-indicator__dot--low {
  background: #86efac;
}

.slot-indicator__dot--high {
  background: #d97706;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.lead-resolution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.resolution-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}

.resolution-card--won {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.resolution-card--lost {
  border-color: #fecaca;
  background: #fef2f2;
}

.resolution-card__title {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.resolution-card__subtitle {
  margin: 6px 0 0 0;
  color: #64748b;
  font-size: 13px;
}

.resolution-card__actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-resolution-error {
  margin: 14px 0 0 0;
}

.status-panel {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.status-panel--compact {
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.status-loss-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-loss-form--stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 12px;
}

.status-loss-form--stack .btn {
  width: 100%;
}

.status-loss-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.status-meta {
  font-size: 13px;
  color: #64748b;
}

.lead-source-block {
  display: grid;
  gap: 2px;
}

.info-banner {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  font-size: 13px;
}

.info-banner.neutral {
  background: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}

.dash-meta.danger {
  color: #b91c1c;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lead-modal__card {
  width: min(640px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  padding: 28px;
  box-sizing: border-box;
}

.lead-modal__header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.lead-modal__title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.lead-modal__intro {
  margin: 10px 0 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.lead-close-won-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lead-close-won-form__section {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lead-close-won-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.lead-revenue-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 14px 0;
}

.lead-revenue-preset {
  width: 100%;
  min-width: 0;
}

.lead-close-won-form .form-label {
  margin-bottom: 2px;
}

.lead-close-won-form .input-control {
  box-sizing: border-box;
}

.lead-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.lead-modal__actions .btn {
  min-width: 132px;
}

.lead-name-display {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-title--compact {
  margin: 0;
}

.lead-name-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-name-input {
  flex: 1 1 320px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.lead-name-error {
  margin-top: 6px;
}

.pagination-shell {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pagination-shell .btn {
  min-width: 120px;
}

.pagination-sentinel {
  height: 1px;
}

@media (max-width: 720px) {
  .leads-filter-row {
    align-items: flex-start;
  }

  .lead-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .lead-header__actions--stack {
    align-items: flex-start;
    width: 100%;
  }

  .lead-header__back-link {
    width: 100%;
  }

  .status-panel--compact {
    align-items: flex-start;
    text-align: left;
  }

  .lead-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .lead-modal__card {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 14px;
    padding: 20px;
  }

  .lead-modal__title {
    font-size: 18px;
  }

  .lead-close-won-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-revenue-presets {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-modal__actions {
    justify-content: stretch;
  }

  .lead-modal__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .lead-name-input {
    max-width: none;
    width: 100%;
  }
}

/* ---------- MICRO-INTERACTIONS ---------- */

.interactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 240ms ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flash-enter {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- ANIMATIONS ---------- */

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lead-row.is-new {
  animation: slide-in 0.25s ease-out;
}

/* ---------- CONTACTS ---------- */

.contacts-page {
  display: grid;
  gap: 12px;
}

.contacts-search-panel {
  margin-top: 0;
}

.contacts-search {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.contacts-search__row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contacts-search__input {
  min-width: 0;
  flex: 1 1 240px;
}

.contacts-search__hint {
  margin: 8px 0 0 0;
}

.contacts-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.contacts-results-panel {
  margin-top: 0;
}

.contacts-results__meta {
  margin: 6px 0 0 0;
}

.contacts-table {
  margin-top: 0;
}

.contact-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-primary {
  font-weight: 600;
  color: #0f172a;
}

.contact-secondary {
  margin-top: 2px;
}

.contact-phone {
  font-weight: 600;
  color: #1f2937;
}

.contacts-empty {
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
}

.contacts-empty h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
}

.contact-summary-panel,
.contact-outcomes-panel {
  margin-top: 0;
}

.contact-summary-grid {
  margin-top: 10px;
}

.contact-summary-grid .dash-card {
  padding: 16px;
}

.contact-summary-grid .dash-card__value {
  font-size: 32px;
}

.contact-outcomes-table {
  margin-top: 12px;
}

.contact-outcomes-empty {
  margin: 8px 0 0 0;
}

@media (max-width: 720px) {
  .contact-name {
    flex-direction: column;
    align-items: flex-start;
  }

  .contacts-results__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- AUTHENTICATED THEME (MARKETS-INSPIRED) ---------- */

body.signed-in-app {
  --surface-0: rgba(8, 15, 29, 0.96);
  --surface-1: rgba(15, 23, 42, 0.88);
  --surface-2: rgba(17, 24, 39, 0.92);
  --border-soft: rgba(148, 163, 184, 0.32);
  --border-strong: rgba(148, 163, 184, 0.44);
  --text-strong: #f8fbff;
  --text-main: #dbeafe;
  --text-muted: #bfd0e6;
  --accent-color: #2563eb;
  background:
    radial-gradient(680px 260px at 12% -12%, rgba(147, 197, 253, 0.16), transparent 60%),
    radial-gradient(620px 240px at 88% -18%, rgba(56, 189, 248, 0.12), transparent 58%),
    linear-gradient(180deg, #f6f9fd 0%, #edf3fb 52%, #e7eef8 100%);
  color: #1e293b;
}

body.signed-in-app .app-main a {
  color: #93c5fd;
}

body.signed-in-app .app-main a:hover {
  color: #bfdbfe;
}

.app-topbar {
  border-bottom: 1px solid rgba(148, 163, 184, 0.34);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.9) 0%, rgba(8, 15, 29, 0.94) 100%);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(8px);
}

.marketing-navbar .container {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.marketing-navbar .navbar-brand {
  text-decoration: none;
}

.marketing-navbar .navbar-collapse {
  margin-left: auto;
}

.marketing-navbar .navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.marketing-navbar .nav-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.marketing-navbar .navbar-toggler {
  margin-left: auto;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.48);
  color: rgba(226, 232, 240, 0.92);
  cursor: pointer;
}

.marketing-navbar .navbar-toggler-icon {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}

.marketing-navbar .navbar-toggler-icon::before,
.marketing-navbar .navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.marketing-navbar .navbar-toggler-icon::before {
  top: -6px;
}

.marketing-navbar .navbar-toggler-icon::after {
  top: 6px;
}

@media (max-width: 991px) {
  .marketing-navbar .container {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
  }

  .marketing-navbar .navbar-toggler {
    display: inline-flex;
  }

  .marketing-navbar .navbar-collapse {
    width: 100%;
    display: none;
    margin-left: 0;
  }

  .marketing-navbar .navbar-collapse.show {
    display: block;
  }

  .marketing-navbar .navbar-nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 0 10px;
  }
}

@media (min-width: 992px) {
  .marketing-navbar .navbar-collapse {
    display: flex !important;
    justify-content: flex-end;
    flex: 1;
  }
}

.app-topbar__inner {
  max-width: 1200px;
  margin: auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

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

.app-brand__link {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.app-brand__link:hover {
  color: #ffffff;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-nav--signed-in {
  gap: 10px;
}

.app-nav__group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-nav__group--utility {
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(148, 163, 184, 0.26);
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: #cbd5e1;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 600;
  font-size: 13px;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.app-nav-link__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.app-nav-link__label {
  line-height: 1;
}

.app-nav-link:hover {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.3);
  color: #f8fafc;
}

body.signed-in-app .app-nav-link.is-active {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(147, 197, 253, 0.56);
  color: #eff6ff;
}

.app-nav-link.is-active .app-nav-link__icon {
  opacity: 1;
}

.app-nav-link--public {
  color: #cbd5e1;
}

@media (max-width: 1080px) and (min-width: 841px) {
  .app-nav-link--utility {
    padding-inline: 8px;
  }

  .app-nav-link--utility .app-nav-link__label {
    display: none;
  }
}

.app-account-menu {
  position: relative;
  margin-left: 8px;
}

.app-account-details {
  position: relative;
}

.app-account-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.app-account-summary::-webkit-details-marker {
  display: none;
}

.app-account-summary__name {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-account-summary__caret {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1;
  transition: transform 160ms ease;
}

.app-account-details[open] .app-account-summary__caret {
  transform: rotate(180deg);
}

.app-account-dropdown {
  position: absolute;
  right: 0;
  top: 42px;
  min-width: 260px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 17, 31, 0.99) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 46px rgba(2, 6, 23, 0.56);
  padding: 8px;
  z-index: 50;
}

.app-account-dropdown__meta {
  padding: 8px 10px 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.app-account-dropdown__company {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.app-account-dropdown__email {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.app-account-dropdown__actions {
  padding: 8px 0 0;
  display: grid;
  gap: 8px;
}

.app-account-dropdown__actions .button_to {
  margin: 0;
}

.app-main {
  color: var(--text-main);
}

.app-verify-banner {
  border-bottom: 1px solid rgba(251, 191, 36, 0.42);
  background: rgba(146, 64, 14, 0.26);
  color: #fde68a;
  padding: 10px 16px;
  font-size: 13px;
}

.app-flash {
  margin: 0 0 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  border-left-width: 4px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
  animation: flash-enter 180ms ease-out;
}

.app-flash--notice {
  border-color: #bae6fd;
  border-left-color: #0284c7;
  background: #f0f9ff;
  color: #0c4a6e;
}

.app-flash--alert {
  border-color: #fecdd3;
  border-left-color: #dc2626;
  background: #fff1f2;
  color: #7f1d1d;
}

body.signed-in-app .app-flash {
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.42);
}

body.signed-in-app .btn {
  border-color: transparent;
  color: #f8fafc;
}

body.signed-in-app .btn-primary {
  background: linear-gradient(140deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.95));
  border-color: rgba(147, 197, 253, 0.56);
  color: #eff6ff;
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.35);
}

body.signed-in-app .btn-primary:hover {
  border-color: rgba(191, 219, 254, 0.75);
  background: linear-gradient(140deg, rgba(59, 130, 246, 0.98), rgba(37, 99, 235, 0.98));
}

body.signed-in-app .btn-secondary {
  background: rgba(30, 41, 59, 0.62);
  border-color: rgba(148, 163, 184, 0.36);
  color: #dbeafe;
}

body.signed-in-app .btn-secondary:hover {
  background: rgba(51, 65, 85, 0.72);
  border-color: rgba(147, 197, 253, 0.45);
}

body.signed-in-app .btn-tertiary {
  color: #bfdbfe;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.52);
}

body.signed-in-app .btn-tertiary:hover {
  background: rgba(30, 41, 59, 0.74);
  color: #e2e8f0;
}

body.signed-in-app .btn-destructive {
  background: linear-gradient(140deg, rgba(185, 28, 28, 0.92), rgba(127, 29, 29, 0.95));
  border-color: rgba(248, 113, 113, 0.52);
  color: #fee2e2;
  box-shadow: 0 10px 20px rgba(127, 29, 29, 0.28);
}

body.signed-in-app .btn-destructive:hover {
  background: linear-gradient(140deg, rgba(220, 38, 38, 0.94), rgba(153, 27, 27, 0.96));
  border-color: rgba(252, 165, 165, 0.65);
}

body.signed-in-app .btn-account {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

body.signed-in-app .btn-account:hover {
  background: rgba(51, 65, 85, 0.78);
  border-color: rgba(148, 163, 184, 0.5);
}

body.signed-in-app .btn-pill {
  background: rgba(15, 23, 42, 0.48);
  border-color: rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
}

body.signed-in-app .btn-pill.is-active {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(147, 197, 253, 0.52);
  color: #eff6ff;
}

body.signed-in-app .page-header,
body.signed-in-app .dash-header,
body.signed-in-app .panel,
body.signed-in-app .form-card,
body.signed-in-app .section-card,
body.signed-in-app .dash-card,
body.signed-in-app .dash-section,
body.signed-in-app .table-shell,
body.signed-in-app .policy-card,
body.signed-in-app .auth-card,
body.signed-in-app .ops-workflow-card,
body.signed-in-app .ops-queue-card,
body.signed-in-app .ops-metric,
body.signed-in-app .ops-field,
body.signed-in-app .ops-seat-card,
body.signed-in-app .ops-notes,
body.signed-in-app .ops-action-group,
body.signed-in-app .settings-routing-destination,
body.signed-in-app .settings-network-block,
body.signed-in-app .settings-referral-block,
body.signed-in-app .settings-network-group,
body.signed-in-app .settings-network-seat,
body.signed-in-app .settings-referral-group,
body.signed-in-app .settings-referral-card,
body.signed-in-app .account-billing-row,
body.signed-in-app .contacts-empty {
  background: linear-gradient(165deg, var(--surface-1) 0%, var(--surface-0) 100%);
  border-color: var(--border-soft);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.32);
}

body.signed-in-app .page-title,
body.signed-in-app .dash-title,
body.signed-in-app .dash-card__value,
body.signed-in-app .dash-section-title,
body.signed-in-app .dash-subsection__title,
body.signed-in-app .section-title,
body.signed-in-app .lead-title,
body.signed-in-app .auth-title,
body.signed-in-app .settings-card-title,
body.signed-in-app .policy-title,
body.signed-in-app .ops-panel-title,
body.signed-in-app .ops-section-title,
body.signed-in-app .ops-company-title,
body.signed-in-app .ops-overview-title,
body.signed-in-app .contact-primary,
body.signed-in-app .contact-phone,
body.signed-in-app .summary-value,
body.signed-in-app .ops-value,
body.signed-in-app .settings-user-name {
  color: var(--text-strong);
}

body.signed-in-app .dash-hero__filters,
body.signed-in-app .leads-workspace__toolbar {
  border-top-color: rgba(148, 163, 184, 0.24);
}

body.signed-in-app .leads-table-shell--embedded {
  box-shadow: none;
}

body.signed-in-app .page-subtitle,
body.signed-in-app .dash-subtitle,
body.signed-in-app .dash-meta,
body.signed-in-app .section-subtitle,
body.signed-in-app .section-meta,
body.signed-in-app .summary-meta,
body.signed-in-app .settings-help,
body.signed-in-app .settings-card-subtitle,
body.signed-in-app .auth-subtitle,
body.signed-in-app .policy-intro,
body.signed-in-app .policy-section p,
body.signed-in-app .policy-section ul,
body.signed-in-app .policy-section ol,
body.signed-in-app .ops-company-meta,
body.signed-in-app .ops-status-label,
body.signed-in-app .ops-label,
body.signed-in-app .contact-secondary {
  color: var(--text-muted);
}

body.signed-in-app .dash-meta strong {
  color: var(--text-strong);
}

body.signed-in-app .dash-table thead {
  background: rgba(15, 23, 42, 0.92);
}

body.signed-in-app .dash-table th {
  color: #93a7c2;
}

body.signed-in-app .dash-table td {
  color: #dbeafe;
  border-top-color: rgba(148, 163, 184, 0.22);
}

body.signed-in-app .dash-table tr:hover {
  background: rgba(30, 41, 59, 0.56);
}

body.signed-in-app .leads-table-shell .dash-table thead th,
body.signed-in-app .contacts-table-shell .dash-table thead th {
  background: rgba(15, 23, 42, 0.96);
}

body.signed-in-app .input-control,
body.signed-in-app .auth-input,
body.signed-in-app .status-loss-select {
  background: rgba(15, 23, 42, 0.74);
  border-color: rgba(148, 163, 184, 0.36);
  color: #e2e8f0;
}

/* Native <select> option menus may render on a light surface; force readable contrast. */
body.signed-in-app select.input-control option,
body.signed-in-app .status-loss-select option {
  background: #0f172a;
  color: #e2e8f0;
}

body.signed-in-app select.input-control,
body.signed-in-app .status-loss-select {
  color-scheme: dark;
}

body.signed-in-app .input-control::placeholder {
  color: #7f91ab;
}

body.signed-in-app .input-control--readonly,
body.signed-in-app .input-control:disabled {
  background: rgba(15, 23, 42, 0.42);
  color: #94a3b8;
}

body.signed-in-app .input-control:focus,
body.signed-in-app .auth-input:focus,
body.signed-in-app .status-loss-select:focus {
  border-color: rgba(96, 165, 250, 0.88);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
  background: rgba(15, 23, 42, 0.88);
}

body.signed-in-app .form-label,
body.signed-in-app .summary-label,
body.signed-in-app .dash-card__label,
body.signed-in-app .lead-kicker,
body.signed-in-app .lead-counter-label,
body.signed-in-app .ops-metric__label,
body.signed-in-app .ops-company-meta span:not(.ops-badge) {
  color: #9fb4cf;
}

body.signed-in-app .ops-company-meta span:not(.ops-badge) {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.3);
}

body.signed-in-app .lead-counter-card,
body.signed-in-app .settings-list--framed,
body.signed-in-app .settings-user-list {
  background: linear-gradient(165deg, rgba(20, 32, 55, 0.8) 0%, rgba(9, 17, 31, 0.92) 100%);
  border-color: rgba(148, 163, 184, 0.3);
}

body.signed-in-app .settings-user-row {
  border-top-color: rgba(148, 163, 184, 0.22);
}

body.signed-in-app .settings-user-row--owner {
  background: rgba(120, 53, 15, 0.24);
  border-left-color: #f59e0b;
}

body.signed-in-app .settings-user-row--muted {
  background: rgba(15, 23, 42, 0.5);
}

body.signed-in-app .account-banner,
body.signed-in-app .account-banner--warn {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(251, 191, 36, 0.46);
  color: #fcd34d;
}

body.signed-in-app .status-new {
  background: rgba(67, 56, 202, 0.24);
  color: #c7d2fe;
}

body.signed-in-app .status-contacted {
  background: rgba(8, 145, 178, 0.24);
  color: #a5f3fc;
}

body.signed-in-app .status-completed,
body.signed-in-app .status-closed_won {
  background: rgba(22, 163, 74, 0.24);
  color: #bbf7d0;
}

body.signed-in-app .status-lost,
body.signed-in-app .status-closed_lost,
body.signed-in-app .status-canceled {
  background: rgba(185, 28, 28, 0.28);
  color: #fecaca;
}

body.signed-in-app .auth-link {
  color: #93c5fd;
}

body.signed-in-app .auth-link-strong {
  color: #e2e8f0;
}

.auth-action-block {
  margin-top: 18px;
}

.auth-secondary-action {
  margin-top: 12px;
}

.invite-shell {
  max-width: 640px;
}

.invite-card {
  display: grid;
  gap: 12px;
}

.invite-card .settings-actions {
  margin-top: 2px;
  justify-content: flex-start;
}

.invite-card .settings-actions .btn {
  min-width: 170px;
}

.invite-section-head {
  margin-top: 8px;
}

.invite-section-head .section-heading {
  margin: 0 0 6px 0;
}

.invite-form {
  display: grid;
  gap: 12px;
}

.lead-create-card {
  margin-top: 20px;
}

.lead-create-form {
  display: grid;
  gap: 18px;
}

.lead-create-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Additional visibility hardening for dark theme surfaces. */
body.signed-in-app .lead-header,
body.signed-in-app .lead-summary-grid,
body.signed-in-app .slot-pill,
body.signed-in-app .resolution-card,
body.signed-in-app .lead-modal__card,
body.signed-in-app .contacts-search,
body.signed-in-app .leads-filter-panel,
body.signed-in-app .pagination-toggle__state {
  background: linear-gradient(165deg, var(--surface-1) 0%, var(--surface-0) 100%);
  border-color: var(--border-soft);
  color: var(--text-main);
}

body.signed-in-app .resolution-card--won {
  border-color: rgba(147, 197, 253, 0.54);
  background: rgba(30, 58, 138, 0.3);
}

body.signed-in-app .resolution-card--lost {
  border-color: rgba(248, 113, 113, 0.52);
  background: rgba(127, 29, 29, 0.28);
}

body.signed-in-app .lead-modal__actions {
  border-top-color: rgba(148, 163, 184, 0.28);
}

body.signed-in-app .page-title,
body.signed-in-app .lead-counter-value,
body.signed-in-app .resolution-card__title,
body.signed-in-app .lead-modal__title,
body.signed-in-app .settings-section-title,
body.signed-in-app .settings-subsection-title,
body.signed-in-app .settings-network-title,
body.signed-in-app .settings-network-seat-company,
body.signed-in-app .settings-referral-number,
body.signed-in-app .account-billing-value,
body.signed-in-app .settings-user-full-name {
  color: var(--text-strong);
}

body.signed-in-app .lead-subtitle,
body.signed-in-app .status-meta,
body.signed-in-app .lead-modal__intro,
body.signed-in-app .resolution-card__subtitle,
body.signed-in-app .pagination-loading,
body.signed-in-app .pagination-toggle,
body.signed-in-app .dash-table-empty,
body.signed-in-app .settings-list,
body.signed-in-app .settings-network-seat-trade,
body.signed-in-app .settings-user-time,
body.signed-in-app .account-billing-label,
body.signed-in-app .settings-user-email {
  color: var(--text-muted);
}

body.signed-in-app .info-banner {
  background: rgba(30, 64, 175, 0.26);
  color: #dbeafe;
  border-color: rgba(147, 197, 253, 0.46);
}

body.signed-in-app .info-banner.neutral {
  background: rgba(30, 41, 59, 0.62);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.32);
}

body.signed-in-app .settings-chip,
body.signed-in-app .ops-badge {
  background: rgba(30, 41, 59, 0.72);
  color: #dbeafe;
  border-color: rgba(148, 163, 184, 0.34);
}

body.signed-in-app .settings-chip--ok,
body.signed-in-app .ops-badge--yes,
body.signed-in-app .ops-badge--active {
  background: rgba(6, 95, 70, 0.42);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.46);
}

body.signed-in-app .ops-badge--pod-live {
  background: rgba(20, 83, 45, 0.55);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.58);
}

body.signed-in-app .ops-badge--pod-assembling {
  background: rgba(12, 74, 110, 0.42);
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.62);
}

body.signed-in-app .ops-badge--pod-replacing {
  background: rgba(124, 45, 18, 0.6);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.72);
}


body.signed-in-app .settings-chip--warn,
body.signed-in-app .settings-chip--owner,
body.signed-in-app .ops-badge--warn {
  background: rgba(120, 53, 15, 0.36);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.4);
}

body.signed-in-app .settings-chip--danger,
body.signed-in-app .ops-badge--danger,
body.signed-in-app .ops-badge--deactivated {
  background: rgba(127, 29, 29, 0.36);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.46);
}

body.signed-in-app .settings-chip--pending,
body.signed-in-app .ops-badge--info {
  background: rgba(8, 47, 73, 0.42);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.44);
}

body.signed-in-app .settings-chip--neutral,
body.signed-in-app .settings-chip--muted {
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.34);
}

body.signed-in-app .auth-helper,
body.signed-in-app .auth-footer,
body.signed-in-app .leads-filter-label,
body.signed-in-app .ops-section-subtitle,
body.signed-in-app .ops-workflow-list {
  color: var(--text-muted);
}

body.signed-in-app .ops-playbook-list {
  color: var(--text-muted);
}

body.signed-in-app .ops-collapsible__summary {
  color: var(--text-strong);
}

body.signed-in-app .ops-collapsible__summary::marker {
  color: var(--text-muted);
}

body.signed-in-app .ops-playbook-list li::marker {
  color: #94a3b8;
}

body.signed-in-app .ops-section-heading .ops-section-title {
  color: var(--text-strong);
}

body.signed-in-app .ops-section-heading .ops-section-subtitle {
  color: var(--text-muted);
}

body.signed-in-app .ops-metric__value {
  color: var(--text-strong);
}

body.signed-in-app .ops-queue-count {
  color: var(--text-strong);
}

body.signed-in-app .ops-warning-text {
  color: #fcd34d;
}

body.signed-in-app .returning-badge {
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.34);
}

body.signed-in-app .settings-help--warn {
  color: #fde68a;
}

body.signed-in-app .settings-network-seat--open {
  background: rgba(120, 53, 15, 0.3);
  border-color: rgba(251, 191, 36, 0.45);
}

body.signed-in-app .settings-network-seat-company--open {
  color: #fde68a;
}

/* ---------- MARKETING POLICY PAGES ---------- */

body.marketing-page {
  background: #f8f9fa;
  color: #1f2937;
}

body.marketing-page .policy-page {
  padding: 120px 16px 72px;
  background:
    radial-gradient(700px 340px at 10% -12%, rgba(59, 130, 246, 0.08), transparent 62%),
    radial-gradient(620px 300px at 92% -18%, rgba(14, 165, 233, 0.08), transparent 58%),
    #f8f9fa;
}

body.marketing-page .policy-card {
  max-width: 920px;
  width: min(920px, 100%);
  margin: 0 auto;
  box-sizing: border-box;
  border: 1px solid #dbe5f2;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
  padding: 40px 44px;
  position: relative;
  overflow: hidden;
}

body.marketing-page .policy-title {
  margin: 0 0 10px 0;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #0f172a;
}

body.marketing-page .policy-intro {
  margin: 0 0 22px 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.7;
}

body.marketing-page .policy-section + .policy-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

body.marketing-page .policy-section h2 {
  margin: 0 0 10px 0;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: #0f172a;
}

body.marketing-page .policy-section h3 {
  margin: 14px 0 8px 0;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #0f172a;
}

body.marketing-page .policy-section p,
body.marketing-page .policy-section ul,
body.marketing-page .policy-section ol {
  color: #475569;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

body.marketing-page .policy-section p + p {
  margin-top: 10px;
}

body.marketing-page .policy-section ul,
body.marketing-page .policy-section ol {
  margin-left: 18px;
  padding-left: 0;
}

body.marketing-page .policy-section li {
  margin: 0 0 8px 0;
}

@media (max-width: 768px) {
  body.marketing-page .policy-page {
    padding: 108px 16px 56px;
  }

  body.marketing-page .policy-card {
    border-radius: 14px;
    padding: 28px 22px;
  }

  body.marketing-page .policy-title {
    font-size: 34px;
  }
}

@media (max-width: 576px) {
  body.marketing-page .policy-page {
    padding: 92px 12px 40px;
  }

  body.marketing-page .policy-card {
    border-radius: 12px;
    padding: 22px 16px;
  }

  body.marketing-page .policy-title {
    font-size: 28px;
    line-height: 1.15;
  }

  body.marketing-page .policy-intro {
    margin-bottom: 16px;
    font-size: 14px;
  }

  body.marketing-page .policy-section + .policy-section {
    margin-top: 16px;
    padding-top: 14px;
  }

  body.marketing-page .policy-section h2 {
    font-size: 17px;
    margin-bottom: 8px;
  }

  body.marketing-page .policy-section h3 {
    font-size: 14px;
    margin: 12px 0 6px;
  }

  body.marketing-page .policy-section p,
  body.marketing-page .policy-section ul,
  body.marketing-page .policy-section ol {
    font-size: 14px;
    line-height: 1.65;
  }

  body.marketing-page .policy-section ul,
  body.marketing-page .policy-section ol {
    margin-left: 16px;
  }
}

@media (max-width: 840px) {
  .app-topbar__inner {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .app-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .app-nav__group {
    flex-wrap: wrap;
  }

  .app-nav__group--utility {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .app-account-menu {
    margin-left: 0;
  }

  .app-account-dropdown {
    right: auto;
    left: 0;
  }
}
