/* Sitalk app · dashboard.css
 * Home dashboard.
 * Load order and ownership: docs/APP-CSS.md */

.empty-workspace{
 min-height:380px;
 background:var(--surface);
 border:1px dashed var(--line);
 border-radius:15px;
 padding:32px;
 text-align:center;
 display:grid;
 justify-items:center;
 align-content:center;
}

.empty-connection{
 width:210px;
 height:120px;
 position:relative;
 margin-bottom:24px;
}

.empty-connection svg{
 position:absolute;
 inset:0;
 width:100%;
 height:100%;
}

.empty-workspace h3{
 font-size:20px;
 letter-spacing:-.7px;
}

.empty-workspace p{
 font-size:12px;
 color:var(--muted);
 max-width:350px;
 margin-top:12px;
 line-height:1.8;
}

.empty-workspace .button{
 margin-top:24px;
}

.empty-people{
 background:var(--surface-soft);
 border-radius:12px;
 padding:44px;
 grid-column:1/-1;
}

.empty-people h2{
 font-size:22px;
 letter-spacing:-.7px;
}

.empty-people p{
 font-size:12px;
 color:var(--muted);
 max-width:500px;
 margin-top:12px;
}

.empty-people a{
 display:inline-block;
 margin-top:20px;
 font-weight:650;
 font-size:12px;
}

@media (max-width:760px){
 .empty-workspace{
  padding:24px 20px;
  min-height:350px;
 }
 .empty-workspace h3{
  font-size:20px;
 }
}
/* Dashboard and account controls use the existing Sitalk palette and surfaces. */
.home-dashboard{
 max-width:1180px;
 margin-inline:auto;
}

.home-heading{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:20px;
 margin-bottom:28px;
}

.home-heading h1{
 font-size:clamp(28px,3vw,40px);
 line-height:1.2;
 text-wrap:balance;
 margin-top:8px;
}

.home-heading .button{
 flex:none;
}

.home-stats{
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:16px;
 margin-bottom:24px;
}

.home-stats>a{
 display:flex;
 flex-direction:column;
 gap:16px;
 padding:20px;
 border:1px solid var(--line);
 border-radius:16px;
 background:var(--surface);
 text-decoration:none;
}

.home-stats>a>span{
 display:flex;
 gap:8px;
 align-items:center;
 font-size:12px;
 color:var(--muted);
}

.home-stats strong{
 font-size:32px;
 line-height:1;
 font-variant-numeric:tabular-nums;
 font-weight:600;
}

.home-stats strong small{
 font-size:15px;
 color:var(--muted);
 font-weight:500;
}

.home-columns{
 display:grid;
 grid-template-columns:minmax(0,1fr) 300px;
 gap:24px;
 align-items:start;
}

.home-columns>div,
.home-columns>aside{
 display:grid;
 gap:20px;
 min-width:0;
}

.home-panel{
 background:var(--surface);
 border:1px solid var(--line);
 border-radius:16px;
 padding:20px;
 min-width:0;
}

.home-panel>header{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 margin-bottom:16px;
}

.home-panel h2{
 letter-spacing:normal;
 font-size:15px;
 line-height:1.4;
 font-weight:650;
 text-wrap:balance;
}

.home-panel>header>a{
 display:inline-flex;
 align-items:center;
 gap:4px;
 font-size:12px;
 color:var(--muted);
 white-space:nowrap;
}

.home-panel>header .ui-icon{
 width:16px;
 height:16px;
}

.home-workspace-row,
.home-agent-row,
.home-activity-row{
 display:flex;
 gap:12px;
 align-items:center;
 padding:16px 0;
 text-decoration:none;
 min-width:0;
}

.home-workspace-row+.home-workspace-row,
.home-agent-row+.home-agent-row,
.home-activity-row+.home-activity-row{
 border-top:1px solid var(--line);
}

.home-workspace-row>svg,
.home-workspace-row>img{
 flex:none;
 max-width:40px;
 max-height:40px;
}

