:root {
  --stp-navy: #0f172a;
  --stp-navy-2: #111c33;
  --stp-teal: #14b8a6;
  --stp-blue: #2563eb;
  --stp-orange: #f97316;
  --stp-bg: #f8fafc;
  --stp-card: #ffffff;
  --stp-text: #111827;
  --stp-muted: #64748b;
  --stp-line: rgba(15, 23, 42, 0.1);
  --stp-success: #22c55e;
  --stp-warning: #f59e0b;
  --stp-danger: #ef4444;
  --stp-sidebar-width: 286px;
  --stp-mobile-nav-height: 74px;
  --stp-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --stp-shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.08);
  --stp-radius-xl: 28px;
  --stp-radius-lg: 20px;
  --stp-radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--stp-bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--stp-text);
  background:
    radial-gradient(circle at 0% 0%, rgba(20, 184, 166, 0.12), transparent 28rem),
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.12), transparent 32rem),
    var(--stp-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button {
  cursor: pointer;
}

.stp-app-shell {
  min-height: 100vh;
}

.stp-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: var(--stp-sidebar-width);
  padding: 1rem;
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.25), transparent 18rem),
    linear-gradient(180deg, var(--stp-navy), #0b1120);
  box-shadow: 18px 0 60px rgba(15, 23, 42, 0.2);
}

.stp-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 68px;
  padding: 0.6rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.stp-brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-size: 1.2rem;
  font-weight: 1000;
  box-shadow: 0 16px 34px rgba(20, 184, 166, 0.32);
}

.stp-brand strong,
.stp-brand small {
  display: block;
}

.stp-brand strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.stp-brand small {
  max-width: 170px;
  margin-top: 0.12rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stp-nav {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 0;
  overflow-y: auto;
}

.stp-nav-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 0.72rem;
  min-height: 46px;
  padding: 0.42rem 0.58rem;
  border: 1px solid transparent;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.72);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.stp-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.stp-nav-item.is-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.28), rgba(37, 99, 235, 0.22));
}

.stp-nav-item.is-muted {
  opacity: 0.58;
}

.stp-nav-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.08rem;
}

.stp-nav-label {
  font-size: 0.9rem;
  font-weight: 850;
}

.stp-coming-soon {
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  font-size: 0.62rem;
  font-weight: 900;
}

.stp-sidebar-footer {
  margin-top: auto;
}

.stp-plan-box {
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
}

.stp-plan-box small,
.stp-plan-box strong,
.stp-plan-box span {
  display: block;
}

.stp-plan-box small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 800;
}

.stp-plan-box strong {
  margin-top: 0.2rem;
  color: #fff;
  font-size: 1.15rem;
}

.stp-plan-box span {
  margin-top: 0.28rem;
  color: #99f6e4;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: capitalize;
}

.stp-content-shell {
  min-height: 100vh;
  margin-left: var(--stp-sidebar-width);
  padding: 1rem 1.25rem 2rem;
}

.stp-topbar {
  position: sticky;
  top: 1rem;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  min-height: 78px;
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--stp-shadow-soft);
  backdrop-filter: blur(16px);
}

.stp-page-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.stp-page-title h1 {
  margin: 0;
  color: var(--stp-navy);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.stp-page-title p {
  margin: 0.22rem 0 0;
  color: var(--stp-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.stp-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.stp-language-button,
.stp-icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--stp-line);
  border-radius: 15px;
  color: var(--stp-navy);
  background: #fff;
  font-weight: 950;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.stp-language-button:hover,
.stp-icon-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--stp-shadow-soft);
}

.stp-mobile-menu-button {
  display: none;
}

.stp-user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  border: 1px solid var(--stp-line);
  border-radius: 999px;
  background: #fff;
}

.stp-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-size: 0.82rem;
  font-weight: 1000;
}

.stp-user-chip strong,
.stp-user-chip small {
  display: block;
}

.stp-user-chip strong {
  color: var(--stp-navy);
  font-size: 0.84rem;
}

.stp-user-chip small {
  margin-top: 0.05rem;
  color: var(--stp-muted);
  font-size: 0.7rem;
  text-transform: capitalize;
}

.stp-demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(249, 115, 22, 0.26);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(20, 184, 166, 0.08));
  box-shadow: var(--stp-shadow-soft);
}

.stp-demo-banner strong {
  color: var(--stp-navy);
}

.stp-demo-banner span {
  flex: 1;
  color: var(--stp-muted);
  font-size: 0.9rem;
}

.stp-demo-banner a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-size: 0.82rem;
  font-weight: 900;
}

.stp-main {
  display: block;
  min-height: calc(100vh - 120px);
  padding: 0.25rem 0 5rem;
}

.stp-card {
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
}

.stp-grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.stp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--stp-navy);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.stp-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--stp-shadow-soft);
}

.stp-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
}

.stp-btn-dark {
  color: #fff;
  background: var(--stp-navy);
}

.stp-btn-danger {
  color: #fff;
  background: var(--stp-danger);
}

.stp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 26px;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: var(--stp-navy);
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.75rem;
  font-weight: 900;
}

.stp-badge-success {
  color: #166534;
  background: rgba(34, 197, 94, 0.14);
}

.stp-badge-warning {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
}

.stp-badge-danger {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.14);
}

.stp-badge-info {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
}

.stp-empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 2rem;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: var(--stp-radius-xl);
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.stp-empty-state h2,
.stp-empty-state h3 {
  margin: 0 0 0.5rem;
  color: var(--stp-navy);
}

.stp-empty-state p {
  max-width: 560px;
  margin: 0 auto 1rem;
  color: var(--stp-muted);
  line-height: 1.65;
}

.stp-form {
  display: grid;
  gap: 1rem;
}

.stp-field {
  display: grid;
  gap: 0.4rem;
}

.stp-field label {
  color: var(--stp-navy);
  font-size: 0.86rem;
  font-weight: 900;
}

.stp-field input,
.stp-field select,
.stp-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.82rem;
  border: 1px solid var(--stp-line);
  border-radius: 14px;
  color: var(--stp-text);
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.stp-field textarea {
  min-height: 120px;
  resize: vertical;
}

.stp-field input:focus,
.stp-field select:focus,
.stp-field textarea:focus {
  border-color: rgba(20, 184, 166, 0.65);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.stp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: #fff;
  box-shadow: var(--stp-shadow-soft);
}

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

.stp-table th,
.stp-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--stp-line);
  text-align: left;
  vertical-align: middle;
}

.stp-table th {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stp-table td {
  color: var(--stp-text);
  font-size: 0.9rem;
}

.stp-mobile-nav {
  display: none;
}

.stp-mobile-overlay {
  display: none;
}

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

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

@media (max-width: 900px) {
  body {
    padding-bottom: var(--stp-mobile-nav-height);
  }

  .stp-sidebar {
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .stp-menu-open .stp-sidebar {
    transform: translateX(0);
  }

  .stp-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(3px);
  }

  .stp-menu-open .stp-mobile-overlay {
    display: block;
  }

  .stp-content-shell {
    margin-left: 0;
    padding: 0.7rem 0.7rem 1rem;
  }

  .stp-topbar {
    top: 0.7rem;
    border-radius: 22px;
  }

  .stp-mobile-menu-button {
    display: grid;
  }

  .stp-user-chip {
    display: none;
  }

  .stp-mobile-nav {
    position: fixed;
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.7rem;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.35rem;
    min-height: var(--stp-mobile-nav-height);
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--stp-shadow);
    backdrop-filter: blur(16px);
  }

  .stp-mobile-nav-item {
    display: grid;
    place-items: center;
    gap: 0.15rem;
    border-radius: 18px;
    color: var(--stp-muted);
    font-weight: 900;
  }

  .stp-mobile-nav-item span {
    font-size: 1.1rem;
  }

  .stp-mobile-nav-item small {
    font-size: 0.62rem;
    line-height: 1;
  }

  .stp-mobile-nav-item.is-active {
    color: var(--stp-navy);
    background: rgba(20, 184, 166, 0.12);
  }

  .stp-demo-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .stp-topbar {
    align-items: flex-start;
  }

  .stp-page-title {
    align-items: flex-start;
  }

  .stp-page-title p {
    display: none;
  }

  .stp-topbar-actions {
    margin-left: auto;
  }

  .stp-grid-2,
  .stp-grid-3,
  .stp-grid-4 {
    grid-template-columns: 1fr;
  }

  .stp-main {
    padding-bottom: 6rem;
  }

  .stp-mobile-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: auto;
  }

  .stp-table-wrap {
    border-radius: 18px;
  }
}

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


/* Dashboard module */

.stp-dashboard-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.28), transparent 18rem),
    radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.28), transparent 20rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-dashboard-kicker,
.stp-section-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 0.5rem;
  padding: 0.24rem 0.56rem;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stp-dashboard-hero .stp-dashboard-kicker {
  color: #99f6e4;
  background: rgba(255, 255, 255, 0.1);
}

.stp-dashboard-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-dashboard-hero p {
  max-width: 760px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-dashboard-hero-panel {
  min-width: 240px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.stp-dashboard-hero-panel small,
.stp-dashboard-hero-panel strong,
.stp-dashboard-hero-panel span {
  display: block;
}

.stp-dashboard-hero-panel small {
  color: rgba(255, 255, 255, 0.58);
  font-weight: 850;
}

.stp-dashboard-hero-panel strong {
  margin-top: 0.3rem;
  color: #fff;
  font-size: 1.25rem;
}

.stp-dashboard-hero-panel span {
  margin-top: 0.28rem;
  color: #99f6e4;
  font-size: 0.82rem;
  font-weight: 850;
}

.stp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-kpi-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 118px;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--stp-shadow-soft);
}

.stp-kpi-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.35rem;
}

.stp-kpi-card.teal .stp-kpi-icon {
  background: rgba(20, 184, 166, 0.13);
}

.stp-kpi-card.blue .stp-kpi-icon {
  background: rgba(37, 99, 235, 0.12);
}

