@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --font-sans: "Manrope", "Helvetica Neue", sans-serif;
  --font-display: "Space Grotesk", "Manrope", sans-serif;
  --bg: #f7f4ef;
  --card: #ffffff;
  --card-muted: #f3f1ed;
  --border: rgba(15, 23, 42, 0.1);
  --text: #1f2430;
  --text-muted: #5d6270;
  --accent: #ff4d5e;
  --accent-alt: #2dd4bf;
  --accent-soft: rgba(255, 77, 94, 0.16);
  --success: #1fb981;
  --warning: #f3a531;
  --danger: #e45561;
  --info: #3b7bf5;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 26px 70px rgba(15, 23, 42, 0.12);
  --radius-lg: 20px;
  --radius-xl: 28px;
  --sp-bg: #faf9f7;
  --sp-surface: #ffffff;
  --sp-border: #e5e7eb;
  --sp-text: #0f172a;
  --sp-muted: #475569;
  --sp-subtle: #94a3b8;
  --sp-primary: #ff4d5e;
  --sp-radius: 12px;
  --sp-radius-lg: 16px;
  --sp-shadow-1: 0 1px 2px rgba(15, 23, 42, 0.06);
  --sp-shadow-2: 0 6px 16px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  font-family: var(--font-sans);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--sp-bg);
  color: var(--sp-text);
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.62;
}

h1,
h2,
h3,
.brand-text h1,
.landing-hero-copy h2,
.hero-copy h2,
.section-copy h2,
.landing-card-value,
.card-main-value,
.metric-tile strong {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 6px;
}

body.auth-open {
  overflow: hidden;
}

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

*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 77, 94, 0.25);
}

::selection {
  background: rgba(255, 77, 94, 0.2);
}

.landing-shell {
  max-width: 1240px;
  width: 100%;
  margin: 26px auto 42px;
  padding: 0 32px 32px;
  position: relative;
  overflow: hidden;
  animation: floatIn 0.5s ease;
}

.landing-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0);
  opacity: 0.6;
  pointer-events: none;
}

.landing-orb.orb-one {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 77, 94, 0.35), rgba(255, 77, 94, 0));
  top: -60px;
  right: -30px;
}

.landing-orb.orb-two {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, rgba(45, 212, 191, 0.3), rgba(45, 212, 191, 0));
  bottom: 80px;
  left: -120px;
}

.landing-orb {
  display: none;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-xl);
  padding: 18px 22px;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

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

.landing-main {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 26px;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  background: linear-gradient(135deg, rgba(255, 77, 94, 0.14), rgba(255, 255, 255, 0.85));
  border: 1px solid rgba(255, 77, 94, 0.18);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(45, 212, 191, 0.08));
  pointer-events: none;
}

.landing-hero-copy,
.landing-hero-visual {
  position: relative;
  z-index: 1;
}

.landing-hero-copy h2 {
  margin: 0 0 10px;
  font-size: 2.35rem;
  letter-spacing: -0.02em;
}

.landing-hero-copy .sub {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.landing-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-pill {
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 77, 94, 0.22);
  background: rgba(255, 77, 94, 0.1);
  font-weight: 600;
  font-size: 0.88rem;
}

.landing-hero-visual {
  display: grid;
  gap: 12px;
}

.landing-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.landing-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.landing-card.highlight {
  background: linear-gradient(140deg, rgba(255, 77, 94, 0.22), rgba(255, 255, 255, 0.92));
  border-color: rgba(255, 77, 94, 0.32);
}

.landing-card-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.landing-card-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.landing-card-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.landing-mini-list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.landing-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(6px);
}

.landing-section.alt {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(255, 255, 255, 0.95));
}

.landing-section-header h2 {
  margin: 0 0 6px;
  font-size: 1.7rem;
}

.landing-section-header .sub {
  margin: 0;
  color: var(--text-muted);
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.landing-feature {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-feature h3 {
  margin: 0;
  font-size: 1.1rem;
}

.landing-feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.landing-feature-tag {
  align-self: flex-start;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 94, 0.28);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.landing-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 16px;
}

.landing-step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.landing-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.landing-step-index {
  font-weight: 800;
  color: var(--accent);
  font-size: 1rem;
  background: rgba(255, 77, 94, 0.14);
  border-radius: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 77, 94, 0.2);
}

.landing-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 77, 94, 0.22);
  background: linear-gradient(135deg, rgba(255, 77, 94, 0.2), rgba(255, 255, 255, 0.95));
  padding: 20px;
}

.landing-cta-box h3 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.landing-cta-box .sub {
  margin: 0;
  color: var(--text-muted);
}

.app-shell {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 16px 24px 32px;
  animation: floatIn 0.5s ease;
}

@media (min-width: 1024px) {
  .app-shell {
    padding-left: 96px;
    padding-right: 32px;
  }
}

