/* =========================================================
   Inframarine Ops Console
   ========================================================= */

:root {
  --bg: #050a10;
  --bg-2: #070f17;
  --panel: #0a141d;
  --panel-2: #0d1b26;
  --panel-3: #112433;
  --line: rgba(125, 249, 255, 0.13);
  --line-strong: rgba(125, 249, 255, 0.28);
  --text: #eaf7f9;
  --muted: #8ba6b0;
  --muted-2: #617b86;
  --cyan: #00f0ff;
  --cyan-2: #7df9ff;
  --cyan-3: #00a7b5;
  --cyan-ink: #04121f;
  --amber: #ffb454;
  --red: #ff6b6b;
  --green: #52e0a4;
  --violet: #9aa8ff;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow: 0 30px 70px -45px #000;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text);
  background: radial-gradient(1000px 620px at 90% -10%, rgba(0, 240, 255, 0.1), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(0, 94, 255, 0.08), transparent 60%),
    var(--bg);
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--cyan-2);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(0, 240, 255, 0.85);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: rgba(0, 240, 255, 0.3);
  color: #fff;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 500;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--cyan);
  color: var(--cyan-ink);
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}

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

.btn:active {
  transform: none;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: linear-gradient(180deg, #9afcff, var(--cyan));
  color: var(--cyan-ink);
  box-shadow: 0 14px 34px -18px rgba(0, 240, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #d0feff, #8dfbff);
  color: var(--cyan-ink);
  box-shadow: 0 18px 40px -18px rgba(0, 240, 255, 0.95);
}

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

.btn-ghost:hover {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  color: #fff;
}

.btn-quiet {
  color: var(--muted);
}

.btn-quiet:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.1);
  color: #ffb3b3;
}

.btn-danger:hover {
  border-color: var(--red);
  background: rgba(255, 107, 107, 0.18);
  color: #fff;
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.9rem 1.4rem;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--line);
  color: var(--cyan-2);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan-2);
  white-space: nowrap;
}

.text-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.2s var(--ease);
}

.text-link:hover .icon {
  transform: translateX(2px);
}

