/* MCC Internal Sale — slate workspace + brand primary #EF4D7F */

:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar-w: 268px;

  /* Brand primary + companions (contrast-safe pairings) */
  --primary: #ef4d7f;
  --primary-hover: #de3d72;
  --primary-pressed: #c42a62;
  --primary-rgb: 239, 77, 127;
  --primary-on-dark: #fecdd3; /* light pink on sidebar */
  --primary-on-dark-bright: #fda4af;

  --accent: var(--primary);
  --accent-bright: #fb7185;
  --accent-soft: rgba(var(--primary-rgb), 0.12);
  --accent-ring: rgba(var(--primary-rgb), 0.22);

  --brand: var(--primary);
  --brand-bright: var(--accent-bright);

  /* Links on light surfaces: deep rose (4.5:1+ on white) */
  --link: #9d174d;
  --link-hover: #831843;

  --canvas: #ebe8ec;
  --canvas-deep: #e0d9df;
  --surface: #ffffff;
  --surface-muted: #f6f1f4;
  --surface-tint: #fdf2f6;

  --ink: #0c1222;
  --ink-soft: #334155;
  --muted: #64748b;

  --frost: #f8fafc;
  --frost-muted: #94a3b8;

  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --danger-ink: #991b1b;
  --success-soft: #ecfdf5;
  --success-border: #a7f3d0;
  --success-ink: #065f46;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 12px 40px -12px rgba(15, 23, 42, 0.1);
  --shadow-primary: 0 4px 18px rgba(var(--primary-rgb), 0.28);
  --border-ui: rgba(15, 23, 42, 0.08);

  --glass-edge: var(--border-ui);
  --glass-fill: var(--surface);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --glass-shadow: var(--shadow-card);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -120px;
  z-index: 300;
  padding: 0.55rem 1rem;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease-out;
}

.skip-link:focus {
  top: 0.75rem;
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}
/* ——— Canvas ——— */
body.app {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: var(--canvas);
  color: var(--ink);
}
body.login-page {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: #0a0e14;
  color: var(--frost);
}

body.app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(165deg,
      var(--canvas) 0%,
      #e4eaf2 40%,
      var(--canvas-deep) 100%);
}

body.app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(var(--primary-rgb), 0.06) 0%,
    transparent 34%,
    transparent 66%,
    rgba(157, 23, 77, 0.04) 100%
  );
}

/* Login: calm ops-floor canvas (no violet orbs, no grain) */
body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(165deg, #0a0e14 0%, #0f141c 45%, #121a24 100%);
}

body.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(var(--primary-rgb), 0.09) 0%,
    transparent 30%,
    transparent 70%,
    rgba(157, 23, 77, 0.06) 100%
  );
}
body.nav-open {
  overflow: hidden;
}

a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}
a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

/* ——— Shell ——— */
.app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  z-index: 120;
  background: linear-gradient(180deg, #121a24 0%, #0f141c 55%, #0a0e14 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.12);
}

.sidebar-head {
  padding: 1.4rem 1.15rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  }
  
  .sidebar-logo:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 2px;
}

.sidebar-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
    display: block;
    object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 6px 22px rgba(var(--primary-rgb), 0.42);
}

.sidebar-logo-text {
  font-weight: 800;
  font-size: 1.02rem;
    letter-spacing: -0.03em;
    color: #f8fafc;
}
.sidebar-logo-text span {
  font-weight: 700;
  color: var(--primary-on-dark-bright);
}

.sidebar-nav {
  flex: 1;
  padding: 0.9rem 0.75rem;
  overflow-y: auto;
}

