/* MiAurivo V4.7.0 — Desktop dashboard, stage 1.
   Layout-only rules. Phone/tablet and tracking logic are unchanged. */
@media (min-width: 900px) {
  html,body {min-width: 0;}
  body {background:var(--page)!important;}
  .shell {
    display:grid!important;
    grid-template-columns:238px minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    max-width:1480px!important;
    width:calc(100% - 48px)!important;
    min-height:calc(100dvh - 40px)!important;
    margin:20px auto!important;
    padding:0!important;
    overflow:clip;
    border:1px solid var(--line);
    border-radius:24px;
    box-shadow:0 16px 56px #152d3020!important;
    background:var(--page)!important;
  }
  .shell > .top {
    grid-column:2;grid-row:1;
    padding:19px 36px!important;
    border-radius:0!important;
    min-height:92px;
    background:var(--surface)!important;
    color:var(--ink)!important;
    border-bottom:1px solid var(--line);
  }
  .shell > .top h1 {font-size:23px!important;margin:2px 0!important;color:var(--ink)!important;}
  .shell > .top p {color:var(--muted)!important;opacity:1!important;}
  .shell > .content {
    grid-column:2;grid-row:2;
    width:100%;min-width:0;
    padding:0 28px 45px!important;
  }
  .shell > .nav {
    position:sticky!important;top:0!important;bottom:auto!important;left:auto!important;
    transform:none!important;
    grid-column:1;grid-row:1 / span 2;
    width:238px!important;max-width:none!important;
    height:100%;min-height:calc(100dvh - 40px);
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    justify-content:flex-start!important;
    padding:110px 14px 26px!important;gap:8px!important;
    border:0!important;border-right:1px solid var(--line)!important;
    border-radius:0!important;
    background:var(--surface)!important;
    box-shadow:none!important;backdrop-filter:none!important;
  }
  .shell > .nav::before {
    content:'MiAurivo';position:absolute;top:33px;left:22px;right:22px;
    color:var(--primary);font-family:Georgia,serif;font-size:30px;letter-spacing:-.04em;
    padding-bottom:22px;border-bottom:1px solid var(--line);
  }
  .shell > .nav::after {
    content:'One day at a time';margin-top:auto;padding:20px 10px 0;
    border-top:1px solid var(--line);font-size:12px;color:var(--muted);
  }
  .shell > .nav button.aurivo-nav-item,
  .shell > .nav button.aurivo-nav-item:not(.home-action):not(.hero-theme):not(.theme-option):not(.reduce-btn):not(.ghost):not(.secondary):not(.pill):not(.danger):not(.v21-link):not(.day) {
    width:100%;min-height:54px!important;flex:0 0 auto!important;
    display:flex!important;flex-direction:row!important;justify-content:flex-start!important;
    align-items:center!important;gap:14px!important;padding:12px 16px!important;
    border-radius:14px!important;text-align:left;font-size:14px!important;
  }
  .shell > .nav .aurivo-nav-icon {width:23px;height:23px;}
  .shell > .nav .aurivo-nav-label {font-size:14px!important;letter-spacing:0;}
  #screen .hero-art {height:clamp(300px,29vw,410px)!important;border-radius:0 0 24px 24px;background-position:center 46%;}
  #screen .hero-brand {padding-top:32px;}
  #screen .hero-brand .brand-name {font-size:clamp(55px,5vw,76px)!important;}
  #screen .home-welcome {max-width:740px!important;width:calc(100% - 60px)!important;margin-top:-32px!important;}
  #screen .home-actions {max-width:920px!important;padding:12px 18px 0!important;gap:16px!important;}
  #screen .home-action {min-height:205px!important;padding:20px 14px!important;}
  #screen .home-action .action-copy strong {font-size:clamp(15px,1.5vw,21px)!important;}
  #screen .glance {max-width:920px!important;margin:24px auto 0!important;padding:23px!important;}
  #screen .glance-grid {gap:14px!important;}
  #screen .stat {min-height:138px!important;padding:20px 10px!important;}
  #screen .stat strong {font-size:32px!important;}
  #screen .stat small {font-size:12px!important;}
  #screen .home-bottom {max-width:920px;margin:18px auto;}
  #screen .calendar {gap:8px;}
  #screen .calendar .day {min-height:65px;font-size:15px;}
  #screen .panel {max-width:100%;}
  #toast {bottom:24px!important;left:calc(50% + 119px)!important;}
}
@media (min-width: 900px) and (max-width: 1100px) {
  .shell {width:calc(100% - 24px)!important;margin:12px auto!important;grid-template-columns:205px minmax(0,1fr);}
  .shell > .nav {width:205px!important;}
  .shell > .content {padding:0 18px 35px!important;}
  #screen .home-actions {gap:9px!important;}
}

