/* Home (app/views/dashboard.js): the original's DashboardScreen.tsx and BrainScoreDisplay.tsx StyleSheets, blue theme.
   Sizes are the StyleSheets' at the 375-wide design (getResponsiveSize / moderateScale at scale 1). The original's
   sections sit 20 in from the edge; .screen gives 16, so each block adds 4. */

/* the theme colors a priority or chart carries (blueThemeColors info, success, accent, warning, heart) */
.dash-c-info, .dash-c-accent { --c: var(--accent); }
.dash-c-success { --c: var(--success); }
.dash-c-warning { --c: var(--warning); }
.dash-c-heart { --c: #E91E63; } /* blueThemeColors.heart */

/* Header (develop): "Good evening, Deena!" 18/700 on one line, and the 44 round profile photo, or the initials (white
   18/700) on buttonGradient. That gradient starts at --accent-strong: white on the original's #1DA1F2 fails contrast. */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 4px 16px; }
.dash-head-left { flex: 1; min-width: 0; }
.dash-greeting { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--text); outline: none; }
.dash-profile { flex: none; display: block; width: 44px; height: 44px; border-radius: 22px; overflow: hidden; text-decoration: none; }
.dash-avatar { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px; object-fit: cover; }
.dash-avatar-initials { background: linear-gradient(180deg, var(--accent-strong), #126180); color: #FFFFFF; font-size: 18px; font-weight: 700; }

/* Brain Score: the card (border rgba(59,127,149,0.3), the original's) around BrainScoreDisplay */
.dash-score-card { margin: 0 4px 20px; border-radius: 16px; border: 1px solid rgba(59,127,149,0.3); background: var(--card); }
.dash-score { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 24px; border-radius: 20px; background: var(--card); box-shadow: 0 2px 3.84px rgba(0,0,0,0.1); animation: dash-in .8s ease-out both; }
/* getScoreColor / getScoreGradient (develop's five bands); band 0 is "Start Today!" in colors.primary */
.dash-band-0 { --sc: var(--primary); --sc2: var(--primary); }
.dash-band-1 { --sc: #4CAF50; --sc2: #45a049; }
.dash-band-2 { --sc: #8BC34A; --sc2: #7cb342; }
.dash-band-3 { --sc: #FFC107; --sc2: #ffb300; }
.dash-band-4 { --sc: #FF9800; --sc2: #f57c00; }
.dash-band-5 { --sc: #FF5722; --sc2: #f4511e; }
.dash-stop-1 { stop-color: var(--sc); }
.dash-stop-2 { stop-color: var(--sc2); }
.dash-glow { position: absolute; top: 50%; left: 50%; width: 270px; height: 270px; margin: -135px 0 0 -135px; border-radius: 135px; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--sc) 8%, transparent), color-mix(in srgb, var(--sc) 2%, transparent), transparent); opacity: .3; animation: dash-pulse 2s ease-in-out .3s infinite; }
.dash-ring { position: relative; width: 180px; height: 180px; margin-bottom: 20px; }
.dash-ring-svg { display: block; }
.dash-ring-fill { animation: dash-fill 2s cubic-bezier(.33,1,.68,1) both; } /* Easing.out(Easing.cubic) */
.dash-ring-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dash-num { margin: 0; font-size: 48px; font-weight: 700; line-height: 48px; color: var(--sc); }
.dash-of { margin: 4px 0 0; font-size: 16px; font-weight: 500; color: var(--text-2); }
.dash-face { margin-top: 8px; fill: var(--sc); }
.dash-badge { position: relative; display: flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 8px 16px; border-radius: 20px; background: linear-gradient(90deg, var(--sc), var(--sc2)); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .5px; }
.dash-badge svg { fill: #fff; }
.dash-status { position: relative; display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 8px 14px; border-radius: 16px; border: 1px solid var(--sc); background: color-mix(in srgb, var(--sc) 6%, transparent); color: var(--sc); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.dash-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--sc); }
.dash-for { position: relative; display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: var(--text-2); }
.dash-for svg { fill: var(--text-2); }
.dash-prev { margin-left: 4px; padding: 3px 8px; border-radius: 10px; background: color-mix(in srgb, var(--warning) 12.5%, transparent); color: var(--warning); font-size: 11px; font-weight: 600; }
.dash-score-err { gap: 0; }
/* "Start Today!": the whole card is a button that opens Quick Add */
.dash-score-btn { width: 100%; border: 0; font: inherit; color: inherit; text-align: center; cursor: pointer; }
.dash-score-btn .dash-ring { display: block; }
.dash-start-ic { margin-bottom: 8px; fill: var(--primary); }
.dash-start-title { display: block; margin-bottom: 4px; font-size: 18px; font-weight: 600; color: var(--text); }
.dash-start-sub { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); }
.dash-band-0 .dash-status { color: var(--brand-sub); } /* the original's #003153 text on this card is unreadable (1.3:1) */
.dash-track { margin-left: 4px; padding: 3px 8px; border-radius: 10px; background: color-mix(in srgb, var(--success) 12.5%, transparent); color: var(--success); font-size: 11px; font-weight: 600; }
.dash-err-ic { fill: var(--error); }
.dash-err-text { margin: 12px 0 16px; font-size: 14px; text-align: center; color: var(--error); }
.dash-retry { border: 0; border-radius: 25px; padding: 12px 24px; background: var(--primary); color: #fff; font: 600 14px var(--font); cursor: pointer; }

/* Sections: title 20/700 with 16 under it (Today's Priorities sits in a header with 16 more, as the original) */
.dash-section { margin-bottom: 24px; padding: 0 4px; }
.dash-section-head { margin-bottom: 16px; }
.dash-section-title { margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--text); }
.dash-gen { font-size: 12px; font-weight: 400; font-style: italic; color: var(--text-muted); }
.dash-loading { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 24px 16px; font-size: 14px; font-style: italic; color: var(--text-2); }
.dash-loading-ic { flex: none; fill: var(--accent); animation: dash-spin 2s linear infinite; }
.dash-empty { display: flex; flex-direction: column; align-items: center; padding: 40px 16px; text-align: center; }
.dash-empty-ic { fill: var(--text-muted); }
.dash-empty-title { margin: 12px 0 8px; font-size: 16px; font-weight: 600; color: var(--text-2); }
.dash-empty-sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }

/* Priority cards */
.dash-prio-card { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: var(--card); color: var(--text); text-decoration: none; }
.dash-prio-left { flex: 1; min-width: 0; display: flex; align-items: center; padding: 16px; }
.dash-prio-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 12.5%, transparent); }
.dash-prio-ic svg { fill: var(--c); }
.dash-prio-text { flex: 1; min-width: 0; }
.dash-prio-title { display: block; margin-bottom: 2px; font-size: 16px; font-weight: 600; color: var(--text); }
.dash-prio-sub { display: block; font-size: 13px; color: var(--text-2); opacity: .8; }
.dash-prio-right { flex: none; display: flex; align-items: center; margin-right: 5px; }
.dash-prio-dur { font-size: 13px; font-weight: 600; color: var(--c); }
.dash-chev { fill: var(--text-muted); }
/* a done task (develop's priority*Completed styles) */
.dash-prio-card.done { opacity: .85; border: 2px solid rgba(76,175,80,0.5); background: linear-gradient(var(--card), rgba(76,175,80,0.1)); }
.dash-prio-card.done .dash-prio-left { opacity: .9; }
.dash-prio-card.done .dash-prio-ic { opacity: .8; background: rgba(150,150,150,0.2); }
.dash-prio-card.done .dash-prio-ic svg { fill: var(--text-muted); }
.dash-prio-card.done .dash-prio-name { text-decoration: line-through; opacity: .9; }
.dash-prio-card.done .dash-prio-sub { opacity: .8; }
.dash-prio-card.done .dash-prio-right { opacity: .85; }
.dash-prio-card.done .dash-prio-dur { color: var(--text-muted); text-decoration: line-through; opacity: .8; }
.dash-check { fill: var(--success); }
.dash-fallback { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; padding: 0 4px; font-size: 11px; color: var(--text-muted); }
.dash-fallback svg { flex: none; fill: var(--text-muted); }

