/* Animation styles for modal transitions */

/* Modal Animations */
.animate-backdrop-fade-in {
  animation: backdropFadeIn 0.25s ease forwards;
}

.animate-backdrop-fade-out {
  animation: backdropFadeOut 0.2s ease forwards;
}

.animate-modal-scale-in {
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-modal-enter {
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-modal-exit {
  animation: modalExit 0.2s ease-in forwards;
}

.animate-modal-slide-in-right {
  animation: modalSlideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-modal-exit-right {
  animation: modalExitRight 0.2s ease-in forwards;
}

/* Modal backdrop keyframes */
@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes backdropFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Modal content keyframes */
@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalExit {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

@keyframes modalSlideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes modalExitRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

/* Simple fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal slide in from bottom with scale */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

:root {
  /* Fallback tokens if not provided elsewhere */
  --glass-bg-light: rgba(255, 255, 255, 0.92);
  --glass-bg-dark: rgba(18, 18, 18, 0.42);
  --glass-stroke-light: rgba(0, 0, 0, 0.06);
  --glass-stroke-dark: rgba(255, 255, 255, 0.12);
  --glass-highlight-light: rgba(255, 255, 255, 0.8);
  --glass-highlight-dark: rgba(255, 255, 255, 0.25);
  --shadow-ambient-light: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-ambient-dark: 0 10px 40px rgba(0, 0, 0, 0.4);
  --txt-primary: #0f172a;
  --txt-secondary: rgba(15, 23, 42, 0.7);
  --ok: #22c55e;
  --bad: #ef4444;
}

/* Remove grain entirely in light mode for a clean white sheet */
.ModalGlass_sheet__xrCXH[data-theme='light']::after {
  content: none;
}

/* Ensure internal panels render white in light mode even without data-theme on the panel */
.ModalGlass_sheet__xrCXH[data-theme='light'] .ModalGlass_panel__\+c9gI {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
}
.ModalGlass_sheet__xrCXH[data-theme='light'] .ModalGlass_divider__8g5\+E {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.06),
    rgba(0,0,0,0.03)
  );
}

/* Backdrop behind the modal */
.ModalGlass_backdrop__aLOYg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Flex frame controlling alignment (center vs right panel) */
.ModalGlass_frameCenter__-TQN9 {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  min-height: 0; /* allow child to compute height correctly */
}

.ModalGlass_frameRight__RddIU {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 16px;
  box-sizing: border-box;
  min-height: 0; /* allow child to compute height correctly */
}

/* Glass sheet container */
.ModalGlass_sheet__xrCXH {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto; /* header, body, footer */
  overflow: hidden; /* clip rounded corners; body handles scrolling */
  box-sizing: border-box;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  /* Light mode: pure white */
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #0f172a;
  color: var(--txt-primary);
}

.ModalGlass_sheet__xrCXH[data-theme='dark'] {
  background: linear-gradient(135deg, rgba(28, 28, 30, 0.75) 0%, rgba(18, 18, 20, 0.68) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border: 1px solid var(--glass-stroke-dark);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.05);
  box-shadow: 
    var(--shadow-ambient-dark),
    inset 0 1px 0 var(--glass-highlight-dark),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.05);
  color: rgba(255,255,255,0.94);
}

/* Light theme explicit override */
.ModalGlass_sheet__xrCXH[data-theme='light'] {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  color: #0f172a;
  color: var(--txt-primary);
}

/* Specular highlight line at top for glass effect */
.ModalGlass_sheet__xrCXH::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 0;
  height: 1px;
  border-radius: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 5%, rgba(255, 255, 255, 0.4) 50%, transparent 95%);
  opacity: 0;
  z-index: 10;
}

.ModalGlass_sheet__xrCXH[data-theme='dark']::before {
  opacity: 0.5;
}

/* Subtle inner glow */
.ModalGlass_sheet__xrCXH::after {
  content: none;
}

