/* Focused Home extensions. Inherit the existing Kwik account/rep palette. */
.hw-revenue { margin-bottom: 28px; min-width: 0; }
.hw-revenue > .hw-muted { margin: 4px 0 12px; }
.hw-revenue-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hw-revenue-tile.hw-stat {
    --hw-revenue-accent: #b49724;
    min-width: 0; padding: 16px 18px; border-top: 3px solid var(--hw-revenue-accent);
    background: linear-gradient(135deg, rgba(180,151,36,.09), transparent), var(--hw-surface);
}
.hw-revenue-tile:nth-child(2) { --hw-revenue-accent: #629588; background: linear-gradient(135deg, rgba(98,149,136,.09), transparent), var(--hw-surface); }
.hw-revenue-tile:nth-child(3) { --hw-revenue-accent: #748ba8; background: linear-gradient(135deg, rgba(116,139,168,.09), transparent), var(--hw-surface); }
.hw-revenue-tile:nth-child(4) { --hw-revenue-accent: #b88b72; background: linear-gradient(135deg, rgba(184,139,114,.09), transparent), var(--hw-surface); }
.hw-revenue-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-revenue-tile.hw-stat strong { font-size: clamp(18px, 2vw, 26px); overflow-wrap: anywhere; }
@media (max-width: 767px) { .hw-revenue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hw-revenue-tile.hw-stat { padding: 14px; } }
.hw {
    --hw-surface: var(--kh-surface, var(--rh-surface, #fff));
    --hw-text: var(--kh-ink, var(--rh-text, #0b0b0f));
    --hw-muted: var(--kh-muted, var(--rh-muted, #71717a));
    --hw-line: var(--kh-hair, var(--rh-line, #e8e8ea));
    --hw-subtle: var(--kh-subtle, var(--rh-subtle, #f4f4f5));
    color: var(--hw-text); font-family: inherit; font-size: 13px;
}
.hw[hidden], .hw [hidden] { display: none !important; }
#acct-panel-home.hw-personal > :not(#accountWelcomeCard):not(#homeWorkspaceControls):not(#homeWorkspace) { display: none !important; }
.hw-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hw-tabs { display: inline-flex; gap: 3px; padding: 3px; background: var(--hw-subtle); border-radius: 999px; }
.hw-tabs button { border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 600; background: transparent; color: var(--hw-muted); }
.hw-tabs button[aria-pressed="true"] { background: var(--hw-text); color: var(--hw-surface); }
.hw button, .hw select { cursor: pointer; }
.hw button:disabled { opacity: .55; cursor: wait; }
.hw select, .hw input, .hw-button { min-height: 36px; border: 1px solid var(--hw-line); border-radius: 8px; padding: 7px 11px; background: var(--hw-surface); color: var(--hw-text); font: inherit; max-width: 100%; }
.hw :is(button, input, select):focus-visible { outline: 2px solid #c5a314; outline-offset: 3px; }
.hw-button { font-weight: 600; }
.hw-primary { background: var(--hw-text); color: var(--hw-surface); border-color: var(--hw-text); }
.hw-card { background: var(--hw-surface); border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(11,11,15,.06); min-width: 0; }
.hw h2 { font-size: 18px; font-weight: 600; margin: 0; }
.hw h3 { font-size: 15px; font-weight: 600; margin: 0; }
.hw-muted { color: var(--hw-muted); font-size: 12px; line-height: 1.6; }
.hw-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.hw-heading h2::before, .hw-goal h3::before { content: ''; display: inline-block; width: 7px; height: 22px; background: #ffd836; border-radius: 3px; vertical-align: middle; margin-right: 10px; }
.hw-sales { font-size: 36px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.hw-chart { position: relative; height: 330px; margin-top: 16px; }
.hw-sales-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(255px, 3fr); gap: 28px; align-items: stretch; }
.hw-sales-layout > * { min-width: 0; }
.hw-personal-sales { padding: 26px 30px 28px; }
.hw-sales-main { min-width: 0; }
.hw-home-goal { padding-left: 28px; border-left: 1px solid var(--hw-line); }
.hw-home-goal .hw-goal { margin: 0; padding: 0; border: 0; }
.hw-home-goal .hw-goal h3 { font-size: 16px; }
.hw-home-goal .hw-goal h3::before { width: 5px; height: 18px; }
.hw-home-goal .hw-goal > p:not(.hw-muted):not(.hw-status) { margin: 18px 0 4px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hw-home-goal .hw-goal form { margin: 16px 0; }
.hw-home-goal .hw-goal input { width: 125px; }
.hw-home-goal .hw-goal .hw-pace { padding: 12px 0; border-top: 1px solid var(--hw-line); }
.hw-home-goal .hw-pace strong { font-size: 18px; }
.hw-heading .hw-toolbar { margin-bottom: 0; gap: 8px; }
.hw-chart canvas { touch-action: pan-y; }
.hw-chart canvas:focus-visible, .hw-board-scroll:focus-visible, .hw-board summary:focus-visible { outline: 2px solid #c5a314; outline-offset: 3px; }
.hw-chart-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.hw-chart-key { display: inline-flex; align-items: center; gap: 7px; }
.hw-chart-key::before { content: ''; width: 18px; border-top: 2px solid #b49724; }
.hw-chart-key.hw-estimate-key::before { border-top-style: dotted; }
.hw-projection-total { font-size: 15px; font-weight: 600; color: var(--hw-text); font-variant-numeric: tabular-nums; }
.hw-chart-note { margin: 8px 0 0; }
/* Match the project board's segmented range, medals, own-row tint and revenue
   tracks without importing its project-only root layout or podium. */
.hw-board { --hw-board-green: #17804c; --hw-board-own: #fff6d9; --hw-board-purple: #8659d5; padding: 0; overflow: hidden; font-variant-numeric: tabular-nums; margin-top: 18px; }
.hw-board-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 20px; }
.hw-board-head h2::before { content: ''; display: inline-block; width: 5px; height: 21px; border-radius: 4px; margin-right: 10px; vertical-align: middle; background: var(--hw-board-purple); }
.hw-board-scope { margin: 4px 0 0; }
.hw-board-ranges { display: inline-flex; gap: 2px; padding: 4px; background: var(--hw-subtle); border-radius: 8px; }
.hw-board-ranges button { padding: 7px 11px; border: 0; border-radius: 6px; font: inherit; font-size: 11px; background: transparent; color: var(--hw-muted); white-space: nowrap; min-height: 32px; }
.hw-board-ranges button[aria-pressed="true"] { background: var(--hw-surface); color: var(--hw-text); font-weight: 600; box-shadow: 0 1px 3px #12121a12; }
.hw-board-scroll { overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.hw-board-table { width: 100%; min-width: 650px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.hw-board-table th { padding: 14px 10px 10px; text-align: right; font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--hw-muted); border-bottom: 1px solid var(--hw-line); }
.hw-board-table th:first-child { width: 42px; padding-left: 18px; text-align: left; }
.hw-board-table th:nth-child(2) { width: 145px; text-align: left; }
.hw-board-table th:nth-child(5) { width: 90px; }
.hw-board-table th:last-child { width: 125px; padding-right: 20px; }
.hw-board-table td { height: 62px; box-sizing: border-box; padding: 10px; border-bottom: 1px solid var(--hw-line); text-align: right; vertical-align: middle; font-size: 12px; }
.hw-board-table td:first-child { text-align: left; padding-left: 18px; }
.hw-board-table td:nth-child(2) { text-align: left; overflow-wrap: anywhere; }
.hw-board-table td:last-child { padding-right: 20px; }
.hw-board-table .is-leader td { border-top: 1px solid #e5b92c; border-bottom-color: #e5b92c; }
.hw-board-table .is-leader td:first-child { border-left: 1px solid #e5b92c; }
.hw-board-table .is-leader td:last-child { border-right: 1px solid #e5b92c; }
.hw-board-table .is-you { background: var(--hw-board-own); }
.hw-board-table .is-you td:first-child { box-shadow: inset 3px 0 #e5b92c; }
.hw-board-table .is-you .hw-board-name { font-weight: 700; }
.hw-board-name { font-weight: 500; }
.hw-board-you { display: inline-block; padding: 1px 6px; margin-left: 6px; border-radius: 999px; background: #fafafa; color: #232326; font-size: 9px; font-weight: 600; }
.hw-board-rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #52525b; color: #f4f4f5; font-size: 11px; font-weight: 600; }
.hw-board-rank-1 { background: #edc84c; color: #453509; }
.hw-board-rank-2 { background: #c5cbd3; color: #30343c; }
.hw-board-rank-3 { background: #c48c64; color: #38281d; }
.hw-board-money { font-weight: 700; color: var(--hw-board-green); }
.hw-board-zero { color: var(--hw-muted); }
.hw-board-bar { display: block; height: 3px; border-radius: 8px; background: var(--hw-subtle); margin-top: 5px; overflow: hidden; }
.hw-board-bar span { display: block; width: 100%; height: 100%; background: var(--hw-board-green); transform-origin: left; }
.is-leader .hw-board-bar span { background: #e5b92c; }
.hw-board-note { padding: 12px 20px; margin: 0; font-size: 10px; line-height: 1.7; color: var(--hw-muted); }
.hw-board-started { border-top: 1px solid var(--hw-line); }
.hw-board-started summary { padding: 17px 20px; cursor: pointer; color: var(--hw-muted); font-size: 11px; }
.hw-board-body > .hw-empty, .hw-board-body > .hw-loading, .hw-board-body > .hw-status, .hw-board-body > .hw-button { margin: 12px 20px; }
.hw-board-body { max-height: 440px; overflow-y: auto; overscroll-behavior-y: contain; }
html[data-kwik-theme="dark"] .hw-board { --hw-board-green: #62cc91; --hw-board-own: #38301b; --hw-board-purple: #b897fa; }
@media (min-width: 768px) and (max-width: 1050px) {
    .hw-sales-layout { grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 20px; }
    .hw-home-goal { padding-left: 20px; }
}
@media (max-width: 767px) {
    .hw-sales-layout { grid-template-columns: minmax(0, 1fr); }
    .hw-personal-sales { padding: 20px; }
    .hw-home-goal { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--hw-line); }
    .hw-chart { height: 260px; }
    .hw-board-head { padding: 18px; }
    .hw-board-ranges button { min-height: 36px; }
}
.hw-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 28px; }
.hw-stat { flex: 1 1 180px; padding: 18px 20px; background: var(--hw-surface); border-radius: 12px; }
.hw-stat strong { display: block; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Reuse account-home.css's real project grid/cards, including its timeline,
   avatar palette, dark theme and entrance motion. No personal card variant. */
.hw-projects { margin-top: 16px; }
.hw-projects > .kh-proj { min-width: 0; }
.hw-projects > .hw-empty, .hw-projects > .hw-project-error { grid-column: 1 / -1; }
.hw-projects .kh-act:focus-visible { outline: 2px solid var(--kh-ink); outline-offset: 2px; }
.hw-projects .hw-project-unavailable { cursor: default; color: var(--kh-muted); }
@media (max-width: 767px) { .hw-projects.kh-proj-grid { grid-template-columns: minmax(0, 1fr); } }
.hw-goal { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hw-line); }
#projectMonthlyGoal { margin-top: 16px; }
#projectMonthlyGoal .hw-goal { margin: 0; padding: 0; border: 0; }
.hw-goal form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.hw-goal label { display: grid; gap: 5px; font-size: 12px; color: var(--hw-muted); }
.hw-goal input { width: 168px; }
.hw-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--hw-subtle); margin: 12px 0 8px; }
.hw-track span { display: block; height: 100%; background: #ffd836; transform-origin: left; }
.hw-pace { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 8px; }
.hw-pace strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.hw-status { min-height: 18px; font-size: 12px; margin-top: 8px; }
.hw-error { color: #b4533c; }
.hw-success { color: #357448; }
.hw-loading { padding: 20px 0; color: var(--hw-muted); }

/* ---------- Skeletons ----------
   Soft rounded blocks shaped like the content they replace, with one light
   band sweeping across them. --sk-i staggers each block so the sweep reads
   as a single wave travelling down the card rather than random blinking. */
.hw-sk {
    --sk-base: #EEEEF0; --sk-hi: rgba(255,255,255,.75);
    position: relative; display: block; overflow: hidden; isolation: isolate;
    background: var(--sk-base); border-radius: 8px;
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* clip the sweep on iOS */
}
.hw-sk::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 15%, var(--sk-hi) 50%, transparent 85%);
    transform: translateX(-100%);
    animation: hwSkSweep 1.9s cubic-bezier(.45,0,.2,1) infinite;
    animation-delay: calc(var(--sk-i, 0) * 70ms);
    will-change: transform;
}
@keyframes hwSkSweep { 0% { transform: translateX(-100%); } 62%, 100% { transform: translateX(100%); } }
.hw-sk-group { animation: hwSkIn .35s ease-out .06s both; }
@keyframes hwSkIn { from { opacity: 0; } to { opacity: 1; } }
.hw-loading.hw-sk-group { display: flex; flex-direction: column; gap: 12px; }
.hw-sk-title { width: 42%; max-width: 180px; height: 16px; }
.hw-sk-num { width: 52%; max-width: 220px; height: 28px; border-radius: 10px; }
.hw-sk-track { width: 100%; height: 8px; border-radius: 999px; }
.hw-sk-line { width: 100%; height: 12px; border-radius: 6px; }
.hw-sk-block { width: 100%; height: 180px; border-radius: 12px; }
.hw-sk-w40 { width: 40%; } .hw-sk-w60 { width: 60%; } .hw-sk-w80 { width: 80%; }
@media (prefers-reduced-motion: reduce) {
    .hw-sk::after { animation: none; display: none; }
    .hw-sk-group { animation: none; }
}
html[data-kwik-theme="dark"] .hw-sk { --sk-base: #303033; --sk-hi: rgba(255,255,255,.07); }
.hw-empty { padding: 24px; border: 1px dashed var(--hw-line); border-radius: 12px; color: var(--hw-muted); margin: 12px 0; }
@media (max-width: 767px) { .hw-card { padding: 18px; } .hw-personal-sales { padding: 20px; } .hw-stat { flex-basis: 100%; } .hw-chart { height: 260px; } .hw-toolbar > label { width: 100%; } }
html[data-kwik-theme="dark"] .hw { --hw-surface: #27272a; --hw-text: #f4f4f5; --hw-muted: #a1a1aa; --hw-line: #3f3f46; --hw-subtle: #303033; }