.stp-kpi-card.orange .stp-kpi-icon {
  background: rgba(249, 115, 22, 0.13);
}

.stp-kpi-card span {
  display: block;
  color: var(--stp-muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.stp-kpi-card strong {
  display: block;
  margin-top: 0.28rem;
  color: var(--stp-navy);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stp-dashboard-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 1rem;
}

.stp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-card-header.compact {
  margin-bottom: 0.7rem;
}

.stp-card-header h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.stp-card-header p {
  max-width: 680px;
  margin: 0.35rem 0 0;
  color: var(--stp-muted);
  line-height: 1.55;
}

.stp-mini-map {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  margin-bottom: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.2), transparent 5rem),
    radial-gradient(circle at 70% 60%, rgba(37, 99, 235, 0.18), transparent 7rem),
    #eff6ff;
}

.stp-mini-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
}

.stp-mini-pin {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--stp-orange);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.stp-mini-pin.pin-a {
  left: 17%;
  top: 28%;
  background: var(--stp-success);
}

.stp-mini-pin.pin-b {
  left: 47%;
  top: 42%;
  background: var(--stp-blue);
}

.stp-mini-pin.pin-c {
  left: 72%;
  top: 34%;
  background: var(--stp-orange);
}

.stp-mini-pin.pin-d {
  left: 58%;
  top: 72%;
  background: var(--stp-warning);
}

.stp-mini-route {
  position: absolute;
  z-index: 2;
  border: 3px dashed rgba(37, 99, 235, 0.42);
  border-left: 0;
  border-bottom: 0;
}

.stp-mini-route.route-a {
  left: 21%;
  top: 34%;
  width: 28%;
  height: 16%;
  border-radius: 0 30px 0 0;
  transform: rotate(8deg);
}

.stp-mini-route.route-b {
  left: 51%;
  top: 45%;
  width: 22%;
  height: 26%;
  border-radius: 0 36px 0 0;
  transform: rotate(-18deg);
}

.stp-mini-map-card {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  min-width: 150px;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
  backdrop-filter: blur(12px);
}

.stp-mini-map-card strong,
.stp-mini-map-card span {
  display: block;
}

.stp-mini-map-card strong {
  color: var(--stp-navy);
  font-size: 1.9rem;
  line-height: 1;
}

.stp-mini-map-card span {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-route-list {
  display: grid;
  gap: 0.65rem;
}

.stp-route-row {
  display: grid;
  grid-template-columns: 82px 1fr minmax(110px, 0.5fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid var(--stp-line);
  border-radius: 18px;
  background: #fff;
}

.stp-route-time {
  color: var(--stp-navy);
  font-size: 0.84rem;
  font-weight: 950;
}

.stp-route-main strong,
.stp-route-main span {
  display: block;
}

.stp-route-main strong {
  color: var(--stp-navy);
}

.stp-route-main span,
.stp-route-assigned {
  color: var(--stp-muted);
  font-size: 0.82rem;
}

.stp-route-assigned {
  font-weight: 850;
}

.stp-dashboard-side {
  display: grid;
  gap: 1rem;
  align-self: start;
}

.stp-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.stp-action-button {
  display: grid;
  gap: 0.42rem;
  min-height: 92px;
  padding: 0.85rem;
  border: 1px solid var(--stp-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.stp-action-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--stp-shadow-soft);
}

.stp-action-button span:first-child {
  font-size: 1.4rem;
}

.stp-action-button span:last-child {
  color: var(--stp-navy);
  font-size: 0.86rem;
  font-weight: 950;
}

.stp-activity-list {
  display: grid;
  gap: 0.65rem;
}

.stp-activity-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-activity-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
}

.stp-activity-item strong,
.stp-activity-item small {
  display: block;
}

.stp-activity-item strong {
  color: var(--stp-navy);
  font-size: 0.87rem;
}

.stp-activity-item small,
.stp-activity-item time {
  color: var(--stp-muted);
  font-size: 0.74rem;
}

.stp-dashboard-note {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 18px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
  font-size: 0.9rem;
}

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

  .stp-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .stp-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .stp-dashboard-hero-panel {
    min-width: 0;
  }

  .stp-kpi-grid,
  .stp-action-grid {
    grid-template-columns: 1fr;
  }

  .stp-card-header {
    flex-direction: column;
  }

  .stp-card-header .stp-btn {
    width: 100%;
  }

  .stp-route-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stp-dashboard-note {
    flex-direction: column;
  }
}


/* Routes module */

.stp-routes-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.18), transparent 20rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-routes-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-routes-hero p {
  max-width: 760px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-routes-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 0.65rem;
}

.stp-routes-hero-stats div {
  min-width: 92px;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.stp-routes-hero-stats strong,
.stp-routes-hero-stats span {
  display: block;
}

.stp-routes-hero-stats strong {
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}

.stp-routes-hero-stats span {
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.76rem;
  font-weight: 850;
}

.stp-routes-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
}

.stp-routes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 1rem;
}

.stp-routes-left,
.stp-routes-right {
  display: grid;
  gap: 1rem;
  align-self: start;
}

.stp-route-map-card {
  overflow: hidden;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-xl);
  background: #fff;
  box-shadow: var(--stp-shadow-soft);
}

.stp-route-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--stp-line);
}

.stp-route-map-toolbar strong,
.stp-route-map-toolbar span {
  display: block;
}

.stp-route-map-toolbar strong {
  color: var(--stp-navy);
}

.stp-route-map-toolbar span {
  margin-top: 0.2rem;
  color: var(--stp-muted);
  font-size: 0.82rem;
}

.stp-route-map {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  background:
    radial-gradient(circle at 20% 32%, rgba(20, 184, 166, 0.2), transparent 6rem),
    radial-gradient(circle at 75% 62%, rgba(37, 99, 235, 0.18), transparent 8rem),
    #eff6ff;
}

.stp-route-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 38px 38px;
}

.stp-route-map-line {
  position: absolute;
  z-index: 1;
  border: 3px dashed rgba(37, 99, 235, 0.35);
  border-left: 0;
  border-bottom: 0;
  pointer-events: none;
}

.stp-route-map-line.line-one {
  left: 20%;
  top: 34%;
  width: 30%;
  height: 18%;
  border-radius: 0 36px 0 0;
  transform: rotate(8deg);
}

.stp-route-map-line.line-two {
  left: 50%;
  top: 44%;
  width: 28%;
  height: 28%;
  border-radius: 0 42px 0 0;
  transform: rotate(-16deg);
}

.stp-route-map-pin {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 4px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--stp-blue);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
  transform: translate(-50%, -50%);
}

.stp-route-map-pin span {
  font-size: 0.72rem;
  font-weight: 1000;
}

.stp-route-map-pin.completed {
  background: var(--stp-success);
}

.stp-route-map-pin.in_progress {
  background: var(--stp-blue);
}

.stp-route-map-pin.scheduled {
  background: var(--stp-teal);
}

.stp-route-map-pin.pending,
.stp-route-map-pin.rescheduled {
  background: var(--stp-orange);
}

.stp-route-map-legend {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
  backdrop-filter: blur(12px);
}

