:root {
  --bg: #050505;
  --panel: #111418;
  --panel-strong: #171c22;
  --text: #f7f7f4;
  --muted: #a7adb4;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --cream: #f4f0e6;
  --gold: #d7b56d;
  --green: #7ee0a1;
  --red: #ff6b5f;
  --blue: #83b7ff;
  --radius: 8px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 25% 0%, rgba(215, 181, 109, 0.14), transparent 30rem),
    #050505;
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

.is-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.login-card {
  width: min(100%, 430px);
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.login-card img {
  width: 148px;
  height: auto;
  margin-bottom: 0.4rem;
}

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

.login-copy,
.login-error {
  color: var(--muted);
}

.login-card label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.login-error {
  min-height: 1.4em;
  margin: 0;
  color: var(--red);
  font-size: 0.9rem;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.1rem;
  border-right: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.92);
}

.brand {
  display: inline-flex;
  padding: 0.6rem 0.4rem;
}

.brand img {
  width: 138px;
  height: auto;
}

.sidebar nav {
  display: grid;
  gap: 0.35rem;
}

.sidebar nav a {
  padding: 0.78rem 0.85rem;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-card {
  margin-top: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-card span,
.metric-card span,
.eyebrow,
.chart-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-card strong {
  display: block;
  margin: 0.25rem 0;
}

.sidebar-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-shell {
  margin-left: 260px;
  padding: 1.2rem;
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0 1.2rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: flex-end;
}

.user-pill {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.range-control {
  display: inline-grid;
  gap: 0.25rem;
  min-width: 150px;
}

.range-control span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.range-control select {
  min-height: 38px;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 800;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.primary-btn {
  background: var(--cream);
  color: #050505;
  border-color: var(--cream);
}

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

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

.metric-grid-secondary .metric-card strong {
  font-size: 1.85rem;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.metric-card {
  padding: 1rem;
}

.metric-card strong {
  display: block;
  margin: 0.2rem 0 0.1rem;
  font-size: 2.2rem;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
}

.metrics-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.15rem 0 0.9rem;
}

.compact-btn {
  min-height: 38px;
  padding: 0.5rem 0.85rem;
  font-size: 0.86rem;
}

.advanced-metrics.is-collapsed {
  display: none;
}

.dashboard-view.is-hidden {
  display: none !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.insight-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
}

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

.single-panel-grid {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025)),
    var(--panel);
}

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

select,
input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  padding: 0.62rem 0.72rem;
}

textarea {
  resize: vertical;
}

option {
  color: #050505;
}

.quick-lead-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.lead-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
}