/* ---------------------------------------------------------
   App shell
   --------------------------------------------------------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  min-width: 0;
  margin-left: 264px;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.26s var(--ease);
}

.app-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 38px) 56px;
}

/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 120;
  width: 264px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px 18px;
  background: linear-gradient(180deg, #071019 0%, #050c13 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.26s var(--ease), padding 0.26s var(--ease), transform 0.28s var(--ease);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 4px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand .brand-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.sidebar-brand .brand-logo-full {
  height: 24px;
  width: auto;
}

.sidebar-brand .brand-logo-mark {
  display: none;
  height: 28px;
  width: auto;
}

.sidebar-collapse-btn {
  width: 32px;
  height: 32px;
  flex: none;
}

.sidebar-collapse-btn .icon {
  transition: transform 0.24s var(--ease);
}

.ops-badge {
  padding: 0.24rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--cyan-2);
  background: rgba(0, 240, 255, 0.07);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  padding: 6px 12px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.68rem 0.8rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}

.nav-link .icon {
  width: 18px;
  height: 18px;
  color: var(--muted-2);
  transition: color 0.18s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-link:hover .icon {
  color: var(--cyan-2);
}

.nav-link.is-active {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.16), rgba(0, 240, 255, 0.03));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.16);
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.9);
  transform: translateY(-50%);
}

.nav-link.is-active .icon {
  color: var(--cyan);
}

.sidebar-callout {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(0, 240, 255, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.02);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
}

.callout-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(82, 224, 164, 0.55);
  animation: pulseDot 2.4s infinite;
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(82, 224, 164, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(82, 224, 164, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(82, 224, 164, 0);
  }
}

.sidebar-callout strong {
  color: var(--text);
}

.sidebar-callout a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 8px;
  font-weight: 600;
  color: var(--cyan-2);
}

.sidebar-callout a .icon {
  width: 13px;
  height: 13px;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0 6px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(0, 240, 255, 0.24), rgba(0, 167, 181, 0.12));
  border: 1px solid var(--line-strong);
  color: var(--cyan-2);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: none;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 0.68rem;
}

.avatar--lg {
  width: 54px;
  height: 54px;
  font-size: 1rem;
}

.user-chip-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-chip-text strong {
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-text span {
  font-size: 0.68rem;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-badge {
  margin-left: auto;
  padding: 0.18rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.logout-form {
  margin: 0;
}

.nav-link--button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(2, 6, 10, 0.72);
  backdrop-filter: blur(3px);
}

/* ---------------------------------------------------------
   Topbar
   --------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 78px;
  padding: 14px clamp(18px, 3vw, 38px);
  background: rgba(5, 10, 16, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-trigger {
  display: inline-grid;
}

@media (min-width: 981px) {
  body.sidebar-collapsed .sidebar {
    width: 76px;
    padding-inline: 10px;
  }

  body.sidebar-collapsed .app-main {
    margin-left: 76px;
  }

  body.sidebar-collapsed .sidebar-brand {
    flex-direction: column;
    gap: 10px;
    padding-inline: 0;
  }

  body.sidebar-collapsed .sidebar-brand .brand-link {
    justify-content: center;
  }

  body.sidebar-collapsed .sidebar-brand .brand-logo-full,
  body.sidebar-collapsed .ops-badge,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-link span,
  body.sidebar-collapsed .sidebar-callout,
  body.sidebar-collapsed .user-chip-text,
  body.sidebar-collapsed .user-chip .role-badge {
    display: none;
  }

  body.sidebar-collapsed .sidebar-brand .brand-logo-mark {
    display: block;
  }

  body.sidebar-collapsed .sidebar-collapse-btn .icon {
    transform: rotate(180deg);
  }

  body.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 0.72rem;
  }

  body.sidebar-collapsed .nav-link.is-active::before {
    left: -10px;
  }

  body.sidebar-collapsed .sidebar-foot {
    margin-top: auto;
    align-items: center;
  }

  body.sidebar-collapsed .user-chip {
    justify-content: center;
    padding: 0;
  }

  body.sidebar-collapsed .logout-form {
    width: 100%;
  }
}

.topbar-title {
  min-width: 0;
}

.topbar-title h1 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.topbar-title p {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.topbar-user {
  display: none;
}

/* ---------------------------------------------------------
   Panels, stats, tables
   --------------------------------------------------------- */
.panel {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005)),
    var(--panel);
  box-shadow: var(--shadow);
}

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

.panel-head h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.panel-sub {
  margin-top: 3px;
  font-size: 0.77rem;
  color: var(--muted);
}

.panel-sub--lead {
  font-size: 0.85rem;
}

.panel-sub strong {
  color: var(--cyan-2);
  font-weight: 600;
}

.panel-total {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--cyan-2);
}

.panel-empty {
  font-size: 0.82rem;
  color: var(--muted-2);
}

.panel--table {
  padding: 22px 0 6px;
}

.panel--table .panel-head {
  padding: 0 22px;
}

.panel--leads {
  padding: 22px 0 10px;
}

.panel--leads .panel-head {
  padding: 0 22px;
}

.panel--leads .filter-tabs {
  padding: 0 22px;
}

.panel--leads .table-wrap {
  padding: 0 8px;
}

.panel--danger {
  border-color: rgba(255, 107, 107, 0.22);
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.05), transparent 60%),
    var(--panel);
}

.panel--security {
  margin-top: 22px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005)),
    var(--panel);
  box-shadow: var(--shadow);
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
}

.stat-card--cyan::after {
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.9;
}

.stat-card--alert::after {
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.9;
}

.stat-card--win::after {
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0.9;
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 16px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(0, 240, 255, 0.09);
  border: 1px solid var(--line);
  color: var(--cyan-2);
}

.stat-icon .icon {
  width: 17px;
  height: 17px;
}

.stat-card--alert .stat-icon {
  background: rgba(255, 180, 84, 0.1);
  color: var(--amber);
}

.stat-card--win .stat-icon {
  background: rgba(82, 224, 164, 0.1);
  color: var(--green);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.stat-value--money {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}

.stat-foot {
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--muted-2);
}

