:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --bg-soft: #eef2f7;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --panel-bright: #eef3f8;
  --line: rgba(40, 60, 82, 0.14);
  --line-strong: rgba(40, 60, 82, 0.26);
  --text: #16232d;
  --muted: #526675;
  --subtle: #7991a0;
  --accent: #0ea692;
  --accent-2: #1f73c4;
  --warning: #9a6200;
  --danger: #c23a4c;
  --success: #15875a;
  --shadow: 0 20px 60px rgba(30, 50, 70, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  text-transform: lowercase;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 6%, rgba(31, 115, 196, 0.08), transparent 28rem),
    radial-gradient(circle at 30% 82%, rgba(14, 166, 146, 0.07), transparent 32rem),
    linear-gradient(145deg, #f6f8fb 0%, #eef2f7 54%, #f6f8fb 100%);
  color: var(--text);
}

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

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent-2);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 255px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(22px);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
}

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

.brand strong {
  font-size: 18px;
  letter-spacing: 0.03em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(84, 242, 194, 0.36);
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 24px rgba(84, 242, 194, 0.1), 0 0 28px rgba(84, 242, 194, 0.09);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(84, 242, 194, 0.18);
  border-radius: 50%;
}

.brand-mark::before {
  width: 28px;
  height: 28px;
}

.brand-mark::after {
  width: 14px;
  height: 14px;
  background: rgba(84, 242, 194, 0.14);
}

.brand-mark span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.brand-mark span:nth-child(1) { transform: translate(13px, -8px); }
.brand-mark span:nth-child(2) { transform: translate(-12px, 5px); }
.brand-mark span:nth-child(3) { transform: translate(5px, 12px); }

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 11px 12px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  transition: 160ms ease;
}

.panel-note {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--subtle);
}

.nav-item span {
  width: 24px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--subtle);
}

.nav-item:hover {
  color: var(--text);
  background: rgba(85, 184, 255, 0.07);
}

.nav-item.active {
  color: #04130e;
  background: linear-gradient(135deg, var(--accent), #70dfff);
  box-shadow: 0 10px 28px rgba(84, 242, 194, 0.17);
}

.nav-item.active span {
  color: rgba(4, 19, 14, 0.58);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 14px;
}

.automation-state {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(234, 240, 246, 0.66);
}

.automation-state strong,
.automation-state small {
  display: block;
}

.automation-state strong {
  font-size: 12px;
}

.automation-state small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 12px rgba(255, 203, 105, 0.7);
  flex: 0 0 auto;
}

.status-dot.success {
  background: var(--success);
  box-shadow: 0 0 12px rgba(114, 239, 182, 0.7);
}

.status-dot.failed {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 123, 140, 0.7);
}

