/* EMOD App — rota builder */
.rt-tabs { margin: 10px 0; }
.rt-sec { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px; margin-top: 12px; }
.rt-sec h2 { font-size: 16px; font-weight: 900; color: var(--navy-ink); margin-bottom: 10px; }
html[data-theme="dark"] .rt-sec h2 { color: #dbe9f5; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .rt-sec h2 { color: #dbe9f5; } }
.rt-count { display: inline-block; background: var(--teal-soft); color: var(--teal-ink); border-radius: 999px; font-size: 12px; padding: 2px 8px; vertical-align: middle; margin-inline-start: 4px; }
.rt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rt-need { width: 100%; border-collapse: collapse; }
.rt-need th { text-align: start; font-size: 13.5px; padding: 6px 8px 6px 0; }
.rt-need thead th { font-size: 11.5px; text-transform: uppercase; color: var(--slate); letter-spacing: .03em; }
.rt-need tbody th small { display: block; font-weight: 600; color: var(--slate); font-size: 11.5px; }
.rt-need td { padding: 4px 4px 4px 0; }
.rt-need input { width: 68px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 9px; padding: 8px; font: inherit; font-weight: 800; text-align: center; }
.rt-p { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.rt-ph { display: flex; gap: 8px; align-items: center; }
.rt-name { flex: 1; border: none; background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 800; padding: 2px 0; }
.rt-del { border: none; background: var(--red-soft); color: var(--red); border-radius: 8px; width: 28px; height: 28px; cursor: pointer; font-weight: 900; }
.rt-pf { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rt-pf label { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--slate); display: flex; flex-direction: column; gap: 3px; }
.rt-pf input { width: 92px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 9px; padding: 7px 8px; font: inherit; font-size: 14px; font-weight: 700; }
.rt-pc { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.rt-no, .rt-leave { border: 1px solid var(--line); background: var(--bg); color: var(--slate); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.rt-no.on { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.rt-lv { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rt-lv span { background: var(--navy-soft); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 700; color: var(--slate); }
.rt-lv span.none { background: none; font-weight: 500; }
.rt-lv button { border: none; background: none; color: var(--red); cursor: pointer; font-weight: 900; padding: 0 0 0 4px; }
.rt-alert { border-radius: 14px; padding: 11px 14px; font-size: 13.5px; line-height: 1.45; margin: 10px 0; }
.rt-alert.ok { background: var(--green-soft); border-left: 4px solid var(--green); }
.rt-alert.warn { background: var(--amber-soft); border-left: 4px solid var(--amber); }
.rt-alert.bad { background: var(--red-soft); border-left: 4px solid var(--red); }
.rt-sum3 { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 12px; }
.rt-sum3 b { display: block; font-size: 24px; font-weight: 900; }
.rt-sum3 small { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--slate); }
.rt-det { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 14px; margin: 8px 0; font-size: 13.5px; }
.rt-det summary { cursor: pointer; }
.rt-ul { margin: 8px 0 0 16px; } .rt-ul li { margin-bottom: 4px; line-height: 1.4; }
.rt-scroll { overflow-x: auto; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 4px; }
.rt-cal, .rt-tot { width: 100%; border-collapse: collapse; font-size: 13px; }
.rt-cal th, .rt-tot th { text-align: start; }
.rt-cal thead th, .rt-tot thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--slate); padding: 8px 6px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.rt-cal thead th small { display: block; font-weight: 600; text-transform: none; }
.rt-cal tbody th { padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rt-cal tbody th b { font-size: 15px; } .rt-cal tbody th small { display: block; color: var(--slate); font-size: 11px; }
.rt-cal td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rt-cal tr.we { background: var(--navy-soft); }
.rt-cal td.short { background: var(--red-soft); }
.rt-cell { display: block; width: 100%; text-align: start; border: none; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; padding: 2px 0; cursor: pointer; }
.rt-cell.gap { color: var(--red); font-weight: 800; }
.rt-tot td { padding: 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rt-tot tbody th { padding: 6px; border-bottom: 1px solid var(--line); font-weight: 800; }
.rt-tot td.on { color: var(--green); font-weight: 800; } .rt-tot td.off { color: var(--red); font-weight: 800; }
.rt-pick { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; }
.rt-pick button { text-align: start; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 9px 11px; font: inherit; font-weight: 700; cursor: pointer; }
.rt-pick button.sel { border-color: var(--teal); background: var(--teal-soft); }
.rt-pick button.warn { border-color: var(--amber); }
.rt-pick small { display: block; font-size: 11.5px; font-weight: 600; color: var(--amber); }
.rt-lrow { border-bottom: 1px solid var(--line); padding: 10px 14px; }
.rt-lrow b { display: block; margin-bottom: 4px; }
.rt-lrow .btn { margin-top: 8px; }
@media (max-width: 420px) { .rt-grid { grid-template-columns: 1fr; } }
/* printed rota */
#rt-print-area { display: none; }
@media print {
  body.printing-rota #app { display: none !important; }
  body.printing-rota #rt-print-area { display: block; color: #14263a; font-size: 9.5pt; }
  @page { size: A4 portrait; margin: 10mm; }
  #rt-print-area header { border-bottom: 2.5px solid #123c63; padding-bottom: 5px; margin-bottom: 8px; display: flex; align-items: baseline; }
  #rt-print-area h1 { font-size: 15pt; color: #123c63; margin: 0; }
  #rt-print-area header .m { margin-left: auto; font-size: 9pt; color: #5b6b7c; }
  #rt-print-area h2 { font-size: 11pt; color: #0f8a78; margin: 10px 0 4px; }
  #rt-print-area table { width: 100%; border-collapse: collapse; }
  #rt-print-area th, #rt-print-area td { border: .4px solid #c9d4de; padding: 2.5px 4px; text-align: left; }
  #rt-print-area thead th { background: #eef3f7; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .03em; }
  #rt-print-area tr.we td, #rt-print-area tr.we th { background: #f4f7fa; }
  #rt-print-area .tot { margin-top: 4px; }
  #rt-print-area footer { margin-top: 8px; border-top: .6px solid #d5dde5; padding-top: 4px; font-size: 8pt; color: #5b6b7c; }
}

/* how many doctors this cover takes */
.rt-need-calc { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.rt-nc-head { display: flex; align-items: baseline; gap: 10px; }
.rt-nc-head b { font-size: 34px; font-weight: 900; color: var(--teal-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.rt-nc-head span { font-size: 14px; font-weight: 700; line-height: 1.3; }
.rt-nc-line { margin-top: 6px; font-size: 13px; font-weight: 700; }
.rt-nc-line .ok { color: var(--green); } .rt-nc-line .bad { color: var(--red); } .rt-nc-line .muted { color: var(--slate); }
.rt-nc-work { margin-top: 8px; font-size: 13px; }
.rt-nc-work summary { cursor: pointer; color: var(--slate); font-weight: 700; }
.rt-nc-work ul { margin: 8px 0 0 16px; } .rt-nc-work li { margin-bottom: 5px; line-height: 1.45; }