.home-row-copy{
 display:grid;
 gap:4px;
 min-width:0;
 flex:1;
}

.home-row-copy strong{
 font-size:14px;
 font-weight:600;
 line-height:1.4;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}

.home-row-copy small,
.home-identity small{
 color:var(--muted);
 line-height:1.4;
}

.home-unread{
 display:grid;
 place-items:center;
 min-width:23px;
 height:23px;
 padding:0 4px;
 border-radius:8px;
 background:var(--lime);
 color:var(--lime-ink);
 font-size:12px;
 flex:none;
}

.home-agent-icon{
 display:grid;
 place-items:center;
 width:36px;
 height:36px;
 border:1px solid var(--line);
 border-radius:11px;
 flex:none;
}

.home-agent-icon .ui-icon{
 width:20px;
 height:20px;
}

.home-state{
 font-size:12px;
 color:var(--muted);
 white-space:nowrap;
 border:1px solid var(--line);
 padding:4px 8px;
 border-radius:8px;
}

.home-state.is-online{
 color:var(--success-text);
 background:var(--surface-soft);
}

.home-quiet{
 font-size:13px;
 line-height:1.7;
 color:var(--muted);
 padding:8px 0;
}

.home-activity-row>.ui-icon{
 color:var(--muted);
 width:18px;
 height:18px;
 flex:none;
}

.home-activity-dot{
 width:6px;
 height:6px;
 border-radius:50%;
 background:var(--ink);
 flex:none;
}

.home-empty{
 display:grid;
 justify-items:center;
 gap:12px;
 padding:28px 12px;
 text-align:center;
}

.home-empty h3{
 font-size:16px;
 font-weight:550;
 line-height:1.5;
 text-wrap:balance;
}

.home-identity{
 display:flex;
 align-items:center;
 gap:12px;
}

.home-identity>div{
 display:grid;
 gap:4px;
 min-width:0;
 flex:1;
}

.home-identity strong{
 font-size:14px;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}

.home-identity>a{
 flex:none;
}

.home-account-status{
 display:flex;
 align-items:center;
 gap:12px;
 font-size:12px;
 padding:12px 0;
 text-decoration:none;
}

.home-account-status>span{
 flex:1;
 min-width:0;
}

.home-account-status small{
 display:block;
 color:var(--muted);
 margin-top:4px;
}

.home-usage{
 font-size:12px;
 color:var(--muted);
 line-height:1.6;
 margin:20px 0 12px;
}

.home-usage strong{
 font-size:22px;
 color:var(--ink);
 font-variant-numeric:tabular-nums;
}

.home-panel meter{
 display:block;
 width:100%;
 height:12px;
 accent-color:var(--ink);
}

.home-reset{
 display:block;
 font-size:12px;
 color:var(--muted);
 margin-top:12px;
}

.home-library-link{
 display:flex;
 align-items:center;
 gap:12px;
 border:1px solid var(--line);
 padding:16px 20px;
 border-radius:14px;
 font-size:13px;
 background:var(--surface-soft);
}

.home-library-link>.ui-icon:last-child{
 margin-left:auto;
}

@media (max-width:1000px){
 .home-columns{
  grid-template-columns:minmax(0,1fr) 260px;
  gap:20px;
 }
}

@media (max-width:760px){
 .home-heading{
  align-items:flex-start;
  gap:12px;
  margin-top:12px;
 }
 .home-heading h1{
  font-size:28px;
 }
 .home-heading>.button{
  min-height:42px;
 }
 .home-heading>.button .ui-icon{
  width:15px;
  height:15px;
 }
 .home-stats{
  gap:8px;
  margin-bottom:20px;
 }
 .home-stats>a{
  padding:16px 12px;
  gap:12px;
  border-radius:13px;
 }
 .home-stats>a>span{
  font-size:12px;
  gap:4px;
 }
 .home-stats strong{
  font-size:28px;
 }
 .home-columns>aside{
  grid-template-columns:1fr;
  gap:16px;
 }
 .home-identity,
 .home-library-link{
  grid-column:1/-1;
 }
 .home-panel{
  padding:16px;
 }
 .home-panel h2{
  letter-spacing:normal;
  font-size:14px;
 }
 .home-panel>header>a{
  font-size:12px;
 }
 .home-state{
  font-size:12px;
  max-width:110px;
  text-overflow:ellipsis;
  overflow:hidden;
 }
 .home-row-copy strong{
  font-size:13px;
 }
}