/* Sidebar navigation */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 72px;
  background: var(--sp-surface);
  border-right: 1px solid var(--sp-border);
  display: none;
  flex-direction: column;
  padding: 18px 10px;
  gap: 14px;
  z-index: 1100;
  transition: width 0.2s ease;
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
  }
}

.sidebar:hover {
  width: 220px;
}

.sidebar-top,
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sidebar-item {
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sp-subtle);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.sidebar-item.active,
.sidebar-item:hover {
  background: rgba(255, 77, 94, 0.12);
  color: var(--sp-primary);
}

.sidebar-brand {
  background: rgba(15, 23, 42, 0.04);
  color: var(--sp-text);
}

.sidebar-logo {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: #fff;
  padding: 4px;
  color: var(--sp-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  overflow: hidden;
  box-shadow: var(--sp-shadow-1);
  border: none;
}

.sidebar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
  display: block;
}

.sidebar-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.sidebar-label,
.sidebar-badge {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.16s ease, width 0.16s ease;
}

.sidebar:hover .sidebar-label,
.sidebar:hover .sidebar-badge {
  opacity: 1;
  width: auto;
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--sp-subtle);
  border: 1px solid var(--sp-border);
}

.sidebar-item.active .sidebar-badge {
  color: var(--sp-primary);
  border-color: rgba(255, 77, 94, 0.3);
  background: rgba(255, 77, 94, 0.12);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-xl);
  padding: 22px 22px;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(10px);
}

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

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(255, 77, 94, 0.18), rgba(45, 212, 191, 0.18));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--border);
  overflow: hidden;
}