th,
td {
  padding: 0.78rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.92rem;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td {
  color: #e9ecef;
}

.status-select {
  min-height: 34px;
  padding: 0.35rem 0.45rem;
}

.table-input {
  min-height: 34px;
  padding: 0.35rem 0.45rem;
  font-size: 0.86rem;
}

.follow-up-input {
  min-width: 150px;
}

.lost-reason-select {
  min-width: 150px;
}

.empty-state {
  padding: 1.2rem;
  color: var(--muted);
  text-align: center;
}

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

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.pipeline-card {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.pipeline-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pipeline-card strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.9rem;
  line-height: 1;
}

.pipeline-card small {
  color: var(--muted);
}

.source-row {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.source-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.source-meta strong,
.source-meta span {
  min-width: 0;
}

.source-meta strong {
  overflow-wrap: anywhere;
}

.source-meta span {
  flex: 0 0 auto;
}

.source-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.source-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

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

.priority-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.priority-item strong {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.priority-item span,
.priority-item small {
  color: var(--muted);
}

.priority-item small {
  font-size: 0.78rem;
}

.mini-chart {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.chart-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.55rem;
  align-items: end;
  min-height: 160px;
}

.bar {
  display: grid;
  align-items: end;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.bar span:first-child {
  display: block;
  min-height: 12px;
  border-radius: 6px 6px 0 0;
  background: var(--blue);
}

.content-form {
  display: grid;
  gap: 0.8rem;
}

.content-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.health-pill {
  border: 1px solid rgba(126, 224, 161, 0.35);
  border-radius: 999px;
  padding: 0.34rem 0.65rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

@media (max-width: 1080px) {
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .sidebar-card {
    display: none;
  }

  .dashboard-shell {
    margin-left: 0;
  }

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

  .dashboard-grid,
  .insight-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .metric-grid,
  .pipeline-grid,
  .quick-lead-form {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 0.85rem;
  }

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

  .sidebar nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    text-align: center;
  }

  .dashboard-shell {
    padding: 0.85rem;
  }

  .dashboard-topbar,
  .panel-header,
  .topbar-actions {
    display: grid;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .user-pill {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .range-control {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .metric-card,
  .panel {
    padding: 0.85rem;
  }

  .metric-card strong {
    font-size: 1.9rem;
  }

  .metric-grid-secondary .metric-card strong {
    font-size: 1.65rem;
  }

  .metrics-toggle-row {
    display: grid;
  }

  .leads-panel {
    overflow: hidden;
  }

  .leads-panel .panel-header select {
    width: 100%;
  }

  .quick-lead-form {
    gap: 0.55rem;
  }

  .lead-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  table {
    min-width: 0;
    border-collapse: separate;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: minmax(104px, 0.38fr) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.72rem 0.8rem;
    border-bottom: 1px solid var(--line);
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  td:first-child {
    align-items: start;
    background: rgba(255, 255, 255, 0.035);
  }

  td:last-child {
    border-bottom: 0;
  }

  .empty-state {
    display: block;
  }

  .empty-state::before {
    content: none;
  }

  .status-select,
  .table-input,
  .follow-up-input,
  .lost-reason-select {
    min-width: 0;
    width: 100%;
  }

  #analytics .panel-header {
    margin-bottom: 0.75rem;
  }

  .source-list {
    gap: 0.85rem;
  }

  .source-row {
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
  }

  .source-meta {
    display: grid;
    gap: 0.15rem;
  }

  .source-meta span {
    flex: initial;
    font-size: 0.82rem;
  }

  .chart-head {
    display: grid;
    gap: 0.2rem;
  }

  .bars {
    gap: 0.35rem;
    min-height: 130px;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    grid-template-columns: repeat(7, minmax(34px, 1fr));
    -webkit-overflow-scrolling: touch;
  }

  .bar {
    font-size: 0.7rem;
  }
}

@media (max-width: 440px) {
  .login-card {
    padding: 1rem;
  }

  .brand img {
    width: 118px;
  }

  .sidebar nav a {
    padding: 0.68rem 0.55rem;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.08rem;
  }

  th,
  td {
    padding: 0.68rem 0.6rem;
    font-size: 0.86rem;
  }

  td {
    grid-template-columns: 1fr;
    gap: 0.28rem;
    align-items: start;
  }

  td::before {
    font-size: 0.68rem;
  }
}

/* Premium client workspace refresh — visual only; all Firebase data hooks stay intact. */
:root {
  --bg: #0b1424;
  --panel: #121f33;
  --panel-strong: #192940;
  --text: #f8faf6;
  --muted: #aeb9c7;
  --line: rgba(223, 235, 243, 0.12);
  --line-strong: rgba(223, 235, 243, 0.22);
  --cream: #f8faf6;
  --gold: #d9f99d;
  --green: #a3e635;
  --red: #ff7757;
  --blue: #7dd3fc;
  --radius: 14px;
}

body {
  background: radial-gradient(circle at 82% -5%, rgba(163, 230, 53, 0.14), transparent 30rem), radial-gradient(circle at 8% 100%, rgba(125, 211, 252, 0.1), transparent 34rem), var(--bg);
}

body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom,black,transparent 65%); }
.login-screen { padding: 1.5rem; }
.login-card { gap: .9rem; padding: clamp(1.45rem,4vw,2.25rem); border-color: rgba(217,249,157,.34); border-radius: 18px; background: linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.025)),var(--panel); box-shadow: 12px 12px 0 rgba(255,119,87,.9),0 30px 70px rgba(0,0,0,.3); }
.login-card img,.brand img { filter: brightness(0) invert(1); }
.login-card h1,h1,h2,h3 { font-family: "Space Grotesk","Inter",sans-serif; letter-spacing: -.045em; }
.login-card h1 { font-size: clamp(2.35rem,7vw,3.4rem); line-height: .94; }
.login-copy { max-width: 34ch; line-height: 1.65; }
.eyebrow { display: flex; align-items: center; gap: .5rem; color: var(--gold); font-size: .68rem; letter-spacing: .12em; }
.eyebrow::before { content:""; width:1.35rem; height:1px; background:currentColor; }
.login-card label,.content-form label { color:#d7e0e8; }

.sidebar { width:278px; padding:1.25rem 1rem 1rem; border-right-color:var(--line); background:rgba(8,17,31,.86); backdrop-filter:blur(16px); }
.brand { padding:.72rem .65rem 1.2rem; }
.brand img { width:154px; }
.sidebar nav { gap:.3rem; }
.sidebar nav a { position:relative; display:flex; align-items:center; min-height:46px; padding:.78rem .85rem .78rem 1rem; border:1px solid transparent; border-radius:9px; color:var(--muted); font-size:.9rem; transition:color 160ms ease,background 160ms ease,border-color 160ms ease; }
.sidebar nav a::before { content:""; width:.42rem; height:.42rem; margin-right:.72rem; border:1px solid currentColor; border-radius:50%; }
.sidebar nav a:hover,.sidebar nav a.active { border-color:rgba(217,249,157,.22); color:var(--text); background:rgba(217,249,157,.1); }
.sidebar nav a.active::before { border-color:var(--gold); background:var(--gold); box-shadow:0 0 0 4px rgba(217,249,157,.12); }
.sidebar-card { padding:1.15rem; border-color:rgba(217,249,157,.18); border-radius:12px; background:linear-gradient(145deg,rgba(217,249,157,.12),rgba(255,255,255,.025)); }
.sidebar-card span,.metric-card span,.chart-head span { color:var(--muted); font-size:.67rem; letter-spacing:.1em; }
.sidebar-card strong { font-family:"Space Grotesk","Inter",sans-serif; font-size:1.08rem; }

.dashboard-shell { max-width:1660px; margin-left:278px; padding:1.5rem clamp(1.25rem,3vw,2.6rem) 2.6rem; }
.dashboard-topbar { min-height:100px; padding:.35rem 0 1.55rem; }
.dashboard-topbar h1 { font-size:clamp(2rem,3vw,3.1rem); line-height:.96; }
.topbar-actions { gap:.55rem; }
.range-control { min-width:142px; }
.range-control span { color:var(--muted); }
.range-control select,select,input,textarea { border-color:rgba(223,235,243,.17); border-radius:8px; background:rgba(3,10,20,.42); color:var(--text); }
.range-control select { min-height:40px; border-radius:9px; }
.range-control select:focus,select:focus,input:focus,textarea:focus { outline:3px solid rgba(163,230,53,.3); border-color:var(--gold); }
.user-pill { border-color:var(--line); color:#d7e0e8; background:rgba(255,255,255,.04); }
.primary-btn,.ghost-btn { min-height:42px; border-radius:9px; font-size:.84rem; transition:transform 160ms ease,background 160ms ease,border-color 160ms ease; }
.primary-btn { border-color:var(--gold); background:var(--gold); color:#17220c; }
.primary-btn:hover { border-color:var(--green); background:var(--green); transform:translateY(-2px); }
.ghost-btn { border-color:var(--line-strong); background:rgba(255,255,255,.035); }
.ghost-btn:hover { border-color:rgba(217,249,157,.44); background:rgba(217,249,157,.1); transform:translateY(-2px); }

.metric-grid { gap:1rem; margin-bottom:1rem; }
.metric-card,.panel { border-color:var(--line); border-radius:14px; }
.metric-card { position:relative; min-height:145px; padding:1.25rem; overflow:hidden; background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.025)),var(--panel); }
.metric-card::after { content:""; position:absolute; width:7rem; height:7rem; right:-3.2rem; bottom:-4.8rem; border-radius:50%; background:rgba(163,230,53,.16); }
.metric-card:nth-child(2)::after { background:rgba(125,211,252,.14); }
.metric-card:nth-child(3)::after { background:rgba(255,119,87,.13); }
.metric-card strong { position:relative; z-index:1; margin:.55rem 0 .3rem; font-family:"Space Grotesk","Inter",sans-serif; font-size:2.65rem; letter-spacing:-.075em; }
.metric-card small { color:var(--muted); }
.metric-grid-secondary .metric-card { min-height:122px; }
.metric-grid-secondary .metric-card strong { font-size:2rem; }
.metrics-toggle-row { margin:0 0 1rem; justify-content:flex-start; }
.compact-btn { min-height:36px; padding:.45rem .75rem; }
.dashboard-grid { gap:1rem; margin-bottom:1rem; }
.panel { padding:1.35rem; background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.015)),var(--panel); }
.panel-header { margin-bottom:1.35rem; }
.panel-header h2 { margin-top:.18rem; font-size:1.42rem; }

.lead-table-wrap { border-color:var(--line); border-radius:10px; }
th,td { border-bottom-color:var(--line); }
th { padding-top:.9rem; color:var(--muted); background:rgba(255,255,255,.025); }
td { color:#edf3f6; }
tr:hover td { background:rgba(217,249,157,.035); }
.pipeline-card,.priority-item { border-color:var(--line); border-radius:10px; background:rgba(255,255,255,.035); }
.pipeline-card { padding:1rem; }
.pipeline-card strong { font-family:"Space Grotesk","Inter",sans-serif; font-size:2.1rem; }
.source-track { height:8px; background:rgba(255,255,255,.09); }
.source-fill { background:linear-gradient(90deg,var(--gold),var(--blue)); }
.priority-item { padding:.95rem; }
.health-pill { border-color:rgba(217,249,157,.34); color:var(--gold); background:rgba(217,249,157,.08); }
.bar span:first-child { background:linear-gradient(180deg,var(--blue),var(--gold)); }
.content-form { max-width:900px; }
.content-form label { gap:.45rem; }
.login-error { color:#ff9b87; }

@media (max-width:1080px) { .sidebar { background:rgba(8,17,31,.94); } .dashboard-shell { margin-left:0; } }
@media (max-width:720px) { .dashboard-shell { padding:1rem; } .dashboard-topbar { padding-top:0; } .metric-card { min-height:125px; } .panel { padding:1rem; } tr { border-color:var(--line); border-radius:10px; background:rgba(255,255,255,.035); } td:first-child { background:rgba(255,255,255,.04); } .source-row { border-color:var(--line); border-radius:10px; background:rgba(255,255,255,.035); } }

/* Small-screen workspace: navigation and controls remain easy to use one-handed. */
@media (max-width: 720px) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }

  .brand {
    padding: 0;
  }

  .brand img {
    width: 106px;
  }

  .sidebar nav {
    display: flex;
    grid-template-columns: none;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.08rem 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar nav a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0.55rem 0.72rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .sidebar nav a::before {
    width: 0.35rem;
    height: 0.35rem;
    margin-right: 0.45rem;
  }

  .dashboard-shell {
    padding: 1.15rem 0.85rem 1.6rem;
  }

  .dashboard-topbar {
    display: grid;
    gap: 1rem;
    min-height: 0;
    padding-bottom: 1.15rem;
  }

  .dashboard-topbar h1 {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .range-control,
  .user-pill {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .range-control select,
  .user-pill,
  .topbar-actions .primary-btn,
  .topbar-actions .ghost-btn {
    min-height: 46px;
  }

  .user-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.8rem;
  }

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

  .metric-card,
  .metric-grid-secondary .metric-card {
    min-height: 126px;
    padding: 1rem;
  }

  .metric-card strong {
    font-size: clamp(2rem, 9vw, 2.55rem);
  }

  .metric-grid-secondary .metric-card strong {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

  .panel-header {
    display: grid;
    gap: 0.8rem;
    align-items: start;
  }

  .panel-header > select,
  .panel-header .health-pill {
    width: 100%;
  }

  .health-pill {
    text-align: center;
  }

  .quick-lead-form {
    gap: 0.6rem;
  }

  .quick-lead-form input,
  .quick-lead-form select,
  .quick-lead-form .primary-btn {
    min-height: 48px;
  }

  .lead-table-wrap {
    margin: 0 -0.15rem;
  }

  .lead-table-wrap tr {
    margin-bottom: 0.75rem;
  }

  td {
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    padding: 0.78rem 0.75rem;
  }

  td:first-child {
    padding-top: 0.9rem;
  }

  .table-input,
  .status-select {
    min-height: 42px;
  }

  .source-row,
  .priority-item,
  .pipeline-card {
    padding: 0.85rem;
  }

  .bars {
    min-height: 155px;
  }
}

@media (max-width: 420px) {
  .sidebar {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .brand img {
    width: 112px;
  }

  .sidebar nav {
    width: 100%;
  }

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

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

  td {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .call-btn {
    right: 0.8rem;
    bottom: calc(0.8rem + env(safe-area-inset-bottom));
  }
}

/* Ocean-inspired art direction: fluid gradients, editorial scale, and soft dimensional surfaces. */
:root {
  --bg: #071526;
  --panel: #102641;
  --panel-strong: #153153;
  --text: #f7fbff;
  --muted: #b3c4d5;
  --line: rgba(220, 238, 252, 0.13);
  --line-strong: rgba(220, 238, 252, 0.25);
  --gold: #77ecff;
  --green: #60d5ff;
  --blue: #8a8cff;
  --red: #ff8264;
  --radius: 20px;
}

body {
  background:
    radial-gradient(circle at 92% 2%, rgba(72, 156, 255, 0.34), transparent 29rem),
    radial-gradient(circle at 3% 96%, rgba(121, 112, 255, 0.22), transparent 32rem),
    radial-gradient(circle at 48% 48%, rgba(13, 76, 135, 0.19), transparent 38rem),
    var(--bg);
}

body::before {
  opacity: 0.38;
  background-image: radial-gradient(rgba(178, 234, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 15%, black, transparent 69%);
}

.login-card {
  border: 1px solid rgba(159, 226, 255, 0.34);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 165, 255, 0.24), transparent 14rem),
    linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.025)),
    rgba(9, 31, 55, 0.88);
  box-shadow: 0 28px 90px rgba(0, 5, 18, 0.44);
}

.login-card::before {
  content: "";
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.35rem;
  border: 1px solid rgba(119, 236, 255, 0.55);
  border-radius: 48% 52% 63% 37% / 45% 43% 57% 55%;
  background: linear-gradient(135deg, rgba(119,236,255,.88), rgba(138,140,255,.62));
  box-shadow: inset 0 0 24px rgba(255,255,255,.36), 0 0 40px rgba(91,184,255,.28);
}

.login-card h1 {
  font-size: clamp(2.55rem, 7vw, 3.75rem);
  letter-spacing: -0.065em;
}

.sidebar {
  border-right-color: rgba(190, 230, 255, 0.12);
  background: linear-gradient(180deg, rgba(8, 26, 47, 0.96), rgba(7, 20, 38, 0.83));
}

.brand {
  padding-bottom: 1.65rem;
}

.sidebar nav a {
  border-radius: 999px;
  padding-left: 1.12rem;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  border-color: rgba(119, 236, 255, 0.18);
  background: linear-gradient(90deg, rgba(68, 169, 255, 0.22), rgba(128, 128, 255, 0.08));
}

.sidebar nav a.active::before {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(119, 236, 255, 0.1), 0 0 16px rgba(119, 236, 255, 0.62);
}

.sidebar-card {
  overflow: hidden;
  border-color: rgba(119, 236, 255, 0.21);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(119, 236, 255, 0.23), transparent 8rem),
    linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.025));
}

.dashboard-topbar {
  position: relative;
  padding-top: 1.15rem;
}

.dashboard-topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.6rem;
  width: min(28vw, 300px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(119, 236, 255, 0.7));
}