@media (max-width:360px){
 .home-heading{
  flex-direction:column;
 }
 .home-columns>aside{
  grid-template-columns:1fr;
 }
 .home-stats>a{
  padding:12px 8px;
 }
 .home-state{
  max-width:87px;
 }
 .home-panel{
  padding:16px;
 }
}

/* Home: status line, flow track, Needs you / Recent tabs, activity chart, timeline. */
.home-status{
 margin-top:8px;
 font-size:13px;
 color:var(--muted);
}

.home-status-dot{
 display:inline-block;
 vertical-align:middle;
 margin-right:8px;
 width:8px;
 height:8px;
 border-radius:50%;
 background:var(--line);
}

.home-status-dot.is-online{
 background:var(--success-text);
}

.home-flow{
 margin-bottom:24px;
}

.home-flow>header{
 display:flex;
 align-items:baseline;
 gap:12px;
 margin-bottom:12px;
}

.home-flow h2{
 font-size:15px;
 font-weight:650;
}

.home-flow small{
 font-size:12px;
 color:var(--muted);
}

.flow-track{
 list-style:none;
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr)) minmax(0,.8fr);
 gap:8px;
 margin:0;
 padding:0;
}

.flow-stage{
 position:relative;
 display:grid;
 gap:4px;
 padding:16px;
 background:var(--surface);
 border:1px solid var(--line);
 border-radius:12px;
 border-top:3px solid var(--stage,var(--line));
}

/* A connector between the four forward stages; "Stopped" sits apart. */
.flow-stage:not(:nth-child(n+4))::after{
 content:'';
 position:absolute;
 right:-8px;
 top:50%;
 width:8px;
 height:1px;
 background:var(--line);
}

.flow-stage strong{
 font-size:24px;
 line-height:1.1;
 font-variant-numeric:tabular-nums;
}

.flow-stage span{
 font-size:12px;
 color:var(--muted);
}

.flow-stage.is-empty strong{
 color:var(--muted);
}

.stage-asked{--stage:var(--warning-text)}
.stage-approved{--stage:var(--text-secondary)}
.stage-working{--stage:var(--ink)}
.stage-done{--stage:var(--success-text)}
.stage-stopped{--stage:var(--danger)}

.flow-stage.stage-stopped{
 background:var(--surface-soft);
}

.home-tablist{
 display:flex;
 gap:4px;
 border-bottom:1px solid var(--line);
 margin:-4px 0 16px;
}

.home-tablist [role=tab]{
 display:inline-flex;
 align-items:center;
 gap:8px;
 min-height:40px;
 padding:0 12px;
 border:0;
 border-bottom:2px solid transparent;
 margin-bottom:-1px;
 background:none;
 color:var(--muted);
 font:inherit;
 font-size:14px;
 font-weight:600;
 cursor:pointer;
}

.home-tablist [role=tab][aria-selected=true]{
 color:var(--ink);
 border-bottom-color:var(--ink);
}

.home-tablist [role=tab]:focus-visible{
 outline:2px solid var(--focus);
 outline-offset:2px;
}

.needs-count{
 display:inline-grid;
 place-items:center;
 min-width:20px;
 height:20px;
 padding:0 6px;
 border-radius:10px;
 background:var(--accent-solid);
 color:var(--accent-on);
 font-size:12px;
 font-weight:650;
}

.needs-group+.needs-group{
 margin-top:20px;
}

.needs-group h3{
 display:flex;
 align-items:center;
 gap:8px;
 font-size:13px;
 font-weight:650;
 color:var(--text-secondary);
 margin-bottom:8px;
}