.dash-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.dash-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(125, 249, 255, 0.07);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(0, 240, 255, 0.035);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.cell-person {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--text);
}

.cell-person:hover {
  color: #fff;
}

.cell-person-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.cell-person-text strong {
  font-size: 0.84rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-person-text span {
  font-size: 0.7rem;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 230px;
}

.cell-muted {
  color: var(--muted);
}

.cell-money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-action {
  width: 1%;
  text-align: right;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pill + .pill {
  margin-left: 0.3rem;
}

.pill--new {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--cyan-2);
}

.pill--contacted {
  background: rgba(154, 168, 255, 0.12);
  border-color: rgba(154, 168, 255, 0.3);
  color: #bcc5ff;
}

.pill--scheduled {
  background: rgba(255, 180, 84, 0.12);
  border-color: rgba(255, 180, 84, 0.3);
  color: #ffcf8f;
}

.pill--won {
  background: rgba(82, 224, 164, 0.12);
  border-color: rgba(82, 224, 164, 0.3);
  color: #8bf0c4;
}

.pill--lost {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.26);
  color: #ff9f9f;
}

.pill--urgent {
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.38);
  color: #ffb3b3;
}

.pill--normal,
.pill--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}

/* Pipeline */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.pipeline-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 5px;
  font-size: 0.76rem;
}

.pipeline-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
}

.pipeline-count {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}

.status-dot--new {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
}
.status-dot--contacted {
  background: var(--violet);
}
.status-dot--scheduled {
  background: var(--amber);
}
.status-dot--won {
  background: var(--green);
}
.status-dot--lost {
  background: var(--red);
}

.pipeline-track {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.pipeline-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--muted-2);
}

.pipeline-fill--new {
  background: linear-gradient(90deg, var(--cyan-3), var(--cyan));
}
.pipeline-fill--contacted {
  background: linear-gradient(90deg, #5f6bd0, var(--violet));
}
.pipeline-fill--scheduled {
  background: linear-gradient(90deg, #b8792c, var(--amber));
}
.pipeline-fill--won {
  background: linear-gradient(90deg, #2f9a6d, var(--green));
}
.pipeline-fill--lost {
  background: linear-gradient(90deg, #9a3c3c, var(--red));
}

/* Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-left: 6px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-strong), transparent);
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 0.75rem;
  padding-left: 18px;
}

.timeline-dot {
  position: absolute;
  left: 2px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--cyan-3);
}

.timeline-dot--new {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.timeline-body {
  min-width: 0;
}

.timeline-title {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-lead {
  color: var(--muted);
  font-weight: 500;
}

.timeline-detail {
  margin-top: 1px;
  font-size: 0.73rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.timeline-meta {
  margin-top: 2px;
  font-size: 0.66rem;
  color: var(--muted-2);
}

/* ---------------------------------------------------------
   Filters / search / pagination
   --------------------------------------------------------- */
.panel-head--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

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

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 220px;
}

.search-field .icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 0.66rem 0.85rem 0.66rem 2.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.82rem;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-field input:focus {
  border-color: var(--line-strong);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12);
}

.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.44rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.filter-tab:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.filter-tab.is-active {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.35);
  color: var(--cyan-2);
}

.filter-count {
  padding: 0.05rem 0.34rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.filter-tab.is-active .filter-count {
  background: rgba(0, 240, 255, 0.2);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 16px 22px 6px;
}

.page-btn {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.page-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.page-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.page-status {
  font-size: 0.73rem;
  color: var(--muted-2);
}

.page-status strong {
  color: var(--text);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 48px 22px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 6px;
  border-radius: 16px;
  background: rgba(0, 240, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--cyan-2);
}

.empty-icon .icon {
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
}

.empty-state p {
  max-width: 34ch;
  font-size: 0.8rem;
  color: var(--muted);
}

.empty-state .btn {
  margin-top: 10px;
}

/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

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

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.field .opt {
  font-weight: 400;
  color: var(--muted-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.68rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.85rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}

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

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--line-strong);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: rgba(255, 107, 107, 0.65);
}

.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.field-error {
  font-size: 0.71rem;
  color: #ff9f9f;
}

.field-hint {
  font-size: 0.69rem;
  color: var(--muted-2);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.form-hint {
  font-size: 0.71rem;
  color: var(--muted-2);
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  padding-right: 2.9rem;
}

.password-toggle {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cyan-2);
}

.password-toggle .icon {
  width: 17px;
  height: 17px;
}

.money-input {
  position: relative;
  display: flex;
  align-items: center;
}

.money-input span {
  position: absolute;
  left: 12px;
  color: var(--muted-2);
  font-size: 0.85rem;
  pointer-events: none;
}

.money-input input {
  padding-left: 26px;
  font-variant-numeric: tabular-nums;
}

/* Flash */
.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.72rem 0.9rem;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.07);
  font-size: 0.8rem;
  color: var(--text);
}

