:root {
  --bg: #f4f6f9; --card: #fff; --ink: #0f1b2d; --mute: #5b6878; --line: #e3e8ef; --side: #0f1b2d;
  --brand: #0f766e; --brand-2: #14b8a6; --ok: #15803d; --warn: #b45309; --bad: #be123c; --info: #1d4ed8;
  --r: 12px; --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .05);
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
small { color: var(--mute); font-size: 12px; }
.mute { color: var(--mute); font-size: 13px; margin-top: 10px; }
.grow { flex: 1; }
.r { text-align: right; white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Layout */
#app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
#side { background: var(--side); color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; }
.brand .word { font-size: 21px; font-weight: 600; letter-spacing: -.3px; }
.brand .word b { color: var(--brand-2); font-weight: 800; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #cbd5e1; font-weight: 500; }
#nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
#nav a.on { background: var(--brand); color: #fff; }
#nav a i { margin-left: auto; background: #f59e0b; color: #1c1917; font-style: normal; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-weight: 600; color: #fff; }
.side-foot small { display: block; color: #94a3b8; font-weight: 400; margin-top: 2px; }
#mainwrap { min-width: 0; }
#top { display: flex; align-items: center; gap: 16px; padding: 16px 28px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
#top h1 { font-size: 20px; letter-spacing: -.2px; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.persona { color: var(--mute); font-size: 13px; display: flex; align-items: center; gap: 8px; }
#view { padding: 22px 28px 60px; max-width: 1500px; }

/* Controls */
select, input[type=text], input[type=date], input[type=number] { font: inherit; color: inherit; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
select:focus-visible, input:focus-visible, .btn:focus-visible, .day:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.btn { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: var(--ink); cursor: pointer; display: inline-block; white-space: nowrap; }
.btn:hover { background: #f1f5f9; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #115e59; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--mute); }
.btn.ghost:hover { background: #e8edf3; color: var(--ink); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.lg { padding: 12px 22px; font-size: 15px; }
.btn.icon { padding: 4px 11px; font-size: 18px; line-height: 1.2; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { color: var(--brand); font-weight: 600; font-size: 13px; cursor: pointer; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; background: #e2e8f0; color: #334155; text-transform: capitalize; white-space: nowrap; }
.badge.ok { background: #dcfce7; color: #166534; } .badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #ffe4e6; color: #9f1239; } .badge.info { background: #dbeafe; color: #1e40af; }
.chip { display: inline-block; background: var(--c); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; padding: 1px 6px; border-radius: 5px; min-width: 30px; text-align: center; }
.av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-size: 11.5px; font-weight: 700; flex: none; }
.gap { color: var(--bad); font-weight: 700; font-style: normal; font-size: 12px; }

/* Cards, KPIs */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
.card h3 small { font-weight: 400; margin-left: 6px; }
.card h4 { font-size: 13px; margin: 16px 0 6px; color: var(--mute); text-transform: uppercase; letter-spacing: .5px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-left: 4px solid #94a3b8; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 30px; line-height: 1.15; letter-spacing: -.5px; }
.kpi span { color: var(--mute); font-size: 12.5px; }
.kpi.ok { border-left-color: var(--ok); } .kpi.warn { border-left-color: #f59e0b; } .kpi.bad { border-left-color: var(--bad); }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.hero { background: linear-gradient(120deg, #0f766e, #0f1b2d); color: #fff; border: 0; }
.hero .next { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hero .next div { background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 9px 12px; display: grid; gap: 3px; }
.hero small, .hero .mute { color: #cbd5e1; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--mute); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.tbl th small { text-transform: none; letter-spacing: 0; }
.tbl th.num { text-align: right; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.hover tbody tr { cursor: pointer; } .tbl.hover tbody tr:hover, .tbl tr.today { background: #f0fdfa; }
.tbl tr.wk td:first-child { color: var(--mute); }
.lineup td:first-child { width: 48px; }
.who { display: flex; align-items: center; gap: 10px; }
.who > div { display: grid; }
.who span { color: var(--mute); font-size: 12.5px; }
.who.sm .av { width: 26px; height: 26px; font-size: 10.5px; }
.oncall-now .who { margin-bottom: 12px; }
.oncall-now .who b { font-size: 16px; }
.oncall-now.big { border-left: 5px solid var(--bad); }
.oncall-now.big .who .av { width: 48px; height: 48px; font-size: 16px; }
.oncall-now.big .who b { font-size: 22px; }

/* Lists */
.attn, .mini, .feed { list-style: none; margin: 0; padding: 0; }
.att { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; margin-bottom: 6px; border-left: 4px solid; cursor: pointer; background: #f8fafc; }
.att div { flex: 1; display: grid; }
.att.bad { border-color: var(--bad); } .att.warn { border-color: #f59e0b; } .att.info { border-color: var(--info); background: #eff6ff; cursor: default; }
.att:hover { background: #eef2f6; }
.mini li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eef2f6; }
.mini li div { flex: 1; display: grid; }
.feed li { padding: 7px 0; border-bottom: 1px solid #eef2f6; font-size: 13px; }
.feed li small { display: block; }
.feed li:last-child, .mini li:last-child { border: 0; }

/* Schedule */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar h2 { font-size: 19px; }
.monthnav { display: flex; align-items: center; gap: 8px; }
.monthnav h2 { min-width: 172px; text-align: center; }
.seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { font: inherit; font-weight: 600; border: 0; background: transparent; padding: 7px 13px; cursor: pointer; color: var(--mute); }
.seg button.on { background: var(--ink); color: #fff; }
.strip { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; color: var(--mute); font-size: 13px; }
.strip > span > b { color: var(--ink); font-size: 15px; }
.legend { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow); }
.cal-h { background: #f8fafc; padding: 7px 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--mute); }
.day { background: #fff; min-height: 128px; padding: 6px 7px 8px; cursor: pointer; }
.day:hover { background: #f0fdfa; }
.day.blank { background: #f8fafc; cursor: default; }
.day.wk { background: #fafbfc; } .day.hol { background: #fffbeb; }
.day-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.day .num { font-weight: 700; font-size: 13px; text-align: left; }
.day.today .num { background: var(--brand); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; }
.holname { font-size: 10.5px; color: var(--warn); font-weight: 700; }
.ln { display: flex; gap: 5px; align-items: baseline; font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
.ln .nm { min-width: 0; }
.ln .me { background: #fde68a; border-radius: 3px; padding: 0 2px; font-weight: 700; }
.ln .bad { color: var(--bad); text-decoration: underline wavy; }
.ln .gap { margin-left: 4px; font-size: 11px; }
.gridwrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 18px; }
.grid { border-collapse: collapse; font-size: 12px; }
.grid th, .grid td { border-right: 1px solid #eef2f6; border-bottom: 1px solid #eef2f6; padding: 4px; text-align: center; }
.grid thead th { background: #f8fafc; font-size: 10.5px; color: var(--mute); min-width: 38px; }
.grid thead th.today { background: var(--brand); color: #fff; }
.grid tbody th { position: sticky; left: 0; background: #fff; text-align: left; white-space: nowrap; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; min-width: 200px; z-index: 1; }
.grid tbody th small { display: block; font-weight: 400; }
.grid td { cursor: pointer; vertical-align: top; height: 44px; }
.grid td:hover { background: #f0fdfa; }
.grid .wk { background: #f6f8fa; }
.grid td.off { background: repeating-linear-gradient(135deg, #f1f5f9, #f1f5f9 5px, #e2e8f0 5px, #e2e8f0 10px); }
.grid td.off i { font-size: 10px; font-weight: 700; color: var(--mute); font-style: normal; }
.grid td .chip { display: block; margin: 1px 0; min-width: 0; }
.grid tr.me th { background: #fef9c3; }
.grid td.num { font-weight: 700; padding: 4px 10px; cursor: default; }
.empty { background: #fff; border: 2px dashed #cbd5e1; border-radius: var(--r); padding: 56px 24px; text-align: center; margin-bottom: 18px; }
.empty h3 { font-size: 19px; margin-bottom: 8px; }
.empty p { color: var(--mute); max-width: 560px; margin: 0 auto 20px; }

/* Equity & rules */
.barcell { min-width: 170px; }
.barcell span { display: inline-block; width: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { display: inline-block; position: relative; width: calc(100% - 44px); height: 10px; background: #eef2f6; border-radius: 5px; vertical-align: middle; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; }
.bar s { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.rule { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid #eef2f6; cursor: pointer; }
.rule div { display: grid; }
.rule input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.rule input[type=number] { width: 62px; }
.need input { width: 48px; text-align: center; padding: 5px 2px; }
.need th, .need td { text-align: center; } .need td:first-child, .need th:first-child { text-align: left; }

.tag { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--mute); background: #eef2f6; border-radius: 4px; padding: 1px 6px; text-transform: uppercase; letter-spacing: .3px; }
.method { display: grid; grid-template-columns: 1fr 170px 112px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #eef2f6; }
.method small { display: block; margin-top: 2px; }
.methods { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 12px; margin-top: 18px !important; }
.rot { list-style: none; margin: 12px 0; padding: 0; }
.rot li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #eef2f6; }
.rot .n { width: 20px; color: var(--mute); font-weight: 700; text-align: right; }
.rot .btn.icon { font-size: 14px; padding: 3px 9px; }
.dialog h3 .chip { vertical-align: middle; }

/* Modal & toast */
.backdrop { position: fixed; inset: 0; background: rgba(15, 27, 45, .5); display: grid; place-items: start center; padding: 6vh 16px; overflow: auto; z-index: 20; }
.dialog { background: #fff; border-radius: 14px; padding: 22px 24px; width: min(620px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dialog.m-confirm { width: min(440px, 100%); }
.dialog h3 { font-size: 18px; margin-bottom: 14px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.shiftrow { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid #eef2f6; }
.shiftrow > div:first-child { display: grid; gap: 2px; justify-items: start; align-content: start; }
.slots { display: grid; gap: 6px; }
.slot { width: 100%; }
.slot.open { border-color: var(--bad); background: #fff1f2; color: var(--bad); font-weight: 600; }
.slot.bad { border-color: #f59e0b; background: #fffbeb; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.form label, .form .field { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--mute); }
.form .wide { grid-column: 1 / -1; }
.days { display: flex; gap: 12px; }
.days label { display: flex; gap: 4px; align-items: center; font-weight: 500; color: var(--ink); }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 500; opacity: 0; pointer-events: none; transition: .25s; z-index: 30; max-width: 90vw; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1000px) {
  #app { grid-template-columns: 1fr; }
  #side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; }
  .brand { padding: 0 8px 0 0; } .side-foot { display: none; }
  #nav { flex-direction: row; overflow-x: auto; flex: 1; }
  #nav a { white-space: nowrap; }
  #top { padding: 12px 16px; position: static; flex-wrap: wrap; } #view { padding: 16px; }
  .cols, .cols.even { grid-template-columns: 1fr; }
  .day { min-height: 80px; } .legend { margin-left: 0; }
  .shiftrow, .form { grid-template-columns: 1fr; }
  .card { overflow-x: auto; }
}
@media print {
  #side, #top, .toolbar .btn, .seg, #toast, .attn { display: none !important; }
  #app { display: block; } #view { padding: 0; max-width: none; }
  .cal, .card, .gridwrap { box-shadow: none; } .day { min-height: 90px; }
}

/* Account chrome, banners, loading */
.sync { font-size: 12.5px; color: var(--mute); min-width: 60px; text-align: right; }
.sync.ok { color: var(--ok); } .sync.bad { color: var(--bad); font-weight: 600; }
.acct { display: flex; align-items: center; gap: 8px; }
.acct-email { font-size: 13px; color: var(--mute); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 13.5px; border: 1px solid; }
.banner span { flex: 1; }
.banner.info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.banner.warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.banner.bad { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.loading { color: var(--mute); padding: 40px 0; text-align: center; }
.persona[hidden] { display: none; }
@media print { .banner { display: none !important; } }

/* ---------- Mobile ---------- */
.menu-btn, #scrim { display: none; }
.day .dow { display: none; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--mute); }

/* Tablet and below: the sidebar becomes a slide-in menu */
@media (max-width: 1000px) {
  .menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; font-size: 20px; flex: none; }
  #side { position: fixed; inset: 0 auto 0 0; width: min(280px, 82vw); height: 100dvh; flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding: 18px 12px; transform: translateX(-105%); transition: transform .2s ease; z-index: 40; overflow-y: auto; }
  body.nav-open #side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  body.nav-open #scrim { display: block; position: fixed; inset: 0; background: rgba(15, 27, 45, .5); z-index: 39; }
  body.nav-open { overflow: hidden; }
  .brand { padding: 4px 8px 20px; }
  #nav { flex-direction: column; overflow: visible; flex: none; }
  #nav a { padding: 12px 10px; font-size: 15px; }
  .side-foot { display: block; }
  #top { position: sticky; top: 0; gap: 10px; padding: 8px 12px; }
  #top h1 { font-size: 17px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-r { margin-left: 0; gap: 8px; }
}

/* Phones */
@media (max-width: 760px) {
  #top { flex-wrap: wrap; }
  .top-r { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .persona { flex: 1; min-width: 0; }
  .persona select { flex: 1; min-width: 0; max-width: 100%; }
  .acct-email, .sync:empty { display: none; }
  #view { padding: 12px 10px 72px; }
  .card { padding: 14px; border-radius: 10px; margin-bottom: 12px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
  .kpi { padding: 11px 12px; }
  .kpi b { font-size: 24px; }
  /* comfortable tap targets; 16px inputs stop iOS zooming in on focus */
  .btn, select, input[type=text], input[type=date], input[type=number] { min-height: 40px; }
  select, input[type=text], input[type=date], input[type=number] { font-size: 16px; }
  .btn.sm { min-height: 34px; }
  .btn.icon { min-width: 40px; }
  .toolbar { gap: 8px; }
  .toolbar .grow { display: none; }
  .monthnav { width: 100%; }
  .monthnav h2 { flex: 1; min-width: 0; font-size: 17px; }
  .seg { flex: 1; }
  .seg button { flex: 1; min-height: 40px; }
  .strip { gap: 8px 16px; }
  .legend { display: none; }
  .banner { flex-wrap: wrap; }
  .hero .next div { flex: 1 1 40%; }
  .empty { padding: 36px 16px; }
  .methods { gap: 8px 12px; }

  /* the month grid becomes a day-by-day agenda */
  .cal { grid-template-columns: 1fr; }
  .cal-h, .day.blank { display: none; }
  .day { min-height: 0; padding: 10px 12px; display: grid; grid-template-columns: 54px 1fr; column-gap: 10px; align-items: start; }
  .day-h { grid-row: 1 / span 8; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; }
  .day .dow { display: block; }
  .day .num { font-size: 18px; }
  .day.today .num { width: 30px; height: 30px; font-size: 15px; }
  .holname { font-size: 10px; line-height: 1.2; }
  .ln { grid-column: 2; font-size: 13.5px; margin-top: 3px; }

  /* wide tables scroll sideways inside their card instead of squashing */
  .card > .tbl:not(.lineup) { min-width: 600px; }
  .grid tbody th { min-width: 128px; padding: 6px 8px; }
  .grid tbody th .av, .grid tbody th small { display: none; }
  .method { grid-template-columns: 1fr; gap: 6px; }
  .rule { align-items: flex-start; }
  .oncall-now.big .who b { font-size: 19px; }

  /* dialogs become bottom sheets */
  .backdrop { padding: 0; place-items: end stretch; }
  .dialog, .dialog.m-confirm { width: 100%; max-height: 92dvh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px 14px calc(18px + env(safe-area-inset-bottom)); }
  .actions { flex-wrap: wrap; }
  .actions .btn { flex: 1; }
  .actions .grow { display: none; }
  .days { flex-wrap: wrap; }
  #toast { left: 10px; right: 10px; bottom: 12px; max-width: none; text-align: center; transform: translateY(30px); }
  #toast.show { transform: none; }
}

@media (max-width: 760px) {
  .seg { flex: 1 1 100%; }
  .persona { font-size: 0; gap: 0; }
  .day.today { scroll-margin-top: 118px; }
  .banner a { white-space: nowrap; }
}

/* ---------- Departments, rotations, filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; align-items: center; }
.filters select { max-width: 240px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { font: inherit; font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.pills button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.plain { list-style: none; margin: 0 0 12px; padding: 0; }
.plain li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.plain li .btn.icon { margin-left: auto; }
.addrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; margin-top: 10px; }
.addrow select, .addrow input[type=text] { flex: 1 1 150px; min-width: 0; }
.slotrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.slotrow .n { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--mute); }
label.inline, .inline { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; font-weight: 500; }
.form label.inline { flex-direction: row; }
.actions.left { justify-content: flex-start; margin-top: 6px; }
.days.hol, .days.elig { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; margin-bottom: 10px; }
.noteinp { flex: 1 1 100%; font-size: 13px; padding: 6px 9px; border: 1px dashed #cbd5e1; border-radius: 7px; background: #fff; min-width: 0; }
.noteline { flex: 1 1 100%; color: var(--mute); }
.ln .note { font-style: normal; color: var(--mute); margin-left: 4px; }
.ln.carry { opacity: .7; }
.ln.carry small { color: var(--mute); }
.form.adj { flex: 1 1 100%; background: var(--bg); border-radius: 10px; padding: 12px; margin-top: 8px; }
.shiftrow { flex-wrap: wrap; }
.shiftrow > div:first-child .btn { margin-top: 6px; }
.scrollx { overflow-x: auto; }
.tbl.elig td { vertical-align: middle; }
.tbl.elig input[type=number] { width: 70px; }
.dialog.m-rot, .dialog.m-provider { width: min(760px, 100%); }
.dialog .banner { margin: 12px 0; }
@media (max-width: 760px) {
  .filters select { flex: 1 1 100%; max-width: none; }
  .pills { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .pills button { white-space: nowrap; }
  .tbl.elig { min-width: 520px; }
  .addrow select, .addrow input[type=text] { flex-basis: 100%; }
}
.plain li > span { flex: 1 1 240px; min-width: 0; }
.dialog h4 { margin: 20px 0 8px; }
input[type=time], input[type=color] { font: inherit; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; min-height: 34px; }
input[type=color] { padding: 2px; width: 56px; }

/* Sign-ins and invitations */
.bare { border: 0; background: none; padding: 0; margin: 0; font: inherit; cursor: pointer; }
.bare:hover .badge { filter: brightness(.95); }
.linkbox { width: 100%; font: 13px/1.4 ui-monospace, Consolas, monospace; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px; background: #f8fafc; color: var(--ink); }
.dialog.m-invite { width: min(520px, 100%); }
.shares li { display: flex; align-items: flex-end; gap: 6px; padding: 10px 0; border-bottom: 1px solid #eef2f6; flex-wrap: wrap; }
.shares li > span { flex: 1 1 260px; min-width: 0; display: grid; gap: 4px; }
.shares li.fresh .linkbox { border-color: var(--brand); background: #f0fdfa; }
.shares .linkbox { padding: 7px 10px; }
.dialog.m-invite p { margin-bottom: 12px; }
@media (max-width: 760px) { .dialog.m-invite .actions { flex-wrap: wrap; } .dialog.m-invite .actions .btn { flex: 1 1 auto; text-align: center; } }