.sidebar-label {
  margin: 1.15rem 0 0.5rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(148, 163, 184, 0.85);
}
.sidebar-label:first-child {
  margin-top: 0.15rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.55rem 0.55rem 0.5rem;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  color: rgba(226, 232, 240, 0.92);
  font-weight: 600;
  font-size: 0.93rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.sidebar-link.is-active {
  background: rgba(var(--primary-rgb), 0.16);
  border-color: rgba(251, 113, 133, 0.35);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-ic {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(203, 213, 225, 0.95);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sidebar-link:hover .sidebar-ic {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.sidebar-link.is-active .sidebar-ic {
  background: rgba(var(--primary-rgb), 0.28);
  border-color: rgba(251, 113, 133, 0.4);
  color: #fff5f7;
}

.sidebar-user {
  padding: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

.sidebar-user-name {
  display: block;
  font-weight: 700;
  font-size: 0.93rem;
  color: #fff;
  line-height: 1.35;
}

.sidebar-user-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--frost-muted);
  margin-top: 0.2rem;
}

.sidebar-logout {
  display: inline-flex;
    align-items: center;
    margin-top: 0.85rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sidebar-logout:hover {
  color: #fecaca;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.08);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 110;
}
.sidebar-backdrop.is-visible {
  display: block;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mobile-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border-ui);
    box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
    color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.menu-toggle:hover {
  background: #fff;
  border-color: rgba(var(--primary-rgb), 0.4);
}
  
  .menu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mobile-bar-title {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.content {
  flex: 1;
  width: 100%;
  max-width: none;
    margin: 0;
    padding: 1.5rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
}

.content:focus {
  outline: none;
}
@media (min-width: 901px) {
  .content {
    padding: 2rem 1.75rem 3.5rem;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    transform: translateX(-108%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 16px 0 80px rgba(0, 0, 0, 0.55);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .mobile-bar {
    display: flex;
  }
}

/* ——— Panels (cards) ——— */
.card {
  background: var(--surface);
  border: 1px solid var(--border-ui);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--glass-inset), var(--shadow-card);
  color: var(--ink);
}

/* List / data pages: toolbar + edge-to-edge table (less stacked chrome) */
.card.card--datapack {
  padding: 0;
  overflow: hidden;
}

.card.card--datapack>.page-toolbar {
  padding: 1.35rem 1.65rem 1.15rem;
  border-bottom: 1px solid var(--border-ui);
}

.card.card--datapack .table-wrap {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Leads: at least viewport-tall card; table area grows inside the card */
.card.card--datapack-min-viewport {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 5.25rem);
  min-height: calc(100dvh - 5.25rem);
}

@media (min-width: 901px) {
  .card.card--datapack-min-viewport {
    min-height: calc(100vh - 6.25rem);
    min-height: calc(100dvh - 6.25rem);
  }
}

@media (max-width: 900px) {
  .card.card--datapack-min-viewport {
    min-height: calc(100vh - 8.5rem);
    min-height: calc(100dvh - 8.5rem);
  }
}

.card.card--datapack-min-viewport .table-wrap {
  flex: 1 1 auto;
  min-height: 12rem;
}
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.page-toolbar-text {
  flex: 1;
  min-width: min(100%, 16rem);
}

.page-toolbar-text h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.page-toolbar-lead {
  margin: 0;
  max-width: 40rem;
  font-size: 0.93rem;
  line-height: 1.55;
}

.page-toolbar .btn {
  flex-shrink: 0;
  align-self: center;
}

.page-toolbar form {
  margin: 0;
  flex-shrink: 0;
  align-self: center;
}

.card.card--datapack .data-section-head {
  padding: 1rem 1.65rem 0.4rem;
  border-top: 1px solid var(--border-ui);
}

.card.card--datapack .data-section-head .section-title {
  margin: 0;
  font-size: 1rem;
}

.content>.card:first-of-type>h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  margin: 0 0 0.65rem;
}

.card > h1:not(:only-child) {
  margin-bottom: 0.5rem;
}

.card > p.muted {
  line-height: 1.65;
  margin: 0 0 1.1rem;
  max-width: 58rem;
}

h1,
.page-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

h2,
.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.muted {
  color: var(--muted);
  font-size: 0.93rem;
}

.req-star {
  color: rgb(var(--primary-rgb));
  font-weight: 800;
}

.phone-dup-details {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  background: rgba(var(--primary-rgb), 0.06);
}

.phone-dup-details-title {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.phone-dup-details-dl {
  margin: 0;
  display: grid;
  gap: 0.45rem 1rem;
}

.phone-dup-details-dl>div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.phone-dup-details-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.phone-dup-details-dl dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}
/* ——— Dashboard ——— */
.dash-hero {
  margin-bottom: 1.75rem;
}

.dash-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.dash-hero-intro {
  flex: 1;
  min-width: min(100%, 14rem);
}

.dash-hero-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}
.dash-greet {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
    color: var(--ink);
  margin: 0 0 0.4rem;
}

.dash-sub {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 38rem;
  line-height: 1.55;
}

.dash-scope {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.15rem;
  padding: 1rem 1.15rem;
  max-width: 48rem;
  font-size: 0.91rem;
  line-height: 1.55;
  color: var(--ink-soft);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-tint) 100%);
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}
.dash-scope svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
  opacity: 0.95;
}

.dash-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .dash-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dash-stat {
  background: var(--surface);
    border: 1px solid var(--border-ui);
  border-radius: var(--radius);
  padding: 1.4rem 1.45rem;
  box-shadow: var(--glass-inset), var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.0rem;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dash-stat:hover {
  border-color: rgba(var(--primary-rgb), 0.28);
  box-shadow: var(--glass-inset), 0 16px 40px -14px rgba(15, 23, 42, 0.12);
}

.dash-stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
  color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.dash-stat-label {
  font-size: 1.2rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.dash-stat-hint {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.dash-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.dash-panel-head h2 {
  margin: 0;
}

.dash-branch-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.dash-branch-filter label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dash-branch-filter select {
  min-width: 12rem;
  max-width: 20%;
  margin: 0;
}

/* ——— Tables ——— */
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-ui);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--ink);
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.table-wrap--comfortable th,
.table-wrap--comfortable td {
  padding: 0.95rem 1.2rem;
  vertical-align: middle;
}

.table-wrap--comfortable table {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.table-wrap--comfortable thead th {
  font-size: 0.7rem;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
  white-space: nowrap;
}

.table-wrap .td-truncate {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1100px) {
  .table-wrap .td-truncate {
    max-width: 14rem;
  }
}

.table-wrap .td-name {
  font-weight: 600;
  min-width: 8.5rem;
}

.table-wrap .td-actions,
.table-wrap .th-actions {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

.table-empty {
  padding: 2.5rem 1.2rem !important;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.table-row-actions .btn-sm {
  min-height: 2.1rem;
}

.table-action-menu {
  position: relative;
  display: inline-block;
  text-align: right;
}

.table-action-menu>summary.table-action-menu__summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.table-action-menu>summary.table-action-menu__summary::-webkit-details-marker {
  display: none;
}

.table-action-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.2rem);
  z-index: 50;
  margin: 0;
  padding: 0.35rem 0;
  min-width: 9.25rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.table-action-menu__list li {
  margin: 0;
}

.table-action-menu__link {
  display: block;
  padding: 0.5rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s ease;
}

.table-action-menu__link:hover {
  background: rgba(var(--primary-rgb), 0.08);
}

.table-action-menu__link--danger {
  color: var(--danger-ink);
}

.table-action-menu__link--danger:hover {
  background: var(--danger-soft);
}

.table-wrap .td-actions--menu {
  overflow: visible;
}

.table-wrap tbody tr:has(.table-action-menu[open]) {
  z-index: 6;
}

.table-wrap tbody tr:has(.table-action-menu[open]) td {
  position: relative;
  z-index: 5;
  background: var(--surface);
}
.table-wrap tbody td {
  background: var(--surface);
}

.table-wrap thead th {
  background: #f1f5f9;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.table-wrap tbody tr {
  transition: background 0.15s ease;
}
.table-wrap tbody tr:hover td {
  background: rgba(var(--primary-rgb), 0.08);
}

.table-footer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.65rem 1.15rem;
}

.table-footer-controls__left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.table-footer-controls__label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.table-footer-controls__right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.table-footer-controls__meta {
  font-size: 0.88rem;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pager__link,
.pager__dots {
  font-size: 0.88rem;
  font-weight: 800;
}

.pager__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 2.15rem;
  padding: 0 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-ui);
  background: var(--surface-muted);
  color: var(--ink-soft);
  text-decoration: none;
}

.pager__link:hover {
  background: #fff;
  color: var(--ink);
  border-color: rgba(var(--primary-rgb), 0.35);
}

.pager__link.is-active {
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.4);
  color: var(--ink);
}

.pager__link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 720px) {
  .table-footer-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  .table-footer-controls__right {
    width: 100%;
    justify-content: flex-start;
  }
}

