/* Merlexa Portal — teal #15607E and green #57A436 brand */
:root {
  --ink: #1C2B33;
  --muted: #5E7079;
  --teal: #15607E;
  --teal-deep: #0D3B4F;
  --teal-wash: #E6F0F3;
  --green: #57A436;
  --green-deep: #3E7F25;
  --green-wash: #EAF4E4;
  --amber: #B7790F;
  --amber-wash: #FBF1DC;
  --red: #B3362C;
  --red-wash: #F8E5E2;
  --paper: #F2F5F5;
  --surface: #FFFFFF;
  --line: #D6E0E3;
  --radius-s: 4px;
  --radius-m: 8px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--paper); }
a { color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--green); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.35rem; color: var(--teal-deep); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--teal-deep); color: #DCEAEE; display: flex; flex-direction: column; padding: 22px 0 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: block; padding: 0 22px 18px; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-word { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .01em; display: block; }
.brand-sub { font-size: .85rem; color: #9FD08A; }
.who { padding: 16px 22px; display: grid; gap: 2px; font-size: .9rem; }
.who span { color: #A9C3CB; font-size: .82rem; }
.side nav, .side-foot { display: grid; padding: 4px 10px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; }
.side a { color: #DCEAEE; text-decoration: none; padding: 9px 12px; border-radius: var(--radius-s); font-weight: 500; }
.side a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side a.on { background: #fff; color: var(--teal-deep); }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: .78rem; text-align: center; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 22px 36px 6px; }
.topbar h1 { font-size: 1.75rem; margin: 0; color: var(--teal-deep); flex: 1; }
.bell { font-weight: 600; text-decoration: none; background: var(--green-wash); color: var(--green-deep); padding: 4px 12px; border-radius: 20px; font-size: .88rem; }
.menu-btn { display: none; }
.content { padding: 14px 36px 48px; max-width: 1240px; }

/* ---------- Panels & layout ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 22px; margin-bottom: 20px; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }

/* Status strip on the dashboard: counts that link to their lists */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); margin-bottom: 20px; overflow: hidden; }
.strip a { display: block; padding: 16px 18px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); }
.strip a:last-child { border-right: 0; }
.strip a:hover { background: var(--teal-wash); }
.strip strong { display: block; font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; color: var(--teal-deep); }
.strip span { font-size: .88rem; color: var(--muted); }
.strip a.alert strong { color: var(--red); }
.strip a.warn strong { color: var(--amber); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .84rem; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.var-up { color: var(--amber); font-weight: 600; }
.var-down { color: var(--teal); font-weight: 600; }

/* ---------- Forms ---------- */
label { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--ink); }
label .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=number], input[type=file], select, textarea {
  font: inherit; font-weight: 400; width: 100%; padding: 8px 10px; border: 1px solid #B9C9CE; border-radius: var(--radius-s); background: #fff; color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; margin-bottom: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin: 0 0 16px; }
legend { font-family: var(--serif); font-weight: 600; color: var(--teal-deep); padding: 0 6px; }
.inline-form { display: inline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-block; font: inherit; font-weight: 600; padding: 8px 16px; border-radius: var(--radius-s); border: 1px solid var(--teal); background: var(--teal); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.4; }
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.btn-go { background: var(--green); border-color: var(--green); }
.btn-go:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-quiet { background: #fff; color: var(--teal); }
.btn-quiet:hover { background: var(--teal-wash); color: var(--teal-deep); }
.btn-danger { background: #fff; color: var(--red); border-color: #E3B5AF; }
.btn-danger:hover { background: var(--red-wash); color: var(--red); border-color: var(--red); }
.btn-sm { padding: 4px 10px; font-size: .85rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- Status ---------- */
.flash { padding: 10px 14px; border-radius: var(--radius-s); margin-bottom: 16px; border-left: 4px solid; }
.flash-ok { background: var(--green-wash); border-color: var(--green); }
.flash-error { background: var(--red-wash); border-color: var(--red); }
.flash-info { background: var(--teal-wash); border-color: var(--teal); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .8rem; font-weight: 600; white-space: nowrap; background: #EEF2F3; color: var(--muted); }
.pill-submitted, .pill-pending { background: var(--amber-wash); color: var(--amber); }
.pill-returned { background: var(--red-wash); color: var(--red); }
.pill-office_approved { background: var(--teal-wash); color: var(--teal); }
.pill-approved, .pill-published, .pill-active { background: var(--green-wash); color: var(--green-deep); }
.pill-draft { background: #DCEBFF; color: #0B5BD3; }
.pill-processed { background: #E4E9EB; color: var(--ink); }
.tag { display: inline-block; font-size: .78rem; padding: 1px 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); }

/* Expiration rail: a dot travels toward the right as the date approaches; ticks at 60/30/15/7 days */
.rail { display: inline-flex; align-items: center; gap: 10px; min-width: 230px; margin-left: 8px; vertical-align: middle; }
.rail-track { position: relative; width: 110px; height: 6px; background: linear-gradient(90deg, #DCE6E9 0%, #DCE6E9 50%, #EAD9B4 75%, #E9C2BC 100%); border-radius: 3px; flex: none; }
.rail-track i { position: absolute; top: -3px; width: 1px; height: 12px; background: #94A9B0; }
.rail-track b { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--teal); }
.rail-label { font-size: .86rem; white-space: nowrap; }
.stage-ok .rail-track b { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.stage-60 .rail-label { color: var(--teal); font-weight: 600; }
.stage-30 .rail-track b, .stage-15 .rail-track b { background: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.stage-30 .rail-label, .stage-15 .rail-label { color: var(--amber); font-weight: 600; }
.stage-7 .rail-track b, .stage-expired .rail-track b { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.stage-7 .rail-label, .stage-expired .rail-label { color: var(--red); font-weight: 700; }

.missing { color: var(--red); font-weight: 600; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty h2 { color: var(--teal-deep); }

/* Schedule week */
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); min-height: 140px; padding: 8px; }
.day h3 { font-family: var(--sans); font-size: .85rem; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.day.today { border-color: var(--teal); box-shadow: inset 0 3px 0 var(--teal); }
.shift { border-left: 3px solid var(--teal); background: var(--teal-wash); padding: 6px 8px; border-radius: 3px; margin-bottom: 6px; font-size: .84rem; }
.shift.draft { border-left-color: #94A9B0; background: #F1F4F5; }
.shift.pending { border-left-color: var(--amber); background: var(--amber-wash); }
.shift strong { display: block; }
.shift.mine { border-left-color: var(--green); background: var(--green-wash); box-shadow: inset 0 0 0 1px var(--green); }
.shift form { display: inline; }

.notice-list { list-style: none; padding: 0; margin: 0; }
.notice-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; }
.notice-list li.unread { font-weight: 600; }
.notice-list li:last-child { border-bottom: 0; }

/* Review timeline on a work log */
.trail { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.trail li { position: relative; padding: 0 0 12px 16px; font-size: .9rem; }
.trail li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }

/* ---------- Sign-in ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--teal-deep); }
.auth { width: 100%; max-width: 400px; background: var(--surface); border-radius: var(--radius-m); padding: 34px 32px; }
.auth .brand-word { font-family: var(--serif); font-size: 2.2rem; color: var(--teal-deep); display: block; }
.auth .lede { color: var(--muted); margin-bottom: 22px; }
.auth form { display: grid; gap: 14px; }
.auth .btn { width: 100%; padding: 10px; }

/* ---------- Schedule grid: one row per employee ---------- */
.seg-tog { display: inline-flex; border: 1px solid var(--teal); border-radius: var(--radius-s); overflow: hidden; align-self: end; }
.seg-tog a { padding: 7px 12px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--teal); background: var(--surface); }
.seg-tog a + a { border-left: 1px solid var(--teal); }
.seg-tog a.on { background: var(--teal); color: #fff; }
.sched-panel { padding: 0; overflow: hidden; }
table.sched { border-collapse: separate; border-spacing: 0; min-width: 760px; table-layout: fixed; }
table.sched th, table.sched td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px; vertical-align: top; text-align: center; }
table.sched thead th { background: var(--teal-deep); color: #fff; font-size: .82rem; position: sticky; top: 0; z-index: 2; white-space: nowrap; }
table.sched thead th span { display: block; font-weight: 400; opacity: .85; }
table.sched thead th.wk2 { background: var(--teal); }
table.sched thead th.today { box-shadow: inset 0 -4px 0 var(--green); }
table.sched th.emp { width: 170px; text-align: left; position: sticky; left: 0; z-index: 1; background: var(--surface); }
table.sched thead th.emp { z-index: 3; background: var(--teal-deep); }
table.sched tbody th.emp a { font-weight: 700; text-decoration: none; }
table.sched tbody th.emp span { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); }
table.sched td.wk2 { background: #F7FAFA; }
table.sched td.today { background: var(--green-wash); }
table.sched tr.mine th.emp, table.sched tr.mine td { background: var(--green-wash); }
table.sched td.num, table.sched th.num { width: 64px; font-variant-numeric: tabular-nums; }
.chip { display: block; padding: 3px 4px; border-radius: 4px; margin-bottom: 4px; font-size: .8rem; line-height: 1.25; text-decoration: none; color: var(--ink); background: var(--green-wash); border-left: 4px solid var(--green); }
.chip b { display: block; }
.chip i { display: block; font-style: normal; font-size: .72rem; color: var(--muted); }
.chip.pending { background: var(--amber-wash); border-left-color: var(--amber); }
.chip.draft { background: #DCEBFF; border-left-color: #1E78FF; }
a.chip:hover { outline: 2px solid var(--ink); }
table.sched .add { display: block; color: #A9BBC1; text-decoration: none; font-size: 1.1rem; line-height: 1.6; border-radius: 4px; }
table.sched .add:hover { background: var(--teal-wash); color: var(--teal); }
table.sched .off { color: #A9BBC1; font-size: .8rem; }
table.sched tr.sumrow th, table.sched tr.sumrow td { background: var(--paper); font-size: .82rem; font-weight: 600; }
.legend { padding: 10px 14px; margin: 0; max-width: none; border-top: 1px solid var(--line); }
.legend .chip { display: inline-block; margin: 0 4px 0 0; }
.legend .chip b { display: inline; }

.req-preview { background: var(--teal-wash); border-radius: var(--radius-m); padding: 10px 14px; margin: 0 0 16px; font-size: .9rem; }
.req-preview ul { columns: 2; margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 700px) { .req-preview ul { columns: 1; } }

.checklist { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 18px; }
.checklist h3 { margin: 0 0 2px; color: var(--teal-deep); }
.checklist ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; }
.checklist li > span:nth-child(2) { flex: 1; min-width: 220px; }
.checklist .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; }
.checklist li.ok .mark { background: var(--green); color: #fff; }
.checklist li.rv .mark { background: var(--amber); color: #fff; }
.checklist li.no .mark { background: var(--red-wash); color: var(--red); border: 1px solid var(--red); }
.contact-line { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius-s); padding: 10px 14px; max-width: none; }
.assign { margin-bottom: 4px; }
.assign-row select { max-width: 420px; margin-top: 6px; }
.chips { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-wash); border: 1px solid #B9D3DB; border-radius: 20px; padding: 4px 6px 4px 12px; font-size: .9rem; }
.chip-x { border: 0; background: transparent; color: var(--teal-deep); font-size: 1.1rem; line-height: 1; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; }
.chip-x:hover { background: #fff; color: var(--red); }
.pay-table select { min-width: 110px; }
.money-in { display: inline-flex; align-items: center; border: 1px solid #B9C9CE; border-radius: var(--radius-s); background: #fff; padding-left: 8px; max-width: 170px; }
.money-in span { color: var(--muted); }
.money-in input { border: 0; padding-left: 4px; max-width: 140px; }
.rate-unit { display: block; margin-top: 2px; }
.pay-more { margin-top: 10px; }
.client-mono { width: 56px; height: 56px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font: 600 1.5rem var(--serif); flex: none; }
.client-tile { border-top-color: var(--green); }
.client-card { border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius-s); padding: 12px 14px; }
.client-card h3 { margin: 0 0 6px; color: var(--teal-deep); }
.client-card p { margin: 0 0 8px; }

.client-grid { grid-template-columns: 3fr 2fr; }
.client-grid > * { min-width: 0; }
.client-grid table input { min-width: 120px; }
@media (max-width: 900px) { .client-grid { grid-template-columns: 1fr; } }
.danger-zone { border-color: #E3B5AF; margin-top: 24px; }
.danger-zone h2 { color: var(--red); }
.danger-zone h3 { font-family: var(--sans); font-size: 1rem; margin-bottom: 4px; }
.covers-box { border: 1px dashed var(--line); }
.pos-card { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 12px; display: grid; gap: 10px; }
.pos-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.covers-pick summary { cursor: pointer; color: var(--teal); }
.covers-pick[open] { min-width: 240px; }

/* ---------- Records management ---------- */
.content:has(.records-frame) { max-width: none; }
.records-intro { margin: 0 0 10px; max-width: none; }
.records-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }

/* ---------- Homes ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.home-card { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--home, var(--teal)); border-radius: var(--radius-m); padding: 18px 20px; text-decoration: none; color: var(--ink); }
.home-card:hover { border-color: var(--home, var(--teal)); }
.home-card-top { display: flex; gap: 14px; align-items: center; }
.home-card-top strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--teal-deep); line-height: 1.25; }
.home-logo { width: 56px; height: 56px; object-fit: contain; border-radius: var(--radius-s); background: #fff; border: 1px solid var(--line); flex: none; }
.home-logo-lg { width: 110px; height: 110px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); flex: none; }
.home-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: .9rem; color: var(--muted); }
.home-facts b { color: var(--ink); font-size: 1rem; }
.home-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.home-tabs strong { font-family: var(--serif); color: var(--teal-deep); }
.home-back { font-size: .85rem; }
.home-tabs .tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.home-tabs .tabs a { padding: 5px 12px; border-radius: 20px; text-decoration: none; font-weight: 600; font-size: .9rem; }
.home-tabs .tabs a:hover { background: var(--teal-wash); }
.home-tabs .tabs a.on { background: var(--teal); color: #fff; }
.home-hero { display: flex; gap: 22px; align-items: flex-start; border-left: 6px solid var(--home, var(--teal)); }
.home-hero h2 { margin-bottom: 6px; }
.svc-list .tag { margin: 0 4px 6px 0; }
.prof-sec summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.prof-sec summary::-webkit-details-marker { display: none; }
.prof-sec summary::before { content: '+'; font-weight: 700; color: var(--teal); width: 1em; }
.prof-sec[open] summary::before { content: '−'; }
.prof-sec summary h3 { margin: 0; color: var(--teal-deep); }
fieldset.multi { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.multi .lbl { font-size: .88rem; font-weight: 600; }
.multi-boxes { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.list-other { margin-top: 6px; }
.save-bar { position: sticky; bottom: 0; background: var(--paper); padding: 12px 0; border-top: 1px solid var(--line); z-index: 5; }
input[type=color] { width: 70px; height: 38px; padding: 2px; border: 1px solid #B9C9CE; border-radius: var(--radius-s); }
input:disabled, select:disabled, textarea:disabled { background: var(--paper); color: var(--ink); opacity: 1; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(13,59,79,.4); }
  .menu-btn { display: inline-block; font: inherit; font-weight: 600; background: var(--teal); color: #fff; border: 0; border-radius: var(--radius-s); padding: 6px 12px; }
  .topbar { padding: 16px 18px 4px; }
  .topbar h1 { font-size: 1.35rem; }
  .content { padding: 12px 18px 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .home-hero { flex-direction: column; }
  .home-tabs .tabs { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .side, .topbar .menu-btn, .no-print { display: none !important; } .shell { display: block; } }
.rc textarea { min-width: 180px; font-size: .85rem; padding: 4px 6px; }
.rc-by { display: block; font-size: .75rem; margin-top: 2px; }

/* ---------- Applicants ---------- */
.strip a.sel { background: var(--teal-wash); box-shadow: inset 0 -3px 0 var(--teal); }
.pipeline { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: st; }
.pipeline li { counter-increment: st; font-size: .82rem; padding: 4px 10px 4px 8px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); }
.pipeline li::before { content: counter(st) ". "; font-weight: 700; }
.pipeline li.done { border-color: var(--green); color: var(--green-deep); background: var(--green-wash); }
.pipeline li.on { border-color: var(--teal); background: var(--teal); color: #fff; font-weight: 600; }
.convert { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--green); border-radius: var(--radius-m); background: var(--green-wash); }
.convert h3 { margin: 0 0 4px; color: var(--green-deep); }

.file-it { flex-basis: 100%; }
.file-it summary { list-style: none; display: inline-block; cursor: pointer; }
.file-it summary::-webkit-details-marker { display: none; }
.file-it[open] summary { margin-bottom: 8px; }
.file-it form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat-list { background: transparent; border: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; max-height: calc(100vh - 120px); overflow: auto; }
.chat-card { border: 1px solid #BFD3DC; border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.chat-card + .chat-card { margin-top: 8px; }
.chat-card.bare { padding: 4px 0; }
.chat-card a { border-radius: 0; }
.chat-group { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; font-size: .9rem; font-weight: 700; color: var(--teal); background: #EAF2F5; border-bottom: 1px solid #BFD3DC; }
.chat-group svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-group.k-client svg { color: var(--green); }
.chat-group.k-private { color: var(--ink); }
.chat-group.k-private svg { color: var(--muted); }
.chat-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.chat-list a span.small { display: block; color: var(--muted); }
.chat-list a:hover { background: var(--paper); }
.chat-list a.on { background: var(--teal-wash); box-shadow: inset 3px 0 0 var(--teal); }
.chat-card.bare a.k-private strong::before { content: "🔒 "; }
.chat-list .count, .side .count { background: var(--green); color: #fff; border-radius: 10px; font-size: .72rem; font-weight: 700; padding: 1px 7px; }
.chat-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); display: flex; flex-direction: column; min-height: 70vh; }
.chat-head { padding: 14px 18px 8px; border-bottom: 1px solid var(--line); }
.chat-head h2 { margin: 0 0 2px; font-size: 1.15rem; }
.chat-head p { margin: 0; }
.chat-rule { margin: 10px 18px 0; padding: 8px 12px; background: var(--amber-wash, #FFF6E5); border: 1px solid #F0D9A8; border-radius: var(--radius-s); font-size: .85rem; }
.chat-pins { margin: 10px 18px 0; padding: 8px 12px; background: var(--teal-wash); border-radius: var(--radius-s); font-size: .88rem; }
.chat-pins div + div { margin-top: 4px; }
.chat-log { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; max-height: 55vh; }
.msg { max-width: 78%; align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: var(--teal-wash); border-color: #BFD8E2; border-radius: 12px 12px 4px 12px; }
.msg.fam { border-left: 3px solid var(--green); }
.msg p { margin: 4px 0 0; white-space: normal; overflow-wrap: anywhere; }
.msg-h { font-size: .85rem; }
.msg-tools { display: flex; gap: 10px; margin-top: 4px; }
.chat-img { display: block; max-width: 260px; max-height: 220px; border-radius: 8px; margin-top: 6px; }
.chat-file::before { content: "📎 "; }
.chat-send { border-top: 1px solid var(--line); padding: 12px 18px; }
.chat-send textarea { width: 100%; resize: vertical; }
.chat-tools { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.chat-tools .grow { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#err { color: var(--red); margin: 6px 0 0; }
@media (max-width: 820px) { .chat { grid-template-columns: 1fr; } .chat-list { position: static; max-height: 220px; } .msg { max-width: 92%; } }

/* ---------- Menu groups ---------- */
.group-tabs .tabs .count { background: var(--green); color: #fff; border-radius: 10px; font-size: .72rem; font-weight: 700; padding: 1px 7px; margin-left: 4px; }
.group-tabs .tabs a.on .count { background: #fff; color: var(--teal); }

.hub-icon { width: 56px; height: 56px; border-radius: var(--radius-s); background: var(--teal-wash); border: 1px solid #BFD3DC; display: grid; place-items: center; flex: none; }
.hub-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.chat-start { margin-top: 10px; padding: 10px; background: #fff; border: 1px dashed #BFD3DC; border-radius: var(--radius-s); }
.chat-start select { width: 100%; margin-top: 4px; }

/* ---------- Shift reports ---------- */
.report-rule { margin: 0 0 16px; }
.count-pill { background: var(--amber, #B7791F); color: #fff; border-radius: 10px; font-size: .75rem; padding: 1px 8px; vertical-align: middle; }
.fu-list { list-style: none; padding: 0; margin: 0; }
.fu-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.fu-list li:first-child { border-top: 0; }
.report { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; margin-bottom: 10px; background: #fff; }
.report.flag { border-left: 4px solid var(--red); }
.report header { margin-bottom: 4px; }
.report p { margin: 4px 0; }
.report footer { margin-top: 6px; }
.fu-mini { margin: 6px 0 0; padding-left: 18px; }
.fu-mini li.done { color: var(--muted); text-decoration: line-through; }
.fu-mini li.done .small, .fu-mini li.done form { text-decoration: none; display: inline; }
.fu-table { width: 100%; border-collapse: collapse; }
.fu-table td { padding: 4px 6px 4px 0; }
.fu-table input { width: 100%; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin-top: 8px; }

/* ---------- Inspections ---------- */
.insp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.insp-grid > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.insp-grid strong { font-size: 1.05rem; }
.mock-tb textarea, .mock-tb input, .mock-tb select { width: 100%; }
.mock-tb tr.open td { background: #FFF6E5; }
.mock-tb tr.res td { background: #EEF6E8; }
@media print { .mock-sheet button, .mock-sheet .actions, .rm-f { display: none !important; } }

/* ---------- Email templates ---------- */
.email-bar { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.email-menu { position: relative; }
.email-menu summary { list-style: none; cursor: pointer; }
.email-menu summary::-webkit-details-marker { display: none; }
.email-menu summary::before { content: "✉ "; }
.email-menu ul { position: absolute; right: 0; z-index: 20; min-width: 300px; margin: 6px 0 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.email-menu li a { display: block; padding: 7px 10px; border-radius: 4px; text-decoration: none; color: var(--ink); }
.email-menu li a:hover { background: var(--teal-wash); }
.email-menu li.sent { padding: 6px 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.tpl-list { list-style: none; padding: 0; margin: 0; }
.tpl-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tpl-list li:first-child { border-top: 0; }
.ok-text { color: var(--green-deep); }

/* ---------- Tablet inspections ---------- */
.insp-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.insp-progress { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; }
.insp-progress .bar { flex: 1; height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; }
.insp-progress .bar span { display: block; height: 100%; background: var(--green); width: 0; transition: width .3s; }
.insp-tools { position: sticky; top: 0; z-index: 15; display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 10px 0; background: var(--paper); }
.insp-tools select { min-width: 280px; font-size: 1rem; padding: 10px; }
.ir { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; margin: 10px 0; background: #fff; display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; }
.ir.s-yes { border-left: 5px solid var(--green); }
.ir.s-no { border-left: 5px solid var(--red); background: #FFF8F7; }
.ir.s-na { border-left: 5px solid #A9B4BA; }
.ir-q { display: flex; flex-direction: column; gap: 4px; }
.ir-t { font-size: 1.02rem; }
.ir-r { font-size: .8rem; color: var(--muted); }
.ir-b { display: flex; gap: 6px; align-self: start; }
.ir-b button { min-width: 64px; min-height: 48px; font: inherit; font-weight: 600; border: 2px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; }
.ir-b button[data-v="yes"].on { background: var(--green); border-color: var(--green); color: #fff; }
.ir-b button[data-v="no"].on { background: var(--red); border-color: var(--red); color: #fff; }
.ir-b button[data-v="na"].on { background: #7A8890; border-color: #7A8890; color: #fff; }
.ir-x { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.ir-x textarea, .ir-x input { width: 100%; font-size: 1rem; }
.ir-x img { max-height: 90px; border-radius: 6px; border: 1px solid var(--line); }
.ir-add { display: block; }
.ir-inst { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.ir-inst button { min-height: 44px; padding: 0 14px; border: 2px solid var(--line); background: #fff; border-radius: 22px; font: inherit; cursor: pointer; }
.ir-inst button.on { border-color: var(--teal); background: var(--teal); color: #fff; }
.ir-nav { justify-content: space-between; margin-top: 16px; }
@media (max-width: 700px) { .ir { grid-template-columns: 1fr; } .ir-b button { flex: 1; } }
/* Report */
.ireport { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px 34px; max-width: 1000px; }
.ir-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--green); padding-bottom: 10px; }
.ir-brand { font: 700 2rem/1 var(--serif); color: var(--teal); letter-spacing: .04em; }
.ir-sub { color: var(--teal); font-size: .9rem; }
.ir-contact { text-align: right; color: var(--muted); }
.ireport h1 { color: var(--teal); text-align: center; margin: 18px 0 12px; font-size: 1.5rem; }
.ir-meta { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.ir-meta th, .ir-meta td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; font-size: .9rem; }
.ir-meta th { background: var(--teal-wash); width: 14%; }
.ir-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.ir-stats div { border: 1px solid var(--line); border-radius: 8px; padding: 10px; text-align: center; }
.ir-stats b { display: block; font-size: 1.6rem; color: var(--teal); }
.ir-stats .f b { color: var(--red); }
.ir-find { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: .9rem; }
.ir-find th, .ir-find td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.ir-find th { background: #F4F7F8; text-align: left; }
.ir-ph { display: block; max-width: 220px; max-height: 160px; margin-top: 6px; border-radius: 4px; }
.ir-pass { columns: 2; font-size: .85rem; }
.ir-disc { font-size: .78rem; color: var(--muted); margin-top: 18px; }
.ir-sign { margin-top: 26px; font-size: .9rem; }
@media print { .ireport { border: 0; padding: 0; max-width: none; } .ir-find tr, .ir-ph { break-inside: avoid; } }
@media print { body:has(.ireport) .topbar, body:has(.ireport) .group-tabs, body:has(.ireport) .flash { display: none !important; } body:has(.ireport) .content { padding: 0; max-width: none; } }

/* ---------- Flyers ---------- */
.mkt-card { display: flex; flex-direction: column; gap: 12px; }
.flyer-bar { position: sticky; top: 0; z-index: 10; background: var(--paper); padding: 8px 0; }
.flyer-frame { display: block; width: 100%; max-width: 900px; min-height: 900px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; }

/* ---------- Online forms (office view) ---------- */
.link-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-box input { flex: 1; min-width: 280px; font-family: monospace; font-size: .85rem; }
.of-agr { font-size: .92rem; line-height: 1.5; } .of-agr h3 { font-size: 1rem; margin: 14px 0 4px; } .of-val { background: var(--teal-wash); padding: 0 4px; border-radius: 3px; } .of-blank { color: var(--muted); }
.of-ans { display: grid; grid-template-columns: 34% 1fr; gap: 4px 12px; margin: 0 0 8px; font-size: .9rem; } .of-ans dt { color: var(--muted); } .of-ans dd { margin: 0; }
.of-grid { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: .88rem; } .of-grid th, .of-grid td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: center; } .of-grid tbody th { text-align: left; font-weight: 500; }
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .sig-img { max-height: 80px; margin: 6px 0; }
.sig-pad { width: 100%; height: 150px; border: 2px dashed #8EA4AD; border-radius: 8px; background: #FCFDFD; touch-action: none; display: block; }
@media print { .no-print-inputs input { border: 0; } }

/* ---------- Bulletin board ---------- */
.bb-trash-alert { background: #FFF4D6; border: 1px solid #E8C25A; border-left: 6px solid #D9A400; border-radius: var(--radius-s); padding: 12px 14px; margin-bottom: 12px; font-weight: 600; }
.bb-duties { display: grid; gap: 10px; }
.bb-duty { border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; }
.bb-duty summary { cursor: pointer; padding: 14px 16px; display: flex; gap: 12px; align-items: center; list-style: none; }
.bb-duty summary::-webkit-details-marker { display: none; }
.bb-badge { font: 800 1rem/1 Arial, sans-serif; letter-spacing: .14em; color: #fff; padding: 8px 14px; border-radius: 8px; min-width: 96px; text-align: center; }
.bb-floor .bb-badge { background: #15607E; } .bb-kitchen .bb-badge { background: #2E8B40; } .bb-night .bb-badge { background: #2C2F5B; }
.bb-floor { border-left: 6px solid #15607E; } .bb-kitchen { border-left: 6px solid #2E8B40; } .bb-night { border-left: 6px solid #2C2F5B; }
.bb-duty-body { padding: 0 18px 16px; }
.bb-duty-body h4 { margin: 14px 0 4px; color: var(--teal); text-transform: uppercase; font-size: .82rem; letter-spacing: .06em; }
.bb-duty-body ul { margin: 0; padding-left: 0; list-style: none; }
.bb-duty-body li { padding: 4px 0 4px 26px; position: relative; } .bb-duty-body li::before { content: "☐"; position: absolute; left: 2px; color: var(--muted); }
.bb-gen li::before { content: "•"; }
.bb-team { font-weight: 800; letter-spacing: .08em; color: var(--teal); }
.bb-edit textarea { width: 100%; font-family: inherit; }
.bb-post { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.bb-post.pinned { border-left: 5px solid var(--green); } .bb-post.unread { box-shadow: 0 0 0 2px #E8C25A inset; }
.bb-post p { margin: 6px 0; } .bb-img { max-width: 100%; max-height: 420px; border-radius: 6px; border: 1px solid var(--line); margin: 6px 0; }
.check-inline { display: inline-flex; gap: 4px; align-items: center; margin-right: 10px; font-weight: 400; }
@media print { body.bb-printing .shell > *:not(.main), body.bb-printing .topbar, body.bb-printing .home-tabs, body.bb-printing .panel:not(#duties), body.bb-printing .bb-trash-alert, body.bb-printing .flash { display: none !important; }
  body.bb-printing .bb-duty:not(.bb-print-me) { display: none !important; } body.bb-printing #duties .panel-head { display: none; } }

.de-sec { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px 10px; margin: 12px 0; }
.de-sec legend input { font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .04em; }
.de-item { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.de-item input { flex: 1; }
.de-item button { border: 1px solid var(--line); background: #fff; border-radius: 6px; min-width: 34px; min-height: 34px; cursor: pointer; }
.de-item .de-del { color: var(--red); } .de-h { color: var(--muted); cursor: default; }
.de-sec-act { display: flex; gap: 12px; align-items: center; margin-top: 6px; }

/* ---------- Calendar and to-dos ---------- */
.cal-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-nav { display: flex; align-items: center; gap: 8px; } .cal-nav h2 { margin: 0 8px; min-width: 190px; text-align: center; }
.cal-layers { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-layer { padding: 5px 10px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--muted); background: #fff; }
.cal-layer.on { color: var(--ink); border-color: var(--teal); background: var(--teal-wash); }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.cal-dow { background: #F4F7F8; font-size: .78rem; font-weight: 700; padding: 6px; text-align: center; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); overflow: hidden; }
.cal-day:nth-child(7n+7) { border-right: 0; } .cal-day.out { background: #FAFBFB; color: #A5B1B7; } .cal-day:hover { background: #F2F8FA; }
.cal-day.sel { box-shadow: inset 0 0 0 2px var(--teal); } .cal-day.today .cal-n { background: var(--teal); color: #fff; border-radius: 50%; }
.cal-n { font-size: .8rem; font-weight: 700; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cal-chip { font-size: .72rem; line-height: 1.25; padding: 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--c, #15607E); color: #fff; }
.cal-chip.ct-todo { background: #FFF4D6; color: #6B4E00; } .cal-chip.ct-birthday { background: #FDE8F0; color: #8A1C4A; } .cal-chip.ct-inspection { background: #FDECEA; color: #9B1C1C; }
.cal-more { font-size: .7rem; color: var(--muted); }
.cal-item { border-left: 4px solid var(--c, #15607E); padding: 6px 10px; margin: 8px 0; background: #fff; }
.cal-item.ct-todo { border-color: #D9A400; } .cal-item.ct-birthday { border-color: #D6336C; } .cal-item.ct-inspection { border-color: var(--red); }
@media (max-width: 1000px) { .cal-wrap { grid-template-columns: 1fr; } .cal-day { min-height: 70px; } .cal-chip { font-size: .65rem; } }
.todo { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); } .todo:first-of-type { border-top: 0; }
.todo-check button { width: 28px; height: 28px; border: 2px solid var(--teal); border-radius: 6px; background: #fff; cursor: pointer; font-weight: 800; color: var(--green-deep); }
.todo.high .todo-check button { border-color: var(--red); } .todo.done strong { text-decoration: line-through; color: var(--muted); }
.todo-body { flex: 1; } .todo-body p { margin: 4px 0; } .todo-c { background: #F4F7F8; padding: 4px 8px; border-radius: 4px; }
.todo-cf { display: flex; gap: 6px; margin: 6px 0; } .todo-cf input { flex: 1; }
.bb-bday-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.bb-bday-list li { border: 1px solid #F3C4D6; background: #FFF7FA; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.bb-bday-list li.today { border-color: #D6336C; background: #FDE8F0; font-weight: 600; }

/* This week and My to-dos stay side by side until phone width */
.dash-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-pair .panel { margin: 0; }
@media (max-width: 560px) { .dash-pair { grid-template-columns: 1fr; } }

/* ---------- Grocery list ---------- */
.gr-due { background: #EAF4EF; border: 1px solid #A9D18E; border-radius: var(--radius-s); padding: 12px 14px; margin-bottom: 12px; } .gr-due.soon { background: #FFF4D6; border-color: #E8C25A; }
.gr-bar { position: sticky; top: 0; z-index: 12; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--paper); padding: 10px 0; }
.gr-bar input[type=search] { flex: 1; min-width: 200px; font-size: 1rem; padding: 10px; }
.gr-cat h2 { font-size: 1.1rem; } .gr-cat h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--teal); margin: 12px 0 4px; }
.gr-cc { color: var(--green-deep); font-weight: 600; }
.gr-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.gr-it { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px 2px 2px; background: #fff; }
.gr-it.on { border-color: var(--green); background: #EEF6E8; }
.gr-pick { flex: 1; display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: none; font: inherit; padding: 9px 6px; cursor: pointer; min-height: 40px; }
.gr-box { width: 20px; height: 20px; border: 2px solid #8EA4AD; border-radius: 5px; flex: none; } .gr-it.on .gr-box { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 3px #fff; }
.gr-q { width: 54px; text-align: center; font-size: 1rem; padding: 6px; }
.gr-x { display: flex; gap: 6px; margin: 6px 0; } .gr-x .gr-xn { flex: 1; } .gr-x .gr-xq { width: 70px; }
.gr-it[hidden], .gr-cat[hidden], .gr-cat h3[hidden] { display: none !important; }
.gr-it .gr-q { width: 58px; flex: none; }

.gr-keep { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 400; }
.gr-new { font-size: .68rem; font-weight: 700; background: var(--green); color: #fff; border-radius: 8px; padding: 1px 6px; margin-left: 4px; }

/* Home profile: dollar amounts and contracted services */
.money-in { display: flex; align-items: center; border: 1px solid var(--line-strong, #B9C7CD); border-radius: var(--radius-s); background: #fff; }
.money-in span { padding: 0 8px; color: var(--muted); font-weight: 600; } .money-in input { border: 0 !important; flex: 1; }
.contract-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 10px; } .contract-add label { min-width: 320px; }
#contracts select { width: 100%; }

/* ---------- Income and expenses ---------- */
.money-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.money-tabs { display: flex; flex-wrap: wrap; gap: 6px; } .money-tabs a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--teal); background: #fff; font-weight: 600; font-size: .9rem; }
.money-tabs a.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-strip div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; } .stat-strip b { display: block; font: 700 1.4rem var(--serif); color: var(--teal); } .stat-strip span { color: var(--muted); font-size: .85rem; }
td.num, th.num { text-align: right; white-space: nowrap; }
.inc-t td { vertical-align: top; } .inc-t tr.ir-overdue td:first-child { border-left: 4px solid var(--red); } .inc-t tr.ir-paid td:first-child { border-left: 4px solid var(--green); }
.inc-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: end; } .inc-form label { font-size: .8rem; } .inc-form .money-in { width: 120px; } .inc-form select, .inc-form input[type=date] { font-size: .9rem; }
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 18px; }
.exp-line { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); } .exp-line.ro { background: #F4F7F8; padding: 6px; }
.inc-form label { display: flex; flex-direction: column; gap: 2px; margin: 0; font-weight: 600; }
.inc-form input[type=date] { width: 145px; } .inc-form select { width: 150px; } .inc-form label > input[type=text] { width: 85px; }
.inc-form .money-in { width: 110px; } .inc-form .money-in input { width: 100%; }

.ded { display: flex; gap: 6px; align-items: center; } .ded input[type=text]:not([inputmode]) { width: 150px; }

/* ---------- Maintenance ---------- */
.mt-req { border-left: 5px solid #8EA4AD; } .mt-req.u-soon { border-left-color: #D9A400; } .mt-req.u-urgent { border-left-color: #E07B00; } .mt-req.u-safety { border-left-color: var(--red); } .mt-req.done { opacity: .8; border-left-color: var(--green); }
.mt-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; } .mt-title { font-size: 1.05rem; }
.mt-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .mt-u { font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 10px; background: #EEF2F4; }
.u-urgent .mt-u, .u-safety .mt-u { background: #FDECEA; color: #9B1C1C; }
.mt-ph { max-width: 260px; max-height: 200px; border-radius: 6px; border: 1px solid var(--line); margin: 6px 0; }
.mt-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; } .mt-act .todo-cf { flex: 1; min-width: 280px; margin: 0; }
.gr-lists { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; } .gr-lists a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; background: #fff; color: var(--teal); font-weight: 600; } .gr-lists a.on { background: var(--teal); color: #fff; }

.cal-who select { font-size: .9rem; padding: 4px 6px; }

/* Whose item it is: Office green, Maintenance gold */
.owner-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 9px; margin-left: 4px; vertical-align: 1px; }
.ot-office { background: #2E8B40; color: #fff; } .ot-maint { background: #D9A400; color: #3A2C00; } .ot-other { background: #E3E9EC; color: #33454E; }
.cal-chip .owner-tag { font-size: .62rem; padding: 0 5px; }

.fu-row { padding: 8px 0; border-top: 1px solid var(--line); } .fu-row:first-of-type { border-top: 0; } .fu-row.done { color: var(--muted); }

.gr-review { max-width: 640px; width: 92vw; border: 0; border-radius: 12px; padding: 20px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.gr-review::backdrop { background: rgba(13,59,79,.45); }
.gr-review h4 { margin: 12px 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--teal); }
.gr-review ul { list-style: none; padding: 0; margin: 0; } .gr-review li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.gr-rv-body { max-height: 55vh; overflow: auto; }

.ir.was-cited { box-shadow: inset 0 0 0 2px #E8A33D; } .ir-cited { font-size: .8rem; font-weight: 700; color: #9A5B00; background: #FFF1D6; border-radius: 6px; padding: 3px 8px; align-self: flex-start; }

.cit { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; margin: 10px 0; } .cited-box { border-left: 5px solid #E8A33D; }

.bb-care.unread { box-shadow: 0 0 0 2px #E8C25A inset; }
.care-blk { margin: 10px 0; } .care-blk h4 { margin: 0 0 4px; color: var(--teal); }
.care-t { width: 100%; border-collapse: collapse; } .care-t th, .care-t td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; } .care-t input { width: 100%; }
.care-ed { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; margin: 10px 0; }
@media print { body.care-printing .shell > *:not(.main), body.care-printing .topbar, body.care-printing .home-tabs, body.care-printing .panel:not(#care), body.care-printing .bb-trash-alert, body.care-printing .flash, body.care-printing .no-print { display: none !important; } }

.rv-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; } .rv-row:first-of-type { border-top: 0; }
.rv-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .rv-f input[type=text] { width: 140px; } .rv-row.st-done strong { color: var(--green-deep); } .rv-row.st-na { opacity: .6; }
@media (max-width: 900px) { .rv-row { grid-template-columns: 1fr; } }

.guide .g-dl dt { font-weight: 700; color: var(--teal); margin-top: 12px; } .guide .g-dl dd { margin: 4px 0 0; } .guide ul { margin: 6px 0; padding-left: 20px; } .guide li { margin: 3px 0; }
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } @media (max-width: 800px) { .g-two { grid-template-columns: 1fr; } }