.brand-mark {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.user-pill {
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.user-pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(28, 156, 107, 0.18);
}

.pill-action {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 600;
}

.pill-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin: 22px 0 14px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.tab-button {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 0.98rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease-out;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.tab-button span.badge {
  font-size: 0.8rem;
  padding: 4px 9px;
  border-radius: 10px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tab-button.active {
  background: linear-gradient(120deg, rgba(255, 77, 94, 0.14), #fff);
  color: var(--text);
  border-color: rgba(255, 77, 94, 0.36);
  box-shadow: 0 14px 26px rgba(255, 77, 94, 0.18);
}

.tab-button:not(.active):hover {
  color: var(--text);
  transform: translateY(-2px);
}

.tabs {
  display: none;
}

/* Call-to-actions */
.cta-bar {
  display: flex;
  gap: 12px;
  padding: 8px 4px 10px;
  flex-wrap: wrap;
}

.cta-btn {
  border: none;
  cursor: pointer;
  border-radius: 14px;
  font-size: 1rem;
  padding: 14px 20px;
  font-weight: 700;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.cta-btn.primary {
  background: linear-gradient(180deg, #ff6a7a 0%, #ff4d5e 60%, #e12e4f 100%);
  color: #fff;
  box-shadow: 0 10px 0 rgba(180, 25, 65, 0.28), 0 18px 30px rgba(255, 77, 94, 0.35);
}

.cta-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 0 rgba(180, 25, 65, 0.32), 0 20px 34px rgba(255, 77, 94, 0.4);
  filter: saturate(1.05);
}

.cta-btn.ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 8px 0 rgba(200, 200, 200, 0.45), 0 14px 22px rgba(15, 23, 42, 0.06);
}

.cta-btn.ghost.danger {
  color: #b11c2f;
  border: 1px solid rgba(227, 82, 92, 0.45);
  box-shadow: 0 8px 0 rgba(227, 82, 92, 0.18), 0 14px 22px rgba(227, 82, 92, 0.2);
}

.cta-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.cta-btn.ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 rgba(200, 200, 200, 0.65), 0 16px 26px rgba(0, 0, 0, 0.08);
}

.cta-btn.ghost.danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 rgba(227, 82, 92, 0.24), 0 16px 26px rgba(227, 82, 92, 0.26);
}

.cta-btn.small {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sync-status {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  margin-top: 8px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sync-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sync-progress-bar {
  height: 8px;
  background: var(--card-muted);
  border-radius: 999px;
  overflow: hidden;
}

.sync-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(120deg, #ff9aae 0%, #ff4d5e 100%);
  transition: width 0.3s ease;
}

.sync-status-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.period-control {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.period-control select {
  min-width: 160px;
}

.period-toggle {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.period-summary {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.charts-section {
  margin-top: 18px;
}

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

.chart-stack {
  display: grid;
  gap: 18px;
}

.chart-card {
  background: var(--card);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.chart-card h3 {
  margin: 0;
  font-size: 1rem;
}

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

canvas {
  max-width: 100%;
}

.chart-legend {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.chart-legend .legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-muted);
}

.chart-legend .past::before,
.chart-legend .future::before,
.chart-legend .target::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

.chart-legend .past::before {
  background: rgba(36, 35, 35, 0.18);
}

.chart-legend .future::before {
  background: rgba(255, 77, 94, 0.45);
}

.chart-legend .target::before {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: rgba(31, 185, 129, 0.75);
  box-shadow: 0 0 0 1px rgba(31, 185, 129, 0.2);
  border: 1px dashed rgba(31, 185, 129, 0.75);
}

.chart-filter-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.chart-filter-summary .metric-chip {
  background: #fff;
}

.chart-filter-summary .cta-btn {
  margin-left: auto;
}

.chart-filters {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--sp-border);
  background: var(--sp-surface);
  box-shadow: var(--sp-shadow-1);
  margin-bottom: 10px;
}

.chart-filters .filter-group {
  min-width: 240px;
}

.chart-filters select {
  min-width: 240px;
}

.chart-switch {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 14px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  position: sticky;
  top: 96px;
  z-index: 40;
  align-self: flex-start;
  overflow-x: auto;
}

.chart-grid.chart-grid-single {
  grid-template-columns: 1fr;
}

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

.chart-panel {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chart-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-charts .chart-panel {
  display: block;
  opacity: 1;
  transform: none;
}

.chart-overlay {
  position: absolute;
  inset: 52px 12px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  padding: 16px;
}

.chart-panel.is-loading .chart-overlay-loading {
  display: flex;
}

.chart-panel.is-error .chart-overlay-message,
.chart-panel.is-empty .chart-overlay-message {
  display: flex;
}

.chart-panel.is-loading canvas {
  opacity: 0.35;
}

.chart-skeleton {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-message-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.chart-highlight {
  box-shadow: 0 0 0 3px rgba(255, 77, 94, 0.25);
  border-radius: var(--radius-lg);
}

.chart-tooltip {
  position: absolute;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 5;
  left: 50%;
  top: 10px;
}

/* Overview redesign */
#tab-overview {
  flex-direction: column;
  gap: 22px;
  color: var(--sp-text);
}

#tab-overview.tab-panel.active {
  display: flex;
}

.overview-diagnostic {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--sp-radius-lg);
  border: 1px solid var(--sp-border);
  background: var(--sp-surface);
  box-shadow: var(--sp-shadow-1);
  overflow: visible;
}

.overview-diagnostic-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.overview-diagnostic-copy h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.overview-diagnostic-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-pill {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 77, 94, 0.12);
  border: 1px solid rgba(255, 77, 94, 0.3);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}

.overview-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.overview-diagnostic-grid .diagnostic-metric {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: visible;
}

.overview-diagnostic-grid .diagnostic-metric h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--sp-muted);
}

.overview-diagnostic-grid .diagnostic-metric strong {
  font-size: 1.6rem;
}

.overview-diagnostic-grid .status-pill {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.overview-diagnostic-grid .status-ok .status-pill {
  color: var(--success);
  border-color: rgba(31, 206, 132, 0.4);
  background: rgba(31, 206, 132, 0.12);
}

.overview-diagnostic-grid .status-alert .status-pill {
  color: var(--warning);
  border-color: rgba(243, 165, 49, 0.4);
  background: rgba(243, 165, 49, 0.12);
}

.overview-diagnostic-grid .status-critical .status-pill {
  color: var(--danger);
  border-color: rgba(228, 85, 97, 0.4);
  background: rgba(228, 85, 97, 0.12);
}

.overview-trend {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.overview-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.overview-charts-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  min-height: 0;
}

.overview-platforms .ratings-sources {
  margin-top: 10px;
  flex: 1;
}

.overview-platforms .ratings-sources-chart {
  min-height: 0;
  height: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
}

.overview-trend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.overview-trend,
.overview-platforms {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.overview-platforms {
  padding: 16px;
  border-radius: var(--sp-radius-lg);
  border: 1px solid var(--sp-border);
  background: var(--sp-surface);
  box-shadow: var(--sp-shadow-1);
}

.overview-trend .chart-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.overview-trend .chart-card canvas {
  flex: 1;
  width: 100%;
  height: 260px;
  display: block;
}

.chart-legend {
  margin-top: 8px;
}

.chart-card .chart-legend {
  margin-top: 10px;
}

.overview-platforms .ratings-sources {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.overview-platforms .ratings-sources-chart {
  min-height: 0;
  flex: 1;
  padding: 0;
  min-height: 220px;
}

.overview-rating {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 16px;
  border-radius: var(--sp-radius-lg);
  border: 1px solid var(--sp-border);
  background: var(--sp-surface);
  box-shadow: var(--sp-shadow-1);
}

.overview-rating-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.overview-rating-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--sp-text);
}

.overview-rating-score span {
  font-size: 1rem;
  color: var(--sp-muted);
  font-weight: 600;
}

.overview-rating-stars {
  display: inline-flex;
  gap: 6px;
}

.overview-rating-stars .star {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.overview-rating-stars .star::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.24);
}

.overview-rating-stars .star.filled::before {
  color: #f5b401;
}

.overview-rating-stars .star.half::before {
  background: linear-gradient(90deg, #f5b401 50%, rgba(15, 23, 42, 0.24) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.overview-rating-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--sp-muted);
}

.overview-secondary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px;
  border-radius: var(--sp-radius-lg);
  border: 1px solid var(--sp-border);
  background: var(--sp-surface);
  box-shadow: var(--sp-shadow-1);
}

.overview-secondary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.overview-secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.secondary-metric {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.secondary-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--sp-border);
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.secondary-chip strong {
  font-weight: 700;
  color: var(--sp-text);
}

.overview-kpi-strip {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  padding: 16px;
  box-shadow: var(--sp-shadow-1);
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.overview-kpi-strip .card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: auto;
}

#tab-overview .card::after {
  display: none;
}

.overview-kpi-strip .card h2 {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sp-subtle);
  margin-bottom: 6px;
}