.cell-mono {
  font-variant-numeric: tabular-nums;
}

.dash-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.dash-quick-search {
  margin-top: 0.5rem;
}

.dash-quick-search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 900px) {
  .dash-quick-search-form {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.dash-quick-search-text {
  flex: 1;
  min-width: min(100%, 14rem);
}

.dash-quick-search-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.dash-quick-search-hint {
  margin: 0;
  font-size: 0.92rem;
  max-width: 36rem;
  line-height: 1.5;
}

.dash-quick-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.dash-quick-search-row input[type="search"] {
  flex: 1;
  min-width: min(100%, 12rem);
  max-width: 28rem;
  margin: 0;
}

.dash-lead-live {
  margin-top: 0.65rem;
  border-top: 1px solid var(--border-ui);
  padding: 1rem 1.65rem 1.35rem;
  background: var(--surface-muted);
}

.dash-lead-live-empty {
  margin: 0;
  font-size: 0.93rem;
}

.dash-lead-live-cap {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.dash-lead-live-table {
  margin-bottom: 0.85rem;
}

/* Quick search results: keep header labels readable (e.g. “Lead ID”, not all-caps) */
.dash-lead-live .dash-lead-live-table thead th {
  text-transform: none;
  letter-spacing: 0.03em;
  font-size: 0.90rem;
}
.dash-lead-live-footer {
  margin: 0;
}

.card.card--datapack .lead-search-inline {
  padding: 1rem 1.65rem;
  border-top: 1px solid var(--border-ui);
  background: var(--surface-muted);
}

.lead-search-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
}

.lead-search-inline-form input[type="search"] {
  flex: 1;
  min-width: min(100%, 14rem);
  max-width: 32rem;
  margin: 0;
}

/* Leads filters: keep controls compact + aligned */
.lead-search-inline-form select,
.lead-search-inline-form input[type="date"] {
  width: auto;
  margin: 0;
  height: 2.65rem;
}

.lead-search-inline-form select {
  width: 12rem;
  min-width: 12rem;
}

.lead-search-inline-form input[type="date"] {
  width: 12rem;
  min-width: 12rem;
}

.lead-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.lead-filter-field--keywords {
  flex: 1;
}

.lead-filter-field--dates {
  flex: 0 0 auto;
}

.lead-filter-dates {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.lead-filter-date {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

/* Closures filters: slightly tighter than Leads */
.lead-search-inline-form--closures {
  gap: 0.45rem;
}

.lead-search-inline-form--closures .lead-filter-field--keywords {
  flex: 0 0 auto;
  width: 16rem;
}

.lead-search-inline-form--closures .lead-filter-field--keywords input[type="search"] {
  width: 100%;
  max-width: none;
}

.lead-search-banner {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
}

.lead-search-banner strong {
  color: var(--ink);
}
/* ——— Forms ——— */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.65);
  box-shadow: 0 0 0 4px var(--accent-ring);
  background: #fff;
}

input:read-only {
  background: rgba(241, 245, 249, 0.95);
  color: var(--muted);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.row {
  margin-bottom: 1.05rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.25;
  letter-spacing: 0.02em;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--primary);
  border-color: rgba(190, 24, 93, 0.45);
  color: #fff;
  box-shadow: var(--shadow-primary);
  border-radius: var(--radius-sm);
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  color: #fff;
  filter: none;
  background: var(--primary-hover);
  border-color: rgba(157, 23, 77, 0.55);
  box-shadow: 0 6px 22px rgba(var(--primary-rgb), 0.32);
}

.btn-ghost {
  background: var(--surface-muted);
  border: 1px solid var(--border-ui);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
}
.btn-ghost:hover {
  background: #fff;
  color: var(--ink);
  border-color: rgba(var(--primary-rgb), 0.35);
}

.btn-danger {
  background: #dc2626;
    border-color: rgba(185, 28, 28, 0.35);
  color: #fff;
  box-shadow: none;
    border-radius: var(--radius-sm);
  }
  
  .btn-danger:hover {
    color: #fff;
    filter: none;
    background: #b91c1c;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

.badge {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-soft);
  border: 1px solid rgba(15, 23, 42, 0.08);
  letter-spacing: 0.02em;
}

.badge--success {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success-ink);
}

.badge--danger {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger-ink);
}

