:root {
  --primary-color: #2E9A6A;
  --accent-color: #2B9EB3;
  --danger: #F8333C;
  --muted: #6B7280;
  --bg: #f6f8fb;
  --card: #ffffff;
  --light-beige: #F7FAFC;
  --text-dark: #0f1724;
  --text-light: #ffffff;
  --shadow: 0 8px 30px rgba(16, 24, 40, 0.06);
  --radius: 14px;
  --border-radius: 12px;
  --font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --font-display: 'Source Serif 4', Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

html,
body {
  height: 100%;
  background: var(--bg);
  font-family: var(--font-family);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 26px auto;
  background: var(--card);
  padding: 26px;
  border-radius: calc(var(--radius)-2px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(25, 39, 65, 0.05);
}

.topbar {
  padding: 12px 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-link {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-color);
}

.topnav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topnav-link {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--muted);
  transition: all .16s ease;
}

.topnav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.topnav-link.active {
  background: linear-gradient(90deg, rgba(46, 154, 106, 0.12), rgba(43, 158, 179, 0.06));
  color: var(--primary-color);
}

.page-title {
  text-align: left;
  margin-bottom: 18px;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
}

.filter-section {
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid rgba(16, 24, 40, 0.05);
}

.panel-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
  border: 1px solid rgba(16, 24, 40, 0.05);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.045);
}

.section-intro {
  padding: 18px 20px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(17, 99, 217, 0.08), rgba(18, 131, 154, 0.06)),
    #ffffff;
  border: 1px solid rgba(17, 99, 217, 0.08);
}

.section-intro-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #33526d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-intro-text {
  margin: 0;
  color: #5a6a7c;
  font-size: 15px;
  line-height: 1.7;
}

.filter-grid {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.forecast-panel {
  border: 1px solid rgba(16, 24, 40, 0.05);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.05);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.forecast-panel .card-header {
  padding: 18px 22px 0;
  border-bottom: 0;
  background: transparent;
}

.forecast-panel .card-header h5,
.forecast-panel .card-header h6 {
  margin: 0;
  color: var(--text-dark);
  font-weight: 700;
}

.forecast-panel .card-body {
  padding: 20px 22px 22px;
}

.forecast-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #4b5b6c;
  font-size: 14px;
  line-height: 1.4;
}

.forecast-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  flex: 0 0 auto;
}

select {
/*  padding: 0 14px !important;*/
}

.form-select,
.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e6eef6;
  background: linear-gradient(180deg, #fff, #fbfdff);
  font-size: 15px;
  transition: box-shadow .15s, border-color .15s, transform .12s;
}

.form-select:focus,
.form-control:focus {
  outline: none;
  border-color: rgba(46, 154, 106, 0.9);
  box-shadow: 0 8px 28px rgba(46, 154, 106, 0.08);
  transform: translateY(-1px);
}

.btn-outline-muted {
  background: transparent;
  border: 1px dashed #e6eef6;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
}

.btn-outline-muted:hover {
  background: #f3faf6;
  color: var(--primary-color);
}

.empty-state,
.loading,
.error {
  padding: 28px 20px;
  text-align: center;
  border-radius: 12px;
  margin-top: 10px;
}

.empty-state {
  color: #64748b;
  background: #fcfeff;
  border: 1px dashed #e9f1f8;
}

.empty-state i {
  font-size: 44px;
  margin-bottom: 12px;
  color: #dbe9ea;
  display: block;
}

.loading {
  color: #64748b;
  background: #fbfeff;
  border: 1px solid #eef6fb;
}

.error {
  color: #b91c1c;
  background: #fff4f4;
  border: 1px solid #ffdfdf;
}

#professionContainer {
  margin-top: 14px;
}

.stats-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}

.stats-container>.stat-item:nth-child(-n+4) {
  grid-column: 1 / -1;
}

.stats-container>.stat-item:nth-child(1) {
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(46, 154, 106, 0.9) 100%);
}

