/* Home composition: actual scoped CRM data, compact setup, and one decision panel. */
html:root .home-command{--home-blue:#1e4773;--home-soft:#edf4fc;display:grid;gap:16px}
.home-welcome{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:space-between;min-height:102px;padding:20px 24px;overflow:hidden;border-radius:14px;background:linear-gradient(110deg,#193550,#315b82);color:#fff}
.home-welcome>div{position:relative;z-index:1;max-width:70%}
.home-welcome h2{margin:0;font-size:28px;font-weight:700;line-height:1.25;letter-spacing:-.025em;overflow-wrap:anywhere}
.home-welcome p{margin:5px 0 0;color:#d9e8f6;font-size:16px}
.home-welcome img{position:absolute;inset-inline-end:0;bottom:-52px;width:280px;height:175px;object-fit:cover;object-position:center 43%;opacity:.8;mask-image:linear-gradient(to right,transparent,#000 38%);pointer-events:none}
.rtl .home-welcome img{transform:scaleX(-1)}
html:root .home-admin-top{margin:0}
html:root .home-setup-strip{margin:0;padding:14px 16px}
html:root .home-setup-strip .setup-checklist{border:0;padding:0;margin:0;box-shadow:none;background:transparent}
html:root .home-setup-strip .setup-checklist>summary{min-height:40px;gap:8px 12px}
.home-setup-strip .setup-review-label{margin-inline-start:auto;display:inline-flex;gap:12px;align-items:center;padding:8px 12px;border:1px solid var(--line-strong);border-radius:8px;color:var(--accent-ink);font-size:13px;font-weight:650}
html:root .home-setup-strip .setup-progress{height:6px;margin:0 0 10px;background:var(--surface-2)}
.home-setup-strip .setup-progress>span{background:linear-gradient(90deg,#65afea,#3685d4)}
.setup-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.setup-preview-task{display:flex;align-items:flex-start;gap:10px;min-width:0;width:100%;padding:12px;border:1px solid transparent;border-radius:9px;background:var(--surface-2);color:var(--ink);text-align:start;cursor:pointer;font:inherit}
.setup-preview-task:hover{border-color:var(--accent);background:var(--accent-soft)}
.setup-preview-task>span:nth-child(2){min-width:0;flex:1}
.setup-preview-task b{display:block;font-size:13px;font-weight:650;line-height:1.35;overflow-wrap:anywhere}
.setup-preview-task small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.45;color:var(--muted);margin-top:4px}
.setup-preview-task .setup-dot{flex:none;width:19px;height:19px;margin-top:1px;background:var(--surface);border:1px solid var(--line-strong);border-radius:50%}
.setup-preview-task>span:last-child{color:var(--accent-ink)}
.home-setup-strip:has(.setup-checklist[open]) .setup-preview{display:none}
.home-setup-strip .setup-checklist[open]>.text-button{margin-top:14px;min-height:36px}
.home-setup-strip [data-setup-unavailable]{margin:10px 0}
html:root .home-command-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(260px,.9fr);gap:16px;align-items:start}
.home-command-main{display:grid;gap:16px;min-width:0}
html:root .home-command .home-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0}
html:root .home-command .home-kpis .kpi{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:136px;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--sh-1);text-align:start}
.home-command .home-kpis .kpi:hover{border-color:var(--accent)}
.home-command .home-kpis .kpi-label{font-size:14px;font-weight:650;color:var(--ink)}
.home-command .home-kpis .kpi-value{margin-top:8px;font-size:28px;line-height:1.1;color:var(--ink);font-weight:700;letter-spacing:-.025em;overflow-wrap:anywhere}
.home-command .home-kpis .kpi-sub{margin-top:auto;padding-top:9px;font-size:12px;line-height:1.4;color:var(--muted)}
html:root .home-team-today{min-width:0;padding:18px}
.home-team-note{margin:6px 0 12px;font-size:12px}
.home-team-table-wrap{overflow:auto}
.home-team-table{width:100%;border-collapse:collapse;font-size:13px}
.home-team-table th,.home-team-table td{text-align:start;padding:11px 8px;border-bottom:1px solid var(--line);vertical-align:middle}
.home-team-table thead th{padding-block:8px;background:var(--surface-2);font-size:11px;font-weight:600;color:var(--muted)}
.home-team-table th:first-child{padding-inline-start:0}
.home-team-table thead th:first-child{padding-inline-start:8px}
.home-team-table tbody tr:last-child>*{border-bottom:0}
.home-team-table td:nth-child(2){font-variant-numeric:tabular-nums;font-weight:650}
.home-team-table td:last-child{font-size:12px;color:var(--muted)}
.home-team-person{display:flex;align-items:center;gap:10px;background:none;border:0;padding:0;color:var(--ink);font:inherit;font-weight:600;text-align:start;min-height:32px;cursor:pointer}
.home-team-person:hover>span:last-child{text-decoration:underline;color:var(--accent-ink)}
.home-team-avatar{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;color:var(--accent-ink);background:var(--accent-soft);font-size:12px;font-weight:650}
.home-team-empty{padding-block:18px;line-height:1.6}
.home-decisions{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--sh-1);overflow:hidden}
html:root .home-decisions .team-home{margin:0;border:0;box-shadow:none;padding:18px;background:transparent}
.home-decisions .team-home-compact>.row{display:flex;flex-direction:column;align-items:stretch!important;gap:16px!important}
.home-decisions .team-home-compact>.row>div:first-child{flex:initial}
.home-decisions .team-home-compact .sub{margin-top:12px!important;line-height:1.65}
.home-decisions .team-home .primary{width:100%;min-height:42px;background:var(--home-blue);color:white;border:0}
.home-decisions .home-secondary-actions{padding-top:0;border:0}
.home-review-guide{margin:0 18px 16px;padding-top:12px;border-top:1px solid var(--line)}
.home-review-guide summary{cursor:pointer;font-size:13px;font-weight:650;padding-block:8px;color:var(--ink)}
.home-review-guide ul{display:grid;gap:14px;padding:10px 0 0;margin:0;list-style:none}
.home-review-guide li{display:grid;gap:4px;font-size:12px;line-height:1.5}
.home-review-guide li span{color:var(--muted)}
.home-command-today{grid-column:1/-1;display:grid;gap:16px;min-width:0}
html:root .home-command-today .home-today{margin:0}
html:root .home-command .home-pipeline{grid-column:1/-1;margin:0}
html:root .home-command .home-today .home-primary{box-shadow:none;font-size:14px;min-height:42px}
html:root .home-command .home-today .home-next{background:var(--surface-2);border-color:var(--line)}
html:root.dark .home-command{--home-blue:#325e8f;--home-soft:#192c41}
html:root.dark .home-welcome{background:linear-gradient(110deg,#142b42,#264968);border:1px solid #385670}
html:root.dark .home-welcome img{opacity:.65}
.home-rep-secondary{display:grid;gap:16px;min-width:0}
html:root .home-rep-secondary .home-pipeline{order:initial;margin:0}
@media(max-width:960px){.home-rep-secondary{order:3}}
@media(min-width:961px){
  /* An administrator with no personal appointments only needs quick actions. */
  html:root .home-command .home-today:not(:has(.home-next,.home-actions,.home-queue)):has(>.home-primary){display:flex;align-items:center;flex-wrap:wrap;gap:16px}
  .home-command .home-today:not(:has(.home-next,.home-actions,.home-queue)):has(>.home-primary) .home-hero{flex:1;margin:0}
  .home-command .home-today:not(:has(.home-next,.home-actions,.home-queue)):has(>.home-primary) .home-date{display:none}
  html:root .home-command .home-today:not(:has(.home-next,.home-actions,.home-queue)):has(>.home-primary)>.home-primary{margin:0;min-width:0}
  .home-command .home-today:not(:has(.home-next,.home-actions,.home-queue)):has(>.home-primary) .home-secondary-actions{margin:0;padding:0;border:0}
}
@media(max-width:1100px) and (min-width:961px){.setup-preview{grid-template-columns:1fr}.setup-preview-task small{display:none}.setup-preview-task{padding:8px 10px}.home-command .home-kpis .kpi-value{font-size:24px}}
@media(max-width:760px){
  .home-welcome{min-height:86px;padding:17px 18px}
  .home-welcome h2{font-size:23px}.home-welcome p{font-size:14px}
  .home-welcome img{width:200px;opacity:.5;inset-inline-end:-30px}
  .home-welcome>div{max-width:80%}
  .setup-preview{grid-template-columns:1fr}
  .setup-preview-task{padding:9px 10px}
  .setup-preview-task small{display:none}
  html:root .home-command-grid{grid-template-columns:minmax(0,1fr)}
  .home-decisions{order:0}.home-command-today{order:1}.home-command-main{order:2}
  html:root .home-command .home-pipeline{order:3}
  .home-decisions .team-home-compact>.row{flex-direction:row;align-items:center!important}
  .home-decisions .team-home-compact>.row>.primary{width:auto;flex:none}
  .home-decisions .team-home-compact .sub{margin-top:4px!important}
  html:root .home-command .home-kpis .kpi{min-height:125px;padding:14px}
  .home-team-table td:last-child,.home-team-table thead th:last-child{max-width:110px}
}
@media(max-width:420px){
  .home-setup-strip .setup-review-label{padding:7px 8px;font-size:12px;gap:6px}
  .home-team-avatar{display:none}.home-team-table{font-size:12px}
  .home-command .home-kpis .kpi-value{font-size:24px}
  .home-team-today>.row{align-items:flex-start;gap:8px}
}
