/* maintenance screen — parity wave 2 scoped styles. Owner: the maintenance agent.
   Shared register chrome (reg-ribbon / reg-seg / reg-bar / chips / Arrange /
   Filters / pagination) lives in desktop.css; this file adds ONLY what is unique
   to Maintenance: the List/Calendar toggle, the desktop month/week calendar, the
   per-row action menu, and the due-cell colours. Light-theme console; colours use
   shared tokens. */

/* ---- List / Calendar view toggle (page-head actions) ---- */
.mt-viewtog { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.mt-viewtog .mt-vtb {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--muted);
  background: var(--surface); border: 0; cursor: pointer;
}
.mt-viewtog .mt-vtb + .mt-vtb { border-left: 1px solid var(--border-strong); }
.mt-viewtog .mt-vtb .ic { width: 17px; height: 17px; }
.mt-viewtog .mt-vtb:hover { background: var(--purple-soft); color: var(--purple); }
.mt-viewtog .mt-vtb.on { background: var(--purple); color: #fff; }

/* ---- Due cell colouring in the table ---- */
.mt-due { font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-due.od { color: var(--red); }
.mt-due.today { color: var(--orange); }
.mt-due.done { color: var(--muted); font-weight: 500; }

/* ---- Per-row action menu ---- */
.mt-col-act { width: 44px; text-align: right; }
.mt-rowmenu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: var(--r-sm);
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.mt-rowmenu-btn:hover { background: var(--purple-soft); color: var(--purple); border-color: var(--border); }
.mt-rowmenu-btn .ic { width: 18px; height: 18px; }
.mt-rowmenu {
  position: absolute; z-index: 60; min-width: 176px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  box-shadow: 0 12px 30px rgba(24, 12, 40, .16);
}
.mt-rowmenu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  font: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--ink);
  background: transparent; border: 0; border-radius: 8px; text-align: left; cursor: pointer;
}
.mt-rowmenu button:hover { background: var(--purple-soft); color: var(--purple); }
.mt-rowmenu button .ic { width: 17px; height: 17px; color: var(--muted); flex: none; }
.mt-rowmenu button:hover .ic { color: var(--purple); }

/* ---- Calendar ---- */
.mt-calendar { margin-top: 4px; }
.mt-calbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.mt-crange { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.mt-crange .mt-crb {
  padding: 7px 16px; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--muted);
  background: var(--surface); border: 0; cursor: pointer;
}
.mt-crange .mt-crb + .mt-crb { border-left: 1px solid var(--border-strong); }
.mt-crange .mt-crb:hover { background: var(--purple-soft); color: var(--purple); }
.mt-crange .mt-crb.on { background: var(--purple); color: #fff; }
.mt-calnav { display: inline-flex; align-items: center; gap: 8px; }
.mt-navb {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink); cursor: pointer;
}
.mt-navb:hover { background: var(--purple-soft); border-color: var(--purple-100); color: var(--purple); }
.mt-navb .ic { width: 18px; height: 18px; }
.mt-callabel { min-width: 168px; text-align: center; font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.mt-today {
  padding: 7px 14px; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--purple);
  background: var(--surface); border: 1.5px solid var(--purple-100); border-radius: var(--r-sm); cursor: pointer;
}
.mt-today:hover { background: var(--purple-soft); }

/* Month grid */
.mt-cal { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.mt-dow { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--purple-soft); }
.mt-dow span {
  padding: 9px 4px; text-align: center; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.mt-cgrid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mt-cd {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  min-height: 92px; padding: 8px 8px 6px; gap: 6px;
  background: var(--surface); border-right: 1px solid var(--border); border-top: 1px solid var(--border);
  font: inherit; text-align: left; cursor: pointer;
}
.mt-cgrid .mt-cd:nth-child(7n) { border-right: 0; }
.mt-cd:hover { background: var(--purple-soft); }
.mt-cd.mut { background: #FBFAFD; }
.mt-cd.mut .mt-dn { color: var(--faint); }
.mt-cd .mt-dn { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.mt-cd.today .mt-dn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px;
  padding: 0 6px; border-radius: var(--r-pill); background: var(--purple); color: #fff;
}
.mt-cd.sel { box-shadow: inset 0 0 0 2px var(--purple); z-index: 1; }
.mt-cnt {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--violet); background: var(--violet-soft); border: 1px solid var(--violet-border); border-radius: var(--r-pill);
}
.mt-cnt.hi { color: var(--red); background: var(--red-soft); border-color: var(--red-border); }

/* Week strip */
.mt-wstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.mt-wd {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  font: inherit; cursor: pointer;
}
.mt-wd:hover { background: var(--purple-soft); border-color: var(--purple-100); }
.mt-wd.sel { box-shadow: inset 0 0 0 2px var(--purple); border-color: var(--purple); }
.mt-wn { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mt-wnum { font-size: 1.3rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.mt-wd.today .mt-wnum {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  border-radius: var(--r-pill); background: var(--purple); color: #fff;
}
.mt-wc {
  padding: 2px 9px; font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--violet); background: var(--violet-soft); border: 1px solid var(--violet-border); border-radius: var(--r-pill);
}
.mt-wc.hi { color: var(--red); background: var(--red-soft); border-color: var(--red-border); }

/* Selected-day list under the grid/strip */
.mt-daylist { margin-top: 20px; }
.mt-daylist-h { margin: 0 0 12px; font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.mt-daylist-h b { margin-left: 4px; color: var(--muted); font-weight: 600; }

@media (max-width: 720px) {
  .mt-cd { min-height: 68px; }
  .mt-callabel { min-width: 120px; }
}
