/* Home page in the approved board concept. */
.app-nav [data-page="home"] { --nav-icon: var(--icon-home); }
.app-nav [data-page="home"]::before { content: ""; }
.app .app-nav button.active { background: #eee8ff !important; color: #7047db !important; }

.workspace > .home-view { margin: 16px 24px 32px !important; padding: 0 !important; display: grid !important; grid-template-columns: minmax(0,1.6fr) minmax(300px,1fr) !important; align-items: start !important; gap: 16px !important; background: #fff !important; }
.home-view > .home-onboarding,.home-view > .home-stats { grid-column: 1 / -1; }
.home-view > .home-tasks { grid-column: 1; grid-row: span 2; }
.home-view > :is(.home-projects,.home-inbox) { grid-column: 2; }

.home-view .home-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.home-view .home-stats article { display: grid; gap: 6px; padding: 12px 14px; border-radius: 8px; background: #f8f6fc; }
.home-view .home-stats span { color: #898397; font-size: 13px; }
.home-view .home-stats strong { color: #24202c; font-size: 24px; font-weight: 600; }
.home-view .home-stats article.alert { background: #ffedf0; }
.home-view .home-stats article.alert strong { color: #bf4c5d; }

.home-view .home-card { min-width: 0; padding: 18px 20px; border: 1px solid #eae5f3; border-radius: 8px; background: #fff; }
.home-view .home-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.home-view .home-card h3 { margin: 0; color: #24202c; font-size: 16px; font-weight: 600; }
.home-view .home-card > header p { margin: 4px 0 0; color: #898397; font-size: 13px; }
.home-view .home-card > header button { min-height: 32px; padding: 6px 12px; border: 1px solid #ddd7e7; border-radius: 7px; background: #fff; color: #7954d6; font-size: 13px; font-weight: 500; cursor: pointer; }
.home-view .home-card > header button:disabled { color: #b4adc0; cursor: default; }
.home-view .home-empty { margin: 8px 0; color: #898397; font-size: 14px; line-height: 1.5; }

.home-view .home-group-title { margin: 14px 0 4px; color: #746c84; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.home-view .home-group-title:first-child { margin-top: 0; }
.home-view .home-group-title span { color: #b0a8bd; font-weight: 500; }
.home-view .home-task-list { display: grid; margin: 0 !important; }
.home-view .home-task-list .my-task-row { padding: 10px 4px !important; min-height: 52px !important; grid-template-columns: minmax(0,1fr) 100px 140px !important; }

.home-view .home-project-list { display: grid; }
.home-view .home-project { display: grid; grid-template-columns: 28px minmax(0,1fr) 56px; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid #f0edf5; background: transparent; text-align: left; cursor: pointer; }
.home-view .home-project:last-child { border-bottom: 0; }
.home-view .home-project:hover { background: #faf8fe; }
.home-view .home-project .project-mini-icon { width: 28px !important; height: 28px !important; border-radius: 7px !important; }
.home-view .home-project-main { display: grid; gap: 2px; min-width: 0; }
.home-view .home-project-main strong { color: #24202c; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-view .home-project-main small { color: #898397; font-size: 12px; }
.home-view .home-project-main em { color: #d74d61; font-style: normal; }
.home-view .home-project-progress { height: 6px; border-radius: 4px; background: #e6e0ef; overflow: hidden; }
.home-view .home-project-progress i { display: block; height: 100%; border-radius: inherit; background: #8b60e7; }

.home-view .home-notification { display: grid; gap: 3px; padding: 10px 4px 10px 16px; border-bottom: 1px solid #f0edf5; position: relative; }
.home-view .home-notification:last-child { border-bottom: 0; }
.home-view .home-notification.unread::before { content: ""; position: absolute; left: 2px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: #7954d6; }
.home-view .home-notification strong { color: #24202c; font-size: 14px; font-weight: 500; }
.home-view .home-notification p { margin: 0; color: #5f586d; font-size: 13px; line-height: 1.4; }
.home-view .home-notification small { color: #9990aa; font-size: 12px; }

.home-view .home-onboarding { background: linear-gradient(135deg, #f6f2ff, #fff 60%); border-color: #e3d9f7; }
.home-view .home-onboarding .home-dismiss { color: #898397 !important; border-color: transparent !important; background: transparent !important; }
.home-view .home-onboarding-progress { height: 6px; margin-bottom: 12px; border-radius: 4px; background: #e6e0ef; overflow: hidden; }
.home-view .home-onboarding-progress i { display: block; height: 100%; border-radius: inherit; background: #7954d6; }
.home-view .home-onboarding ol { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.home-view .home-onboarding li { display: flex; align-items: center; gap: 10px; min-height: 40px; color: #24202c; font-size: 14px; }
.home-view .home-onboarding li > span:nth-child(2) { flex: 1; }
.home-view .home-onboarding li.done > span:nth-child(2) { color: #8c839a; text-decoration: line-through; }
.home-view .home-step-check { flex: 0 0 20px; width: 20px; height: 20px; border: 1.5px solid #cfc6de; border-radius: 50%; background: #fff; }
.home-view .home-onboarding li.done .home-step-check { border-color: #63ac45; background: #63ac45 url('/icons/lucide/check.svg') center / 12px no-repeat; filter: none; }
.home-view .home-onboarding li button { min-height: 30px; padding: 4px 12px; border: 0; border-radius: 7px; background: #7954d6; color: #fff; font-size: 13px; cursor: pointer; }

@media (max-width: 1100px) {
  .workspace > .home-view { grid-template-columns: minmax(0,1fr) !important; }
  .home-view > :is(.home-tasks,.home-projects,.home-inbox) { grid-column: 1; grid-row: auto; }
}
@media (max-width: 760px) {
  .workspace > .home-view { margin: 12px 14px 14px !important; gap: 12px !important; }
  .home-view .home-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .home-view .home-stats strong { font-size: 20px; }
  .home-view .home-card { padding: 14px; }
  .home-view .home-onboarding ol { grid-template-columns: minmax(0,1fr); }
  .home-view .home-task-list .my-task-row { grid-template-columns: auto minmax(0,1fr) !important; }
}

/* Recurring task marker next to the due date, and the recurrence field in the task card. */
.due-badge .recurrence-mark { font-style: normal; font-weight: 600; color: #7954d6; }
.task-concept .task-recurrence-field select { min-height: 36px; }

/* Quick add on Home */
.home-view .home-quick-task { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 180px); gap: 8px; margin: 0 0 12px; }
.home-view .home-quick-task input,
.home-view .home-quick-task select { min-height: 40px; padding: 8px 12px; border: 1px solid #ddd7e7; border-radius: 7px; background: #fff; color: #24202c; font: 14px var(--app-font); }
.home-view .home-quick-task input:focus { outline: none; border-color: #9a7be6; box-shadow: 0 0 0 3px #7954d626; }
@media (max-width: 760px) { .home-view .home-quick-task { grid-template-columns: minmax(0, 1fr); } }

/* Home, centred: greeting, week summary, widgets side by side */
.workspace:has(> .home-view) .topbar { display: none !important; }
.workspace > .home-view { display: block !important; max-width: 1080px; margin: 28px auto 40px !important; padding: 0 24px !important; }
.home-view .home-hero { margin: 0 0 24px; text-align: center; }
.home-view .home-date { margin: 0 0 4px; color: #6d6e6f; font-size: 14px; font-weight: 500; }
.home-view .home-hero h2 { margin: 0 0 14px; color: #1e1f21; font-size: 30px; font-weight: 500; letter-spacing: -.4px; }
.home-view .home-week { display: inline-flex; gap: 0; margin: 0; border-radius: 999px; background: #f6f6f7; color: #4a4b4d; font-size: 13px; }
.home-view .home-week span { padding: 7px 16px; }
.home-view .home-week span + span { border-left: 1px solid #e3e3e6; }
.home-view > .home-onboarding { margin-bottom: 16px; }
.home-view .home-widgets { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.home-view .home-card-title { display: flex; align-items: center; gap: 10px; }
.home-view .home-card-title .avatar { width: 32px !important; height: 32px !important; min-width: 32px !important; font-size: 13px !important; }
.home-view .home-tabs { display: flex; gap: 20px; margin: 0 0 10px; border-bottom: 1px solid #ededf0; }
.home-view .home-tabs button { margin-bottom: -1px; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #6d6e6f; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.home-view .home-tabs button[aria-selected="true"] { border-bottom-color: #1e1f21; color: #1e1f21; }
.home-view .home-tabs button:hover { color: #1e1f21; }
.home-view .home-quick-task { margin-bottom: 4px; }
.home-view .home-show-all { margin-top: 8px; padding: 6px 0; border: 0; background: transparent; color: #6a45cc; font: inherit; font-size: 13px; cursor: pointer; }
.home-view .home-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.home-view .home-project-tile { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 60px; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #1e1f21; font: inherit; text-align: left; cursor: pointer; }
.home-view .home-project-tile:hover { background: #f6f6f7; }
.home-view .home-project-tile .project-mini-icon { flex: none; width: 36px !important; height: 36px !important; border-radius: 8px !important; }
.home-view .home-project-tile strong { display: block; overflow: hidden; font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.home-view .home-project-tile small { color: #6d6e6f; font-size: 12px; }
.home-view .home-project-tile small em { color: #c0392b; font-style: normal; }
.home-view .home-project-main { min-width: 0; }
.home-view .home-project-tile.create { color: #6d6e6f; }
.home-view .home-project-plus { display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px dashed #c9c9cf; border-radius: 8px; font-size: 20px; }
.home-view .home-project-tile.create:hover .home-project-plus { border-color: #7954d6; color: #7954d6; }
@media (max-width: 900px) {
  .home-view .home-widgets { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .workspace > .home-view { margin: 16px auto 90px !important; padding: 0 14px !important; }
  .home-view .home-hero h2 { font-size: 24px; }
  .home-view .home-week { flex-direction: column; border-radius: 12px; }
  .home-view .home-week span + span { border-left: 0; border-top: 1px solid #e3e3e6; }
  .home-view .home-project-grid { grid-template-columns: 1fr; }
}
html[data-theme="dark"] .home-view .home-hero h2, html[data-theme="dark"] .home-view .home-tabs button[aria-selected="true"], html[data-theme="dark"] .home-view .home-project-tile { color: var(--d-text); }
html[data-theme="dark"] .home-view .home-tabs button[aria-selected="true"] { border-bottom-color: var(--d-text); }
html[data-theme="dark"] .home-view .home-week { background: var(--d-surface-2); color: var(--d-text-2); }
html[data-theme="dark"] .home-view .home-week span + span { border-color: var(--d-border); }
html[data-theme="dark"] .home-view .home-tabs { border-color: var(--d-border); }
html[data-theme="dark"] .home-view .home-project-tile:hover { background: var(--d-hover); }
.home-view .home-task-list .my-task-row { grid-template-columns: minmax(0, 1fr) auto !important; }
.home-view .home-task-list .my-task-row .priority { display: none !important; }
.home-view .home-task-list .my-task-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .home-view .home-tabs { gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .home-view .home-tabs button { flex: none; font-size: 13px; white-space: nowrap; }
}
