/* =========================================
 * Dashboard â€“ Extracted Inline Styles
 * Moved from index.html <style> block
 * ========================================= */

:root {
  --font-heading: 'Roboto', sans-serif;
  --font-body: 'Roboto', sans-serif;
  --dash-grid-gap: 24px;
  --dash-shell-max: 1460px;
}

body {
  background:
    radial-gradient(circle at top right, rgba(90, 174, 224, 0.09), transparent 28%),
    radial-gradient(circle at 12% 8%, rgba(129, 91, 234, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-top-bar {
  position: relative !important;
  top: auto !important;
}

.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.dashboard-shell {
  flex: 1;
  padding: 28px 28px 40px;
  overflow-y: auto;
}

.dashboard-stack {
  display: grid;
  gap: 24px;
  max-width: var(--dash-shell-max);
  margin: 0 auto;
}

.surface-panel {
  background:
    linear-gradient(180deg, rgba(28, 40, 49, 0.97), rgba(17, 26, 33, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.surface-panel:hover {
  transform: translateY(-3px);
  border-color: rgba(140, 219, 255, 0.12);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(140, 219, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}


.dashboard-hero {
  padding: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(315px, 0.82fr);
  gap: 26px;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(90, 174, 224, 0.06), transparent 42%, rgba(129, 91, 234, 0.06));
  pointer-events: none;
  z-index: 0;
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  inset: auto -120px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 174, 224, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(90, 174, 224, 0.1);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
  border: 1px solid rgba(90, 174, 224, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.02;
  font-weight: 900;
  font-family: var(--font-heading);
  letter-spacing: -0.04em;
  max-width: 840px;
}

.hero-subtitle {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--text-body-soft);
  font-size: 15px;
  line-height: 1.72;
}

.hero-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-body);
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-pill i {
  color: var(--accent);
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-storage-note {
  margin-top: 14px;
  max-width: 760px;
  color: var(--text-muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

.dash-btn {
  min-height: 48px;
  border-radius: 15px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.dash-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.dash-btn-primary {
  background: linear-gradient(135deg, #7ed4ff, #5aaee0);
  color: #07131d;
  border: none;
}

.dash-btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.hero-summary-card {
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(10, 18, 24, 0.58), rgba(14, 22, 28, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  align-content: start;
  gap: 20px;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.hero-summary-card:hover {
  transform: translateY(-4px);
  border-color: rgba(140, 219, 255, 0.15);
  background: linear-gradient(180deg, rgba(14, 24, 31, 0.72), rgba(17, 28, 35, 0.9));
  box-shadow: 0 22px 42px rgba(8, 16, 24, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-summary-label {
  color: var(--text-muted-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-score-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
}

.hero-score-orb {
  --health-score-angle: 180deg;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.2), transparent 38%),
    conic-gradient(from 210deg, rgba(99, 183, 232, 0.14) 0deg, rgba(99, 183, 232, 0.14) 36deg, rgba(99, 183, 232, 0.96) var(--health-score-angle), rgba(255, 255, 255, 0.08) var(--health-score-angle), rgba(255, 255, 255, 0.08) 360deg);
  box-shadow: 0 18px 42px rgba(10, 21, 31, 0.34), 0 0 42px rgba(99, 183, 232, 0.12);
  position: relative;
  isolation: isolate;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.hero-summary-card:hover .hero-score-orb {
  transform: scale(1.03);
  box-shadow: 0 24px 48px rgba(10, 21, 31, 0.38), 0 0 54px rgba(99, 183, 232, 0.16);
}

.hero-score-orb::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.16), rgba(15, 24, 31, 0.98) 58%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 0;
}

.hero-score-core {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero-summary-value {
  font-size: 42px;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-shadow: 0 8px 26px rgba(99, 183, 232, 0.2);
}

.hero-score-unit {
  margin-top: 4px;
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 180ms ease, opacity 180ms ease;
}

.hero-score-unit.is-empty {
  color: rgba(210, 223, 235, 0.62);
  opacity: 0.8;
}

.hero-score-copy {
  display: grid;
  gap: 10px;
  align-content: center;
}

.hero-score-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(99, 183, 232, 0.12);
  border: 1px solid rgba(99, 183, 232, 0.18);
  color: var(--text-heading-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-score-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.hero-summary-caption {
  margin-top: 0;
  color: var(--text-body-soft);
  font-size: 14px;
  line-height: 1.65;
}

.hero-score-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-score-chip {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-body);
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-score-chip i {
  color: var(--accent-light);
}

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

.hero-mini-stat {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.hero-mini-stat--wide {
  grid-column: 1 / -1;
}

.hero-mini-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 219, 255, 0.13);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.032));
  box-shadow: 0 14px 28px rgba(7, 15, 24, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}


.hero-mini-stat span {
  display: block;
  color: var(--text-muted-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.hero-mini-stat strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

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

.kpi-card {
  padding: 20px;
  display: grid;
  gap: 14px;
  min-height: 168px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  inset: auto -30px -30px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 68%);
  pointer-events: none;
}

.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.kpi-value {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.kpi-unit {
  color: var(--text-subtle);
  font-size: 13px;
  font-weight: 700;
}

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

.kpi-quick-add {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(92, 240, 145, 0.42);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(92, 240, 145, 0.34), rgba(48, 184, 96, 0.18));
  color: #dffff0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 34px rgba(36, 160, 88, 0.32);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.kpi-quick-add:hover {
  transform: translateY(-1px);
  border-color: rgba(121, 255, 169, 0.72);
  background: linear-gradient(180deg, rgba(121, 255, 169, 0.5), rgba(48, 184, 96, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 40px rgba(36, 160, 88, 0.42);
}

.kpi-quick-add:focus-visible {
  outline: 2px solid rgba(121, 255, 169, 0.78);
  outline-offset: 3px;
}

.quick-weight-modal {
  max-width: 420px;
}

.quick-weight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.quick-weight-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(113, 208, 255, 0.14);
  color: var(--accent-light);
  border: 1px solid rgba(113, 208, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.quick-weight-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.1;
}

.quick-weight-desc {
  margin: 8px 0 0;
  color: var(--text-body-soft);
  font-size: 13px;
  line-height: 1.65;
}

.quick-weight-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.quick-water-modal {
  max-width: 420px;
}

.quick-water-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.quick-water-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 183, 232, 0.16);
  color: #8fe6ff;
  border: 1px solid rgba(99, 183, 232, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 30px rgba(36, 128, 190, 0.16);
  flex-shrink: 0;
}

.quick-water-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.1;
}

.quick-water-desc {
  margin: 8px 0 0;
  color: var(--text-body-soft);
  font-size: 13px;
  line-height: 1.65;
}

.quick-water-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.quick-water-current {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.quick-weight-current {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.kpi-trend {
  color: var(--text-body-soft);
  font-size: 13px;
  line-height: 1.55;
  position: relative;
  z-index: 1;
}

.kpi-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.kpi-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(90, 174, 224, 0.3), rgba(90, 174, 224, 0.98));
  width: 0;
  transition: width 0.35s ease;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.56fr) minmax(320px, 0.92fr);
  gap: var(--dash-grid-gap);
  align-items: start;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.panel {
  padding: 24px;
  min-width: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  min-width: 0;
}

.panel-header>* {
  min-width: 0;
}

.panel-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.panel-desc {
  margin-top: 6px;
  color: var(--text-body-soft);
  font-size: 13px;
  line-height: 1.65;
  max-width: 64ch;
}

.metric-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 640px);
  gap: 8px;
  justify-content: stretch;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-tab {
  min-height: 38px;
  width: 100%;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-body-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.metric-tab:hover {
  transform: translateY(-1px);
  color: var(--text-primary);
}

.metric-tab.active {
  background: linear-gradient(135deg, rgba(90, 174, 224, 0.16), rgba(90, 174, 224, 0.08));
  color: var(--accent-light);
  border-color: rgba(90, 174, 224, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chart-shell {
  position: relative;
  min-height: 350px;
  padding: 12px 4px 0;
  min-width: 0;
  overflow: hidden;
}

.chart-shell canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
}

.chart-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--text-body-soft);
  font-size: 13px;
}

.chart-highlight {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-highlight i {
  color: var(--accent);
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  color: var(--text-muted-strong);
  padding: 20px;
}

.chart-empty i {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.25);
}

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

.analytics-note {
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.analytics-note:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 219, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
  box-shadow: 0 14px 28px rgba(7, 15, 24, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.analytics-note span {
  display: block;
  color: var(--text-muted-strong);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 6px;
}

.analytics-note strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.insight-list,
.activity-list,
.snapshot-list,
.metric-library,
.table-list {
  display: grid;
  gap: 12px;
}

.insight-item,
.activity-item,
.snapshot-item,
.metric-card,
.table-row {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.insight-item:hover,
.activity-item:hover,
.snapshot-item:hover,
.table-row:hover {
  transform: translateY(-3px);
  border-color: rgba(140, 219, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.028));
  box-shadow: 0 18px 34px rgba(7, 15, 24, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}


.insight-item,
.snapshot-item,
.activity-item,
.table-row {
  padding: 15px 16px;
}

.insight-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.insight-label,
.snapshot-label,
.metric-card-label,
.table-main {
  color: var(--text-body-soft);
  font-size: 13px;
}

.insight-value,
.snapshot-value,
.metric-card-value,
.table-value {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
  text-align: right;
}

.insight-help,
.snapshot-help,
.metric-card-help,
.table-sub,
.activity-meta {
  margin-top: 4px;
  color: var(--text-muted-strong);
  font-size: 12px;
  line-height: 1.55;
}

.body-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(90, 174, 224, 0.12);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(90, 174, 224, 0.18);
}

.insight-value-group {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.whr-risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-body-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.whr-risk-badge--low {
  background: rgba(92, 240, 145, 0.12);
  color: #97f6b5;
  border-color: rgba(92, 240, 145, 0.26);
}

.whr-risk-badge--moderate {
  background: rgba(255, 174, 98, 0.12);
  color: #ffc68b;
  border-color: rgba(255, 174, 98, 0.24);
}

.whr-risk-badge--high {
  background: rgba(255, 107, 107, 0.12);
  color: #ffadad;
  border-color: rgba(255, 107, 107, 0.26);
}

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

.snapshot-item {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.activity-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(90, 174, 224, 0.1);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.activity-value {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

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

.metric-card {
  padding: 16px;
  min-height: 124px;
  display: grid;
  gap: 8px;
  align-content: start;
  position: relative;
  overflow: hidden;
  min-width: 0;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  cursor: pointer;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 18px 0 0 18px;
  background: rgba(113, 208, 255, 0.22);
  opacity: 0.9;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(113, 208, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.028));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 36px rgba(7, 15, 24, 0.26);
}

.metric-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.metric-card-top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.metric-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transition: transform 200ms ease, background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.metric-card:hover .metric-card-icon {
  transform: scale(1.05);
  background: rgba(113, 208, 255, 0.12);
  color: var(--accent-light);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(49, 132, 184, 0.2);
}

.metric-card-link {
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease, opacity 180ms ease;
  opacity: 0.86;
}

.metric-card-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-body-soft);
  white-space: nowrap;
}

.metric-card--neutral::before {
  background: rgba(113, 208, 255, 0.22);
}

.metric-card--neutral .metric-card-status {
  background: rgba(113, 208, 255, 0.1);
  color: #b3eaff;
  border-color: rgba(113, 208, 255, 0.22);
}

.metric-card--good {
  border-color: rgba(92, 240, 145, 0.2);
  background: linear-gradient(180deg, rgba(92, 240, 145, 0.05), rgba(255, 255, 255, 0.02));
}

.metric-card--good::before {
  background: linear-gradient(180deg, rgba(121, 255, 169, 0.98), rgba(48, 184, 96, 0.95));
  box-shadow: 0 0 24px rgba(92, 240, 145, 0.18);
}

.metric-card--good .metric-card-icon {
  background: rgba(92, 240, 145, 0.14);
  color: #8cf3ad;
}

.metric-card--good .metric-card-value {
  color: #9af4b7;
}

.metric-card--good .metric-card-status {
  background: rgba(92, 240, 145, 0.12);
  color: #97f6b5;
  border-color: rgba(92, 240, 145, 0.28);
}

.metric-card--warn {
  border-color: rgba(255, 174, 98, 0.22);
  background: linear-gradient(180deg, rgba(255, 174, 98, 0.05), rgba(255, 255, 255, 0.02));
}

.metric-card--warn::before {
  background: linear-gradient(180deg, rgba(255, 196, 118, 0.98), rgba(255, 142, 70, 0.95));
  box-shadow: 0 0 24px rgba(255, 174, 98, 0.16);
}

.metric-card--warn .metric-card-icon {
  background: rgba(255, 174, 98, 0.14);
  color: #ffc17e;
}

.metric-card--warn .metric-card-value {
  color: #ffc78b;
}

.metric-card--warn .metric-card-status {
  background: rgba(255, 174, 98, 0.12);
  color: #ffc68b;
  border-color: rgba(255, 174, 98, 0.26);
}

.metric-card--danger {
  border-color: rgba(255, 107, 107, 0.22);
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.05), rgba(255, 255, 255, 0.02));
}

.metric-card--danger::before {
  background: linear-gradient(180deg, rgba(255, 127, 127, 0.98), rgba(236, 69, 69, 0.95));
  box-shadow: 0 0 24px rgba(255, 107, 107, 0.18);
}

.metric-card--danger .metric-card-icon {
  background: rgba(255, 107, 107, 0.14);
  color: #ff9696;
}

.metric-card--danger .metric-card-value {
  color: #ff9f9f;
}

.metric-card--danger .metric-card-status {
  background: rgba(255, 107, 107, 0.12);
  color: #ffadad;
  border-color: rgba(255, 107, 107, 0.28);
}

.metric-card:hover .metric-card-link {
  color: #a9e6ff;
  transform: translateX(2px);
  opacity: 1;
}

.table-list {
  gap: 10px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto auto;
  gap: 16px;
  align-items: center;
}

.table-badge {
  min-width: 84px;
  text-align: center;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-body);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.macro-panel-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 18px;
  align-items: center;
}

.macro-donut-wrap {
  position: relative;
  min-height: 260px;
  border-radius: 24px;
  padding: 18px;
  background: radial-gradient(circle at top, rgba(95, 224, 210, 0.12), rgba(255, 255, 255, 0.02) 58%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.macro-donut-wrap canvas {
  width: 100% !important;
  height: 220px !important;
}

.macro-donut-empty {
  position: absolute;
  inset: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted-strong);
  border-radius: 20px;
  background: rgba(7, 13, 18, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  padding: 20px;
}

.macro-donut-empty i {
  display: block;
  font-size: 28px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.28);
}

.macro-legend {
  display: grid;
  gap: 12px;
}

.macro-legend-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.macro-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.02);
}

.macro-legend-label {
  color: var(--text-body);
  font-size: 13px;
  font-weight: 700;
}

.macro-legend-sub {
  color: var(--text-muted-strong);
  font-size: 12px;
  margin-top: 4px;
}

.macro-legend-value {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
  text-align: right;
}

.empty-state {
  padding: 26px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  color: var(--text-muted-strong);
}

.empty-state i {
  font-size: 30px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.22);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-box {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  background: linear-gradient(180deg, rgba(28, 41, 48, 0.98), rgba(18, 28, 34, 0.98));
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-panel);
  color: var(--text-primary);
}

.modal-box .input-wrapper {
  margin-top: 8px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.modal-box .input-wrapper i {
  color: var(--text-muted-strong);
  width: 18px;
}

.modal-box .input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding-left: 10px;
  font-family: var(--font-body);
}

.dashboard-profile-reminder {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(126, 212, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(18, 31, 42, 0.96), rgba(11, 20, 28, 0.98));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 14px;
}

.dashboard-profile-reminder[hidden] {
  display: none !important;
}

.dashboard-profile-reminder__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-profile-reminder__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(126, 212, 255, 0.12);
  color: #8edcff;
  font-size: 18px;
}

.dashboard-profile-reminder__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #f4fbff;
}

.dashboard-profile-reminder__text {
  margin: 6px 0 0;
  color: var(--text-body-soft);
  font-size: 13px;
  line-height: 1.65;
}

.dashboard-profile-reminder__close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-body);
  cursor: pointer;
}

.dashboard-profile-reminder__actions {
  display: flex;
  gap: 10px;
}

.dashboard-profile-reminder__actions .dash-btn {
  flex: 1 1 0;
  min-height: 42px;
  font-size: 13px;
}

.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  cursor: pointer;
}

.avatar-preview-lg {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-preview-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview-lg i {
  font-size: 24px;
  color: var(--text-muted-strong);
}

/* =========================================
 * Responsive â€“ Tablet (â‰¤ 1200px)
 * ========================================= */
@media (max-width: 1200px) {
  .dashboard-shell {
    padding: 24px 20px 32px;
  }

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

  .dashboard-grid,
  .dashboard-hero,
  .macro-panel-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-stack {
    max-width: none;
  }

  .hero-summary-card,
  .dashboard-side,
  .dashboard-main {
    min-width: 0;
  }

  .panel-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .metric-tabs {
    width: 100%;
  }
}

/* =========================================
 * Responsive â€“ Mobile (â‰¤ 820px)
 * ========================================= */
@media (max-width: 820px) {
  .dashboard-shell {
    padding: 18px 14px 28px;
  }

  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }

  .dashboard-main,
  .dashboard-side {
    display: contents;
  }

  .dashboard-panel-metric-library,
  .dashboard-panel-latest-news {
    order: 98;
    width: 100%;
    min-width: 0;
  }

  .dashboard-panel-latest-news {
    order: 99;
  }

  .insight-value-group {
    align-items: flex-start;
  }

  .dashboard-stack,
  .dashboard-main,
  .dashboard-side {
    gap: 18px;
  }

  .dashboard-hero,
  .panel,
  .kpi-card {
    padding: 18px;
    border-radius: 20px;
  }

  .hero-title {
    font-size: clamp(28px, 9vw, 38px);
  }

  .hero-subtitle {
    font-size: 14px;
    line-height: 1.65;
  }

  .hero-meta,
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-pill,
  .dash-btn {
    width: 100%;
    justify-content: center;
  }

  .kpi-grid,
  .snapshot-list,
  .metric-library,
  .analytics-footer {
    grid-template-columns: 1fr;
  }

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

  .panel-header,
  .chart-meta-bar,
  .activity-item,
  .table-row,
  .insight-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chart-meta-bar {
    gap: 8px;
  }

  .metric-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }

  .metric-tabs::-webkit-scrollbar {
    display: none;
  }

  .metric-tab {
    width: auto;
    flex: 0 0 auto;
    min-width: 84px;
    padding-inline: 12px;
    white-space: nowrap;
    scroll-snap-align: start;
    font-size: 12px;
  }

  .quick-weight-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .table-row,
  .activity-item {
    gap: 10px;
  }

  .activity-value,
  .insight-value,
  .snapshot-value,
  .table-value {
    text-align: left;
    white-space: normal;
  }

  .table-badge,
  .body-tag {
    justify-self: start;
  }

  .chart-shell {
    min-height: 280px;
  }

  .panel {
    overflow: hidden;
  }

  .macro-donut-wrap {
    min-height: 220px;
    padding: 14px;
  }

  .macro-donut-wrap canvas {
    height: 200px !important;
  }
}

/* =========================================
 * Responsive â€“ Small Mobile (â‰¤ 560px)
 * ========================================= */
@media (max-width: 560px) {
  .panel-header {
    gap: 12px;
  }

  .chart-highlight {
    font-size: 14px;
    line-height: 1.5;
    align-items: flex-start;
  }

  .metric-tabs {
    gap: 6px;
    padding: 5px;
  }

  .metric-tab {
    min-width: 72px;
    padding-inline: 10px;
    font-size: 11px;
  }

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

  .metric-card {
    min-height: 0;
    gap: 10px;
  }

  .metric-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .metric-card-top-actions {
    width: auto;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .metric-card-link,
  .metric-card-status {
    font-size: 10px;
  }

  .metric-card-value {
    text-align: right;
    font-size: 28px;
    line-height: 1.05;
    word-break: break-word;
  }

  .metric-card-help {
    margin-top: 0;
  }

  .dashboard-shell {
    padding-inline: 12px;
  }

  .dashboard-hero,
  .panel,
  .kpi-card,
  .hero-summary-card {
    padding: 16px;
  }

  .hero-eyebrow {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-title {
    font-size: clamp(26px, 10vw, 34px);
  }

  .hero-summary-value,
  .kpi-value {
    font-size: 32px;
  }

  .panel-title {
    font-size: 19px;
  }

  .panel-desc,
  .hero-summary-caption,
  .insight-help,
  .snapshot-help,
  .table-sub,
  .activity-meta {
    font-size: 12px;
  }

  .dashboard-profile-reminder {
    right: 16px;
    left: 16px;
    width: auto;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .dashboard-profile-reminder__actions {
    flex-direction: column;
  }
}


/* ============================================
   DATA EXPORT / IMPORT MODAL
   ============================================ */

.data-io-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.data-io-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.data-io-section-title i {
  color: var(--accent);
}

.data-io-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.6;
}

.data-io-summary {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(90, 174, 224, 0.06);
  border: 1px solid rgba(90, 174, 224, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  min-height: 40px;
  align-items: center;
}

.data-io-summary:empty {
  display: none;
}

.data-io-summary-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.data-io-summary-item i {
  color: var(--accent);
  font-size: 11px;
}

.data-io-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.data-io-divider::before,
.data-io-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.data-io-mode-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.data-io-mode-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: transparent;
}

.data-io-mode-btn:has(input:checked) {
  border-color: var(--accent);
  background: rgba(90, 174, 224, 0.06);
}

.data-io-mode-btn input {
  accent-color: var(--accent);
}

.data-io-mode-btn div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-io-mode-btn strong {
  font-size: 13px;
  color: var(--text-primary);
}

.data-io-mode-btn span {
  font-size: 12px;
  color: var(--text-muted);
}

.data-io-drop {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.data-io-drop:hover,
.data-io-drop.drag-over {
  border-color: var(--accent);
  background: rgba(90, 174, 224, 0.06);
}

.data-io-drop i {
  font-size: 28px;
  color: var(--accent);
}

.data-io-drop strong {
  font-size: 14px;
  color: var(--text-primary);
}

.data-io-drop span {
  font-size: 12px;
  color: var(--text-muted);
}

.data-io-drop.file-selected {
  border-color: #71e3b8;
  background: rgba(113, 227, 184, 0.05);
}

.data-io-drop.file-selected i {
  color: #71e3b8;
}

.data-io-feedback {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.data-io-feedback.success {
  background: rgba(113, 227, 184, 0.1);
  border: 1px solid rgba(113, 227, 184, 0.3);
  color: #71e3b8;
}

.data-io-feedback.error {
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.25);
  color: #ff6b6b;
}

.data-io-feedback.warning {
  background: rgba(255, 184, 0, 0.08);
  border: 1px solid rgba(255, 184, 0, 0.25);
  color: #ffb800;
}

/* =========================================
 * TheHinh News Feed Section
 * ========================================= */
.latest-news-panel {
  margin-top: 10px;
}

.latest-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(90, 174, 224, 0.3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.news-card-img-wrap {
  width: 100%;
  padding-top: 52.33%;
  /* 1200x628 Aspect Ratio (RSS feed images) */
  position: relative;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.news-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card-img {
  transform: scale(1.05);
}

.news-card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.news-card:hover .news-card-title {
  color: var(--accent);
}

.news-card-desc {
  font-size: 13px;
  color: var(--text-body-soft);
  margin: 0 0 16px 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
}

.news-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-card-meta i {
  color: var(--accent);
}

/* =========================================
 * RSS News Section Fixes
 * ========================================= */

/* Desktop: Reserve min-height to prevent scrollbar flickering during load */
.latest-news-grid {
  min-height: 400px;
  /* Prevents layout shift and scrollbar flicker */
}