:root {
  --v19-focus: #6f5ad8;
  --v19-ink: #102f43;
  --v19-muted: #667b88;
}

.senior-mode-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #dbe5e9;
  border-radius: 13px;
  background: #fff;
  color: #294b5f;
  cursor: pointer;
}
.senior-mode-button span { font-size: .82rem; font-weight: 950; }
.senior-mode-button b { font-size: .68rem; white-space: nowrap; }
.senior-mode-button.active { border-color: #7b68d9; background: #f0edff; color: #5742b3; }

.department-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) 190px;
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
  padding: clamp(22px,4vw,38px);
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at 88% 15%,rgba(112,235,192,.25),transparent 31%),linear-gradient(135deg,#09283c,#0d5c55);
  box-shadow: 0 20px 50px rgba(17,53,69,.16);
}
.department-hero.sports { background: radial-gradient(circle at 88% 15%,rgba(255,214,111,.28),transparent 31%),linear-gradient(135deg,#15324d,#255a75); }
.department-hero.beautification { background: radial-gradient(circle at 88% 15%,rgba(193,255,134,.25),transparent 31%),linear-gradient(135deg,#173d36,#2f7251); }
.department-hero.maintenance { background: radial-gradient(circle at 88% 15%,rgba(141,205,255,.25),transparent 31%),linear-gradient(135deg,#163247,#3c6076); }
.department-hero h2 { margin: 6px 0 9px; max-width: 740px; font-size: clamp(1.6rem,4vw,2.55rem); line-height: 1.04; letter-spacing: -.045em; }
.department-hero p { max-width: 680px; color: rgba(255,255,255,.72); line-height: 1.55; }
.department-hero .eyebrow { color: rgba(255,255,255,.62); }
.department-pulse { display: grid; min-height: 156px; place-items: center; align-content: center; padding: 18px; border: 1px solid rgba(255,255,255,.14); border-radius: 24px; background: rgba(255,255,255,.09); text-align: center; backdrop-filter: blur(16px); }
.department-pulse span,.department-pulse small { color: rgba(255,255,255,.65); font-size: .65rem; }
.department-pulse strong { margin: 7px 0; font-size: 2.5rem; letter-spacing: -.06em; }
.department-lane-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.department-lane-grid button { min-height: 148px; padding: 18px; border: 1px solid #e0e8ec; border-radius: 20px; background: #fff; color: var(--v19-ink); text-align: left; cursor: pointer; transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.department-lane-grid button:hover,.department-lane-grid button:focus-visible { transform: translateY(-2px); border-color: #9f91e3; box-shadow: 0 14px 28px rgba(45,68,82,.1); outline: none; }
.department-lane-grid i { display: grid; width: 40px; height: 40px; place-items: center; margin-bottom: 13px; border-radius: 13px; background: #f0edff; color: #654fc6; font-style: normal; font-weight: 950; }
.department-lane-grid b,.department-lane-grid span { display: block; }
.department-lane-grid b { font-size: .88rem; }
.department-lane-grid span { margin-top: 5px; color: var(--v19-muted); font-size: .7rem; line-height: 1.4; }

.department-coverage-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 18px 0 24px; }
.department-coverage-grid article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e3e9ec; border-radius: 16px; background: #fbfcfd; }
.department-coverage-grid i { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #fff1ed; color: #b4533e; font-style: normal; font-weight: 950; }
.department-coverage-grid article.covered i { background: #e7f8f0; color: #087458; }
.department-coverage-grid b,.department-coverage-grid small { display: block; }
.department-coverage-grid small { margin-top: 3px; color: #71818a; font-size: .66rem; }
.department-coverage-grid em { color: #8a6c64; font-size: .64rem; font-style: normal; font-weight: 800; }
.department-coverage-grid article.covered em { color: #087458; }
.department-invite-note,.eid-privacy-card { display: flex; gap: 10px; margin-top: 14px; padding: 13px 14px; border-radius: 15px; background: #eef6ff; color: #4b6477; font-size: .72rem; line-height: 1.45; }
.department-invite-note b,.eid-privacy-card b { color: #315b86; white-space: nowrap; }
.auth-assurance { display: flex; gap: 10px; margin: 14px 0; padding: 13px 14px; border-radius: 15px; background: #edf8f4; color: #49675d; font-size: .74rem; line-height: 1.45; }
.auth-assurance b { color: #087458; white-space: nowrap; }
.auth-show-password { display: inline-flex; align-items: center; gap: 8px; margin-top: 9px; color: #506874; font-size: .72rem; cursor: pointer; }
.auth-show-password input { width: 18px; height: 18px; accent-color: #0a8a68; }

.eid-modal-head.v19 { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; }
.eid-online-state { align-self: start; padding: 7px 9px; border-radius: 999px; background: #eef9f4; color: #087458; font-size: .64rem; font-weight: 850; }
.eid-online-state.offline { background: #fff3ed; color: #a24e37; }
.eid-v19 { --eid-progress: 1; position: relative; }
.eid-v19::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 24px; box-shadow: inset 0 0 0 2px rgba(108,236,185,calc(.1 + var(--eid-progress) * .4)); }
.eid-brand-row em { margin-left: auto; padding: 5px 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #9ff0d0; font-size: .58rem; font-style: normal; font-weight: 900; }
.eid-v19 .eid-avatar { position: relative; }
.eid-v19 .eid-avatar i { position: absolute; right: -4px; bottom: -4px; display: grid; width: 22px; height: 22px; place-items: center; border: 3px solid #0b3944; border-radius: 50%; background: #76efbe; color: #064332; font-size: .65rem; font-style: normal; }
.eid-validity-cell strong { color: #8bf0c5; }
.eid-trust-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.eid-trust-row span { padding: 5px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); font-size: .58rem; }
.eid-countdown-ring { padding: 7px; border-radius: 19px; background: conic-gradient(#31c98d calc(var(--eid-progress) * 1turn),#dce4e7 0); }
.eid-countdown-ring .qr-live { padding: 4px; border-radius: 14px; background: #fff; }
.eid-qr-panel > b { margin-top: 7px; color: #294b5f; font: 800 .68rem ui-monospace,SFMono-Regular,Menlo,monospace; }
.eid-action-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.eid-action-grid button { min-height: 46px; }
.eid-v19.qr-focus .eid-details { display: none; }
.eid-v19.qr-focus { grid-template-columns: 1fr; }
.eid-v19.qr-focus .eid-qr-panel { min-height: 430px; }
.eid-v19.qr-focus .qr-live img,.eid-v19.qr-focus .qr-live canvas { width: min(68vw,320px)!important; height: min(68vw,320px)!important; }
.eid-v19.expired .eid-countdown-ring { background: #d9dde0; }
.eid-bright-mode #modalBackdrop { background: rgba(4,18,28,.82); }

.v19-role-switcher { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.v19-role-switcher span { font-size: .62rem; opacity: .72; }
.v19-role-switcher select { min-height: 32px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; background: #fff; color: #19394d; font-weight: 750; }

.senior-mode { font-size: 118%; }
.senior-mode button,.senior-mode input,.senior-mode select,.senior-mode textarea,.senior-mode a.primary-button { min-height: 52px; }
.senior-mode .mini-action { min-height: 44px; padding: 9px 12px; }
.senior-mode .bottom-nav button { min-height: 68px; }
.senior-mode .muted,.senior-mode small,.senior-mode .section-subtitle { color: #445c69; }
.senior-mode * { scroll-behavior: auto!important; }
.senior-mode .department-lane-grid span,.senior-mode .live-row span,.senior-mode .live-row small { font-size: .78rem; line-height: 1.5; }

.panel,.department-lane-grid button,.service-group-card { content-visibility: auto; contain-intrinsic-size: 1px 180px; }

@media (max-width: 900px) {
  .department-lane-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .eid-action-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .senior-mode-button b { display: none; }
  .senior-mode-button { min-width: 42px; justify-content: center; padding-inline: 8px; }
  .department-hero { grid-template-columns: 1fr; gap: 18px; border-radius: 23px; }
  .department-pulse { grid-template-columns: auto auto; min-height: 80px; gap: 8px 14px; }
  .department-pulse small { grid-column: 1/-1; }
  .department-coverage-grid { grid-template-columns: 1fr; }
  .eid-modal-head.v19 { grid-template-columns: auto 1fr; }
  .eid-online-state { grid-column: 1/-1; margin-top: 8px; }
  .v19-role-switcher span { display: none; }
}
@media (max-width: 430px) {
  .department-lane-grid { grid-template-columns: 1fr; }
  .department-lane-grid button { min-height: 112px; }
  .department-coverage-grid article { grid-template-columns: auto 1fr; }
  .department-coverage-grid em { grid-column: 2; }
  .eid-action-grid { grid-template-columns: 1fr 1fr; }
  .eid-brand-row em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .department-lane-grid button { transition: none; }
}