/* Sticky header/footer */
.ModalGlass_header__UjxGU {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 5; /* ensure above scrolling content */
  padding: 16px 24px;
  /* Solid white header in light mode */
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* subtle divider below header */
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ModalGlass_sheet__xrCXH[data-theme='dark'] .ModalGlass_header__UjxGU {
  background: linear-gradient(180deg, rgba(28, 28, 30, 0.85) 0%, rgba(28, 28, 30, 0.7) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ModalGlass_title__5NA9N {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  color: #0f172a;
  color: var(--txt-primary);
}

.ModalGlass_sheet__xrCXH[data-theme='dark'] .ModalGlass_title__5NA9N {
  color: rgba(255,255,255,0.92);
}

.ModalGlass_content__nwAeb {
  /* Allow body to take remaining space; scroll happens on the sheet */
  flex: 1 1 auto;
  min-height: 0;
  /* extra bottom padding so last fields aren't hidden behind sticky footer */
  padding: 24px 24px calc(96px + env(safe-area-inset-bottom, 0px)); /* footer height + iOS inset */
  scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); /* keep focused inputs above footer */
  scroll-padding-top: 64px; /* keep first focus below header */
  overflow-y: auto; /* body is the scroll container */
  -webkit-overflow-scrolling: touch; /* smooth iOS scrolling */
  overscroll-behavior: contain;
  position: relative;
}
.ModalGlass_contentNoPad__Om6Sa {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 24px calc(96px + env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  scroll-padding-top: 64px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  position: relative;
}

/* Compact content for short, centered modals to avoid excessive empty space */
.ModalGlass_contentCompact__iCyxF {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 24px calc(72px + env(safe-area-inset-bottom, 0px)); /* smaller bottom padding than full content */
  scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  scroll-padding-top: 56px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  position: relative;
}

.ModalGlass_footer__05Um- {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 5; /* ensure above scrolling content */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 24px;
  /* Browser default: give a comfortable cushion below footer */
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  /* Solid white footer in light mode */
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* subtle divider above footer */
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ModalGlass_sheet__xrCXH[data-theme='dark'] .ModalGlass_footer__05Um- {
  background: linear-gradient(0deg, rgba(28, 28, 30, 0.85) 0%, rgba(28, 28, 30, 0.7) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Size presets (used for right-positioned wide modals) */
.ModalGlass_width50__B-oiQ { width: min(960px, 50vw); }
.ModalGlass_width60__HpqZE { width: min(1056px, 60vw); }
.ModalGlass_width70__0msl\+ { width: min(1200px, 70vw); }
.ModalGlass_full__aZadK    { width: 100%; max-width: 100%; }
.ModalGlass_contextual__mFSDV { width: 100%; max-width: 640px; }

/* Tablet responsive sizing (641px to 767px) - treat as mobile for Settings modal */
/* This range gets full-screen treatment to avoid awkward in-between states */
@media (min-width: 641px) and (max-width: 767px) {
  .ModalGlass_frameCenter__-TQN9,
  .ModalGlass_frameRight__RddIU {
    padding: 0;
  }
  .ModalGlass_sheet__xrCXH {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
}

/* Larger tablet (768px to 1023px) - use desktop-like sizing */
@media (min-width: 768px) and (max-width: 1023px) {
  .ModalGlass_width50__B-oiQ,
  .ModalGlass_width60__HpqZE,
  .ModalGlass_width70__0msl\+ {
    width: 85vw;
    max-width: 85vw;
  }
  
  .ModalGlass_frameCenter__-TQN9,
  .ModalGlass_frameRight__RddIU {
    padding: 12px;
  }
}
.ModalGlass_heightScreen__aKWvj {
  /* Fill the padded frame completely and never exceed it */
  height: 100vh;     /* fallback */
  max-height: 100vh; /* fallback */
  height: 100dvh;    /* iOS/modern browsers */
  max-height: 100dvh;
  /* Account for frame padding (16px top + 16px bottom) in browser */
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
}

/* Auto-height for contextual, center modals: size to content with a comfortable cap */
.ModalGlass_heightAuto__AsElO {
  height: auto;
  /* Ensure the modal never exceeds the viewport minus the frame padding */
  max-height: min(90dvh, calc(100dvh - 32px - env(safe-area-inset-bottom, 0px)));
}

/* Full height for settings and other content-heavy modals */
.ModalGlass_heightFull__LUEZj {
  height: min(95dvh, calc(100dvh - 32px - env(safe-area-inset-bottom, 0px)));
  max-height: min(95dvh, calc(100dvh - 32px - env(safe-area-inset-bottom, 0px)));
}

/* Mobile full-screen override for ALL modals */
@media (max-width: 640px) {
  .ModalGlass_frameCenter__-TQN9,
  .ModalGlass_frameRight__RddIU {
    padding: 0;          /* remove margins around the modal */
  }
  .ModalGlass_sheet__xrCXH {
    width: 100vw;        /* full width */
    height: 100vh;       /* fallback */
    height: 100dvh;      /* full height accounting for dynamic viewport */
    max-width: none;
    max-height: none;
    border-radius: 0;    /* edge-to-edge */
  }
  
  /* Reduce padding on mobile for better space usage */
  .ModalGlass_content__nwAeb,
  .ModalGlass_contentNoPad__Om6Sa {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  
  .ModalGlass_header__UjxGU,
  .ModalGlass_footer__05Um- {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ModalGlass_footer__05Um- {
    /* Mobile browser: same comfortable spacing */
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

/* PWA standalone: tighter bottom spacing (cap the safe-area) */
@media (display-mode: standalone) {
  .ModalGlass_footer__05Um- {
    /* Cap the bottom inset so footer isn't overly elevated in PWA */
    padding-bottom: clamp(8px, env(safe-area-inset-bottom, 0px), 16px);
  }
  .ModalGlass_content__nwAeb, .ModalGlass_contentNoPad__Om6Sa {
    /* Keep scroll affordance but reduce excess space in PWA */
    padding-bottom: calc(64px + clamp(8px, env(safe-area-inset-bottom, 0px), 16px));
    scroll-padding-bottom: calc(64px + clamp(8px, env(safe-area-inset-bottom, 0px), 16px));
  }
  /* PWA: use full dynamic viewport height (no browser toolbar) */
  .ModalGlass_heightScreen__aKWvj {
    height: 100dvh;
    max-height: 100dvh;
  }
}

/* Panels inside modal (sections) */
.ModalGlass_panel__\+c9gI {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.ModalGlass_sheet__xrCXH[data-theme='dark'] .ModalGlass_panel__\+c9gI {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ModalGlass_panel__\+c9gI[data-theme='light'] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Etched divider (can be added to rows inside panels) */
.ModalGlass_divider__8g5\+E {
  height: 1px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.10),
    rgba(255,255,255,0.04)
  );
}

/* Image scrims */
.ModalGlass_scrimTop__sWtca {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 96px;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
  pointer-events: none;
}

.ModalGlass_scrimBottom__A6foK {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
  pointer-events: none;
}

/* Reduced motion handling for entrance/exit animations; JS controls classes */
@media (prefers-reduced-motion: reduce) {
  .ModalGlass_reduceMotion__fQA3H {
    animation: none !important;
    transition: none !important;
  }
}

:root {
  /* Light mode - more opaque and defined for better visibility */
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-stroke: rgba(0, 0, 0, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.6);
  --shadow-ambient: rgba(0, 0, 0, 0.06);
  --txt-primary: #0a0a0a;
  --txt-secondary: rgba(0, 0, 0, 0.65);
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
}

[data-theme="dark"] {
  --glass-bg: rgba(18, 18, 18, 0.35);
  --glass-stroke: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.35);
  --shadow-ambient: rgba(0, 0, 0, 0.35);
  --txt-primary: #ffffff;
  --txt-secondary: rgba(255, 255, 255, 0.64);
}

.CardGlass_glass__07aDT {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--glass-stroke);
  background: linear-gradient(180deg, transparent, transparent) var(--glass-bg);
  background-image:
    radial-gradient(1px 1px at 25% 30%, rgba(0,0,0,0.01) 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 75%, rgba(255,255,255,0.008) 50%, transparent 51%);
  background-blend-mode: overlay;
  -webkit-backdrop-filter: blur(8px) saturate(105%);
  backdrop-filter: blur(8px) saturate(105%);
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 3px 8px var(--shadow-ambient);
  color: var(--txt-primary);
}

.CardGlass_glass__07aDT::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  opacity: 0.06; /* very subtle top highlight for light mode */
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .CardGlass_glass__07aDT { background: var(--glass-bg); }
}

/* Header variant: same glass look but without border stroke */
.CardGlass_glassHeader__PoDZZ {
  position: relative;
  border-radius: 16px;
  border: none;
  background: linear-gradient(180deg, transparent, transparent) var(--glass-bg);
  background-image:
    radial-gradient(1px 1px at 25% 30%, rgba(0,0,0,0.01) 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 75%, rgba(255,255,255,0.008) 50%, transparent 51%);
  background-blend-mode: overlay;
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 10px 30px var(--shadow-ambient);
  color: var(--txt-primary);
}

.CardGlass_glassHeader__PoDZZ::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  opacity: 0.06;
}

/* Dark mode keeps richer blur and highlight */
[data-theme="dark"] .CardGlass_glass__07aDT {
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 10px 30px var(--shadow-ambient);
}
[data-theme="dark"] .CardGlass_glassHeader__PoDZZ {
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 10px 30px var(--shadow-ambient);
}
[data-theme="dark"] .CardGlass_glass__07aDT::before,
[data-theme="dark"] .CardGlass_glassHeader__PoDZZ::before {
  opacity: 0.45;
}

/* Selected state purple glow around cards */
.CardGlass_selectedGlow__bbYJ5 {
  /* Preserve base glass shadows and add purple neon layers */
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 10px 30px var(--shadow-ambient),
    0 0 0 2px rgba(168, 85, 247, 0.45),      /* solid outline */
    0 0 14px 4px rgba(168, 85, 247, 0.35),   /* near glow */
    0 0 28px 10px rgba(168, 85, 247, 0.20);  /* far glow */
}

:root {
  /* Light theme - more opaque and defined for better visibility */
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-stroke: rgba(0, 0, 0, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.6);
  --shadow-ambient: rgba(0, 0, 0, 0.06);
  --txt-primary: #0a0a0a;
  --txt-secondary: rgba(0, 0, 0, 0.65);
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
}

[data-theme="dark"] {
  --glass-bg: rgba(18, 18, 18, 0.35);
  --glass-stroke: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.35);
  --shadow-ambient: rgba(0, 0, 0, 0.35);
  --txt-primary: #ffffff;
  --txt-secondary: rgba(255, 255, 255, 0.64);
}

/* Container: Liquid Glass */
.StatisticSummary_container__mW5v1 {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--glass-stroke);
  /* Base tint + subtle gradient to add depth */
  background: linear-gradient(180deg, transparent, transparent) var(--glass-bg);
  /* Film grain/noise layer (ultra subtle) */
  background-image:
    radial-gradient(1px 1px at 25% 30%, rgba(0,0,0,0.01) 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 75%, rgba(255,255,255,0.008) 50%, transparent 51%);
  background-blend-mode: overlay;

  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);

  /* Restore inset top highlight for glass bevel */
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 10px 30px var(--shadow-ambient);

  color: var(--txt-primary);
  outline: none; /* we provide custom focus ring */
}

/* Top specular highlight */
.StatisticSummary_container__mW5v1::before {
  /* Static specular edge to enhance glass, not interactive */
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  opacity: 0.45; /* tasteful but visible */
}

/* Fallback when backdrop-filter is not supported */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .StatisticSummary_container__mW5v1 {
    background: var(--glass-bg);
  }
}

/* Grid layout */
.StatisticSummary_grid__2LNbz {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 0;
  gap: 0; /* dividers are drawn with pseudo-elements */
  padding: 12px 14px; /* compact on mobile */
}

@media (min-width: 640px) {
  .StatisticSummary_grid__2LNbz { padding: 16px 18px; }
}
@media (min-width: 768px) {
  .StatisticSummary_grid__2LNbz { padding: 20px 22px; }
}

/* Responsiveness: 2-col on mobile/tablet, 5-col on desktop (lg+) */
@media (max-width: 639.98px) {
  /* Make mobile more space efficient - 2 columns */
  .StatisticSummary_grid__2LNbz { grid-template-columns: repeat(2, 1fr); padding: 8px 10px; gap: 8px; }
  .StatisticSummary_cell__7t9GQ { padding: 8px 8px; min-height: 48px; }
  .StatisticSummary_cell__7t9GQ:not(:first-child)::before { content: none; }
  .StatisticSummary_label__TZ8AH { font-size: 11px; letter-spacing: 0.06em; margin-bottom: 2px; }
  .StatisticSummary_value__PMb9n { font-size: clamp(0.9rem, 1.2vw + 0.65rem, 1.1rem); }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  /* Tablet: 2 columns */
  .StatisticSummary_grid__2LNbz { grid-template-columns: repeat(2, 1fr); }
  /* Suppress etched dividers on multi-row layouts */
  .StatisticSummary_cell__7t9GQ:not(:first-child)::before { content: none; }
}
@media (min-width: 1024px) {
  /* Desktop: 5 columns to show all stats in one row */
  .StatisticSummary_grid__2LNbz { grid-template-columns: repeat(5, 1fr); }
}

/* Cells */
.StatisticSummary_cell__7t9GQ {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  min-height: 56px;
  border-radius: 12px; /* for pressed effect without clipping highlight */
  transition: transform 120ms ease, filter 200ms ease, box-shadow 200ms ease;
}

/* Engraved vertical dividers using gradient fade */
.StatisticSummary_cell__7t9GQ:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 14%;
  bottom: 14%;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255,255,255,0.18) 8%,
    rgba(0,0,0,0.18) 50%,
    rgba(255,255,255,0.12) 92%,
    transparent 100%
  );
  opacity: 0.35; /* etched, not harsh */
  pointer-events: none;
}

