:root {
  color-scheme: light;
  --ink: #202331;
  --muted: #727789;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #eceef5;
  --line: #dde0ea;
  --line-strong: #c9cedd;
  --sidebar: #11151c;
  --sidebar-muted: #aeb5c3;
  --accent: #5a5ee6;
  --accent-dark: #4246c9;
  --accent-soft: #eeefff;
  --lime: #c8f45b;
  --coral: #ef6f7d;
  --blue: #4aa8df;
  --violet: #9254c8;
  --green: #4aa978;
  --radius: 12px;
  --shadow: 0 18px 50px rgb(34 38 63 / 12%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #f5f6fa; color: var(--ink); }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid #242a34; background: var(--sidebar); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; z-index: 8; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #c8f45b, #8fe6a5); color: #141820; display: grid; place-items: center; font-weight: 900; transform: rotate(-4deg); box-shadow: 0 8px 24px rgb(200 244 91 / 18%); }
.brand strong { display: block; font-size: 18px; letter-spacing: -.035em; }
.brand small { display: block; color: #7f8999; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.nav { display: grid; gap: 3px; }
.nav button { border: 0; color: var(--sidebar-muted); background: transparent; border-radius: 8px; padding: 10px 11px; display: flex; gap: 11px; align-items: center; text-align: left; font-size: 14px; }
.nav button:hover { color: #fff; background: #1b212b; }
.nav button.active { background: #272d39; color: #fff; font-weight: 720; box-shadow: inset 3px 0 0 var(--lime); }
.nav-icon { width: 18px; text-align: center; color: #8d97a7; }
.nav button.active .nav-icon { color: var(--lime); }
.sidebar-footer { margin-top: auto; border-top: 1px solid #2b313b; padding: 15px 10px 0; color: #7f8999; font-size: 11px; line-height: 1.55; }
.sidebar-footer button { color: var(--sidebar-muted); background: none; border: 0; padding: 9px 0 0; }

.main { min-width: 0; min-height: 100vh; }
.topbar { min-height: 72px; padding: 14px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; justify-content: space-between; background: rgb(255 255 255 / 92%); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 7; }
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; gap: 9px; }
.content { padding: 24px 26px 54px; max-width: 1500px; margin: 0 auto; }
.planner-content { max-width: none; padding: 0; }

.button { border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: var(--surface); padding: 9px 13px; font-weight: 700; transition: .15s ease; box-shadow: 0 1px 2px rgb(37 42 66 / 4%); }
.button:hover { transform: translateY(-1px); border-color: #aeb4c6; box-shadow: 0 5px 16px rgb(38 43 69 / 9%); }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.danger { color: #c44454; border-color: #f2c8ce; background: #fff6f7; }
.button.ghost { background: transparent; box-shadow: none; }
.button.small { padding: 6px 9px; font-size: 11px; }
.icon-button { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 22px; display: inline-grid; place-items: center; padding: 0; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgb(40 46 74 / 3%); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 17px; }
.card h2, .card h3 { margin: 0; letter-spacing: -.03em; }
.card h2 { font-size: 18px; }
.card h3 { font-size: 15px; }
.card p { color: var(--muted); }
.eyebrow { color: var(--accent) !important; margin: 0 0 5px !important; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.hero { padding: 26px; background: radial-gradient(circle at 85% -20%, rgb(90 94 230 / 14%), transparent 36%), var(--surface); }
.hero h2 { font-size: clamp(26px, 3vw, 44px); max-width: 720px; }
.hero p { max-width: 680px; line-height: 1.65; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 17px; }
.metric strong { display: block; font-size: 27px; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: 12px; }

/* Calendar-first planner */
.planner-workspace { display: grid; grid-template-columns: minmax(720px, 1fr) 360px; height: calc(100vh - 72px); height: calc(100dvh - 72px); overflow: hidden; background: var(--surface); }
.calendar-pane { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); }
.calendar-toolbar { min-height: 65px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.week-nav, .calendar-tools { display: flex; align-items: center; gap: 8px; }
.week-title { border: 0; background: transparent; text-align: left; padding: 3px 8px; color: var(--ink); }
.week-title strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.week-title span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.calendar-status { color: var(--muted); font-size: 11px; white-space: nowrap; }
.calendar-status i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3bbb75; margin-right: 5px; box-shadow: 0 0 0 3px rgb(59 187 117 / 13%); }
.planner-density { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.planner-density button { border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 5px 9px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.planner-density button.active { background: #fff; color: var(--accent-dark); box-shadow: 0 1px 4px rgb(32 35 49 / 11%); }
.capacity-strip { min-height: 40px; display: flex; align-items: center; gap: 22px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; background: #fbfbfd; }
.capacity-strip strong { color: var(--ink); }
.capacity-spacer { flex: 1; }
.time-jumps { display: flex; gap: 4px; }
.time-jumps button { border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 4px 7px; font-size: 9px; font-weight: 750; }
.time-jumps button:hover { background: var(--surface-3); color: var(--accent-dark); }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.legend-dot.task { background: var(--accent); }
.legend-dot.focus { background: var(--violet); }
.legend-dot.calendar { background: var(--blue); }
.week-scroll { min-height: 0; flex: 1; overflow-x: auto; overflow-y: scroll; scrollbar-gutter: stable; overscroll-behavior: contain; background: #fff; }
.week-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.week-scroll::-webkit-scrollbar-track { background: #f1f2f6; }
.week-scroll::-webkit-scrollbar-thumb { border: 3px solid #f1f2f6; border-radius: 999px; background: #aeb4c3; }
.week-scroll::-webkit-scrollbar-thumb:hover { background: #858c9e; }
.week-grid { display: grid; grid-template-columns: 62px repeat(7, minmax(118px, 1fr)); min-width: 930px; position: relative; }
.timezone-cell, .week-day-head { position: sticky; top: 0; z-index: 5; height: 57px; background: rgb(255 255 255 / 96%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.timezone-cell { display: flex; justify-content: center; align-items: center; color: var(--muted); font-size: 10px; border-right: 1px solid var(--line); }
.week-day-head { display: flex; align-items: center; justify-content: center; gap: 7px; border-right: 1px solid var(--line); color: var(--muted); }
.week-day-head span { font-size: 11px; font-weight: 700; }
.week-day-head strong { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.week-day-head.today { color: var(--accent); }
.week-day-head.today strong { color: #fff; background: var(--accent); }
.time-axis { position: relative; grid-column: 1; border-right: 1px solid var(--line); background: #fbfbfd; }
.time-axis span { position: absolute; width: 100%; transform: translateY(-7px); padding-right: 8px; color: #9196a5; font-size: 9px; text-align: right; }
.week-day-body { position: relative; border-right: 1px solid var(--line); background: #fff; overflow: hidden; transition: background-color .16s ease, box-shadow .16s ease; }
.week-day-body.today { background: #fdfdff; }
.week-day-body.drop-target { background: #f4f4ff; box-shadow: inset 0 0 0 2px rgb(90 94 230 / 30%); }
.hour-line { position: absolute; left: 0; right: 0; height: 1px; background: #eceef4; pointer-events: none; }
.hour-line::after { content: ""; position: absolute; left: 0; right: 0; top: var(--half-hour, 29px); border-top: 1px dotted #f1f2f7; }
.day-end-axis, .day-end-cell { height: 20px; border-top: 2px solid var(--line-strong); background: #fbfbfd; }
.day-end-axis { padding: 3px 8px 0 0; border-right: 1px solid var(--line); color: #777d8d; font-size: 8px; font-weight: 800; text-align: right; }
.day-end-cell { border-right: 1px solid var(--line); }
.now-line { position: absolute; left: 0; right: 0; height: 1px; background: #ee5d69; z-index: 6; pointer-events: none; }
.now-line::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ee5d69; position: absolute; left: -3px; top: -3px; }
.calendar-event { position: absolute; min-width: 0; border-radius: 5px; padding: 4px 6px; overflow: hidden; border-left: 3px solid transparent; box-shadow: 0 1px 2px rgb(26 31 56 / 12%); font-size: 9px; line-height: 1.15; transition: opacity .16s ease, transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s ease, filter .16s ease; }
.calendar-event strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.calendar-event span { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .72; }
.calendar-event.movable { cursor: grab; touch-action: none; user-select: none; }
.calendar-event.movable:hover { filter: saturate(1.08); transform: translateY(-1px); box-shadow: 0 4px 11px rgb(26 31 56 / 20%); outline: 1px solid rgb(90 94 230 / 24%); }
.calendar-event.movable:active { cursor: grabbing; }
.calendar-event.dragging, .rail-task.dragging { opacity: .18; transform: scale(.985); }
.planner-pointer-dragging, .planner-pointer-dragging * { cursor: grabbing !important; user-select: none !important; }
.planner-drag-ghost { position: fixed; top: 0; left: 0; z-index: 10000; width: 210px; max-width: calc(100vw - 24px); pointer-events: none; overflow: hidden; padding: 10px 12px; border: 1px solid rgb(90 94 230 / 35%); border-radius: 9px; background: rgb(255 255 255 / 96%); color: var(--ink); box-shadow: 0 10px 28px rgb(26 31 56 / 24%); will-change: transform; transition: box-shadow .14s ease, border-color .14s ease; }
.planner-drag-ghost strong, .planner-drag-ghost span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planner-drag-ghost strong { font-size: 12px; }
.planner-drag-ghost span { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
.planner-drag-ghost.over-target { border-color: rgb(90 94 230 / 70%); box-shadow: 0 14px 34px rgb(49 53 151 / 28%); }
.planner-drop-preview { position: absolute; left: 4px; right: 4px; z-index: 30; min-height: 18px; overflow: hidden; pointer-events: none; padding: 4px 6px; border: 2px solid var(--accent); border-radius: 6px; background: rgb(238 239 255 / 92%); color: #383a9b; box-shadow: 0 8px 22px rgb(67 71 194 / 22%); transition: top .1s cubic-bezier(.2,.8,.2,1), height .1s cubic-bezier(.2,.8,.2,1), opacity .14s ease; animation: planner-preview-in .14s cubic-bezier(.2,.8,.2,1); }
.planner-drop-preview strong, .planner-drop-preview span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planner-drop-preview strong { font-size: 10px; }
.planner-drop-preview span { margin-top: 2px; font-size: 8px; opacity: .76; }
.planner-drop-preview.saving { animation: planner-preview-saving .8s ease-in-out infinite alternate; }
.planner-drop-preview.overlapping { border-color: #7d58d6; background: rgb(125 88 214 / 16%); box-shadow: inset 0 0 0 1px rgb(125 88 214 / 16%); }
@keyframes planner-preview-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
@keyframes planner-preview-saving { from { box-shadow: 0 6px 18px rgb(67 71 194 / 18%); } to { box-shadow: 0 10px 28px rgb(67 71 194 / 34%); } }
.calendar-event.read-only { cursor: default; }
.calendar-event.event-compact span { display: none; }
.calendar-event.event-overlapping { border-right: 2px dashed rgb(125 88 214 / 70%); box-shadow: 0 0 0 1px rgb(125 88 214 / 20%), 0 2px 7px rgb(62 45 120 / 14%); }
.week-grid.density-full .time-axis span { transform: translateY(-5px); font-size: 8px; }
.week-grid.density-full .time-axis .hour-label:not(.hour-0):not(.hour-2):not(.hour-4):not(.hour-6):not(.hour-8):not(.hour-10):not(.hour-12):not(.hour-14):not(.hour-16):not(.hour-18):not(.hour-20):not(.hour-22) { display: none; }
.week-grid.density-full .calendar-event { padding: 1px 4px; border-left-width: 2px; line-height: 1.05; }
.week-grid.density-full .calendar-event strong { font-size: 8px; }
.week-grid.density-full .calendar-event span { margin-top: 1px; font-size: 7px; }
.tone-calendar { color: #15557a; background: #d9effa; border-color: #41a7dc; }
.tone-habit { color: #285f45; background: #dcefe4; border-color: #49a978; }
.tone-focus { color: #5f3981; background: #eadcf5; border-color: #9254c8; }
.tone-task { color: #383a9b; background: #e4e5ff; border-color: #5a5ee6; }
.tone-meeting { color: #923b47; background: #fae1e5; border-color: #ed7180; }

.planner-rail { min-width: 0; display: flex; flex-direction: column; background: #f8f9fc; overflow: auto; }
.rail-tabs { display: grid; grid-template-columns: 1fr 1fr; height: 57px; border-bottom: 1px solid var(--line); background: var(--surface); }
.rail-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-weight: 750; }
.rail-tabs button.active { color: var(--accent); border-color: var(--accent); }
.rail-search { display: flex; align-items: center; gap: 8px; margin: 12px 14px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--accent); }
.rail-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.rail-groups { padding: 0 14px 14px; }
.rail-group { margin-bottom: 17px; }
.rail-group-title { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 750; margin: 0 1px 7px; }
.rail-task-list { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; overflow: hidden; background: #fff; }
.rail-task { display: grid; grid-template-columns: 22px minmax(0, 1fr) 28px; gap: 8px; align-items: center; min-height: 56px; padding: 9px; border-bottom: 1px solid #eceef3; }
.rail-task.movable { cursor: grab; touch-action: pan-y; }
.rail-task.movable:hover { background: #f8f8ff; }
.rail-task.dragging { opacity: .45; }
.rail-task:last-child { border-bottom: 0; }
.rail-task[hidden] { display: none; }
.task-check { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #aeb4c1; background: #fff; color: transparent; padding: 0; }
.task-check:hover { color: var(--accent); border-color: var(--accent); }
.rail-task-copy { min-width: 0; }
.rail-task-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.rail-task-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.task-more { border: 0; background: transparent; color: #a0a5b3; letter-spacing: 1px; padding: 5px; }
.rail-empty { margin: 7px 0 0; color: #a1a6b3; font-size: 11px; }
.rail-add { margin: auto 14px 14px; min-height: 39px; border: 1px dashed #b9bdd0; border-radius: 8px; background: transparent; color: var(--accent); font-weight: 750; }
.agenda-list { flex: 1; min-height: 0; padding: 0 12px 18px; overflow: auto; }
.planner-help { color: #777586; white-space: nowrap; }
.agenda-day { padding: 11px 0 5px; }
.agenda-day-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 5px 4px 7px; background: #f8f9fc; color: var(--muted); font-size: 10px; }
.agenda-day-head span { font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.agenda-day-head b { font-size: 9px; }
.agenda-day.today .agenda-day-head { color: var(--accent-dark); }
.agenda-event { display: grid; grid-template-columns: 4px minmax(0,1fr) 12px; gap: 9px; align-items: center; width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 7px 9px 7px 7px; margin-bottom: 5px; text-align: left; }
.agenda-event:hover { border-color: #bfc3f0; transform: translateX(2px); }
.agenda-event[hidden] { display: none; }
.agenda-event > i { width: 4px; height: 28px; border-radius: 99px; background: var(--blue); }
.agenda-event > span { min-width: 0; display: grid; gap: 3px; }
.agenda-event strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.agenda-event small { color: var(--muted); font-size: 9px; }
.agenda-event > b { color: #a0a5b3; }
.agenda-tone-task > i { background: var(--accent); }
.agenda-tone-focus > i { background: var(--violet); }
.agenda-tone-habit > i { background: var(--green); }
.agenda-tone-meeting > i { background: var(--coral); }
.agenda-empty { margin: 0; padding: 8px 5px 12px; color: #a1a6b3; font-size: 10px; }

/* Task workspace */
.task-workspace { max-width: 1060px; margin: 0 auto; display: grid; gap: 18px; }
.task-summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 26px; color: #fff; border-radius: 14px; background: linear-gradient(125deg, #292d6c, #5a5ee6 70%, #7377ef); box-shadow: 0 14px 34px rgb(70 74 186 / 20%); }
.task-summary h2 { margin: 0; font-size: 25px; }
.task-summary p { margin: 6px 0 0; max-width: 610px; color: #dfe0ff; line-height: 1.5; }
.task-summary .eyebrow { color: var(--lime) !important; }
.task-summary-stat { text-align: right; white-space: nowrap; }
.task-summary-stat strong { display: block; font-size: 31px; }
.task-summary-stat span { color: #dfe0ff; font-size: 11px; }
.task-section { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; }
.task-section-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.task-section-head h2 { margin: 0; font-size: 16px; }
.task-section-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.task-section-head > span { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 750; }
.task-list { display: grid; }
.task-row { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 74px; padding: 12px 16px 12px 19px; border-bottom: 1px solid #eceef3; background: #fff; }
.task-row:last-child { border-bottom: 0; }
.task-row::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: #9ca3b7; }
.task-row.priority-1::before { background: #ed6475; }
.task-row.priority-2::before { background: #eca44b; }
.task-row.priority-3::before { background: var(--accent); }
.task-check.large { width: 22px; height: 22px; color: var(--accent); }
.task-row-copy { min-width: 0; }
.task-row-title { display: flex; align-items: center; gap: 8px; }
.task-row-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.task-details { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; color: var(--muted); font-size: 10px; }
.task-details .due { color: #c75a67; background: #fff0f2; border-radius: 4px; padding: 2px 4px; }
.task-details .scheduled { color: var(--accent-dark); }
.task-row-actions { display: flex; align-items: center; gap: 4px; }
.danger-text { color: #d56b78; }
.task-empty { padding: 54px 18px; text-align: center; }
.task-empty > div { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 20px; }
.task-empty h3 { margin: 0; }
.task-empty p { color: var(--muted); margin: 7px 0 17px; }
.completed-section .task-row { opacity: .72; }

.list { display: grid; gap: 9px; }
.row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 13px 14px; }
.row-main { min-width: 0; }
.row-title { display: flex; align-items: center; gap: 9px; font-weight: 750; }
.row-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.row-actions { display: flex; gap: 6px; }
.badge { border: 1px solid var(--line); border-radius: 99px; padding: 3px 7px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.badge.p1 { color: #c53f50; border-color: #f0b9c0; background: #fff1f3; }
.badge.p2 { color: #a86614; border-color: #f1d3a5; background: #fff8eb; }
.badge.enabled { color: #24805a; border-color: #a8dbc5; background: #effbf5; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 10px; }

.priority-lane { min-height: 170px; }
.priority-lane h3 { display: flex; justify-content: space-between; margin-bottom: 13px; }
.priority-lane h3 span { color: var(--muted); font-size: 12px; }
.priority-card { padding: 10px; border-radius: 9px; margin-bottom: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.bar-row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 12px; align-items: center; margin: 12px 0; font-size: 12px; }
.bar-track { height: 9px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); border-radius: inherit; }
.bar-value { text-align: right; color: var(--muted); }

.google-calendar-picker { display: grid; gap: 12px; margin-top: 17px; }
.calendar-picker-head { display: grid; gap: 3px; }
.calendar-picker-head strong { font-size: 12px; }
.calendar-picker-head span, .calendar-discovery { color: var(--muted); font-size: 10px; }
.google-calendar-list { display: grid; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.google-calendar-list label { display: grid; grid-template-columns: 18px 10px minmax(0,1fr); gap: 9px; align-items: center; min-height: 48px; padding: 8px 11px; border-bottom: 1px solid var(--line); cursor: pointer; }
.google-calendar-list label:last-child { border-bottom: 0; }
.google-calendar-list label:hover { background: #fff; }
.google-calendar-list input { width: 16px; height: 16px; accent-color: var(--accent); }
.google-calendar-list i { width: 9px; height: 9px; border-radius: 3px; background: var(--calendar-color); }
.google-calendar-list span { display: grid; gap: 2px; min-width: 0; }
.google-calendar-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.google-calendar-list small { color: var(--muted); font-size: 9px; text-transform: capitalize; }
.google-calendar-picker > .button { justify-self: start; }
.sync-warning { display: grid; gap: 3px; margin-top: 12px; border: 1px solid #f0cf9e; border-radius: 9px; background: #fff8eb; color: #8b5c1c; padding: 10px 11px; font-size: 10px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); padding: 10px 11px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(90 94 230 / 10%); }
.field textarea { resize: vertical; min-height: 88px; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }

dialog { width: min(680px, calc(100vw - 30px)); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); padding: 0; box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(17 21 28 / 62%); backdrop-filter: blur(5px); }
dialog form { padding: 22px; }
dialog header, dialog footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
dialog header { margin-bottom: 20px; }
dialog header h2 { margin: 0; }
dialog footer { justify-content: flex-end; margin-top: 22px; }

dialog.resource-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  margin: 18px 18px 18px auto;
  overflow: hidden;
  border-radius: 18px;
}
.resource-dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 38px); padding: 0; }
.resource-dialog header { flex: 0 0 auto; margin: 0; padding: 19px 22px 15px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 97%); }
.resource-dialog header .eyebrow { margin: 0 0 3px; }
.resource-dialog header h2 { font-size: 21px; letter-spacing: -.025em; }
.resource-dialog footer { flex: 0 0 auto; margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); background: rgb(255 255 255 / 97%); }
.resource-dialog footer .primary { min-width: 138px; }
.resource-composer-body { min-height: 0; overflow-y: auto; padding: 19px 22px 23px; }
.resource-composer-hero { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 13px; align-items: center; margin-bottom: 18px; padding: 14px; border: 1px solid #d7d9fb; border-radius: 12px; background: linear-gradient(135deg, #f5f5ff, #fbfbff); }
.resource-composer-hero > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--accent); color: #fff; box-shadow: 0 7px 18px rgb(90 94 230 / 22%); font-size: 20px; font-weight: 800; }
.resource-composer-hero div { display: grid; gap: 4px; }
.resource-composer-hero p { margin: 0; color: var(--accent-dark); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.resource-composer-hero strong { color: #45495c; font-size: 11px; font-weight: 650; line-height: 1.45; }
.resource-composer-section { padding: 17px 0; border-top: 1px solid var(--line); }
.resource-section-heading { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 9px; align-items: start; margin-bottom: 13px; }
.resource-section-heading > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: var(--surface-3); color: var(--accent-dark); font-size: 10px; font-weight: 900; }
.resource-section-heading div { display: grid; gap: 2px; }
.resource-section-heading strong { font-size: 12px; }
.resource-section-heading small { color: var(--muted); font-size: 9px; }
.resource-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.resource-field { display: grid; min-width: 0; gap: 6px; }
.resource-field.full { grid-column: 1 / -1; }
.resource-label, .resource-name-field > label { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.resource-name-field { margin-bottom: 2px; }
.resource-name-input { width: 100%; border: 0; border-bottom: 2px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--ink); padding: 5px 0 10px; outline: none; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.resource-name-input::placeholder { color: #a7adba; font-weight: 600; }
.resource-name-input:focus { border-color: var(--accent); }
.resource-control { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; min-height: 40px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.resource-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(90 94 230 / 9%); }
.resource-control > span { color: var(--accent-dark); font-size: 11px; font-weight: 850; text-align: center; }
.resource-control input, .resource-control select { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 10px 9px 10px 0; outline: none; font-size: 11px; }
.resource-control b { padding-right: 10px; color: var(--muted); font-size: 9px; }
.resource-textarea { width: 100%; min-height: 70px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-2); color: var(--ink); padding: 10px 11px; outline: none; font: inherit; font-size: 11px; line-height: 1.45; }
.resource-textarea:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgb(90 94 230 / 9%); }
.resource-toggle-field { align-self: stretch; }
.resource-toggle { display: flex; height: 100%; min-height: 55px; justify-content: space-between; align-items: center; gap: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.resource-toggle > span { display: grid; gap: 3px; }
.resource-toggle strong { font-size: 11px; }
.resource-toggle small { color: var(--muted); font-size: 9px; }
.resource-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.resource-toggle i { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 99px; background: #d9dce5; box-shadow: inset 0 0 0 1px var(--line-strong); transition: .18s ease; }
.resource-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(20 25 35 / 22%); transition: .18s ease; }
.resource-toggle input:checked + i { background: var(--accent); box-shadow: none; }
.resource-toggle input:checked + i::after { transform: translateX(16px); }
.weekday-picker { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.weekday-picker label { cursor: pointer; }
.weekday-picker input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-picker span { display: grid; min-height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 9px; font-weight: 800; transition: .15s ease; }
.weekday-picker label:hover span { border-color: var(--line-strong); color: var(--ink); }
.weekday-picker input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.weekday-picker input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.resource-summary { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; align-items: center; margin-top: 2px; padding: 11px 12px; border: 1px solid #cfd1fb; border-radius: 10px; background: #f5f5ff; }
.resource-summary > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; font-size: 11px; }
.resource-summary p { display: grid; gap: 2px; margin: 0; }
.resource-summary strong { font-size: 11px; }
.resource-summary small { color: var(--muted); font-size: 9px; line-height: 1.4; }

dialog.task-dialog {
  width: min(580px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  margin: 18px 18px 18px auto;
  border-radius: 18px;
  overflow: hidden;
}
.task-dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 38px); padding: 0; }
.task-dialog header { flex: 0 0 auto; margin: 0; padding: 19px 22px 15px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 96%); }
.task-dialog header .eyebrow { margin: 0 0 3px; }
.task-dialog header h2 { font-size: 21px; letter-spacing: -.025em; }
.task-dialog footer { flex: 0 0 auto; margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); background: rgb(255 255 255 / 97%); }
.task-dialog footer .primary { min-width: 126px; }
.task-composer-body { min-height: 0; overflow-y: auto; padding: 20px 22px 22px; }
.task-composer-intro { display: grid; gap: 8px; margin-bottom: 18px; }
.task-composer-intro > label { color: var(--ink); font-size: 12px; font-weight: 800; }
.task-title-input { width: 100%; border: 0; border-bottom: 2px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--ink); padding: 7px 0 10px; outline: none; font-size: 22px; font-weight: 750; letter-spacing: -.025em; }
.task-title-input::placeholder { color: #a7adba; font-weight: 600; }
.task-title-input:focus { border-color: var(--accent); }
.task-notes-input { width: 100%; min-height: 38px; max-height: 100px; resize: vertical; border: 1px solid transparent; border-radius: 8px; background: var(--surface-2); color: var(--ink); padding: 9px 10px; outline: none; font: inherit; font-size: 12px; }
.task-notes-input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgb(90 94 230 / 9%); }
.composer-section { padding: 16px 0; border-top: 1px solid var(--line); }
.composer-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.composer-section-heading > div { display: flex; align-items: center; gap: 8px; }
.composer-section-heading strong { font-size: 12px; }
.composer-section-heading small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.composer-step { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 7px; background: var(--surface-3); color: var(--accent-dark); font-size: 10px; font-weight: 900; }
.duration-row { display: grid; grid-template-columns: minmax(0,1fr) 112px; gap: 10px; align-items: end; }
.duration-pills { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
.duration-pill { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); padding: 9px 4px; font-size: 10px; font-weight: 800; cursor: pointer; }
.duration-pill:hover { border-color: var(--line-strong); color: var(--ink); }
.duration-pill.active { border-color: var(--accent); background: rgb(90 94 230 / 8%); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.compact-number { display: grid; grid-template-columns: 1fr auto; position: relative; }
.compact-number > span { grid-column: 1 / -1; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.compact-number input { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); padding: 9px 34px 9px 10px; outline: none; }
.compact-number b { position: absolute; right: 9px; bottom: 10px; color: var(--muted); font-size: 9px; }
.composer-two-column { display: grid; grid-template-columns: 1fr 1.16fr; gap: 20px; }
.composer-two-column .composer-section-heading { min-height: 20px; }
.composer-input-with-icon { display: grid; grid-template-columns: 27px minmax(0,1fr); align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; overflow: hidden; }
.composer-input-with-icon > span { color: var(--accent-dark); text-align: center; }
.composer-input-with-icon input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 10px 8px 10px 0; outline: none; font-size: 11px; }
.composer-helper { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.priority-choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
.priority-choice { display: grid; justify-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); padding: 7px 2px; cursor: pointer; }
.priority-choice b { font-size: 10px; }
.priority-choice span { font-size: 8px; }
.priority-choice.active { border-color: var(--accent); background: rgb(90 94 230 / 7%); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.priority-choice.p1.active { border-color: #d64a5b; background: #fff1f3; color: #b93648; box-shadow: inset 0 0 0 1px #d64a5b; }
.priority-choice.p2.active { border-color: #c78023; background: #fff8eb; color: #975d11; box-shadow: inset 0 0 0 1px #c78023; }
.split-section { padding-bottom: 14px; }
.composer-toggle { display: flex; justify-content: space-between; align-items: center; gap: 20px; cursor: pointer; }
.composer-toggle > span { display: grid; gap: 3px; }
.composer-toggle strong { font-size: 12px; }
.composer-toggle small { color: var(--muted); font-size: 10px; }
.composer-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.composer-toggle i { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); transition: .18s ease; }
.composer-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(20 25 35 / 22%); transition: .18s ease; }
.composer-toggle input:checked + i { background: var(--accent); box-shadow: none; }
.composer-toggle input:checked + i::after { transform: translateX(16px); }
.chunk-grid { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: end; gap: 8px; margin-top: 13px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.chunk-grid[hidden] { display: none; }
.chunk-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.chunk-grid label > div { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.chunk-grid input { width: 100%; min-width: 0; border: 0; padding: 8px 9px; outline: none; }
.chunk-grid b { padding-right: 9px; color: var(--muted); font-size: 9px; text-transform: none; }
.chunk-arrow { align-self: center; color: var(--muted); text-align: center; }
.task-schedule-summary { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; border: 1px solid #cfd1fb; border-radius: 10px; background: #f5f5ff; color: #343755; padding: 11px 12px; }
.task-schedule-summary > span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; font-size: 11px; }
.task-schedule-summary p { margin: 0; font-size: 11px; line-height: 1.45; }
.task-schedule-summary small { display: block; margin-top: 3px; color: #71758b; font-size: 9px; }
.advanced-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; border: 0; background: transparent; color: var(--muted); padding: 14px 2px 0; font-size: 10px; font-weight: 800; cursor: pointer; }
.advanced-toggle b { transition: transform .18s ease; }
.advanced-toggle[aria-expanded="true"] b { transform: rotate(180deg); }
.advanced-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.advanced-panel[hidden] { display: none; }
.advanced-panel .field label { font-size: 9px; }
.advanced-panel .field input, .advanced-panel .field select { padding: 8px 9px; font-size: 11px; }
.advanced-number { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.advanced-number input { border: 0 !important; }
.advanced-number span { padding-right: 9px; color: var(--muted); font-size: 9px; }
.advanced-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 9px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, rgb(90 94 230 / 22%), transparent 35%), #11151c; }
.login-card { width: min(440px, 100%); padding: 32px; border: 1px solid #303744; border-radius: 20px; background: #181d26; color: #fff; box-shadow: var(--shadow); }
.login-card .brand { padding: 0 0 28px; }
.login-card h1 { margin: 0; font-size: 33px; letter-spacing: -.05em; }
.login-card p { color: #aeb5c3; line-height: 1.6; }
.login-card .field { margin: 22px 0 12px; }
.login-card .field input { background: #11151c; color: #fff; border-color: #3a4250; }
.login-card .button { width: 100%; }
.google-redirect { text-align: center; }
.google-redirect .brand { justify-content: center; }
.auth-spinner { width: 34px; height: 34px; margin: 4px auto 22px; border: 3px solid #333b49; border-top-color: var(--accent); border-radius: 50%; animation: auth-spin .75s linear infinite; }
.google-signin { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; text-decoration: none; }
.google-signin span { display: grid; flex: 0 0 22px; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 800; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.booking { max-width: 760px; margin: 0 auto; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 9px; margin-top: 14px; }
.slot { border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); padding: 10px; }
.slot.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 12px 15px; box-shadow: var(--shadow); transform: translateY(30px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: #e5a5ae; color: #b93d4e; }

@media (max-width: 1180px) {
  .planner-workspace { grid-template-columns: minmax(700px, 1fr) 320px; }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 74px minmax(0, 1fr); }
  .sidebar { padding: 17px 10px; }
  .brand { padding: 0 9px 19px; }
  .brand > div:last-child, .sidebar-footer { display: none; }
  .nav button { justify-content: center; padding: 11px; font-size: 0; }
  .nav-icon { width: auto; font-size: 14px; }
  .planner-workspace { grid-template-columns: minmax(700px, 1fr) 300px; }
  .grid.two, .grid.three, .metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid #282e38; }
  .brand { display: none; }
  .nav { display: flex; overflow-x: auto; }
  .nav button { flex: 0 0 auto; font-size: 12px; }
  .nav-icon { font-size: 12px; }
  .topbar { position: static; padding: 12px 15px; }
  .topbar p { display: none; }
  .content { padding: 17px 14px 45px; }
  .planner-content { padding: 0; }
  .planner-workspace { height: auto; display: block; overflow: visible; }
  .calendar-pane { height: 72vh; min-height: 570px; border-right: 0; border-bottom: 1px solid var(--line); }
  .planner-rail { max-height: none; }
  .capacity-strip { overflow-x: auto; }
  .planner-help { display: none; }
  .planner-density { display: none; }
  .time-jumps { display: none; }
  .grid.two, .grid.three, .metrics, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .row { grid-template-columns: 1fr; }
  .row-actions { justify-content: flex-end; }
  .task-summary { align-items: flex-start; }
  dialog.task-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); margin: 10px; }
  .task-dialog form { max-height: calc(100vh - 22px); }
  dialog.resource-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); margin: 10px; }
  .resource-dialog form { max-height: calc(100vh - 22px); }
  .resource-dialog header, .resource-dialog footer { padding-left: 16px; padding-right: 16px; }
  .resource-composer-body { padding: 16px; }
  .resource-field-grid { grid-template-columns: 1fr; }
  .resource-field.full { grid-column: auto; }
  .weekday-picker { gap: 4px; }
  .weekday-picker span { min-height: 34px; font-size: 8px; }
}

@media (max-width: 520px) {
  .top-actions .ghost { display: none; }
  .calendar-status { display: none; }
  .week-title span { display: none; }
  .task-summary { display: block; }
  .task-summary-stat { text-align: left; margin-top: 16px; }
  .task-row { grid-template-columns: 26px minmax(0, 1fr); }
  .task-row-actions { grid-column: 2; justify-content: flex-end; }
  .task-composer-body { padding: 17px 16px; }
  .task-dialog header, .task-dialog footer { padding-left: 16px; padding-right: 16px; }
  .duration-row, .composer-two-column { grid-template-columns: 1fr; }
  .duration-pills { grid-template-columns: repeat(5, minmax(52px,1fr)); overflow-x: auto; padding-bottom: 3px; }
  .compact-number { max-width: 132px; }
  .advanced-panel { grid-template-columns: 1fr; }
  .advanced-note { grid-column: auto; }
}