.flash .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--cyan-2);
}

.flash span {
  flex: 1;
}

.flash--success {
  border-color: rgba(82, 224, 164, 0.28);
  background: rgba(82, 224, 164, 0.08);
}

.flash--success .icon {
  color: var(--green);
}

.flash--error {
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.09);
}

.flash--error .icon {
  color: #ff9f9f;
}

.flash--info {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.flash-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
  flex: none;
}

.flash-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.flash-close .icon {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------
   Lead detail
   --------------------------------------------------------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.back-link:hover {
  color: var(--cyan-2);
}

.back-link .icon {
  width: 15px;
  height: 15px;
}

.lead-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding: 22px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(100% 140% at 0% 0%, rgba(0, 240, 255, 0.1), transparent 55%),
    var(--panel);
  box-shadow: var(--shadow);
}

.lead-identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.lead-identity h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.lead-sub {
  margin-top: 3px;
  font-size: 0.75rem;
  color: var(--muted);
}

.lead-pills {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  margin-top: 8px;
}

.lead-contact {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.contact-action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  transition: border-color 0.18s, background 0.18s;
}

.contact-action:hover {
  border-color: var(--line-strong);
  background: rgba(0, 240, 255, 0.05);
  color: #fff;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(0, 240, 255, 0.08);
  color: var(--cyan-2);
  flex: none;
}

.contact-icon .icon {
  width: 16px;
  height: 16px;
}

.contact-action small {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.contact-action strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.lead-main,
.lead-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.message-body {
  padding: 14px 16px;
  border-left: 2px solid var(--cyan-3);
  border-radius: 0 10px 10px 0;
  background: rgba(0, 240, 255, 0.035);
  font-size: 0.86rem;
  line-height: 1.65;
  color: #cfe2e7;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------
   Account
   --------------------------------------------------------- */
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.security-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.security-list li {
  display: flex;
  gap: 0.65rem;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.security-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(0, 240, 255, 0.08);
  color: var(--cyan-2);
  flex: none;
}

.security-icon .icon {
  width: 17px;
  height: 17px;
}

.security-list strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
}

.security-list span {
  display: block;
  margin-top: 2px;
  font-size: 0.71rem;
  color: var(--muted);
}

/* ---------------------------------------------------------
   Login
   --------------------------------------------------------- */
.login-body {
  background: var(--bg);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
}

.login-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3.4rem);
  background: radial-gradient(900px 600px at 85% 0%, rgba(0, 240, 255, 0.18), transparent 55%),
    radial-gradient(700px 500px at 0% 100%, rgba(0, 94, 255, 0.14), transparent 60%),
    linear-gradient(160deg, #04090f 0%, #06111a 55%, #0a1b28 100%);
  border-right: 1px solid var(--line);
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(0, 240, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.055) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 45% 35%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 45% 35%, #000 10%, transparent 78%);
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 240, 255, 0.04) 42%,
    rgba(0, 240, 255, 0.14) 50%,
    rgba(0, 240, 255, 0.04) 58%,
    transparent 100%
  );
  background-size: 46% 100%;
  background-repeat: no-repeat;
  animation: loginBeam 13s linear infinite;
  pointer-events: none;
}

@keyframes loginBeam {
  from {
    background-position: -50% 0;
  }
  to {
    background-position: 150% 0;
  }
}

.login-brand-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.login-brand-top .brand-link img {
  height: 30px;
  width: auto;
}

