:root {
  color-scheme: dark;
  --bg: #101116;
  --panel: #17191f;
  --panel-soft: #1b1d24;
  --border: #282a33;
  --text: #f1f0f7;
  --muted: #898a98;
  --dim: #60616e;
  --violet: #9a81ff;
  --blue: #71a7ff;
  --teal: #54d6bd;
  --green: #6ed9a4;
  --amber: #f3bc6c;
  --red: #fb7d87;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 360px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; flex-direction: column;
  width: 244px; padding: 27px 17px 18px; background: #131419; border-right: 1px solid #24252d;
}
.brand { display: flex; align-items: center; gap: 11px; height: 35px; margin: 0 8px 59px; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 3px; transform: rotate(-9deg); }
.brand-mark span { border-radius: 2px; background: var(--violet); }
.brand-mark span:nth-child(2) { opacity: .68; }
.brand-mark span:nth-child(3) { opacity: .42; }
.brand-mark span:nth-child(4) { opacity: .8; }
.brand-name { font: 700 15px Manrope, sans-serif; letter-spacing: -.55px; }
.brand-name span { color: var(--violet); }
.nav-label, .section-kicker, .eyebrow, .metric-label, .meta-label, .detail-label {
  font-family: 'DM Mono', monospace; letter-spacing: 1.05px;
}
.nav-label { margin: 0 12px 13px; color: #60616e; font-size: 9px; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; color: #92929f; border: 1px solid transparent; border-radius: 7px; font-size: 12px; transition: color .2s, background .2s; }
.nav-item:hover { color: #e7e5ef; background: #1a1b22; }
.nav-item.active { color: #c5b9ff; background: #211f2c; border-color: #322d43; }
.nav-icon { width: 15px; color: #777887; font-size: 17px; text-align: center; }
.nav-item.active .nav-icon { color: var(--violet); }
.sidebar-bottom { margin-top: auto; }
.privacy-card { display: flex; gap: 11px; margin: 0 1px 20px; padding: 13px 11px; background: #191a20; border: 1px solid #292a31; border-radius: 8px; }
.privacy-icon { flex: 0 0 auto; color: var(--teal); font-size: 17px; }
.privacy-card strong { display: block; margin: 1px 0 5px; color: #dedde6; font-size: 10px; font-weight: 600; }
.privacy-card p { margin: 0; color: #81828e; font-size: 9px; line-height: 1.6; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; padding: 13px 3px 2px; border-top: 1px solid #292a31; }
.profile-avatar { display: grid; width: 30px; height: 30px; place-items: center; color: #d7ccff; background: #302944; border-radius: 8px; font: 500 9px 'DM Mono', monospace; }
.profile-copy { display: grid; gap: 3px; }
.profile-copy strong { color: #d5d4dd; font-size: 10px; font-weight: 600; }
.profile-copy span { color: #797a87; font-size: 9px; }
.online-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px #6ed9a455; }

.main-content { max-width: 1600px; min-height: 100vh; margin-left: 244px; padding: 0 48px 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 67px; border-bottom: 1px solid #23242b; }
.breadcrumb { color: #777884; font-size: 10px; }
.breadcrumb span { margin: 0 8px; color: #4d4e59; }
.breadcrumb strong { color: #b5b4bf; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 13px; color: #858692; font: 9px 'DM Mono', monospace; }
.live-indicator, .section-note, .mini-live { display: inline-flex; align-items: center; gap: 7px; }
.live-indicator i, .mini-live i, .page-footer i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px #6ed9a477; }
.topbar-divider { height: 14px; border-left: 1px solid #34353d; }
.top-date { color: #a3a3ad; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; margin: 37px 0 25px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; color: #92909f; font-size: 9px; }
.eyebrow-line { width: 17px; border-top: 1px solid var(--violet); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font: 700 29px Manrope, sans-serif; letter-spacing: -1.1px; }
.title-period { color: var(--violet); }
.subtitle { margin: 0; color: #90909c; font-size: 12px; }
.diagnose-button { display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 13px; color: #17131f; background: #b3a3ff; border: 1px solid #c0b3ff; border-radius: 6px; box-shadow: 0 5px 24px #9a81ff20; cursor: pointer; font-size: 11px; font-weight: 700; transition: transform .2s, background .2s, box-shadow .2s; }
.diagnose-button:hover { transform: translateY(-2px); background: #c5b9ff; box-shadow: 0 8px 28px #9a81ff35; }
.diagnose-button:disabled { cursor: progress; opacity: .8; }
.button-spark { font-size: 15px; }
.button-arrow { margin-left: 5px; font-size: 13px; }
.diagnose-button.is-scanning .button-spark { animation: spin 1s linear infinite; }

.system-banner { display: flex; align-items: center; min-height: 91px; padding: 17px 20px; background: linear-gradient(105deg, #1c1b27, #191a21 55%, #191d23); border: 1px solid #302d3d; border-radius: 9px; }
.device-symbol { display: grid; flex: 0 0 43px; width: 43px; height: 43px; margin-right: 15px; place-items: center; color: #c7baff; background: #302a42; border: 1px solid #45405a; border-radius: 9px; font-size: 22px; }
.device-info { flex: 1; min-width: 175px; }
.device-title { display: flex; align-items: center; gap: 10px; }
.device-title h2 { margin: 0; font: 600 14px Manrope, sans-serif; }
.device-info p { margin: 5px 0 0; color: #8b8b98; font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; color: #83d9a7; background: #1b3229; border: 1px solid #294836; border-radius: 20px; font: 9px 'DM Mono', monospace; }
.status-pill i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.banner-meta { display: grid; gap: 7px; min-width: 119px; padding-left: 20px; border-left: 1px solid #34323d; }
.meta-label { color: #696a77; font-size: 8px; }
.banner-meta strong { color: #c9c8d2; font-size: 10px; font-weight: 500; }
.last-meta { min-width: 107px; }

.section-block { margin-top: 31px; }
.section-heading, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; }
.section-kicker { margin-bottom: 5px; color: #777885; font-size: 8px; }
.section-heading h2, .panel-heading h2 { margin: 0; font: 600 16px Manrope, sans-serif; letter-spacing: -.35px; }
.section-note { padding-bottom: 3px; color: #858592; font: 9px 'DM Mono', monospace; }
.pulse-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 15px; }
.metric-card { min-width: 0; height: 174px; padding: 15px 16px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-label { color: #9b9ba7; font-size: 8px; }
.metric-icon { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 6px; font-size: 15px; }
.icon-violet { color: var(--violet); background: #282236; }
.icon-blue { color: var(--blue); background: #202b3c; }
.icon-teal { color: var(--teal); background: #1d302e; }
.metric-value-row { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; }
.metric-value { font: 600 23px Manrope, sans-serif; letter-spacing: -.8px; }
.metric-unit { color: #777885; font-size: 9px; }
.chart-wrap { height: 46px; margin: 3px -1px 1px; }
.chart-wrap canvas { display: block; width: 100%; height: 100%; }
.metric-foot { display: flex; align-items: center; gap: 7px; color: #898a96; font-size: 9px; }
.metric-foot-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; }
.violet-dot { background: var(--violet); }.blue-dot { background: var(--blue); }.teal-dot { background: var(--teal); }
.storage-track { height: 4px; margin: 19px 0 19px; overflow: hidden; background: #292b33; border-radius: 8px; }
.storage-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #43bca5, #7ae2c7); border-radius: inherit; transition: width .8s ease; }

.content-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 13px; margin-top: 18px; }
.panel { min-width: 0; padding: 17px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.panel-heading { align-items: center; }
.health-label { padding: 5px 8px; color: #c0b4ff; background: #29243a; border: 1px solid #3a3350; border-radius: 20px; font: 9px 'DM Mono', monospace; }
.health-layout { display: flex; align-items: center; gap: 20px; min-height: 139px; border-bottom: 1px solid #292a32; }
.health-score-wrap { position: relative; flex: 0 0 117px; width: 117px; height: 117px; }
.health-ring { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.ring-track, .ring-progress { fill: none; stroke-width: 7; }
.ring-track { stroke: #2b2c35; }
.ring-progress { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 371; stroke-dashoffset: 371; transition: stroke-dashoffset .8s ease, stroke .4s ease; }
.health-score { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.health-score strong { font: 700 31px Manrope, sans-serif; letter-spacing: -1px; }
.health-score span { margin-top: -1px; color: #8a8b97; font: 8px 'DM Mono', monospace; letter-spacing: 1.1px; }
.health-copy h3 { margin: 0 0 6px; font: 600 12px Manrope, sans-serif; }
.health-copy p { max-width: 260px; margin: 0; color: #898a96; font-size: 10px; line-height: 1.55; }
.health-legend { display: flex; gap: 12px; margin-top: 11px; color: #8a8a96; font-size: 8px; }
.health-legend span { display: inline-flex; align-items: center; gap: 5px; }
.health-legend i { width: 5px; height: 5px; border-radius: 50%; }
.legend-good { background: var(--green); }.legend-limited { background: var(--amber); }
.findings-heading { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 7px; }
.findings-heading h3 { margin: 0; color: #d3d2dc; font-size: 10px; font-weight: 600; }
.findings-heading span { color: #777885; font: 9px 'DM Mono', monospace; }
.finding-list { display: grid; gap: 5px; }
.finding-item { display: flex; align-items: flex-start; gap: 9px; padding: 8px 9px; background: #1b1c23; border: 1px solid #292a32; border-radius: 6px; animation: rise-in .3s both; }
.finding-severity { display: grid; flex: 0 0 17px; width: 17px; height: 17px; place-items: center; border-radius: 5px; font: 10px 'DM Mono', monospace; }
.finding-severity.info { color: var(--blue); background: #222d3d; }
.finding-severity.good { color: var(--green); background: #203329; }
.finding-severity.warning { color: var(--amber); background: #362c20; }
.finding-item strong { display: block; margin: 1px 0 3px; color: #d4d3dc; font-size: 9px; font-weight: 600; }
.finding-item p { margin: 0; color: #858692; font-size: 9px; line-height: 1.45; }
.empty-state { padding: 11px; color: #777885; background: #1b1c23; border-radius: 6px; font-size: 9px; }

.recommendation-icon { color: var(--violet); font-size: 17px; }
.recommendation-intro { margin: 9px 0 12px; color: #898a96; font-size: 10px; }
.recommendation-list { display: grid; gap: 1px; }
.recommendation-item { display: grid; grid-template-columns: 24px 1fr 12px; gap: 9px; align-items: start; padding: 12px 0; border-top: 1px solid #292a32; }
.recommendation-number { padding-top: 1px; color: #a595e8; font: 9px 'DM Mono', monospace; }
.recommendation-item strong { display: block; margin-bottom: 4px; color: #d6d5de; font-size: 10px; font-weight: 600; }
.recommendation-item p { margin: 0; color: #858692; font-size: 9px; line-height: 1.5; }
.recommendation-arrow { padding-top: 1px; color: #777485; font-size: 11px; }
.recommendation-foot { display: flex; align-items: center; gap: 7px; margin-top: 1px; padding-top: 10px; color: #777885; border-top: 1px solid #292a32; font-size: 8px; }
.sparkle { color: var(--violet); }

.lower-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 13px; margin-top: 15px; }
.compact-heading { align-items: flex-start; }
.compact-heading h2 { font-size: 14px; }
.mini-live { padding-top: 3px; color: #85d6a5; font: 8px 'DM Mono', monospace; }
.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 19px; }
.detail-stat { display: flex; gap: 10px; min-width: 0; }
.detail-icon { display: grid; flex: 0 0 29px; width: 29px; height: 29px; place-items: center; border-radius: 7px; }
.network-icon { color: #76aaff; background: #202c3d; font-size: 16px; }
.battery-icon { color: #6ed9a4; background: #21352c; font-size: 13px; }
.detail-stat > div { display: grid; gap: 3px; min-width: 0; }
.detail-label { color: #7d7e8a; font-size: 7px; }
.detail-stat strong { overflow: hidden; color: #d3d2dc; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.detail-stat small { color: #858692; font-size: 8px; }
.detail-disclaimer { margin-top: 15px; padding-top: 9px; color: #797a86; border-top: 1px solid #2a2b33; font-size: 8px; line-height: 1.5; }
.access-lock { color: #9d8ae6; font-size: 17px; }
.access-list { display: grid; margin-top: 10px; }
.access-row { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 28px; border-top: 1px solid #292a32; }
.access-row > span:nth-child(2) { color: #b5b4bf; font-size: 9px; }
.access-check, .access-cross { display: grid; width: 13px; height: 13px; place-items: center; border-radius: 4px; font-size: 9px; }
.access-check { color: var(--green); background: #203329; }.access-cross { color: #99909a; background: #2a2930; }
.access-state { font: 8px 'DM Mono', monospace; }
.access-state.available { color: #70cf9d; }.access-state.restricted { color: #90909a; }
.page-footer { display: flex; justify-content: space-between; margin-top: 17px; color: #686975; font-size: 8px; }
.page-footer > span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.page-footer b { color: #494a55; font-weight: 400; }

@keyframes pulse { 50% { opacity: .38; box-shadow: 0 0 2px #6ed9a433; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .main-content { margin-right: auto; padding-right: 64px; padding-left: 64px; }
}
@media (max-width: 1160px) {
  .sidebar { width: 208px; }
  .main-content { margin-left: 208px; padding-right: 27px; padding-left: 27px; }
  .banner-meta { min-width: 100px; padding-left: 14px; }
  .last-meta { min-width: 94px; }
  .content-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 67px; align-items: center; padding-right: 8px; padding-left: 8px; }
  .brand { margin: 0 0 51px; }
  .brand-name, .nav-label, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .sidebar nav { width: 100%; }
  .nav-item { justify-content: center; gap: 0; padding: 0; }
  .nav-icon { font-size: 18px; }
  .privacy-card, .profile-copy, .online-dot { display: none; }
  .sidebar-profile { justify-content: center; width: 100%; }
  .main-content { margin-left: 67px; }
}
@media (max-width: 700px) {
  .main-content { padding: 0 18px 18px; }
  .topbar { height: 57px; }
  .topbar-right { gap: 8px; font-size: 8px; }
  .welcome-row { align-items: flex-start; gap: 17px; margin-top: 27px; }
  h1 { font-size: 25px; }
  .subtitle { max-width: 270px; font-size: 10px; line-height: 1.5; }
  .diagnose-button { flex: 0 0 auto; gap: 7px; height: 37px; padding: 0 9px; font-size: 9px; }
  .button-arrow { display: none; }
  .system-banner { flex-wrap: wrap; gap: 13px 0; padding: 14px; }
  .device-info { flex: 1 1 calc(100% - 58px); }
  .banner-meta { flex: 1; min-width: 0; padding-left: 12px; }
  .banner-meta:nth-last-child(2) { border-left: none; padding-left: 0; }
  .last-meta { min-width: 0; }
  .metric-grid { grid-template-columns: 1fr; gap: 9px; }
  .metric-card { height: 159px; }
  .chart-wrap { height: 39px; }
  .storage-track { margin: 16px 0; }
  .content-grid, .lower-grid { grid-template-columns: 1fr; }
  .health-layout { gap: 13px; }
  .health-score-wrap { flex-basis: 106px; width: 106px; height: 106px; }
  .page-footer { flex-wrap: wrap; gap: 9px; line-height: 1.5; }
}
@media (max-width: 430px) {
  .sidebar { width: 52px; padding-right: 6px; padding-left: 6px; }
  .main-content { margin-left: 52px; padding-right: 12px; padding-left: 12px; }
  .brand { transform: scale(.9); }
  .top-date, .topbar-divider { display: none; }
  .welcome-row { align-items: flex-start; flex-direction: column; }
  .diagnose-button { align-self: flex-start; }
  .health-legend { gap: 7px; }
  .health-copy p { font-size: 9px; }
  .access-row > span:nth-child(2) { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