.stp-route-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: var(--stp-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-dot.completed {
  background: var(--stp-success);
}

.legend-dot.in_progress {
  background: var(--stp-blue);
}

.legend-dot.scheduled {
  background: var(--stp-teal);
}

.legend-dot.pending {
  background: var(--stp-orange);
}

.stp-route-visit-list {
  display: grid;
  gap: 0.7rem;
}

.stp-route-visit-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  border: 1px solid var(--stp-line);
  border-radius: 18px;
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stp-route-visit-card:hover,
.stp-route-visit-card.is-highlighted {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: var(--stp-shadow-soft);
}

.stp-route-visit-order {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
}

.stp-route-visit-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.stp-route-visit-title strong {
  color: var(--stp-navy);
  font-size: 1rem;
}

.stp-route-visit-main p {
  margin: 0.18rem 0 0.42rem;
  color: var(--stp-muted);
  font-size: 0.86rem;
}

.stp-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stp-route-meta span {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  color: var(--stp-muted);
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.76rem;
  font-weight: 850;
}

.stp-route-visit-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stp-team-route-board {
  display: grid;
  gap: 0.75rem;
}

.stp-team-route-column {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid var(--stp-line);
  border-radius: 18px;
  background: #fff;
}

.stp-team-route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.stp-team-route-header strong {
  color: var(--stp-navy);
}

.stp-team-route-header span {
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-team-stop {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
}

.stp-team-stop span,
.stp-team-stop small {
  color: var(--stp-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.stp-team-stop strong {
  color: var(--stp-navy);
  font-size: 0.84rem;
}

.stp-team-stop.completed {
  background: rgba(34, 197, 94, 0.1);
}

.stp-team-stop.in_progress {
  background: rgba(37, 99, 235, 0.1);
}

.stp-team-stop.pending,
.stp-team-stop.rescheduled {
  background: rgba(249, 115, 22, 0.1);
}

.stp-route-scope-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.stp-route-scope-list li {
  color: var(--stp-muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.stp-empty-state.small {
  min-height: 140px;
  padding: 1rem;
}

@media (max-width: 1180px) {
  .stp-routes-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .stp-routes-hero {
    grid-template-columns: 1fr;
  }

  .stp-routes-hero-stats,
  .stp-routes-filters {
    grid-template-columns: 1fr;
  }

  .stp-route-map {
    min-height: 360px;
  }

  .stp-route-visit-card {
    grid-template-columns: 1fr;
  }

  .stp-route-visit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .stp-route-visit-actions .stp-btn {
    width: 100%;
  }

  .stp-team-stop {
    grid-template-columns: 1fr;
  }
}


/* Clients module */

.stp-clients-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(37, 99, 235, 0.24), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-clients-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-clients-hero p {
  max-width: 780px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-client-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-client-kpi {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--stp-shadow-soft);
}

.stp-client-kpi > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.35rem;
}

.stp-client-kpi.teal > span {
  background: rgba(20, 184, 166, 0.13);
}

.stp-client-kpi.blue > span {
  background: rgba(37, 99, 235, 0.12);
}

.stp-client-kpi.orange > span {
  background: rgba(249, 115, 22, 0.13);
}

.stp-client-kpi strong,
.stp-client-kpi small {
  display: block;
}

.stp-client-kpi strong {
  color: var(--stp-navy);
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stp-client-kpi small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.stp-client-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.6fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
}

.stp-client-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
}

.stp-client-list,
.stp-client-side {
  display: grid;
  align-self: start;
  gap: 1rem;
}

.stp-client-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--stp-shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stp-client-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--stp-shadow);
}

.stp-client-card-top {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.85rem;
  align-items: start;
}

.stp-client-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-size: 1.05rem;
  font-weight: 1000;
}

.stp-client-main {
  min-width: 0;
}

.stp-client-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.stp-client-title-row h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.stp-client-main p {
  margin: 0.22rem 0 0.55rem;
  color: var(--stp-muted);
  font-size: 0.9rem;
}

.stp-client-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stp-client-meta span {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: var(--stp-muted);
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.76rem;
  font-weight: 850;
}

.stp-client-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.stp-client-detail-grid div {
  padding: 0.75rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-client-detail-grid small,
.stp-client-detail-grid strong {
  display: block;
}

.stp-client-detail-grid small {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.stp-client-detail-grid strong {
  margin-top: 0.25rem;
  color: var(--stp-navy);
  font-size: 0.95rem;
}

.stp-client-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.stp-client-notes div {
  padding: 0.75rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
}

.stp-client-notes small {
  display: block;
  color: var(--stp-muted);
  font-size: 0.73rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stp-client-notes p {
  margin: 0.28rem 0 0;
  color: var(--stp-text);
  font-size: 0.84rem;
  line-height: 1.45;
}

.stp-client-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.stp-client-workflow {
  display: grid;
  gap: 0.7rem;
}

.stp-client-workflow > div {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-client-workflow span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
}

.stp-client-workflow strong,
.stp-client-workflow small {
  display: block;
}

.stp-client-workflow strong {
  color: var(--stp-navy);
  font-size: 0.9rem;
}

.stp-client-workflow small {
  margin-top: 0.15rem;
  color: var(--stp-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.stp-client-side-text {
  margin: 0 0 1rem;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.stp-client-modal[hidden] {
  display: none;
}

.stp-client-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.stp-client-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
}

.stp-client-modal-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(880px, 92vh);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--stp-shadow);
}

.stp-client-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-client-modal-header h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}

.stp-client-form {
  display: grid;
  gap: 1rem;
}

.stp-client-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stp-line);
}

body.stp-modal-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .stp-client-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .stp-client-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .stp-clients-hero {
    grid-template-columns: 1fr;
  }

  .stp-clients-hero .stp-btn {
    width: 100%;
  }

  .stp-client-kpi-grid,
  .stp-client-controls,
  .stp-client-detail-grid,
  .stp-client-notes {
    grid-template-columns: 1fr;
  }

  .stp-client-card-top {
    grid-template-columns: 1fr;
  }

  .stp-client-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .stp-client-actions .stp-btn {
    width: 100%;
  }

  .stp-client-form-actions {
    flex-direction: column;
  }

  .stp-client-form-actions .stp-btn {
    width: 100%;
  }
}


/* Visits module */

.stp-visits-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(249, 115, 22, 0.18), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-visits-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-visits-hero p {
  max-width: 780px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-visit-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-visit-kpi {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--stp-shadow-soft);
}

.stp-visit-kpi > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.25rem;
}

.stp-visit-kpi.teal > span {
  background: rgba(20, 184, 166, 0.13);
}

.stp-visit-kpi.blue > span {
  background: rgba(37, 99, 235, 0.12);
}

.stp-visit-kpi.orange > span {
  background: rgba(249, 115, 22, 0.13);
}

.stp-visit-kpi strong,
.stp-visit-kpi small {
  display: block;
}

.stp-visit-kpi strong {
  color: var(--stp-navy);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stp-visit-kpi small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-visit-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(150px, 0.7fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
}

.stp-visits-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
}

.stp-visit-list,
.stp-visit-side {
  display: grid;
  align-self: start;
  gap: 1rem;
}

.stp-visit-card {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--stp-shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stp-visit-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--stp-shadow);
}

.stp-visit-time {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 88px;
  padding: 0.75rem;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  text-align: center;
}

.stp-visit-time strong,
.stp-visit-time small {
  display: block;
}

.stp-visit-time strong {
  font-size: 1rem;
}

.stp-visit-time small {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  font-weight: 850;
}

.stp-visit-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.stp-visit-title-row h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.stp-visit-title-row p {
  margin: 0.22rem 0 0;
  color: var(--stp-muted);
  font-size: 0.9rem;
}

.stp-visit-meta,
.stp-visit-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.stp-visit-meta span {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: var(--stp-muted);
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.76rem;
  font-weight: 850;
}

.stp-visit-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.stp-visit-notes div {
  padding: 0.75rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
}

.stp-visit-notes small {
  display: block;
  color: var(--stp-muted);
  font-size: 0.73rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stp-visit-notes p {
  margin: 0.28rem 0 0;
  color: var(--stp-text);
  font-size: 0.84rem;
  line-height: 1.45;
}

.stp-visit-actions {
  display: grid;
  gap: 0.5rem;
  align-self: start;
  min-width: 126px;
}

.stp-visit-flow {
  display: grid;
  gap: 0.7rem;
}

.stp-visit-flow > div {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-visit-flow span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
}

.stp-visit-flow strong,
.stp-visit-flow small {
  display: block;
}

.stp-visit-flow strong {
  color: var(--stp-navy);
  font-size: 0.9rem;
}

.stp-visit-flow small {
  margin-top: 0.15rem;
  color: var(--stp-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.stp-visit-side-text {
  margin: 0 0 1rem;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.stp-visit-modal[hidden] {
  display: none;
}

.stp-visit-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.stp-visit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
}

.stp-visit-modal-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(880px, 92vh);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--stp-shadow);
}

.stp-visit-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-visit-modal-header h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}

.stp-visit-form {
  display: grid;
  gap: 1rem;
}

.stp-visit-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stp-line);
}

@media (max-width: 1280px) {
  .stp-visit-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .stp-visits-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .stp-visits-hero {
    grid-template-columns: 1fr;
  }

  .stp-visits-hero .stp-btn {
    width: 100%;
  }

  .stp-visit-kpi-grid,
  .stp-visit-controls,
  .stp-visit-notes {
    grid-template-columns: 1fr;
  }

  .stp-visit-card {
    grid-template-columns: 1fr;
  }

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

  .stp-visit-actions .stp-btn,
  .stp-visit-form-actions .stp-btn {
    width: 100%;
  }

  .stp-visit-form-actions {
    flex-direction: column;
  }
}


/* Invoices module */

.stp-invoices-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(249, 115, 22, 0.22), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-invoices-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-invoices-hero p {
  max-width: 780px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-invoice-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-invoice-kpi {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--stp-shadow-soft);
}

.stp-invoice-kpi > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.25rem;
}

.stp-invoice-kpi.teal > span {
  background: rgba(20, 184, 166, 0.13);
}

.stp-invoice-kpi.blue > span {
  background: rgba(37, 99, 235, 0.12);
}

.stp-invoice-kpi.orange > span {
  background: rgba(249, 115, 22, 0.13);
}

.stp-invoice-kpi strong,
.stp-invoice-kpi small {
  display: block;
}

.stp-invoice-kpi strong {
  color: var(--stp-navy);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stp-invoice-kpi small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-invoice-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.3fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
}

.stp-invoices-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
}

.stp-invoice-list,
.stp-invoice-side {
  display: grid;
  align-self: start;
  gap: 1rem;
}

.stp-invoice-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--stp-shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stp-invoice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--stp-shadow);
}

.stp-invoice-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.stp-invoice-number {
  display: inline-flex;
  margin-bottom: 0.45rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.76rem;
  font-weight: 1000;
}

.stp-invoice-card h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.3rem;
  letter-spacing: -0.035em;
}