.needs-group h3 .ui-icon{
 width:16px;
 height:16px;
}

.needs-row,
.timeline-row{
 display:flex;
 align-items:center;
 gap:12px;
 padding:12px 8px;
 border-radius:10px;
 color:inherit;
 text-decoration:none;
}

.needs-row:hover,
.timeline-row:hover{
 background:var(--surface-soft);
}

.needs-row>.ui-icon{
 width:16px;
 height:16px;
 margin-left:auto;
 color:var(--muted);
 flex:none;
}

.needs-kind{
 flex:none;
 min-width:64px;
 padding:4px 8px;
 border-radius:6px;
 font-size:12px;
 font-weight:650;
 text-align:center;
}

.kind-approve{background:var(--warning-soft);color:var(--warning-text)}
.kind-invite{background:var(--blue);color:var(--ink)}
.kind-review{background:var(--lilac);color:var(--ink)}

.needs-more{
 display:inline-flex;
 align-items:center;
 gap:4px;
 margin:8px 8px 0;
 font-size:13px;
}

.needs-clear{
 display:grid;
 justify-items:center;
 gap:8px;
 padding:32px 16px;
 text-align:center;
}

.needs-clear>.ui-icon{
 width:28px;
 height:28px;
 color:var(--success-text);
}

.needs-clear h3{
 font-size:16px;
}

.needs-clear p{
 font-size:13px;
 color:var(--muted);
}

.needs-clear .text-link{
 display:inline-flex;
 align-items:center;
 gap:4px;
 border:0;
 background:none;
 font:inherit;
 font-size:13px;
 cursor:pointer;
}

.activity-chart{
 margin:0 0 20px;
}

.activity-chart figcaption{
 display:flex;
 align-items:center;
 gap:16px;
 margin-bottom:12px;
 font-size:12px;
 color:var(--muted);
}

.activity-chart figcaption span{
 display:inline-flex;
 align-items:center;
 gap:4px;
}

.activity-chart figcaption small{
 margin-left:auto;
}

.swatch{
 width:8px;
 height:8px;
 border-radius:2px;
}

.swatch-asked,.bar-asked{background:color-mix(in srgb,var(--ink) 35%,transparent)}
.swatch-done,.bar-done{background:var(--success-text)}

.activity-bars{
 display:grid;
 grid-auto-flow:column;
 grid-auto-columns:minmax(0,1fr);
 gap:4px;
 height:120px;
 padding-bottom:20px;
 border-bottom:1px solid var(--line);
}

.activity-day{
 position:relative;
 display:flex;
 align-items:flex-end;
 justify-content:center;
 gap:2px;
}

.activity-day .bar{
 width:min(8px,40%);
 height:max(var(--h),2px);
 border-radius:2px 2px 0 0;
}

.activity-day small{
 position:absolute;
 bottom:-20px;
 font-size:12px;
 color:var(--muted);
 white-space:nowrap;
}

.activity-day:first-child small{left:0}
.activity-day:last-child small{right:0}

.timeline{
 display:grid;
}

.timeline-mark{
 flex:none;
 width:10px;
 height:10px;
 border-radius:50%;
 border:2px solid var(--stage,var(--line));
}

.timeline-mark.is-unread{
 --stage:var(--ink);
 background:var(--ink);
}

@media (max-width:760px){
 .flow-track{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:4px;
 }
 .flow-stage{
  padding:12px 8px;
 }
 .flow-stage strong{
  font-size:20px;
 }
 .flow-stage:not(:nth-child(n+4))::after{
  display:none;
 }
 .home-flow>header{
  flex-direction:column;
  gap:4px;
 }
 .needs-kind{
  min-width:56px;
 }
}

@media (prefers-reduced-motion:no-preference){
 .activity-day .bar{
  transition:height var(--motion-fast,150ms) var(--ease-out,ease-out);
 }
}

.timeline-repeat{
 font-weight:500;
 color:var(--muted);
 font-variant-numeric:tabular-nums;
}