/* Label & value */
.StatisticSummary_label__TZ8AH {
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-secondary);
  margin-bottom: 6px;
}

.StatisticSummary_value__PMb9n {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 780;
  font-size: clamp(0.95rem, 0.75rem + 1.2vw, 1.5rem);
  color: var(--txt-primary);
  max-width: 100%;
  white-space: nowrap;
}

.StatisticSummary_valueText__5U1tM {
  overflow: hidden;
  text-overflow: ellipsis;
}

.StatisticSummary_icon__vk5zF { color: var(--txt-secondary); display: inline-flex; align-items: center; }

/* Sentiment coloring for profit */
.StatisticSummary_positive__91-Wi { color: var(--ok); }
.StatisticSummary_negative__VG34P { color: var(--bad); }

/* Interactions: no hover/press motion for this component */
/* Keep cells static to avoid perceived hover effect */

/* Focus ring outside the container */
.StatisticSummary_container__mW5v1:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--glass-highlight) 60%, #4da3ff 40%);
  outline-offset: 2px;
}

/* Hide on desktop (lg+), show on mobile/tablet */
@media (min-width: 1024px) {
  .StatisticSummary_hideOnDesktop__wfNLc { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .StatisticSummary_cell__7t9GQ { transition: none; transform: none !important; }
  .StatisticSummary_container__mW5v1::before { transform: none !important; }
}