.overview-kpi-strip .card-main-value {
  font-size: 1.4rem;
  color: var(--sp-text);
}

.overview-kpi-strip .card-sub {
  color: var(--sp-subtle);
  font-size: 0.82rem;
}

.overview-kpi-strip .card-cta {
  color: var(--sp-primary);
}

.overview-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overview-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overview-block-copy h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.overview-block-copy p {
  margin: 0;
  color: var(--sp-muted);
  font-size: 0.95rem;
}

.overview-chart-card {
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow-1);
}

#tab-overview .chart-card {
  background: var(--sp-surface);
}

.chart-legend-compact {
  font-size: 0.82rem;
}

#tab-overview .section-header {
  margin: 6px 0 8px;
}

#tab-overview .section-copy p {
  color: var(--sp-muted);
}

#tab-overview .section-tag {
  background: #fff;
  border: 1px solid var(--sp-border);
  color: var(--sp-subtle);
}

#tab-overview .action-card {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  box-shadow: var(--sp-shadow-1);
}

#tab-overview .action-card .sub {
  color: var(--sp-muted);
}

#tab-overview .card.actionable {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  box-shadow: var(--sp-shadow-1);
}

#tab-overview .card.actionable:hover {
  transform: translateY(-1px);
  box-shadow: var(--sp-shadow-2);
}

#tab-overview .cta-btn.primary {
  background: var(--sp-primary);
  box-shadow: var(--sp-shadow-1);
}

#tab-overview .cta-btn.ghost {
  border: 1px solid var(--sp-border);
  box-shadow: none;
}

/* Auth */
.auth-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(22, 21, 21, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1200;
}

.auth-overlay.open {
  display: flex;
  animation: fadeInUp 0.2s ease;
}

.auth-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: var(--shadow-strong);
  padding: 18px 20px;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-card-header h3 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.auth-close {
  border: 1px solid var(--border);
  background: var(--card-muted);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.auth-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--card-muted);
  border-radius: 12px;
  padding: 4px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-muted);
}

.auth-tab.active {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group input,
.form-group textarea {
  background: var(--card-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.96rem;
}

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

.input-with-toggle input {
  width: 100%;
  padding-right: 78px;
}

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-muted);
}

.toggle-visibility:hover {
  color: var(--text);
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.auth-error {
  color: var(--danger);
  font-size: 0.9rem;
  min-height: 18px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(22, 21, 21, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1200;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: var(--shadow-strong);
  padding: 18px;
  width: min(900px, 96vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stays-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.hidden {
  display: none !important;
}
.overview-only.is-hidden {
  display: none !important;
}
.content {
  background: transparent;
  border-radius: 0;
  border: none;
  padding: 0;
  box-shadow: none;
}

.tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tab-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.28s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dashboard cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.card-grid.wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: linear-gradient(145deg, var(--card), #fffdf9);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px 14px 12px;
  position: relative;
  overflow: visible;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 77, 94, 0.12), transparent 60%);
  pointer-events: none;
}

.card.focus {
  min-height: 150px;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h2 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.card-main-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.card-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.card-dual-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: flex-start;
}
.card-dual-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: flex-start;
}

/* Sections */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 12px 0 16px;
}

.section-spaced {
  margin-top: 22px;
}

.section-copy h2 {
  margin: 0;
  font-size: 1.14rem;
}

.section-copy p {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.section-tag {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.performance-advanced {
  margin-top: -4px;
}

.admin-toolbar {
  align-items: flex-end;
}

.admin-login-panel {
  margin-bottom: 18px;
}

.admin-login-card {
  max-width: 520px;
}

.admin-login-form {
  margin-top: 12px;
}

.admin-login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.admin-login-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.filter-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.filter-stack label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--text);
}

.range-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.range-custom input,
.range-custom select {
  min-width: 90px;
}

.range-custom.is-disabled {
  opacity: 0.5;
}

.range-custom.is-disabled input,
.range-custom.is-disabled select {
  background: var(--card-muted);
  color: var(--text-muted);
  cursor: not-allowed;
}

