/* The overview follows the reference: greeting, compact metrics, tasks, schedule + notes. */
.dashboard-page { padding: 14px 24px 28px; background: #f5f8fc; min-height: calc(100dvh - 82px); }
.overview-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; min-width: 0; overflow: hidden; }
.overview-card-header { display: flex; align-items: center; gap: 12px; padding: 18px 20px 13px; }
.overview-card-header h2 { display: flex; align-items: center; gap: 10px; font-size: var(--type-section); font-weight: 600; letter-spacing: -.2px; }
.overview-card-header h2 svg { width: 19px; height: 19px; }
.overview-card-header>.overview-link,.overview-card-header>.icon-btn { margin-left: auto; }
.overview-card-header>.portal-control { background: #f1f6fc; font-size: var(--type-caption); min-height: 29px; height: 29px; padding: 4px 8px; border: 0; border-radius: 7px; width: 140px; }
.overview-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--type-control); line-height: 1.4; color: var(--muted); padding: 4px 0; }
.overview-link:hover { color: var(--red); }
.overview-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.dashboard-task-table { padding: 0 20px; }
.dashboard-task-head,.dashboard-task-row { display: grid; grid-template-columns: minmax(220px,1fr) minmax(130px,.52fr) 105px 100px; gap: 14px; align-items: center; }
.dashboard-task-head { font-size: var(--type-caption); color: var(--muted); border-bottom: 1px solid var(--line); padding: 3px 0 12px; }
.dashboard-task-row { min-height: 57px; border-bottom: 1px solid #e8edf4; padding: 10px 0; }
.dashboard-task-row:last-child { border-bottom: 0; }
.dashboard-task-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dashboard-task-name .task-completion { position: static; transform: none; flex: 0 0 18px; width: 18px; height: 18px; }
.dashboard-task-name>button { font-size: var(--type-body); line-height: 1.4; text-align: left; font-weight: 500; }
.dashboard-task-name>button:hover { color: var(--red); }
.dashboard-task-project { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: var(--type-control); text-align: left; line-height: 1.4; color: var(--muted); }
.dashboard-task-project .project-dot { flex-shrink: 0; }
.dashboard-task-project:disabled { cursor: default; }
.dashboard-task-due { display: flex; align-items: center; gap: 6px; font-size: var(--type-control); color: var(--muted); white-space: nowrap; }
.dashboard-task-due svg { width: 14px; height: 14px; }
.dashboard-task-due.overdue { color: #ac455b; }
.dashboard-task-due.today { color: var(--red-dark); font-weight: 500; }
.dashboard-task-row>.priority-badge { width: max-content; max-width: 100%; font-size: var(--type-caption); }
.dashboard-task-row>.priority-badge.none { background: #f0f4f8; color: var(--muted); }
.dashboard-progress { display: flex; align-items: center; gap: 14px; background: #fbfcfe; border-top: 1px solid #e8edf4; padding: 12px 20px; }
.dashboard-progress>div:first-child { display: flex; gap: 9px; font-size: var(--type-caption); color: var(--muted); white-space: nowrap; }
.dashboard-progress strong { color: var(--ink); font-weight: 500; }
.dashboard-progress-track { background: #e5edf5; height: 5px; flex: 1; border-radius: 5px; overflow: hidden; }
.dashboard-progress-track>span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.dashboard-progress>b { font-size: var(--type-caption); color: var(--muted); font-weight: 500; }
.dashboard-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.schedule-week-nav { display: flex; align-items: center; gap: 8px; padding: 0 17px 8px; color: var(--muted); font-size: var(--type-caption); }
.schedule-week-nav>span { flex: 1; text-align: center; }
.schedule-week-nav button { width: 25px; height: 25px; }
.schedule-week-nav button:first-child svg { transform: rotate(180deg); }
.schedule-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; padding: 0 20px 15px; }
.schedule-week button { display: flex; flex-direction: column; align-items: center; border-radius: 10px; padding: 8px 2px 5px; gap: 3px; min-width: 0; }
.schedule-week button>span { font-size: var(--type-caption); color: var(--muted); text-transform: capitalize; }
.schedule-week button>strong { font-size: var(--type-body); font-weight: 600; }
.schedule-week button>i { height: 4px; width: 4px; border-radius: 50%; background: transparent; }
.schedule-week button>i.has-events { background: var(--accent); }
.schedule-week button:hover { background: #edf4fc; }
.schedule-week button.is-today { box-shadow: inset 0 0 0 1px #87b9b0; }
.schedule-week button.selected { background: var(--red); color: white; box-shadow: none; }
.schedule-week button.selected>span { color: #d9f1eb; }
.schedule-week button.selected>i.has-events { background: #fff; }
.schedule-entries { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.schedule-event { display: flex; align-items: center; gap: 9px; width: 100%; border-radius: 9px; background: #f7fafd; min-height: 68px; padding: 12px 10px 12px 13px; text-align: left; position: relative; }
.schedule-event:before { content: ''; position: absolute; top: 12px; bottom: 12px; left: 0; width: 3px; background: #78acd2; border-radius: 3px; }
.schedule-event.mint:before { background: #52af94; }
.schedule-event.violet:before { background: #a697d3; }
.schedule-event-icon svg { width: 18px; height: 18px; color: #60778d; }
.schedule-event-copy { flex: 1; min-width: 0; }
.schedule-event-copy>strong { display: block; font-size: var(--type-control); line-height: 1.4; font-weight: 550; }
.schedule-event-copy>small { display: block; font-size: var(--type-caption); line-height: 1.4; color: var(--muted); margin-top: 3px; }
.schedule-event:hover { background: #eef4fc; }
.schedule-avatars { display: flex; align-items: center; flex-shrink: 0; padding-left: 4px; }
.schedule-avatars .avatar { width: 22px; height: 22px; margin-left: -5px; font-size: 7px; border: 2px solid white; }
.schedule-footer { display: flex; justify-content: space-between; padding: 13px 20px 16px; }
.dashboard-note-list { padding: 0 19px; max-height: 340px; overflow: auto; }
.dashboard-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; }
.dashboard-note>input { margin-top: 2px; border-radius: 50% !important; }
.note-content { flex: 1; min-width: 0; text-align: left; }
.note-content strong { font-size: var(--type-body); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.note-content p { font-size: var(--type-control); color: var(--muted); line-height: 1.5; margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dashboard-note.done .note-content strong { color: var(--muted); text-decoration: line-through; }
.dashboard-note.done .note-content p { color: #7d8c9d; }
.note-edit { width: 24px; height: 24px; flex-shrink: 0; opacity: .6; }
.note-edit svg { width: 14px; height: 14px; }
.notes-caption { padding: 14px 20px 17px; color: var(--muted); font-size: var(--type-caption); }
.overview-empty { padding: 28px 15px; color: var(--muted); font-size: var(--type-control); line-height: 1.65; text-align: center; }
/* Calendar: deadlines are all-day items; timed events share one source with the dashboard. */
.calendar-page { padding: 17px 22px 20px; background: white; }
.calendar-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.calendar-view-tabs { flex-shrink: 0; }
.calendar-view-tabs .tab { padding: 5px 10px; }
.calendar-period-nav { display: flex; align-items: center; gap: 5px; }
.calendar-period-nav h2 { font-size: var(--type-body); font-weight: 500; padding: 0 4px; }
.calendar-period-nav h2:first-letter { text-transform: uppercase; }
.calendar-period-nav>.icon-btn:first-child svg { transform: rotate(180deg); }
.calendar-period-nav>.icon-btn { width: 24px; height: 28px; }
.calendar-period-nav>.btn { margin-left: 6px; }
.calendar-options { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.calendar-task-toggle { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--type-control); white-space: nowrap; }
.calendar-options>.portal-control { width: 150px; min-height: 32px; height: 32px; font-size: var(--type-control); padding: 5px 8px; }
.calendar-scroll { border: 1px solid #d5e1ed; border-radius: 12px; overflow: auto; max-height: calc(100dvh - 205px); overscroll-behavior: contain; }
.timeline { min-width: 850px; }
.timeline.one-day { min-width: 0; }
.timeline-head,.timeline-deadlines,.timeline-body { display: grid; grid-template-columns: 53px repeat(var(--calendar-days),minmax(0,1fr)); }
.timeline-head { position: sticky; top: 0; z-index: 3; background: white; border-bottom: 1px solid #d5e1ed; }
.timeline-corner { font-size: 11px; color: var(--muted); line-height: 1.3; padding: 11px 5px; text-align: center; align-self: center; }
.timeline-day { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 4px; border-left: 1px solid var(--line); min-height: 61px; }
.timeline-day>span { font-size: var(--type-control); color: var(--muted); text-transform: capitalize; }
.timeline-day>strong { font-size: 23px; font-weight: 600; }
.timeline-day.today { background: var(--nav-ink); color: white; }
.timeline-day.today>span { color: #d9e6f3; }
.timeline-day:hover:not(.today) { background: #edf4fc; }
.timeline-deadlines { border-bottom: 1px solid #d5e1ed; background: #fafcfe; }
.timeline-deadlines>div { padding: 5px; border-left: 1px solid var(--line); min-height: 46px; }
.deadline-event { display: flex; align-items: flex-start; gap: 4px; width: 100%; text-align: left; font-size: 11px; color: #526c89; background: #e7eef8; border-radius: 5px; padding: 5px; line-height: 1.35; margin-bottom: 4px; }
.deadline-event:last-child { margin-bottom: 0; }
.deadline-event svg { width: 12px; height: 12px; flex-shrink: 0; margin-top: 1px; }
.deadline-event span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.no-deadlines { color: #a4b0bf; display: block; text-align: center; padding: 4px; }
.timeline-hours,.timeline-track { position: relative; height: var(--timeline-height); }
.timeline-hours>span { position: absolute; width: 100%; text-align: center; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; padding-top: 5px; }
.timeline-track { border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom,#dfe7f0 0,#dfe7f0 1px,transparent 1px,transparent 64px); }
.timeline-event { position: absolute; display: flex; flex-direction: column; gap: 3px; padding: 5px 7px; text-align: left; border-radius: 8px; overflow: hidden; border-left: 3px solid #77b1da; background: #dceffa; color: #2c526d; }
.timeline-event.mint { background: #daf1ea; border-left-color: #6fbea6; color: #315f53; }
.timeline-event.violet { background: #e9e4f8; border-left-color: #aa99d6; color: #5f507d; }
.timeline-event:hover { filter: brightness(.975); box-shadow: 0 2px 7px #334e6815; }
.timeline-event>strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; font-size: 13px; line-height: 1.25; flex-shrink: 0; }
.timeline-event>small { font-size: 11px; line-height: 1.2; white-space: nowrap; }
.timeline-event .schedule-avatars { margin-top: auto; }
.timeline-event.short-event { padding: 4px 6px; gap: 2px; }
.timeline-event.short-event>strong { -webkit-line-clamp: 1; font-size: 12px; }
.timeline-event.short-event>small { font-size: 10px; }
.calendar-now { position: absolute; z-index: 2; left: 0; right: 0; height: 1.5px; background: #cc6879; pointer-events: none; }
.calendar-now>i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #cc6879; margin-top: -2px; margin-left: -2px; }
.calendar-legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 16px; margin-top: 13px; font-size: var(--type-caption); color: var(--muted); }
.calendar-legend>span { display: flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 9px; height: 9px; border-radius: 3px; background: #93c5e5; }
.calendar-legend i.mint { background: #8acbb6; }
.calendar-legend i.violet { background: #b6a4dd; }
.calendar-legend i.deadline { background: #becde2; }
.month-calendar { min-width: 770px; }
.month-weekdays,.month-cells { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.month-weekdays { position: sticky; top: 0; z-index: 2; background: #f5f9ff; text-align: center; color: var(--muted); font-size: var(--type-control); padding: 11px 0; border-bottom: 1px solid var(--line); }
.month-cell { min-height: 132px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; }
.month-cell:nth-child(7n) { border-right: 0; }
.month-cell.other-month { background: #f7f9fc; }
.month-cell.other-month .month-day-number { color: #8998ab; }
.month-day-number { display: flex; justify-content: center; align-items: center; width: 27px; height: 27px; font-size: var(--type-control); margin-bottom: 5px; border-radius: 50%; }
.month-day-number.today { background: var(--red); color: white; }
.month-entry { display: flex; gap: 5px; align-items: center; text-align: left; width: 100%; border-radius: 5px; padding: 4px 5px; margin-bottom: 4px; font-size: 11px; background: #dceffa; color: #315974; }
.month-entry.mint { background: #def1ea; color: #326251; }
.month-entry.violet { background: #eae5f7; color: #63527d; }
.month-entry.deadline { background: #edf2f9; color: #566f8e; }
.month-entry svg { width: 12px; height: 12px; flex-shrink: 0; }
.month-entry span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.month-more { font-size: 11px; color: var(--muted); padding: 3px; }
.year-calendar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.year-month { border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.year-month-name { font-size: var(--type-body); font-weight: 600; text-transform: capitalize; margin-bottom: 10px; }
.year-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; text-align: center; }
.year-days>span { font-size: 11px; color: var(--muted); padding-bottom: 5px; }
.year-days>button { position: relative; font-size: 12px; min-height: 29px; border-radius: 7px; }
.year-days>button:hover { background: #e7f0fb; }
.year-days>button.today { background: var(--red); color: white; }
.year-days>button.has-events:after { content: ''; width: 3px; height: 3px; border-radius: 50%; background: currentColor; position: absolute; bottom: 2px; left: calc(50% - 1.5px); }
.event-modal { width: min(580px,calc(100% - 24px)); }
.event-modal .modal-body { padding-top: 15px; }
.event-modal .form-field { margin-bottom: 16px; }
.event-modal .form-field textarea { min-height: 90px; }
.event-time-row { grid-template-columns: 1fr 1fr !important; gap: 14px !important; }
.event-people { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.event-people legend { font-size: var(--type-control); margin-bottom: 8px; }
.event-people label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: var(--type-control); cursor: pointer; }
.event-people .avatar { width: 22px; height: 22px; font-size: 7px; border: 0; }
.event-delete { margin-right: auto; color: #a94e60; }
@media(max-width:1200px) {
 .dashboard-bottom { gap: 15px; }
 .dashboard-task-head,.dashboard-task-row { grid-template-columns: minmax(180px,1fr) 150px 90px 90px; gap: 10px; }
 .dashboard-page { padding: 14px 20px 24px; }
 .calendar-options { width: 100%; justify-content: flex-end; }
 .calendar-scroll { max-height: calc(100dvh - 230px); }
}
@media(max-width:1000px) {
 .dashboard-bottom { grid-template-columns: 1fr; }
 .dashboard-task-head,.dashboard-task-row { grid-template-columns: minmax(160px,1fr) 105px 90px; }
 .dashboard-task-project,.dashboard-task-head>span:nth-child(2) { display: none; }
 .year-calendar { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
 .dashboard-page { padding: 12px 13px 18px; }
 .overview-card-header { padding: 15px 13px 12px; gap: 8px; flex-wrap: wrap; }
 .overview-card-header h2 { font-size: 16px; gap: 7px; }
 .dashboard-tasks .overview-card-header>.portal-control { margin-left: auto; width: 122px; }
 .dashboard-tasks .overview-card-header>.overview-link { width: 100%; margin: 0; justify-content: flex-end; font-size: 12px; }
 .dashboard-task-table { padding: 0 13px; }
 .dashboard-task-head { display: none; }
 .dashboard-task-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; }
 .dashboard-task-name { grid-column: 1/-1; }
 .dashboard-task-name>button { font-size: var(--type-body); }
 .dashboard-task-due { padding-left: 28px; font-size: var(--type-caption); }
 .dashboard-task-row>.priority-badge { justify-self: end; }
 .dashboard-progress { padding: 12px 13px; gap: 10px; }
 .dashboard-progress>div:first-child { flex-direction: column; gap: 2px; }
 .dashboard-progress-track { max-width: 110px; margin-left: auto; }
 .schedule-week { padding: 0 13px 13px; gap: 2px; }
 .schedule-entries { padding: 0 12px; }
 .schedule-event { gap: 7px; }
 .schedule-avatars .avatar { width: 20px; height: 20px; }
 .dashboard-note-list { padding: 0 13px; }
 .calendar-page { padding: 13px 10px; }
 .calendar-toolbar { gap: 10px; margin-bottom: 12px; }
 .calendar-view-tabs { width: 100%; display: flex; }
 .calendar-view-tabs .tab { flex: 1; padding: 5px 6px; }
 .calendar-period-nav { width: 100%; justify-content: space-between; gap: 1px; }
 .calendar-period-nav h2 { font-size: var(--type-control); }
 .calendar-options { justify-content: space-between; gap: 6px; }
 .calendar-task-toggle { font-size: var(--type-caption); }
 .calendar-options>.portal-control { font-size: var(--type-caption); width: 134px; }
 .calendar-scroll { max-height: calc(100dvh - 260px); min-height: 300px; }
 .timeline.one-day { --calendar-days: 1; }
 .calendar-legend { justify-content: flex-start; gap: 10px; font-size: 11px; }
 .year-calendar { gap: 10px; grid-template-columns: 1fr; }
 .year-month { padding: 15px; }
 .year-days>button { min-height: 32px; }
 .event-modal .form-footer { gap: 6px; }
 .event-modal .form-footer .btn { padding: 8px 10px; }
}
