:root {
  /* Wright State palette */
  --green: #006a4d;        /* primary */
  --green-dark: #00543b;
  --green-tint: rgba(0, 106, 77, .10);
  --green-range: #b6e0cb;
  --gold: #f2a900;         /* accent */
  --gold-soft: #ffd35c;

  --bg: #f2f5f3;
  --panel: #ffffff;
  --panel2: #eef3f0;
  --line: #dce5e0;
  --text: #16241e;
  --muted: #5c6f67;
  /* Darkened from the original brand values (#1c8a55 / #b7791f) to clear WCAG AA
     (4.5:1) at the small text sizes they're actually used at — status pills,
     warning notes, pending/approved labels — not just the large balance numbers. */
  --green-status: #197c4c;
  --red: #c0392b;
  --amber: #926119;
  /* Softer, more layered elevation for a modern, lifted feel. */
  --shadow-sm: 0 1px 2px rgba(16, 36, 30, .05);
  --shadow: 0 1px 2px rgba(16, 36, 30, .04), 0 10px 28px -10px rgba(16, 36, 30, .14);
  --shadow-lg: 0 4px 10px rgba(16, 36, 30, .06), 0 24px 48px -16px rgba(16, 36, 30, .22);
  --radius: 14px;
  --ring: 0 0 0 3px var(--green-tint);
  --ui-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.01em;
  /* Flat wash + two whisper-faint brand glows for subtle depth behind the cards. */
  background:
    radial-gradient(1100px 520px at 100% -8%, rgba(242, 169, 0, .06), transparent 60%),
    radial-gradient(1000px 560px at -5% 0%, rgba(0, 106, 77, .07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

/* Top bar */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem;
  /* Layered texture: faint diagonal weave + a soft gold glow over the green gradient. */
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 8px),
    radial-gradient(circle at 14% 0%, rgba(242, 169, 0, .14), transparent 55%),
    linear-gradient(100deg, var(--green-dark), var(--green));
  border-bottom: 3px solid var(--gold);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: .85rem; }
.topbar-right { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
.logo-cartoon { height: 50px; width: 50px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); border: 2px solid rgba(255, 255, 255, .7); }
.brand h1 { margin: 0; font-size: 1.25rem; letter-spacing: -.01em; }
.tag { margin: 0; color: rgba(255, 255, 255, .8); font-size: .8rem; }
.userbox { font-size: .9rem; color: rgba(255, 255, 255, .85); display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
.userbox b { color: #fff; }
/* Narrow screens (phones/tablets): keep the header tidy and never clip Sign out. */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: .7rem .9rem; gap: .5rem .75rem; }
  .brand { gap: .55rem; }
  .logo-cartoon { height: 40px; width: 40px; }
  .brand h1 { font-size: 1.05rem; }
  .tag { display: none; }
  .userbox { font-size: .82rem; gap: .5rem; }
  /* Drop the verbose framing ("Signed in as … (resident)") so the name and the
     actual controls (view-as, settings, sign out) don't get crowded out. */
  .userbox-prefix, .userbox-role { display: none; }
  .viewas-sel { max-width: 9.5rem; }
}
/* ⚙️ Settings button in the top bar (the old Setup tab lives here now). */
.iconbtn {
  margin: 0; padding: .32rem .5rem; font-size: 1rem; line-height: 1; cursor: pointer;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .4);
  color: #fff; border-radius: 9px;
}
.iconbtn:hover { background: rgba(255, 255, 255, .26); }
.iconbtn.active { background: #fff; border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }

.view { max-width: 880px; margin: 1.5rem auto; padding: 0 1rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.step-label { margin: 1.5rem 0 .6rem; font-size: .86rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--green); }
.step-label:first-of-type { margin-top: .4rem; }
/* Bigger explanation text under the steps. */
.card .hint, .ltype-hint, .psych-pick .hint, .onservice { font-size: .92rem; line-height: 1.55; }
#tab-request .card > .muted { font-size: .95rem; line-height: 1.55; }
/* Admin "preview as a resident" banner on the New request tab. */
.preview-bar { margin: 0 0 1rem; padding: .7rem .9rem; background: #fff8ec; border: 1px solid #f3e2c0; border-left: 4px solid var(--amber); border-radius: 12px; }
.preview-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.preview-eye { font-weight: 800; color: var(--amber); font-size: .9rem; }
.preview-pick { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .82rem; font-weight: 700; color: var(--text); }
.preview-pick select { width: auto; min-width: 12rem; margin: 0; }
.preview-note { margin: .5rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }
/* Each step on the request form sits in its own clearly-shaded panel so the
   sections read as distinct (white cards-within-cards on a soft green wash). */
.step-section { background: var(--green-tint); border: 1px solid #cfe0d7; border-radius: 14px; padding: .15rem 1.1rem 1.15rem; margin: 0 0 1rem; }
.step-section .step-label { margin-top: .95rem; }
.step-section .step-label:first-child { margin-top: .85rem; }
code { background: var(--panel2); padding: .1rem .35rem; border-radius: 4px; color: var(--green-dark); font-size: .85em; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.35rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 .4rem; font-size: 1.1rem; letter-spacing: -.01em; }
/* Subtle lift on the list/record cards for a modern, interactive feel. */
.req, .appr, .msg, .abs-month, .lc-month, .bal, .cstat, .topchart, .fb-item {
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.req:hover, .appr:hover, .msg:hover, .abs-month:hover, .lc-month:hover, .fb-item:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-lg);
}
.card > .muted:first-of-type { margin-top: 0; }

label { display: block; margin: .65rem 0; font-size: .82rem; font-weight: 600; color: var(--muted); }
label.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 600; }
input, select, textarea {
  width: 100%; margin-top: .3rem; padding: .62rem .8rem;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  color: var(--text); font-size: .9rem; font-family: inherit; font-weight: 400;
  transition: border-color .15s ease, box-shadow .15s ease;
  /* Tints native controls (date-picker icon, checkboxes, the calendar popup's
     selected-day highlight) toward the brand green instead of default browser blue. */
  accent-color: var(--green);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: var(--ring); }
label.row input[type=checkbox] { width: auto; }
label.row select, label.row input { width: 60%; margin-top: 0; }
textarea { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn {
  margin-top: .85rem; padding: .62rem 1.2rem; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; font-size: .9rem; font-weight: 600;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--green); color: var(--green); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%); border: 1px solid var(--green-dark); color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover { background: linear-gradient(180deg, #00795a 0%, #00482f 100%); border-color: var(--green-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn:disabled, .btn.primary:disabled { background: var(--panel2); border-color: var(--line); color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; }

/* Leave-type selector */
.leavetypes { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .6rem; align-items: center; }
.ltype {
  margin: 0; padding: .5rem .95rem; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: .85rem; font-weight: 700; cursor: pointer;
}
.ltype:hover { border-color: var(--green); color: var(--green); }
.ltype.active { background: var(--green); border-color: var(--green); color: #fff; box-shadow: var(--shadow); }
.ltype-hint { flex-basis: 100%; margin: .35rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.45; }
.ltype-pill { font-weight: 800; color: var(--green-dark); }

/* Approver contact needed (e.g. a site supervisor not fully recorded yet). */
.needemail { margin: .9rem 0 .2rem; padding: .85rem 1rem; background: #eef5fb; border: 1px solid #cfe0f0; border-left: 4px solid var(--green); border-radius: 12px; }
.needemail .step-label { margin: 0 0 .25rem; color: var(--green-dark); }
.needemail .nemail { display: grid; grid-template-columns: minmax(9rem, .7fr) minmax(13rem, 1fr) minmax(11rem, .8fr); align-items: center; gap: .6rem; margin: .5rem 0 0; font-weight: 600; }
.needemail .nemail span { min-width: 140px; }
.needemail .nemail input { margin: 0; width: 100%; }
@media (max-width: 640px) {
  .needemail .nemail { grid-template-columns: 1fr; gap: .35rem; padding-top: .45rem; border-top: 1px solid #cfe0f0; }
}

/* Exception request (restricted-period leave) */
.exception { margin: .9rem 0 .2rem; padding: .9rem 1rem; background: #fff8ec; border: 1px solid #f3e2c0; border-radius: 12px; }
.exception .exc-check { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 700; color: var(--amber); font-size: .88rem; }
.exception .exc-check input { width: auto; margin: 0; }
.exception .hint { margin: .45rem 0 .5rem; font-size: .8rem; color: var(--muted); line-height: 1.45; }
.exception textarea { font-family: inherit; font-size: .88rem; }
.exc-note { font-size: .82rem; color: var(--amber); font-weight: 600; margin: .4rem 0 .2rem; }

/* Policy flags on a request card */
.flags { display: flex; flex-direction: column; gap: .3rem; margin: .5rem 0 .2rem; }
.flag { font-size: .8rem; line-height: 1.4; padding: .35rem .6rem; border-radius: 8px; }
.flag.warn { background: #fff8ec; color: var(--amber); border: 1px solid #f3e2c0; }
.flag.block { background: #fbe7e4; color: var(--red); border: 1px solid #f3cfca; }

/* Psychotherapy coverage step */
.psych-na { margin: .3rem 0; padding: .65rem .85rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .85rem; }
.psych-pick { margin: .3rem 0 0; }
.psych-pick .hint { font-size: .8rem; color: var(--muted); margin: .1rem 0 .4rem; line-height: 1.45; }

/* Gentle no-PHI hint next to the reason field */
.reason-hint { margin: .4rem 0 0; font-size: .82rem; color: var(--muted); }
.login-err { max-width: 460px; margin: 0 auto 1rem; background: #fbe7e4; color: var(--red); border: 1px solid #f3cfca; border-radius: 10px; padding: .6rem .8rem; font-size: .85rem; font-weight: 600; text-align: center; }
.gbtn.google { justify-content: center; background: #fff; border: 1px solid var(--green); color: var(--green-dark); font-weight: 700; text-decoration: none; }
.gbtn.google:hover { background: var(--green-tint); }

/* Login */
.login { display: grid; place-items: center; min-height: 60vh; }
.login-card { max-width: 460px; }
.login-buttons { margin-top: 1rem; }
.login-loading { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1.5rem 0; color: var(--muted); font-size: .9rem; }
.login-loading.slow { flex-direction: column; text-align: center; gap: .5rem; }
.login-loading .spinner {
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--green);
  animation: wl-spin .8s linear infinite; flex: none;
}
.login-loading .retry-btn { margin-top: .25rem; }
@keyframes wl-spin { to { transform: rotate(360deg); } }
.gbtn {
  display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; width: 100%;
  background: #fff; color: var(--text); border-radius: 10px; border: 1px solid var(--line); cursor: pointer;
  font-weight: 600; font-size: .9rem; text-align: left;
}
.gbtn:hover { border-color: var(--green); background: var(--green-tint); }
.gbtn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--green); }
.gbtn .role { margin-left: auto; font-size: .68rem; color: var(--green-dark); background: var(--gold-soft); padding: .12rem .5rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
/* Dev login: search + role groups, so 50+ names aren't one long scroll. */
.login-search { margin: 0 0 .8rem; }
.login-groups { display: flex; flex-direction: column; gap: .5rem; }
.login-group-list { display: flex; flex-direction: column; gap: .4rem; padding: .1rem .7rem .7rem; }
.login-group.hidden, .gbtn.hidden { display: none; }

/* Leave balance tracker */
.balancebar { margin-bottom: 1.1rem; }
/* Top panel: 2×2 balance cards (left) with the pace chart squished beside them (right). */
.topgrid { display: grid; grid-template-columns: minmax(250px, 330px) 1fr; gap: 1rem; align-items: start; }
.topcards { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.topchart { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; box-shadow: var(--shadow); min-width: 0; }
.topchart .pace { font-size: .8rem; padding: .5rem .7rem; margin-bottom: .5rem; }
.topchart .chart { border: none; }
.topchart .chart-legend { font-size: .7rem; gap: .7rem; margin-top: .4rem; }
/* Reserve room above the cards for the APA speech bubble — a bit more than the
   bubble's own height so it doesn't crowd the card underneath it. */
.balancebar:has(.apa-bubble) .topgrid,
.balancebar:has(.pending-bubble) .topgrid { margin-top: 2.5rem; }
@media (max-width: 760px) { .topgrid { grid-template-columns: 1fr; } }
.bal-head { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .5rem; }
.bal-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.bal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.bal-num { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--text); }
.bal-of { font-size: 1rem; font-weight: 700; color: var(--muted); margin-left: .15rem; }
.bal-label { margin-top: .35rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.bal.ok { border-top-color: var(--green-status); }
.bal.ok .bal-num { color: var(--green-status); }
.bal.low { border-top-color: var(--amber); }
.bal.low .bal-num { color: var(--amber); }
.bal.none { border-top-color: var(--red); }
.bal.none .bal-num { color: var(--red); }
.bal.flat { border-top-color: var(--line); }
.bal.flat .bal-num { color: var(--text); }
/* Sick & personal: secondary balances — smaller and black, so vacation/educational
   (green) read as the primary allowances. Appears after .ok/.low/.none so it wins. */
.bal.bal-secondary { padding: .65rem .8rem; border-top-width: 3px; border-top-color: #cbd5e1; }
.bal.bal-secondary .bal-num { font-size: 1.55rem; color: var(--text); }
.bal.bal-secondary .bal-of { font-size: .8rem; }
.bal.bal-secondary .bal-label { font-size: .72rem; margin-top: .25rem; }
/* 6th tile: clickable "Log a sick / personal day" action card. */
.bal.action { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .45rem; cursor: pointer; border-top-color: var(--green); background: var(--green-tint); font-family: inherit; transition: background .12s, border-color .12s; }
.bal.action:hover { background: var(--green); border-color: var(--green); }
.bal.action .bal-action-emoji { font-size: 2rem; line-height: 1; }
.bal.action .bal-label { margin-top: 0; color: var(--green-dark); font-weight: 700; font-size: .85rem; }
.bal.action:hover .bal-label { color: #fff; }
/* Vacation-inspiration tile — sky-blue travel accent instead of the green log tile. */
.bal.action.vacay { border-top-color: #2563eb; background: #eff5ff; }
.bal.action.vacay:hover { background: #2563eb; border-color: #2563eb; }
.bal.action.vacay .bal-label { color: #1e40af; }
.bal.action.vacay:hover .bal-label { color: #fff; }
.bal-sub { display: block; font-weight: 600; font-size: .68rem; opacity: .75; margin-top: .1rem; }
/* Vacation modal: tips + nonstop-destination list. */
.vacay-tip { font-size: .82rem; line-height: 1.45; color: #1e3a5f; background: #eff5ff; border: 1px solid #cfe0fb; border-radius: 10px; padding: .55rem .7rem; margin: .1rem 0 .5rem; }
.vacay-tip.alt { color: #5b4a13; background: #fdf6e3; border-color: #f0e2b8; }
.vacay-tip a { color: inherit; font-weight: 700; text-decoration: underline; }
.vacay-body { max-height: 52vh; overflow-y: auto; margin: .2rem 0 .4rem; }
.vacay-group { margin-bottom: .8rem; }
.vacay-grouphead { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .3rem 0 .35rem; }
.vacay-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .35rem; text-decoration: none; color: var(--text); transition: background .1s, border-color .1s; }
.vacay-row:hover { background: #eff5ff; border-color: #2563eb; }
.vacay-e { font-size: 1.25rem; line-height: 1; }
.vacay-city { flex: 1; font-weight: 600; font-size: .9rem; }
.vacay-code { font-size: .72rem; font-weight: 700; color: var(--muted); margin-left: .25rem; }
.vacay-meta { font-size: .76rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .bal-cards { grid-template-columns: repeat(2, 1fr); } .bal-num { font-size: 2rem; } }

/* APA nudge speech bubble on the educational card */
.bal.has-bubble { position: relative; overflow: visible; }
.apa-bubble {
  position: absolute; left: 50%; right: auto; transform: translateX(-50%);
  width: max-content; max-width: 88vw; bottom: calc(100% + 10px); z-index: 5;
  background: var(--green-dark); color: #fff; font-size: .66rem; line-height: 1.25;
  font-weight: 600; padding: .3rem .6rem; border-radius: 9px; box-shadow: var(--shadow);
  text-align: center; white-space: nowrap;
}
.apa-bubble b { color: var(--gold-soft); }
.apa-bubble::before {
  content: ""; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 6px solid var(--green-dark);
}
/* Amber "pending approval" speech bubble — same shape as the APA one. */
.pending-bubble {
  position: absolute; left: 50%; right: auto; transform: translateX(-50%);
  width: max-content; max-width: 88vw; bottom: calc(100% + 10px); z-index: 6;
  background: var(--amber); color: #3a2a00; font-size: .66rem; line-height: 1.25;
  font-weight: 700; padding: .3rem .6rem; border-radius: 9px; box-shadow: var(--shadow);
  text-align: center; white-space: nowrap;
}
.pending-bubble b { font-weight: 800; }
.pending-bubble::before {
  content: ""; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 6px solid var(--amber);
}

/* Leave timeline chart */
#leaveChart { margin-top: .4rem; }
.chart { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.chart .ax { font-size: 10px; fill: var(--muted); font-family: inherit; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .6rem; font-size: .78rem; color: var(--muted); }
.chart-legend .sw { display: inline-block; width: 16px; height: 10px; margin-right: .3rem; vertical-align: middle; border-radius: 2px; }
.chart-legend .sw.line { background: var(--green-status); height: 3px; }
.chart-legend .sw.dash { background: repeating-linear-gradient(90deg, var(--amber) 0 4px, transparent 4px 7px); height: 3px; }
.chart-legend .sw.sick { background: #c0392b; }
.chart-legend .sw.personal { background: #6b5b95; }
.pace { font-size: .9rem; line-height: 1.5; padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; }
.pace.neutral { background: var(--green-tint); color: var(--green-dark); }
.pace.ontrack { background: #e3f5ec; color: var(--green-status); border: 1px solid #b6e0cb; }
.pace.behind { background: #fff8ec; color: var(--amber); border: 1px solid #f0dcae; }
.pace b { color: inherit; }

/* Admin records table */
.rectable { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: .3rem; }
.rectable th { text-align: left; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .4rem .5rem; border-bottom: 2px solid var(--line); }
.rectable td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rectable td.n { text-align: center; }
.status.logged { background: var(--green-tint); color: var(--green-dark); }
.btn.mini { margin: 0; padding: .3rem .6rem; font-size: .76rem; border-radius: 7px; }
.rectable td.rowact { display: flex; flex-wrap: wrap; gap: .35rem; }

/* Future (not-yet-live) schedule editor */
.fs-toolbar { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin: .3rem 0 1rem; }
.fs-toolbar label { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .82rem; font-weight: 700; color: var(--text); }
.fs-toolbar select { width: auto; min-width: 11rem; margin: 0; }
.fs-toolbar .btn { margin: 0; }
.fs-block-row { display: grid; grid-template-columns: 3rem 8.5rem 1fr auto; align-items: center; gap: .6rem; padding: .45rem .2rem; border-bottom: 1px solid var(--line); }
.fs-block-row:last-child { border-bottom: none; }
.fs-block-n { font-weight: 700; color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: .4rem; }
.fs-block-range { font-size: .8rem; color: var(--muted); }
.fs-block-row select { margin: 0; }
.fs-block-off { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.fs-block-off input { width: auto; margin: 0; }
/* Small color swatch mirroring the rotation's tint from the New-request calendar
   (ROTATION_TINTS/SITE_TINTS), so a resident can scan a whole future year's
   pattern by color the same way they already read their current-year calendar. */
.fs-swatch { width: .6rem; height: .6rem; border-radius: 3px; border: 1px solid rgba(16,36,30,.12); flex: none; }
.fs-swatch.fs-swatch-empty { background: transparent; border-style: dashed; }
/* Per-row save feedback — sits right next to the control the resident just
   touched, not just in the shared toolbar status line far above/below a
   13-row list (see fsSaved). Fades in on save, fades out after. */
.fs-row-status { font-size: .74rem; color: var(--green-status); white-space: nowrap; opacity: 0; transition: opacity .2s ease; }
.fs-row-status.showing { opacity: 1; }
.fs-row-status.error { color: var(--red); }
.fs-weekly-table { display: grid; grid-template-columns: 6.5rem 1fr 1fr; gap: 3px; margin-top: .3rem; }
.fs-weekly-table > div { padding: .4rem .5rem; }
.fs-weekly-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.fs-weekly-day { font-weight: 700; font-size: .82rem; display: flex; align-items: center; }
.fs-weekly-table select { margin: 0; width: 100%; }
.fs-weekly-split { margin: .8rem 0 .3rem; font-size: .82rem; }
.fs-weekly-split input { width: auto; margin-left: .4rem; }
.fs-locked { color: var(--muted); font-size: .85rem; padding: .6rem 0; }
/* Below ~640px the fixed 4-column block row (3rem + 8.5rem + 1fr + auto) squeezes
   the rotation <select> down to an illegible ~35px — switch to a wrapping layout
   instead, matching the stacking pattern already used elsewhere (.leave-cal). */
@media (max-width: 640px) {
  .fs-block-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
  .fs-block-row select { flex: 1 1 100%; order: 2; }
  .fs-block-off { margin-left: auto; order: 1; }
  .fs-row-status { flex: 1 1 100%; order: 3; }
  .fs-weekly-table { grid-template-columns: 3.2rem 1fr 1fr; }
  .fs-weekly-head, .fs-weekly-day { font-size: .7rem; }
  .fs-weekly-table > div { padding: .3rem .25rem; }
}

.cov-x { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: .2rem .4rem; border-radius: 6px; }
.cov-x:hover { color: var(--red); background: #fbe7e4; }

.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .9rem; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .78rem; }
.req-divider { margin: 1rem 0 .2rem; text-align: center; font-size: .8rem; font-weight: 700; color: var(--green-dark); }
/* Notify-residents picker */
.notify-grp { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem .6rem; margin: .6rem 0 0; }
.notify-grp legend { font-size: .82rem; color: var(--green-dark); padding: 0 .3rem; }
.notify-grp legend label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 700; }
.notify-members { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .8rem; margin-top: .35rem; }
.notify-members label { display: flex; align-items: center; gap: .35rem; margin: 0; font-size: .82rem; font-weight: 500; color: var(--text); }
.notify-grp input, .notify-members input { width: auto; margin: 0; }
#notifySend { margin-top: .9rem; }
@media (max-width: 560px) { .notify-members { grid-template-columns: 1fr; } }

/* Suggested residents in the notify picker */
.notify-suggest-loading, .notify-suggest-empty { margin: .5rem 0 .2rem; font-size: .82rem; }
.notify-suggest { margin: .2rem 0 .4rem; padding: .6rem .7rem .7rem; border: 1px solid var(--green-range); border-radius: 10px; background: var(--green-tint); }
.suggest-head { margin: 0 0 .5rem; font-size: .84rem; font-weight: 700; color: var(--green-dark); }
.suggest-head .muted { font-weight: 500; }
.suggest-row { display: flex; align-items: flex-start; gap: .5rem; margin: 0 0 .4rem; padding: .35rem .45rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-weight: 500; }
.suggest-row input { width: auto; margin: .15rem 0 0; flex: none; }
.suggest-main { display: flex; flex-direction: column; gap: .2rem; }
.suggest-name { font-size: .88rem; font-weight: 700; color: var(--text); }
.suggest-yr { font-size: .72rem; font-weight: 700; color: var(--muted); margin-left: .2rem; }
.suggest-reasons { display: flex; flex-wrap: wrap; gap: .3rem .6rem; }
.suggest-reasons .reason { font-size: .76rem; color: var(--muted); }
.suggest-reasons .reason.good { color: var(--green-status); }
.suggest-why { margin: .3rem 0 0; }
.notify-allres-head { margin: .9rem 0 0; font-size: .8rem; font-weight: 700; }

/* "Everyone off these dates" overview on the new-request screen */
.everyone-toggle { margin: .8rem 0 .2rem; }
.everyone-toggle-lbl { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .85rem; font-weight: 700; color: var(--green-dark); cursor: pointer; }
.everyone-toggle-lbl input { width: auto; margin: 0; }
.everyone-off { margin: .4rem 0 .2rem; padding: .7rem .85rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.everyone-head { margin: 0 0 .6rem; font-size: .85rem; font-weight: 700; color: var(--text); line-height: 1.45; }
.everyone-head .muted { display: block; font-weight: 500; margin-top: .15rem; }
.everyone-grp { margin: 0 0 .55rem; }
.everyone-grp h5 { margin: 0 0 .25rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.everyone-row { display: flex; flex-wrap: wrap; gap: .15rem .6rem; padding: .25rem 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.everyone-row:last-child { border-bottom: none; }
.everyone-name { font-weight: 700; color: var(--text); min-width: 9rem; }
.everyone-when { color: var(--muted); }
.btn.danger { color: var(--red); border-color: #f3cfca; }
.btn.danger:hover { background: #fbe7e4; border-color: var(--red); color: var(--red); }

/* Modal (generic dialog shell — FAQ, sick day, paper, vacay, feedback, etc.) */
.modal { position: fixed; inset: 0; background: rgba(16,36,30,.45); display: grid; place-items: center; z-index: 50; padding: 1rem; }
/* Cap the card to the viewport and let it scroll internally — long dialogs used
   to overflow off both ends with no way to reach the bottom, because the
   overlay just centers the card without scrolling. */
.modal-card { background: #fff; border-radius: 16px; max-width: 460px; width: 100%; padding: 1.2rem 1.4rem; box-shadow: 0 12px 40px rgba(16,36,30,.25); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
/* Wider variant for content-heavy dialogs (e.g. the FAQ). */
.modal-card.wide { max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.modal-head h3 { margin: 0; font-size: 1.05rem; color: var(--green-dark); }
.modal-card label { display: block; margin: .6rem 0 0; font-size: .82rem; font-weight: 600; color: var(--muted); }

/* Coordinator approvals queue */
.appr-list { display: flex; flex-direction: column; gap: .7rem; margin-top: .6rem; }
.appr { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .95rem; background: var(--panel); }
.appr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.appr-head h3 { margin: 0; font-size: 1rem; }
.appr-yr { font-size: .72rem; font-weight: 700; color: var(--muted); margin-left: .15rem; }
.appr-when { font-size: .85rem; color: var(--text); }
.appr-age { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.appr-meta { display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin: .5rem 0 0; font-size: .82rem; color: var(--muted); }
.appr-meta .appr-conflict { color: var(--amber); font-weight: 700; }
.appr-exc { margin: .45rem 0 0; font-size: .82rem; color: var(--amber); }
.appr-flags { display: flex; flex-direction: column; gap: .25rem; margin: .5rem 0 0; }
.appr-flags .flag.warn { font-size: .8rem; color: var(--amber); background: #fff8ec; border: 1px solid #f3e2c0; border-radius: 8px; padding: .3rem .5rem; }
.appr-act { display: flex; gap: .4rem; margin-top: .6rem; }
.appr-deny { margin-top: .6rem; padding: .7rem .8rem; background: #fbeae7; border: 1px solid #f3cfca; border-radius: 10px; }
.appr-deny label { margin: 0 0 .4rem; font-weight: 700; color: var(--red); }
.appr-deny label .muted { font-weight: 500; }
.appr-deny textarea { font-family: inherit; font-size: .85rem; }
.appr-deny-act { display: flex; gap: .4rem; margin-top: .3rem; }

/* Login logo */
.login-logo { display: block; width: 160px; max-width: 60%; margin: 0 auto .6rem; }

/* Tabs — pill nav. One tidy row of pills on desktop; a clean 2-column grid of
   tappable buttons on phones (replaces the old ragged multi-row wrapping). */
.tabs {
  display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.25rem;
}
.tab {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  padding: .5rem .9rem; flex: 0 0 auto; white-space: nowrap; cursor: pointer;
  font-size: .9rem; font-weight: 700; border-radius: 999px; box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; gap: .45rem;
}
.tab:hover { color: var(--green-dark); background: var(--green-tint); border-color: var(--green-range); }
.tab.active, .tab.active:hover { color: #fff; background: var(--green); border-color: var(--green); box-shadow: var(--shadow); }
.badge {
  background: var(--green-tint); color: var(--green-dark); border-radius: 999px;
  min-width: 1.35rem; padding: 0 .5rem; text-align: center;
  font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.tab.active .badge { background: var(--gold); color: var(--green-dark); }

/* Phones: a tidy 2-column grid of full-width buttons — every tab visible, easy
   to tap, and no ragged wrapping. */
@media (max-width: 760px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .tab { width: 100%; justify-content: space-between; padding: .72rem .9rem; font-size: .95rem; border-radius: 12px; }
}

/* Impact panel */
.impact { margin-top: 1.1rem; padding: 1.1rem 1.2rem; background: var(--green-tint); border-radius: 12px; border: 1px solid var(--line); }
.impact .impact-title { margin: 0 0 .8rem; font-size: .9rem; font-weight: 700; color: var(--green-dark); }
.impact-row { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .7rem; }
.impact-row:last-child { margin-bottom: 0; }
.impact-row .ico { font-size: 1rem; line-height: 1.4; }
.impact-row .body { flex: 1; }
.impact-row h4 { margin: 0 0 .35rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }

/* "Who gets notified" — a distinct white card nested inside the green impact
   panel, so the routing/approval info (who's asked, who covers, conflicts)
   reads as a separate step from the policy/what-happens content above it. */
.impact-routing {
  margin-top: 1rem; padding: 1rem 1.1rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.impact-subtitle {
  margin: 0 0 .75rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line);
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--green-dark); display: flex; align-items: center; gap: .4rem;
}
.impact-subtitle .ico { font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: .25rem .7rem; font-size: .82rem; font-weight: 600; }
.chip.att { border-color: var(--green); color: var(--green-dark); background: #fff; }
.chip.att.added { border-color: var(--gold); background: #fffaef; color: var(--green-dark); box-shadow: inset 0 0 0 1px var(--gold-soft); }
.chip.warn { border-color: var(--amber); color: var(--amber); background: #fff8ec; }
.chip .chip-x { border: none; background: none; color: var(--muted); cursor: pointer; font-size: .8rem; padding: 0 0 0 .15rem; line-height: 1; }
.chip .chip-x:hover { color: var(--red); }

/* On-service attendings line (Step 4) */
.onservice { margin: .1rem 0 .55rem; font-size: .82rem; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.onservice-lead { font-weight: 700; color: var(--green-dark); flex-basis: 100%; }

/* On-service attendings as uncheckable pills (Step 4) — uncheck anyone who's away. */
.att-checks { display: flex; flex-wrap: wrap; gap: .4rem; flex-basis: 100%; margin-top: .1rem; }
.att-check {
  display: inline-flex; align-items: center; gap: .4rem; margin: 0; cursor: pointer;
  background: #fff; border: 1px solid var(--green); border-radius: 20px;
  padding: .25rem .7rem .25rem .6rem; font-size: .82rem; font-weight: 600; color: var(--green-dark);
}
.att-check input { width: auto; margin: 0; accent-color: var(--green); cursor: pointer; }
.att-check.off { border-color: var(--line); color: var(--muted); background: var(--panel2); }
.att-check.off .att-check-name { text-decoration: line-through; }

/* A matched attending's request-specific contact. The editor intentionally says
   this does not mutate the shared roster and keeps email + mobile together. */
.att-check-row { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.att-contact-btn {
  display: inline-flex; align-items: baseline; gap: .35rem; border: 1px solid var(--line);
  background: #fff; color: var(--green-dark); font-size: .74rem; cursor: pointer;
  padding: .24rem .48rem; border-radius: 8px; max-width: 25rem;
}
.att-contact-btn:hover { border-color: var(--green); background: var(--panel2); }
.att-contact-btn > span { font-weight: 800; white-space: nowrap; }
.att-contact-btn small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-contact-edit {
  flex: 1 1 34rem; padding: .7rem; background: #fff; border: 1px solid var(--green-range);
  border-radius: 10px; min-width: min(32rem, 100%);
}
.att-contact-fields { display: grid; grid-template-columns: minmax(13rem, 1fr) minmax(11rem, .8fr); gap: .55rem; }
.att-contact-fields label { margin: 0; font-size: .75rem; font-weight: 800; color: var(--green-dark); }
.att-contact-fields label > span { display: block; margin-bottom: .2rem; }
.att-contact-fields input { margin: 0; width: 100%; font-size: .84rem; padding: .42rem .55rem; }
.att-contact-note { margin: .45rem 0; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.att-contact-actions { display: flex; align-items: center; gap: .45rem; }
.att-contact-actions .btn { margin: 0; }
.att-contact-cancel { border: none; background: none; color: var(--muted); cursor: pointer; font-weight: 700; }
.att-contact-cancel:hover { color: var(--red); }
.att-contact-err { display: block; color: var(--red); font-size: .74rem; margin-top: .35rem; }
.att-contact-err[hidden] { display: none; }

/* Add-attendings picker */
.addatt { display: flex; gap: .5rem; align-items: center; margin: .3rem 0 0; }
.addatt select { margin: 0; }
.addatt .btn { margin: 0; white-space: nowrap; }
.addatt-chips { margin-top: .55rem; }
.link-btn { background: none; border: none; color: var(--green-dark); font-weight: 600; font-size: .82rem; cursor: pointer; padding: .45rem 0 0; text-decoration: underline; }
.link-btn:hover { color: var(--green-status); }
.custom-att { display: flex; gap: .5rem; align-items: flex-start; flex-wrap: wrap; margin: .5rem 0 0; padding: .65rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.custom-att input { margin: 0; flex: 1 1 11rem; }
.custom-att .btn { margin: 0; white-space: nowrap; }
.att-name-wrap { position: relative; flex: 1 1 11rem; }
.att-name-wrap input { width: 100%; }
.att-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 14rem; overflow-y: auto; padding: .3rem;
}
.att-suggest-item { display: flex; flex-direction: column; gap: .05rem; padding: .4rem .55rem; border-radius: 7px; cursor: pointer; }
.att-suggest-item .asi-name { font-size: .85rem; font-weight: 600; color: var(--text); }
.att-suggest-item .asi-email { font-size: .74rem; color: var(--muted); }
.att-suggest-item:hover, .att-suggest-item.active { background: var(--green-tint); }
.att-suggest-hint { padding: .3rem .55rem; font-size: .74rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: .2rem; }
.tag-added { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--green-dark); background: var(--gold-soft); padding: .05rem .35rem; border-radius: 10px; }
.impact-row.conflict { color: var(--amber); }
.impact-row.ok h4 { color: var(--green-status); }

/* Prominent policy callouts */
.impact-row.alert { align-items: flex-start; padding: .65rem .8rem; border-radius: 10px; }
.impact-row.alert.block { background: #fdecea; border: 1px solid #f2c8c2; border-left: 4px solid var(--red); }
.impact-row.alert.block h4 { color: var(--red); }
.impact-row.alert .alert-text { font-size: .84rem; line-height: 1.45; color: var(--text); }
.alert.warn { background: #fff8ec; border: 1px solid #f0dcae; border-left: 4px solid var(--amber); border-radius: 10px; padding: .7rem .85rem; }
.alert.warn .alert-head { font-weight: 800; font-size: .82rem; color: var(--amber); display: flex; align-items: center; gap: .4rem; }
.alert.warn ul { margin: .45rem 0 0; padding-left: 1.3rem; }
.alert.warn li { font-size: .84rem; line-height: 1.5; color: var(--text); margin: .15rem 0; }

/* Collapsible site-specific callouts (military/VA/WPAFB): same amber alert look,
   but the whole thing is a <details> so it starts collapsed instead of always
   taking up space. */
.alert.warn.special-toggle { padding: 0; }
.alert.warn.special-toggle > summary {
  list-style: none; cursor: pointer; padding: .7rem .85rem;
  font-weight: 800; font-size: .82rem; color: var(--amber);
  display: flex; align-items: center; gap: .4rem;
}
.alert.warn.special-toggle > summary::-webkit-details-marker { display: none; }
.alert.warn.special-toggle > summary::after { content: '▸'; margin-left: auto; color: var(--amber); transition: transform .15s; }
.alert.warn.special-toggle[open] > summary::after { transform: rotate(90deg); }
.alert.warn.special-toggle > summary:hover { background: rgba(242,169,0,.08); }
.alert.warn.special-toggle > ul, .alert.warn.special-toggle > p.hint { margin: 0 .85rem .7rem; }
.alert.warn.special-toggle > ul:first-of-type, .alert.warn.special-toggle > p.hint:first-of-type { margin-top: -.1rem; }
.alert.warn.special-toggle > ul { padding-left: 1.6rem; }

.toolbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* Request cards */
/* Average turnaround panel (collapsible) above the request list. */
.ta-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 1rem; box-shadow: var(--shadow); }
.ta-panel > summary { cursor: pointer; padding: 1rem 1.4rem; font-weight: 700; font-size: .95rem; list-style: none; }
.ta-panel > summary::-webkit-details-marker { display: none; }
.ta-panel > summary::before { content: '▸'; display: inline-block; margin-right: .5rem; color: var(--muted); transition: transform .15s; }
.ta-panel[open] > summary::before { transform: rotate(90deg); }
.ta-cols { display: flex; flex-wrap: wrap; gap: 1.4rem 2.4rem; padding: 0 1.4rem 1.2rem; }
.ta-col { flex: 1 1 240px; min-width: 220px; }
.ta-col h4 { margin: 0; font-size: .9rem; }
.ta-sub { margin: .15rem 0 .55rem; font-size: .78rem; }
.ta-row { display: flex; align-items: baseline; gap: .6rem; padding: .3rem 0; border-top: 1px solid var(--line); font-size: .85rem; }
.ta-row .ta-name { flex: 1 1 auto; }
.ta-row .ta-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.ta-row .ta-count { color: var(--muted); font-size: .75rem; min-width: 3.5em; text-align: right; }

/* Attending "Resident absences" year-at-a-glance: a grid of month cards, each
   listing the leaves that touch their service, or "No absences". */
.abs-head h2 { margin: 0 0 .2rem; font-size: 1.1rem; letter-spacing: -.01em; }
.abs-head .muted { margin: 0 0 .5rem; }
.abs-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.abs-cal-btns { display: flex; gap: .4rem; align-items: flex-start; flex-shrink: 0; position: relative; }
.btn.mini { margin: 0; padding: .38rem .75rem; font-size: .8rem; border-radius: 8px; }
.abs-sub-panel { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 20;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: .85rem 1rem; box-shadow: var(--shadow-lg); min-width: 300px; max-width: 360px; }
.abs-sub-inner { display: flex; flex-direction: column; gap: .55rem; position: relative; padding-top: .35rem; }
.abs-sub-close {
  position: absolute; top: -.6rem; right: -.6rem; width: 1.6rem; height: 1.6rem;
  display: flex; align-items: center; justify-content: center; padding: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 50%;
  box-shadow: var(--shadow-sm); font-size: .8rem; line-height: 1;
}
.abs-sub-open { display: block; text-align: center; text-decoration: none; }
.abs-sub-note { margin: .1rem 0 0; font-size: .78rem; line-height: 1.45; }
.abs-sub-url-row { display: flex; align-items: center; gap: .4rem; }
.abs-sub-url-text { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px;
  padding: .25rem .45rem; font-size: .68rem; flex: 1; word-break: break-all; min-width: 0; }
.abs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.abs-month { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .7rem .85rem .8rem; box-shadow: var(--shadow); }
.abs-month.is-empty { background: var(--panel2); box-shadow: none; }
.abs-mhead { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; padding-bottom: .4rem; border-bottom: 2px solid var(--green-tint); }
.abs-mname { font-weight: 800; font-size: .92rem; color: var(--green-dark); }
.abs-count { font-size: .7rem; font-weight: 800; color: #fff; background: var(--green); border-radius: 999px; padding: .08rem .5rem; }
.abs-month.is-empty .abs-mname { color: var(--muted); font-weight: 700; }
.abs-month.is-empty .abs-mhead { border-bottom-color: var(--line); margin-bottom: 0; padding-bottom: 0; }
.abs-none { font-size: .8rem; color: var(--muted); font-style: italic; padding: .15rem 0 .1rem; }
.abs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.abs-item { display: grid; grid-template-columns: auto 1fr; gap: .05rem .55rem; font-size: .82rem; line-height: 1.3; padding-bottom: .45rem; border-bottom: 1px dashed var(--line); }
.abs-item:last-child { border-bottom: none; padding-bottom: 0; }
.abs-dates { grid-row: 1 / span 2; align-self: start; font-weight: 800; color: var(--text); white-space: nowrap; padding-top: .05rem; }
.abs-who { font-weight: 700; }
.abs-yr { font-weight: 700; color: var(--muted); font-size: .72rem; }
.abs-type { color: var(--muted); font-size: .76rem; }
.abs-pend { color: var(--amber); font-weight: 800; font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; margin-left: .25rem; }
.abs-cover { grid-column: 2; color: var(--green); font-size: .72rem; }

.req { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.4rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.phone-confirm { margin: .6rem 0 .2rem; padding: .65rem .85rem; background: #eef5fb; border: 1px solid #cfe0f0; border-radius: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.phone-confirm .btn { margin: 0; }
/* Access / WPAFB supervisor picker (request preview) */
.impact-row.sup-pick { background: var(--green-tint); border-radius: 10px; }
.sup-opts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.sup-opt { cursor: pointer; font-size: .85rem; font-weight: 700; padding: .4rem .8rem; border-radius: 999px;
  background: var(--panel); color: var(--green-dark); border: 1px solid var(--green-range); }
.sup-opt:hover { background: #fff; border-color: var(--green); }
.sup-opt.on { background: var(--green); color: #fff; border-color: var(--green); }
/* Which of your leave days land on this site, next to the heading. */
.sup-when { font-weight: 600; font-size: .82rem; color: var(--muted); }
/* Standing answer to "so who actually gets emailed?" — the point of this picker. */
.sup-status { display: block; margin-top: .5rem; font-size: .78rem; font-weight: 700; color: var(--muted); }
.sup-status.on { color: var(--green-status, var(--green-dark)); }
.sup-contact-list { display: grid; gap: .4rem; margin-top: .55rem; }
.sup-contact-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem .55rem; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 9px; }
.sup-contact-row > span { font-size: .8rem; font-weight: 800; }
.sup-contact-row .att-contact-edit { min-width: 0; }

@media (max-width: 640px) {
  .att-contact-fields { grid-template-columns: 1fr; }
  .att-contact-edit { min-width: 100%; }
  .att-contact-btn { max-width: 100%; }
  .att-contact-btn small { display: none; }
  .sup-contact-row { align-items: flex-start; flex-direction: column; }
}

/* Active-duty LeaveWeb confirmation gate (military) */
.leaveweb-confirm { margin: .6rem 0 .2rem; padding: .7rem .9rem; background: #fff8ec; border: 1px solid #f3e2c0; border-radius: 10px; }
.leaveweb-confirm .lw-head { display: block; font-weight: 800; color: var(--amber); font-size: .9rem; }
.leaveweb-confirm p { margin: .35rem 0 .6rem; font-size: .84rem; line-height: 1.5; }
.leaveweb-confirm .btn { margin: 0; }
.push-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 .2rem; }
.push-row .btn { margin: 0; }
.req-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.req-head h3 { margin: 0; font-size: 1rem; }
.req-glance { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: .45rem 0 .2rem; color: var(--muted); font-size: .8rem; font-weight: 650; }
.req-details { margin: .8rem 0 .35rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); overflow: hidden; }
.req-details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .55rem; padding: .68rem .82rem; color: var(--green-dark); font-size: .84rem; font-weight: 800; }
.req-details > summary::-webkit-details-marker { display: none; }
.req-details > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.req-details[open] > summary::before { transform: rotate(90deg); }
.req-details > summary:hover { background: var(--green-tint); }
.req-details-glance { margin-left: auto; color: var(--muted); font-size: .72rem; font-weight: 600; }
.req-details-body { padding: .1rem .82rem .82rem; border-top: 1px solid var(--line); }
.req-detail-heading { margin: .8rem 0 .25rem; font-size: .8rem; }
.req-history { margin-top: .75rem; border-top: 1px solid var(--line); padding-top: .55rem; }
.req-history > summary { cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 750; }
.req-history .timeline { margin-top: .5rem; }
.status { font-size: .7rem; font-weight: 800; padding: .25rem .65rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.status.pending { background: #fdf3df; color: var(--amber); }
.status.approved { background: #e3f5ec; color: var(--green-status); }
.status.denied { background: #fbe7e4; color: var(--red); }
.status.attention { background: #fbe7e4; color: var(--red); }
.req .meta { color: var(--muted); font-size: .82rem; margin: .4rem 0 .2rem; }
.req .req-note { font-size: .85rem; font-weight: 600; margin: .5rem 0 .2rem; }
.req .req-note.pending { color: var(--amber); }
.req .req-note.approved { color: var(--green-status); }
.req .req-note.denied { color: var(--red); background: #fbeae7; border: 1px solid #f3cfca; border-radius: 9px; padding: .5rem .65rem; line-height: 1.45; }
.req .req-note.denied .deny-next { display: block; margin-top: .2rem; color: #7d3026; }
.req .req-note.attention { color: var(--red); }

/* Program-wide archive: one compact disclosure per resident, ordered by their
   most recent submission. Individual request cards stay hidden until needed. */
.resident-request-archive { margin-top: 1rem; }
.resident-archive-head { margin: 0 0 .65rem; padding: 0 .15rem; }
.resident-archive-head h2 { margin: 0; font-size: 1rem; }
.resident-archive-head p { margin: .2rem 0 0; font-size: .8rem; }
.resident-request-group { margin: 0 0 .6rem; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.resident-request-group.has-pending { border-left: 4px solid var(--amber); }
.resident-request-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: .75rem .9rem; }
.resident-request-group > summary::-webkit-details-marker { display: none; }
.resident-request-group > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.resident-request-group[open] > summary::before { transform: rotate(90deg); }
.resident-request-group > summary:hover { background: var(--green-tint); }
.rrg-name { font-weight: 800; color: var(--text); }
.rrg-latest { color: var(--muted); font-size: .75rem; }
.rrg-badge { font-size: .68rem; font-weight: 800; border-radius: 999px; padding: .12rem .48rem; }
.rrg-badge.pending { background: #fdf3df; color: var(--amber); }
.rrg-badge.denied { background: #fbe7e4; color: var(--red); }
.rrg-count { margin-left: auto; color: var(--muted); font-size: .75rem; font-weight: 700; }
.resident-request-list { padding: .75rem; border-top: 1px solid var(--line); background: var(--panel2); }
.resident-request-list .req { margin-bottom: .65rem; box-shadow: none; }
.resident-request-list .req:last-child { margin-bottom: 0; }

.approvals { display: flex; flex-direction: column; gap: .35rem; margin: .7rem 0; }
.approval { display: flex; align-items: center; gap: .6rem; font-size: .85rem; font-weight: 600; flex-wrap: wrap; }
.delivery-path { flex-basis: 100%; padding-left: 1.55rem; font-size: .74rem; font-weight: 500; line-height: 1.35; color: var(--muted); }
.delivery-path.sms { color: #285f55; }
.delivery-path.email { color: #6b5b2a; }

/* "Text them": the resident copies a ready-written message and sends the one-tap
   approval link from their own phone. The panel is a sibling of .approval (a flex
   row), so it needs full width to sit underneath rather than squeeze into the row. */
.txt-btn { margin: 0 0 0 auto; white-space: nowrap; }
.txt-sent { font-size: .72rem; font-weight: 700; color: var(--green-status, var(--green-dark)); white-space: nowrap; }
.txt-panel {
  flex-basis: 100%; width: 100%; margin: .5rem 0 .7rem;
  padding: .7rem .8rem; background: var(--panel2, #f5f8f6);
  border: 1px solid var(--line); border-radius: 10px;
}
.txt-lead { margin: 0 0 .5rem; font-size: .8rem; font-weight: 500; line-height: 1.5; color: var(--muted); }
.txt-lead b { color: var(--text); }
.txt-body {
  width: 100%; box-sizing: border-box; margin: 0; resize: vertical;
  font: inherit; font-size: .82rem; font-weight: 400; line-height: 1.5;
  padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.txt-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.txt-actions .btn { margin: 0; }
.txt-ok { font-size: .78rem; font-weight: 700; color: var(--green-status, var(--green-dark)); }
.delivery-explainer { margin: .55rem 0 .9rem; padding: .75rem .9rem; background: var(--panel2, #f5f8f6); border: 1px solid var(--line); border-radius: 10px; }
.delivery-explainer ol { margin: .45rem 0 0; padding-left: 1.25rem; }
.delivery-explainer li { margin: .25rem 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.approved { background: var(--green-status); }
.dot.denied { background: var(--red); }
.dot.pending { background: var(--amber); }
.step { color: var(--muted); font-size: .75rem; margin-left: auto; font-weight: 500; }

.timeline { list-style: none; padding: 0; margin: .7rem 0 0; border-top: 1px solid var(--line); padding-top: .7rem; }
.timeline li { font-size: .8rem; color: var(--muted); padding: .15rem 0; }

@media (max-width: 560px) {
  .req { padding: 1rem; }
  .req-head { align-items: flex-start; }
  .req-details > summary { align-items: flex-start; flex-wrap: wrap; }
  .req-details-glance { flex-basis: 100%; margin-left: 1rem; }
  .resident-request-group > summary { flex-wrap: wrap; }
  .rrg-latest { flex-basis: 100%; margin-left: 1rem; }
  .rrg-count { margin-left: 0; }
}

/* Messages */
.msg { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; margin-bottom: .7rem; box-shadow: var(--shadow); }
.msg-head { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); margin-bottom: .45rem; flex-wrap: wrap; }
.tagpill { font-size: .66rem; font-weight: 800; padding: .14rem .5rem; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.tagpill.sms { background: var(--green-tint); color: var(--green-dark); }
.tagpill.email { background: #fdf0d3; color: #97700f; }
.msg-body { font-size: .85rem; white-space: pre-wrap; line-height: 1.55; }
.msg-body a { color: var(--green); font-weight: 600; }
.msg .subj { font-weight: 700; color: var(--text); margin-bottom: .25rem; }

/* Roster: collapsed, grouped-by-class accordion so it isn't a wall of 60+ names. */
.roster { display: flex; flex-direction: column; gap: .5rem; }
.roster-total { margin: 0 0 .2rem; }
.roster-group { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.roster-group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem;
  padding: .6rem .85rem; font-weight: 700; font-size: .9rem; color: var(--text);
}
.roster-group > summary::-webkit-details-marker { display: none; }
.roster-group > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.roster-group[open] > summary::before { transform: rotate(90deg); }
.roster-group > summary:hover { background: var(--green-tint); }
.rg-count { margin-left: auto; background: var(--green); color: #fff; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .1rem .55rem; min-width: 1.6rem; text-align: center; }
.roster-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; padding: .1rem .85rem .7rem; }
.roster-person { display: flex; flex-direction: column; padding: .35rem 0; border-top: 1px solid var(--line); }
.rp-name { font-size: .85rem; font-weight: 600; }
.rp-email { color: var(--muted); font-size: .72rem; }
/* Attending phone-number editor (one at a time via a dropdown). */
.attph-stat { margin: 0 0 .6rem; }
.attph-editor { display: flex; flex-direction: column; gap: .15rem; }
.attph-pick, .attph-num { display: block; margin: .45rem 0 0; font-size: .82rem; font-weight: 700; color: var(--text); }
.attph-editor select, .attph-editor input { max-width: 360px; }
.attph-editor .btn { align-self: flex-start; }
/* Active-duty military roster checklist (Admin tab). */
.mil-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .35rem .9rem; margin: .5rem 0; }
.mil-row { display: flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 600; margin: 0; }
.mil-row input { width: auto; margin: 0; }
.empty { color: var(--muted); font-size: .9rem; text-align: center; padding: 2rem; }
/* 🎉 Celebration toast (paired with the confetti burst on a fresh approval). */
.celebrate-toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-24px);
  z-index: 10000; max-width: 92vw; text-align: center; cursor: pointer;
  background: var(--green-dark); color: #fff; font-weight: 800; font-size: .95rem;
  padding: .7rem 1.15rem; border-radius: 12px; border: 2px solid var(--gold);
  box-shadow: 0 10px 34px rgba(16, 36, 30, .28);
  opacity: 0; transition: opacity .35s ease, transform .35s ease;
}
.celebrate-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Soft non-blocking toasts (submit success, network hiccups, draft restore). */
.soft-toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(18px);
  z-index: 10000; max-width: min(480px, 92vw); text-align: center; cursor: pointer;
  background: #1a2e26; color: #fff; font-weight: 600; font-size: .88rem; line-height: 1.4;
  padding: .7rem 1.1rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 36px rgba(16, 36, 30, .32);
  opacity: 0; transition: opacity .28s ease, transform .28s ease;
}
.soft-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.soft-toast-ok { background: var(--green-dark); border-color: var(--gold); }
.soft-toast-error { background: #7a1f1a; border-color: #e07a5f; }
.soft-toast-info { background: #1a2e26; }
/* Unfinished leave draft banner (top of app after sign-in). */
.draft-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
  margin: 0 0 .85rem; padding: .7rem .95rem;
  background: #fff8e6; border: 1px solid #f0d48a; border-left: 4px solid var(--gold);
  border-radius: 12px; font-size: .88rem; line-height: 1.45; color: #3a3020;
}
.draft-banner .draft-act { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
/* Inline spinner used in the impact-preview loading state. */
.spinner.inline-spin {
  display: inline-block; width: 14px; height: 14px; margin-right: .35rem;
  border: 2px solid rgba(0,84,59,.2); border-top-color: var(--green-dark);
  border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Member status table (owner-only admin card). */
.drive-note { margin-bottom: .8rem; padding: .6rem .9rem; border: 1px solid #cfe3d8; background: #eef7f1; border-radius: 10px; font-size: .85rem; line-height: 1.8; }
.drive-note .btn.mini { margin: 0 .25rem; vertical-align: baseline; }
.ms-row { border-bottom: 1px solid var(--line); padding: .3rem 0; font-size: .85rem; }
.ms-row:last-child { border-bottom: 0; }
.ms-main { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ms-main .ms-name { font-weight: 600; flex: 1 1 160px; min-width: 140px; }
.ms-main .ms-role { width: auto; }
.ms-adm { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; white-space: nowrap; }
.ms-actions { display: inline-flex; align-items: center; gap: .4rem; margin-left: auto; white-space: nowrap; }
.ms-details { margin: .4rem 0 .5rem; padding: .6rem .7rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.ms-details .grid2 { margin-bottom: .3rem; }
.ms-chief { display: flex; align-items: center; gap: .4rem; margin: .3rem 0; cursor: pointer; }
.ms-notify { margin: .4rem 0; padding-top: .4rem; border-top: 1px dashed var(--line); }
.ms-notify-head { font-weight: 700; font-size: .78rem; margin-bottom: .25rem; }
.ms-notify-opt { display: flex; align-items: center; gap: .4rem; padding: .12rem 0; cursor: pointer; }
.ms-details-foot { margin-top: .5rem; padding-top: .4rem; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: space-between; }
.ms-merge { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.ms-merge-sel { max-width: 300px; font-size: .78rem; }
.ms-yearly { margin-top: .7rem; padding-top: .55rem; border-top: 1px dashed var(--line); }
.ms-yearly .muted { display: block; margin-top: .3rem; }
.ms-add { margin-bottom: .6rem; padding: .55rem .7rem; border: 1px dashed var(--line); border-radius: 10px; background: var(--panel2); }
.ms-add-fields { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ms-add-fields input[type="text"] { flex: 1 1 180px; }
.ms-add-fields input[type="email"] { flex: 1 1 200px; }
.ms-add-fields input[type="number"] { width: 3.5rem; }
#msAddPgyWrap { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); }
#msAddPgyWrap.hidden { display: none; }
.ms-ok { color: var(--green); font-weight: 700; margin-left: .3rem; }

/* Step 1 view toggle: Calendar vs Quick pick (a segmented control). */
.view-toggle { display: inline-flex; margin: .2rem 0 .7rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.view-toggle .seg { margin: 0; padding: .42rem .85rem; border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: .82rem; border-radius: 8px; cursor: pointer; }
.view-toggle .seg.active { background: #fff; color: var(--green-dark); box-shadow: var(--shadow); }
.view-toggle .seg:hover:not(.active) { color: var(--green); }

/* Quick-pick (simple) date view — large native date fields, friendly on phones. */
.simplepicker { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; margin: .3rem 0 .2rem; }
.sp-field { display: block; margin: 0 0 .8rem; font-size: .9rem; font-weight: 700; color: var(--text); }
.sp-field:last-of-type { margin-bottom: 0; }
.sp-field input[type=date] { width: 100%; max-width: 340px; margin-top: .35rem; font-weight: 500; }
.sp-hint { font-weight: 500; color: var(--muted); font-size: .78rem; }
.simplepicker .cal-summary { margin-top: 1rem; }
.sp-context { width: 100%; margin-top: .4rem; font-size: .82rem; line-height: 1.4; color: var(--muted); }
.sp-warn { color: var(--amber); font-weight: 700; }
.sp-ok { color: var(--green); font-weight: 700; }
.sp-note { margin: .7rem 0 0; font-size: .8rem; }

/* Range calendar picker */
.rangepicker { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; margin: .3rem 0 .2rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.cal-block { display: flex; align-items: flex-start; gap: .4rem; font-size: .76rem; color: var(--green-dark); background: var(--gold-soft); border-radius: 8px; padding: .35rem .65rem; margin-bottom: .7rem; }
.cal-block b { font-weight: 800; }
.cal-block-x { flex: none; margin-left: auto; align-self: flex-start; background: none; border: none; color: var(--green-dark); cursor: pointer; font-size: .8rem; line-height: 1; padding: .1rem .25rem; border-radius: 6px; opacity: .5; font-family: inherit; }
.cal-block-x:hover { opacity: 1; background: rgba(0,0,0,.07); }
.cal-title { font-weight: 800; font-size: .98rem; }
.cal-nav { background: var(--panel2); border: 1px solid var(--line); color: var(--text); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 1.15rem; line-height: 1; margin: 0; padding: 0; display: grid; place-items: center; }
.cal-nav:hover { border-color: var(--green); color: var(--green); background: var(--green-tint); }
/* minmax(0, 1fr) — NOT plain 1fr (= minmax(auto,1fr)) — so a wide non-wrapping
   day label (rotation abbrev) can't force its column past 1/7 of the width.
   Plain 1fr let one long label widen the whole grid past the container on
   some months, so the day columns drifted out from under the weekday headers. */
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-bottom: 5px; }
.cal-dow span { text-align: center; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .15rem 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
/* Top-anchor the cell contents (with a fixed top inset) so the day NUMBER sits at
   the same height in every cell — regardless of whether that day also carries a
   rotation label, "new rotation" caption, or exception band. Centering the whole
   stack used to let the number drift up/down depending on a cell's annotations. */
.cal-cell { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; padding: 26% 0 0; background: var(--tint, transparent); border: 1.5px solid transparent; border-radius: 10px; color: var(--text); font-size: .85rem; font-weight: 600; cursor: pointer; margin: 0; font-family: inherit; overflow: hidden; transition: background .08s, border-color .08s; }
.cal-cell .d { line-height: 1; }
.cal-cell .rot-label { font-size: .54rem; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--green-dark); max-width: 94%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.cal-cell .rot-label .rot-cont { font-style: italic; font-weight: 700; opacity: .75; text-transform: none; }
/* R3 split AM/PM label: two stacked site codes with a thin divider. */
.cal-cell .rot-label.two { display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.1; max-width: 100%; }
.cal-cell .rot-label.two b { font-size: .52rem; font-weight: 800; }
.cal-cell .rot-label.two b:first-child { border-bottom: 1px solid rgba(0,84,59,.25); padding-bottom: 1px; }
.cal-cell.empty { cursor: default; }
.cal-cell:not(.empty):hover { border-color: var(--green); }
/* "Today" marker: a bold green ring + a green dot, so it clearly stands out. */
.cal-cell.today { font-weight: 900; color: var(--green-dark); box-shadow: inset 0 0 0 2.5px var(--green-status); }
.cal-cell.today::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--green-status);
}
.cal-cell.today.sel { box-shadow: inset 0 0 0 2.5px var(--gold); }
.cal-cell.today.sel::after, .cal-cell.today.in-range::after { background: #fff; }
/* Clear gold brackets marking each rotation block's first "[" and last "]" day. */
.cal-cell.block-start::before, .cal-cell.block-end::before {
  content: ""; position: absolute; top: 5px; bottom: 5px; width: 9px; border: 2px solid var(--gold); pointer-events: none;
}
.cal-cell.block-start::before { left: 2px; border-right: none; border-radius: 5px 0 0 5px; }
.cal-cell.block-end::before { right: 2px; border-left: none; border-radius: 0 5px 5px 0; }
/* 30-day advance-notice marking: days too soon for vacation/educational leave
   get a thin red rule across the very top, bridging the grid gap so it reads as
   one continuous line, with a tiny red note labeling the start of each run. */
.cal-cell.edge-week { overflow: visible; }
.cal-cell.edge-week .edge-bar {
  position: absolute; top: 0; left: -3px; right: -3px; height: 2px;
  background: var(--red); pointer-events: none; z-index: 3;
}
.notice-legend {
  margin: .55rem 0 .1rem; padding: .5rem .7rem; font-size: .78rem; line-height: 1.5;
  color: var(--text); background: #fff7e6; border: 1px solid #f3e2c0; border-radius: 9px;
}
.cal-cell.edge-week .edge-note {
  position: absolute; top: 3px; left: 2px; z-index: 3;
  font-size: .42rem; font-weight: 800; line-height: 1; letter-spacing: .01em;
  text-transform: uppercase; color: var(--red); white-space: nowrap;
  pointer-events: none; opacity: .92;
}
.cal-cell.edge-week.sel .edge-note, .cal-cell.edge-week.in-range .edge-note { color: #fff; }
/* Cartoon "switch rotations" marker on the first day of each block: a horizontal
   swoop arrow sweeping in from the previous day's box on the left and pointing right
   into the new rotation + a tiny caption. block-start cells need overflow visible so
   the arrow can extend left over the gap into the previous box. */
.cal-cell.block-start { overflow: visible; }
.cal-cell .rot-arrow {
  position: absolute; top: 50%; left: -24px; transform: translateY(-50%);
  width: 50px; height: 23px; z-index: 5;
  pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(16, 36, 30, .3));
}
.cal-cell .rot-switch-cap {
  position: absolute; top: 4px; right: 4px; z-index: 5; pointer-events: none;
  font-size: .5rem; font-weight: 900; line-height: 1; letter-spacing: .02em;
  text-transform: uppercase; color: var(--green-dark); white-space: nowrap;
}
.cal-cell.sel .rot-switch-cap, .cal-cell.in-range .rot-switch-cap { color: #fff; }
.cal-cell.in-range { background: var(--green-range); color: var(--green-dark); border-radius: 0; }
.cal-cell.sel { background: var(--green); color: #fff; border-color: var(--green); }
.cal-cell.sel .rot-label { color: #fff; }
.cal-cell.sel.start { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-cell.sel.end { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-summary { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cal-summary b { color: var(--text); }
.cal-clear { background: #fff; border: 1px solid var(--red); color: var(--red); border-radius: 8px; padding: .35rem .8rem; font-size: .8rem; font-weight: 700; cursor: pointer; margin: 0; white-space: nowrap; }
.cal-clear:hover { background: var(--red); color: #fff; }
.cal-tip { font-size: .76rem; color: var(--muted); font-style: italic; }
/* Compact, collapsible "edit exact dates" control under the calendar summary. */
.cal-edit-toggle { margin: .45rem 0 0; padding: 0; background: none; border: none; color: var(--green); font-size: .8rem; font-weight: 700; cursor: pointer; }
.cal-edit-toggle:hover { color: var(--green-dark); text-decoration: underline; }
.date-adjust { display: flex; flex-wrap: wrap; gap: .55rem .9rem; margin: .5rem 0 .1rem; padding: .65rem .8rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.date-adjust[hidden] { display: none; }
.date-adjust label { display: flex; flex-direction: column; gap: .2rem; margin: 0; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.date-adjust input { width: auto; margin: 0; padding: .4rem .5rem; font-size: .82rem; }

@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .roster-list { grid-template-columns: 1fr; } }

/* Push notifications + calendar export */
.rem-toggle { display: flex; align-items: center; gap: .5rem; font-size: .92rem; margin: .3rem 0; cursor: pointer; }
.rem-toggle input { width: auto; margin: 0; }
.rem-saved { font-size: .82rem; color: var(--green-dark); margin-top: .5rem; min-height: 1em; font-weight: 600; }
#pushEnabled { margin: 0; }
.push-help { font-weight: 500; color: var(--muted); }
/* Notification email preferences card */
.email-alt-label { display: block; margin: .6rem 0 .3rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.email-alt-label input { max-width: 320px; }
.emailprefs-actions { display: flex; align-items: center; gap: .8rem; margin-top: .6rem; }
.emailprefs-actions .rem-saved { margin-top: 0; }
.push-setup { margin-top: .5rem; font-size: .85rem; }
.push-setup summary { cursor: pointer; color: var(--green-dark); font-weight: 700; list-style: revert; }
.push-setup ol { margin: .55rem 0 .35rem 1.1rem; padding: 0; line-height: 1.55; }
.push-setup li { margin-bottom: .4rem; }
.cal-export { display: flex; flex-direction: column; gap: .6rem; }
.cal-export-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cal-export-label { font-weight: 700; font-size: .9rem; min-width: 8.5rem; }
.cal-export-row a.btn { text-decoration: none; }

/* Link to the completed, filled WSU leave-request form on an approved request. */
.req .form-link { font-size: .85rem; margin: .15rem 0 .45rem; }
.req .form-link a { color: var(--green, #00543b); font-weight: 700; text-decoration: none; }
.req .form-link a:hover { text-decoration: underline; }
.req .form-link .muted { font-weight: 400; }

/* Keep a leave date range (start → end) on one line so the arrow reads left-to-right. */
.rectable .daterange { white-space: nowrap; }

/* "What's holding up your request" banner above the submit button. */
.submit-blocker { display: flex; gap: .6rem; align-items: flex-start; margin: .2rem 0 .7rem; padding: .75rem .9rem; background: #fdecea; border: 1px solid #f3b7ad; border-left: 4px solid var(--red); border-radius: 11px; }
.submit-blocker .sb-ico { font-size: 1.15rem; line-height: 1.2; }
.submit-blocker .sb-body { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; line-height: 1.5; }
.submit-blocker .sb-body b { color: var(--red); }
.submit-blocker .sb-fix { font-weight: 600; }

/* Submit button when something needs fixing first: stays clickable (clicking
   jumps to the fix) instead of the flat "dead/disabled" grey — an amber
   "action needed" look makes clear it's still interactive. */
.btn.primary.needs-action {
  background: #fff8ec; border: 1px solid #f0cf8a; color: var(--amber);
  box-shadow: none; cursor: pointer;
}
.btn.primary.needs-action:hover { background: #fdefd2; border-color: var(--gold); color: var(--amber); transform: translateY(-1px); }

/* Brief highlight pulse on the field a blocked-submit click jumps to. */
@keyframes wl-jump-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,169,0,0); } 30% { box-shadow: 0 0 0 4px rgba(242,169,0,.35); } }
.jump-highlight { animation: wl-jump-pulse 1.6s ease; border-radius: 10px; }

/* --- Footer bug/feature link + report modal + admin review list --- */
.site-foot {
  max-width: 880px; margin: .5rem auto 2rem; padding: .9rem 1rem 0;
  border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: center; justify-content: space-between;
}
.foot-brand { font-size: .78rem; color: var(--muted); }
.foot-link {
  background: none; border: none; cursor: pointer; font: inherit; font-size: .8rem;
  font-weight: 600; color: var(--green-dark); text-decoration: underline; padding: 0;
}
.foot-link:hover { color: var(--green-status); }
.foot-legal { font-size: .72rem; color: var(--muted); }
.foot-legal a { color: var(--muted); }

.fb-types { display: flex; gap: .4rem; margin: .2rem 0 .4rem; }
.fb-type {
  margin: 0; padding: .4rem .9rem; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: .85rem; font-weight: 700; cursor: pointer;
}
.fb-type:hover { border-color: var(--green); color: var(--green); }
.fb-type.active { background: var(--green); border-color: var(--green); color: #fff; }
#feedbackModal textarea { font-family: inherit; font-size: .9rem; }

.fb-item { border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 11px; padding: .65rem .85rem; margin: .5rem 0; }
.fb-item.resolved { opacity: .6; border-left-color: var(--line); }
.fb-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.fb-tag { font-size: .72rem; font-weight: 800; padding: .15rem .5rem; border-radius: 7px; white-space: nowrap; }
.fb-tag.bug { background: #fbe7e4; color: var(--red); }
.fb-tag.feature { background: var(--green-tint); color: var(--green-dark); }
.fb-meta { font-size: .76rem; color: var(--muted); flex: 1 1 auto; }
.fb-row .btn { margin: 0; }
.fb-text { margin-top: .4rem; font-size: .88rem; line-height: 1.5; white-space: pre-wrap; }

/* Pending Google sign-ins awaiting admin approval (Admin tab). */
.pend-item { border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 11px; padding: .65rem .85rem; margin: .5rem 0; }
.pend-row { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; justify-content: space-between; }
.pend-who { display: flex; flex-direction: column; }
.pend-who b { font-size: .95rem; }
.pend-email { font-size: .78rem; color: var(--muted); }
.pend-when { font-size: .74rem; color: var(--muted); }
.pend-actions { display: flex; align-items: flex-end; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.pend-actions label { margin: 0; font-size: .72rem; font-weight: 700; }
.pend-actions select { margin: 0; width: auto; min-width: 11rem; }
.pend-actions .btn { margin: 0; }
.btn.mini.danger { color: var(--red); border-color: #f3cfca; }
.btn.mini.danger:hover { background: #fbe7e4; border-color: var(--red); }

/* Owner "view as anyone" — return banner + top-bar picker. */
.imp-banner {
  display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap;
  margin: 0 0 1rem; padding: .6rem .9rem; border-radius: 12px;
  background: #fff3d6; border: 1px solid #f0d48a; border-left: 4px solid var(--gold);
  color: #6b4e00; font-size: .9rem; font-weight: 600;
}
.imp-banner .btn.mini { margin: 0; }
/* Nudge note: add vacation days already approved via the old paper process.
   Compact, sits inside the request card just above the Step 1 calendar. */
.paper-banner {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin: 0 0 .75rem; padding: .4rem .7rem; border-radius: 10px;
  background: #e7f2ff; border: 1px solid #a9cdf2; border-left: 3px solid #2f7bd0;
  color: #0f3f6e; font-size: .8rem; font-weight: 600;
}
.paper-banner .btn.mini { margin: 0; padding: .2rem .55rem; font-size: .75rem; }
.paper-banner-btns { display: flex; gap: .5rem; }
.viewas-sel {
  width: auto; margin: 0; padding: .25rem .5rem; font-size: .8rem; font-weight: 600;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 8px;
}
.viewas-sel option { color: var(--text); }

/* Owner backups card */
.backup-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .3rem 0 .2rem; }
.backup-actions .btn { margin: 0; text-decoration: none; }
.backup-list { display: flex; flex-direction: column; gap: .35rem; margin-top: .6rem; }
.backup-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 9px; padding: .45rem .7rem; font-size: .85rem; }
.backup-when { font-weight: 600; }
.backup-row-actions { display: flex; gap: .4rem; }
.backup-row-actions .btn { margin: 0; text-decoration: none; }
#backupMsg { margin-top: .5rem; }

/* Withdraw / amend actions on a resident's own request card */
.req-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0 .2rem; }
.req-actions .btn { margin: 0; }
.amend-form { margin: .4rem 0 .2rem; padding: .7rem .85rem; background: var(--green-tint); border: 1px solid #cfe0d7; border-radius: 12px; }
.amend-lead { margin: 0 0 .5rem; font-size: .86rem; line-height: 1.5; color: var(--text); }
.amend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.amend-form label { margin: .5rem 0 0; font-size: .78rem; font-weight: 700; color: var(--muted); }
.amend-form input, .amend-form select { margin-top: .25rem; }
.amend-act { display: flex; gap: .5rem; margin-top: .7rem; }
.amend-act .btn { margin: 0; }
@media (max-width: 560px) { .amend-grid { grid-template-columns: 1fr; } }

/* ---- Explanatory info dots + floating tooltip ----------------------------
   A small ⓘ dot you can place beside any label/heading. Reveals #tooltip on
   hover, keyboard focus, or tap — explains a feature without cluttering the UI. */
.infodot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: .3rem; vertical-align: middle;
  border-radius: 50%; border: 1px solid currentColor;
  font-size: 10px; font-weight: 800; font-style: italic; line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--green); opacity: .65; cursor: help; user-select: none;
  transition: opacity .12s, background .12s, color .12s;
}
.infodot:hover, .infodot:focus-visible { opacity: 1; background: var(--green); color: #fff; outline: none; }
/* On dark/green headers, let the dot inherit a light tone via .infodot.on-dark. */
.infodot.on-dark { color: rgba(255,255,255,.85); }
.infodot.on-dark:hover, .infodot.on-dark:focus-visible { background: #fff; color: var(--green-dark); }

#tooltip.tooltip {
  position: fixed; z-index: 9999; max-width: 280px;
  background: #14241e; color: #f3f7f5; font-size: .8rem; line-height: 1.45; font-weight: 500;
  padding: .55rem .7rem; border-radius: 10px; box-shadow: 0 6px 24px rgba(16,36,30,.28);
  pointer-events: none; /* never steals hover */
}
#tooltip.tooltip[hidden] { display: none; }
#tooltip.tooltip::after {
  content: ''; position: absolute; left: var(--arrow-x, 50%); transform: translateX(-50%);
  border: 6px solid transparent;
}
#tooltip.tooltip[data-place="above"]::after { top: 100%; border-top-color: #14241e; }
#tooltip.tooltip[data-place="below"]::after { bottom: 100%; border-bottom-color: #14241e; }

/* ---- Coordinator program overview (top bar for coordinators/admins) -------- */
.topgrid.coord { grid-template-columns: minmax(260px, 360px) 1fr; }
@media (max-width: 760px) { .topgrid.coord { grid-template-columns: 1fr; } }
.cstats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-content: start; }
.cstat {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 12px; padding: .55rem .7rem; box-shadow: var(--shadow); min-width: 0;
}
.cstat-num { font-size: 1.5rem; font-weight: 800; line-height: 1.05; color: var(--green-dark); letter-spacing: -.02em; }
.cstat-label { font-size: .72rem; color: var(--muted); font-weight: 600; margin-top: .15rem; line-height: 1.25; }
.cstat.c-pending { border-left-color: var(--amber); }
.cstat.c-pending .cstat-num { color: var(--amber); }
.cstat.c-flag { border-left-color: var(--red); }
.cstat.c-flag .cstat-num { color: var(--red); }
.cstat.c-rate { border-left-color: var(--green-status); }
.cstat.c-turn { border-left-color: #6b5b95; }
.cstat.c-turn .cstat-num { color: #6b5b95; }
.cstat.c-coord { border-left-color: #2980b9; }
.cstat.c-coord .cstat-num { color: #2980b9; }
.cstat.c-days { border-left-color: var(--gold); }
.cstat.c-final { border-left-color: #0d9488; }
.cstat.c-final .cstat-num { color: #0d9488; }
/* Approvals tab: the two trackers (final approval vs. awaiting attendings). */
.appr-section + .appr-section { margin-top: 1rem; }
.appr-section.sec-final { border-top: 3px solid #0d9488; }
.appr-section.sec-final h2 { color: #0d9488; }
.cstat-foot { display: block; margin-top: .5rem; font-size: .76rem; color: var(--muted); }
.cstat-foot b { color: var(--green-dark); }
.topchart .empty { padding: 2.2rem 1rem; }

/* ---- Leave Calendar (coordinator attendance view) ------------------------- */
.lc-section { margin-top: 1.5rem; }
.lc-head { font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: .8rem; }
.leave-cal { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
@media (max-width: 900px) { .leave-cal { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .leave-cal { grid-template-columns: 1fr; } }
.lc-month { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: .65rem .75rem; box-shadow: var(--shadow); min-width: 0; }
.lc-month.lc-quiet { opacity: .55; } /* kept for backwards compat but no longer applied */
.lc-mhead { display: flex; align-items: center; gap: .4rem; margin-bottom: .4rem;
  padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.lc-mname { font-size: .78rem; font-weight: 700; color: var(--green-dark); flex: 1; }
.lc-cnt { background: var(--green); color: #fff; font-size: .65rem; font-weight: 700;
  padding: .1em .45em; border-radius: 99px; min-width: 1.3em; text-align: center; line-height: 1.5; }
.lc-none { font-size: .76rem; color: var(--muted); padding: .25rem 0; border-top: 1px dashed var(--line); margin-top: .1rem; }
.lc-list { display: flex; flex-direction: column; gap: .3rem; }
.lc-row { display: flex; align-items: baseline; gap: .35rem; font-size: .72rem; flex-wrap: wrap;
  padding: .15rem 0; border-bottom: 1px solid var(--line); }
.lc-row:last-child { border-bottom: none; }
.lc-name { font-weight: 600; color: var(--ink); white-space: nowrap; }
.lc-meta { color: var(--muted); flex: 1; min-width: 0; font-size: .68rem; }
.lc-badge { font-size: .7rem; white-space: nowrap; flex-shrink: 0; }
.lc-badge.lc-pend { opacity: .8; }

/* ---- New-feature styles (parental, sick-day, notes, conflicts, condition, iCal) ---- */
/* Parental-leave length presets (Step 2). */
.parental-opts { margin-top: .7rem; padding: .7rem .85rem; background: #fff5fa; border: 1px solid #f3cfe2; border-left: 4px solid #c2569a; border-radius: 12px; }
.parental-lead { display: block; font-size: .85rem; font-weight: 700; color: #8a3a6b; }
.parental-btns { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.parental-note { display: block; font-size: .76rem; }


/* Coordinator private notes. */
.cnote { margin: .7rem 0 .2rem; padding: .6rem .75rem; background: #fffdf3; border: 1px solid #efe4bd; border-left: 4px solid var(--gold); border-radius: 10px; }
.cnote-label { display: block; font-size: .78rem; font-weight: 700; color: #7a5b00; margin-bottom: .2rem; }
.cnote-text { font-family: inherit; font-size: .85rem; }
.cnote-act { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .2rem; }
.cnote-meta { color: var(--muted); font-size: .74rem; }
.cnote-ok { color: var(--green-status); font-weight: 700; font-size: .78rem; }

/* Escalation countdown chips. */
.appr-etas { display: flex; flex-direction: column; gap: .15rem; margin: .3rem 0; }
.appr-eta { font-size: .74rem; color: #7a5b00; }
.approval .appr-eta { margin-left: .4rem; }

/* Coverage-conflict banner in the approvals queue. */
.appr-coverage { margin: .5rem 0; padding: .6rem .8rem; background: #fdecea; border: 1px solid #f1b0a8; border-left: 4px solid var(--red); border-radius: 10px; }
.acov-head { font-weight: 800; color: #a02617; font-size: .86rem; }
.acov-list { margin: .35rem 0 .5rem; padding-left: 1.1rem; font-size: .8rem; }
.acov-list li { margin: .15rem 0; }
.acov-status { font-weight: 700; text-transform: uppercase; font-size: .66rem; padding: .05rem .35rem; border-radius: 5px; background: #fff; }
.acov-status.approved { color: var(--green-status); } .acov-status.pending { color: var(--amber); }
.acov-ack { display: flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .82rem; color: #a02617; margin: 0; }
.acov-ack input { width: auto; margin: 0; }

/* Approve-with-condition. */
.appr-cond { margin: .4rem 0; }
.appr-cond-text { max-width: 480px; }
.cond-note { margin: .4rem 0; padding: .45rem .7rem; background: #fffdf3; border: 1px solid #efe4bd; border-radius: 9px; font-size: .82rem; color: #7a5b00; }
button[data-appr-cond].on { background: var(--green); color: #fff; border-color: var(--green); }

/* Program iCal feed card. */
.ical-box { margin-top: .6rem; }
.ical-act { display: flex; gap: .5rem; flex-wrap: wrap; }
.sum-ay { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; margin: 0 .4rem 0 0; }
.sum-ay select { width: auto; margin: 0; }

/* Inline field hint box — replaces faint in-field placeholders with a visible tip. */
.field-hint {
  margin: .3rem 0 .2rem; padding: .4rem .6rem;
  background: var(--green-tint); border: 1px solid #cfe0d7; border-radius: 8px;
  font-size: .76rem; line-height: 1.4; color: var(--green-dark);
}

/* ============================================================================
   Modern refresh (appended override layer) — cosmetic polish only: softer
   layered shadows, smoother radii, refined typography, tactile buttons/tabs,
   nicer focus states. Structural layout is untouched.
   ============================================================================ */
:root {
  --radius: 14px;
  --radius-lg: 20px;
  --ring: 0 0 0 3px rgba(0, 106, 77, .18);
  --shadow-sm: 0 1px 2px rgba(16, 36, 30, .05);
  --shadow: 0 1px 2px rgba(16, 36, 30, .04), 0 8px 24px rgba(16, 36, 30, .07);
  --shadow-lg: 0 6px 14px rgba(16, 36, 30, .06), 0 18px 48px rgba(16, 36, 30, .12);
}
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { background:
  radial-gradient(1200px 600px at 100% -10%, rgba(0,106,77,.05), transparent 60%),
  radial-gradient(900px 500px at -10% 0%, rgba(242,169,0,.06), transparent 55%),
  var(--bg); }

/* Cards: roomier radius, layered shadow, hairline border */
.card { border-radius: var(--radius-lg); box-shadow: var(--shadow); border-color: rgba(16,36,30,.07); }
.card h2 { letter-spacing: -.015em; }

/* Buttons: tactile press + lift, smooth transitions, modern focus ring */
.btn, .ltype, .seg, .iconbtn, .tab { transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .08s ease; }
.btn { border-radius: 11px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(180deg, #0a7a59, var(--green)); box-shadow: 0 1px 2px rgba(16,36,30,.12), 0 6px 16px rgba(0,106,77,.18); }
.btn.primary:hover { background: linear-gradient(180deg, var(--green), var(--green-dark)); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.btn:focus-visible, .ltype:focus-visible, .tab:focus-visible { box-shadow: var(--ring); }

/* Inputs: cleaner borders + soft focus ring */
input, select, textarea { border-radius: 11px; border-color: rgba(16,36,30,.14); transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { box-shadow: var(--ring); }

/* Request / list cards: subtle hover lift so they feel interactive */
.req { border-radius: var(--radius); transition: box-shadow .18s ease, transform .12s ease, border-color .18s ease; }
.req:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: rgba(0,106,77,.18); }

/* Badges + status pills: tighter, modern */
.badge { border-radius: 999px; font-variant-numeric: tabular-nums; }
.status { border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(16,36,30,.06); }
.chip { border-radius: 999px; }

/* Login card gets the elevated treatment */
.login-card { box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); }

/* Calendar cells: gentler corners + smoother hover */
.cal-cell { transition: background .12s ease, border-color .12s ease, transform .06s ease; }
.cal-cell:not(.empty):hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Approval card: status banner, action hint, compact private note ---- */
.appr-status { margin: .55rem 0 .15rem; padding: .55rem .75rem; border-radius: 10px; font-size: .86rem; line-height: 1.45; }
.appr-status.flag { background: #fbeae7; border: 1px solid #f3cfca; color: #8a2a1c; }
.appr-status.wait { background: #fff8e8; border: 1px solid #efe0b8; color: #7a5b00; }
.appr-status.ok   { background: #e8f6ee; border: 1px solid #bfe3cd; color: #16613f; }
.appr-act-hint { margin: .45rem 0 0; font-size: .78rem; color: var(--muted); line-height: 1.45; }
.appr-note-count { display: inline-block; margin-top: .45rem; padding: .2rem .5rem; border-radius: 7px; background: #fff8ec; color: var(--amber); font-size: .75rem; font-weight: 750; }
.appr-details { margin-top: .6rem; border-top: 1px solid var(--line); padding-top: .45rem; }
.appr-details > summary { cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 750; }
.appr-details-body { display: flex; flex-direction: column; gap: .35rem; padding: .55rem .15rem .1rem; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.appr-details-body .cnote { color: var(--text); }

.demo-tools { margin: .7rem 0 1rem; }
.demo-tools > summary { cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 700; }
.demo-tools .toolbar { margin-top: .45rem; }
/* Coordinator note collapses to a small one-line toggle until you open it */
.cnote { padding: .3rem .55rem; margin: .55rem 0 .1rem; }
.cnote-toggle { background: none; border: 0; padding: .2rem .1rem; margin: 0; font: inherit; font-size: .8rem; font-weight: 700; color: #7a5b00; cursor: pointer; }
.cnote-toggle:hover { text-decoration: underline; }
.cnote-toggle .muted { font-weight: 500; }
.cnote-dot { color: var(--gold); font-size: .7rem; }
.cnote-body { margin-top: .35rem; }

/* ---- Member roles & access: search + collapsible groups (calmer than a 140-row wall) ---- */
.ms-search { width: 100%; margin: .2rem 0 .6rem; }
.ms-groups { display: flex; flex-direction: column; gap: .35rem; }
.ms-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.ms-group-head { width: 100%; text-align: left; background: var(--panel2); border: 0; margin: 0;
  padding: .55rem .8rem; font: inherit; font-weight: 700; font-size: .9rem; color: var(--text);
  cursor: pointer; display: flex; align-items: center; gap: .5rem; }
.ms-group-head:hover { background: #e7efe9; }
.ms-caret { display: inline-block; transition: transform .15s ease; color: var(--muted); font-size: .8rem; }
.ms-group.open .ms-caret { transform: rotate(90deg); }
.ms-group-head .badge { margin-left: auto; background: var(--green-tint); color: var(--green-dark); }
.ms-group-body { padding: .25rem .6rem .5rem; }
.ms-admin-tag { display: inline-block; margin-left: .35rem; padding: .02rem .4rem; border-radius: 999px;
  background: var(--gold-soft); color: var(--green-dark); font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }

/* ---- Resident request card: breathing room between status note + calendar btn ---- */
.req .req-note { line-height: 1.45; margin: .6rem 0 .25rem; }
.req .form-link { margin: .4rem 0 .55rem; }
.req .form-link .btn { margin: 0; }

/* Sick / personal day modal — notify-everyone reminder. */
.sick-notice {
  margin: .2rem 0 .9rem; padding: .6rem .8rem;
  background: #fff8ec; border: 1px solid #f3e2c0; border-left: 4px solid var(--amber);
  border-radius: 10px; font-size: .82rem; line-height: 1.5; color: var(--text);
}
.sick-notice .infodot { margin-left: .15rem; vertical-align: baseline; }
.sick-notice-mil { display: block; margin-top: .35rem; font-size: .74rem; color: var(--muted); }

/* ---- Off-service (Internal Medicine / Neurology) marker: BLUE rule along the
   bottom of the cell (so it never collides with the red top rule) + a tiny note. ---- */
.cal-cell.offsvc-week .offsvc-bar {
  position: absolute; bottom: 0; left: -3px; right: -3px; height: 2px;
  background: #2f6fb0; pointer-events: none; z-index: 3;
}
.cal-cell.offsvc-week .offsvc-note {
  position: absolute; bottom: 2px; left: 2px; z-index: 3;
  font-size: .42rem; font-weight: 800; line-height: 1; letter-spacing: .01em;
  text-transform: uppercase; color: #2f6fb0; white-space: nowrap;
  pointer-events: none; opacity: .92;
}
.cal-cell.offsvc-week.sel .offsvc-note, .cal-cell.offsvc-week.in-range .offsvc-note { color: #fff; }

/* ---- Vacation flair: beach mural banner + ambient-wave toggle -------------- */
.beach-banner {
  position: relative; width: 100%; height: 84px; overflow: hidden;
  border-bottom: 3px solid var(--gold); box-shadow: var(--shadow-sm); line-height: 0;
}
.beach-svg { display: block; width: 100%; height: 100%; }
@media (max-width: 760px) { .beach-banner { height: 58px; } }
.bb-cloud { animation: bbCloud 70s linear infinite; }
.bb-cloud2 { animation-duration: 105s; }
@keyframes bbCloud { from { transform: translateX(-140px); } to { transform: translateX(1340px); } }
.bb-boat { animation: bbBoat 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bbBoat { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(2px) rotate(1.5deg); } }
.bb-foam { animation: bbFoam 7s ease-in-out infinite alternate; }
@keyframes bbFoam { from { transform: translateX(0); } to { transform: translateX(-14px); } }
/* Palm sways at the base; a little flock of gulls flaps across the sky. */
.bb-palm { transform-box: fill-box; transform-origin: 50% 100%; animation: bbPalm 5.5s ease-in-out infinite; }
@keyframes bbPalm { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.4deg); } }
.bb-birds { animation: bbBirds 30s linear infinite; }
/* Birds cross the other way to the clouds (clouds drift left→right, gulls right→left). */
@keyframes bbBirds { 0% { transform: translate(1360px, 4px); } 50% { transform: translate(600px, -6px); } 100% { transform: translate(-150px, 6px); } }
.bb-bird { transform-box: fill-box; transform-origin: center; animation: bbFlap .6s ease-in-out infinite; }
.bb-bird2 { animation-delay: -.2s; }
.bb-bird3 { animation-delay: -.4s; }
@keyframes bbFlap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
/* Ambient-wave toggle, tucked into the banner corner. */
.wave-toggle {
  position: absolute; right: 12px; bottom: 9px; display: inline-flex; align-items: center; gap: .35rem;
  margin: 0; padding: .28rem .62rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(0, 84, 59, .5); color: #fff; font: 800 .74rem var(--ui-font); cursor: pointer; line-height: 1;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); box-shadow: var(--shadow-sm);
}
.wave-toggle:hover { background: rgba(0, 84, 59, .72); }
.wave-toggle.on { background: var(--gold); color: var(--green-dark); border-color: var(--gold-soft); }
.wave-toggle.on .wave-ico { animation: waveBob 1.6s ease-in-out infinite; }
@keyframes waveBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) {
  .bb-cloud, .bb-boat, .bb-foam, .bb-palm, .bb-birds, .bb-bird, .wave-toggle.on .wave-ico { animation: none !important; }
}

/* FAQ / manual — sits above the login card, visible whether signed in or not. */
.faq-card { padding-top: 1.1rem; padding-bottom: 1.1rem; }
.faq-card > summary { cursor: pointer; list-style: none; font-size: 1.05rem; font-weight: 800; color: var(--green-dark); padding: .1rem 0; }
.faq-card > summary::-webkit-details-marker { display: none; }
.faq-card > summary::before { content: '▸'; display: inline-block; margin-right: .55rem; color: var(--muted); transition: transform .15s; }
.faq-card[open] > summary::before { transform: rotate(90deg); }
.faq-card > summary .faq-sub { display: block; margin: .2rem 0 0 1.4rem; font-size: .8rem; font-weight: 500; color: var(--muted); }
.faq-body { margin-top: 1rem; }
.faq-intro { margin: 0 0 1.2rem; padding: .7rem .9rem; background: var(--green-tint); border-radius: 10px; font-size: .85rem; line-height: 1.55; }
.faq-cat { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--green); margin: 1.5rem 0 .55rem; }
.faq-cat:first-of-type { margin-top: 0; }
.faq-item { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .5rem; overflow: hidden; }
.faq-item > summary { list-style: none; cursor: pointer; padding: .65rem .9rem; font-weight: 700; font-size: .87rem; color: var(--text); }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::before { content: '▸'; color: var(--muted); margin-right: .5rem; transition: transform .15s; }
.faq-item[open] > summary::before { transform: rotate(90deg); }
.faq-item > summary:hover { background: var(--green-tint); }
.faq-a { padding: 0 .95rem .9rem; font-size: .85rem; line-height: 1.62; color: var(--text); }
.faq-a p { margin: .5rem 0; }
.faq-a ul, .faq-a ol { margin: .4rem 0; padding-left: 1.25rem; }
.faq-a li { margin: .25rem 0; }
.faq-a b { color: var(--green-dark); }
.faq-a code { font-size: .8em; }
.faq-table { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: .83rem; }
.faq-table th, .faq-table td { text-align: left; padding: .4rem .55rem; border-bottom: 1px solid var(--line); }
.faq-table th { color: var(--muted); font-weight: 800; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.faq-table td:first-child, .faq-table th:first-child { padding-left: 0; }
