:root {
      --ink: #071412;
      --ink-soft: #1d2e2a;
      --muted: #667873;
      --muted-2: #8a9691;
      --line: rgba(7, 20, 18, 0.08);
      --line-strong: rgba(7, 20, 18, 0.12);
      --bg: #eef3f1;
      --surface: #f6f9f8;
      --white: #ffffff;
      --teal: #0c7469;
      --teal-deep: #08564e;
      --teal-soft: #d7efe9;
      --coral: #c2523d;
      --amber: #b07d1f;
      --blue: #256987;
      --ok: #1f8a6e;
      --safe-b: env(safe-area-inset-bottom, 0px);
      --safe-t: env(safe-area-inset-top, 0px);
      --ease: cubic-bezier(0.22, 1, 0.36, 1);
      --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
      --app-w: 402px;
      --tab-h: 78px;
      --display: "Outfit", "Vazirmatn", sans-serif;
      --shadow-sm: 0 1px 0 rgba(255,255,255,0.7) inset, 0 8px 24px rgba(8, 30, 26, 0.05);
      --shadow-md: 0 1px 0 rgba(255,255,255,0.55) inset, 0 18px 40px rgba(8, 30, 26, 0.1);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; }
    body {
      font-family: "Vazirmatn", sans-serif;
      color: var(--ink);
      background:
        radial-gradient(900px 520px at 10% -15%, #c8ddd5 0%, transparent 55%),
        radial-gradient(720px 420px at 100% 0%, #d5e2dc 0%, transparent 50%),
        linear-gradient(168deg, #d9e5e0 0%, var(--bg) 48%, #d0ddd7 100%);
      display: grid;
      place-items: center;
      min-height: 100dvh;
      padding: clamp(0.75rem, 2vw, 1.75rem);
      overflow: hidden;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    button, a {
      font: inherit;
      color: inherit;
      text-decoration: none;
      border: 0;
      background: none;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    .device {
      width: min(100%, var(--app-w));
      height: min(874px, calc(100dvh - 1.5rem));
      position: relative;
      border-radius: 44px;
      overflow: hidden;
      background: var(--surface);
      box-shadow:
        0 0 0 1px rgba(7, 20, 18, 0.1),
        0 0 0 8px rgba(255,255,255,0.35),
        0 40px 100px rgba(8, 30, 26, 0.24);
      display: flex;
      flex-direction: column;
      isolation: isolate;
    }

    .device__bezel {
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
      z-index: 50;
    }

    .notch {
      position: absolute;
      top: 11px;
      left: 50%;
      transform: translateX(-50%);
      width: 118px;
      height: 30px;
      background: #050d0c;
      border-radius: 22px;
      z-index: 60;
      box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
    }

    .notch::before {
      content: "";
      position: absolute;
      top: 10px;
      right: 18px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, #2a5a62, #0a1a18 70%);
      box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
    }

    .ambient {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      background:
        radial-gradient(340px 200px at 92% 6%, rgba(12, 116, 105, 0.13), transparent 60%),
        radial-gradient(280px 180px at 0% 38%, rgba(194, 82, 61, 0.06), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.65) 0%, transparent 22%);
    }

    .status {
      position: relative;
      z-index: 2;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: calc(0.95rem + var(--safe-t)) 1.65rem 0.15rem;
      font-family: var(--display);
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--ink-soft);
    }

    .status__meta {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      opacity: 0.72;
    }

    .status__meta svg { width: 14px; height: 14px; display: block; }

    .app {
      position: relative;
      z-index: 1;
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }

    .scroll {
      flex: 1;
      overflow: auto;
      padding: 0.2rem 1.05rem calc(var(--tab-h) + 1.25rem + var(--safe-b));
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
    }

    .scroll::-webkit-scrollbar { width: 0; }

    /* Header */
    .top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.8rem;
      padding: 0.55rem 0.05rem 0.95rem;
      animation: rise 0.7s var(--ease-out) both;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      min-width: 0;
    }

    .mark {
      width: 64px;
      height: 64px;
      display: grid;
      place-items: center;
      position: relative;
      flex-shrink: 0;
      color: var(--teal-deep);
    }

    .nevilo-brand-mark {
      width: 60px;
      height: 60px;
      filter: drop-shadow(0 10px 18px rgba(12, 116, 105, 0.24));
      position: relative;
      z-index: 1;
    }

    .nevilo-brand-mark .mark-heart {
      fill: url(#neviloBrandMarkGrad);
    }

    .nevilo-brand-mark .mark-ecg {
      fill: none;
      stroke: rgba(255, 255, 255, 0.96);
      stroke-width: 1.65;
      stroke-linecap: round;
      stroke-linejoin: round;
      vector-effect: non-scaling-stroke;
    }

    .brand__text { min-width: 0; }

    .brand__name {
      font-family: var(--display);
      font-weight: 800;
      font-size: 1.5rem;
      letter-spacing: -0.05em;
      line-height: 1;
    }

    .brand__sub {
      margin-top: 0.28rem;
      font-size: 0.78rem;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .actions {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      flex-shrink: 0;
    }

    .btn-icon {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      background: var(--white);
      border: 1px solid var(--line);
      display: grid;
      place-items: center;
      position: relative;
      box-shadow: var(--shadow-sm);
      transition: transform 0.2s var(--ease);
    }

    .btn-icon:active { transform: scale(0.94); }

    .btn-icon svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .dot {
      position: absolute;
      top: 10px;
      left: 10px;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--coral);
      border: 1.5px solid #fff;
    }

    .burger {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      background: var(--white);
      border: 1px solid var(--line);
      display: grid;
      place-items: center;
      box-shadow: var(--shadow-sm);
      transition: transform 0.2s var(--ease), background 0.2s var(--ease);
      position: relative;
      z-index: 70;
    }

    .burger:active { transform: scale(0.94); }

    .burger__lines {
      width: 18px;
      height: 12px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .burger__lines i {
      display: block;
      height: 1.8px;
      border-radius: 99px;
      background: var(--ink);
      transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), width 0.25s var(--ease);
      transform-origin: center;
    }

    .burger__lines i:nth-child(2) { width: 70%; margin-inline-start: auto; }

    .burger.is-open .burger__lines i:nth-child(1) {
      transform: translateY(5.1px) rotate(45deg);
    }

    .burger.is-open .burger__lines i:nth-child(2) {
      opacity: 0;
      width: 0;
    }

    .burger.is-open .burger__lines i:nth-child(3) {
      transform: translateY(-5.1px) rotate(-45deg);
    }

    /* Sidebar drawer */
    .scrim {
      position: absolute;
      inset: 0;
      background: rgba(5, 16, 14, 0.42);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
      z-index: 80;
    }

    .scrim.is-open {
      opacity: 1;
      visibility: visible;
    }

    .sidebar {
      position: absolute;
      top: 0;
      bottom: 0;
      right: 0;
      width: min(82%, 300px);
      background:
        linear-gradient(180deg, rgba(255,255,255,0.97) 0%, #f4f8f6 100%);
      border-left: 1px solid var(--line);
      box-shadow: -18px 0 50px rgba(7, 30, 26, 0.18);
      transform: translateX(104%);
      transition: transform 0.4s var(--ease-out);
      z-index: 90;
      display: flex;
      flex-direction: column;
      padding:
        calc(1.35rem + var(--safe-t))
        1.05rem
        calc(1.2rem + var(--safe-b));
      overflow: hidden;
    }

    .sidebar.is-open {
      transform: translateX(0);
    }

    .sidebar__head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 1.25rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid var(--line);
    }

    .sidebar__user {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      min-width: 0;
    }

    .sidebar__avatar {
      width: 44px;
      height: 44px;
      border-radius: 15px;
      background: linear-gradient(145deg, #16897c, #0a5a52);
      color: #fff;
      display: grid;
      place-items: center;
      font-family: var(--display);
      font-weight: 700;
      font-size: 0.95rem;
      flex-shrink: 0;
      box-shadow: 0 10px 20px rgba(12, 116, 105, 0.25);
    }

    .sidebar__user strong {
      display: block;
      font-size: 0.95rem;
      font-weight: 700;
      margin-bottom: 0.12rem;
    }

    .sidebar__user span {
      font-size: 0.72rem;
      color: var(--muted);
    }

    .sidebar__close {
      width: 36px;
      height: 36px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--white);
      display: grid;
      place-items: center;
      flex-shrink: 0;
      transition: transform 0.2s var(--ease);
    }

    .sidebar__close:active { transform: scale(0.94); }

    .sidebar__close svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
    }

    .sidebar__nav {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      flex: 1 1 auto;
      min-height: 0;
      overflow: auto;
    }

    .sidebar__nav::-webkit-scrollbar { width: 0; }

    .sidebar__link {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.82rem 0.75rem;
      border-radius: 16px;
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--ink-soft);
      transition: background 0.22s var(--ease), color 0.22s var(--ease), transform 0.2s var(--ease);
    }

    .sidebar__link:active { transform: scale(0.985); }

    .sidebar__link:hover,
    .sidebar__link.is-active {
      background: var(--teal-soft);
      color: var(--teal-deep);
      font-weight: 600;
    }

    .sidebar__link svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }

    .sidebar__link em {
      margin-inline-start: auto;
      font-style: normal;
      font-size: 0.68rem;
      font-weight: 700;
      color: var(--teal);
      background: rgba(12, 116, 105, 0.1);
      padding: 0.18rem 0.45rem;
      border-radius: 8px;
    }

    .sidebar__foot {
      margin-top: auto;
      padding-top: 1rem;
      border-top: 1px solid var(--line);
    }

    .sidebar__logout-form {
      margin: 0;
    }

    .sidebar__foot a,
    .sidebar__logout-btn {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      width: 100%;
      padding: 0.75rem;
      border-radius: 14px;
      font-size: 0.86rem;
      font-weight: 600;
      color: var(--coral);
      background: rgba(194, 82, 61, 0.08);
      border: 0;
      cursor: pointer;
      text-align: start;
    }

    .sidebar__logout-btn:active {
      transform: scale(0.985);
    }

    .sidebar__foot svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .sidebar__developer-credit {
      margin-top: 0.85rem;
      padding-top: 0.75rem;
      border-top: 1px solid var(--line);
      text-align: center;
    }

    .sidebar__developer-credit .nevilo-developer-credit {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.12rem;
      line-height: 1.35;
    }

    .sidebar__developer-credit .nevilo-developer-credit p {
      margin: 0;
      font-size: 0.62rem;
      font-weight: 500;
      color: rgba(7, 20, 18, 0.42);
    }

    html[data-nevilo-theme="dark"] .sidebar__developer-credit .nevilo-developer-credit p {
      color: rgba(255, 255, 255, 0.38);
    }

    body.nav-open {
      overflow: hidden;
    }

    /* Date strip */
    .strip {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 0.9rem;
      padding: 0.7rem 0.85rem;
      border-radius: 18px;
      background: rgba(255,255,255,0.55);
      border: 1px solid var(--line);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      animation: rise 0.7s var(--ease-out) 0.05s both;
    }

    .strip__date {
      display: flex;
      flex-direction: column;
      gap: 0.12rem;
    }

    .strip__date strong {
      font-size: 0.86rem;
      font-weight: 700;
    }

    .strip__date span {
      font-size: 0.72rem;
      color: var(--muted);
    }

    .sync {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.7rem;
      font-weight: 600;
      color: var(--ok);
      background: rgba(31, 138, 110, 0.1);
      padding: 0.35rem 0.6rem;
      border-radius: 10px;
    }

    .sync i {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
      box-shadow: 0 0 0 0 rgba(31, 138, 110, 0.45);
      animation: pulse 2s ease-out infinite;
    }

    /* Banner */
    .banner {
      position: relative;
      height: 168px;
      border-radius: 28px;
      overflow: hidden;
      margin-bottom: 1.15rem;
      isolation: isolate;
      touch-action: pan-y;
      box-shadow: var(--shadow-md);
      animation: rise 0.75s var(--ease-out) 0.1s both;
    }

    .banner__track {
      display: flex;
      width: 300%;
      height: 100%;
      transition: transform 0.75s var(--ease-out);
      will-change: transform;
    }

    .slide {
      width: 33.333%;
      height: 100%;
      position: relative;
      padding: 1.2rem;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      color: #fff;
      background-size: cover;
      background-position: center;
    }

    .slide::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(115deg, rgba(5, 18, 16, 0.72) 0%, rgba(5, 18, 16, 0.18) 48%, rgba(5, 18, 16, 0.55) 100%),
        linear-gradient(180deg, transparent 15%, rgba(5, 18, 16, 0.78) 100%);
    }

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

    .slide:nth-child(1) {
      background-image: url("/static/app/idx3/images/slider/slide-1.jpg");
    }
    .slide:nth-child(2) {
      background-image: url("/static/app/idx3/images/slider/slide-2.jpg");
    }
    .slide:nth-child(3) {
      background-image: url("/static/app/idx3/images/slider/slide-3.jpg");
    }

    html[dir="ltr"] .banner__track,
    .banner[dir="ltr"] .banner__track {
      flex-direction: row;
    }

    .slide__eyebrow {
      font-size: 0.7rem;
      font-weight: 500;
      letter-spacing: 0.01em;
      opacity: 0.78;
      margin-bottom: 0.3rem;
    }

    .slide__title {
      font-size: 1.22rem;
      font-weight: 700;
      line-height: 1.35;
      max-width: 14ch;
      letter-spacing: -0.025em;
      margin-bottom: 0.85rem;
    }

    .banner__ui {
      position: absolute;
      left: 1.15rem;
      right: 1.15rem;
      bottom: 0.95rem;
      z-index: 3;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.75rem;
    }

    .banner__dots {
      display: flex;
      gap: 0.35rem;
    }

    .banner__dots button {
      width: 6px;
      height: 6px;
      border-radius: 99px;
      background: rgba(255,255,255,0.35);
      transition: width 0.35s var(--ease), background 0.35s var(--ease);
    }

    .banner__dots button.is-on {
      width: 18px;
      background: #fff;
    }

    /* Section */
    .block {
      margin-bottom: 1.25rem;
      animation: rise 0.75s var(--ease-out) both;
    }

    .block:nth-of-type(1) { animation-delay: 0.14s; }
    .block:nth-of-type(2) { animation-delay: 0.2s; }
    .block:nth-of-type(3) { animation-delay: 0.26s; }
    .block:nth-of-type(4) { animation-delay: 0.32s; }

    .block__head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 0.75rem;
    }

    .block__head h2 {
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .block__head p {
      margin-top: 0.15rem;
      font-size: 0.73rem;
      color: var(--muted);
    }

    .block__head a {
      font-size: 0.76rem;
      font-weight: 600;
      color: var(--teal);
    }

    /* Metrics nav */
    .metrics {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 0.3rem;
      padding: 0.4rem;
      border-radius: 24px;
      background: rgba(255,255,255,0.62);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-sm);
      backdrop-filter: blur(12px);
    }

    .metric {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.38rem;
      padding: 0.55rem 0.1rem 0.45rem;
      border-radius: 18px;
      transition: background 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
    }

    .metric:active { transform: scale(0.96); }

    .metric.is-on {
      background: var(--white);
      box-shadow: 0 10px 22px rgba(8, 30, 26, 0.08);
    }

    .metric__ico {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      color: var(--teal-deep);
      background: var(--teal-soft);
      transition: all 0.3s var(--ease);
    }

    .metric.is-on .metric__ico {
      color: #fff;
      background: linear-gradient(150deg, #149487, #0a5a52);
      box-shadow: 0 10px 18px rgba(12, 116, 105, 0.28);
      transform: translateY(-1px);
    }

    .metric__ico svg {
      width: 19px;
      height: 19px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .metric span {
      font-size: 0.64rem;
      color: var(--muted);
      text-align: center;
      line-height: 1.25;
      font-weight: 500;
    }

    .metric.is-on span {
      color: var(--ink);
      font-weight: 700;
    }

    /* Vitals hub list */
    .vitals-hub-list {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
    }

    .vitals-hub-row {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 0.8rem;
      padding: 0.9rem 0.95rem;
      border-radius: 20px;
      background: var(--white);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-sm);
      transition: transform 0.2s var(--ease);
      text-decoration: none;
      color: inherit;
    }

    .vitals-hub-row:active {
      transform: scale(0.985);
    }

    .vitals-hub-row__ico {
      width: 44px;
      height: 44px;
      border-radius: 15px;
      display: grid;
      place-items: center;
      background: var(--teal-soft);
      color: var(--teal-deep);
    }

    .vitals-hub-row__ico svg {
      width: 19px;
      height: 19px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .vitals-hub-row__ico.vital--bp { background: #e6f1f6; color: var(--blue); }
    .vitals-hub-row__ico.vital--heart { background: #f6e6e1; color: var(--coral); }
    .vitals-hub-row__ico.vital--o2 { background: var(--teal-soft); color: var(--teal); }
    .vitals-hub-row__ico.vital--ecg { background: #f6e6e1; color: var(--coral); }
    .vitals-hub-row__ico.vital--gl { background: #f6edd8; color: var(--amber); }

    .vitals-hub-row__body strong {
      display: block;
      font-size: 0.9rem;
      font-weight: 600;
      margin-bottom: 0.14rem;
    }

    .vitals-hub-row__body span {
      display: block;
      font-size: 0.72rem;
      color: var(--muted);
      line-height: 1.4;
    }

    .vitals-hub-row__chev {
      color: var(--muted-2);
      opacity: 0.75;
    }

    .vitals-hub-row__chev svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    /* Score + Monitor */
    .panel {
      display: grid;
      gap: 0.75rem;
    }

    .score {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 0.95rem;
      align-items: center;
      padding: 1rem;
      border-radius: 26px;
      background: var(--white);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-sm);
    }

    .gauge {
      width: 84px;
      height: 84px;
      position: relative;
    }

    .gauge svg {
      width: 100%;
      height: 100%;
      transform: rotate(-90deg);
    }

    .gauge circle {
      fill: none;
      stroke-width: 7;
      stroke-linecap: round;
    }

    .gauge .track { stroke: rgba(7, 20, 18, 0.07); }
    .gauge .value {
      stroke: url(#gaugeGrad);
      stroke-dasharray: 220;
      stroke-dashoffset: 220;
      animation: gauge 1.4s var(--ease-out) 0.35s forwards;
    }

    .gauge__label {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      text-align: center;
    }

    .gauge__label strong {
      font-family: var(--display);
      font-size: 1.4rem;
      font-weight: 700;
      letter-spacing: -0.04em;
      line-height: 1;
    }

    .gauge__label small {
      display: block;
      margin-top: 0.12rem;
      font-size: 0.62rem;
      color: var(--muted);
    }

    .score__copy h3 {
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      margin-bottom: 0.28rem;
    }

    .score__copy p {
      font-size: 0.76rem;
      color: var(--muted);
      line-height: 1.65;
      margin-bottom: 0.65rem;
    }

    .pills {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
    }

    .pill {
      font-size: 0.68rem;
      font-weight: 600;
      padding: 0.28rem 0.55rem;
      border-radius: 9px;
      background: var(--teal-soft);
      color: var(--teal-deep);
    }

    .pill--alt {
      background: rgba(37, 105, 135, 0.1);
      color: var(--blue);
    }

    .home-menu {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.55rem;
    }

    .home-menu__item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      min-height: 92px;
      padding: 0.65rem 0.4rem;
      border-radius: 18px;
      background: var(--white);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-sm);
      text-align: center;
      transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    }

    .home-menu__item:active {
      transform: scale(0.97);
    }

    .home-menu__ico {
      width: 38px;
      height: 38px;
      border-radius: 13px;
      display: grid;
      place-items: center;
      background: var(--teal-soft);
      color: var(--teal-deep);
    }

    .home-menu__item:nth-child(2) .home-menu__ico {
      background: rgba(37, 105, 135, 0.12);
      color: var(--blue);
    }

    .home-menu__item:nth-child(3) .home-menu__ico {
      background: #f6edd8;
      color: var(--amber);
    }

    .home-menu__item:nth-child(4) .home-menu__ico {
      background: #f6e6e1;
      color: var(--coral);
    }

    .home-menu__item:nth-child(5) .home-menu__ico {
      background: rgba(31, 138, 110, 0.12);
      color: var(--ok);
    }

    .home-menu__item:nth-child(6) .home-menu__ico {
      background: rgba(12, 116, 105, 0.1);
      color: var(--teal);
    }

    .home-menu__ico svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .home-menu__label {
      font-size: 0.68rem;
      font-weight: 600;
      line-height: 1.35;
      color: var(--ink-soft);
    }

    /* Live monitor */
    .monitor {
      position: relative;
      overflow: hidden;
      border-radius: 28px;
      padding: 1.2rem 1.15rem 1.1rem;
      color: #edf8f5;
      background:
        radial-gradient(420px 240px at 100% -10%, rgba(40, 190, 165, 0.28), transparent 55%),
        radial-gradient(300px 180px at 0% 100%, rgba(20, 90, 80, 0.45), transparent 50%),
        linear-gradient(155deg, #071a17 0%, #0d2f2a 48%, #0c5f56 125%);
      box-shadow: 0 22px 48px rgba(7, 30, 26, 0.28);
      min-height: 250px;
    }

    .monitor__noise {
      position: absolute;
      inset: 0;
      opacity: 0.035;
      pointer-events: none;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    }

    .monitor__grid {
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
      background-size: 20px 20px;
      mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
      pointer-events: none;
    }

    .monitor__top {
      position: relative;
      z-index: 1;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.75rem;
    }

    .monitor__label {
      font-size: 0.78rem;
      opacity: 0.7;
      margin-bottom: 0.3rem;
    }

    .monitor__value {
      display: flex;
      align-items: baseline;
      gap: 0.35rem;
    }

    .monitor__value strong {
      font-family: var(--display);
      font-size: 3.7rem;
      font-weight: 700;
      letter-spacing: -0.055em;
      line-height: 0.92;
      font-variant-numeric: tabular-nums;
    }

    .monitor__value span {
      font-size: 0.9rem;
      opacity: 0.65;
      font-weight: 500;
    }

    .monitor__status {
      display: inline-flex;
      align-items: center;
      max-width: 9.5rem;
      text-align: end;
      font-size: 0.66rem;
      font-weight: 600;
      line-height: 1.35;
      padding: 0.42rem 0.7rem;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.1);
      backdrop-filter: blur(10px);
    }

    .live {
      display: inline-flex;
      align-items: center;
      gap: 0.38rem;
      font-size: 0.7rem;
      font-weight: 600;
      padding: 0.38rem 0.65rem;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.1);
      backdrop-filter: blur(10px);
    }

    .live::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #62e2b4;
      animation: pulse 1.8s ease-out infinite;
    }

    .wavebox {
      position: relative;
      z-index: 1;
      margin: 1rem 0 0.95rem;
      height: 64px;
      border-radius: 14px;
      overflow: hidden;
      background: rgba(0,0,0,0.15);
      border: 1px solid rgba(255,255,255,0.06);
    }

    .wavebox canvas {
      width: 100%;
      height: 100%;
      display: block;
    }

    .monitor__meta {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.45rem;
    }

    .meta {
      padding: 0.58rem 0.55rem;
      border-radius: 14px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.07);
    }

    .meta small {
      display: block;
      font-size: 0.63rem;
      opacity: 0.58;
      margin-bottom: 0.18rem;
    }

    .meta b {
      font-family: var(--display);
      font-size: 0.88rem;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
    }

    /* Vitals */
    .vitals {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.65rem;
    }

    .vital {
      position: relative;
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 24px;
      padding: 0.95rem 0.9rem 0.8rem;
      min-height: 150px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
    }

    a.vital {
      text-decoration: none;
      color: inherit;
      cursor: pointer;
    }

    .vital:active {
      transform: scale(0.985);
    }

    .vital__top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.7rem;
    }

    .vital__ico {
      width: 34px;
      height: 34px;
      border-radius: 11px;
      display: grid;
      place-items: center;
    }

    .vital__ico svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .vital--bp .vital__ico { background: #e6f1f6; color: var(--blue); }
    .vital--heart .vital__ico { background: #f6e6e1; color: var(--coral); }
    .vital--o2 .vital__ico { background: var(--teal-soft); color: var(--teal); }
    .vital--gl .vital__ico { background: #f6edd8; color: var(--amber); }
    .vital--ecg .vital__ico { background: #f6e6e1; color: var(--coral); }
    .vital--bmi .vital__ico { background: var(--teal-soft); color: var(--teal); }

    .badge {
      font-size: 0.65rem;
      font-weight: 700;
      padding: 0.22rem 0.45rem;
      border-radius: 8px;
      color: var(--teal-deep);
      background: var(--teal-soft);
    }

    .badge.warn {
      color: #8a3f2f;
      background: #f6e6e1;
    }

    .badge.badge--very-high,
    .badge.badge--high { background: #e67e22; color: #fff; }
    .badge.badge--elevated { background: #f1c40f; color: #fff; }
    .badge.badge--normal { background: #27ae60; color: #fff; }
    .badge.badge--low,
    .badge.badge--underweight { background: #1a5276; color: #fff; }
    .badge.badge--irregular { background: #e67e22; color: #fff; }
    .badge.badge--review,
    .badge.badge--obese-1,
    .badge.badge--obese-2,
    .badge.badge--obese-3,
    .badge.badge--obese { background: #c0392b; color: #fff; }
    .badge.badge--overweight { background: #f1c40f; color: #1a1a1a; }
    .badge.badge--recorded,
    .badge.badge--submitted,
    .badge.badge--pending-review,
    .badge.badge--reviewed { background: #0c7469; color: #fff; }
    .badge.badge--stable,
    .badge.badge--up,
    .badge.badge--down { background: var(--teal-soft); color: var(--teal-deep); }

    .vital h3 {
      font-size: 0.74rem;
      font-weight: 500;
      color: var(--muted);
      margin-bottom: 0.18rem;
    }

    .vital__num {
      font-family: var(--display);
      font-size: 1.42rem;
      font-weight: 700;
      letter-spacing: -0.03em;
      line-height: 1.1;
      font-variant-numeric: tabular-nums;
    }

    .vital__num span {
      font-size: 0.7rem;
      font-weight: 500;
      color: var(--muted);
      margin-right: 0.12rem;
    }

    /* Health report stat cards */
    .report-stats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.65rem;
    }

    .report-stat {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 22px;
      padding: 0.9rem 0.85rem 0.85rem;
      min-height: 132px;
      display: flex;
      flex-direction: column;
      box-shadow: var(--shadow-sm);
      transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
    }

    a.report-stat {
      text-decoration: none;
      color: inherit;
      cursor: pointer;
    }

    .report-stat:active {
      transform: scale(0.985);
    }

    .report-stat__top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.65rem;
    }

    .report-stat__ico {
      width: 38px;
      height: 38px;
      border-radius: 13px;
      display: grid;
      place-items: center;
      background: var(--teal-soft);
      color: var(--teal-deep);
    }

    .report-stat__ico svg {
      width: 17px;
      height: 17px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .report-stat--gl .report-stat__ico { background: #f6edd8; color: var(--amber); }
    .report-stat--ecg .report-stat__ico { background: #f6e6e1; color: var(--coral); }
    .report-stat--total .report-stat__ico { background: #e6f1f6; color: var(--blue); }
    .report-stat--drugs .report-stat__ico { background: var(--teal-soft); color: var(--teal); }
    .report-stat--schedule .report-stat__ico { background: #e6f1f6; color: var(--blue); }
    .report-stat--prescribed .report-stat__ico { background: #f6e6e1; color: var(--coral); }
    .report-stat--doctor .report-stat__ico { background: #e6f1f6; color: var(--blue); }
    .report-stat--notify .report-stat__ico { background: #f6edd8; color: var(--amber); }

    .report-stat h3 {
      font-size: 0.72rem;
      font-weight: 500;
      color: var(--muted);
      margin-bottom: 0.16rem;
    }

    .report-stat__num {
      font-family: var(--display);
      font-size: 1.28rem;
      font-weight: 700;
      letter-spacing: -0.03em;
      line-height: 1.1;
      font-variant-numeric: tabular-nums;
      margin-bottom: 0.35rem;
    }

    .report-stat__num span {
      font-size: 0.68rem;
      font-weight: 500;
      color: var(--muted);
      margin-right: 0.1rem;
    }

    .report-stat__sub {
      margin: 0;
      margin-top: auto;
      font-size: 0.68rem;
      line-height: 1.45;
      color: var(--muted-2);
    }

    .spark {
      margin-top: auto;
      padding-top: 0.65rem;
      height: 36px;
    }

    .spark svg { width: 100%; height: 100%; }
    .spark .fill { opacity: 0.12; stroke: none; }
    .spark .line {
      fill: none;
      stroke-width: 1.85;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .vital--bp .spark .line:not(.line--sys):not(.line--dia) { stroke: var(--blue); }
    .vital--heart .spark .line { stroke: var(--coral); }
    .vital--o2 .spark .line { stroke: var(--teal); }
    .vital--gl .spark .line { stroke: var(--amber); }
    .vital--ecg .spark .line { stroke: var(--coral); }
    .vital--bp .spark .fill:not(.fill--sys):not(.fill--dia) { fill: var(--blue); }
    .vital--heart .spark .fill { fill: var(--coral); }
    .vital--o2 .spark .fill { fill: var(--teal); }
    .vital--gl .spark .fill { fill: var(--amber); }
    .vital--ecg .spark .fill { fill: var(--coral); }
    .vital--bmi .spark .line { stroke: var(--teal); }
    .vital--bmi .spark .fill { fill: var(--teal); }

    /* Timeline */
    .timeline {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
    }

    .timeline-empty {
      margin: 0;
      padding: 1rem 0.9rem;
      border-radius: 20px;
      background: var(--white);
      border: 1px dashed var(--line);
      font-size: 0.82rem;
      color: var(--muted);
      text-align: center;
    }

    .row {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 0.75rem;
      padding: 0.85rem 0.9rem;
      border-radius: 20px;
      background: var(--white);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-sm);
      transition: transform 0.2s var(--ease);
    }

    .row:active { transform: scale(0.985); }

    .row__ico {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      background: var(--teal-soft);
      color: var(--teal-deep);
    }

    .row__ico svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .row__body strong {
      display: block;
      font-size: 0.88rem;
      font-weight: 600;
      margin-bottom: 0.12rem;
    }

    .row__body span {
      font-size: 0.73rem;
      color: var(--muted);
    }

    .row__side {
      text-align: left;
    }

    .row__side time {
      display: block;
      font-size: 0.66rem;
      color: var(--muted-2);
      margin-bottom: 0.22rem;
    }

    .row__side b {
      font-family: var(--display);
      font-size: 0.84rem;
      font-weight: 700;
      color: var(--teal-deep);
      font-variant-numeric: tabular-nums;
    }

    /* Developer credit — home */
    .nevilo-home-developer-credit {
      margin: 0.15rem 0 0.35rem;
      padding: 0.35rem 0.25rem 0.15rem;
      text-align: center;
    }

    .nevilo-home-developer-credit .nevilo-developer-credit {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.05rem;
      line-height: 1.2;
    }

    .nevilo-home-developer-credit .nevilo-developer-credit p {
      margin: 0;
      font-size: 0.62rem;
      font-weight: 500;
      color: rgba(7, 20, 18, 0.42);
    }

    html[data-nevilo-theme="dark"] .nevilo-home-developer-credit .nevilo-developer-credit p {
      color: rgba(255, 255, 255, 0.38);
    }

    /* Tab bar */
    .tabbar {
      position: absolute;
      left: 0.75rem;
      right: 0.75rem;
      bottom: calc(0.6rem + var(--safe-b));
      height: var(--tab-h);
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      align-items: end;
      padding: 0.45rem 0.25rem 0.55rem;
      border-radius: 28px;
      background: rgba(255, 255, 255, 0.78);
      border: 1px solid rgba(7, 20, 18, 0.08);
      backdrop-filter: blur(22px) saturate(1.25);
      -webkit-backdrop-filter: blur(22px) saturate(1.25);
      box-shadow:
        0 18px 44px rgba(8, 30, 26, 0.14),
        0 1px 0 rgba(255,255,255,0.85) inset;
      z-index: 40;
    }

    .tab {
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.16rem;
      color: var(--muted);
      font-size: 0.62rem;
      font-weight: 500;
      min-width: 0;
      transition: color 0.25s var(--ease);
    }

    .tab svg {
      width: 21px;
      height: 21px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
      transition: transform 0.25s var(--ease);
    }

    .tab.is-on:not(.tab--home) {
      color: var(--teal-deep);
      font-weight: 700;
    }

    .tab.is-on:not(.tab--home) svg {
      transform: translateY(-1px);
      stroke-width: 2;
    }

    .tab--home {
      justify-content: flex-end;
      gap: 0.2rem;
      color: var(--teal-deep);
      font-weight: 700;
    }

    .fab {
      width: 52px;
      height: 52px;
      border-radius: 19px;
      display: grid;
      place-items: center;
      color: #fff;
      margin-top: -1.65rem;
      background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.25), transparent 42%),
        linear-gradient(155deg, #16a090, #0a5a52);
      box-shadow:
        0 14px 30px rgba(12, 116, 105, 0.38),
        0 0 0 6px rgba(12, 116, 105, 0.08);
      transition: transform 0.22s var(--ease);
    }

    .fab:active { transform: scale(0.94); }
    .fab svg { width: 22px; height: 22px; stroke-width: 2; }

    @keyframes rise {
      from { opacity: 0; transform: translateY(16px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes pulse {
      0% { box-shadow: 0 0 0 0 rgba(98, 226, 180, 0.5); }
      70% { box-shadow: 0 0 0 9px rgba(98, 226, 180, 0); }
      100% { box-shadow: 0 0 0 0 rgba(98, 226, 180, 0); }
    }

    @keyframes gauge {
      to { stroke-dashoffset: 30.8; } /* 220 * (1 - 0.86) */
    }

    @keyframes sheen {
      0%, 60% { transform: translateX(-120%); }
      100% { transform: translateX(120%); }
    }

    @media (max-width: 480px) {
      body {
        padding: 0;
        place-items: stretch;
        background: var(--surface);
        overflow: auto;
      }

      .device {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
      }

      .device__bezel,
      .notch,
      .status { display: none; }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation: none !important;
        transition: none !important;
      }
      .gauge .value { stroke-dashoffset: 30.8; }
    }