.stats-container>.stat-item:nth-child(2) {
  background: linear-gradient(135deg, #F8333C, #F45A5A);
}

.stats-container>.stat-item:nth-child(3) {
  background: linear-gradient(135deg, #FCAB10, #F6C16B);
}

.stats-container>.stat-item:nth-child(4) {
  background: linear-gradient(135deg, var(--accent-color), #1f92a0);
}

.stat-item {
  padding: 28px 18px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.04);
  text-align: center;
  transition: transform .18s, box-shadow .18s;
  cursor: pointer;
  border: 1px solid #f1f6fb;
}

.stat-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.08);
}

.stat-number {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.95;
}

.stat-count {
  font-size: 32px;
  font-weight: 800;
  margin: 8px 0;
  color: var(--primary-color);
}

.stat-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  word-break: break-word;
}

.stats-container>.stat-item:nth-child(-n+4) .stat-count,
.stats-container>.stat-item:nth-child(-n+4) .stat-name,
.stats-container>.stat-item:nth-child(-n+4) .stat-number {
  color: var(--text-light);
}

@media (min-width: 768px) {
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-container>.stat-item:nth-child(-n+4) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 992px) {
  .stats-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-container>.stat-item:nth-child(-n+4) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991px) {
  .snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .snapshot-notes {
    grid-template-columns: 1fr;
  }

  .snapshot-heading {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-title {
    font-size: 28px;
  }

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

  .snapshot-title {
    font-size: 24px;
  }
}

.chart-container {
  position: relative;
  height: 420px;
  margin-top: 10px;
}

.card {
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.04);
  border: 1px solid #f1f6fb;
}

.legacy-snapshot {
  display: none;
}

.snapshot-shell {
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(43, 158, 179, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(46, 154, 106, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

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

.snapshot-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 36, 0.06);
  color: #31506b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.snapshot-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
}

.snapshot-lead {
  max-width: 720px;
  margin: 0;
  color: #526274;
  font-size: 15px;
  line-height: 1.7;
}

.snapshot-pulse {
  min-width: 220px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 36, 0.03);
  border: 1px solid rgba(15, 23, 36, 0.06);
}

.snapshot-pulse-label {
  display: block;
  margin-bottom: 6px;
  color: #738396;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.snapshot-pulse strong {
  font-size: 15px;
}

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

.snapshot-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 36, 0.06);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
}

.snapshot-card-label,
.snapshot-card-hint {
  display: block;
}

.snapshot-card-label {
  margin-bottom: 10px;
  color: #5f7183;
  font-size: 13px;
  font-weight: 700;
}

.snapshot-card-value {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.snapshot-card-hint {
  color: #738396;
  font-size: 12px;
  line-height: 1.5;
}

.snapshot-card.tone-primary .snapshot-card-value {
  color: #1163d9;
}

.snapshot-card.tone-teal .snapshot-card-value {
  color: #12839a;
}

.snapshot-card.tone-warm .snapshot-card-value {
  color: #c47a00;
}

.snapshot-card.tone-ink .snapshot-card-value {
  color: #14263c;
}

.snapshot-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.snapshot-note {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(15, 23, 36, 0.03);
  border: 1px solid rgba(15, 23, 36, 0.06);
}

.snapshot-note-label,
.snapshot-note-sub {
  display: block;
}

.snapshot-note-label {
  color: #5f7183;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.snapshot-note strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 24px;
  line-height: 1;
}

.snapshot-note-sub {
  color: #738396;
  font-size: 12px;
}

.snapshot-source-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snapshot-source-item {
  color: #6e7f91;
  font-size: 13px;
  line-height: 1.6;
}

.card-header {
  padding: 12px 18px;
  border-bottom: 1px solid #f2f7fb;
  font-weight: 600;
  background: linear-gradient(180deg, #fbfdff, #fcfeff);
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(46, 154, 106, 0.12);
}

.btn-primary:hover {
  filter: brightness(.96);
  transform: translateY(-2px);
}

.stats-card {
  background: #fbfdff;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #eef6fb;
}

.detected-location {
  font-size: 13px;
  color: var(--primary-color);
  margin-top: 8px;
  font-weight: 600;
}

.loading i {
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.text-muted {
  color: var(--muted) !important;
}