/* Last 7 Days: three cards (160 tall, border rgba(59,127,149,0.3)), 7 bars 4 wide, the last in full color */
.dash-minis { display: flex; margin: 0 -5px; }
.dash-mini { flex: 1 1 33.33%; min-width: 0; margin: 0 5px; display: flex; flex-direction: column; height: 160px; padding: 12px; border-radius: 12px; border: 1px solid rgba(59,127,149,0.3); background: var(--card); }
.dash-mini-head { display: flex; align-items: center; margin-bottom: 8px; }
.dash-mini-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 4px; border-radius: 12px; background: color-mix(in srgb, var(--c) 8%, transparent); }
.dash-mini-ic svg { fill: var(--c); }
.dash-mini-title { flex: 1; min-width: 0; margin: 0; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-mini-area { flex: 1; display: flex; align-items: center; justify-content: center; margin: 8px 0; }
.dash-mini-bars { display: block; fill: var(--c); }
.dash-mini-value { margin: 0 0 4px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-mini-trend { align-self: center; margin: 0; padding: 2px 6px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.dash-up { color: #4CAF50; }   /* the original's trend colors */
.dash-down { color: #F44336; }
.dash-flat { color: var(--text-muted); }

/* Quick Add: the 125×56 button (signupLinkColor) above the tab bar, and its menu of three 120×56 pills */
.dash-fab { position: fixed; z-index: 998; right: max(24px, calc(50% - 276px)); bottom: calc(100px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: center; width: 125px; height: 56px; border: 0; border-radius: 28px; background: var(--brand-sub); color: #000; font: 14px var(--font); cursor: pointer; box-shadow: 0 4px 8px rgba(0,0,0,0.3); animation: dash-pop .5s cubic-bezier(.34,1.56,.64,1) both; }
.dash-fab svg { fill: var(--primary); } /* textInverse; the label is the original's unstyled (black) Text */
.dash-backdrop { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.3); }
.dash-menu { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.dash-opt { position: fixed; right: max(24px, calc(50% - 276px)); display: flex; align-items: center; justify-content: center; gap: 8px; width: 120px; height: 56px; padding: 0 12px; border: 0; border-radius: 28px; background: var(--c); color: var(--primary); font: 600 14px var(--font); cursor: pointer; pointer-events: auto; box-shadow: 0 4px 8px rgba(0,0,0,0.3); animation: dash-opt .25s ease-out both; }
.dash-opt svg { fill: var(--primary); }
.dash-opt-0 { bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
.dash-opt-1 { bottom: calc(240px + env(safe-area-inset-bottom, 0px)); }
.dash-opt-2 { bottom: calc(310px + env(safe-area-inset-bottom, 0px)); }
.dash-backdrop[hidden], .dash-menu[hidden] { display: none; }

/* The check-in sheet (ManualDataModal): slides up from the bottom, #195e96, top corners 24, at most 80% tall */
.dash-sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: 600px; max-height: 80vh; max-height: 80dvh; margin: 0 auto; padding: 20px 0 0; border: 0; border-radius: 24px 24px 0 0; background: #195e96; color: var(--text); overflow: hidden; }
.dash-sheet[open] { display: flex; flex-direction: column; animation: dash-up .3s ease-out; }
.dash-sheet::backdrop { background: rgba(0,0,0,0.5); }
.dash-sheet-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dash-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; margin-bottom: 20px; }
.dash-sheet-title { margin: 0; font-size: 20px; font-weight: 700; }
.dash-x { display: flex; padding: 0; border: 0; background: none; color: var(--text-2); cursor: pointer; }
.dash-x svg { fill: currentColor; }
.dash-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px; }
.dash-sheet-body.stress { padding-bottom: 80px; }
.dash-dd { margin-bottom: 20px; }
.dash-dd-date { margin: 0 20px 20px; }
.dash-dd-label { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.dash-star { color: #FF6B6B; font-size: 12px; } /* the original's error red */
.dash-dd-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: var(--text); font: 16px var(--font); text-align: left; cursor: pointer; }
.dash-dd-btn.open { border-color: var(--accent); }
.dash-dd-btn.err { border-color: #FF6B6B; }
.dash-date-btn { border-color: transparent; background: var(--input-bg); }
.dash-dd-text { flex: 1; min-width: 0; }
.dash-dd-text.empty { font-style: italic; color: var(--text-2); }
.dash-dd-arrow { flex: none; fill: var(--text-2); }
.dash-dd-opts { margin: 4px 0; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); overflow: hidden; }
.dash-dd-opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid rgba(255,255,255,0.1); background: none; color: var(--text); font: 14px var(--font); text-align: left; cursor: pointer; }
.dash-dd-opt:last-child { border-bottom: 0; }
.dash-dd-opt span { flex: 1; }
.dash-dd-opt.on { background: color-mix(in srgb, var(--accent) 12.5%, transparent); color: var(--accent); }
.dash-dd-opt svg { fill: var(--accent); }
.dash-dd-err { margin: 4px 0 0; font-size: 12px; color: #FF6B6B; }
.dash-save { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)); padding: 14px 0; border: 0; border-radius: 12px; background: var(--brand-sub); color: var(--on-brand-sub); font: 700 18px var(--font); letter-spacing: 1px; cursor: pointer; }
.dash-save svg { fill: var(--on-brand-sub); }
.dash-save:disabled { opacity: .7; cursor: default; }

/* Select Date (the original's date-picker modal) */
.dash-datepick { width: 90%; max-width: 400px; padding: 20px; border: 0; border-radius: 16px; background: #195e96; color: var(--text); text-align: center; }
.dash-datepick::backdrop { background: rgba(0,0,0,0.5); }
.dash-datepick-title { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
.dash-datepick-field input { width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(135,206,235,0.4); background: var(--input-bg); color: var(--text); font: 16px var(--font); color-scheme: dark; }
.dash-datepick-btns { display: flex; justify-content: space-around; margin-top: 20px; }
.dash-datepick-btn { flex: 1; margin: 0 8px; padding: 12px 20px; border: 0; border-radius: 8px; font: 600 16px var(--font); cursor: pointer; }
.dash-datepick-btn.cancel { background: rgba(135,206,235,0.4); color: var(--text); } /* borderInput */
.dash-datepick-btn.ok { background: var(--brand-sub); color: var(--on-brand-sub); }

/* The card on Home links to Brain Score Details when there is a score */
.dash-score-link { color: inherit; text-decoration: none; }

/* Brain Score Details (develop's BrainScoreDetailScreen.tsx): the Profile screen's header (a 35 round back button on
   buttonGradient, the title 20/700 centered), the card as on Home, Overall Assessment and the Score Breakdown cards. */
.dash-detail .stack-head { justify-content: space-between; padding: 4px 4px 10px; }
.dash-detail .stack-head::after { content: ''; flex: none; width: 44px; }
.dash-detail .stack-head .back { flex: none; width: 35px; height: 35px; border-radius: 22px; background: linear-gradient(180deg, #1DA1F2, #126180); color: var(--text); }
.dash-detail .stack-head .back svg { width: 20px; height: 20px; }
.dash-detail .stack-title { flex: 1; text-align: center; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.dash-detail-body { padding: 10px 4px 60px; }
.dash-detail-card { margin: 20px 0; }
.dash-detail-card .dash-start-title { margin: 0 0 4px; }
.dash-detail-card .dash-start-sub { margin: 0; }
.dash-ready { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); color: var(--brand-sub); } /* #003153 text is unreadable here */
.dash-ready .dash-dot { background: var(--primary); }
.dash-assess { margin-bottom: 20px; padding: 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.dash-assess-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--text); }
.dash-assess-h svg { flex: none; fill: var(--accent); }
.dash-assess-text { margin: 0; font-size: 15px; line-height: 22px; color: var(--text-2); }
/* getColor for each status */
.dash-st-excellent { --cc: #4CAF50; }
.dash-st-good { --cc: #8BC34A; }
.dash-st-fair { --cc: #FFC107; }
.dash-st-poor { --cc: #FF9800; }
.dash-st-critical { --cc: #FF5722; }
.dash-cat { margin-bottom: 16px; padding: 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.dash-cat-head { display: flex; align-items: center; margin-bottom: 16px; }
.dash-cat-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-right: 12px; border-radius: 24px; background: linear-gradient(var(--cc), color-mix(in srgb, var(--cc) 80%, transparent)); }
.dash-cat-ic svg { fill: #fff; }
.dash-cat-info { flex: 1; min-width: 0; }
.dash-cat-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--text); }
.dash-cat-score { margin: 0; font-size: 14px; font-weight: 500; color: var(--cc); }
.dash-cat-status { flex: none; padding: 8px 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.3); background: color-mix(in srgb, var(--cc) 8%, transparent); color: var(--cc); font-size: 13px; font-weight: 600; letter-spacing: .8px; }
.dash-cat-bar { display: block; margin-bottom: 16px; border-radius: 4px; }
.dash-cat-track { fill: color-mix(in srgb, var(--cc) 12.5%, transparent); }
.dash-cat-fill { fill: var(--cc); }
.dash-cat-h { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.dash-cat-list { margin: 0 0 16px; padding: 0; list-style: none; }
.dash-cat-list li { margin-bottom: 4px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.dash-cat-recs { margin-bottom: 8px; }

@keyframes dash-in { from { opacity: 0; transform: translateY(50px); } }
@keyframes dash-fill { from { stroke-dashoffset: 521.5; } } /* the ring's full length, 2π × 83 */
@keyframes dash-pulse { 50% { transform: scale(1.05); opacity: .6; } }
@keyframes dash-spin { to { transform: rotate(360deg); } }
@keyframes dash-pop { from { transform: scale(0); } }
@keyframes dash-opt { from { opacity: 0; transform: translateY(20px) scale(0); } }
@keyframes dash-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  .dash-score, .dash-ring-fill, .dash-glow, .dash-loading-ic, .dash-fab, .dash-opt, .dash-sheet[open] { animation: none; }
}