.stp-invoice-card p {
  margin: 0.25rem 0 0;
  color: var(--stp-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.stp-invoice-status-box {
  display: grid;
  justify-items: end;
  gap: 0.3rem;
  min-width: 150px;
}

.stp-invoice-status-box strong {
  color: var(--stp-navy);
  font-size: 1.55rem;
  line-height: 1;
}

.stp-invoice-status-box small {
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-invoice-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.stp-invoice-detail-grid div {
  padding: 0.75rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-invoice-detail-grid small,
.stp-invoice-detail-grid strong {
  display: block;
}

.stp-invoice-detail-grid small {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.stp-invoice-detail-grid strong {
  margin-top: 0.25rem;
  color: var(--stp-navy);
  font-size: 0.95rem;
}

.stp-invoice-lines {
  display: grid;
  gap: 0.5rem;
}

.stp-invoice-lines div {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
}

.stp-invoice-lines span {
  color: var(--stp-navy);
  font-weight: 900;
}

.stp-invoice-lines small {
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-invoice-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.stp-invoice-flow {
  display: grid;
  gap: 0.7rem;
}

.stp-invoice-flow > div {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-invoice-flow span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
}

.stp-invoice-flow strong,
.stp-invoice-flow small {
  display: block;
}

.stp-invoice-flow strong {
  color: var(--stp-navy);
  font-size: 0.9rem;
}

.stp-invoice-flow small {
  margin-top: 0.15rem;
  color: var(--stp-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.stp-invoice-side-text {
  margin: 0 0 1rem;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.stp-invoice-modal[hidden] {
  display: none;
}

.stp-invoice-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.stp-invoice-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
}

.stp-invoice-modal-card {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(880px, 92vh);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--stp-shadow);
}

.stp-invoice-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-invoice-modal-header h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}

.stp-invoice-form {
  display: grid;
  gap: 1rem;
}

.stp-invoice-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stp-line);
}

@media (max-width: 1280px) {
  .stp-invoice-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stp-invoices-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .stp-invoices-hero,
  .stp-invoice-controls {
    grid-template-columns: 1fr;
  }

  .stp-invoices-hero .stp-btn {
    width: 100%;
  }

  .stp-invoice-kpi-grid,
  .stp-invoice-detail-grid {
    grid-template-columns: 1fr;
  }

  .stp-invoice-card-top {
    flex-direction: column;
  }

  .stp-invoice-status-box {
    justify-items: start;
  }

  .stp-invoice-lines div {
    flex-direction: column;
  }

  .stp-invoice-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .stp-invoice-actions .stp-btn,
  .stp-invoice-form-actions .stp-btn {
    width: 100%;
  }

  .stp-invoice-form-actions {
    flex-direction: column;
  }
}


/* Settings module */

.stp-settings-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(37, 99, 235, 0.22), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-settings-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-settings-hero p {
  max-width: 780px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
  align-items: start;
}

.stp-settings-main,
.stp-settings-side {
  display: grid;
  gap: 1rem;
}

.stp-settings-section {
  display: grid;
  gap: 1rem;
}

.stp-settings-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.stp-settings-toggle {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem;
  border: 1px solid var(--stp-line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}

.stp-settings-toggle input {
  width: 22px;
  height: 22px;
  margin: 0.1rem auto 0;
  accent-color: var(--stp-teal);
}

.stp-settings-toggle strong,
.stp-settings-toggle small {
  display: block;
}

.stp-settings-toggle strong {
  color: var(--stp-navy);
  font-size: 0.92rem;
}

.stp-settings-toggle small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.stp-settings-status-list {
  display: grid;
  gap: 0.65rem;
}

.stp-settings-status-list div {
  padding: 0.8rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-settings-status-list small,
.stp-settings-status-list strong {
  display: block;
}

.stp-settings-status-list small {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.stp-settings-status-list strong {
  margin-top: 0.25rem;
  color: var(--stp-navy);
  font-size: 0.96rem;
}

.stp-settings-side-text {
  margin: 0;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.stp-settings-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 400;
  transform: translateY(1rem);
  opacity: 0;
  pointer-events: none;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  box-shadow: var(--stp-shadow);
  font-size: 0.9rem;
  font-weight: 950;
  transition: opacity 160ms ease, transform 160ms ease;
}

.stp-settings-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .stp-settings-layout {
    grid-template-columns: 1fr;
  }

  .stp-settings-toggle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .stp-settings-hero {
    grid-template-columns: 1fr;
  }

  .stp-settings-hero .stp-btn {
    width: 100%;
  }
}


/* Team module */

.stp-team-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(37, 99, 235, 0.22), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-team-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-team-hero p {
  max-width: 780px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-team-hero-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stp-team-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-team-kpi {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--stp-shadow-soft);
}

.stp-team-kpi > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.25rem;
}

.stp-team-kpi.teal > span {
  background: rgba(20, 184, 166, 0.13);
}

.stp-team-kpi.blue > span {
  background: rgba(37, 99, 235, 0.12);
}

.stp-team-kpi.orange > span {
  background: rgba(249, 115, 22, 0.13);
}

.stp-team-kpi strong,
.stp-team-kpi small {
  display: block;
}

.stp-team-kpi strong {
  color: var(--stp-navy);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stp-team-kpi small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
}

.stp-team-main,
.stp-team-side,
.stp-team-panel {
  display: grid;
  gap: 1rem;
  align-self: start;
}

.stp-team-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.32fr);
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(248, 250, 252, 0.9);
}

.stp-team-controls.one {
  grid-template-columns: 1fr;
}

.stp-member-list {
  display: grid;
  gap: 0.75rem;
}

.stp-member-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: 20px;
  background: #fff;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.stp-member-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--stp-shadow-soft);
}

.stp-member-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
}

.stp-member-main {
  min-width: 0;
}

.stp-member-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.stp-member-title-row h4 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.stp-member-title-row p {
  margin: 0.25rem 0 0;
  color: var(--stp-muted);
  font-size: 0.84rem;
}

.stp-member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.stp-member-meta span {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: var(--stp-muted);
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.76rem;
  font-weight: 850;
}

.stp-member-activity {
  display: block;
  margin-top: 0.65rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stp-member-actions {
  display: grid;
  gap: 0.5rem;
  min-width: 126px;
}

.stp-crew-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.stp-crew-card {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--stp-shadow-soft);
}

.stp-crew-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stp-crew-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(20, 184, 166, 0.12);
  font-size: 1.35rem;
}

.stp-crew-card h4 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.stp-crew-card p {
  margin: 0;
  color: var(--stp-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.stp-crew-meta {
  display: grid;
  gap: 0.35rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-crew-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 30px;
}

.stp-crew-members span,
.stp-crew-members small {
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  color: var(--stp-muted);
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.74rem;
  font-weight: 850;
}

.stp-crew-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stp-role-guide {
  display: grid;
  gap: 0.65rem;
}

.stp-role-guide div {
  padding: 0.8rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-role-guide strong,
.stp-role-guide small {
  display: block;
}

.stp-role-guide strong {
  color: var(--stp-navy);
  font-size: 0.92rem;
}

.stp-role-guide small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.77rem;
  line-height: 1.4;
}

.stp-team-side-text {
  margin: 0 0 1rem;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.stp-team-modal[hidden] {
  display: none;
}

.stp-team-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.stp-team-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
}

.stp-team-modal-card {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  max-height: min(840px, 92vh);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--stp-shadow);
}

.stp-team-modal-card.small {
  width: min(620px, 100%);
}

.stp-team-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-team-modal-header h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}

.stp-team-form {
  display: grid;
  gap: 1rem;
}

.stp-team-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stp-line);
}

@media (max-width: 1280px) {
  .stp-team-kpi-grid,
  .stp-crew-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stp-team-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .stp-team-hero,
  .stp-team-controls,
  .stp-team-kpi-grid,
  .stp-crew-grid {
    grid-template-columns: 1fr;
  }

  .stp-team-hero-actions,
  .stp-crew-actions,
  .stp-team-form-actions {
    flex-direction: column;
  }

  .stp-team-hero-actions .stp-btn,
  .stp-crew-actions .stp-btn,
  .stp-team-form-actions .stp-btn {
    width: 100%;
  }

  .stp-member-card {
    grid-template-columns: 1fr;
  }

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

  .stp-member-actions .stp-btn {
    width: 100%;
  }
}


/* Billing module */

.stp-billing-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(249, 115, 22, 0.22), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-billing-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-billing-hero p {
  max-width: 800px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-billing-hero-status {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
  min-width: 190px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.stp-billing-hero-status strong,
.stp-billing-hero-status small {
  display: block;
}

.stp-billing-hero-status strong {
  color: #fff;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.stp-billing-hero-status small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  font-weight: 850;
}

.stp-billing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
  align-items: start;
}

.stp-billing-main,
.stp-billing-side {
  display: grid;
  gap: 1rem;
  align-self: start;
}

.stp-billing-current {
  display: grid;
  gap: 1rem;
}

.stp-billing-current-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stp-billing-current-grid div {
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: 18px;
  background: #fff;
}

.stp-billing-current-grid small,
.stp-billing-current-grid strong,
.stp-billing-current-grid span {
  display: block;
}

.stp-billing-current-grid small {
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-billing-current-grid strong {
  margin-top: 0.3rem;
  color: var(--stp-navy);
  font-size: 1.5rem;
  line-height: 1;
}

.stp-billing-current-grid strong span {
  display: inline;
  margin-left: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.82rem;
}

.stp-billing-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.stp-billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.stp-billing-plan-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--stp-shadow-soft);
}

.stp-billing-plan-card.is-highlighted {
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: var(--stp-shadow);
}

.stp-billing-plan-card.is-current {
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.16), transparent 12rem),
    #fff;
}

.stp-billing-plan-top {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.stp-billing-plan-top h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.stp-billing-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.stp-billing-price strong {
  color: var(--stp-navy);
  font-size: 2.3rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.stp-billing-price span {
  color: var(--stp-muted);
  font-weight: 850;
}

.stp-billing-founder-note,
.stp-billing-plan-desc {
  margin: 0;
  color: var(--stp-muted);
  line-height: 1.5;
  font-size: 0.88rem;
}

.stp-billing-founder-note {
  color: #9a3412;
  font-weight: 850;
}

.stp-billing-plan-list {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.stp-billing-plan-list li {
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  color: var(--stp-muted);
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.82rem;
  font-weight: 850;
}

.stp-billing-matrix {
  display: grid;
  gap: 1rem;
}

.stp-billing-matrix-scroll {
  overflow-x: auto;
}

.stp-billing-matrix table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
}

.stp-billing-matrix th,
.stp-billing-matrix td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--stp-line);
  color: var(--stp-text);
  text-align: left;
  font-size: 0.86rem;
}

.stp-billing-matrix th {
  color: var(--stp-navy);
  background: rgba(15, 23, 42, 0.04);
  font-weight: 1000;
}

.stp-billing-matrix td:not(:first-child),
.stp-billing-matrix th:not(:first-child) {
  text-align: center;
}

.stp-billing-offer-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.15), transparent 12rem),
    #fff;
}

