/* =====================================================================
   personal.css — staff self-service pages (SLA design language)
     personal.html                          .me.me-home
     add_punch / edit_punch / delete_punch  .me.me-formpage
     not_registered / auth_not_configured   .me.msg-page (card styles in style.css)
     teams_tab.html (standalone page)       .me.me-teams
     signin.html (sign-in pages)            .me.msg-page.ph-page   (+ .me-a2hs tip on /me)
   Every selector is scoped under .me (a wrapper only these templates
   render), and this file is only linked from them. Tokens, .card, .kpi,
   .chip, .tile, .field, .save-bar etc. come from static/style.css.
   ===================================================================== */

/* ---------- shared ---------- */
.me { min-width: 0; }
.me .page-head { margin-bottom: 20px; }
.me .lede { text-wrap: pretty; }
.me .lede strong { color: var(--ink); font-weight: 700; }

.me .me-micro {
  font-weight: 700; font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); line-height: 1.4;
}

/* back link inside the eyebrow (SLA: "← BIBLICAL EXEGESIS") */
.me .me-back { position: relative; color: inherit; transition: color 0.15s; }
.me .me-back:hover { color: var(--pop); }
.me .me-back::after { content: ""; position: absolute; inset: -18px -14px; }   /* 48px hit area, same layout */

/* IN / OUT direction pill */
.me .me-dir {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; flex-shrink: 0; padding: 3px 0; border-radius: var(--r-pill);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; line-height: 1.5;
  background: var(--bg-2); color: var(--ink-2);
}
.me .me-dir-in  { background: var(--green-bg); color: var(--green); }
.me .me-dir-out { background: var(--bg-2);     color: var(--ink-2); }


/* =====================================================================
   /me — personal dashboard
   ===================================================================== */

/* ---------- clock cards + week total ---------- */
.me .me-top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px; align-items: stretch; margin-bottom: 14px;
}
.me .me-clocks { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.me .me-clock {
  flex: 1; margin: 0; min-width: 0;
  display: flex; align-items: center; gap: 14px 20px;
  background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r-hero);
  padding: 20px 20px 20px 26px;
}
.me .me-clock-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
}
.me .me-clock-name {
  display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%;
  font-family: var(--font-display); font-variation-settings: "opsz" 96;
  font-weight: 800; font-size: 1.55rem; letter-spacing: -0.04em; line-height: 1.1;
  color: var(--ink);
}
.me .me-clock-name > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.me .me-clock-name .dot { margin-left: 2px; }

/* the big punch button: coral to clock in, ink to clock out (colours from style.css) */
.me .me-clock-btn {
  min-height: 54px; min-width: 156px; padding: 14px 28px;
  font-size: 1.08rem; letter-spacing: -0.02em; flex-shrink: 0;
}
/* clocked in somewhere: the other departments' Clock IN steps back so Clock OUT reads as the action */
.me .me-clocks:has(.is-in) .me-clock:not(.is-in) .me-clock-btn {
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--edge);
}
.me .me-clocks:has(.is-in) .me-clock:not(.is-in) .me-clock-btn:hover { background: var(--bg); }

.me .me-clock-none .me-clock-name { font-size: 1.25rem; }

/* week total (SLA filled KPI): label top, number + sub pinned to the bottom */
.me .me-total {
  margin: 0; border-radius: var(--r-hero); padding: 22px 26px 20px;
  display: flex; flex-direction: column;
}
.me .me-total .lbl { margin-bottom: 18px; }
.me .me-total .n { margin-top: auto; font-size: 3rem; white-space: nowrap; }
.me .me-total .sub { margin-top: 10px; }
.me .me-totals { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.me .me-totals .me-total { flex: 1; }
.me .me-period .lbl { margin-bottom: 10px; }
.me .me-period .n { font-size: 2.2rem; }
/* 2+ departments: don't stretch the tiles down the whole stack of clock cards */
.me .me-top:has(.me-clock + .me-clock) .me-totals { align-self: start; }
.me .me-top:has(.me-clock + .me-clock) .me-total .n { margin-top: 0; }

/* ---------- timesheet card ---------- */
.me .me-week { padding-bottom: 14px; }
.me .me-week .card-head { margin-bottom: 8px; }

/* segmented week nav (SLA pill nav: black active pill) */
.me .me-weeknav {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--bg); border-radius: var(--r-pill);
}
.me .me-weeknav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-pill);
  color: var(--ink-2); font-weight: 600; font-size: 0.86rem; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.me .me-weeknav-btn:hover { background: var(--card); color: var(--ink); }