.closure-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.closure-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  border: 1px solid var(--border-ui);
  color: var(--ink-soft);
  max-width: 100%;
}

.closure-pill__text {
  display: inline-block;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.closure-pill__form {
  display: inline-flex;
  margin: 0;
}

.closure-pill__x {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1;
  padding: 0.1rem 0.25rem;
  border-radius: var(--radius-pill);
}

.closure-pill__x:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
}

.closure-pill__x:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.alert {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.alert-error {
  background: var(--danger-soft);
    border-color: var(--danger-border);
  color: var(--danger-ink);
}
.alert-success {
  background: var(--success-soft);
    border-color: var(--success-border);
  color: var(--success-ink);
}

.chk-grid {
  display: grid;
  gap: 0.45rem;
  max-height: 220px;
  overflow: auto;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-ui);
    background: var(--surface-muted);
}

.chk-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.chk-row input {
  width: auto;
}

/* ——— Login (MCC Internal Sale — telemarketing CRM, ops clarity) ——— */
.login-page {
  z-index: 1;
  }
  
  .login-layout {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
  }
  
  @media (min-width: 900px) {
    .login-layout {
      grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.05fr);
    }
  }
  
  .login-aside {
    padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  @media (min-width: 900px) {
    .login-aside {
      border-bottom: none;
      border-right: 1px solid rgba(255, 255, 255, 0.06);
    }
  }
  
  .login-aside-inner {
    max-width: 28rem;
  }
  
  .login-aside-accent {
    width: 3rem;
    height: 3px;
    border-radius: var(--radius-pill);
    background: var(--primary);
    margin-bottom: 1.75rem;
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.45);
  }
  
  .login-eyebrow {
    margin: 0 0 0.65rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
  }
  
  .login-product-title {
    margin: 0 0 1rem;
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.12;
    color: #f8fafc;
  }
  
  .login-product-sub {
    margin: 0 0 2rem;
    font-size: 1.02rem;
    line-height: 1.6;
    color: rgba(203, 213, 225, 0.92);
    max-width: 26rem;
  }
  
  .login-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.85rem;
  }
  
  .login-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.88);
  }
  
  .login-points li::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 0.45rem;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
  }
  
  .login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 2.5rem);
    background: var(--canvas);
}