.stp-billing-offer-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.stp-billing-offer-price strong {
  color: var(--stp-navy);
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.stp-billing-offer-price span {
  color: var(--stp-muted);
  font-weight: 850;
}

.stp-billing-offer-card p,
.stp-billing-side-text {
  margin: 0 0 1rem;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.stp-billing-offer-meta,
.stp-billing-status-list {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.stp-billing-offer-meta span,
.stp-billing-status-list div {
  padding: 0.75rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-billing-offer-meta span {
  color: var(--stp-muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.stp-billing-status-list small,
.stp-billing-status-list strong {
  display: block;
}

.stp-billing-status-list small {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.stp-billing-status-list strong {
  margin-top: 0.25rem;
  color: var(--stp-navy);
  word-break: break-word;
}

@media (max-width: 1180px) {
  .stp-billing-layout {
    grid-template-columns: 1fr;
  }

  .stp-billing-plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .stp-billing-hero,
  .stp-billing-current-grid {
    grid-template-columns: 1fr;
  }

  .stp-billing-hero-status {
    justify-items: start;
  }

  .stp-billing-actions {
    flex-direction: column;
  }

  .stp-billing-actions .stp-btn {
    width: 100%;
  }
}


/* Reports module */

.stp-reports-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(37, 99, 235, 0.22), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-reports-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-reports-hero p {
  max-width: 820px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-report-kpi {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--stp-shadow-soft);
}

.stp-report-kpi > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.25rem;
}

.stp-report-kpi.teal > span {
  background: rgba(20, 184, 166, 0.13);
}

.stp-report-kpi.blue > span {
  background: rgba(37, 99, 235, 0.12);
}

.stp-report-kpi.orange > span {
  background: rgba(249, 115, 22, 0.13);
}

.stp-report-kpi strong,
.stp-report-kpi small {
  display: block;
}

.stp-report-kpi strong {
  color: var(--stp-navy);
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stp-report-kpi small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-reports-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
  align-items: start;
}

.stp-reports-main,
.stp-reports-side {
  display: grid;
  gap: 1rem;
}

.stp-report-chart-card {
  display: grid;
  gap: 1rem;
}

.stp-report-bars {
  display: grid;
  gap: 0.75rem;
}

.stp-report-bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  gap: 0.7rem;
  align-items: center;
}

.stp-report-bar-row span {
  color: var(--stp-muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.stp-report-bar-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.stp-report-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--stp-teal), var(--stp-blue));
}

.stp-report-bar-row strong {
  color: var(--stp-navy);
  font-size: 0.9rem;
  text-align: right;
}

.stp-report-status-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stp-report-status-list div,
.stp-report-mix-grid div,
.stp-report-snapshot-list div,
.stp-report-alerts div {
  padding: 0.85rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-report-status-list span,
.stp-report-status-list strong,
.stp-report-status-list small,
.stp-report-mix-grid span,
.stp-report-mix-grid strong,
.stp-report-mix-grid small,
.stp-report-snapshot-list small,
.stp-report-snapshot-list strong {
  display: block;
}

.stp-report-status-list span,
.stp-report-mix-grid span,
.stp-report-snapshot-list small {
  color: var(--stp-muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.stp-report-status-list strong,
.stp-report-mix-grid strong,
.stp-report-snapshot-list strong {
  margin-top: 0.3rem;
  color: var(--stp-navy);
  font-size: 1.25rem;
  line-height: 1;
}

.stp-report-status-list small,
.stp-report-mix-grid small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.stp-report-mix-grid,
.stp-report-snapshot-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stp-report-alerts {
  display: grid;
  gap: 0.6rem;
}

.stp-report-alerts div {
  color: var(--stp-text);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.45;
}

.stp-report-side-text,
.stp-report-muted {
  margin: 0;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

@media (max-width: 1180px) {
  .stp-reports-layout {
    grid-template-columns: 1fr;
  }

  .stp-reports-kpi-grid,
  .stp-report-status-list,
  .stp-report-mix-grid,
  .stp-report-snapshot-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .stp-reports-hero,
  .stp-reports-kpi-grid,
  .stp-report-status-list,
  .stp-report-mix-grid,
  .stp-report-snapshot-list {
    grid-template-columns: 1fr;
  }

  .stp-reports-hero .stp-btn {
    width: 100%;
  }

  .stp-report-bar-row {
    grid-template-columns: 72px 1fr 36px;
  }
}


/* Leads module */

.stp-leads-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(249, 115, 22, 0.22), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-leads-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-leads-hero p {
  max-width: 820px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-lead-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-lead-kpi {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--stp-shadow-soft);
}

.stp-lead-kpi > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.25rem;
}

.stp-lead-kpi.teal > span {
  background: rgba(20, 184, 166, 0.13);
}

.stp-lead-kpi.blue > span {
  background: rgba(37, 99, 235, 0.12);
}

.stp-lead-kpi.orange > span {
  background: rgba(249, 115, 22, 0.13);
}

.stp-lead-kpi strong,
.stp-lead-kpi small {
  display: block;
}

.stp-lead-kpi strong {
  color: var(--stp-navy);
  font-size: clamp(1.1rem, 1.8vw, 1.65rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stp-lead-kpi small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.stp-lead-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.35fr) minmax(180px, 0.35fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
}

.stp-leads-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
  align-items: start;
}

.stp-leads-main,
.stp-leads-side {
  display: grid;
  gap: 1rem;
}

.stp-lead-stage-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.stp-lead-stage {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--stp-shadow-soft);
}

.stp-lead-stage header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.stp-lead-stage header strong {
  color: var(--stp-navy);
  font-size: 1.6rem;
  line-height: 1;
}

.stp-lead-stage p {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.2rem;
  font-weight: 1000;
}

.stp-lead-stage div {
  display: grid;
  gap: 0.35rem;
}

.stp-lead-stage small {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.stp-lead-list {
  display: grid;
  gap: 1rem;
}

.stp-lead-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--stp-shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stp-lead-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--stp-shadow);
}

.stp-lead-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.stp-lead-source {
  display: inline-flex;
  margin-bottom: 0.45rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.76rem;
  font-weight: 1000;
}

.stp-lead-card h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.3rem;
  letter-spacing: -0.035em;
}

.stp-lead-card p {
  margin: 0.25rem 0 0;
  color: var(--stp-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.stp-lead-value {
  display: grid;
  justify-items: end;
  gap: 0.4rem;
  min-width: 150px;
}

.stp-lead-value strong {
  color: var(--stp-navy);
  font-size: 1.55rem;
  line-height: 1;
}

.stp-lead-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.stp-lead-detail-grid div {
  padding: 0.75rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-lead-detail-grid small,
.stp-lead-detail-grid strong {
  display: block;
}

.stp-lead-detail-grid small {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.stp-lead-detail-grid strong {
  margin-top: 0.25rem;
  color: var(--stp-navy);
  font-size: 0.95rem;
}

.stp-lead-notes {
  padding: 0.75rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
}

.stp-lead-notes small {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stp-lead-notes p {
  margin: 0.3rem 0 0;
  color: var(--stp-text);
  font-size: 0.86rem;
  line-height: 1.45;
}

.stp-lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.stp-lead-workflow {
  display: grid;
  gap: 0.7rem;
}

.stp-lead-workflow > div {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-lead-workflow span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
}

.stp-lead-workflow strong,
.stp-lead-workflow small {
  display: block;
}

.stp-lead-workflow strong {
  color: var(--stp-navy);
  font-size: 0.9rem;
}

.stp-lead-workflow small {
  margin-top: 0.15rem;
  color: var(--stp-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.stp-lead-side-text {
  margin: 0 0 1rem;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.stp-lead-modal[hidden] {
  display: none;
}

.stp-lead-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.stp-lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
}

.stp-lead-modal-card {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(880px, 92vh);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--stp-shadow);
}

.stp-lead-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-lead-modal-header h3 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}

.stp-lead-form {
  display: grid;
  gap: 1rem;
}

.stp-lead-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stp-line);
}

@media (max-width: 1320px) {
  .stp-lead-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stp-lead-stage-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stp-leads-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .stp-leads-hero,
  .stp-lead-controls,
  .stp-lead-kpi-grid,
  .stp-lead-stage-board,
  .stp-lead-detail-grid {
    grid-template-columns: 1fr;
  }

  .stp-leads-hero .stp-btn {
    width: 100%;
  }

  .stp-lead-card-top {
    flex-direction: column;
  }

  .stp-lead-value {
    justify-items: start;
  }

  .stp-lead-actions {
    flex-direction: column;
  }

  .stp-lead-actions .stp-btn,
  .stp-lead-form-actions .stp-btn {
    width: 100%;
  }

  .stp-lead-form-actions {
    flex-direction: column;
  }
}

/* Calendar module */

.stp-calendar-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--stp-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.3), transparent 18rem),
    radial-gradient(circle at 84% 18%, rgba(37, 99, 235, 0.22), transparent 22rem),
    linear-gradient(135deg, var(--stp-navy), #172554);
  box-shadow: var(--stp-shadow);
}

.stp-calendar-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.stp-calendar-hero p {
  max-width: 820px;
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.stp-calendar-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stp-calendar-kpi {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--stp-shadow-soft);
}

.stp-calendar-kpi > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.25rem;
}

.stp-calendar-kpi.teal > span {
  background: rgba(20, 184, 166, 0.13);
}

.stp-calendar-kpi.blue > span {
  background: rgba(37, 99, 235, 0.12);
}

.stp-calendar-kpi.orange > span {
  background: rgba(249, 115, 22, 0.13);
}

.stp-calendar-kpi strong,
.stp-calendar-kpi small {
  display: block;
}

.stp-calendar-kpi strong {
  color: var(--stp-navy);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stp-calendar-kpi small {
  margin-top: 0.25rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-calendar-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.35fr) minmax(180px, 0.35fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: var(--stp-radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--stp-shadow-soft);
}

.stp-calendar-month-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.stp-calendar-month-nav strong {
  padding: 0 0.4rem;
  color: var(--stp-navy);
  font-size: 1.1rem;
}

.stp-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(340px, 0.62fr);
  gap: 1rem;
  align-items: start;
}

.stp-calendar-main,
.stp-calendar-side {
  display: grid;
  gap: 1rem;
}

.stp-calendar-card {
  overflow: hidden;
  padding: 0;
}

.stp-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: rgba(15, 23, 42, 0.04);
  border-bottom: 1px solid var(--stp-line);
}

.stp-calendar-weekdays span {
  padding: 0.85rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 1000;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stp-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.stp-calendar-day {
  min-height: 142px;
  padding: 0.75rem;
  border-right: 1px solid var(--stp-line);
  border-bottom: 1px solid var(--stp-line);
  background: #fff;
}

.stp-calendar-day.is-muted {
  background: rgba(248, 250, 252, 0.72);
}

.stp-calendar-day.is-muted header span {
  color: rgba(100, 116, 139, 0.48);
}

.stp-calendar-day.is-today {
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.14), transparent 9rem),
    #fff;
}

.stp-calendar-day header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.stp-calendar-day header span {
  color: var(--stp-navy);
  font-weight: 1000;
}

.stp-calendar-day header strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.35rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-size: 0.72rem;
}

.stp-calendar-day-events {
  display: grid;
  gap: 0.35rem;
}

.stp-calendar-event {
  display: grid;
  gap: 0.05rem;
  padding: 0.45rem;
  border-left: 3px solid var(--stp-blue);
  border-radius: 10px;
  color: var(--stp-navy);
  background: rgba(37, 99, 235, 0.08);
  text-decoration: none;
}

.stp-calendar-event.completed {
  border-left-color: var(--stp-success);
  background: rgba(34, 197, 94, 0.1);
}

.stp-calendar-event.in_progress {
  border-left-color: var(--stp-warning);
  background: rgba(245, 158, 11, 0.1);
}

.stp-calendar-event.rescheduled,
.stp-calendar-event.missed,
.stp-calendar-event.canceled {
  border-left-color: var(--stp-danger);
  background: rgba(239, 68, 68, 0.08);
}

.stp-calendar-event small,
.stp-calendar-event span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stp-calendar-event small {
  color: var(--stp-muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.stp-calendar-event span {
  font-size: 0.75rem;
  font-weight: 950;
}

.stp-calendar-day-events em {
  color: var(--stp-muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
}

.stp-calendar-agenda {
  display: grid;
  gap: 0.65rem;
}

.stp-calendar-agenda-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.8rem;
  border: 1px solid var(--stp-line);
  border-radius: 16px;
  background: #fff;
}

.stp-calendar-agenda-item > div strong,
.stp-calendar-agenda-item > div small,
.stp-calendar-agenda-item h4,
.stp-calendar-agenda-item p,
.stp-calendar-agenda-item section span {
  display: block;
}

.stp-calendar-agenda-item > div strong {
  color: var(--stp-navy);
  font-size: 0.9rem;
}

.stp-calendar-agenda-item > div small {
  margin-top: 0.2rem;
  color: var(--stp-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.stp-calendar-agenda-item h4 {
  margin: 0;
  color: var(--stp-navy);
  font-size: 0.95rem;
}

.stp-calendar-agenda-item p {
  margin: 0.2rem 0 0;
  color: var(--stp-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.stp-calendar-agenda-item section span {
  margin-top: 0.35rem;
  color: var(--stp-muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.stp-calendar-muted {
  margin: 0;
  color: var(--stp-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

@media (max-width: 1280px) {
  .stp-calendar-layout {
    grid-template-columns: 1fr;
  }

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

  .stp-calendar-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .stp-calendar-hero,
  .stp-calendar-kpi-grid {
    grid-template-columns: 1fr;
  }

  .stp-calendar-hero .stp-btn {
    width: 100%;
  }

  .stp-calendar-grid,
  .stp-calendar-weekdays {
    grid-template-columns: 1fr;
  }

  .stp-calendar-weekdays {
    display: none;
  }

  .stp-calendar-day {
    min-height: auto;
    border-right: 0;
  }

  .stp-calendar-day.is-muted {
    display: none;
  }

  .stp-calendar-agenda-item {
    grid-template-columns: 1fr;
  }
}

/* Settings Logo Upload MVP07B — constrained professional logo preview */
.stp-logo-section {
  position: relative;
  overflow: hidden;
}

.stp-logo-uploader {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--stp-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(20, 184, 166, 0.1), transparent 12rem),
    rgba(248, 250, 252, 0.9);
}

.stp-logo-preview {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  max-width: 280px !important;
  height: 132px !important;
  min-height: 132px !important;
  max-height: 132px !important;
  overflow: hidden !important;
  padding: 1rem !important;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.stp-logo-preview img,
.stp-settings-section .stp-logo-preview img,
[data-company-logo-preview] img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 220px !important;
  max-height: 96px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.stp-logo-preview span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-size: 1.6rem;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.stp-logo-controls {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.stp-logo-controls strong {
  color: var(--stp-navy);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.stp-logo-controls p,
.stp-logo-controls small {
  margin: 0;
  color: var(--stp-muted);
  line-height: 1.5;
}

.stp-logo-controls small {
  font-size: 0.78rem;
  word-break: break-word;
}

.stp-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.stp-logo-actions .stp-btn[disabled],
.stp-logo-actions .stp-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

@media (max-width: 780px) {
  .stp-logo-uploader {
    grid-template-columns: 1fr;
  }

  .stp-logo-preview {
    max-width: 100% !important;
    height: 118px !important;
    min-height: 118px !important;
    max-height: 118px !important;
  }

  .stp-logo-preview img,
  .stp-settings-section .stp-logo-preview img,
  [data-company-logo-preview] img {
    max-width: 200px !important;
    max-height: 82px !important;
  }

  .stp-logo-actions {
    flex-direction: column;
  }

  .stp-logo-actions .stp-btn {
    width: 100%;
  }
}

/* Routes Map Professional Pins MVP01 — client info popups */
.stp-route-map-card {
  position: relative;
}

.stp-route-map {
  min-height: 520px;
  isolation: isolate;
  background:
    radial-gradient(circle at 16% 22%, rgba(20, 184, 166, 0.18), transparent 7rem),
    radial-gradient(circle at 78% 36%, rgba(37, 99, 235, 0.16), transparent 8rem),
    radial-gradient(circle at 52% 82%, rgba(249, 115, 22, 0.12), transparent 8rem),
    linear-gradient(135deg, #eaf4ff 0%, #f8fbff 54%, #ecfeff 100%);
}

.stp-route-map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(28deg, transparent 0 16%, rgba(255, 255, 255, 0.68) 16.4% 18.2%, transparent 18.7% 100%),
    linear-gradient(137deg, transparent 0 27%, rgba(255, 255, 255, 0.62) 27.4% 29.1%, transparent 29.5% 100%),
    linear-gradient(82deg, transparent 0 58%, rgba(255, 255, 255, 0.72) 58.4% 60.1%, transparent 60.5% 100%);
  opacity: 0.86;
  pointer-events: none;
}

.stp-route-map-grid {
  z-index: 0;
  opacity: 0.58;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
}

.stp-route-map-road {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05), 0 10px 24px rgba(15, 23, 42, 0.04);
  pointer-events: none;
}

.stp-route-map-road.road-one {
  left: -7%;
  top: 45%;
  width: 68%;
  height: 18px;
  transform: rotate(-11deg);
}

.stp-route-map-road.road-two {
  right: -9%;
  top: 31%;
  width: 74%;
  height: 16px;
  transform: rotate(17deg);
}

.stp-route-map-road.road-three {
  left: 36%;
  bottom: 18%;
  width: 62%;
  height: 14px;
  transform: rotate(-27deg);
}

.stp-route-map-line {
  z-index: 2;
  border-width: 4px;
  border-color: rgba(37, 99, 235, 0.28);
}

.stp-route-map-pin {
  z-index: 7;
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.96);
  outline: 0;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22), 0 0 0 8px rgba(37, 99, 235, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.stp-route-map-pin:hover,
.stp-route-map-pin:focus-visible,
.stp-route-map-pin.is-selected {
  transform: translate(-50%, -50%) scale(1.14);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.3), 0 0 0 10px rgba(20, 184, 166, 0.16);
  filter: saturate(1.14);
}

.stp-route-map-pin span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.82rem;
}

.stp-route-map-pin i {
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 13px;
  height: 13px;
  border-right: 4px solid rgba(255, 255, 255, 0.96);
  border-bottom: 4px solid rgba(255, 255, 255, 0.96);
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.stp-route-map-pin.completed { background: #16a34a; }
.stp-route-map-pin.in_progress { background: #2563eb; }
.stp-route-map-pin.scheduled { background: #14b8a6; }
.stp-route-map-pin.pending,
.stp-route-map-pin.rescheduled { background: #f97316; }
.stp-route-map-pin.canceled,
.stp-route-map-pin.missed { background: #ef4444; }

.stp-route-map-popup {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 8;
  width: min(420px, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--stp-shadow);
  backdrop-filter: blur(18px);
}

.stp-route-map-popup::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.12), transparent 12rem);
}

.stp-route-map-popup.completed::before { background: radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.16), transparent 12rem); }
.stp-route-map-popup.in_progress::before { background: radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.16), transparent 12rem); }
.stp-route-map-popup.pending::before,
.stp-route-map-popup.rescheduled::before { background: radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.16), transparent 12rem); }
.stp-route-map-popup.canceled::before { background: radial-gradient(circle at 100% 0%, rgba(239, 68, 68, 0.14), transparent 12rem); }

.stp-route-map-popup header {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.stp-route-map-popup-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
}

.stp-route-map-popup header strong,
.stp-route-map-popup header small {
  display: block;
}

.stp-route-map-popup header strong {
  color: var(--stp-navy);
  font-size: 1.06rem;
  letter-spacing: -0.03em;
}

.stp-route-map-popup header small {
  margin-top: 0.15rem;
  color: var(--stp-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stp-route-map-popup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.stp-route-map-popup-grid div,
.stp-route-map-popup-notes {
  padding: 0.68rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.stp-route-map-popup-grid small,
.stp-route-map-popup-notes small {
  display: block;
  color: var(--stp-muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stp-route-map-popup-grid strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--stp-navy);
  font-size: 0.86rem;
}

.stp-route-map-popup-contact {
  display: grid;
  gap: 0.42rem;
  margin-bottom: 0.75rem;
}

.stp-route-map-popup-contact p {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: start;
  gap: 0.45rem;
  margin: 0;
  color: var(--stp-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
}

.stp-route-map-popup-contact a {
  color: var(--stp-blue);
  font-weight: 900;
}

.stp-route-map-popup-notes {
  margin-bottom: 0.75rem;
  background: rgba(248, 250, 252, 0.86);
}

.stp-route-map-popup-notes p {
  margin: 0.24rem 0 0;
  color: var(--stp-text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.stp-route-map-popup footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stp-route-map-popup footer .stp-btn {
  min-height: 38px;
  padding-inline: 0.85rem;
  font-size: 0.82rem;
}

.stp-route-map-legend {
  z-index: 9;
  width: fit-content;
  max-width: calc(100% - 2rem);
  right: auto;
}

.legend-dot.canceled {
  background: var(--stp-danger);
}

.stp-route-visit-card {
  cursor: pointer;
}

.stp-route-visit-card.is-selected {
  border-color: rgba(37, 99, 235, 0.46);
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.08), transparent 12rem),
    #fff;
  box-shadow: var(--stp-shadow);
}

.stp-route-visit-order {
  border: 0;
}

.stp-route-visit-order.completed { background: linear-gradient(135deg, #16a34a, #22c55e); }
.stp-route-visit-order.in_progress { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.stp-route-visit-order.scheduled { background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue)); }
.stp-route-visit-order.pending,
.stp-route-visit-order.rescheduled { background: linear-gradient(135deg, #f97316, #f59e0b); }
.stp-route-visit-order.canceled { background: linear-gradient(135deg, #dc2626, #ef4444); }

@media (max-width: 900px) {
  .stp-route-map {
    min-height: 620px;
  }

  .stp-route-map-popup {
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    bottom: 5.2rem;
    width: auto;
    max-height: 55%;
    overflow: auto;
    border-radius: 22px;
  }

  .stp-route-map-legend {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .stp-route-map {
    min-height: 650px;
  }

  .stp-route-map-popup {
    bottom: 6.3rem;
    padding: 0.85rem;
  }

  .stp-route-map-popup header {
    grid-template-columns: 42px 1fr;
  }

  .stp-route-map-popup header .stp-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .stp-route-map-popup-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
  }

  .stp-route-map-popup-grid {
    grid-template-columns: 1fr;
  }

  .stp-route-map-popup footer {
    flex-direction: column;
  }

  .stp-route-map-popup footer .stp-btn {
    width: 100%;
  }
}

/* Routes Map Pins MVP02 — cleaner selected pin card and cache-safe professional map polish */
.stp-route-map-card {
  overflow: hidden;
}

.stp-route-map {
  isolation: isolate;
  min-height: 440px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(239, 246, 255, 0.96)),
    radial-gradient(circle at 18% 26%, rgba(20, 184, 166, 0.16), transparent 8rem),
    radial-gradient(circle at 76% 66%, rgba(37, 99, 235, 0.13), transparent 10rem),
    #eef6ff;
}

.stp-route-map-grid {
  opacity: 0.7;
  background-size: 42px 42px;
}

.stp-route-map-road {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.05), 0 14px 30px rgba(15, 23, 42, 0.04);
  pointer-events: none;
}

.stp-route-map-road::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(100, 116, 139, 0.25) 0 14px, transparent 14px 26px);
  transform: translateY(-50%);
}

.stp-route-map-road.road-one {
  left: 8%;
  top: 30%;
  width: 56%;
  height: 16px;
  transform: rotate(8deg);
}

.stp-route-map-road.road-two {
  right: 4%;
  top: 54%;
  width: 58%;
  height: 16px;
  transform: rotate(-13deg);
}

.stp-route-map-road.road-three {
  left: 26%;
  bottom: 22%;
  width: 62%;
  height: 16px;
  transform: rotate(-25deg);
}

.stp-route-map-line {
  z-index: 2;
  border-width: 4px;
  border-color: rgba(37, 99, 235, 0.25);
}

.stp-route-map-pin {
  z-index: 7;
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.96);
  outline: 0;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22), 0 0 0 8px rgba(37, 99, 235, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.stp-route-map-pin:hover,
.stp-route-map-pin:focus-visible,
.stp-route-map-pin.is-selected {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.3), 0 0 0 10px rgba(20, 184, 166, 0.16);
  filter: saturate(1.14);
}

.stp-route-map-pin span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.82rem;
}

.stp-route-map-pin i {
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 13px;
  height: 13px;
  border-right: 4px solid rgba(255, 255, 255, 0.96);
  border-bottom: 4px solid rgba(255, 255, 255, 0.96);
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.stp-route-map-pin.completed { background: #16a34a; }
.stp-route-map-pin.in_progress { background: #2563eb; }
.stp-route-map-pin.scheduled { background: #14b8a6; }
.stp-route-map-pin.pending,
.stp-route-map-pin.rescheduled { background: #f97316; }
.stp-route-map-pin.canceled,
.stp-route-map-pin.missed { background: #ef4444; }

.stp-route-map-popup,
.stp-route-pin-card {
  max-height: calc(100% - 6.2rem);
  overflow: auto;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

.stp-route-pin-card.is-empty {
  opacity: 0.92;
}

.stp-route-pin-card-head {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.stp-route-pin-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.22);
}

.stp-route-pin-card-head strong,
.stp-route-pin-card-head small {
  display: block;
}

.stp-route-pin-card-head strong {
  color: var(--stp-navy);
  font-size: 0.98rem;
  letter-spacing: -0.03em;
}

.stp-route-pin-card-head small {
  margin-top: 0.12rem;
  color: var(--stp-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.stp-route-pin-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--stp-line);
  border-radius: 999px;
  color: var(--stp-muted);
  background: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

.stp-route-pin-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.stp-route-pin-status-line > span:not(.stp-badge) {
  padding: 0.24rem 0.46rem;
  border-radius: 999px;
  color: var(--stp-muted);
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.72rem;
  font-weight: 850;
}

.stp-route-pin-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.stp-route-pin-data div {
  padding: 0.55rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
}

.stp-route-pin-data small,
.stp-route-pin-data strong {
  display: block;
}

.stp-route-pin-data small {
  color: var(--stp-muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.stp-route-pin-data strong {
  margin-top: 0.18rem;
  color: var(--stp-navy);
  font-size: 0.82rem;
  line-height: 1.2;
}

.stp-route-pin-address {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.45rem;
  margin-top: 0.65rem;
  padding: 0.62rem;
  border-radius: 16px;
  color: var(--stp-navy);
  background: rgba(20, 184, 166, 0.08);
}

.stp-route-pin-address strong {
  font-size: 0.82rem;
  line-height: 1.35;
}

.stp-route-pin-contact-mini {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.stp-route-pin-contact-mini a,
.stp-route-pin-contact-mini span {
  overflow: hidden;
  padding: 0.48rem 0.6rem;
  border-radius: 14px;
  color: var(--stp-muted);
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stp-route-pin-contact-mini a {
  color: #1d4ed8;
}

.stp-route-pin-note {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.6rem;
  border-radius: 14px;
  color: var(--stp-muted);
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.78rem;
  line-height: 1.4;
}

.stp-route-pin-actions {
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.7fr;
  gap: 0.42rem;
  margin-top: 0.7rem;
}

.stp-route-pin-actions .stp-btn {
  min-height: 36px;
  padding: 0 0.65rem;
  font-size: 0.76rem;
}

.stp-route-map-legend {
  left: 1rem;
  right: auto;
  max-width: calc(100% - 2rem);
}

.stp-route-visit-card.is-selected {
  border-color: rgba(20, 184, 166, 0.54);
  background: radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.12), transparent 12rem), #fff;
}

.stp-route-visit-order.completed { background: #16a34a; }
.stp-route-visit-order.in_progress { background: #2563eb; }
.stp-route-visit-order.scheduled { background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue)); }
.stp-route-visit-order.pending,
.stp-route-visit-order.rescheduled { background: #f97316; }
.stp-route-visit-order.canceled,
.stp-route-visit-order.missed { background: #ef4444; }

@media (max-width: 900px) {
  .stp-route-map {
    min-height: 520px;
  }

  .stp-route-map-popup,
  .stp-route-pin-card {
    left: 0.75rem !important;
    right: 0.75rem !important;
    top: auto !important;
    bottom: 4.35rem !important;
    width: auto !important;
    max-width: none !important;
    max-height: 245px;
    border-radius: 20px;
  }

  .stp-route-pin-card.is-empty {
    display: none;
  }

  .stp-route-map-legend {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .stp-route-pin-card-head {
    grid-template-columns: 38px 1fr auto;
  }

  .stp-route-pin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .stp-route-pin-data,
  .stp-route-pin-actions {
    grid-template-columns: 1fr;
  }

  .stp-route-pin-actions .stp-btn {
    width: 100%;
  }
}

/* Routes MVP03 — Real Google City Map with professional fallback */
.stp-route-map-card-real {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.stp-route-real-map-shell {
  position: relative;
  padding: 0.85rem;
  background:
    radial-gradient(circle at 12% 15%, rgba(20, 184, 166, 0.08), transparent 12rem),
    radial-gradient(circle at 88% 80%, rgba(37, 99, 235, 0.08), transparent 14rem),
    #f8fafc;
}

.stp-google-route-map {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(241, 245, 249, 0.94), rgba(226, 232, 240, 0.78)),
    #e5e7eb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 18px 45px rgba(15, 23, 42, 0.09);
}

.stp-google-route-map.is-hidden {
  display: none;
}

.stp-google-route-map-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  padding: 2rem;
  color: var(--stp-muted);
  text-align: center;
}

.stp-google-route-map-loading strong {
  color: var(--stp-navy);
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.stp-google-route-map-loading span {
  max-width: 32rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.stp-google-route-map-status {
  position: absolute;
  left: 1.35rem;
  top: 1.35rem;
  z-index: 8;
  max-width: min(420px, calc(100% - 2.7rem));
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.13);
  backdrop-filter: blur(16px);
  font-size: 0.76rem;
  font-weight: 900;
}

.stp-google-route-map-status[hidden] {
  display: none;
}

.stp-google-route-map-status.success {
  color: #166534;
  background: rgba(240, 253, 244, 0.94);
}

.stp-google-route-map-status.warning {
  color: #92400e;
  background: rgba(255, 251, 235, 0.96);
}

.stp-google-route-map-status.loading {
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.96);
}

.stp-visual-map-fallback {
  margin-top: 0.85rem;
}

.stp-visual-map-fallback.is-hidden {
  display: none;
}

.stp-visual-map-fallback-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 18px;
  color: #92400e;
  background: rgba(255, 251, 235, 0.86);
}

.stp-visual-map-fallback-head strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stp-visual-map-fallback-head span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.stp-google-info-card {
  width: 300px;
  max-width: 300px;
  color: #0f172a;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.stp-google-info-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.stp-google-info-head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.24);
}

.stp-google-info-head strong,
.stp-google-info-head small {
  display: block;
}

.stp-google-info-head strong {
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stp-google-info-head small {
  margin-top: 0.16rem;
  color: #64748b;
  font-size: 0.77rem;
  line-height: 1.3;
}

.stp-google-info-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.58rem;
}

.stp-google-info-badges em {
  padding: 0.24rem 0.42rem;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.stp-google-info-card dl {
  display: grid;
  gap: 0.42rem;
  margin: 0;
}

.stp-google-info-card dl div {
  padding: 0.48rem 0.55rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #f8fafc;
}

.stp-google-info-card dt {
  margin: 0 0 0.12rem;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stp-google-info-card dd {
  margin: 0;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.35;
}

.stp-google-info-card a {
  color: #1d4ed8;
  text-decoration: none;
}

.stp-google-info-card p {
  margin: 0.55rem 0 0;
  padding: 0.5rem 0.58rem;
  border-radius: 14px;
  color: #64748b;
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.76rem;
  line-height: 1.4;
}

.stp-google-info-actions {
  display: grid;
  grid-template-columns: 1fr 0.68fr 0.68fr;
  gap: 0.38rem;
  margin-top: 0.65rem;
}

.stp-google-info-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 0.52rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 950;
}

.stp-google-info-actions a:last-child {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
}

.gm-style .gm-style-iw-c {
  border-radius: 22px !important;
  padding: 0.8rem !important;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.22) !important;
}

.gm-style .gm-style-iw-d {
  overflow: auto !important;
}

@media (max-width: 900px) {
  .stp-route-real-map-shell {
    padding: 0.65rem;
  }

  .stp-google-route-map {
    min-height: 620px;
    border-radius: 22px;
  }

  .stp-google-route-map-status {
    left: 1rem;
    right: 1rem;
    top: 1rem;
    max-width: none;
    width: auto;
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .stp-google-route-map {
    min-height: 660px;
  }

  .stp-google-info-card {
    width: 260px;
    max-width: 260px;
  }

  .stp-google-info-actions {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   ServiTrack Pro - Workflow Visual Hotfix MVP05D
   Scope: right-side workflow panels only.
   Purpose: prevent nested text containers inside workflow steps from
   inheriting card/grid styles that make the copy wrap vertically.
   ========================================================= */
.stp-client-workflow,
.stp-lead-workflow,
.stp-visit-flow,
.stp-invoice-flow,
.stp-job-workflow,
.stp-job-flow,
.stp-estimate-workflow,
.stp-estimate-flow {
  display: grid;
  gap: 0.72rem;
}

.stp-client-workflow > div,
.stp-lead-workflow > div,
.stp-visit-flow > div,
.stp-invoice-flow > div,
.stp-job-workflow > div,
.stp-job-flow > div,
.stp-estimate-workflow > div,
.stp-estimate-flow > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  padding: 0.82rem;
  border: 1px solid var(--stp-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.stp-client-workflow > div > div,
.stp-lead-workflow > div > div,
.stp-visit-flow > div > div,
.stp-invoice-flow > div > div,
.stp-job-workflow > div > div,
.stp-job-flow > div > div,
.stp-estimate-workflow > div > div,
.stp-estimate-flow > div > div {
  display: block !important;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.stp-client-workflow > div > span,
.stp-lead-workflow > div > span,
.stp-visit-flow > div > span,
.stp-invoice-flow > div > span,
.stp-job-workflow > div > span,
.stp-job-flow > div > span,
.stp-estimate-workflow > div > span,
.stp-estimate-flow > div > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue));
  font-weight: 1000;
  line-height: 1;
  flex: 0 0 36px;
}

.stp-client-workflow > div strong,
.stp-lead-workflow > div strong,
.stp-visit-flow > div strong,
.stp-invoice-flow > div strong,
.stp-job-workflow > div strong,
.stp-job-flow > div strong,
.stp-estimate-workflow > div strong,
.stp-estimate-flow > div strong {
  display: block;
  color: var(--stp-navy);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.stp-client-workflow > div small,
.stp-lead-workflow > div small,
.stp-visit-flow > div small,
.stp-invoice-flow > div small,
.stp-job-workflow > div small,
.stp-job-flow > div small,
.stp-estimate-workflow > div small,
.stp-estimate-flow > div small {
  display: block;
  margin-top: 0.22rem;
  color: var(--stp-muted);
  font-size: 0.76rem;
  line-height: 1.45;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  max-width: 100%;
}

@media (max-width: 920px) {
  .stp-client-workflow > div,
  .stp-lead-workflow > div,
  .stp-visit-flow > div,
  .stp-invoice-flow > div,
  .stp-job-workflow > div,
  .stp-job-flow > div,
  .stp-estimate-workflow > div,
  .stp-estimate-flow > div {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 0.75rem;
  }
}


/* =========================================================
   ServiTrack Pro - Workflow Visual Hotfix MVP05E
   Scope: right-side workflow panels only.
   Fix: supports both DOM structures used across modules:
   A) <span>number</span><strong>title</strong><small>copy</small>
   B) <strong>number</strong><span>title</span><small>copy</small>
   ========================================================= */
.stp-client-workflow > div,
.stp-lead-workflow > div,
.stp-visit-flow > div,
.stp-invoice-flow > div,
.stp-job-workflow > div,
.stp-job-flow > div,
.stp-estimate-workflow > div,
.stp-estimate-flow > div {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 0.78rem !important;
  row-gap: 0.18rem !important;
  align-items: start !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.stp-client-workflow > div > span:first-child,
.stp-lead-workflow > div > span:first-child,
.stp-visit-flow > div > span:first-child,
.stp-invoice-flow > div > span:first-child,
.stp-job-flow > div > span:first-child,
.stp-estimate-flow > div > span:first-child {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  justify-self: start !important;
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue)) !important;
  color: #fff !important;
  font-size: 0.9rem !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.stp-job-workflow > div > strong:first-child,
.stp-estimate-workflow > div > strong:first-child {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  justify-self: start !important;
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, var(--stp-teal), var(--stp-blue)) !important;
  color: #fff !important;
  font-size: 0.9rem !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.stp-client-workflow > div > strong:not(:first-child),
.stp-lead-workflow > div > strong:not(:first-child),
.stp-visit-flow > div > strong:not(:first-child),
.stp-invoice-flow > div > strong:not(:first-child),
.stp-job-flow > div > strong:not(:first-child),
.stp-estimate-flow > div > strong:not(:first-child) {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: stretch !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--stp-navy) !important;
  font-size: 0.9rem !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  overflow: visible !important;
}

.stp-job-workflow > div > span:not(:first-child),
.stp-estimate-workflow > div > span:not(:first-child),
.stp-job-flow > div > span:not(:first-child),
.stp-estimate-flow > div > span:not(:first-child) {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: stretch !important;
  display: block !important;
  place-items: initial !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--stp-navy) !important;
  font-size: 0.9rem !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  overflow: visible !important;
}

.stp-client-workflow > div > small,
.stp-lead-workflow > div > small,
.stp-visit-flow > div > small,
.stp-invoice-flow > div > small,
.stp-job-workflow > div > small,
.stp-job-flow > div > small,
.stp-estimate-workflow > div > small,
.stp-estimate-flow > div > small {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: stretch !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0.12rem 0 0 !important;
  padding: 0 !important;
  color: var(--stp-muted) !important;
  font-size: 0.76rem !important;
  line-height: 1.45 !important;
  text-align: left !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  overflow: visible !important;
}

.stp-client-workflow > div > div,
.stp-lead-workflow > div > div,
.stp-visit-flow > div > div,
.stp-invoice-flow > div > div,
.stp-job-workflow > div > div,
.stp-job-flow > div > div,
.stp-estimate-workflow > div > div,
.stp-estimate-flow > div > div {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

.stp-client-workflow > div > div > strong,
.stp-lead-workflow > div > div > strong,
.stp-visit-flow > div > div > strong,
.stp-invoice-flow > div > div > strong,
.stp-job-workflow > div > div > strong,
.stp-job-flow > div > div > strong,
.stp-estimate-workflow > div > div > strong,
.stp-estimate-flow > div > div > strong {
  display: block !important;
  color: var(--stp-navy) !important;
  font-size: 0.9rem !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.stp-client-workflow > div > div > small,
.stp-lead-workflow > div > div > small,
.stp-visit-flow > div > div > small,
.stp-invoice-flow > div > div > small,
.stp-job-workflow > div > div > small,
.stp-job-flow > div > div > small,
.stp-estimate-workflow > div > div > small,
.stp-estimate-flow > div > div > small {
  display: block !important;
  margin-top: 0.18rem !important;
  color: var(--stp-muted) !important;
  font-size: 0.76rem !important;
  line-height: 1.45 !important;
  white-space: normal !important;
}

@media (max-width: 920px) {
  .stp-client-workflow > div,
  .stp-lead-workflow > div,
  .stp-visit-flow > div,
  .stp-invoice-flow > div,
  .stp-job-workflow > div,
  .stp-job-flow > div,
  .stp-estimate-workflow > div,
  .stp-estimate-flow > div {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    column-gap: 0.68rem !important;
  }
}