.me .me-weeknav-btn.active { background: var(--ink); color: var(--card); }
.me .me-weeknav-btn.active:hover { background: var(--ink); color: var(--card); }

/* one row per day: day | punches | hours */
.me .me-days { display: flex; flex-direction: column; }
.me .me-day {
  display: grid; grid-template-columns: 116px minmax(0, 1fr) 120px;
  grid-template-areas: "label punches hours";
  gap: 0 18px; align-items: start;
  padding: 12px 12px; margin: 0 -12px;
  border-top: 1.5px solid var(--edge);
}
.me .me-day.is-today {
  background: var(--bg); border-radius: var(--r-lg); border-top-color: transparent;
}
.me .me-day.is-today + .me-day { border-top-color: transparent; }

.me .me-day-label {
  grid-area: label; padding-top: 7px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px;
}
.me .me-day-name {
  font-family: var(--font-display); font-variation-settings: "opsz" 96;
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.035em; line-height: 1.1;
  color: var(--ink);
}
.me .me-day-date { color: var(--muted); font-size: 0.82rem; font-weight: 500; order: 3; flex-basis: 100%; }
.me .me-today { display: none; order: 2; padding: 2px 8px; font-size: 0.66rem; }
.me .me-day.is-today .me-today { display: inline-block; }
.me .me-day.is-future .me-day-name { color: #A6A1AC; }

.me .me-day-hours { grid-area: hours; padding-top: 6px; text-align: right; }
.me .me-hours {
  font-family: var(--font-display); font-variation-settings: "opsz" 96;
  font-weight: 800; font-size: 1.4rem; letter-spacing: -0.04em; line-height: 1.1;
  color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.me .me-hours.none { color: #C4BEB3; font-weight: 700; }

.me .me-day-punches { grid-area: punches; min-width: 0; display: flex; flex-direction: column; }
.me .me-punch {
  display: flex; align-items: center; gap: 14px; min-height: 40px; min-width: 0;
}
.me .me-p-time {
  min-width: 76px; color: var(--ink);
  font-family: var(--font-display); font-variation-settings: "opsz" 48;
  font-weight: 700; font-size: 1.04rem; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.me .me-p-dept {
  flex: 1; min-width: 0; color: var(--muted); font-size: 0.88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.me .me-p-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-shrink: 0; }

.me .me-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--ink-2); background: transparent;
  transition: background 0.15s, color 0.15s;
}
.me .me-icon:hover { background: var(--bg-2); color: var(--ink); }
.me .me-day.is-today .me-icon:hover { background: var(--card); }
.me .me-icon-danger:hover,
.me .me-day.is-today .me-icon-danger:hover { background: var(--red-bg); color: var(--red); }

.me .me-punch-empty { color: var(--muted); font-size: 0.9rem; min-height: 40px; display: flex; align-items: center; }

.me .me-day-add { margin-top: 2px; }
.me .me-add {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px;
  color: var(--muted); font-weight: 600; font-size: 0.84rem; border-radius: 6px;
  transition: color 0.15s;
}
.me .me-add > span { color: var(--pop); font-weight: 800; font-size: 1rem; line-height: 1; }
.me .me-add:hover { color: var(--pop); }
.me .me-day.is-future .me-day-add { display: none; }   /* nothing is "missing" from a day still to come */
/* mouse users: show it on today's row, and on other rows only on hover / keyboard focus */
@media (hover: hover) and (pointer: fine) {
  .me .me-add { transition: color 0.15s, opacity 0.15s; }
  .me .me-day:not(.is-today):not(:hover):not(:focus-within) .me-add { opacity: 0; }
}

/* a day with no punches is one line: "No punches   + Add missing punch" */
.me .me-day.is-empty .me-day-punches { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0 18px; }
.me .me-day.is-empty .me-day-add { margin-top: 0; }

/* why a punch was changed (templates/_punch_note.html): tucked under that punch */
.me .me-why { margin: -4px 0 8px; }

/* ---------- pending changes ---------- */
.me .me-pending { margin-top: 14px; padding-bottom: 12px; }
.me .me-pending .card-head { margin-bottom: 6px; }
/* fixes switched off in Settings: these are still HR's to decide */
.me .me-pending-off { margin: 0 0 6px; max-width: 640px; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.me .me-cr-list { display: flex; flex-direction: column; }
.me .me-cr {
  display: grid; grid-template-columns: 82px minmax(0, 1fr) auto;
  grid-template-areas: "type main cancel";
  gap: 8px 18px; align-items: start;
  padding: 14px 0; border-top: 1.5px solid var(--edge);
}
.me .me-cr-type { grid-area: type; justify-self: start; margin-top: 2px; }
.me .me-cr-main { grid-area: main; min-width: 0; }
.me .me-cr-title {
  font-family: var(--font-display); font-variation-settings: "opsz" 48;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; line-height: 1.25;
  color: var(--ink);
}
.me .me-cr-meta { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.me .me-cr-note {
  display: inline-block; max-width: 100%; margin-top: 8px; padding: 6px 12px;
  border-radius: var(--r-sm); background: var(--bg); color: var(--ink-2);
  font-size: 0.86rem; line-height: 1.45; overflow-wrap: anywhere;
}
.me .me-cr-cancel { grid-area: cancel; margin: 0; }
.me .me-cr-cancel .chip:hover { color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }

/* ---------- accounts that don't clock in ---------- */
.me .me-jump {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
}
.me .me-jump-tile {
  min-height: 250px; padding: 22px 24px 20px; border-radius: var(--r-hero); gap: 12px;
}
.me .me-jump-chip {
  display: block; padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--bg-2); color: var(--ink);
  font-weight: 700; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.5;
}
.me .me-jump-tile .tile-title {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.035em; font-variation-settings: "opsz" 96;
}
.me .me-jump-tile p { font-size: 0.92rem; line-height: 1.55; }
.me .me-jump-tile .tile-footer { align-items: center; justify-content: flex-end; padding-top: 14px; }
.me .me-go {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--pop); color: var(--card);
  font-family: var(--font-display); font-variation-settings: "opsz" 48;
  font-weight: 800; font-size: 0.92rem; letter-spacing: -0.02em; white-space: nowrap;
  transition: background 0.15s;
}
.me a.me-jump-tile:hover .me-go { background: var(--pop-hover); }
.me .me-noclock { margin-top: 0; }


/* =====================================================================
   Correction forms (add / edit / delete punch)
   ===================================================================== */
/* one column: on edit/delete the punch summary sits above the form (read it, then change it) */
.me .me-formgrid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 14px; align-items: start; max-width: 760px;
}
.me .me-form { min-width: 0; margin: 0; }
.me .me-current { margin: 0; }

.me .me-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.me .me-span { grid-column: 1 / -1; }
.me .me-form .input { width: 100%; }
.me .me-form textarea.input { min-height: 96px; resize: none; }
.me .me-opt { text-transform: none; letter-spacing: normal; font-weight: 500; }

/* the explanation: help text left, "12 / 20" counter right, error underneath */
.me .me-note-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-top: 7px; }
.me .me-note-foot .field-help { margin: 0; }
.me .me-note-err { margin: 8px 0 0; color: var(--red); font-size: 0.86rem; font-weight: 600; line-height: 1.45; }
.me .me-form textarea.input[aria-invalid="true"] { border-color: var(--red); }