.dashboard-topbar h1 {
  font-size: clamp(2.25rem, 3.4vw, 3.7rem);
  letter-spacing: -0.065em;
}

.eyebrow {
  color: var(--gold);
}

.primary-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(105deg, #9cf5ff, #65b4ff 55%, #9a91ff);
  color: #071526;
  box-shadow: 0 10px 26px rgba(70, 161, 255, 0.2);
}

.primary-btn:hover {
  background: linear-gradient(105deg, #c4fbff, #77d0ff 55%, #b6aeff);
  transform: translateY(-2px) scale(1.01);
}

.ghost-btn {
  border-radius: 999px;
  background: rgba(171, 225, 255, 0.055);
}

.ghost-btn:hover {
  border-color: rgba(119, 236, 255, 0.5);
  background: rgba(119, 236, 255, 0.12);
}

.metric-card,
.panel {
  border-color: rgba(190, 230, 255, 0.13);
  background:
    linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.025) 58%),
    rgba(15, 40, 68, 0.83);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 16px 40px rgba(0, 8, 24, 0.12);
}

.metric-card {
  min-height: 158px;
  border-radius: 24px;
}

.metric-card::after {
  width: 9rem;
  height: 9rem;
  right: -3.8rem;
  bottom: -5.8rem;
  background: radial-gradient(circle at 34% 34%, rgba(126, 229, 255, .38), rgba(71, 112, 255, .04) 66%);
}

