/* Original calendar: weekday colors from kalender/src/general.tsx.
   Duty markers retain original source colors; darker text preserves contrast. */
:root {
  --day-mon:#ee8283; --day-tue:#f7cda0; --day-wed:#feffa6;
  --day-thu:#d7fed0; --day-fri:#a4cbf9; --day-sat:#ccccfa; --day-sun:#c49bf8;
  --today:#f1e8a0; --green:#285f28; --muted:#505b63; --line:#a5b3bd;
  --light:#eff6ed; --action:#4caf50; --text:#20292e; --surface:#fff;
  --morning:#0000ff; --evening:#da70d6; --ponies:#d2691e; --vacation:#1eb45e;
  color:var(--text); background:var(--surface); font-size:15px;
}
body { background:var(--surface); }
h1,h2,.menu-card h2 { font-family:inherit; letter-spacing:normal; }
h1 { font-size:1.5rem; font-weight:700; }
.header { padding:10px 22px; box-shadow:none; }
.brand { font-size:1.08rem; }
.brand span { width:28px; height:28px; border-radius:4px; }
.shell { max-width:1800px; padding:18px 22px; }
.top { margin-bottom:14px; gap:12px; }
.calendar-top { align-items:center; }
.calendar-top .controls { font-size:.82rem; gap:14px; }
button,input,select,textarea,.panel,.menu-card { border-radius:4px; }
button { border-color:var(--line); padding:8px 12px; }
.primary { background:var(--action); border-color:#348338; color:#102b12; }
.primary:hover { background:#9bd39e; color:#102b12; }
.menu-card.featured { background:#eff8eb; border-color:#8eae88; }
.layout { display:block; }
.month-tools { gap:12px; margin-bottom:12px; }
.month-tools h2 { font-size:1.15rem; min-width:155px; text-align:center; }
.month-tools select { max-width:210px; }
.month-scroll { overflow-x:auto; border:1px solid #6d8594; border-radius:4px; }
.month-scroll:focus-visible { outline:3px solid #195ed2; outline-offset:3px; }
.month { border:0; border-radius:0; min-width:700px; background:white; }
.weekday-0 { --weekday:var(--day-mon); }
.weekday-1 { --weekday:var(--day-tue); }
.weekday-2 { --weekday:var(--day-wed); }
.weekday-3 { --weekday:var(--day-thu); }
.weekday-4 { --weekday:var(--day-fri); }
.weekday-5 { --weekday:var(--day-sat); }
.weekday-6 { --weekday:var(--day-sun); }
.weekday { background:var(--weekday); color:#20292e; padding:5px 0; border-right:1px solid #6d8594; border-bottom:1px solid #6d8594; }
.day { padding:0 0 7px; min-height:132px; gap:8px; background:white; border-color:#8e9fab; }
.day.weekend { background:white; }
.day-top { padding:4px 8px; background:var(--weekday); min-height:28px; }
.day-number { font-size:.8rem; }
.day.today { background:var(--today); }
.day.selected { background:inherit; box-shadow:inset 0 0 0 2px #355b79; }
.day.today.selected { background:var(--today); }
.day.highlighted { background:#fff7d5; }
.day.unsaved { outline-color:#315580; background:#edf4ff; }
.day:hover { background:#f1f5f8; }
.day.outside { color:#59636a; background:#fafafa; }
.day.outside .day-top { background:#f4f4f4; }
.shift-line { margin:0 8px; gap:6px; color:var(--duty-text,#34434d); font-size:.82rem; line-height:1.35; }
.shift-line b { width:1.25rem; padding:0; border-left:3px solid var(--duty-color,#647782); padding-left:4px; font-size:.72rem; color:#4e575d; }
.shift-line span { overflow-wrap:normal; word-break:normal; }
.shift-line > span { min-width:0; overflow-wrap:anywhere; }
.duty-morning { --duty-color:var(--morning); --duty-text:#0000c7; }
.duty-evening { --duty-color:var(--evening); --duty-text:#91338c; }
.duty-ponies { --duty-color:var(--ponies); --duty-text:#8b4214; }
.duty-vacation { --duty-color:var(--vacation); --duty-text:#146626; }
.day-note { margin:0 8px; margin-top:auto; font-size:.73rem; color:#855000; }
.day-tag { color:#20292e; font-size:.64rem; }
.legend { margin-top:9px; font-size:.76rem; gap:8px 18px; }
.legend-duty b { border-left:3px solid var(--duty-color,#647782); padding-left:5px; color:var(--duty-text,#34434d); }
.calendar-footer { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-top:6px; }
.calendar-footer .vacation-summary { border:0; padding:0; margin:0; max-width:560px; }
.vacation-summary summary { text-align:right; }
.vacation-summary[open] { padding-bottom:12px; }
.calendar-footer .quiet { font-size:.8rem; }
.phone-count { display:none; }
#editor-dialog { width:min(860px,calc(100% - 24px)); max-width:860px; padding:0; border:1px solid #758995; max-height:92dvh; overflow:auto; border-radius:6px; }
#editor-dialog::backdrop { background:#17263180; }
.editor { position:static; border:0; border-radius:0; box-shadow:none; max-height:none; min-height:0; }
.editor-head { padding:14px 18px; display:block; }
.editor-head .eyebrow { display:none; }
.editor-heading { justify-content:space-between; }
.editor-heading h2 { font-size:1.08rem; margin:0; }
.editor-body { padding:14px 18px; overflow:visible; }
.editor-foot { position:sticky; bottom:0; padding:12px 18px; border-radius:0; background:#f8fafb; }
.editor .fields,.assign-row .fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
.assign-row .fields label:last-child { grid-column:1/-1; }
.editor abbr { text-decoration:none; cursor:help; }
.editor .staff-row { padding:6px 10px; margin-top:6px; }
.editor .staff-meta { font-size:.74rem; }
#close-editor { font-size:1.5rem; min-width:44px; padding:0; }
.vacation-row { background:#eff8ed; }
.save-message { padding:8px 12px; font-size:.82rem; }
@media(max-width:1000px) {
  .layout { display:block; }
  .day { min-height:126px; }
  .editor-heading { margin-top:0; }
}
@media(max-width:600px) {
  .shell { padding:12px 10px; }
  .header { padding:10px 12px; }
  .top { display:flex; align-items:flex-start; flex-wrap:wrap; }
  .top h1 { font-size:1.35rem; }
  .calendar-top .controls { gap:8px 12px; margin-top:0; }
  .month-tools .controls { gap:5px; width:100%; }
  .month-tools h2 { min-width:0; flex:1; }
  #today,#refresh { font-size:.78rem; padding:7px; }
  .month-tools label { margin:0; }
  .month { min-width:700px; }
  .day .shift-line { display:flex; }
  .day .day-note { display:block; }
  .day .day-tag { display:block; }
  .day { padding:0 0 7px; gap:8px; min-height:126px; }
  .day-top { padding:4px 7px; }
  .phone-count { display:none; }
  .calendar-footer { flex-wrap:wrap; gap:0; }
  .vacation-summary summary { text-align:left; }
  .editor-heading { display:flex; flex-wrap:wrap; gap:6px; }
  .editor-heading h2 { flex:1; }
  .editor .fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .editor-body,.editor-head,.editor-foot { padding-left:12px; padding-right:12px; }
}
@media print {
  #editor-dialog,.calendar-footer { display:none!important; }
  .month-scroll { overflow:visible; }
  .month { min-width:0; }
  .day-top,.weekday { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}