.workspace {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  min-height: 86px;
  padding: 20px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 {
  margin: 3px 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 10px;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.freshness-pill {
  min-width: 150px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(234, 240, 246, 0.72);
}

.freshness-pill span,
.freshness-pill strong {
  display: block;
}

.freshness-pill span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.freshness-pill strong {
  margin-top: 4px;
  font-size: 11px;
}

.primary-button,
.ghost-button,
.icon-button {
  border: 0;
  border-radius: 11px;
  padding: 10px 14px;
  min-height: 44px;
  font-weight: 750;
  font-size: 12px;
  transition: 160ms ease;
}

.primary-button {
  color: #04130e;
  background: linear-gradient(135deg, var(--accent), #70dfff);
  box-shadow: 0 10px 25px rgba(84, 242, 194, 0.15);
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.ghost-button {
  color: var(--text);
  background: rgba(234, 240, 246, 0.8);
  border: 1px solid var(--line);
}

.ghost-button:hover {
  background: var(--panel-bright);
  border-color: var(--line-strong);
}

.ghost-button.full {
  width: 100%;
}

.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 23px;
  color: var(--muted);
  background: transparent;
}

main {
  padding: 30px 34px 60px;
}

.block {
  min-width: 0;
}

/* One page, one scroll: every .block section is always visible, so the
   rhythm between them lives on `main` once, not scattered per-section. */
main {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
  padding: 31px;
  border: 1px solid rgba(14, 166, 146, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(14, 166, 146, 0.1), transparent 45%),
    linear-gradient(145deg, #eaf6f3, #f3f8fb);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(84, 242, 194, 0.09);
  border-radius: 50%;
  right: -170px;
  top: -220px;
  box-shadow: 0 0 0 45px rgba(84, 242, 194, 0.025), 0 0 0 90px rgba(84, 242, 194, 0.017);
}

.hero-panel h2 {
  margin: 8px 0 10px;
  max-width: 720px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-panel p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.hero-status {
  min-width: 160px;
  position: relative;
  z-index: 1;
  text-align: right;
}

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

.hero-status strong {
  margin-top: 13px;
  font-size: 17px;
}

.hero-status small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.provider-badge,
.badge,
.signal,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.provider-badge {
  padding: 7px 10px;
  color: var(--accent);
  border: 1px solid rgba(84, 242, 194, 0.25);
  background: rgba(84, 242, 194, 0.08);
  font-size: 10px;
  text-transform: uppercase;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 17px;
}

.kpi-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.kpi-card .kpi-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 9px;
  font-weight: 800;
}

.kpi-card strong {
  display: block;
  margin-top: 10px;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.kpi-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.grid.two-one {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

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

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

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.panel:not(.table-panel) {
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.panel-heading h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.panel-heading .eyebrow + h3 {
  margin-top: 5px;
}

.chart-panel {
  min-height: 350px;
}

.legend {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 13px;
  height: 3px;
  border-radius: 99px;
}

.legend-property { background: var(--accent); }
.legend-market { background: var(--accent-2); }

.rate-chart {
  min-height: 270px;
  display: grid;
  place-items: center;
}

.rate-chart svg {
  width: 100%;
  height: 270px;
  overflow: visible;
}

.chart-empty {
  text-align: center;
  color: var(--muted);
  max-width: 360px;
  line-height: 1.55;
}

.chart-grid-line {
  stroke: rgba(150, 190, 211, 0.12);
  stroke-width: 1;
}

.chart-label {
  fill: var(--muted);
  font-size: 10px;
}

.chart-property {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(84, 242, 194, 0.35));
}

.chart-market {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 2;
  stroke-dasharray: 7 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot-property { fill: var(--accent); }
.chart-dot-market { fill: var(--accent-2); }

.stack-list {
  display: grid;
  gap: 9px;
}

.action-list {
  display: grid;
  gap: 9px;
}

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

.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.5);
  min-width: 0;
}

.audit-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 4px;
  background: var(--subtle);
}

.audit-item.pass .audit-dot { background: var(--success); }
.audit-item.warn .audit-dot { background: var(--warning); }
.audit-item.fail .audit-dot { background: var(--danger); }

.audit-copy strong {
  display: block;
  font-size: 11.5px;
}

.audit-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.audit-group-label {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.audit-group-label:first-child {
  margin-top: 0;
}

.count-chip.audit-bad {
  color: var(--danger);
  border-color: rgba(194, 58, 76, 0.3);
  background: rgba(194, 58, 76, 0.08);
}

.geo-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 5px;
}

.geo-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
}

.geo-row span {
  color: var(--muted);
}

.geo-row strong {
  text-align: right;
}

.geo-unverified {
  margin-top: 10px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 123, 140, 0.3);
  background: rgba(255, 123, 140, 0.06);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 4px;
  color: var(--subtle);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.site-footer a {
  color: var(--subtle);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-2);
}

.site-footer .footer-dot {
  opacity: 0.4;
}

.stack-list.compact {
  gap: 7px;
}

.stack-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

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

.stack-item strong {
  font-size: 12px;
  line-height: 1.4;
}

.stack-item small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  margin-top: 5px;
}

.stack-item.warning { border-color: rgba(255, 203, 105, 0.28); }
.stack-item.critical { border-color: rgba(255, 123, 140, 0.35); }
.stack-item.success { border-color: rgba(114, 239, 182, 0.26); }

/* Revenue Opportunities: each row reads as a decision, not a news item. */
.action-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.action-copy {
  min-width: 0;
}

.action-copy strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.4;
}