.metric-card:nth-child(2)::after { background: radial-gradient(circle at 34% 34%, rgba(143, 152, 255, .38), rgba(71, 112, 255, .04) 66%); }
.metric-card:nth-child(3)::after { background: radial-gradient(circle at 34% 34%, rgba(119, 236, 255, .35), rgba(71, 112, 255, .04) 66%); }

.metric-card strong,
.pipeline-card strong {
  font-weight: 600;
}

.panel {
  border-radius: 24px;
}

.panel-header h2 {
  font-size: 1.56rem;
}

.lead-table-wrap,
.pipeline-card,
.priority-item {
  border-color: rgba(190, 230, 255, 0.12);
  border-radius: 16px;
  background: rgba(4, 20, 40, 0.2);
}

.source-fill {
  background: linear-gradient(90deg, #6ddaff, #878dff);
  box-shadow: 0 0 14px rgba(112, 195, 255, 0.38);
}

.health-pill {
  border-color: rgba(119, 236, 255, 0.3);
  color: var(--gold);
  background: rgba(119, 236, 255, 0.08);
}

.bar span:first-child {
  background: linear-gradient(180deg, #82e9ff, #717aff);
  box-shadow: 0 0 16px rgba(103, 198, 255, 0.32);
}

@media (max-width: 720px) {
  .sidebar {
    background: rgba(7, 21, 38, 0.95);
  }

  .sidebar nav a {
    border-radius: 999px;
  }

  .dashboard-topbar::after {
    display: none;
  }

  .metric-card,
  .panel {
    border-radius: 18px;
  }
}

/* Main-site alignment: warm editorial surfaces with ink, lime, and coral accents. */
:root {
  --bg: #f7f7f3;
  --panel: #fffefa;
  --panel-strong: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: rgba(16, 35, 63, 0.14);
  --line-strong: rgba(16, 35, 63, 0.25);
  --cream: #fffefa;
  --gold: #111827;
  --green: #a3e635;
  --red: #ff7757;
  --blue: #111827;
  --radius: 14px;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(163, 230, 53, 0.2), transparent 28rem),
    radial-gradient(circle at 94% 13%, rgba(255, 119, 87, 0.13), transparent 26rem),
    var(--bg);
}

body::before {
  opacity: 1;
  background-image: linear-gradient(rgba(16, 35, 63, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 35, 63, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

.login-card {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(255,255,255,.58)), var(--panel);
  box-shadow: 10px 10px 0 #d9f99d, 0 28px 60px rgba(16, 35, 63, 0.12);
}

.login-card::before { display: none; }
.login-card img,.brand img { filter: brightness(0) saturate(100%) invert(12%) sepia(19%) saturate(1783%) hue-rotate(177deg) brightness(90%) contrast(94%); }
.login-copy,.login-card label,.content-form label { color: var(--muted); }
.login-error { color: #cf4935; }

.eyebrow { color: var(--text); }
.eyebrow::before { background: var(--coral, #ff7757); }

.sidebar {
  border-right-color: var(--line);
  background: rgba(255, 254, 250, 0.9);
  backdrop-filter: blur(18px) saturate(145%);
}

.sidebar nav a { color: var(--muted); }
.sidebar nav a:hover,.sidebar nav a.active { border-color: rgba(16,35,63,.1); color: var(--text); background: rgba(163,230,53,.3); }
.sidebar nav a.active::before { border-color: var(--text); background: var(--text); box-shadow: 0 0 0 4px rgba(163,230,53,.35); }

.sidebar-card {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(163,230,53,.23), rgba(255,255,255,.64));
}

.sidebar-card span,.metric-card span,.chart-head span { color: var(--muted); }
.sidebar-card p { color: var(--muted); }

.dashboard-topbar::after { background: linear-gradient(90deg, transparent, rgba(255,119,87,.72)); }
.dashboard-topbar h1 { color: var(--text); }

.range-control select,select,input,textarea {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--text);
}

.range-control select:focus,select:focus,input:focus,textarea:focus { outline-color: rgba(163,230,53,.38); border-color: var(--text); }
.user-pill { border-color: var(--line); color: var(--muted); background: rgba(255,255,255,.65); }

.primary-btn {
  border: 1px solid #a3e635;
  color: #111827;
  background: #d9f99d;
  box-shadow: none;
}

.primary-btn:hover { border-color: #111827; color: #111827; background: #a3e635; }
.ghost-btn { border-color: var(--line-strong); color: var(--text); background: rgba(255,255,255,.55); }
.ghost-btn:hover { border-color: var(--text); background: var(--text); color: #fffefa; }

.metric-card,.panel {
  border-color: var(--line);
  background: rgba(255,254,250,.78);
  box-shadow: none;
}

.metric-card { border-radius: 14px; }
.metric-card::after { background: rgba(163,230,53,.22); }
.metric-card:nth-child(2)::after { background: rgba(255,119,87,.15); }
.metric-card:nth-child(3)::after { background: rgba(163,230,53,.15); }
.metric-card strong,.pipeline-card strong { color: var(--text); }
.metric-card small { color: var(--muted); }
.panel { border-radius: 14px; }
.panel-header h2 { color: var(--text); }

.lead-table-wrap,.pipeline-card,.priority-item {
  border-color: var(--line);
  background: rgba(255,255,255,.58);
}

th { color: var(--muted); background: rgba(16,35,63,.035); }
td { color: #263244; }
tr:hover td { background: rgba(163,230,53,.11); }

.source-meta,.priority-item span,.priority-item small { color: var(--muted); }
.source-track { background: rgba(16,35,63,.1); }
.source-fill { background: linear-gradient(90deg, #a3e635, #ff7757); box-shadow: none; }
.health-pill { border-color: rgba(163,230,53,.75); color: #3f6212; background: rgba(163,230,53,.2); }
.bar span:first-child { background: linear-gradient(180deg, #ff7757, #a3e635); box-shadow: none; }

@media (max-width: 1080px) {
  .sidebar { background: rgba(255,254,250,.95); }
}

@media (max-width: 720px) {
  .sidebar { background: rgba(255,254,250,.97); box-shadow: 0 10px 24px rgba(16,35,63,.08); }
  .sidebar nav a:hover,.sidebar nav a.active { background: rgba(163,230,53,.3); }
  tr { border-color: var(--line); background: rgba(255,255,255,.58); }
  td:first-child { background: rgba(16,35,63,.035); }
  .source-row { border-color: var(--line); background: rgba(255,255,255,.58); }
}

/* Dashboard navigation refinement. */
.sidebar {
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 35, 63, 0.2) transparent;
}

.brand {
  margin: 0 0 0.55rem;
  border-bottom: 1px solid var(--line);
}

.sidebar-nav-label {
  margin: 0.25rem 0 0.5rem;
  padding: 0 0.75rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar nav {
  gap: 0.45rem;
}

.sidebar nav a {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.sidebar nav a::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  margin-left: auto;
  border-radius: 50%;
  background: transparent;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.sidebar nav a.active {
  font-weight: 800;
}

.sidebar nav a.active::after {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 119, 87, 0.15);
}

@media (max-width: 1080px) {
  .sidebar {
    height: auto;
    overflow: visible;
  }

  .brand {
    margin-bottom: 0;
    border-bottom: 0;
  }

  .sidebar-nav-label {
    display: none;
  }

  .sidebar nav a::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .sidebar {
    left: 0;
    right: 0;
    width: 100%;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .brand {
    display: inline-flex;
    align-items: center;
  }

  .sidebar nav {
    width: 100%;
    gap: 0.4rem;
  }

  .sidebar nav a {
    min-height: 42px;
  }
}