.login-copy {
  max-width: 560px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-2);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.9);
  animation: pulseDot 2.4s infinite;
}

.login-copy h1 {
  margin: 16px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #fff;
}

.login-copy h1 span {
  color: var(--cyan-2);
}

.login-lede {
  max-width: 46ch;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #a9c6cd;
}

.login-points {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 26px;
}

.login-points li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: #c3dbe1;
}

.login-points .icon {
  width: 17px;
  height: 17px;
  color: var(--cyan-2);
}

.login-telemetry {
  width: min(100%, 330px);
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(4, 9, 15, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 50px -30px #000;
}

.telemetry-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-2);
}

.telemetry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(82, 224, 164, 0.6);
  animation: pulseDot 2.4s infinite;
  flex: none;
}

.telemetry-id {
  margin-left: auto;
  color: var(--muted-2);
  letter-spacing: 0.12em;
}

.telemetry-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.7rem;
}

.telemetry-label {
  color: var(--muted);
}

.telemetry-row strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #eafcff;
}

.telemetry-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  margin-top: 10px;
}

.telemetry-bars span {
  flex: 1;
  height: 100%;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--cyan-2), var(--cyan-3));
  transform-origin: bottom;
  animation: eqPulse 1.2s ease-in-out infinite alternate;
}

.telemetry-bars span:nth-child(2n) {
  animation-duration: 0.9s;
}
.telemetry-bars span:nth-child(3n) {
  animation-duration: 1.4s;
}
.telemetry-bars span:nth-child(4n) {
  animation-duration: 0.75s;
}
.telemetry-bars span:nth-child(5n) {
  animation-duration: 1.65s;
}
.telemetry-bars span:nth-child(2) {
  animation-delay: -0.3s;
}
.telemetry-bars span:nth-child(3) {
  animation-delay: -0.7s;
}
.telemetry-bars span:nth-child(4) {
  animation-delay: -0.15s;
}
.telemetry-bars span:nth-child(5) {
  animation-delay: -0.9s;
}
.telemetry-bars span:nth-child(6) {
  animation-delay: -0.45s;
}
.telemetry-bars span:nth-child(7) {
  animation-delay: -1.1s;
}
.telemetry-bars span:nth-child(8) {
  animation-delay: -0.2s;
}
.telemetry-bars span:nth-child(9) {
  animation-delay: -0.6s;
}
.telemetry-bars span:nth-child(10) {
  animation-delay: -1.25s;
}
.telemetry-bars span:nth-child(11) {
  animation-delay: -0.35s;
}
.telemetry-bars span:nth-child(12) {
  animation-delay: -0.8s;
}

@keyframes eqPulse {
  0% {
    transform: scaleY(0.18);
    opacity: 0.5;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.login-foot {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(180deg, #070f17, #050a10);
}

.login-card {
  width: min(100%, 420px);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.005)),
    var(--panel);
  box-shadow: 0 40px 90px -60px #000;
  animation: cardIn 0.6s var(--ease) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.login-card-head {
  margin-bottom: 20px;
}

.login-lock {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.09);
  border: 1px solid var(--line);
  color: var(--cyan-2);
}

.login-card-head h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login-card-head p {
  margin-top: 3px;
  font-size: 0.8rem;
  color: var(--muted);
}

.login-card .flash {
  margin-bottom: 16px;
}

.login-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 0.66rem;
  color: var(--muted-2);
}

.login-demo code {
  padding: 0.12rem 0.35rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--cyan-2);
  font-size: 0.64rem;
  overflow-wrap: anywhere;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--muted);
}

.login-back:hover {
  color: var(--cyan-2);
}

.login-back .icon {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------
   Error page
   --------------------------------------------------------- */
.error-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.error-card {
  width: min(100%, 480px);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(120% 120% at 100% 0%, rgba(0, 240, 255, 0.1), transparent 55%),
    var(--panel);
  box-shadow: 0 40px 90px -60px #000;
  text-align: center;
}

.error-logo {
  display: inline-block;
  margin-bottom: 22px;
}

.error-logo img {
  height: 28px;
  width: auto;
}

.error-code {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--cyan);
}