.range-label {
  margin-left: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.filter-grow {
  flex: 1;
}

select,
input[type="search"],
input[type="number"],
input[type="date"],
input[type="text"],
input[type="password"] {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  min-width: 180px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

select:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(255, 77, 94, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 77, 94, 0.18);
  background: #fff;
}

.chip-toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-toggle {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 12px 16px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease-out;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.chip-toggle.active {
  background: rgba(255, 77, 94, 0.16);
  border-color: rgba(255, 77, 94, 0.5);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(255, 77, 94, 0.2);
}

/* Tables */
.table-wrapper {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.table-scroll {
  overflow-x: auto;
}

.table-wide {
  min-width: 980px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

thead {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--card-muted));
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.86rem;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

.sort-indicator {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 6px;
}

th.sortable.active .sort-indicator {
  color: var(--text);
}

td {
  font-size: 1rem;
}

.col-hidden {
  display: none;
}

tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.01);
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: rgba(255, 77, 94, 0.06);
}

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

.badge-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-status.dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.status-high {
  color: var(--danger);
  background: rgba(227, 82, 92, 0.1);
  border-color: rgba(227, 82, 92, 0.4);
}

.status-medium {
  color: var(--warning);
  background: rgba(232, 155, 45, 0.1);
  border-color: rgba(232, 155, 45, 0.4);
}

.status-low {
  color: var(--success);
  background: rgba(28, 156, 107, 0.12);
  border-color: rgba(28, 156, 107, 0.5);
}

.status-info {
  color: var(--info);
  background: rgba(59, 111, 200, 0.12);
  border-color: rgba(59, 111, 200, 0.5);
}

.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-left: 8px;
  background: rgba(59, 111, 200, 0.12);
  color: var(--info);
  border: 1px solid rgba(59, 111, 200, 0.5);
}

.pill-host {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.metric-chip strong {
  color: var(--text);
  font-weight: 700;
}

.chip-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.ratings-panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 16px;
}

.ratings-filters {
  margin-bottom: 8px;
}