/* V4.7.6 — desktop Daily Check-In only. The original form fields and
   autosave handlers remain in place; mobile uses the existing stacked layout. */
@media (min-width: 900px) {
  html.daily-journal-active #screen .daily-desktop-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px 18px;
    align-items:start;
    margin:12px 0 18px;
  }
  html.daily-journal-active #screen .daily-desktop-grid > .daily-status-panel {
    display:contents;
  }
  html.daily-journal-active #screen .daily-desktop-grid .daily-fold,
  html.daily-journal-active #screen .daily-desktop-grid > .mia-neuro-panel {
    min-width:0;
    width:100%;
    margin:0!important;
    align-self:start;
  }
  html.daily-journal-active #screen .daily-desktop-grid .daily-fold:nth-child(1) {grid-column:1;grid-row:1;}
  html.daily-journal-active #screen .daily-desktop-grid > .mia-neuro-panel {grid-column:2;grid-row:1;}
  html.daily-journal-active #screen .daily-desktop-grid .daily-fold:nth-child(2) {grid-column:1;grid-row:2;}
  html.daily-journal-active #screen .daily-desktop-grid .daily-fold:nth-child(3) {grid-column:2;grid-row:2;}
  html.daily-journal-active #screen .daily-date-card {margin-bottom:12px!important;}
  html.daily-journal-active #screen .daily-desktop-grid .daily-fold-head {min-height:76px;}
  html.daily-journal-active #screen .daily-desktop-grid .daily-fold-body {padding:17px 18px 19px;}
}

/* V4.7.8 — desktop-only Aura fold header matches the other Daily Log folds.
   Keep the original Aura fields, behaviour, and mobile styling intact. */
@media (min-width: 900px) {
  html.daily-journal-active #screen .daily-desktop-grid > .mia-neuro-panel {
    padding:0!important;
  }
  html.daily-journal-active #screen .daily-desktop-grid .mia-neuro-fold {
    margin:0!important;
  }
  html.daily-journal-active #screen .daily-desktop-grid .mia-neuro-fold > summary {
    box-sizing:border-box;
    min-height:76px;
    padding:15px 13px!important;
    gap:12px;
  }
  html.daily-journal-active #screen .daily-desktop-grid .mia-neuro-symbol {
    display:grid;
    place-items:center;
    width:39px;
    height:39px;
    flex:0 0 39px;
    border-radius:12px;
    background:var(--comfort-raised);
    color:var(--comfort-selected);
    font-size:23px;
    line-height:1;
  }
  html.daily-journal-active #screen .daily-desktop-grid .mia-neuro-fold > summary strong {
    font-size:15px;
    font-weight:700;
    line-height:1.3;
    color:var(--comfort-text);
  }
  html.daily-journal-active #screen .daily-desktop-grid .mia-neuro-fold > summary small {
    font-size:12px;
    line-height:1.3;
    margin-top:3px;
    opacity:1;
    color:var(--comfort-sub);
  }
  html.daily-journal-active #screen .daily-desktop-grid .mia-neuro-chevron {
    font-size:23px;
    color:var(--comfort-sub);
    opacity:1;
  }
}

/* V4.8.2 — theme-aware desktop signature; mobile navigation untouched. */
.mia-sidebar-signature {display:none;}
@media (min-width:900px) {
  .shell > .nav {padding-top:157px!important;}
  .shell > .nav::before {content:none!important;display:none!important;}
  .shell > .nav .mia-sidebar-signature {
    display:flex;position:absolute;top:22px;left:15px;right:15px;
    height:118px;align-items:center;justify-content:center;flex-direction:column;
    gap:3px;padding:2px 5px 13px;border-bottom:1px solid var(--line);
    color:var(--primary);pointer-events:none;
  }
  .mia-sidebar-wave {width:130px;height:27px;display:block;color:var(--primary);opacity:.9;}
  .mia-sidebar-wordmark {
    font-family:'Avenir Next','Century Gothic','Segoe UI Light','Segoe UI',Arial,sans-serif;
    font-weight:300;font-size:30px;line-height:1.08;letter-spacing:-.055em;
    color:var(--primary);white-space:nowrap;
  }
  .mia-sidebar-tagline {
    font-family:'Avenir Next','Century Gothic','Segoe UI',Arial,sans-serif;
    font-size:9px;font-weight:500;letter-spacing:.095em;white-space:nowrap;
    color:var(--muted);margin-top:3px;
  }
}
