/* Home: personal day view. */
.content.home-content { max-width: none; width: 100%; margin: 0; padding: 26px 32px 40px; overflow: auto; }
.home { display: grid; gap: 18px; max-width: 1760px; margin: 0 auto; }

/* Greeting + quick actions */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.home-date { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.home-head h1 { margin: 6px 0 6px; font-size: 30px; letter-spacing: -.8px; }
.home-head p { margin: 0; font-size: 14px; color: var(--muted); }
.home-head p b { color: var(--ink); }
.home-head p b.late { color: #ef5b5b; }
.home-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.home-q { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .15s, transform .15s; }
.home-q:hover { border-color: var(--accent); transform: translateY(-1px); }
.home-q.primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, #3976d8, #214fa6); box-shadow: 0 8px 20px rgba(33, 79, 166, .3); }
.home-q kbd { font: inherit; font-size: 10.5px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }

/* Focus strip */
.home-focus { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 16%, var(--surface)) 0%, var(--surface) 60%); }
.home-focus > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.home-focus small { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.home-focus strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-focus > div > span { font-size: 12.5px; color: var(--muted); }
.home-focus em { font-style: normal; font-weight: 700; }
.home-focus-pulse { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2fb380, #1b8a5f); box-shadow: 0 0 0 0 rgba(47, 179, 128, .5); animation: home-pulse 2s infinite; }
.home-focus-pulse.idle { background: linear-gradient(135deg, #3976d8, #214fa6); animation: none; }
.home-focus.live { border-color: rgba(47, 179, 128, .45); background: linear-gradient(110deg, rgba(47, 179, 128, .16) 0%, var(--surface) 60%); }
.home-focus.live small { color: #2fb380; }
.home-focus > b { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.home-focus-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 12px; border: 0; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; color: #fff; background: linear-gradient(135deg, #3976d8, #214fa6); }
.home-focus-btn.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.home-focus-btn.stop { background: linear-gradient(135deg, #ef6b6b, #c94141); }

/* KPI tiles */
.home-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home-kpi { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.home-kpi:hover { border-color: var(--accent); transform: translateY(-1px); }
.home-kpi > span:last-child { display: grid; }
.home-kpi strong { font-size: 24px; line-height: 1.1; letter-spacing: -.5px; }
.home-kpi small { font-size: 12px; color: var(--muted); }
.home-kpi-icon { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; }
.home-kpi.blue .home-kpi-icon { color: #4882e2; background: rgba(72, 130, 226, .15); }
.home-kpi.red .home-kpi-icon { color: #ef5b5b; background: rgba(239, 91, 91, .14); }
.home-kpi.red strong { color: #ef5b5b; }
.home-kpi.amber .home-kpi-icon { color: #e0a23a; background: rgba(224, 162, 58, .15); }
.home-kpi.green .home-kpi-icon { color: #2fb380; background: rgba(47, 179, 128, .15); }
.home-kpi.muted .home-kpi-icon { color: var(--muted); background: var(--surface2); }

/* Main grid */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 18px; align-items: start; }
.home-side { display: grid; gap: 18px; }
.home-card { border-radius: 18px; border: 1px solid var(--line); background: var(--surface); padding: 16px 16px 12px; min-width: 0; }
.home-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 2px 4px 12px; }
.home-card h2 { margin: 0; font-size: 16px; }
.home-card header p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.home-link { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.home-link:hover { background: var(--soft); }

/* My tasks */
.home-group + .home-group { margin-top: 8px; }
.home-group h3 { display: flex; align-items: center; gap: 8px; margin: 8px 6px 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.home-group h3 i { font-style: normal; letter-spacing: 0; padding: 1px 7px; border-radius: 999px; background: var(--surface2); }
.home-group.late h3 span { color: #ef5b5b; }
.home-group.today h3 span { color: #e0a23a; }
.home-task { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px; transition: background .12s; }
.home-task:hover { background: var(--surface2); }
.home-task.running { background: rgba(47, 179, 128, .1); }
.home-prio { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #8aa0c4; }
.home-prio.high { background: #ef5b5b; box-shadow: 0 0 0 3px rgba(239, 91, 91, .18); }
.home-prio.medium { background: #e0a23a; }
.home-prio.low { background: #2fb380; }
.home-task-main { flex: 1; min-width: 0; display: grid; gap: 1px; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.home-task-main strong, .home-pool-row strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-task-main small, .home-pool-row small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-task-main:hover strong { color: var(--accent); }
.home-status { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface2); color: var(--muted); }
.home-status.progress { color: #4882e2; background: rgba(72, 130, 226, .14); }
.home-status.review { color: #8a72f0; background: rgba(138, 114, 240, .15); }
.home-status.todo { color: var(--ink); }
.home-due { flex: none; width: 118px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.home-due.late { color: #ef5b5b; font-weight: 700; }
.home-due.today { color: #e0a23a; font-weight: 700; }
.home-task-actions { display: flex; gap: 4px; flex: none; }
.home-task-actions button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.home-task-actions button:hover { color: var(--accent); border-color: var(--accent); }
.home-task-actions button.on { color: #fff; border-color: transparent; background: #2fb380; }

.home-pool { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.home-pool h3 { display: flex; align-items: center; gap: 7px; margin: 0 6px 6px; font-size: 13px; }
.home-pool h3 i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface2); color: var(--muted); }
.home-pool-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.home-pool-row:hover { background: var(--surface2); }
.home-pool-row > button:first-child { flex: 1; min-width: 0; display: grid; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.home-claim { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--accent); background: var(--soft); color: var(--accent); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.home-claim:hover { color: #fff; background: var(--accent); }

.home-empty { display: grid; justify-items: center; gap: 6px; padding: 30px 10px; text-align: center; color: var(--muted); }
.home-empty strong { color: var(--ink); }
.home-empty.small { padding: 18px 10px; }

/* Side lists (messages, notifications) */
.home-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.home-row:hover { background: var(--surface2); }
.home-row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.home-row strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row.unread strong { font-weight: 800; }
.home-row.unread small { color: var(--ink); }
.home-row time { flex: none; font-size: 11px; color: var(--muted); }
.home-row em { flex: none; font-style: normal; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 800; line-height: 22px; text-align: center; color: #fff; background: #ef5b5b; }
.home-row-icon { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: var(--soft); }
.home-row-icon.assignment { color: #2fb380; background: rgba(47, 179, 128, .15); }

/* Week strip */
.home-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.home-day { display: grid; justify-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 12px; border: 1px solid transparent; }
.home-day.today { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.home-day.past { opacity: .7; }
.home-day-bar { width: 14px; height: 64px; border-radius: 7px; background: var(--surface2); display: flex; align-items: flex-end; overflow: hidden; }
.home-day-bar i { width: 100%; min-height: 0; border-radius: 7px; background: linear-gradient(180deg, #4882e2, #214fa6); }
.home-day.today .home-day-bar i { background: linear-gradient(180deg, #2fb380, #1b8a5f); }
.home-day small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.home-day-dots { display: flex; gap: 3px; height: 7px; }
.home-day-dots i { width: 7px; height: 7px; border-radius: 50%; background: #8aa0c4; }
.home-day-dots i.high { background: #ef5b5b; } .home-day-dots i.medium { background: #e0a23a; } .home-day-dots i.low { background: #2fb380; }
.home-day b { font-size: 11px; text-transform: capitalize; color: var(--muted); }
.home-day em { font-style: normal; font-size: 15px; font-weight: 800; }
.home-day.today b, .home-day.today em { color: var(--accent); }

@media (max-width: 1250px) { .home-grid { grid-template-columns: 1fr; } .home-side { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
@media (max-width: 900px) {
  .content.home-content { padding: 18px 16px 32px; }
  .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-status, .home-due { display: none; }
  .home-focus { flex-wrap: wrap; }
}
@keyframes home-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 179, 128, .45) } 70% { box-shadow: 0 0 0 12px rgba(47, 179, 128, 0) } 100% { box-shadow: 0 0 0 0 rgba(47, 179, 128, 0) } }

/* Home: notes card */
.home-main { display: grid; gap: 18px; min-width: 0; }
.home-tabs { display: inline-flex; gap: 4px; margin-top: 8px; padding: 3px; border-radius: 10px; background: var(--surface2); }
.home-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.home-tabs button em { font-style: normal; font-size: 10.5px; opacity: .8; }
.home-tabs button.on { color: var(--accent); background: var(--surface); box-shadow: 0 1px 3px rgba(6, 12, 30, .12); }
.home-notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.home-note { position: relative; display: flex; flex-direction: column; min-height: 120px; padding: 12px 12px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, transform .15s; }
.home-note:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.home-note[class*=" c-"] { background: color-mix(in srgb, var(--note) 16%, var(--surface)); border-color: color-mix(in srgb, var(--note) 45%, var(--line)); }
.home-note.pinned { box-shadow: inset 0 3px 0 var(--note, var(--accent)); }
.home-note-pin { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .12s; }
.home-note:hover .home-note-pin, .home-note-pin.on { opacity: 1; }
.home-note-pin.on { color: var(--accent); background: var(--soft); }
.home-note-open { flex: 1; cursor: pointer; padding-right: 22px; display: grid; align-content: start; gap: 4px; }
.home-note-open > strong { font-size: 13.5px; line-height: 1.3; }
.home-note-body { display: grid; gap: 2px; }
.home-note-body p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-note-check { display: flex; align-items: center; gap: 6px; padding: 1px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.home-note-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-note-check.done { color: var(--muted); } .home-note-check.done span { text-decoration: line-through; }
.home-note-check.done svg { color: #2fb380; }
.home-note footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.home-note footer span { display: inline-flex; align-items: center; gap: 3px; }
.home-note footer time { margin-left: auto; }
.home-note-client { max-width: 120px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Home: notes are a main column next to "my tasks" (focus strip, messages and week cards removed). */
.home-grid.notes-first { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.home-grid.notes-first .home-notes { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.home-grid.notes-first .home-notes h2 { font-size: 17px; }
.home-grid.notes-first .home-notes-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 1180px) { .home-grid.notes-first { grid-template-columns: 1fr; } .home-grid.notes-first .home-side { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .home-grid.notes-first .home-side { order: -1; } }