/* ── HOME DASHBOARD ──
   Dark content area, one step lighter cards, hairline borders, very restrained shadow. AJ green
   appears on exactly two things now: the KPI icon tint and the active-state accents (the check-in
   donut it used to fill is gone). Everything else is neutral, which is what keeps the green
   meaningful.

   Headings here are sentence case in Inter (--fb), deliberately NOT the condensed all-caps display
   face used elsewhere in the app. */

    .hd{max-width:1180px;margin:0 auto;padding:1.6rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1.15rem}

    /* welcome header */
    .hd-welcome{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap}
    .hd-welcome__title{font-family:var(--fb);font-size:1.6rem;font-weight:700;letter-spacing:-.02em;color:var(--text);margin:0 0 .18rem}
    .hd-welcome__sub{font-family:var(--fb);font-size:.83rem;color:var(--t3);margin:0}
    .hd-datechip{display:inline-flex;align-items:center;gap:.45rem;padding:.45rem .75rem;background:var(--s1);border:1px solid var(--b1);border-radius:999px;font-family:var(--fb);font-size:.73rem;font-weight:500;color:var(--t2);white-space:nowrap}
    .hd-datechip .ic{width:14px;height:14px;color:var(--t3)}
    /* The date chip is now a real control (#33), not a label. It keeps the chip's shape so the
       header reads the same, but the whole pill is the input's hit area — a bare date input at
       this size is a hard target on a tablet, which is what Home mostly runs on. */
    .hd-datechip--input{cursor:pointer;padding-right:.55rem}
    .hd-datechip--input:focus-within{border-color:var(--lime);box-shadow:0 0 0 3px var(--lime-d)}
    .hd-datechip--input input{font-family:var(--fb);font-size:.73rem;font-weight:600;color:var(--t2);background:transparent;border:0;padding:0;cursor:pointer;min-width:0}
    .hd-datechip--input input:focus{outline:none}
    .hd-welcome__meta{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
    .hd-datereset{font-family:var(--fb);font-size:.7rem;font-weight:600;color:var(--lime);background:transparent;border:0;cursor:pointer;padding:.3rem .1rem;white-space:nowrap}
    .hd-datereset:hover{text-decoration:underline}

    /* coach filter, in the schedule card's head */
    .hd-card__filter{flex-shrink:0}
    .hd-filter{font-family:var(--fb);font-size:.68rem;font-weight:600;color:var(--t2);background:var(--s1);border:1px solid var(--b2);border-radius:8px;padding:.3rem 1.5rem .3rem .5rem;cursor:pointer;max-width:150px;
      appearance:none;-webkit-appearance:none;
      background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8B94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 9l6.5 6.5L18.5 9'/%3E%3C/svg%3E");
      background-repeat:no-repeat;background-position:right .35rem center;background-size:13px}
    .hd-filter:focus{outline:none;border-color:var(--lime);box-shadow:0 0 0 3px var(--lime-d)}

    /* KPI row */
    .hd-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:.85rem}
    .hd-kpi{background:var(--s1);border:1px solid var(--b1);border-radius:14px;padding:1rem 1.05rem;box-shadow:var(--sh);display:flex;flex-direction:column;gap:.5rem}
    .hd-kpi__top{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
    .hd-kpi__label{font-family:var(--fb);font-size:.72rem;font-weight:600;color:var(--t3)}
    .hd-kpi__icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:var(--lime-d);color:var(--lime);flex-shrink:0}
    .hd-kpi__icon .ic{width:15px;height:15px}
    .hd-kpi__value{font-family:var(--fb);font-size:1.85rem;font-weight:700;line-height:1;letter-spacing:-.03em;color:var(--text)}
    .hd-kpi__foot{font-family:var(--fb);font-size:.68rem;color:var(--t4)}

    /* card shell */
    /* One grid the whole way down: same two columns, same gap, and align-items:stretch (not
       start) so the two cards in a row end on the same line. With `start` a short card left a
       ragged step against its neighbour, which is the "blank space" the dashboard used to open
       with. .hd-card is a flex column so its body takes up the slack instead of the card
       stretching around a body that stays short. */
    .hd-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:.85rem;align-items:stretch}
    .hd-card{background:var(--s1);border:1px solid var(--b1);border-radius:14px;box-shadow:var(--sh);overflow:hidden;display:flex;flex-direction:column}
    .hd-card .hd-card__body{flex:1}
    .hd-card__head{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.95rem 1.05rem .7rem}
    /* Collapsible card. The whole head is the hit area, and the chevron is the only thing added to
       it — title left, note and chevron right. A CLOSED one drops out of the row's stretch
       (align-self:start) so it shrinks to its header instead of being held open as a tall empty
       box by whatever is beside it; an open one stretches with the row as normal. */
    .hd-card--acc>summary{list-style:none;cursor:pointer;user-select:none;padding-bottom:.95rem}
    .hd-card--acc>summary::-webkit-details-marker{display:none}
    .hd-card--acc>summary:hover{background:var(--s2)}
    .hd-card--acc>summary .hd-card__title{margin-right:auto}
    .hd-card--acc[open]>summary{padding-bottom:.7rem}
    .hd-card--acc:not([open]){align-self:start}
    .hd-card__chev{width:15px;height:15px;flex-shrink:0;color:var(--t3);transition:transform var(--ease)}
    .hd-card--acc[open] .hd-card__chev{transform:rotate(180deg)}
    .hd-card--acc>summary:focus-visible{outline:2px solid var(--lime);outline-offset:-2px;border-radius:14px}
    .hd-card__title{font-family:var(--fb);font-size:.87rem;font-weight:700;letter-spacing:-.01em;color:var(--text)}
    .hd-card__note{font-family:var(--fb);font-size:.67rem;color:var(--t4)}
    .hd-card__body{padding:0 1.05rem 1.05rem}

    /* avatars */
    .hd-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--s3);border:1px solid var(--b2);color:var(--t2);font-family:var(--fb);font-weight:700;flex-shrink:0}
    .hd-avatar--sm{width:32px;height:32px;font-size:.66rem}
    .hd-avatar--xs{width:24px;height:24px;font-size:.55rem;border:2px solid var(--s1);margin-left:-7px}
    .hd-avatar--xs:first-child{margin-left:0}
    .hd-avatar--more{background:var(--s2);color:var(--t2)}

    /* recent PRs */
    .hd-pr-list{display:flex;flex-direction:column}
    .hd-pr{display:flex;align-items:center;gap:.7rem;width:100%;padding:.6rem .25rem;border-radius:9px;background:transparent;cursor:pointer;text-align:left;border-bottom:1px solid var(--b1);transition:background var(--ease)}
    .hd-pr:last-child{border-bottom:0}
    .hd-pr:hover{background:var(--s2)}
    .hd-pr__body{display:flex;flex-direction:column;gap:.1rem;min-width:0;flex:1}
    .hd-pr__name{font-family:var(--fb);font-size:.78rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .hd-pr__metric{font-family:var(--fb);font-size:.68rem;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .hd-pr__right{display:flex;flex-direction:column;align-items:flex-end;gap:.1rem;flex-shrink:0}
    .hd-pr__value{font-family:var(--fb);font-size:.8rem;font-weight:700;color:var(--lime)}
    .hd-pr__time{font-family:var(--fb);font-size:.63rem;color:var(--t4);white-space:nowrap}

    .hd-linkbtn{display:flex;align-items:center;justify-content:center;gap:.35rem;width:100%;padding:.55rem;border:1px solid var(--b2);border-radius:9px;background:transparent;cursor:pointer;font-family:var(--fb);font-size:.74rem;font-weight:600;color:var(--t2);transition:all var(--ease)}
    .hd-linkbtn:hover{background:var(--s2);color:var(--text)}
    .hd-linkbtn .ic{width:14px;height:14px}

    /* today's schedule (#31) — the strip that replaced "Today by group" */
    .hd-sch-list{display:flex;flex-direction:column}
    .hd-sch{display:flex;align-items:center;gap:.7rem;width:100%;padding:.65rem .25rem;border-bottom:1px solid var(--b1);background:transparent;cursor:pointer;text-align:left;border-radius:9px;transition:background var(--ease)}
    .hd-sch:last-child{border-bottom:0}
    .hd-sch:hover{background:var(--s2)}
    .hd-sch__bar{width:3px;align-self:stretch;min-height:34px;border-radius:2px;background:var(--b3);flex-shrink:0}
    .hd-sch__time{display:flex;flex-direction:column;flex-shrink:0;width:66px}
    .hd-sch__start{font-family:var(--fb);font-size:.76rem;font-weight:700;color:var(--text);white-space:nowrap}
    .hd-sch__dur{font-family:var(--fb);font-size:.62rem;color:var(--t4)}
    .hd-sch__main{display:flex;flex-direction:column;gap:.08rem;min-width:0;flex:1}
    .hd-sch__name{font-family:var(--fb);font-size:.78rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .hd-sch__meta{font-family:var(--fb);font-size:.67rem;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .hd-sch__faces{display:flex;align-items:center;flex-shrink:0}
    .hd-sch__count{font-family:var(--fb);font-size:.72rem;font-weight:700;color:var(--t2);flex-shrink:0;white-space:nowrap}

    /* today by group */
    .hd-grp{display:flex;align-items:center;gap:.75rem;padding:.7rem .25rem;border-bottom:1px solid var(--b1)}
    .hd-grp:last-child{border-bottom:0}
    .hd-grp__bar{width:3px;align-self:stretch;min-height:32px;border-radius:2px;background:var(--b3);flex-shrink:0}
    .hd-grp__main{min-width:0;flex:1}
    .hd-grp__name{font-family:var(--fb);font-size:.78rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .hd-grp__count{font-family:var(--fb);font-size:.68rem;color:var(--t3)}
    .hd-grp__faces{display:flex;align-items:center;flex-shrink:0}
    .hd-status{font-family:var(--fb);font-size:.65rem;font-weight:600;padding:.24rem .55rem;border-radius:999px;flex-shrink:0;white-space:nowrap}
    .hd-status--none{background:var(--s2);color:var(--t3)}
    .hd-status--partial{background:var(--amber-b);color:var(--amber)}
    .hd-status--all{background:var(--lime-d);color:var(--lime)}

    /* quick actions */
    .hd-qa{display:grid;grid-template-columns:repeat(2,1fr);gap:.6rem}
    .hd-qa__btn{display:flex;align-items:center;gap:.6rem;padding:.75rem .8rem;border:1px solid var(--b1);border-radius:11px;background:var(--s1);cursor:pointer;text-align:left;transition:all var(--ease)}
    .hd-qa__btn:hover{border-color:var(--lime);background:var(--lime-d)}
    .hd-qa__ic{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;background:var(--s2);color:var(--t2);flex-shrink:0;transition:all var(--ease)}
    .hd-qa__btn:hover .hd-qa__ic{background:var(--lime);color:var(--on-accent)}
    .hd-qa__ic .ic{width:15px;height:15px}
    .hd-qa__label{font-family:var(--fb);font-size:.76rem;font-weight:600;color:var(--text);line-height:1.25}

    /* empty states */
    .hd-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:1.6rem .5rem;gap:.3rem}
    .hd-empty__icon{color:var(--t4)}
    .hd-empty__icon .ic{width:26px;height:26px}
    .hd-empty__title{font-family:var(--fb);font-size:.8rem;font-weight:600;color:var(--t2)}
    .hd-empty__desc{font-family:var(--fb);font-size:.7rem;color:var(--t4);max-width:32ch}

    /* submissions badge */
    .hd-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 .35rem;border-radius:999px;background:var(--lime);color:var(--on-accent);font-family:var(--fb);font-size:.62rem;font-weight:800}

    /* ── responsive ── */
    @media(max-width:1080px){
      .hd-kpis{grid-template-columns:repeat(2,1fr)}
      .hd-grid{grid-template-columns:1fr}
    }
    @media(max-width:900px){
      .hd{padding:1.1rem 1rem 2.5rem;gap:.9rem}
      .hd-welcome__title{font-size:1.3rem}
    }
    @media(max-width:560px){
      /* The sub-note is context, not content — it collides with the title before it wraps. */
      .hd-card__note{display:none}
      .hd-kpis{grid-template-columns:1fr 1fr;gap:.6rem}
      .hd-kpi{padding:.8rem .85rem;border-radius:12px}
      .hd-kpi__value{font-size:1.5rem}
      .hd-qa{grid-template-columns:1fr}
      .hd-welcome{gap:.6rem}
      /* At this width the row cannot hold faces AND a status pill AND a count. Faces go: the
         count says the same thing in less space, and the pill is the part that is glanceable. */
      .hd-sch__faces{display:none}
      .hd-sch__time{width:58px}
      .hd-filter{max-width:118px}
    }