.login-shell {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-card {
  position: relative;
  background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius);
    padding: clamp(1.75rem, 3vw, 2.35rem) clamp(1.5rem, 3vw, 2rem);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 24px 48px -12px rgba(15, 23, 42, 0.12);
    color: var(--ink);
}

.login-card-head {
  margin-bottom: 1.65rem;
}

.login-card h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: var(--ink);
    letter-spacing: -0.035em;
}

.login-lead {
  margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.login-page form {
  position: relative;
  z-index: 1;
}

.login-page .login-card label {
  color: var(--ink-soft);
}

.login-page .login-card input[type="text"],
.login-page .login-card input[type="password"] {
  background: var(--surface-muted);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.login-page .login-card input::placeholder {
  color: rgba(100, 116, 139, 0.85);
}
.login-page .login-card input:focus {
  border-color: rgba(var(--primary-rgb), 0.65);
  box-shadow: 0 0 0 4px var(--accent-ring);
  background: #fff;
}

.login-page .login-card .btn-primary {
  width: 100%;
  padding: 0.78rem 1.2rem;
  font-size: 0.94rem;
  margin-top: 0.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-primary);
}

.login-page .login-card .btn-primary:hover {
  box-shadow: 0 6px 22px rgba(var(--primary-rgb), 0.32);
}
  
.login-page .login-card .btn-primary:active {
  transform: scale(0.99);
}

.login-page .login-card .alert-error {
    background: rgba(254, 226, 226, 0.95);
    border-color: rgba(248, 113, 113, 0.45);
    color: #7f1d1d;
  }
  
  .login-foot {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(71, 85, 105, 0.95);
}

.login-foot strong {
  font-weight: 700;
  color: #334155;
}

/* Footer script parent: layout_footer closes main */

/* ——— No backdrop-filter fallback ——— */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sidebar {
      background: #0f141c !important;
    }
  .mobile-bar {
    background: var(--surface) !important;
  }
  .card,
  .dash-stat {
    background: var(--surface);
  }
  .table-wrap {
    background: var(--surface);
  }
  .login-card {
    background: #ffffff;
  }
  .chk-grid {
    background: var(--surface-muted);
  }
}