.error-card h1 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.error-message {
  font-size: 0.86rem;
  color: var(--muted);
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 24px;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 1220px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  @media (max-width: 980px) {
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  }

  .sidebar-collapse-btn {
    display: none;
  }

  .sidebar.is-open {
    transform: none;
  }

  .app-main {
    margin-left: 0;
  }

  .nav-trigger {
    display: inline-grid;
  }

  .topbar-user {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--line);
    color: var(--cyan-2);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
  }

  body.nav-open {
    overflow: hidden;
  }

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

  .login-brand {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 1.4rem;
    padding-bottom: 1.8rem;
  }

  .login-copy h1 {
    font-size: clamp(2.2rem, 7vw, 3rem);
  }

  .login-telemetry {
    display: none;
  }

  .login-foot {
    display: none;
  }

  .login-panel {
    padding-block: 2rem;
  }

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

  .security-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .app-content {
    padding-top: 18px;
  }

  .topbar {
    min-height: 68px;
    padding-block: 10px;
  }

  .topbar-actions .topbar-site span {
    display: none;
  }

  .stat-grid {
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .dash-side {
    grid-template-columns: 1fr;
  }

  .data-table th,
  .data-table td {
    padding: 11px 10px;
  }

  .data-table--leads th:nth-child(3),
  .data-table--leads td:nth-child(3),
  .data-table--leads th:nth-child(5),
  .data-table--leads td:nth-child(5),
  .data-table--leads th:nth-child(6),
  .data-table--leads td:nth-child(6) {
    display: none;
  }

  .panel--table .data-table th:nth-child(2),
  .panel--table .data-table td:nth-child(2),
  .panel--table .data-table th:nth-child(4),
  .panel--table .data-table td:nth-child(4) {
    display: none;
  }

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

  .lead-contact {
    width: 100%;
  }

  .contact-action {
    flex: 1;
    min-width: 140px;
  }

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

  .login-brand {
    padding: 1.4rem 1.2rem 1.6rem;
  }

  .login-brand-top .brand-link img {
    height: 25px;
  }

  .login-points {
    display: none;
  }

  .login-copy h1 {
    font-size: clamp(1.9rem, 8.5vw, 2.5rem);
    margin-top: 12px;
  }

  .login-lede {
    font-size: 0.85rem;
  }

  .login-panel {
    padding: 1.2rem;
    place-items: start center;
  }

  .login-card {
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px;
  }

  .panel--table,
  .panel--leads {
    padding-inline: 0;
  }

  .panel--table .panel-head,
  .panel--leads .panel-head,
  .panel--leads .filter-tabs {
    padding-inline: 16px;
  }

  .topbar-title p {
    display: none;
  }

  .search-form {
    gap: 6px;
  }

  .search-field {
    min-width: 100%;
  }

  .filter-tabs {
    margin-inline: -16px;
    padding-inline: 16px !important;
  }

  .panel--leads .filter-tabs {
    margin-inline: 0;
  }

  .lead-identity {
    align-items: flex-start;
  }

  .lead-contact {
    flex-direction: column;
  }

  .contact-action {
    width: 100%;
  }

  .pagination {
    padding-inline: 12px;
    gap: 0.4rem;
  }

  .page-status {
    font-size: 0.68rem;
  }
}

/* ---------------------------------------------------------
   Landing Page Content Manager (CMS)
   --------------------------------------------------------- */
.cms-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cms-body {
  padding: 6px 22px 14px;
}

.cms-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
}

.cms-group-title {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cyan-2);
  letter-spacing: -0.01em;
}

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

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

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

.cms-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.cms-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cms-actions {
  padding-top: 6px;
}

.cms-reset-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

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

@media (max-width: 760px) {
  .cms-cards-grid,
  .cms-cards-grid--3,
  .cms-cards-grid--4 {
    grid-template-columns: 1fr;
  }

  .cms-body {
    padding-inline: 16px;
  }
}

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

  .callout-dot,
  .eyebrow-dot,
  .telemetry-dot,
  .login-brand::after,
  .telemetry-bars span {
    animation: none !important;
  }
}