.ratings-hero {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.ratings-avg-chart {
  display: grid;
  gap: 10px;
}

.ratings-avg-row {
  display: grid;
  grid-template-columns: minmax(90px, 120px) 1fr 42px;
  align-items: center;
  gap: 10px;
}

.ratings-avg-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ratings-avg-bar {
  height: 8px;
  background: var(--card-muted);
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.ratings-avg-fill {
  height: 100%;
  width: calc(var(--value, 0) * 100%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 77, 94, 0.9), rgba(255, 77, 94, 0.45));
}

.ratings-avg-fill.avg-overall {
  background: linear-gradient(90deg, #111827, rgba(17, 24, 39, 0.4));
}

.ratings-avg-fill.avg-airbnb {
  background: linear-gradient(90deg, #ff4d5e, rgba(255, 77, 94, 0.4));
}

.ratings-avg-fill.avg-booking {
  background: linear-gradient(90deg, #f7b731, rgba(247, 183, 49, 0.4));
}

.ratings-avg-fill.avg-others {
  background: linear-gradient(90deg, #5f6ae6, rgba(95, 106, 230, 0.4));
}

.ratings-avg-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  text-align: right;
}

.ratings-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.ratings-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ratings-breakdown .metric-chip {
  font-size: 0.8rem;
  padding: 5px 10px;
}

.ratings-sources {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.ratings-sources-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ratings-sources-chart {
  width: 100%;
  background: var(--card-muted);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 8px;
  padding: 16px;
  min-height: 180px;
}

.ratings-sources-chart[data-chart="pie"] {
  display: grid;
  place-items: center;
}

.source-pie-layout {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(140px, 1fr);
  gap: 18px;
  align-items: center;
  width: 100%;
}

.source-pie {
  --size: 160px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(from -90deg, var(--segments, var(--accent, #ff4d5e)));
  position: relative;
  box-shadow: inset 0 0 0 10px var(--card-muted);
}

.source-pie::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: var(--card-muted);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.source-pie-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.source-pie-center span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.source-pie-center small {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.source-pie-legend {
  display: grid;
  gap: 10px;
}

.source-pie-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
}

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

.source-pie-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.source-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(80px, 1fr);
  gap: 16px;
  align-items: end;
  height: 140px;
  overflow-x: auto;
}

.source-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.source-bar {
  width: 100%;
  min-height: 10px;
  height: calc(var(--value, 0) * 1%);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 106, 122, 0.9), rgba(255, 77, 94, 0.75));
  box-shadow: 0 10px 18px rgba(255, 77, 94, 0.18);
  position: relative;
  transform: translateY(0);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.source-bar-group:hover .source-bar {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 28px rgba(255, 77, 94, 0.28);
  filter: saturate(1.05);
}

.source-bar-value {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.source-bar-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 110px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-bar-tooltip {
  position: absolute;
  top: -8px;
  transform: translateY(-100%);
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.source-bar-group:hover .source-bar-tooltip {
  opacity: 1;
  transform: translateY(-110%);
}

.source-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.ratings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
}

.muted-box {
  font-size: 0.98rem;
  color: var(--text-muted);
  background: var(--card-muted);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  padding: 14px 16px;
  margin-top: 14px;
}

.muted-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.muted-box li {
  margin-bottom: 6px;
}

.muted-inline {
  margin-top: 10px;
}

.badge-kpi {
  font-size: 0.78rem;
  padding: 4px 9px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-kpi strong {
  color: var(--accent);
}

@media (max-width: 820px) {
  .landing-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-hero {
    grid-template-columns: 1fr;
  }

  .landing-cta-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  th,
  td {
    padding: 8px 10px;
  }

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

  .cta-bar {
    flex-direction: column;
  }

  .chart-filter-summary {
    align-items: flex-start;
  }

  .chart-filter-summary .cta-btn {
    width: 100%;
    margin-left: 0;
  }

  .chart-switch {
    width: 100%;
  }

  .source-pie-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .source-pie-legend {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .overview-visuals {
    grid-template-columns: 1fr;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body:not(.light-mode) {
    --sp-bg: #0f1115;
    --sp-surface: #151923;
    --sp-border: rgba(148, 163, 184, 0.2);
    --sp-text: #f1f5f9;
    --sp-muted: #cbd5f5;
    --sp-subtle: #94a3b8;
    --sp-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --sp-shadow-2: 0 12px 28px rgba(0, 0, 0, 0.4);
  }

  body:not(.light-mode) .summary-pill {
    background: rgba(255, 77, 94, 0.2);
  }

  body:not(.light-mode) .overview-diagnostic-grid .diagnostic-metric,
  body:not(.light-mode) .secondary-metric,
  body:not(.light-mode) .ratings-sources-chart {
    background: rgba(15, 17, 21, 0.6);
  }

  body:not(.light-mode) .chart-legend .legend {
    color: var(--sp-subtle);
  }
}

body.dark-mode {
  --sp-bg: #0f1115;
  --sp-surface: #151923;
  --sp-border: rgba(148, 163, 184, 0.2);
  --sp-text: #f1f5f9;
  --sp-muted: #cbd5f5;
  --sp-subtle: #94a3b8;
  --sp-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --sp-shadow-2: 0 12px 28px rgba(0, 0, 0, 0.4);
}

body.dark-mode .summary-pill {
  background: rgba(255, 77, 94, 0.2);
}

body.dark-mode .overview-diagnostic-grid .diagnostic-metric,
body.dark-mode .secondary-metric,
body.dark-mode .ratings-sources-chart {
  background: rgba(15, 17, 21, 0.6);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.16), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-strong);
}

.hero-copy .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.hero-copy h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.hero-copy .sub {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 1rem;
}

.hero-summary {
  margin-top: 12px;
  color: var(--text-muted);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.metric-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.metric-tile span {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.metric-tile strong {
  font-size: 1.6rem;
  color: var(--text);
}

.metric-tile.dual .metric-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
}

.metric-pair-item strong {
  font-size: 1.3rem;
}

.metric-pair-item small {
  color: var(--text-muted);
  font-weight: 600;
}

.metric-tile.dual .metric-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
}

.metric-pair-item strong {
  font-size: 1.3rem;
}

.metric-pair-item small {
  color: var(--text-muted);
  font-weight: 600;
}

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

@media (max-width: 1040px) {
  .landing-shell {
    margin-top: 18px;
  }
}

/* Checklist */
.checklist-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: linear-gradient(135deg, #ff7286 0%, #ff4d5e 55%, #d7264a 100%);
  color: #fff;
  border: 1px solid rgba(255, 77, 94, 0.35);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  box-shadow: 0 12px 28px rgba(255, 77, 94, 0.32), 0 4px 0 rgba(180, 25, 65, 0.38);
  cursor: pointer;
  z-index: 1100;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.2s ease;
}

.checklist-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 77, 94, 0.36), 0 6px 0 rgba(180, 25, 65, 0.42);
}

.checklist-fab:active {
  transform: translateY(0);
}

.checklist-fab.completed {
  background: linear-gradient(135deg, #1fce84, #12a05f);
  border-color: rgba(31, 206, 132, 0.5);
  box-shadow: 0 12px 28px rgba(31, 206, 132, 0.32), 0 4px 0 rgba(18, 160, 95, 0.38);
}

.checklist-fab-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}

.checklist-fab-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.checklist-fab-text small {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.checklist-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(22, 21, 21, 0.45);
  backdrop-filter: blur(8px);
  padding: 18px;
  z-index: 1000;
}

.checklist-overlay.open {
  display: flex;
  animation: fadeInUp 0.22s ease;
}

body.checklist-open {
  overflow: hidden;
}

.checklist-panel {
  width: min(1100px, 96vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: var(--shadow-strong);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checklist-header h3 {
  margin: 2px 0 4px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.checklist-header .sub {
  margin: 0;
  color: var(--text-muted);
}

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

.checklist-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.checklist-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.checklist-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.checklist-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.checklist-tab.active .checklist-tab-count {
  color: var(--text);
}

.checklist-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.checklist-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 2px;
}

.checklist-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.checklist-section-title span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--card-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}

.checklist-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.checklist-item {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}

.checklist-item:hover {
  border-color: rgba(255, 77, 94, 0.38);
  box-shadow: 0 12px 26px rgba(255, 77, 94, 0.1);
  transform: translateY(-2px);
}

.checklist-item.readonly {
  cursor: default;
}

.checklist-item.readonly:hover {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

.checklist-item.done {
  background: linear-gradient(135deg, rgba(31, 206, 132, 0.08), #fff);
  border-color: rgba(31, 206, 132, 0.45);
  box-shadow: 0 10px 20px rgba(31, 206, 132, 0.14);
}

.checklist-checkbox {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--text-muted);
  background: #fff;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.checklist-checkbox.readonly {
  background: var(--card-muted);
  color: var(--text-muted);
}

.checklist-item.done .checklist-checkbox {
  background: linear-gradient(135deg, #1fce84, #12a05f);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 16px rgba(31, 206, 132, 0.28);
}

.checklist-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-copy strong {
  font-size: 1.02rem;
}

.checklist-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.checklist-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-muted);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.checklist-tag.review {
  border-color: rgba(255, 86, 74, 0.4);
  background: rgba(255, 86, 74, 0.1);
  color: #c23328;
}

.checklist-tag.gap {
  border-color: rgba(26, 140, 255, 0.35);
  background: rgba(26, 140, 255, 0.08);
  color: #1b5faa;
}

.checklist-tag.vacancy {
  border-color: rgba(255, 186, 73, 0.5);
  background: rgba(255, 186, 73, 0.15);
  color: #9b5b00;
}

@media (max-width: 720px) {
  .checklist-panel {
    max-height: calc(100vh - 40px);
    width: 100%;
  }

  .checklist-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .checklist-header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Sticky tabs (dashboard) */
.app-shell .tabs {
  position: sticky;
  top: 16px;
  z-index: 90;
  background: rgba(247, 244, 239, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.tab-button.active span.badge {
  background: rgba(255, 77, 94, 0.16);
  border-color: rgba(255, 77, 94, 0.4);
  color: var(--text);
}

/* Onboarding */
.onboarding-card {
  margin: 18px 0 22px;
  padding: 18px 20px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 77, 94, 0.18);
  background: linear-gradient(140deg, rgba(255, 77, 94, 0.1), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.onboarding-header h2 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.onboarding-header .sub {
  margin: 0;
  color: var(--text-muted);
}

.onboarding-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.onboarding-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--card-muted);
  overflow: hidden;
  border: 1px solid var(--border);
}

.onboarding-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 77, 94, 0.9), rgba(255, 77, 94, 0.35));
  transition: width 0.3s ease;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.onboarding-step {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 12px 14px;
}

.onboarding-step-index {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 77, 94, 0.12);
  color: var(--accent);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.onboarding-step-copy strong {
  display: block;
  font-size: 1rem;
}

.onboarding-step-copy p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.onboarding-step.done {
  border-color: rgba(31, 206, 132, 0.45);
  background: linear-gradient(135deg, rgba(31, 206, 132, 0.08), #fff);
}

.onboarding-step.done .onboarding-step-index {
  background: rgba(31, 206, 132, 0.2);
  color: var(--success);
}

/* Action card */
.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 77, 94, 0.2);
  background: linear-gradient(135deg, rgba(255, 77, 94, 0.12), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
  overflow: visible;
}

.action-card h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.action-card .sub {
  margin: 0;
  color: var(--text-muted);
}

.card.actionable {
  cursor: pointer;
  border-color: rgba(255, 77, 94, 0.2);
}

.card.actionable:hover {
  border-color: rgba(255, 77, 94, 0.4);
  box-shadow: 0 22px 46px rgba(255, 77, 94, 0.16);
}

.card.actionable:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 77, 94, 0.25);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

/* Presets */
.preset-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 4px 2px;
}

.preset-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.preset-pill {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.preset-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.preset-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 77, 94, 0.25);
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
  display: none;
  gap: 6px;
  z-index: 1100;
  backdrop-filter: blur(10px);
}

@media (max-width: 1023px) {
  .bottom-nav {
    display: flex;
  }

  .app-shell {
    padding-bottom: 110px;
  }

  .checklist-fab {
    bottom: 96px;
  }
}

.bottom-nav-item {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.bottom-nav-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-muted);
}

.bottom-nav-item.active {
  background: rgba(255, 77, 94, 0.12);
  color: var(--text);
}

.bottom-nav-item.active .bottom-nav-icon {
  border-color: rgba(255, 77, 94, 0.4);
  background: rgba(255, 77, 94, 0.2);
}

.bottom-nav-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 77, 94, 0.25);
}

/* Toasts */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  max-width: min(360px, 92vw);
}

.toast {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fadeInUp 0.2s ease;
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.toast-message {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.toast-close {
  border: 1px solid var(--border);
  background: var(--card-muted);
  border-radius: 8px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

.toast-success {
  border-color: rgba(31, 206, 132, 0.4);
}

.toast-error {
  border-color: rgba(227, 82, 92, 0.5);
}

.toast-warning {
  border-color: rgba(243, 165, 49, 0.5);
}

.toast-info {
  border-color: rgba(59, 123, 245, 0.45);
}

/* Skeletons */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.skeleton-line,
.skeleton-dot,
.skeleton-pill {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.06));
  background-size: 400px 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-dot {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-pill {
  width: 120px;
  height: 20px;
  border-radius: 999px;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* Landing additions */
.landing-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.landing-proof-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.landing-proof-card strong {
  font-size: 1.6rem;
}

.landing-proof-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.landing-testimonial {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card-muted);
  border: 1px dashed var(--border);
  color: var(--text);
}

.landing-testimonial span {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.landing-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.landing-faq-item {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px;
}

.landing-faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.landing-faq-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.landing-final .landing-final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Mobile adjustments */
@media (max-width: 820px) {
  .bottom-nav {
    display: flex;
  }

  .app-shell {
    padding-bottom: 110px;
  }

  .checklist-fab {
    bottom: 96px;
  }

  .overview-visuals {
    grid-template-columns: 1fr;
  }

  .overview-charts-side {
    grid-template-rows: auto;
  }

  .onboarding-step {
    grid-template-columns: 28px 1fr;
  }

  .onboarding-step .cta-btn {
    width: 100%;
    grid-column: 1 / -1;
  }

  .action-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-final .landing-final-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* App layout refresh */
.app-shell {
  background: var(--sp-bg);
  min-height: 100vh;
  color: var(--sp-text);
}

.app-shell .page-header {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 4px 0 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--sp-border);
}

.app-shell .user-pill {
  background: transparent;
  border: 1px solid var(--sp-border);
  box-shadow: none;
}

.app-shell .sidebar-brand {
  background: transparent;
}

.app-shell .hero,
.app-shell .onboarding-card,
.app-shell .action-card,
.app-shell .sync-status,
.app-shell .ratings-panel,
.app-shell .metric-tile,
.app-shell .card,
.app-shell .chart-switch {
  background: transparent;
  border: none;
  box-shadow: none;
}

.app-shell .hero,
.app-shell .onboarding-card,
.app-shell .sync-status {
  padding: 0;
}

.app-shell .card {
  padding: 14px 16px;
  overflow: visible;
}

.app-shell .action-card {
  padding: 16px 18px;
  overflow: visible;
}

.app-shell .card::after {
  display: none;
}

.app-shell .card.focus {
  min-height: auto;
}

.app-shell .card.actionable:hover {
  transform: none;
  box-shadow: none;
}

.app-shell .overview-kpi-strip,
.app-shell .card-grid {
  gap: 20px;
  margin-bottom: 16px;
}

.app-shell .overview-kpi-strip {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.app-shell .section-header {
  margin: 8px 0 12px;
}

.app-shell .section-spaced {
  margin-top: 16px;
}

.app-shell .chart-card,
.app-shell .table-wrapper,
.app-shell .auth-card,
.app-shell .modal-card {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  box-shadow: var(--sp-shadow-1);
}

.app-shell thead {
  background: transparent;
}

.app-shell tbody tr:nth-child(even) {
  background: transparent;
}

.app-shell tbody tr:hover {
  background: rgba(15, 23, 42, 0.04);
}

.app-shell .cta-btn.primary {
  background: var(--sp-primary);
  box-shadow: none;
}

.app-shell .cta-btn.ghost {
  background: transparent;
  box-shadow: none;
}

.app-shell .chip-toggle,
.app-shell .metric-chip,
.app-shell .pill-host,
.app-shell .section-tag {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--sp-border);
  color: var(--sp-muted);
}

.app-shell .section-tag {
  border: none;
  color: var(--sp-subtle);
  padding: 0;
}

.app-shell .metric-chip strong {
  color: var(--sp-text);
}

.app-shell .chip-toggle.active {
  background: rgba(255, 77, 94, 0.08);
  border-color: rgba(255, 77, 94, 0.45);
  color: var(--sp-primary);
  box-shadow: none;
}

.app-shell .chart-legend .legend {
  background: transparent;
  border: none;
  padding: 0;
}

.app-shell #tab-overview .card,
.app-shell #tab-overview .card.focus,
.app-shell #tab-overview .card.actionable {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.app-shell .overview-kpi-strip .card {
  padding: 0;
  border: none;
}

/* Sidebar collapsed alignment */
.sidebar:not(:hover) .sidebar-item {
  justify-content: center;
  gap: 0;
  padding: 10px 8px;
}

.sidebar:not(:hover) .sidebar-brand {
  padding: 8px;
}

.sidebar:not(:hover) .sidebar-logo {
  width: 68px;
  height: 68px;
}

.sidebar:not(:hover) .sidebar-badge {
  display: none;
}