/* Direction: two big segmented options (real radios underneath) */
.me .me-seg-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.me .me-seg-field > legend { padding: 0; margin-bottom: 8px; }
.me .me-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me .me-seg-opt { position: relative; display: block; cursor: pointer; }
.me .me-seg-opt > input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer;
}
.me .me-seg-opt > span {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 16px;
  background: var(--bg); border: 1.5px solid var(--edge); border-radius: var(--r-md);
  font-family: var(--font-display); font-variation-settings: "opsz" 48;
  font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em; color: var(--ink-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.me .me-seg-opt:hover > span { border-color: #CFC8B8; color: var(--ink); }
.me .me-seg-opt > input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--card); }
.me .me-seg-opt > input:checked + span .dot-out { background: rgba(255,255,255,0.55); }
.me .me-seg-opt > input:checked + span .dot-in { background: #3FD08A; box-shadow: none; }
.me .me-seg-opt > input:focus-visible + span { outline: 3px solid rgba(232,90,60,0.55); outline-offset: 2px; }

/* save bar: Cancel chip + coral save (sizes from style.css) */
.me .me-save { margin-top: 14px; }
.me .save-btn.me-danger { background: var(--red); }
.me .save-btn.me-danger:hover { background: var(--red-hover); }

/* the punch being changed (edit / delete) */
.me .me-current { padding: 22px 24px; }
.me .me-current-when {
  margin-top: 10px;
  font-family: var(--font-display); font-variation-settings: "opsz" 96;
  font-weight: 800; font-size: 1.6rem; letter-spacing: -0.04em; line-height: 1.1;
  color: var(--ink);
}
.me .me-current-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; color: var(--muted); font-size: 0.9rem;
}
.me .me-current.is-delete { border-color: #EBC7BC; }
.me .me-current.is-delete .me-micro { color: var(--red); }


/* =====================================================================
   Teams tab (message pages use the shared .msg-page / .msg-card in style.css)
   ===================================================================== */
/* standalone page, card centred in the tab */
body.me-teams-body { margin: 0; }
.me.me-teams {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.me .me-teams-card { max-width: 480px; text-align: center; padding: 34px 32px 36px; }
.me .me-teams-brand { display: inline-flex; align-items: center; gap: 10px; text-align: left; margin-bottom: 28px; }
.me .me-teams-status .spinner { margin: 0 0 14px; width: 36px; height: 36px; }
.me .me-teams-card h1 { font-size: 2rem; }
.me .me-teams-card .lede { margin: 10px auto 0; }
.me .me-teams-card .msg-actions { justify-content: center; }
.me .me-teams-err {
  margin: 18px 0 0; padding: 0; background: transparent;
  color: var(--muted); font-size: 0.78rem; overflow-wrap: anywhere;
}
.me .me-teams-err:empty { display: none; }


/* =====================================================================
   Sign-in pages (signin.html, signin.py) — built for a 360–390px phone first
   ===================================================================== */
.me.ph-page .ph-main { max-width: 560px; }
.me .ph-main h1 { text-wrap: balance; }
.me .ph-form { margin: 26px 0 0; }
.me .ph-go { width: 100%; min-height: 60px; font-size: 1.2rem; }
.me .ph-go:disabled { opacity: 0.8; }
.me .ph-warn { margin-top: 18px; background: var(--amber-bg); color: #6B3F12; }
.me .ph-warn strong { color: #6B3F12; }
.me .ph-tip { margin-top: 18px; background: var(--blue-bg); color: #1E4475; }
.me .ph-tip strong { color: #1E4475; }
.me .ph-points {
  list-style: none; margin: 24px 0 0; padding: 18px 0 0; border-top: 1.5px dashed var(--edge);
  display: flex; flex-direction: column; gap: 10px;
  color: var(--ink-2); font-size: 0.92rem; line-height: 1.45;
}
.me .ph-points li { display: flex; align-items: baseline; gap: 12px; }
.me .ph-bullet { width: 7px; height: 7px; border-radius: 50%; background: var(--pop); flex-shrink: 0; transform: translateY(-1px); }
.me .ph-small { margin: 16px 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.me .ph-host { overflow-wrap: anywhere; }   /* the Funnel name is long: let it break on a 360px phone */
.me .ph-or {
  margin-top: 24px; padding-top: 18px; border-top: 1.5px dashed var(--edge);
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 0.9rem; font-weight: 600;
}
/* sign out on a phone: "Stay signed in" is the big, safe choice */
.me .ph-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me .ph-actions .ph-go { min-height: 56px; font-size: 1.08rem; }
.me .ph-form-inline { margin: 0; display: flex; }
.me .ph-signout { width: 100%; min-height: 56px; font-size: 1.08rem; }
.me .ph-signout:hover { background: var(--red); box-shadow: inset 0 0 0 2px var(--red); color: var(--card); }

/* sign in: Microsoft on top, "No CBT email?" divider, then email + password */
.me .si-split {
  margin: 26px 0 18px; display: flex; align-items: center; gap: 14px;
  color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.me .si-split::before, .me .si-split::after { content: ""; flex: 1; border-top: 1.5px dashed var(--edge); }
.me .si-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.me .ph-setup .si-form { margin-top: 22px; }   /* set-up page: room between the intro and the form */
.me .si-form .field { margin: 0; }
.me .si-form .input { font-size: 1.05rem; min-height: 52px; }   /* >= 16px: iOS doesn't zoom into the box */
.me .si-readonly { background: var(--bg-2); color: var(--ink-2); }
.me .si-pw { position: relative; display: block; }
.me .si-pw .input { padding-right: 78px; }
.me .si-show {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
  background: var(--bg); color: var(--ink-2); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
}
.me .si-show:hover { background: var(--bg-2); color: var(--ink); }
.me .si-error { margin: 0 0 14px; }
.me .si-submit { margin-top: 4px; }
.me .si-form .ph-small { margin: 2px 0 0; }

/* /me after an email + password sign-in: "add this page to your home screen" */
.me .me-a2hs {
  margin: 0 0 14px; padding: 18px 20px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 16px; align-items: start;
  background: var(--card);
}
.me .me-a2hs[hidden] { display: none; }
.me .me-a2hs-icon { width: 48px; height: 48px; border-radius: 12px; display: block; }
.me .me-a2hs h2 { font-size: 1.12rem; letter-spacing: -0.025em; line-height: 1.2; }
.me .me-a2hs-lede { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.me .me-a2hs-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--ink-2); line-height: 1.45; }
.me .me-a2hs-steps li[hidden] { display: none; }
.me .me-a2hs-steps strong { color: var(--ink); }
.me .me-a2hs-glyph { vertical-align: -3px; color: var(--blue); }
.me .me-a2hs-done { align-self: start; }


/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 900px) {
  .me .me-top { grid-template-columns: minmax(0, 1fr); }
  /* week total becomes a slim bar: label + sub left, number right */
  .me .me-total {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "lbl n" "sub n"; align-items: center; column-gap: 16px;
    padding: 16px 22px;
  }
  .me .me-total .lbl { grid-area: lbl; margin: 0 0 4px; }
  .me .me-total .n { grid-area: n; margin: 0; font-size: 2.4rem; }
  .me .me-total .sub { grid-area: sub; margin: 0; }
}

@media (max-width: 720px) {
  .me .page-head { margin-bottom: 16px; }

  /* clock card: name + status on top, full-width punch button underneath */
  .me .me-clock { flex-wrap: wrap; padding: 18px 16px 16px; border-radius: var(--r-xl); }
  .me .me-clock-name { font-size: 1.4rem; }
  .me .me-clock-btn { flex: 1 1 100%; min-height: 56px; font-size: 1.12rem; }
  .me .me-total { padding: 14px 18px; border-radius: var(--r-xl); }
  .me .me-total .n { font-size: 2.1rem; }

  /* timesheet: header row = day + hours, punches underneath */
  .me .me-week .card-head { gap: 12px; }
  .me .me-weeknav { width: 100%; }
  .me .me-weeknav-btn { flex: 1; padding: 8px 10px; }
  .me .me-day {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label hours" "punches punches";
    gap: 4px 12px; padding: 12px 10px; margin: 0 -10px;
  }
  .me .me-day-label { align-items: baseline; gap: 4px 10px; padding-top: 0; }
  .me .me-day-date { order: 0; flex-basis: auto; }
  .me .me-today { order: 0; align-self: center; }
  .me .me-day-hours { padding-top: 0; }
  .me .me-hours { font-size: 1.3rem; }
  .me .me-punch { gap: 10px; min-height: 44px; }
  .me .me-p-time { min-width: 70px; }
  .me .me-p-dept.is-sole { visibility: hidden; }   /* the person's only department: the name is noise on a phone */
  .me .me-day.is-empty .me-day-punches { gap: 0 14px; }
  .me .me-punch-empty { min-height: 44px; }

  .me .me-cr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "type cancel" "main main";
    gap: 6px 12px; padding: 12px 0;
  }
  .me .me-cr-type { align-self: center; margin-top: 0; }
  .me .me-cr-cancel { align-self: center; }

  .me .me-jump { grid-template-columns: minmax(0, 1fr); }
  .me .me-jump-tile { min-height: 0; padding: 20px 18px 18px; }

  .me .me-current { padding: 18px 16px; }
  .me .me-current-when { font-size: 1.4rem; }

  .me .me-teams-card { padding: 28px 20px 30px; }

  .me.ph-page .ph-main h1 { font-size: 1.9rem; }
  .me .ph-go { min-height: 60px; }
  .me .ph-actions { grid-template-columns: minmax(0, 1fr); }
  .me .ph-or .add-btn { width: 100%; }
  .me .me-a2hs { grid-template-columns: auto minmax(0, 1fr); padding: 16px; border-radius: var(--r-xl); }
  .me .me-a2hs-done { grid-column: 1 / -1; justify-self: stretch; margin-top: 8px; }
}

@media (max-width: 480px) {
  .me .me-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Touch screens (phones, Teams mobile) and narrow windows: 44px minimum tap targets */
@media (pointer: coarse), (max-width: 720px) {
  .me .me-icon { width: 44px; height: 44px; }
  .me .me-add { min-height: 44px; }
  .me .me-weeknav-btn { min-height: 44px; }
  .me .me-cr-cancel .chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: 16px; }
  .me .me-go { min-height: 44px; }
  .me .me-a2hs-done { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
}
/* Fingers (phones): 48px */
@media (pointer: coarse) {
  .me .me-icon { width: 48px; height: 48px; }
  .me .me-add, .me .me-weeknav-btn, .me .me-cr-cancel .chip, .me .me-go, .me .me-a2hs-done { min-height: 48px; }
}

/* My time: a punch a fix waiting for HR adds or changes (counted, amber) — or removes (struck, not counted) */
.me .me-punch.is-pending .me-p-time { color: var(--amber); }
.me .me-punch.is-removing .me-p-time { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.me .me-punch.is-removing .me-dir, .me .me-punch.is-removing .me-p-dept { opacity: 0.5; }
.me .me-total-pending { color: var(--amber); font-weight: 700; }
.me .me-src { margin-left: 6px; padding: 1px 7px; font-size: 0.58rem; vertical-align: 1px; }

/* ---------- sick day (sick_days.py): the bar under the clock cards, the day mark, the form ---------- */
.me .me-sick-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px;
  margin: 0 0 14px; padding: 12px 18px 12px 22px;
  background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r-xl);
}
.me .me-sick-text { color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; min-width: 0; }
.me .me-sick-text strong { color: var(--ink); }
.me .me-sick-actions { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.me .me-sick-past { color: var(--muted); font-size: 0.86rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.me .me-sick-past:hover { color: var(--pop); }
.me .me-sick-day { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 2px 0 6px; }
.me .me-sick-day-meta { color: var(--muted); font-size: 0.82rem; }
.me .me-day.is-empty .me-sick-day { margin-top: 0; }
.me .me-sick-how { margin: 0; padding: 18px 22px; }
.me .me-sick-how h2 { font-size: 1rem; margin: 0 0 8px; }
.me .me-sick-how ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; }
.me .me-sick-how li + li { margin-top: 4px; }
.me .me-form-err { margin: -4px 0 12px; padding: 10px 14px; background: var(--red-bg); border-radius: var(--r-md); }
@media (max-width: 600px) {
  .me .me-sick-bar { padding: 14px 16px; }
  .me .me-sick-actions { width: 100%; }
  .me .me-sick-actions .me-sick-btn { flex: 1 1 auto; text-align: center; min-height: 44px; }
}