.action-copy span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.action-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(85, 184, 255, 0.1);
  border: 1px solid rgba(85, 184, 255, 0.25);
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.action-tag:hover {
  border-color: var(--accent-2);
}

/* Local news pulse: a title + source row with a save action, matching the
   rest of the Local Intel tab instead of one-off inline styles. */
.news-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.news-item a {
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.4;
}

.news-item .news-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

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

.benchmark-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.benchmark-row strong {
  font-size: 12px;
}

.metric-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.metric-line div {
  padding: 8px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 9px;
}

.metric-line span,
.metric-line b {
  display: block;
}

.metric-line span {
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-line b {
  margin-top: 4px;
  font-size: 12px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin: 2px 0 20px;
}

.section-heading.inline {
  align-items: center;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.section-heading > p {
  max-width: 510px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
  margin: 0;
}

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

.content-card {
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.content-card h3 {
  margin: 7px 0 10px;
  font-size: 17px;
}

.content-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 12px;
}

.content-card .content-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.content-card button {
  padding: 6px 9px;
  font-size: 10px;
}

.table-wrap {
  overflow: auto;
}

.table-wrap.wide {
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th,
td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.96);
}

tbody tr:hover {
  background: rgba(85, 184, 255, 0.035);
}

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

td strong,
td small {
  display: block;
}

td small {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

.bold-groups {
  display: grid;
  gap: 18px;
}

.bold-group h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

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

.bold-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  position: relative;
}

.bold-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.5;
}

.bold-card h4 {
  margin: 0;
  font-size: 13px;
}

.bold-card p {
  margin: 9px 0 14px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 11px;
}

.bold-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
  transition: 150ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(84, 242, 194, 0.55);
  box-shadow: 0 0 0 3px rgba(84, 242, 194, 0.07);
}

textarea {
  resize: vertical;
}

.notice {
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(234, 240, 246, 0.7);
  font-size: 11px;
  line-height: 1.5;
}

.notice.success { border-color: rgba(114, 239, 182, 0.28); color: #bff9df; }
.notice.warning { border-color: rgba(255, 203, 105, 0.3); color: #ffe2a2; }
.notice.failed { border-color: rgba(255, 123, 140, 0.35); color: #ffc1ca; }

.rate-table {
  min-width: 1080px;
}

.badge,
.tag,
.signal {
  padding: 5px 8px;
  font-size: 9px;
}

.badge.peak,
.tag.peak {
  color: #ffd9df;
  background: rgba(255, 123, 140, 0.13);
  border: 1px solid rgba(255, 123, 140, 0.25);
}

.badge.high,
.tag.high {
  color: #ffe7af;
  background: rgba(255, 203, 105, 0.12);
  border: 1px solid rgba(255, 203, 105, 0.24);
}

.badge.watch,
.tag.watch {
  color: #cfeaff;
  background: rgba(85, 184, 255, 0.12);
  border: 1px solid rgba(85, 184, 255, 0.25);
}

.signal.raise {
  color: #b8ffe4;
  background: rgba(84, 242, 194, 0.12);
  border: 1px solid rgba(84, 242, 194, 0.24);
}

.signal.hold {
  color: #cfeaff;
  background: rgba(85, 184, 255, 0.12);
  border: 1px solid rgba(85, 184, 255, 0.24);
}

.signal.soften {
  color: #ffe7af;
  background: rgba(255, 203, 105, 0.12);
  border: 1px solid rgba(255, 203, 105, 0.24);
}

.signal.check {
  color: #ffd9df;
  background: rgba(255, 123, 140, 0.12);
  border: 1px solid rgba(255, 123, 140, 0.24);
}

.rate-up { color: var(--danger); }
.rate-down { color: var(--success); }
.rate-flat { color: var(--muted); }

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

.competitor-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.competitor-card.property {
  border-color: rgba(84, 242, 194, 0.38);
  box-shadow: inset 0 0 45px rgba(84, 242, 194, 0.04);
}

.competitor-card h3 {
  margin: 7px 0 5px;
  font-size: 15px;
}

.competitor-card .address {
  min-height: 34px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.competitor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 14px 0;
}

.competitor-stats div {
  padding: 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
}

.competitor-stats span,
.competitor-stats strong {
  display: block;
}

.competitor-stats span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.competitor-stats strong {
  margin-top: 5px;
  font-size: 12px;
}

.competitor-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
}

.source-list {
  display: grid;
  gap: 8px;
  max-height: 650px;
  overflow: auto;
  padding-right: 3px;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
}

.source-row strong,
.source-row small {
  display: block;
}

.source-row strong {
  font-size: 11px;
}

.source-row small {
  color: var(--muted);
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.4;
}

.source-actions {
  display: flex;
  gap: 6px;
}

.source-actions a,
.source-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--text);
  background: rgba(234, 240, 246, 0.9);
  text-decoration: none;
  font-size: 9px;
  font-weight: 750;
}

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

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

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

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

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

