@media (min-width: 768px) {
  body { background: #f5f7f7; color: #23312e; }
  .shell { width: 100%; max-width: 2000px; padding: 0 28px 36px; }
  .shell > *, .desktop-planner > *, .desktop-planner-layout > * { min-width: 0; }
  .desktop-header { display: flex; align-items: center; gap: 24px; min-height: 88px; border-bottom: 1px solid #dce4e0; margin-bottom: 26px; }
  .desktop-brand { display: flex; align-items: center; gap: 10px; min-width: 165px; }
  .desktop-brand > .lucide { width: 32px; height: 32px; padding: 6px; box-sizing: content-box; background: #226b5d; color: white; border-radius: 8px; }
  .desktop-brand b { font-size: 18px; display: block; }
  .desktop-brand span { font-size: 12px; color: #71807a; display: block; margin-top: 4px; }
  .desktop-nav { display: flex; gap: 4px; align-self: stretch; align-items: center; flex: 1; }
  .desktop-nav button { display: flex; gap: 8px; color: #65746e; background: transparent; padding: 0 14px; min-height: 42px; font-size: 14px; }
  .desktop-nav .lucide { width: 19px; height: 19px; }
  .desktop-nav [aria-current="page"] { color: #205e50; background: #e3efea; font-weight: 700; }
  .desktop-account { display: flex; align-items: center; gap: 6px; }
  .desktop-account > button:first-child { border: 0; background: transparent; gap: 8px; color: #32473f; font-size: 13px; padding: 0 8px; }
  .desktop-account .avatar { width: 30px; height: 30px; background: #e2ebe7; }
  .desktop-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 22px; }
  .desktop-page-heading h1 { font-size: 28px; line-height: 1.2; margin: 0 0 7px; }
  .desktop-page-heading p { color: #71807a; font-size: 13px; margin: 0; }
  .planner-add { gap: 7px; font-size: 14px; font-weight: 600; background: #226b5d; min-height: 42px; }
  .planner-add .lucide { width: 18px; height: 18px; }
  .desktop-planner-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
  .planner-entry-sidebar { position: sticky; top: 16px; min-width: 0; padding: 16px; border: 1px solid #dce4e0; background: white; }
  .planner-sidebar-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
  .planner-sidebar-heading h2 { margin: 0; font-size: 18px; }
  .planner-sidebar-heading p { margin: 4px 0 0; color: #71807a; font-size: 12px; }
  .planner-sidebar-icon { display: grid; place-items: center; width: 32px; height: 32px; background: #e3efea; color: #226b5d; border-radius: 6px; }
  .planner-sidebar-icon .lucide { width: 17px; height: 17px; }
  .planner-entry-sidebar .form-grid { position: static; width: 100%; max-width: none; max-height: none; overflow: visible; padding: 0; border: 0; background: transparent; }
  .planner-entry-sidebar .form-grid > button[type="submit"] { width: 100%; }
  .planner-entry-sidebar [data-toggle-past-weeks], .planner-entry-sidebar [data-toggle-roster-view] { display: none; }
  .planner-entry-sidebar .date-picker { background: #f8faf9; padding: 9px; border: 1px solid #e1e9e4; }
  .planner-entry-sidebar .date-popover { max-height: none; }
  .desktop-planner-content { min-width: 0; }
  .planner-weekly-sidebar { min-width: 0; position: sticky; top: 16px; display: grid; gap: 12px; }
  .planner-weekly-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 2px 8px; }
  .planner-weekly-heading h2 { margin: 0; font-size: 18px; }
  .planner-weekly-heading p { margin: 5px 0 0; color: #71807a; font-size: 11px; line-height: 1.35; }
  .planner-weekly-heading > .lucide { width: 22px; height: 22px; color: #226b5d; }
  .weekly-hours-card { overflow: hidden; border: 1px solid #dce4e0; background: white; }
  .weekly-hours-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 11px 12px; background: #edf4f0; border-bottom: 1px solid #dce4e0; }
  .weekly-hours-card > header b, .weekly-hours-card > header span { display: block; }
  .weekly-hours-card > header b { color: #3d5c4a; font-size: 13px; }
  .weekly-hours-card > header span { color: #7a8b81; font-size: 10px; margin-top: 3px; }
  .weekly-hours-card .weekly-hours-total { color: #226b5d; font-size: 11px; font-weight: 700; text-align: right; white-space: nowrap; }
  .weekly-hours-list { padding: 4px 12px 7px; }
  .weekly-hours-person { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 9px 0; border-bottom: 1px solid #edf1ee; }
  .weekly-hours-person:last-child { border-bottom: 0; }
  .person-color-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 10%, white); }
  .weekly-hours-name { min-width: 0; overflow-wrap: anywhere; color: #30483b; font-size: 12px; font-weight: 700; }
  .weekly-hours-person strong { color: #226b5d; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .weekly-hours-person small { grid-column: 2 / 4; color: #829087; font-size: 10px; line-height: 1.25; }
  .weekly-hours-empty { margin: 0; padding: 14px; border: 1px dashed #cbd8d0; color: #71807a; font-size: 12px; background: #fbfcfb; }
  .desktop-timesheet { min-width: 0; }
  .desktop-timesheet .desktop-page-heading { margin-bottom: 18px; }
  .timesheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .timesheet-actions button { gap: 6px; min-height: 38px; font-size: 13px; }
  .timesheet-actions .lucide { width: 16px; height: 16px; }
  .timesheet-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 12px 0; border-block: 1px solid #dce4e0; }
  .timesheet-person-select { min-width: 220px; }
  .timesheet-person-select span { font-size: 11px; color: #71807a; }
  .timesheet-person-select select { min-height: 38px; border-color: #dce4e0; }
  .timesheet-periods { display: flex; flex-wrap: wrap; gap: 10px; }
  .timesheet-period { display: flex; align-items: center; gap: 7px; padding: 4px 7px; border: 1px solid #dce4e0; background: #f6f9f7; }
  .timesheet-period > div { min-width: 130px; text-align: center; }
  .timesheet-period b, .timesheet-period span { display: block; }
  .timesheet-period b { color: #63756b; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
  .timesheet-period span { color: #2f493a; font-size: 12px; font-weight: 700; margin-top: 2px; }
  .timesheet-period .icon-button { width: 28px; min-width: 28px; height: 28px; min-height: 28px; }
  .timesheet-period .lucide { width: 16px; height: 16px; }
  .timesheet-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
  .timesheet-metrics > div { min-width: 0; padding: 14px 16px; border: 1px solid #dce4e0; border-left: 4px solid var(--selected-person-color, #226b5d); background: white; }
  .timesheet-metrics span, .timesheet-metrics small { display: block; color: #71807a; font-size: 11px; }
  .timesheet-metrics strong { display: block; overflow-wrap: anywhere; color: #264c3c; font-size: 22px; line-height: 1.2; margin: 5px 0; }
  .timesheet-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
  .timesheet-clock-card, .timesheet-table-card { min-width: 0; border: 1px solid #dce4e0; background: white; padding: 16px; }
  .timesheet-clock-card { position: sticky; top: 16px; }
  .timesheet-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .timesheet-card-heading h2 { margin: 0; color: #2d4739; font-size: 18px; }
  .timesheet-card-heading p { margin: 5px 0 0; color: #71807a; font-size: 12px; }
  .timesheet-card-heading > .lucide { width: 22px; height: 22px; color: var(--selected-person-color, #226b5d); }
  .timesheet-card-total { color: #226b5d; font-size: 20px; white-space: nowrap; }
  .desktop-timesheet .time-display { border: 0; background: #edf4f0; color: #226b5d; font-size: 31px; }
  .desktop-timesheet .time-actions { gap: 7px; }
  .desktop-timesheet .timesheet-table-card { overflow: hidden; }
  .desktop-timesheet .timesheet-table-card table { min-width: 650px; font-size: 13px; }
  .desktop-timesheet .timesheet-table-card th { background: #f1f6f3; color: #60766a; font-size: 11px; }
  .desktop-timesheet .timesheet-table-card td { color: #354c40; }
  .desktop-timesheet .timesheet-table-card tbody tr:hover { background: #f8fbf9; }
  .desktop-timesheet .month-card { margin-top: 16px; }
  .timesheet-error { margin: 12px 0; }
  .planner-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 0; border-block: 1px solid #dce4e0; }
  .planner-month-controls { display: flex; align-items: center; gap: 6px; }
  .planner-month-controls h2 { font-size: 19px; min-width: 170px; text-align: center; margin: 0; }
  .planner-month-controls .ghost { min-height: 36px; background: white; border-color: #dce4e0; font-size: 13px; }
  .planner-month-controls .icon-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
  .planner-filters { display: flex; gap: 10px; align-items: center; }
  .planner-filters label { display: block; }
  .planner-filters label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .planner-filters select { width: 170px; min-height: 36px; border-color: #dce4e0; font-size: 13px; }
  .planner-filters label:nth-child(2) select { width: 140px; }
  .planner-view { display: flex; padding: 3px; gap: 2px; background: #e7eeeb; border-radius: 6px; }
  .planner-view button { min-height: 30px; width: 34px; padding: 0; color: #6b7b73; background: transparent; }
  .planner-view .lucide { width: 18px; height: 18px; }
  .planner-view [aria-pressed="true"] { background: white; color: #226b5d; box-shadow: 0 1px 3px #c8d2cc; }
  [data-planner-error]:empty { display: none; }
  .planner-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center; min-height: 50px; font-size: 14px; color: #53655b; }
  .planner-summary b { color: #344b40; }
  .planner-summary > div:first-child > span { margin: 0 10px; color: #bdc7c1; }
  .planner-legend { display: flex; gap: 14px; }
  .planner-legend > span { display: inline-flex; align-items: center; gap: 5px; }
  .planner-legend i { width: 7px; height: 7px; border-radius: 50%; background: #c49c37; }
  .planner-legend .status-available { background: #62a982; }
  .planner-legend .status-unavailable { background: #c96e65; }
  .planner-calendar { border: 1px solid #dce4e0; background: #f8faf9; }
  .planner-calendar-header, .planner-week-row { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; min-width: 0; }
  .planner-calendar-header { background: white; border-bottom: 1px solid #dce4e0; }
  .planner-calendar-header > span { background: #f0f5f2; }
  .planner-week-row { align-items: stretch; padding: 0 0 14px; border-bottom: 1px solid #dce4e0; }
  .planner-week-row:last-child { padding-bottom: 0; border-bottom: 0; }
  .planner-week { min-width: 0; background: white; }
  .planner-week-row > .weekly-hours-card { align-self: start; margin: 0; }
  .planner-weekdays, .planner-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .planner-weekdays { position: sticky; top: 0; z-index: 4; background: #f0f5f2; border-bottom: 1px solid #dce4e0; }
  .planner-weekdays span { padding: 12px; font-size: 14px; font-weight: 700; color: #43594c; }
  .planner-weekdays span:nth-last-child(-n+2) { color: #617266; }
  .planner-week-label { min-height: 34px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #edf2f0; border-bottom: 1px solid #d7e1da; border-top: 2px solid #c6d4cc; color: #5b7061; font-size: 13px; }
  .planner-week-label b { color: #647a6c; }
  .planner-week-label span:last-child { margin-left: auto; }
  .planner-day { display: flex; flex-direction: column; min-width: 0; min-height: 150px; padding: 9px; border-right: 1px solid #dce4df; }
  .planner-day:last-child { border-right: 0; }
  .planner-day.is-weekend { background: #fafbf9; }
  .planner-day.is-adjacent { background: #f3f6f5; }
  .planner-day > header { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin-bottom: 10px; }
  .planner-day time { display: grid; gap: 2px; align-items: start; padding-left: 4px; color: #3b5044; }
  .planner-day-weekday { color: #637569; font-size: 11px; font-weight: 700; }
  .planner-day-date { display: flex; align-items: baseline; gap: 5px; }
  .planner-day > header time b { font-size: 18px; }
  .planner-day-date > span { font-size: 12px; color: #637569; }
  .planner-day.is-today time b { background: #266e5d; color: white; padding: 3px 6px; border-radius: 4px; }
  .planner-day > header .icon-button { width: 24px; min-width: 24px; height: 26px; min-height: 26px; color: #8b9c92; }
  .planner-day > header .lucide { width: 15px; height: 15px; }
  .planner-day-entries { display: flex; flex: 1; flex-direction: column; gap: 16px; min-width: 0; }
  .planner-entry-group { display: grid; gap: 7px; min-width: 0; }
  .planner-entry-group h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 0 0 2px; font-size: 12px; line-height: 1.4; color: #6b571f; }
  .planner-entry-group h3 span { font-weight: 400; margin-left: auto; }
  .planner-entry-group.group-available h3 { color: #32694c; }
  .planner-entry-group.group-unavailable { margin-top: auto; padding-top: 12px; border-top: 1px solid #dfc8c5; }
  .planner-entry-group.group-unavailable:first-child { margin-top: 0; }
  .planner-entry-group.group-unavailable h3 { color: #914d48; }
  .planner-empty { color: #687a6e; font-size: 13px; padding: 8px 4px; }
  .planner-entry { display: grid; justify-content: stretch; align-content: start; gap: 6px; width: 100%; min-width: 0; padding: 9px 10px; min-height: 66px; text-align: left; background: #fff6dc; color: #263b30; border: 1px solid #e6d7a9; border-left: 3px solid var(--person-color); border-radius: 4px; }
  .planner-entry:hover { outline: 1px solid #8aa493; filter: none; }
  .planner-entry.status-available { background: #eaf3ed; border-top-color: #d5e6d9; border-bottom-color: #d5e6d9; border-right-color: #d5e6d9; }
  .planner-entry.status-unavailable { background: #f9ecea; border-top-color: #efd8d4; border-bottom-color: #efd8d4; border-right-color: #efd8d4; }
  .planner-person { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; line-height: 1.35; }
  .planner-person .person-color-dot { flex: 0 0 auto; width: 8px; height: 8px; background: var(--person-color); }
  .planner-entry-time { display: flex; gap: 5px 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; line-height: 1.4; color: #455a4b; min-width: 0; }
  .planner-entry-time b { color: #795b16; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
  .status-available .planner-entry-time b { color: #357250; }
  .status-unavailable .planner-entry-time b { color: #9d5550; }
  .planner-entry-time > span { display: flex; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
  .planner-entry-time time { padding: 0; white-space: nowrap; color: inherit; }
  .planner-entry-meta { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12px; color: #5b6c60; }
  .planner-entry-meta .lucide { width: 13px; height: 13px; }
  .planner-entry-meta > span { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
  .planner-hours { margin-top: 30px; padding-top: 22px; border-top: 1px solid #dce4e0; }
  .desktop-section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
  .desktop-section-heading h2 { font-size: 18px; }
  .desktop-section-heading p { color: #7c8a82; font-size: 12px; margin: 6px 0 0; }
  .desktop-section-heading > .lucide { color: #6a8c7a; }
  .planner-hours table { background: white; min-width: 680px; font-size: 14px; }
  .planner-hours th, .planner-hours td { padding: 12px; border-color: #e1e8e3; }
  .planner-hours thead th { background: #edf3ef; text-transform: none; color: #496451; font-size: 14px; }
  .planner-hours thead small { display: block; font-weight: 400; color: #849186; margin-top: 5px; white-space: nowrap; }
  .planner-hours tbody th { font-weight: 600; font-size: 14px; text-transform: none; color: #405649; }
  .planner-hours td { font-variant-numeric: tabular-nums; }
  .person-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; margin-right: 8px; }
  .planner-hours td:last-child { background: #f3f7f4; color: #226b5d; }
  .excel-week { border: 0; border-radius: 0; padding: 16px 0; background: transparent; }
  .excel-table { border: 1px solid #dce4e0; background: white; }
  .desktop-header ~ .toolbar { display: flex; flex-wrap: wrap; padding: 12px 0; border: 0; border-block: 1px solid #dce4e0; background: transparent; border-radius: 0; }
  .desktop-header ~ .toolbar .segmented { display: none; }
  .inventory-grid, .timesheet-grid { grid-template-columns: 270px minmax(0, 1fr); }
  .inventory-grid .form-grid, .timesheet-grid .form-grid { width: 100%; }
  .shell > .grid > .panel { border-radius: 0; border-color: #dce4e0; }
  .app-sheet { padding: 24px; }
  .app-sheet .form-grid { gap: 14px; }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .shell { padding: 0 16px 28px; }
  .desktop-header { flex-wrap: wrap; gap: 8px 16px; padding-block: 12px; margin-bottom: 20px; }
  .desktop-nav { order: 3; flex-basis: 100%; }
  .desktop-account { margin-left: auto; }
  .desktop-nav button { flex: 1; }
  .planner-toolbar { gap: 10px; }
  .desktop-planner-layout { grid-template-columns: minmax(250px, 280px) minmax(0, 1fr); gap: 12px; }
  .planner-weekly-sidebar { grid-column: 1 / -1; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .planner-weekly-heading { grid-column: 1 / -1; }
  .planner-entry-sidebar { padding: 12px; }
  .planner-sidebar-heading h2 { font-size: 16px; }
  .planner-sidebar-heading p { font-size: 11px; }
  .planner-filters { flex: 1; justify-content: flex-end; }
  .planner-day { padding: 5px; }
  .planner-day-weekday { font-size: 10px; }
  .planner-calendar-header, .planner-week-row { grid-template-columns: minmax(0, 1fr) 220px; gap: 10px; }
  .planner-weekdays span { padding: 10px 7px; }
  .planner-entry { padding: 8px 5px; }
  .planner-summary { flex-wrap: wrap; padding-block: 10px; }
  .timesheet-layout { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); }
  .timesheet-toolbar { align-items: flex-end; }
  .timesheet-period > div { min-width: 105px; }
  .inventory-grid, .timesheet-grid { grid-template-columns: minmax(0, 1fr); }
  .timesheet-grid > .form-grid, .inventory-grid > .form-grid { position: static; display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-height: none; }
  .desktop-planner .excel-week { overflow: auto; }
  .desktop-planner .excel-table { min-width: 860px; }
}

@media (min-width: 768px) and (max-width: 900px) {
  .desktop-planner-layout { display: block; }
  .planner-entry-sidebar { position: static; margin-bottom: 16px; }
  .planner-entry-sidebar .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .planner-entry-sidebar .form-grid .date-picker,
  .planner-entry-sidebar .form-grid .wide,
  .planner-entry-sidebar .form-grid > button[type="submit"] { grid-column: 1 / -1; }
  .planner-entry-sidebar .date-picker { display: grid; grid-template-columns: 1fr; }
  .planner-calendar-header, .planner-week-row { grid-template-columns: minmax(0, 1fr) 190px; gap: 8px; }
  .planner-weekly-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .timesheet-layout { display: block; }
  .timesheet-clock-card { position: static; margin-bottom: 16px; }
}

@media (min-width: 1400px) {
  .desktop-planner-layout { grid-template-columns: 300px minmax(0, 1fr); }
}
