/* Sleep ecosystem: visible AI analysis workflow, result dashboard and history. */
.eco-sheet--result { max-height: 92dvh; padding-right: 14px; padding-left: 14px; }

.eco-analyzing { padding: 18px 3px 6px; text-align: center; }
.eco-ai-orbit { position: relative; display: grid; width: 92px; height: 92px; margin: 3px auto 18px; place-items: center; }
.eco-ai-orbit > span { z-index: 2; display: grid; width: 52px; height: 52px; color: #fff; background: linear-gradient(145deg,#747bf3,#535be0); border-radius: 17px; box-shadow: 0 12px 26px rgba(83,91,224,.25); place-items: center; font-size: 16px; font-weight: 850; }
.eco-ai-orbit > i { position: absolute; inset: 4px; border: 1px solid #cacdff; border-top-color: #5b63e8; border-radius: 50%; animation: eco-analysis-spin 1.8s linear infinite; }
.eco-ai-orbit > i:last-child { inset: 15px; border-color: #bdebdc; border-bottom-color: #25b98c; animation-direction: reverse; animation-duration: 1.2s; }
.eco-analyzing h3 { margin: 0; color: #292b36; font-size: 18px; }
.eco-analyzing > p { margin: 7px auto 0; max-width: 300px; color: #7b7e88; font-size: 11px; line-height: 1.55; }
.eco-analysis-progress { height: 7px; margin: 20px 4px 7px; overflow: hidden; background: #ececf3; border-radius: 999px; }
.eco-analysis-progress > i { display: block; height: 100%; background: linear-gradient(90deg,#686ff0,#4ec7a4); border-radius: inherit; transition: width .32s ease; }
.eco-analyzing > small { color: #8d9099; font-size: 9px; }
.eco-analysis-phases { display: grid; gap: 7px; margin-top: 18px; }
.eco-analysis-phases > div { display: flex; align-items: center; min-height: 43px; padding: 0 11px; color: #9a9ca5; background: #f7f7fa; border: 1px solid #eeeef3; border-radius: 12px; text-align: left; }
.eco-analysis-phases span { display: grid; flex: none; width: 24px; height: 24px; margin-right: 9px; color: #8d9099; background: #e9e9ef; border-radius: 8px; place-items: center; font-size: 9px; font-weight: 800; }
.eco-analysis-phases b { font-size: 11px; }
.eco-analysis-phases > div.active { color: #5159dc; background: #f2f3ff; border-color: #dfe1ff; }
.eco-analysis-phases > div.active span { color: #fff; background: #5b63e8; animation: eco-analysis-pulse 1s ease infinite; }
.eco-analysis-phases > div.done { color: #237d63; background: #edf9f5; border-color: #d3eee5; }
.eco-analysis-phases > div.done span { color: #fff; background: #25b98c; }

.eco-result { padding: 9px 0 2px; }
.eco-result-hero { display: grid; align-items: center; padding: 15px; color: #fff; background: radial-gradient(circle at 95% 0,rgba(122,237,204,.25),transparent 38%),linear-gradient(145deg,#30346f,#555bd0); border-radius: 17px; grid-template-columns: 82px minmax(0,1fr); gap: 13px; }
.eco-result-hero.attention { background: radial-gradient(circle at 95% 0,rgba(255,213,116,.25),transparent 38%),linear-gradient(145deg,#4e477e,#7560aa); }
.eco-score-ring { display: grid; width: 78px; height: 78px; padding: 5px; background: conic-gradient(#7de5c5 var(--score),rgba(255,255,255,.18) 0); border-radius: 50%; place-items: center; }
.eco-score-ring > span { display: grid; width: 100%; height: 100%; background: #3e438d; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; place-content: center; text-align: center; }
.attention .eco-score-ring > span { background: #5d4d83; }
.eco-score-ring b,.eco-score-ring small { display: block; }
.eco-score-ring b { font-size: 25px; line-height: 1; }
.eco-score-ring small { margin-top: 4px; color: rgba(255,255,255,.7); font-size: 8px; }
.eco-result-hero > div:last-child > small { display: flex; align-items: center; color: #d6d8ff; font-size: 9px; }
.eco-result-hero > div:last-child > small i { width: 6px; height: 6px; margin-right: 5px; background: #74e1be; border-radius: 50%; box-shadow: 0 0 0 4px rgba(116,225,190,.13); }
.eco-result-hero h3 { margin: 7px 0 0; font-size: 16px; line-height: 1.3; }
.eco-result-hero p { margin: 5px 0 0; color: rgba(255,255,255,.72); font-size: 10px; line-height: 1.55; }
.eco-result-meta { display: flex; align-items: center; gap: 5px; margin: 9px 1px 0; overflow-x: auto; scrollbar-width: none; }
.eco-result-meta::-webkit-scrollbar { display: none; }
.eco-result-meta span { flex: none; padding: 5px 8px; color: #777a84; background: #f3f3f7; border-radius: 999px; font-size: 8px; }
.eco-dimensions,.eco-findings,.eco-actions { margin-top: 11px; padding: 13px; background: #fff; border: 1px solid #e8e8ee; border-radius: 15px; box-shadow: 0 5px 17px rgba(24,24,27,.035); }
.eco-dimensions header,.eco-findings header,.eco-actions header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.eco-dimensions header b,.eco-findings header b,.eco-actions header b { font-size: 13px; }
.eco-dimensions header small,.eco-findings header small,.eco-actions header small { color: #8e8e93; font-size: 9px; }
.eco-dimensions > div { display: grid; align-items: center; min-height: 29px; grid-template-columns: 67px minmax(0,1fr) 25px; gap: 8px; }
.eco-dimensions > div > span { color: #63666f; font-size: 10px; }
.eco-dimensions > div > i { height: 6px; overflow: hidden; background: #eeeff3; border-radius: 999px; }
.eco-dimensions > div > i em { display: block; height: 100%; background: linear-gradient(90deg,#7c82f3,#54c7a7); border-radius: inherit; animation: eco-bar-in .65s ease both; }
.eco-dimensions > div > b { color: #5159dc; font-size: 10px; text-align: right; }
.eco-findings article { display: flex; align-items: flex-start; padding: 9px 0; border-top: 1px solid #efeff2; }
.eco-findings article > span { display: grid; flex: none; width: 24px; height: 24px; margin-right: 9px; color: #fff; background: linear-gradient(145deg,#747bf3,#555de0); border-radius: 8px; place-items: center; font-size: 9px; font-weight: 800; }
.eco-findings article b { display: block; font-size: 11px; }
.eco-findings article p { margin: 3px 0 0; color: #737680; font-size: 10px; line-height: 1.5; }
.eco-actions > div { display: flex; align-items: center; min-height: 47px; padding: 7px 0; border-top: 1px solid #efeff2; }
.eco-actions > div > span { display: grid; flex: none; width: 23px; height: 23px; color: #208066; background: #e8f8f2; border-radius: 50%; place-items: center; font-size: 9px; font-weight: 800; }
.eco-actions p { flex: 1; margin: 0 7px; color: #70737c; font-size: 9px; line-height: 1.45; }
.eco-actions p b { display: block; margin-bottom: 2px; color: #2c2d34; font-size: 10px; }
.eco-actions em { flex: none; padding: 4px 6px; color: #9a6829; background: #fff4e2; border-radius: 6px; font-size: 8px; font-style: normal; }
.eco-result-buttons { display: grid; gap: 8px; margin-top: 12px; grid-template-columns: 1fr 1.35fr; }
.eco-result-buttons .ghost-btn,.eco-result-buttons .primary-btn { min-height: 44px; }

.eco-history-head { margin-top: 21px; }
.eco-history { overflow: hidden; padding: 0 12px; }
.eco-history > button { display: flex; align-items: center; width: 100%; min-height: 61px; padding: 0; background: transparent; border-bottom: 1px solid #efeff2; text-align: left; }
.eco-history > button:last-child { border: 0; }
.eco-history > button > span { display: grid; flex: none; width: 34px; height: 34px; color: #fff; background: linear-gradient(145deg,#737af3,#55c4a5); border-radius: 11px; place-items: center; font-size: 10px; font-weight: 850; }
.eco-history > button > div { flex: 1; min-width: 0; margin-left: 9px; }
.eco-history b,.eco-history small { display: block; }
.eco-history > button > div b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.eco-history > button > div small { margin-top: 3px; color: #92949c; font-size: 9px; }
.eco-history > button > strong { color: #555ddd; font-size: 17px; }
.eco-history > button > strong small { display: inline; font-size: 8px; }
.eco-history > button > em { margin-left: 7px; color: #afb1b8; font-size: 18px; font-style: normal; }

@keyframes eco-analysis-spin { to { transform: rotate(360deg); } }
@keyframes eco-analysis-pulse { 50% { transform: scale(.88); opacity: .72; } }
@keyframes eco-bar-in { from { width: 0 !important; } }

@media (max-width:360px) {
  .eco-sheet--result { padding-right: 10px; padding-left: 10px; }
  .eco-result-hero { padding: 12px; grid-template-columns: 69px minmax(0,1fr); gap: 10px; }
  .eco-score-ring { width: 66px; height: 66px; }
  .eco-score-ring b { font-size: 21px; }
  .eco-result-hero h3 { font-size: 14px; }
  .eco-result-hero p { font-size: 9px; }
  .eco-dimensions,.eco-findings,.eco-actions { padding: 11px; }
}

@media (prefers-reduced-motion:reduce) {
  .eco-ai-orbit > i,.eco-analysis-phases > div.active span,.eco-dimensions > div > i em { animation: none; }
}