.progress-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}

.progress-card strong,
.progress-card span {
  display: block;
}

.progress-card strong {
  font-size: 23px;
}

.progress-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.progress-track {
  margin-top: 12px;
  height: 5px;
  background: rgba(150, 190, 211, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
}

.plan-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.plan-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.plan-group-header {
  padding: 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(234, 240, 246, 0.72);
}

.plan-group-header h3 {
  margin: 0;
  font-size: 14px;
}

.plan-group-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.task-list {
  display: grid;
}

.task-row {
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.task-row:last-child {
  border-bottom: 0;
}

.task-number {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  font-weight: 800;
}

.task-row strong {
  display: block;
  font-size: 11px;
  line-height: 1.45;
}

.task-row select {
  margin-top: 8px;
  padding: 6px 8px;
  font-size: 9px;
}

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

.open-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
}

.open-item strong {
  font-size: 11px;
  line-height: 1.4;
}

.open-item small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.dialog {
  width: min(590px, calc(100vw - 24px));
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
}

.dialog.wide-dialog {
  width: min(920px, calc(100vw - 24px));
}

.dialog::backdrop {
  background: rgba(0, 6, 10, 0.74);
  backdrop-filter: blur(7px);
}

.dialog-card {
  padding: 23px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.dialog-card > p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.dialog-heading h3 {
  margin: 5px 0 0;
  font-size: 22px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 16px 0;
}

.settings-grid div {
  padding: 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}

.settings-grid span,
.settings-grid strong {
  display: block;
}

.settings-grid span {
  color: var(--muted);
  font-size: 9px;
}

.settings-grid strong {
  margin-top: 5px;
  font-size: 12px;
}

.dialog-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

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

.offer-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.offer-card h4 {
  margin: 0;
  font-size: 12px;
}

.offer-card .offer-price {
  margin-top: 9px;
  font-size: 22px;
  font-weight: 850;
}

.offer-card .offer-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 11px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 180ms ease;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(255, 123, 140, 0.4);
}

.loading {
  opacity: 0.55;
  pointer-events: none;
}

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

  .grid.three,
  .bold-grid,
  .competitor-grid,
  .plan-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    padding: 13px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    display: none;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 3px;
  }

  .nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .nav-item span {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    grid-column: auto;
  }

  .topbar {
    position: static;
    padding: 16px 20px;
  }

  main {
    padding: 22px 20px 50px;
  }

  .grid.two-one,
  .grid.two,
  .grid.three,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .reverse-mobile > :first-child {
    order: 2;
  }

  .reverse-mobile > :last-child {
    order: 1;
  }
}

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

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .freshness-pill {
    grid-column: span 2;
  }

  .hero-panel,
  .section-heading,
  .section-heading.inline {
    display: block;
  }

  .hero-status {
    text-align: left;
    margin-top: 22px;
  }

  .section-heading > p {
    text-align: left;
    margin-top: 10px;
  }

  .control-row {
    margin-top: 14px;
    align-items: stretch;
    flex-direction: column;
  }

  .kpi-grid,
  .progress-overview,
  .grid.three,
  .bold-grid,
  .competitor-grid,
  .plan-groups,
  .open-items,
  .offer-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .form-grid.two-cols,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

  .hero-panel h2 {
    font-size: 33px;
  }

  .topbar h1 {
    font-size: 18px;
  }
}
