:root {
  color-scheme: dark;
  --bg: #171917;
  --panel: #202320;
  --panel-2: #262a27;
  --panel-3: #2d312e;
  --line: #373c38;
  --line-soft: #303430;
  --text: #f3f1e9;
  --muted: #a8ada6;
  --subtle: #7e857f;
  --brand: #c9a86a;
  --green: #7ca37f;
  --row-label: 196px;
  --day-width: 132px;
  --week-gap: 12px;
  --week-heading-height: 30px;
  --day-heading-height: 90px;
  --employee-row-height: 78px;
  --open-row-height: 92px;
  --card-surface: #30363b;
  --accent-opacity: .8;
  --preferred-color: #7c9c81;
  --not-available-color: #a77978;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button { font: inherit; }
button:focus-visible { outline: 2px solid #f0c67d; outline-offset: 2px; }
.app-shell { min-width: 1040px; height: 100vh; min-height: 640px; display: flex; flex-direction: column; }
.topbar, .workspace-head, .meta-row { flex-shrink: 0; }
.topbar { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: #1b1e1b; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 720; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; background: none; }
.brand-mark img { display: block; width: 30px; height: 30px; object-fit: contain; }
.prototype-pill { margin-left: 3px; padding: 4px 8px; border: 1px solid #5e5138; border-radius: 99px; color: #dcc391; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.top-actions, .schedule-actions, .segmented, .meta-row > div, .totals { display: flex; align-items: center; }
.top-actions { gap: 8px; }
.icon-button, .avatar, .collapse-button { border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button { width: 34px; height: 34px; border-radius: 8px; font-size: 20px; }
.icon-button:hover { background: var(--panel-3); color: var(--text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; margin-left: 6px; background: #4e5f55; color: white; font-size: 12px; font-weight: 700; }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 24px 24px 17px; }
.eyebrow { color: var(--brand); font-size: 10px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 32px; font-weight: 500; letter-spacing: -.025em; }
.schedule-actions { gap: 10px; }
.segmented { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented button, .secondary, .primary { min-height: 36px; border: 0; color: var(--text); cursor: pointer; font-weight: 650; font-size: 13px; }
.segmented button { min-width: 36px; background: var(--panel); border-right: 1px solid var(--line); }
.segmented button:last-child { border: 0; }
.segmented button:hover, .secondary:hover { background: #303530; }
.segmented #todayBtn { padding: 0 13px; }
.secondary, .primary { border-radius: 8px; padding: 0 14px; }
.secondary { border: 1px solid var(--line); background: var(--panel); }
.primary { background: #e1bd78; color: #201d17; }
.primary:hover { background: #edcb89; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 5px; border-radius: 9px; background: #4b514c; font-size: 10px; }
.meta-row { display: flex; align-items: center; justify-content: space-between; padding: 0 24px 16px; color: var(--muted); font-size: 12px; }
.meta-row > div { gap: 10px; }
.meta-row strong { color: var(--text); font-size: 14px; }
.meta-row strong + span { padding-left: 10px; border-left: 1px solid var(--line); }
.totals { gap: 18px !important; }
.totals b { color: var(--text); }
.alert-text, .alert-text b { color: #e7ad70 !important; }
.content-frame { display: flex; flex: 1; min-height: 0; border-top: 1px solid var(--line); }
.template-sidebar { width: 244px; flex: 0 0 244px; padding: 18px 16px; border-right: 1px solid var(--line); background: #1d201d; overflow: auto; transition: width .2s ease, flex-basis .2s ease, padding .2s ease; }
.template-sidebar.collapsed { width: 48px; flex-basis: 48px; padding: 16px 7px; overflow: hidden; }
.template-sidebar.collapsed > *:not(.sidebar-head) { display: none; }
.template-sidebar.collapsed .sidebar-head > div { display: none; }
.template-sidebar.collapsed .collapse-button { transform: rotate(180deg); }
.template-sidebar.collapsed .sidebar-head { min-width: 0; }
.sidebar-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; min-width: 210px; min-height: 30px; }
.sidebar-head > div { width: 100%; min-width: 0; }
.sidebar-head > .collapse-button { position: absolute; top: -8px; right: 0; }
.sidebar-head .template-heading-row { margin-top: 5px; }
.sidebar-head h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.collapse-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); font-size: 20px; }
.helper { margin: 12px 0 14px; color: var(--subtle); font-size: 11px; line-height: 1.45; }
.template-list { display: grid; gap: 8px; }
.template-card { position: relative; width: 100%; padding: 11px 10px 10px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; }
.template-card::before, .shift-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.template-card::after, .shift-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent) 0, color-mix(in srgb, var(--accent) 65%, transparent) 46%, transparent 94%); }
.shift-card::before, .shift-card::after { opacity: var(--accent-opacity); }
.shift-card::after { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent) 28%, transparent 58%); }
.template-card:hover, .template-card.selected { border-color: color-mix(in srgb, var(--accent) 70%, #666); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); }
.template-card strong { display: block; font-size: 12px; }
.template-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.swatch { width: 22px; height: 22px; border: 2px solid #3d423e; border-radius: 50%; background: var(--swatch); cursor: pointer; }
.swatch:hover { transform: scale(1.12); }
.template-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.template-heading-row > h2 { margin: 0; }
.template-heading-row .template-new { flex: 0 0 auto; margin-top: 0; padding: 4px 6px; font-size: 10px; white-space: nowrap; }
.template-item { position: relative; min-width: 0; }
.template-item .template-card { padding-right: 36px; }
.template-actions { position: absolute; top: 9px; right: 5px; z-index: 2; }
.template-actions[open] { z-index: 35; }
.template-actions summary { display: grid; place-items: center; width: 26px; height: 26px; cursor: pointer; border-radius: 5px; color: #b8c0b7; list-style: none; }
.template-actions summary::-webkit-details-marker { display: none; }
.template-actions summary:hover { background: #ffffff0c; }
.template-actions svg { width: 18px; height: 18px; }
.template-actions > div { position: absolute; right: 0; top: 29px; width: 124px; padding: 4px; border: 1px solid #535b54; border-radius: 7px; background: #292d29; box-shadow: 0 6px 12px #0004; }
.template-actions button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 4px; background: none; text-align: left; font-size: 12px; }
.template-actions button:hover { background: #ffffff0c; }
.template-actions summary:focus-visible { outline: 2px solid #f0c67d; outline-offset: 2px; }
.manager-color-field { margin: 16px 0 0; padding: 0; border: 0; font-size: 12px; color: #c4c9c2; }
.manager-color-field legend { margin-bottom: 6px; }
.weekly-library { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.weekly-library h2 { margin: 0; font: 500 18px Georgia, serif; }
.weekly-library .template-heading-row { justify-content: space-between; margin-bottom: 12px; }
.weekly-card { width: 100%; padding: 11px 36px 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); text-align: left; }
.weekly-card strong { display: block; font-size: 12px; }
.weekly-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.weekly-card:hover { border-color: #697269; }
.week-actions { top: 50%; right: 6px; transform: translateY(-50%); }
.week-actions summary { display: flex; gap: 6px; width: auto; height: 24px; padding: 0 7px; border: 1px solid #4a524a; background: #292d29; color: var(--text); font-size: 10px; white-space: nowrap; }
.week-actions summary .week-calendar { width: 15px; height: 15px; color: #D7A35D; }
.week-actions summary .week-chevron { width: 11px; height: 11px; color: var(--muted); }
.week-actions > div { width: max-content; min-width: 224px; max-width: calc(100vw - 32px); }
.week-actions button { white-space: nowrap; }
/* Raise only the disclosure, never the opaque heading above the accent overlay. */
.weekly-rows { max-height: 250px; overflow: auto; margin: 12px 0; scrollbar-color: #535a54 #1b1e1b; }
.weekly-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.weekly-row summary { cursor: pointer; font-size: 12px; line-height: 1.5; }
.weekly-row summary span { display: block; margin-left: 14px; color: var(--muted); font-size: 11px; }
.weekly-row .shift-editor { margin: 10px 0; }
/* Keep assignment fields mounted; display:none also removes them from keyboard navigation. */
#dialogContent:not(:has(#weeklyAssigned:checked)) #weeklyRows .weekly-assignment { display: none; }
.weekly-remove { font-size: 11px; }
.weekly-assigned { align-items: flex-start; }
.weekly-add { margin: 10px 0; }
.weekly-add button { align-self: end; }
.manager-color-field .annotation-color-option { display: grid; }
.schedule-panel { min-width: 0; flex: 1; display: flex; flex-direction: column; container-type: inline-size; }
.schedule-selector { display: inline-flex; align-items: center; gap: 7px; margin-right: 14px; font-size: 12px; }
.schedule-selector select, .publish-week select { color: var(--text); background: #292e30; border: 1px solid #4b535a; border-radius: 6px; padding: 5px 8px; font: inherit; }
#publicationStatus { font-size: 11px; }
.employee-preview .template-sidebar { display: none; }
.employee-preview .legend-item:has(.publication-sample) { display: none; }
.publish-week { display: grid; gap: 7px; font-size: 13px; }
.publication-changes { padding-left: 20px; max-height: 220px; overflow: auto; font-size: 13px; line-height: 1.5; }
.publication-changes li { margin: 8px 0; }
.publication-changes small { display: block; color: var(--muted); }
.schedule-canvas { width: max-content; }
.grid-wrap { flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 12px 0; background: #1b1e1b; scrollbar-color: #535a54 #1b1e1b; }
/* Content-sized tracks prevent extra viewport height from stretching the roster. */
.schedule-grid { display: grid; grid-template-columns: var(--row-label) repeat(7, var(--day-width)) var(--week-gap) repeat(7, var(--day-width)); grid-template-rows: var(--week-heading-height) var(--day-heading-height) var(--open-row-height); grid-auto-rows: var(--employee-row-height); align-content: start; width: max-content; }
.corner, .day-head, .person-label, .grid-cell { border-right: 1px solid #ffffff06; border-bottom: 1px solid #ffffff09; }
.corner { position: sticky; left: 0; z-index: 4; height: calc(var(--day-heading-height) + var(--week-heading-height)); padding: 16px 14px 10px; background: #232723; color: var(--muted); font-size: 11px; }
.secondary-team-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; color: #c5cdc4; font-size: 11px; line-height: 1.35; cursor: pointer; }
.secondary-team-toggle input { appearance: none; position: relative; flex: 0 0 28px; width: 28px; height: 16px; margin: 0; border: 1px solid #6a746b; border-radius: 9px; background: #151815; cursor: pointer; }
.secondary-team-toggle input::before { content: ''; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #c5cdc4; }
.secondary-team-toggle input:checked { background: #D7A35D; border-color: #D7A35D; }
.secondary-team-toggle input:checked::before { left: 14px; background: #171917; }
.secondary-team-toggle input:focus-visible { outline: 2px solid #D7A35D; outline-offset: 3px; }
.person-label.secondary-member .person-avatar { outline: 1px dashed #78919B; outline-offset: 2px; }
.person-label.secondary-member .person-meta strong { color: #c5d3d8; }
.week-heading { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 12px; height: var(--week-heading-height); border: 1px solid #ffffff0e; border-bottom: 0; border-radius: 7px 7px 0 0; background: #252925; box-shadow: inset 0 1px #ffffff05; color: var(--text); font-size: 10px; }
.week-heading span { color: var(--muted); font-size: 9px; }
/* A non-interactive grid overlay follows every roster track and scrolls with it.
   Match the cards' 4px left / 3px top accents, 7px corners, and top fade. */
.week-frame { position: relative; z-index: 2; min-height: 0; border-radius: 7px; overflow: hidden; pointer-events: none; --accent: var(--brand); }
/* Reuse the cards' single rounded border band, without their surface lighting. */
.week-frame::before { content: ""; position: absolute; inset: 0; box-sizing: border-box; border: 0 solid var(--accent); border-left-width: 4px; border-top-width: 3px; border-radius: inherit; opacity: .9; mask-image: linear-gradient(90deg, #000, #00000073 28%, transparent 58%); }
/* Weekly drags use full-week frames; individual shift drags keep cell feedback. */
.weekly-card[draggable="true"] { cursor: grab; }
.weekly-card.weekly-drag-source { opacity: .65; }
.schedule-grid.weekly-dragging .week-frame { outline: 1px dashed var(--theme-cool, var(--brand)); outline-offset: -1px; }
.schedule-grid.weekly-dragging .week-frame.weekly-drop-target::after { content: ""; position: absolute; inset: 1px; border: 1px solid var(--theme-cool, var(--brand)); border-radius: inherit; background: color-mix(in srgb, var(--theme-cool, var(--brand)) 7%, transparent); }
.schedule-grid.weekly-dragging :is(.grid-cell,.day-head,.week-heading) { pointer-events: none; }
@supports (corner-shape: superellipse(1.5)) {
  .week-frame, .week-frame::before, .week-heading,
  .grid-cell.last-row.week-start, .grid-cell.last-row.week-end { corner-shape: superellipse(1.5); }
}
.corner strong { display: block; color: var(--text); font-size: 12px; }
.day-head { position: relative; height: var(--day-heading-height); padding: 9px; background: #232723; text-align: center; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; min-width: 0; border-top: 0; border-left: 0; color: var(--text); cursor: pointer; }
.day-head:disabled { opacity: 1; cursor: default; }
.day-head .annotation-draft { border-bottom: 1px dashed #c9a86a80; }
.annotation-context, .annotation-help, .annotation-empty { color: var(--muted); font-size: 12px; line-height: 1.6; }
.annotation-list { max-height: 240px; overflow-y: auto; }
.annotation-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.annotation-item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.annotation-item strong { display: block; font-size: 14px; }
.annotation-item small, .annotation-state { display: block; font-size: 11px; line-height: 1.6; color: var(--muted); }
.annotation-new .annotation-state, .annotation-modified .annotation-state { color: #D7A35D; }
.annotation-deleted strong { text-decoration: line-through; color: var(--muted); }
.annotation-actions, .annotation-schedules { display: flex; flex-wrap: wrap; gap: 8px; }
.annotation-actions { flex-shrink: 0; }
.annotation-editor { margin-top: 18px; }
.annotation-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.annotation-editor h4 { margin: 0 0 12px; font-size: 14px; }
.annotation-editor > label { display: grid; gap: 7px; font-size: 13px; }
.annotation-editor input[type="text"] { width: 100%; min-height: 40px; background: #292e30; color: var(--text); border: 1px solid #58615b; border-radius: 6px; padding: 8px 10px; font: inherit; }
.annotation-editor fieldset { margin: 14px 0 0; padding: 0; border: 0; font-size: 13px; }
.annotation-editor legend { padding: 0; margin-bottom: 6px; }
.annotation-schedules label { display: flex; align-items: center; min-height: 36px; gap: 6px; }
.annotation-schedules input { accent-color: var(--brand); }
#annotationFeedback { color: #d7aa89; font-size: 12px; line-height: 1.5; }
.annotation-editor input:focus-visible { outline: 2px solid #f0c67d; outline-offset: 2px; }
.annotation-colors { display: flex; flex-wrap: wrap; gap: 4px; }
.annotation-color-option { position: relative; display: grid; place-items: center; width: 34px; height: 34px; cursor: pointer; }
.annotation-color-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.annotation-colors .swatch { display: block; pointer-events: none; transform: none; }
.annotation-color-option input:checked + .swatch { border-color: #f3f1e9; box-shadow: 0 0 0 2px #171917; }
.annotation-color-option input:focus-visible + .swatch { outline: 2px solid #f0c67d; outline-offset: 3px; }
.annotation-label { color: #f3f1e9; }
.annotation-label::before { content: "● "; color: var(--event-color); }
.annotation-color-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.annotation-color-dots i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
@supports (color: color-mix(in srgb, red, white)) {
  .annotation-label, .day-head .event[style] { color: color-mix(in srgb, var(--event-color, #c8a15f) 60%, #f3f1e9); }
  .day-head .event[style] { background: color-mix(in srgb, var(--event-color, #c8a15f) 6%, transparent); }
}
.day-head.weekend { background: #282825; }
.day-head.today .date { color: #e1bd78; }
.day-head .dow { color: var(--muted); font-size: 9px; font-weight: 730; letter-spacing: .09em; text-transform: uppercase; }
.day-head .date { display: block; margin-top: 3px; font-family: Georgia, serif; font-size: 20px; }
.day-head .event { display: block; margin-top: 6px; padding: 3px 4px; border-radius: 4px; overflow: hidden; background: var(--event-wash, #e0ba720a); color: #f3f1e9; font-size: 12px; line-height: 16px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }
.person-label { position: sticky; left: 0; z-index: 4; height: var(--employee-row-height); display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: #202320; }
.person-label.open-row { height: var(--open-row-height); background: #272721; }
.person-avatar { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--avatar); color: #151815; font-size: 10px; font-weight: 780; }
.person-meta strong { display: block; font-size: 11px; }
.person-meta span { display: block; margin-top: 3px; color: var(--subtle); font-size: 9px; }
.row-hours { margin-left: auto; color: var(--muted); font-size: 9px; }
.person-label.open-row .person-meta { min-width: 0; flex: 1 1 auto; }
.person-label.open-row .row-hours { flex: 0 0 auto; white-space: nowrap; }
.grid-cell { position: relative; height: var(--employee-row-height); padding: 7px; background: #1d201d; cursor: default; }
.cell-create { position: absolute; inset: 3px; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.cell-create:focus-visible { outline-offset: -2px; }
.top-actions button:disabled, #filterBtn:disabled { opacity: .5; cursor: not-allowed; }
.top-actions button:disabled:hover { background: transparent; color: var(--muted); }
.grid-cell.open-row { height: var(--open-row-height); background: #22231f; }
.grid-cell.weekend { background: #20221f; }
body:not(.employee-preview) .grid-cell:not(:has(.shift-card)):hover { background: #252925; }
.grid-cell.placeable { cursor: copy; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--selected-accent) 55%, transparent); }
.day-head.week-start, .grid-cell.week-start { border-left: 1px solid #ffffff0e; }
.day-head.week-end, .grid-cell.week-end { border-right: 1px solid #ffffff0e; }
.grid-cell.last-row { border-bottom-color: #ffffff0e; }
.grid-cell.last-row.week-start { border-bottom-left-radius: 7px; }
.grid-cell.last-row.week-end { border-bottom-right-radius: 7px; }
.grid-cell.drag-over { outline: 1px solid var(--brand); outline-offset: -3px; }
.shift-card { position: relative; width: 100%; min-height: 55px; padding: 9px 7px 7px 11px; border: 1px solid #4b535a; border-radius: 7px; background: linear-gradient(180deg, #ffffff04, #00000008), var(--card-surface); box-shadow: inset 0 1px #ffffff08, inset 0 -1px #00000026, 0 2px 4px #00000024; color: var(--text); text-align: left; cursor: pointer; overflow: hidden; }
.open-row .shift-card { min-height: 67px; border-style: dashed; }
.shift-card:hover { transform: translateY(-1px); border-color: #68727a; }
.shift-card strong { display: block; overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.shift-card .shift-custom { margin-left: 6px; color: #b3b9b5; font-size: 8px; font-weight: 400; }
.shift-card span { display: block; margin-top: 3px; color: #c1c6c0; font-size: 9px; }
.shift-card .shift-note { color: var(--accent); font-size: 8px; font-weight: 680; }
.availability { position: absolute; inset: auto 7px 4px; height: 9px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; }
.availability.preferred, .status-sample.preferred { background: var(--preferred-color); }
.availability.unavailable, .status-sample.unavailable { background: var(--not-available-color); }
.availability.timeoff, .status-sample.timeoff { height: auto; padding: 4px 5px; border: 1px solid #604d4b; background: #382b2c; color: #d4aaa4; font-size: 8px; text-align: center; }
.availability.timeoff { bottom: 6px; }
.legend-bar { border-top: 1px solid var(--line); background: #202320; color: #c4c9c2; }
/* The footer spans the same canvas as the roster. Its contents remain readable
   at the shared column while the full footer stays aligned with both weeks. */
.legend-content { position: sticky; left: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; width: min(100%, 100cqw); padding: 14px; font-size: 12px; line-height: 18px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.status-sample { display: inline-block; flex: 0 0 28px; width: 28px; height: 9px; border: 0; border-radius: 4px; }
.status-sample.timeoff { height: 18px; padding: 0; }
.legend-annotation { color: #e0ba72; font-size: 12px; font-style: normal; }
.legend-note { margin-left: auto; color: #a8ada6; font-size: 11px; }
dialog { width: 420px; border: 1px solid #4a504b; border-radius: 13px; padding: 0; background: #242824; color: var(--text); box-shadow: 0 24px 80px #000a; }
dialog::backdrop { background: #0c0e0bb5; backdrop-filter: blur(2px); }
dialog form { padding: 20px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
#dialogContent h3 { margin: 10px 0 6px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
#dialogContent p { color: var(--muted); font-size: 13px; line-height: 1.55; }
#dialogContent .availability-warning { color: #dfb3b0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.detail-item { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #202320; }
.detail-item span { display: block; color: var(--subtle); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.detail-item strong { display: block; margin-top: 5px; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; transform: translateY(20px); padding: 11px 15px; border: 1px solid #4e554f; border-radius: 9px; background: #2b302c; box-shadow: 0 12px 30px #0008; color: var(--text); font-size: 12px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.compare-mode { --accent-opacity: 1; }
.secondary:disabled, .primary:disabled { opacity: .45; cursor: default; }
.cancel-placement { width: 100%; margin-bottom: 12px; }
.cell-shifts { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cell-shifts::-webkit-scrollbar { display: none; }
.cell-shifts .shift-card { flex: 0 0 100%; min-width: 0; }
.cell-shift-count { position: absolute; top: 1px; right: 8px; z-index: 1; padding: 0 3px; border: 0; border-radius: 3px; background: #262a27; color: #c4c9c2; font-size: 8px; line-height: 11px; cursor: pointer; }
.grid-cell.drag-blocked { outline: 1px solid #a77978; outline-offset: -3px; }
.shift-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.shift-editor label { display: grid; gap: 6px; font-size: 12px; color: #c4c9c2; }
.shift-editor input, .shift-editor select { width: 100%; min-width: 0; min-height: 36px; padding: 7px; border: 1px solid #535b54; border-radius: 6px; background: #202320; color: var(--text); font: inherit; }
/* Keep native selection and keyboard behavior; dots are progressive enhancement only. */
@supports (appearance: base-select) and selector(::picker(select)) {
  #editTemplate, #editTemplate::picker(select) { appearance: base-select; }
  #editTemplate::picker(select) { background: #202320; color: var(--text); border: 1px solid #535b54; border-radius: 6px; font: inherit; }
  #editTemplate option { gap: 8px; padding: 7px; }
  #editTemplate option[style*="--template-color"]::before { content: ""; display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--template-color); }
  #editTemplate option:checked { background: #343b34; }
  #editTemplate option:hover, #editTemplate option:focus-visible { background: #3d453d; }
}
.shift-editor .full-width { grid-column: 1 / -1; }
.validation-block, .validation-warning { margin-top: 12px; padding: 10px; border: 1px solid #624b4c; border-radius: 7px; color: #e5b8b7; font-size: 12px; line-height: 1.5; }
.validation-warning { border-color: #61543b; color: #e2c48c; }
.validation-block ul, .validation-warning ul { margin: 5px 0 0; padding-left: 17px; }
.override-row { display: flex; gap: 8px; align-items: start; margin-top: 12px; color: #e2c48c; font-size: 12px; line-height: 1.5; }
.override-row input { accent-color: var(--brand); margin-top: 3px; }
.delete-shift { color: #dfb3b0; margin-right: auto; }
#dialogContent .editor-help { font-size: 11px; }
[hidden] { display: none !important; }
@media (max-width: 1200px) { :root { --day-width: 122px; --row-label: 180px; }.totals span:nth-child(2) { display:none; } }
/* Browser-local prototype controls, separate from the scheduling interface. */
.prototype-storage{margin:0 0 12px;color:var(--muted,#bbb7ac);font-size:12px}
.prototype-storage summary{cursor:pointer;width:fit-content;padding:6px 0}
.prototype-storage>div{padding:4px 0 10px;max-width:65ch}
.prototype-storage p{margin:4px 0 10px;line-height:1.5}
.prototype-storage summary:focus-visible{outline:2px solid #d7a35d;outline-offset:3px}
.storage-warning{margin:12px;padding:12px;color:#f3f1e9;background:#292d33;border:1px solid #d7a35d;border-radius:7px;font-size:14px;line-height:1.5}
