:root {
  --navy: #0b3f24;
  --blue: #156c3a;
  --teal: #166b5a;
  --green: #0f6b3c;
  --orange: #f3b229;
  --red: #c9342f;
  --bg: #f7faf4;
  --border: #d9e5d5;
  --text: #1f2937;
  --muted: #667085;
  --white: #fff;
  --shadow: 0 10px 28px rgba(15, 79, 42, .10);
  --app-header-height: 64px;
  --sticky-toolbar-top: var(--app-header-height);
  --sticky-toolbar-z: 14;
  --portal-sticky-gap: 8px;
  --portal-table-head-top: 0px;
  --portal-scrollbar-top: calc(var(--app-header-height) + var(--portal-sticky-gap));
  --portal-sticky-tabs-top: calc(var(--app-header-height) + var(--portal-sticky-gap));
  --sidebar-width: clamp(292px, 22vw, 340px);
  --sidebar-collapsed-width: 86px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --navy: #d7f0df;
  --blue: #2fce72;
  --teal: #54d4bd;
  --green: #28b463;
  --orange: #fbbf24;
  --red: #f87171;
  --bg: #07150d;
  --border: #244332;
  --text: #e6f4ea;
  --muted: #a8b8ad;
  --white: #0f2017;
  --shadow: 0 14px 34px rgba(0, 0, 0, .34);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; color: var(--text); background: radial-gradient(circle at top right, rgba(21, 108, 58, .10), transparent 34%), linear-gradient(180deg, #fbfdf8 0%, var(--bg) 48%, #eef7ee 100%); font-size: 14px; }
html[data-theme="dark"] body { background: radial-gradient(circle at top right, rgba(47, 206, 114, .12), transparent 34%), linear-gradient(180deg, #061109 0%, var(--bg) 52%, #0b1d12 100%); }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .card,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .button,
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span,
html[data-theme="dark"] .detail,
html[data-theme="dark"] .access-detail-block,
html[data-theme="dark"] .dashboard-access-card,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .chat-panel,
html[data-theme="dark"] .chat-body,
html[data-theme="dark"] .chat-thread-head,
html[data-theme="dark"] .chat-compose { background: rgba(15, 32, 23, .96); color: var(--text); }
html[data-theme="dark"] .sidebar { background: linear-gradient(180deg, #031b0f 0%, #0b3f24 56%, #06170d 100%); }
html[data-theme="dark"] .table th,
html[data-theme="dark"] .dashboard-access-card summary,
html[data-theme="dark"] .dashboard-access-details,
html[data-theme="dark"] .chat-users,
html[data-theme="dark"] .chat-messages,
html[data-theme="dark"] .notification-empty,
html[data-theme="dark"] .table tbody tr:hover { background: rgba(20, 50, 32, .86); }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .chat-search { background: #0a1a11; color: var(--text); border-color: #315c43; }
html[data-theme="dark"] .button:hover { background: #173322; }
html[data-theme="dark"] .topbar-icon-button { color: #b8c9be; }
html[data-theme="dark"] .topbar-icon-button:hover { background: rgba(40, 180, 99, .13); border-color: #315c43; color: #fca5a5; }
html[data-theme="dark"] .topbar-account { background: linear-gradient(145deg, rgba(10, 26, 17, .92), rgba(15, 32, 23, .76)); border-color: #315c43; box-shadow: 0 8px 22px rgba(0,0,0,.22); }
html[data-theme="dark"] .topbar-account-text strong { color: #f2fff5; }
html[data-theme="dark"] .topbar-account-text em { color: #a8d5b5; }
html[data-theme="dark"] .topbar-account::before { opacity: .22; }
html[data-theme="dark"] .topbar-account-logout { background: #102418; border-color: #4a2d2d; color: #fca5a5; box-shadow: 0 14px 34px rgba(0,0,0,.34); }
html[data-theme="dark"] .topbar-account-logout:hover { background: #2a0d0d; color: #fecaca; }
html[data-theme="dark"] .topbar-account-security { background: #102418; border-color: #315c43; color: #9fe0b9; box-shadow: 0 14px 34px rgba(0,0,0,.34); }
html[data-theme="dark"] .topbar-account-security:hover { background: #153222; color: #c3f2d2; }
html[data-theme="dark"] .button.primary { background: var(--blue); border-color: var(--blue); color: #061109; }
html[data-theme="dark"] .button.danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
html[data-theme="dark"] .chat-message.theirs p,
html[data-theme="dark"] .chat-attachments a,
html[data-theme="dark"] .chat-message-actions button { background: #102418; border-color: #315c43; color: var(--text); }
html[data-theme="dark"] .chat-message.mine p { background: linear-gradient(135deg, #1f8f52, #166b3d); color: #fff; }
html[data-theme="dark"] .alert.success { background: #0d2a19; border-color: #266b42; color: #a7f3d0; }
html[data-theme="dark"] .alert.danger { background: #2a0d0d; border-color: #7f1d1d; color: #fecaca; }
html[data-theme="dark"] .alert.warning { background: #2b210d; border-color: #854d0e; color: #fde68a; }
html[data-theme="dark"] .alert.info { background: #0e243b; border-color: #1d4ed8; color: #bfdbfe; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin-top: 0; color: var(--navy); }
button, input, select, textarea { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); transition: grid-template-columns .18s ease; }
.sidebar {
  background: linear-gradient(180deg, #06391f 0%, #0f572f 58%, #0b3f24 100%);
  color: #fff;
  padding: 22px 15px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  transition: padding .18s ease, left .2s ease;
}
.sidebar-backdrop { display: none; }
.sidebar::-webkit-scrollbar { width: 0; height: 0; }
.brand {
  position: sticky;
  top: -22px;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: -22px -15px 10px;
  padding: 22px 15px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(6, 57, 31, .98) 0%, rgba(6, 57, 31, .92) 72%, rgba(6, 57, 31, .78) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.16;
  text-decoration: none;
  box-shadow: 0 12px 22px rgba(0, 0, 0, .10);
  backdrop-filter: blur(8px);
}
.brand img { width: clamp(56px, 4.7vw, 64px); height: clamp(56px, 4.7vw, 64px); object-fit: contain; background: transparent; border-radius: 50%; padding: 0; box-shadow: none; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .95)) drop-shadow(0 2px 0 rgba(255, 255, 255, .34)) drop-shadow(0 10px 14px rgba(0, 0, 0, .34)) saturate(1.08) contrast(1.04); transform: translateZ(0); }
.brand span { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; overflow: visible; }
.brand-title { display: block; max-width: 100%; color: #fff; font-size: 16px; font-weight: 760; line-height: 1.14; white-space: normal; overflow-wrap: anywhere; text-wrap: balance; }
.brand small { display: block; max-width: 100%; font-size: 12px; font-weight: 500; color: #d7f0df; margin-top: 0; line-height: 1.24; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.brand:hover { color: #fff; text-decoration: none; background: linear-gradient(180deg, rgba(8, 72, 39, .99) 0%, rgba(8, 72, 39, .94) 72%, rgba(8, 72, 39, .80) 100%); }
.nav-section { display: block; margin: 15px 9px 7px; color: rgba(228, 245, 232, .62); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.nav a { --nav-accent: #d7f0df; display: flex; gap: 10px; align-items: center; color: #e4f5e8; padding: 9px 11px 9px 9px; border-left: 4px solid transparent; border-radius: 11px; margin: 3px 0; position: relative; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.nav a::before { content: none; display: none; }
.nav-icon { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: transparent; color: #e4f5e8; box-shadow: none; font-size: 10px; font-weight: 800; letter-spacing: .03em; overflow: visible; position: relative; transition: transform .18s ease, filter .18s ease, color .18s ease; }
.nav-icon::after { content: none; display: none; }
.nav-icon svg, .module-icon svg, .module-hero-icon svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.nav-icon svg.nav-color-icon, .module-icon svg.nav-color-icon, .module-hero-icon svg.nav-color-icon { width: 24px; height: 24px; fill: none; stroke: none; filter: drop-shadow(0 2px 3px rgba(2, 19, 10, .34)) saturate(1.12); }
.nav-icon svg.nav-color-icon *, .module-icon svg.nav-color-icon *, .module-hero-icon svg.nav-color-icon * { vector-effect: non-scaling-stroke; }
.nav-text { min-width: 0; line-height: 1.18; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .13); border-left-color: var(--nav-accent); color: #fff; text-decoration: none; transform: translateX(1px); }
.nav a:hover .nav-icon { transform: scale(1.14) rotate(-2deg); filter: brightness(1.08); }
.nav a:hover .nav-icon::after { transform: translateX(80%) rotate(18deg); }
.nav a:active { transform: translateX(1px) scale(.99); }
.nav a.active { background: linear-gradient(90deg, rgba(201, 52, 47, .96), rgba(201, 52, 47, .72)); border-left-color: var(--nav-accent); color: #fff; text-decoration: none; box-shadow: 0 8px 18px rgba(201, 52, 47, .22); }
.nav a.active .nav-icon { background: transparent; color: #fff; box-shadow: none; transform: scale(1.09); filter: brightness(1.08) drop-shadow(0 0 8px rgba(255, 255, 255, .16)); }
.nav-dashboard { --nav-accent: #7dd3fc; }
.nav-assets { --nav-accent: #86efac; }
.nav-requests { --nav-accent: #facc15; }
.nav-books { --nav-accent: #fbbf24; }
.nav-borrow-books { --nav-accent: #fde68a; }
.nav-general-services { --nav-accent: #bef264; }
.nav-finance { --nav-accent: #22c55e; }
.nav-cashier { --nav-accent: #4ade80; }
.nav-activities { --nav-accent: #38bdf8; }
.nav-school-calendar { --nav-accent: #34d399; }
.nav-cctv { --nav-accent: #ef4444; }
.nav-library { --nav-accent: #5eead4; }
.nav-cafeteria { --nav-accent: #fcd34d; }
.nav-it-services { --nav-accent: #67e8f9; }
.nav-hr { --nav-accent: #c4b5fd; }
.nav-student-services { --nav-accent: #93c5fd; }
.nav-clinic { --nav-accent: #fda4af; }
.nav-guidance { --nav-accent: #f0abfc; }
.nav-registrar { --nav-accent: #a7f3d0; }
.nav-borrowings { --nav-accent: #a78bfa; }
.nav-repairs { --nav-accent: #fb923c; }
.nav-mrf { --nav-accent: #f87171; }
.nav-cancelled-requests { --nav-accent: #fca5a5; }
.nav-reports { --nav-accent: #2dd4bf; }
.nav-audit { --nav-accent: #cbd5e1; }
.nav-approvals, .nav-pending-monitoring { --nav-accent: #f97316; }
.nav-master-lists { --nav-accent: #fde68a; }
.nav-backup { --nav-accent: #93c5fd; }
.nav-users { --nav-accent: #f9a8d4; }
.nav a.has-pending { background: rgba(249, 115, 22, .13); border-left-color: var(--nav-accent); animation: nav-approval-pulse 1.1s ease-in-out infinite; }
.nav a.has-pending::after { content: ""; width: 9px; height: 9px; margin-left: auto; border: 2px solid #f97316; border-radius: 999px; background: #fef3c7; flex: 0 0 auto; }
.nav a.has-pending[data-pending-count]::after { content: attr(data-pending-count); min-width: 20px; width: auto; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: #fbbf24; color: #3a2100; font-size: 11px; font-weight: 800; line-height: 1; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.general-services-shell .app { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar-general-services .brand { margin-bottom: 0; }
.sidebar-general-services .nav {
  display: grid;
  gap: 2px;
  margin-top: 24px;
  padding-bottom: 12px;
}
.sidebar-general-services .nav-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 11px;
}
.sidebar-general-services .nav-icon svg {
  width: 22px;
  height: 22px;
}
.sidebar-general-services .nav-section {
  display: block;
  margin: 22px 12px 8px;
  color: rgba(228, 245, 232, .66);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.sidebar-general-services .nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 11px;
  margin: 1px 0;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  color: #fff;
  box-shadow: none;
  font-size: 16.5px;
  font-weight: 450;
  letter-spacing: .01em;
  line-height: 1.18;
}
.sidebar-general-services .nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 450;
}
.sidebar-general-services .nav a:hover {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .12);
  color: #fff;
  text-decoration: none;
  transform: translateX(1px);
}
.sidebar-general-services .nav a.active {
  background: linear-gradient(90deg, rgba(201, 52, 47, .95), rgba(201, 52, 47, .58));
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 650;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}
.sidebar .nav-department-group {
  min-width: 0;
  margin: 14px 0 2px;
}
.sidebar .nav-department-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 8px 5px;
  padding: 8px 8px 8px 4px;
  border-radius: 9px;
  cursor: pointer;
  list-style: none;
  transition: background .16s ease, color .16s ease;
}
.sidebar .nav-department-summary::-webkit-details-marker {
  display: none;
}
.sidebar .nav-department-summary:hover,
.sidebar .nav-department-summary:focus-visible {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}
.sidebar .nav-department-summary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .42);
  outline-offset: 1px;
}
.sidebar .nav-department-summary-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.sidebar .nav-department-count,
.sidebar .nav-department-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .13);
  color: #e4f5e8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}
.sidebar .nav-department-pending {
  background: #fbbf24;
  color: #3a2100;
}
.sidebar .nav-department-chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform .16s ease;
}
.sidebar .nav-department-group[open] .nav-department-chevron {
  transform: rotate(180deg);
}
.sidebar .nav-department-list {
  max-height: min(44vh, 410px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1px 4px 3px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(228, 245, 232, .38) transparent;
}
.sidebar .nav-department-list::-webkit-scrollbar {
  width: 6px;
}
.sidebar .nav-department-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(228, 245, 232, .34);
}
.sidebar .nav-department-link {
  min-height: 32px;
  padding: 7px 10px 7px 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .07);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.16;
}
.sidebar .nav-department-link::before {
  content: none;
  display: none;
}
.sidebar .nav-department-link:hover {
  background: rgba(255, 255, 255, .15);
}
.sidebar-general-services .nav a.has-pending {
  background: rgba(249, 115, 22, .16);
  animation: nav-approval-pulse 1.1s ease-in-out infinite;
}
.sidebar-general-services .nav a.has-pending:not(.nav-department-link)::after {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
}
.sidebar-general-services .nav a.has-pending[data-pending-count]:not(.nav-department-link) {
  padding-right: 42px;
}
.sidebar-general-services .nav a.has-pending[data-pending-count]:not(.nav-department-link)::after {
  right: 9px;
}
.sidebar .nav-department-link.has-pending {
  border-color: rgba(251, 191, 36, .46);
  background: linear-gradient(90deg, rgba(249, 115, 22, .28), rgba(255, 255, 255, .08));
}
.sidebar .nav-department-link.has-pending::before {
  content: none;
  display: none;
}
.sidebar .nav-department-link.has-pending::after {
  content: attr(data-pending-count);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: #fbbf24;
  color: #3a2100;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}
html[data-sidebar="collapsed"] .general-services-shell .app { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr); }
html[data-sidebar="collapsed"] .sidebar-general-services { padding: 18px 10px; overflow-x: hidden; overflow-y: auto; }
html[data-sidebar="collapsed"] .sidebar-general-services .brand { top: -18px; justify-content: center; gap: 0; margin: -18px -10px 10px; padding: 18px 10px 14px; }
html[data-sidebar="collapsed"] .sidebar-general-services .brand img { width: 54px; height: 54px; }
html[data-sidebar="collapsed"] .sidebar-general-services .brand span,
html[data-sidebar="collapsed"] .sidebar-general-services .nav-text { display: none; }
html[data-sidebar="collapsed"] .sidebar .nav-department-group { display: none; }
.sidebar-calendar { margin: 14px 6px 0; padding: 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); }
.sidebar-calendar-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: #fff; font-weight: 720; }
.sidebar-calendar-title small { color: rgba(215, 240, 223, .78); font-size: 10px; font-weight: 560; }
.sidebar-calendar-controls { display: grid; grid-template-columns: 24px 24px 1fr 24px 24px; gap: 4px; align-items: center; margin-bottom: 9px; }
.sidebar-calendar-controls button, .sidebar-calendar-foot button { border: 1px solid rgba(255, 255, 255, .16); border-radius: 7px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; font-weight: 750; }
.sidebar-calendar-controls button { height: 24px; padding: 0; }
.sidebar-calendar-controls button:hover, .sidebar-calendar-foot button:hover { background: rgba(255, 255, 255, .16); }
.sidebar-calendar-controls strong { color: #fff; text-align: center; font-size: 12px; font-weight: 680; }
.sidebar-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; cursor: ns-resize; }
.sidebar-calendar-head { text-align: center; color: rgba(215, 240, 223, .72); font-size: 9px; font-weight: 720; }
.sidebar-calendar-day { position: relative; min-height: 25px; display: flex; align-items: center; justify-content: center; border-radius: 7px; border: 1px solid transparent; color: rgba(228, 245, 232, .88); font-size: 12px; font-weight: 620; text-decoration: none; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.sidebar-calendar-day:hover { background: rgba(255, 255, 255, .11); color: #fff; text-decoration: none; transform: translateY(-1px); }
.sidebar-calendar-day.muted { color: rgba(228, 245, 232, .34); }
.sidebar-calendar-day.today { border-color: rgba(255, 255, 255, .62); background: rgba(255, 255, 255, .12); color: #fff; font-weight: 780; }
.sidebar-calendar-day.has-event { border-color: rgba(251, 191, 36, .30); background: rgba(255, 255, 255, .09); color: #fff; }
.sidebar-calendar-day.pending-approval { border-color: rgba(251, 191, 36, .72); background: rgba(251, 191, 36, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .18); }
.sidebar-calendar-day.has-event.muted { opacity: .72; }
.sidebar-calendar-marker { position: absolute; right: 3px; bottom: 3px; min-width: 13px; height: 13px; padding: 0 4px; border-radius: 999px; background: #fbbf24; color: #3a2100; box-shadow: 0 2px 7px rgba(0, 0, 0, .18); font-size: 8px; font-weight: 900; line-height: 13px; text-align: center; }
.sidebar-calendar-marker:empty { right: 50%; bottom: 3px; width: 5px; min-width: 5px; height: 5px; padding: 0; transform: translateX(50%); background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .16); }
.sidebar-calendar-day.pending-approval .sidebar-calendar-marker { background: #ef4444; color: #fff; box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }
.sidebar-calendar-day b { display: none; }
.sidebar-calendar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; color: rgba(215, 240, 223, .74); font-size: 10px; line-height: 1.25; }
.sidebar-calendar-foot button { flex: 0 0 auto; padding: 4px 8px; font-size: 10px; }
.sidebar-website { display: grid; gap: 3px; margin: 20px 6px 0; padding: 13px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 13px; background: rgba(255, 255, 255, .09); color: #e4f5e8; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.sidebar-website strong { display: block; color: #fff; font-size: 13px; }
.sidebar-website span { color: #d7f0df; font-size: 12px; font-weight: 750; }
.sidebar-website:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .28); color: #fff; text-decoration: none; transform: translateY(-1px); }
html[data-sidebar="collapsed"] .app { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr); }
html[data-sidebar="collapsed"] .sidebar { padding: 18px 10px; overflow-x: hidden; }
html[data-sidebar="collapsed"] .brand { top: -18px; justify-content: center; gap: 0; margin: -18px -10px 10px; padding: 18px 10px 14px; }
html[data-sidebar="collapsed"] .brand img { width: 54px; height: 54px; }
html[data-sidebar="collapsed"] .brand span,
html[data-sidebar="collapsed"] .nav-text,
html[data-sidebar="collapsed"] .nav-section,
html[data-sidebar="collapsed"] .sidebar-calendar,
html[data-sidebar="collapsed"] .sidebar-website { display: none; }
html[data-sidebar="collapsed"] .nav a { justify-content: center; gap: 0; padding: 9px; border-left-width: 0; }
html[data-sidebar="collapsed"] .nav-icon { width: 38px; height: 38px; }
html[data-sidebar="collapsed"] .nav a.has-pending::after { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; margin-left: 0; border-width: 2px; }
html[data-sidebar="collapsed"] .nav a.has-pending[data-pending-count]::after { content: ""; min-width: 8px; padding: 0; border: 2px solid #f97316; background: #fef3c7; }
html[data-sidebar="collapsed"] .main { max-width: 1800px; }
.sidebar-flyout-label { position: fixed; z-index: 130; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; background: rgba(6, 57, 31, .96); color: #fff; box-shadow: 0 14px 34px rgba(0, 0, 0, .28); font-size: 12px; font-weight: 850; line-height: 1; white-space: nowrap; pointer-events: none; transform: translateY(-50%); }
.sidebar-flyout-label[hidden] { display: none; }
.content { min-width: 0; }
.topbar {
  height: var(--app-header-height);
  background: linear-gradient(90deg, rgba(6, 57, 31, .96) 0%, rgba(15, 87, 47, .58) 15%, rgba(232, 246, 233, .96) 44%, rgba(255, 255, 255, .98) 100%);
  border-bottom: 1px solid rgba(15, 107, 60, .18);
  box-shadow: 0 10px 26px rgba(15, 79, 42, .08);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}
html[data-theme="dark"] .topbar { background: linear-gradient(90deg, #031b0f 0%, #0b3f24 58%, #06170d 100%); border-bottom-color: #244332; box-shadow: 0 14px 34px rgba(0,0,0,.26); }
.topbar-left { min-width: 0; display: flex; align-items: center; gap: 12px; }
.topbar-title-button { display: none; min-width: 0; border: 0; background: transparent; color: #fff; padding: 0; text-align: left; font-weight: 900; line-height: 1.1; cursor: pointer; }
.topbar-title-button span,
.topbar-title-button small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title-button small { color: #3f7052; font-size: 9px; font-weight: 850; letter-spacing: .02em; }
.topbar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-toggle { flex: 0 0 auto; width: 42px; height: 42px; padding: 0; border: 1px solid transparent; border-radius: 999px; background: transparent; color: #fff; box-shadow: none; transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.sidebar-toggle:hover { background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: none; }
.sidebar-toggle:focus-visible { outline: 2px solid rgba(255, 255, 255, .78); outline-offset: 3px; }
html[data-theme="dark"] .sidebar-toggle { background: transparent; border-color: transparent; color: #d7f0df; box-shadow: none; }
html[data-theme="dark"] .sidebar-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.sidebar-toggle-text { display: none; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: 0 0 auto; }
.topbar-clock { display: grid; gap: 2px; text-align: right; color: var(--muted); line-height: 1.1; }
.topbar-clock strong { color: var(--navy); font-size: 15px; letter-spacing: .02em; }
.topbar-account {
  --avatar-a: #0f6b3c;
  --avatar-b: #06391f;
  --avatar-glow: rgba(15, 107, 60, .26);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 5px 13px 5px 7px;
  border: 1px solid rgba(15, 79, 42, .13);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(247, 251, 244, .76));
  box-shadow: 0 8px 24px rgba(15,79,42,.08), inset 0 1px 0 rgba(255,255,255,.90);
  cursor: default;
  outline: none;
  overflow: visible;
}
.topbar-account::before {
  content: "";
  position: absolute;
  inset: 5px auto 5px 5px;
  width: 48px;
  border-radius: 14px;
  background: radial-gradient(circle at 20% 12%, rgba(255,255,255,.62), transparent 30%), linear-gradient(135deg, var(--avatar-a), var(--avatar-b));
  opacity: .14;
  pointer-events: none;
}
.topbar-account:hover, .topbar-account:focus-within { border-color: rgba(15, 107, 60, .24); box-shadow: 0 14px 34px rgba(15,79,42,.13), 0 0 0 4px var(--avatar-glow), inset 0 1px 0 rgba(255,255,255,.92); }
.topbar-account-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: radial-gradient(circle at 28% 20%, rgba(255,255,255,.88), transparent 20%), linear-gradient(135deg, var(--avatar-a), var(--avatar-b));
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.38);
  text-shadow: 0 1px 2px rgba(0,0,0,.24);
}
.topbar-account-avatar::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  background: linear-gradient(130deg, rgba(255,255,255,.46), transparent 34%, rgba(255,255,255,.08) 60%, transparent 78%);
  pointer-events: none;
}
.topbar-account-avatar span { position: relative; z-index: 1; }
.topbar-account-avatar img,
.work-avatar img,
.user-account-avatar img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

/* Shared module calendar and GSO coordination workflow */
.calendar-page-head { align-items: flex-start; gap: 18px; }
.calendar-page-head > div:first-child { min-width: 0; }
.calendar-page-head h1 { margin-bottom: 5px; }
.page-eyebrow { display: block; margin-bottom: 5px; color: #207348; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 0 16px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--white) 94%, transparent); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; background: #2c7a4b; }
.legend-swatch.selected { background: #2563eb; }
.legend-swatch.gso { background: #d97706; }
.legend-swatch.school { background: #7c3aed; }
.legend-swatch.confidential { background: #c9342f; }
.calendar-toolbar { position: relative; display: grid; gap: 10px; margin-bottom: 16px; }
.calendar-filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.calendar-filter-form { display: grid; grid-template-columns: minmax(140px, .65fr) minmax(150px, .75fr) minmax(220px, 1.5fr) auto auto; align-items: end; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); }
.calendar-filter-form label { min-width: 0; }
.calendar-filter-form label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.calendar-filter-form input,
.calendar-filter-form select { width: 100%; min-width: 0; }
.calendar-month { overflow: hidden; margin-bottom: 18px; padding: 0; border-radius: 8px; }
.calendar-month-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.calendar-month-head > div { text-align: center; }
.calendar-month-head span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.calendar-month-head h2 { margin: 2px 0 0; font-size: 18px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
.calendar-weekday { min-width: 0; padding: 8px 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #eff7f0; color: #315c43; text-align: center; font-size: 11px; font-weight: 800; }
.calendar-weekday:nth-child(7) { border-right: 0; }
.calendar-day { position: relative; min-width: 0; min-height: 118px; padding: 7px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: #f7f8f7; color: #9aa5a0; }
.calendar-day.today { box-shadow: inset 0 0 0 2px #16a34a; }
.calendar-day-number { display: grid; place-items: center; width: 24px; height: 24px; margin-bottom: 5px; border-radius: 50%; font-size: 11px; font-weight: 800; }
.calendar-day.today .calendar-day-number { background: #167343; color: #fff; }
.calendar-day-events { display: grid; gap: 4px; min-width: 0; }
.calendar-event { display: block; min-width: 0; padding: 4px 5px; overflow: hidden; border-left: 3px solid #2c7a4b; border-radius: 4px; background: #e9f7ed; color: #174b2d; font-size: 9px; }
.calendar-event:hover { text-decoration: none; filter: brightness(.97); }
.calendar-event span,
.calendar-event strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event span { opacity: .78; font-size: 8px; }
.calendar-event.visibility-selected { border-left-color: #2563eb; background: #e8f0ff; color: #173b7a; }
.calendar-event.visibility-gso { border-left-color: #d97706; background: #fff4dc; color: #74420a; }
.calendar-event.visibility-school { border-left-color: #7c3aed; background: #f1eaff; color: #4c2587; }
.calendar-event.visibility-confidential { border-left-color: #c9342f; background: #fff0ef; color: #7f2521; }
.calendar-more { color: var(--muted); font-size: 9px; font-weight: 700; }
.calendar-list { padding: 0; overflow: hidden; }
.calendar-list > .section-title,
.calendar-inbox-list > .section-title { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.calendar-list-items { display: grid; }
.calendar-list-item,
.calendar-inbox-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-width: 0; padding: 14px 18px; border-bottom: 1px solid var(--border); border-left: 4px solid #2c7a4b; }
.calendar-list-item:last-child,
.calendar-inbox-item:last-child { border-bottom: 0; }
.calendar-list-item.visibility-selected { border-left-color: #2563eb; }
.calendar-list-item.visibility-gso { border-left-color: #d97706; }
.calendar-list-item.visibility-school { border-left-color: #7c3aed; }
.calendar-list-item.visibility-confidential { border-left-color: #c9342f; }
.calendar-list-item time { display: grid; place-items: center; align-content: center; width: 52px; height: 52px; border: 1px solid var(--border); border-radius: 8px; background: #f7faf7; line-height: 1; }
.calendar-list-item time strong { color: #28734b; font-size: 10px; text-transform: uppercase; }
.calendar-list-item time span { margin-top: 3px; color: var(--navy); font-size: 20px; font-weight: 800; }
.calendar-list-main { min-width: 0; }
.calendar-list-main h3,
.calendar-inbox-item h3 { margin: 5px 0; font-size: 15px; }
.calendar-list-main p,
.calendar-inbox-item p { margin: 2px 0; }
.calendar-list-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.calendar-badge { display: inline-flex; align-items: center; min-height: 21px; padding: 3px 7px; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 800; }
.calendar-badge.status-success { background: #dcfce7; color: #166534; }
.calendar-badge.status-approved { background: #dbeafe; color: #1d4ed8; }
.calendar-badge.status-review { background: #e0e7ff; color: #4338ca; }
.calendar-badge.status-warning { background: #fef3c7; color: #92400e; }
.calendar-badge.status-cancelled { background: #fee2e2; color: #991b1b; }
.calendar-badge.status-draft { background: #edf1ef; color: #475569; }
.calendar-badge.visibility-module { border-color: #a7d4b6; color: #166534; }
.calendar-badge.visibility-selected { border-color: #93c5fd; color: #1d4ed8; }
.calendar-badge.visibility-gso { border-color: #fbbf24; color: #92400e; }
.calendar-badge.visibility-school { border-color: #c4b5fd; color: #6d28d9; }
.calendar-badge.visibility-confidential { border-color: #fca5a5; color: #b91c1c; }
.calendar-activity-form { display: grid; gap: 15px; }
.calendar-form-section { padding: 18px; border-radius: 8px; }
.calendar-primary-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calendar-schedule-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.module-owner-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border: 1px solid #a7d4b6; border-radius: 6px; background: #e9f7ed; color: #17623a; font-size: 11px; font-weight: 800; }
.calendar-visibility-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.calendar-choice { position: relative; display: block; min-width: 0; }
.calendar-choice input { position: absolute; opacity: 0; pointer-events: none; }
.calendar-choice > span { display: grid; align-content: start; gap: 5px; height: 100%; min-height: 92px; padding: 11px; border: 1px solid var(--border); border-left: 4px solid #2c7a4b; border-radius: 8px; background: var(--white); cursor: pointer; }
.calendar-choice.visibility-selected > span { border-left-color: #2563eb; }
.calendar-choice.visibility-gso > span { border-left-color: #d97706; }
.calendar-choice.visibility-school > span { border-left-color: #7c3aed; }
.calendar-choice.visibility-confidential > span { border-left-color: #c9342f; }
.calendar-choice input:checked + span { outline: 2px solid #1f7a49; outline-offset: 1px; background: #f1faf3; }
.calendar-choice small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.calendar-conditional { margin-top: 14px; padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: #f9fbf9; }
.calendar-conditional[hidden] { display: none; }
.calendar-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.calendar-check-grid label { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--white); font-size: 11px; }
.calendar-resource-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.calendar-resource-picker h3 { grid-column: 1 / -1; margin: 8px 0 0; padding-bottom: 5px; border-bottom: 1px solid var(--border); font-size: 13px; }
.calendar-resource-picker label { position: relative; min-width: 0; }
.calendar-resource-picker input { position: absolute; top: 10px; left: 9px; }
.calendar-resource-picker label > span { display: grid; gap: 3px; min-height: 58px; padding: 9px 9px 9px 31px; border: 1px solid var(--border); border-radius: 7px; background: var(--white); }
.calendar-resource-picker label:has(input:checked) > span { border-color: #2f8c57; background: #edf9f0; box-shadow: inset 0 0 0 1px #2f8c57; }
.calendar-resource-picker small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-resource-picker.compact { max-height: 430px; margin: 10px 0 14px; padding: 0 7px 8px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.calendar-resource-search { display: grid; gap: 5px; margin-top: 14px; }
.calendar-conflict-result { margin-top: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 7px; background: #f7faf7; color: var(--muted); }
.calendar-conflict-result.checking { border-color: #93c5fd; color: #1d4ed8; }
.calendar-conflict-result.available { border-color: #86d39f; background: #ecfdf3; color: #166534; }
.calendar-conflict-result.conflict { border-color: #f4b36b; background: #fff7e8; color: #92400e; }
.calendar-form-actions { position: sticky; bottom: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 11px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--white) 94%, transparent); box-shadow: var(--shadow); }
.calendar-detail-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .7fr); gap: 16px; align-items: start; }
.calendar-detail-card,
.calendar-resource-summary,
.calendar-workflow-card,
.calendar-history-card { padding: 18px; border-radius: 8px; }
.calendar-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--border); }
.calendar-detail-grid > div { min-width: 0; padding: 11px; background: var(--white); }
.calendar-detail-grid dt { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.calendar-detail-grid dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.calendar-prose { margin-top: 16px; }
.calendar-prose h3 { margin: 13px 0 5px; font-size: 13px; }
.calendar-prose p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.calendar-resource-row { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.calendar-resource-row span,
.calendar-resource-row small { color: var(--muted); font-size: 10px; }
.calendar-resource-row small { color: #a45c08; font-weight: 800; }
.calendar-attachments { margin-top: 16px; }
.calendar-attachments h3 { font-size: 13px; }
.calendar-workflow-card,
.calendar-history-card { margin-top: 16px; }
.calendar-workflow-form { display: grid; gap: 10px; }
.calendar-workflow-form textarea { width: 100%; }
.calendar-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.calendar-timeline li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; min-width: 0; }
.calendar-timeline li > span { position: relative; width: 10px; height: 10px; margin-top: 4px; border: 2px solid #2c7a4b; border-radius: 50%; background: var(--white); }
.calendar-timeline li > span::after { position: absolute; top: 9px; left: 2px; width: 2px; height: calc(100% + 48px); background: var(--border); content: ""; }
.calendar-timeline li:last-child > span::after { display: none; }
.calendar-timeline li > div { min-width: 0; padding-bottom: 16px; }
.calendar-timeline small { display: block; margin-top: 2px; color: var(--muted); }
.calendar-timeline p { margin: 5px 0 0; overflow-wrap: anywhere; }
.calendar-inbox-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.calendar-stat { display: grid; gap: 5px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-top: 3px solid #2c7a4b; border-radius: 8px; background: var(--white); color: var(--text); }
.calendar-stat:hover { text-decoration: none; }
.calendar-stat.active { box-shadow: inset 0 0 0 2px #2c7a4b; }
.calendar-stat span { color: var(--muted); font-size: 10px; font-weight: 800; }
.calendar-stat strong { color: var(--navy); font-size: 22px; }
.calendar-inbox-list { padding: 0; overflow: hidden; }
.calendar-inbox-item { grid-template-columns: 120px minmax(0, 1fr) auto; border-left: 0; }
.calendar-inbox-status { display: grid; justify-items: start; gap: 5px; }
.calendar-inbox-status small { color: var(--muted); }
.calendar-resource-form { margin-bottom: 16px; padding: 14px 18px; }
.calendar-resource-form summary { cursor: pointer; color: var(--navy); font-weight: 800; }
.calendar-resource-form form { margin-top: 14px; }
.calendar-resource-catalog { display: grid; gap: 16px; }
.calendar-resource-group { padding: 18px; }
.calendar-resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.calendar-resource-card { min-width: 0; padding: 12px; border: 1px solid var(--border); border-top: 3px solid #2c7a4b; border-radius: 8px; background: #fbfdfb; }
.calendar-resource-card.inactive { opacity: .58; }
.calendar-resource-card > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.calendar-resource-card h3 { margin: 5px 0; font-size: 14px; overflow-wrap: anywhere; }
.calendar-resource-card p { min-height: 28px; margin: 0 0 8px; color: var(--muted); font-size: 10px; }
.calendar-resource-card strong { color: #17623a; font-size: 10px; }
.calendar-conflict-form { padding: 18px; }
.calendar-conflict-results { margin-bottom: 16px; padding: 18px; }
.calendar-conflict-results.available { border-color: #86d39f; }
.calendar-conflict-results.has-conflicts { border-color: #f4b36b; }
.calendar-conflict-results article { display: grid; grid-template-columns: minmax(160px, .6fr) minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.calendar-conflict-results article:last-child { border-bottom: 0; }
.calendar-conflict-results article > div { display: grid; gap: 3px; min-width: 0; }
.calendar-conflict-results article span { color: var(--muted); font-size: 10px; }
.calendar-privacy-note { padding: 5px 8px; border: 1px solid #f4b36b; border-radius: 6px; color: #92400e !important; font-weight: 800; }
.calendar-print { background: #fff; color: #111; }
.calendar-print main { width: min(1100px, calc(100% - 32px)); margin: 20px auto; }
.calendar-print header { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid #0f6b3c; }
.calendar-print header img { width: 50px; height: 50px; object-fit: contain; }
.calendar-print header h1,
.calendar-print header p { margin: 0; }
.calendar-print-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 12px 0; font-size: 11px; }

html[data-theme="dark"] .calendar-weekday,
html[data-theme="dark"] .calendar-day.outside,
html[data-theme="dark"] .calendar-conditional,
html[data-theme="dark"] .calendar-conflict-result,
html[data-theme="dark"] .calendar-resource-card { background: #102418; }
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .calendar-choice > span,
html[data-theme="dark"] .calendar-check-grid label,
html[data-theme="dark"] .calendar-resource-picker label > span { background: #0f2017; }

@media (max-width: 1100px) {
  .calendar-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-search { grid-column: 1 / -1; }
  .calendar-primary-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-schedule-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-visibility-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calendar-check-grid,
  .calendar-resource-picker,
  .calendar-resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .calendar-page-head { display: grid; }
  .calendar-page-head .actions { width: 100%; }
  .calendar-page-head .actions .button { flex: 1 1 auto; }
  .calendar-toolbar { margin-left: 0; margin-right: 0; }
  .calendar-filter-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-filter-tabs .button { width: 100%; min-width: 0; white-space: normal; }
  .calendar-filter-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; }
  .calendar-filter-form .calendar-search { grid-column: 1 / -1; }
  .calendar-month-head { padding: 11px; }
  .calendar-weekday { padding: 7px 1px; font-size: 9px; }
  .calendar-day { min-height: 72px; padding: 3px; }
  .calendar-day-number { width: 20px; height: 20px; margin-bottom: 2px; font-size: 9px; }
  .calendar-event { padding: 3px; border-left-width: 2px; }
  .calendar-event span { display: none; }
  .calendar-event strong { font-size: 7px; }
  .calendar-day-events .calendar-event:nth-child(n+2) { display: none; }
  .calendar-more { font-size: 7px; }
  .calendar-list-item,
  .calendar-inbox-item { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .calendar-list-item time { width: 42px; height: 46px; }
  .calendar-list-item time span { font-size: 17px; }
  .calendar-list-item > .button,
  .calendar-inbox-item > .button { grid-column: 2; justify-self: start; }
  .calendar-inbox-status { grid-column: 1 / -1; display: flex; align-items: center; }
  .calendar-primary-fields,
  .calendar-schedule-fields,
  .calendar-visibility-options { grid-template-columns: 1fr; }
  .calendar-form-section { padding: 13px; }
  .calendar-choice > span { min-height: 74px; }
  .calendar-check-grid,
  .calendar-resource-picker,
  .calendar-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-detail-layout { grid-template-columns: 1fr; }
  .calendar-detail-grid { grid-template-columns: 1fr; }
  .calendar-inbox-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-conflict-results article { grid-template-columns: 1fr; }
  .calendar-conflict-results article .button,
  .calendar-privacy-note { justify-self: start; }
  .calendar-form-actions { bottom: 5px; }
}

@media (max-width: 410px) {
  .calendar-legend { gap: 7px 11px; padding: 9px; }
  .calendar-filter-form { grid-template-columns: 1fr; }
  .calendar-filter-form .calendar-search { grid-column: auto; }
  .calendar-check-grid,
  .calendar-resource-picker,
  .calendar-resource-grid { grid-template-columns: 1fr; }
  .calendar-resource-picker h3 { grid-column: 1; }
  .calendar-badge { font-size: 8px; }
}

@media print {
  .calendar-print .button { display: none !important; }
  .calendar-print main { width: 100%; margin: 0; }
  .calendar-print table { font-size: 9pt; }
}

/* Central Hub, platform controls, and distinct active-workspace shells. */
.public-operations-hub {
  min-height: 100vh;
  background: #f3f8f4;
}
.public-hub-topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid #c8d9cc;
  background: linear-gradient(90deg, #064326 0%, #187049 38%, #eef7f0 72%, #fff 100%);
  box-shadow: 0 8px 24px rgba(13, 74, 42, .10);
}
.public-hub-brand {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}
.public-hub-brand:hover { color: #fff; text-decoration: none; }
.public-hub-brand img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(0,0,0,.24)); }
.public-hub-brand span { min-width: 0; display: grid; gap: 3px; }
.public-hub-brand strong,
.public-hub-brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-hub-brand strong { font-size: 16px; line-height: 1.15; }
.public-hub-brand small { color: #d8eee0; font-size: 11px; font-weight: 600; }
.public-hub-actions { display: flex; align-items: center; gap: 8px; }
.public-hub-main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: clamp(38px, 6vw, 72px) 0 64px; }
.public-access-profile { border-left-color: #0f7b48; }
.operations-module-card.is-planned { opacity: .62; cursor: not-allowed; }
.operations-module-card.is-planned:hover { border-color: transparent; background: transparent; box-shadow: none; transform: none; }

.topbar-platform-admin { color: #855d08; }
.topbar-platform-admin:hover { color: #694703; background: #fff7d6; border-color: #e9cc72; }
.platform-admin-head { align-items: center; }
.platform-admin-kpis { margin-bottom: 18px; }
.platform-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.platform-control-link {
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
  border-left: 4px solid #17603d;
}
.platform-control-link:hover { color: var(--text); text-decoration: none; border-color: #d5a51e; transform: translateY(-1px); }
.platform-control-link > span:nth-child(2) { min-width: 0; display: grid; gap: 5px; }
.platform-control-link strong { color: var(--navy); font-size: 15px; }
.platform-control-link small { color: var(--muted); line-height: 1.4; }
.platform-delegation-panel { border-color: #d8c074; background: #fffdf5; }
.platform-permission-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform-permission-option { align-items: flex-start; }
.platform-permission-option span { min-width: 0; display: grid; gap: 4px; }
.platform-permission-option small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.protected-account-card { max-width: 980px; border-left: 5px solid #b88908; }

.sidebar-workspace-finance { background: linear-gradient(180deg, #123f56 0%, #176578 58%, #174c51 100%) !important; }
.sidebar-workspace-finance .brand { background: linear-gradient(180deg, #10394d 0%, #14586a 100%) !important; }
.workspace-finance .topbar { background: linear-gradient(90deg, #123f56 0%, #2694a5 18%, #e8f7f5 47%, #fff 100%) !important; border-bottom-color: rgba(23, 101, 120, .20); }
.sidebar-workspace-finance .nav a.active { background: #d99d1b; border-left-color: #fff2bd; box-shadow: 0 8px 18px rgba(83, 55, 3, .22); }

.sidebar-workspace-hr { background: linear-gradient(180deg, #692742 0%, #934152 55%, #553243 100%) !important; }
.sidebar-workspace-hr .brand { background: linear-gradient(180deg, #5b2139 0%, #7d3448 100%) !important; }
.workspace-hr .topbar { background: linear-gradient(90deg, #692742 0%, #c26772 18%, #f9eeee 47%, #fff 100%) !important; border-bottom-color: rgba(147, 65, 82, .20); }
.sidebar-workspace-hr .nav a.active { background: #f08a62; border-left-color: #ffe1d4; box-shadow: 0 8px 18px rgba(71, 22, 34, .24); }

.sidebar-workspace-registrar { background: linear-gradient(180deg, #31466d 0%, #536fa0 56%, #2d5261 100%) !important; }
.sidebar-workspace-registrar .brand { background: linear-gradient(180deg, #293c61 0%, #48638f 100%) !important; }
.workspace-registrar .topbar { background: linear-gradient(90deg, #31466d 0%, #6a86b4 18%, #eef2f8 47%, #fff 100%) !important; border-bottom-color: rgba(49, 70, 109, .20); }
.sidebar-workspace-registrar .nav a.active { background: #178b78; border-left-color: #c9fff4; box-shadow: 0 8px 18px rgba(16, 62, 71, .24); }

.sidebar-workspace-it-services { background: linear-gradient(180deg, #075357 0%, #0d7774 56%, #174b53 100%) !important; }
.sidebar-workspace-it-services .brand { background: linear-gradient(180deg, #06484d 0%, #0b6665 100%) !important; }
.workspace-it-services .topbar { background: linear-gradient(90deg, #075357 0%, #16a19a 18%, #e6f6f3 47%, #fff 100%) !important; border-bottom-color: rgba(13, 119, 116, .20); }
.sidebar-workspace-it-services .nav a.active { background: #d57b28; border-left-color: #ffe4b9; box-shadow: 0 8px 18px rgba(68, 37, 6, .22); }

.workspace-student-services {
  --navy: #3f246f;
  --blue: #7650bd;
  --teal: #7856b4;
  --green: #8d62d7;
  --border: #ddd2ef;
  background: radial-gradient(circle at top right, rgba(141, 98, 215, .15), transparent 34%), linear-gradient(180deg, #fdfbff 0%, #f8f4fd 48%, #f1eafa 100%);
}
.sidebar-workspace-student-services { background: linear-gradient(180deg, #3f246f 0%, #7048ad 56%, #4e337f 100%) !important; }
.sidebar-workspace-student-services .brand { background: linear-gradient(180deg, #35205d 0%, #604097 100%) !important; }
.workspace-student-services .topbar { background: linear-gradient(90deg, #3f246f 0%, #8d62d7 18%, #f1eafa 47%, #fff 100%) !important; border-bottom-color: rgba(112, 72, 173, .22); }
.sidebar-workspace-student-services .nav a.active { background: #9b73df; border-left-color: #f0e8ff; box-shadow: 0 8px 18px rgba(45, 23, 83, .28); }
.sidebar-workspace-student-services .nav a:hover { background: rgba(255,255,255,.16); }
.workspace-student-services .button.primary,
.workspace-student-services .subnav a.active { border-color: #7650bd; background: #7650bd; color: #fff; }
.workspace-student-services .card { box-shadow: 0 10px 28px rgba(83, 52, 133, .10); }
.psa-primary-tabs.portal-sticky-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 9px;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid rgba(118, 80, 189, .22);
  border-radius: 16px;
  background: rgba(250, 247, 255, .97);
  box-shadow: 0 12px 28px rgba(83, 52, 133, .12);
}
.psa-primary-tabs.portal-sticky-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid rgba(118, 80, 189, .32);
  border-radius: 999px;
  background: #fff;
  color: #5c388f;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.psa-primary-tabs.portal-sticky-tabs a:hover {
  border-color: #7650bd;
  background: #f0e8ff;
  color: #4a287a;
  text-decoration: none;
  transform: translateY(-1px);
}
.psa-primary-tabs.portal-sticky-tabs a:focus-visible {
  outline: 3px solid #f5b942;
  outline-offset: 2px;
}
.psa-primary-tabs.portal-sticky-tabs a.active {
  border-color: #7650bd;
  background: linear-gradient(135deg, #6e45b5, #8d62d7);
  color: #fff;
  box-shadow: 0 8px 18px rgba(83, 52, 133, .25);
}
.psa-tab-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 8px;
  background: rgba(118, 80, 189, .10);
  font-size: .9rem;
}
.psa-primary-tabs a.active .psa-tab-icon { background: rgba(255, 255, 255, .18); }
.psa-reports-dashboard { display: grid; gap: 18px; }
.psa-report-group { margin: 0; }
.psa-report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.psa-report-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-content: start;
  min-height: 178px;
  padding: 16px;
  border: 1px solid rgba(118, 80, 189, .20);
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #faf7ff);
}
.psa-report-card h4 { margin: 2px 0 6px; color: #482773; font-size: 1rem; }
.psa-report-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.psa-report-card .actions { grid-column: 1 / -1; align-self: end; margin-top: auto; }
.psa-report-card-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #eee5fc; color: #6840a8; font-weight: 900; }
.psa-report-detail { border-top: 4px solid #7650bd; }
html[data-theme="dark"] .psa-primary-tabs.portal-sticky-tabs { border-color: #5f4589; background: rgba(31, 22, 48, .97); }
html[data-theme="dark"] .psa-primary-tabs.portal-sticky-tabs a { border-color: #71559d; background: #281c3e; color: #eadcff; }
html[data-theme="dark"] .psa-primary-tabs.portal-sticky-tabs a.active { background: #7650bd; color: #fff; }
html[data-theme="dark"] .psa-report-card { border-color: #503871; background: linear-gradient(145deg, #21172f, #2a1c3e); }
html[data-theme="dark"] .psa-report-card h4 { color: #eadcff; }
@media (max-width: 980px) {
  .psa-primary-tabs.portal-sticky-tabs { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .psa-report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .psa-primary-tabs.portal-sticky-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 9px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  .psa-primary-tabs.portal-sticky-tabs a { flex: 0 0 auto; min-width: 132px; scroll-snap-align: start; }
  .psa-report-grid { grid-template-columns: 1fr; }
}
.nav-student-services { --nav-accent: #d8c4fa; }

.sidebar-workspace-platform-admin { background: linear-gradient(180deg, #25342d 0%, #385748 56%, #263b3f 100%) !important; }
.sidebar-workspace-platform-admin .brand { background: linear-gradient(180deg, #202e28 0%, #304c3e 100%) !important; }
.workspace-platform-admin .topbar { background: linear-gradient(90deg, #25342d 0%, #557767 18%, #eff3ee 47%, #fff 100%) !important; border-bottom-color: rgba(37, 52, 45, .20); }
.sidebar-workspace-platform-admin .nav a.active { background: #b88908; border-left-color: #fff1bd; box-shadow: 0 8px 18px rgba(55, 39, 5, .24); }

html[data-theme="dark"] .platform-delegation-panel { border-color: #6f5a20; background: #251f0d; }
html[data-theme="dark"] .public-operations-hub { background: #07150d; }
html[data-theme="dark"] .public-hub-topbar { border-bottom-color: #244332; background: linear-gradient(90deg, #031b0f 0%, #0b3f24 65%, #06170d 100%); }

@media (max-width: 760px) {
  .public-hub-topbar { min-height: 68px; gap: 8px; padding: 8px 10px; background: linear-gradient(90deg, #064326 0%, #187049 70%, #eef7f0 100%); }
  .public-hub-brand { grid-template-columns: 42px minmax(0, 1fr); gap: 8px; }
  .public-hub-brand img { width: 42px; height: 42px; }
  .public-hub-brand strong { font-size: 12px; }
  .public-hub-brand small { display: none; }
  .public-hub-actions { gap: 5px; }
  .public-hub-actions .button { min-height: 38px; padding: 8px 10px; font-size: 12px; }
  .public-hub-main { width: min(100% - 24px, 680px); padding: 28px 0 44px; }
  .platform-control-grid,
  .platform-permission-grid { grid-template-columns: 1fr; }
  .platform-control-link { min-height: 96px; grid-template-columns: 38px minmax(0, 1fr); }
  .platform-control-link > .badge { grid-column: 2; justify-self: start; }
  .workspace-finance .topbar { background: linear-gradient(90deg, #123f56 0%, #2694a5 58%, #e8f7f5 78%, #fff 100%) !important; }
  .workspace-hr .topbar { background: linear-gradient(90deg, #692742 0%, #c26772 58%, #f9eeee 78%, #fff 100%) !important; }
  .workspace-registrar .topbar { background: linear-gradient(90deg, #31466d 0%, #6a86b4 58%, #eef2f8 78%, #fff 100%) !important; }
  .workspace-it-services .topbar { background: linear-gradient(90deg, #075357 0%, #16a19a 58%, #e6f6f3 78%, #fff 100%) !important; }
  .workspace-student-services .topbar { background: linear-gradient(90deg, #3f246f 0%, #8d62d7 58%, #f1eafa 78%, #fff 100%) !important; }
  .workspace-platform-admin .topbar { background: linear-gradient(90deg, #25342d 0%, #557767 58%, #eff3ee 78%, #fff 100%) !important; }
}

/* Human Resources, identity approval, and timekeeping */
.hr-module-content { margin-top: 16px; }
.hr-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 3px 0 7px; scrollbar-width: thin; }
.hr-tabs a { flex: 0 0 auto; padding: 8px 11px; color: #3e5a4e; text-decoration: none; border: 1px solid transparent; border-radius: 6px; font-size: 13px; font-weight: 750; }
.hr-tabs a:hover { color: #075b37; background: #edf7f1; }
.hr-tabs a.active { color: #fff; border-color: #0a6d42; background: #0a6d42; }
.hr-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.hr-onboarding-layout,
.hr-devices-grid { display: grid; grid-template-columns: minmax(320px, .88fr) minmax(420px, 1.12fr); gap: 16px; align-items: start; }
.hr-request-list-panel,
.hr-request-detail,
.hr-device-detail { min-width: 0; }
.hr-inline-filters { grid-template-columns: minmax(140px, 1fr) minmax(150px, .7fr) auto; }
.hr-request-list,
.hr-device-list { display: grid; gap: 6px; max-height: 640px; overflow: auto; padding-right: 3px; }
.hr-request-row,
.hr-device-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 58px; padding: 8px 10px; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.hr-request-row:hover,
.hr-request-row.selected,
.hr-device-row:hover,
.hr-device-row.selected { border-color: #15804f; background: #f1faf5; }
.hr-request-row span:nth-child(2),
.hr-device-row span:nth-child(2) { min-width: 0; }
.hr-request-row strong,
.hr-request-row small,
.hr-device-row strong,
.hr-device-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-request-row small,
.hr-device-row small { margin-top: 3px; color: var(--muted); }
.hr-request-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: #176c4a; font-weight: 800; }
.hr-detail-empty { min-height: 330px; display: grid; place-content: center; gap: 6px; text-align: center; }
.hr-detail-empty strong { color: var(--ink); font-size: 17px; }
.hr-request-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 14px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.hr-request-facts div { min-width: 0; padding: 9px 11px; background: var(--panel); }
.hr-request-facts dt { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 800; }
.hr-request-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.hr-request-reason,
.hr-step-form,
.hr-device-section,
.hr-manual-entry,
.hr-reject-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.hr-request-reason p { margin-bottom: 0; }
.hr-step-form h3,
.hr-device-section h3 { margin-bottom: 4px; }
.hr-step-summary { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid #b8ddc9; border-radius: 6px; background: #f1faf5; }
.hr-step-summary p { margin: 2px 0 0; color: var(--muted); }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: #107344; font-weight: 800; }
.hr-activation-link .input-action,
.hr-device-token .input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin: 7px 0; }
.hr-activation-link input,
.hr-device-token input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.hr-reject-box summary,
.hr-manual-entry summary,
.hr-add-device summary { cursor: pointer; color: #9f2929; font-weight: 800; }
.hr-reject-box form,
.hr-manual-entry form,
.hr-add-device form { margin-top: 10px; }
.hr-attendance-filters { grid-template-columns: repeat(2, minmax(130px, .55fr)) minmax(200px, 1fr) minmax(130px, .65fr) auto; align-items: end; }
.hr-attendance-filters label { margin: 0; }
.hr-attendance-table td { vertical-align: top; }
.hr-correction { min-width: 210px; margin-top: 5px; }
.hr-correction summary { cursor: pointer; color: #0b6840; font-weight: 800; }
.hr-correction form { display: grid; gap: 7px; margin-top: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.hr-device-row .module-icon { width: 36px; height: 36px; }
.hr-device-detail > form { margin: 8px 0; }
.hr-device-section form { display: grid; gap: 10px; }
.hr-connector-note { display: grid; gap: 5px; margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.hr-connector-note code { overflow-wrap: anywhere; color: #0b6840; }
.hr-attendance-import { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.hr-attendance-import summary { cursor: pointer; color: #0b6840; font-weight: 800; }
.hr-attendance-import form { margin-top: 10px; }
.hr-roster-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 12px 0; }
.hr-roster-stats div { display: grid; gap: 2px; padding: 9px 10px; border: 1px solid #cfe2d5; border-radius: 6px; background: #f4faf6; }
.hr-roster-stats small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.hr-roster-stats strong { color: #075b37; font-size: 20px; }
.hr-roster-assign { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; margin-top: 12px; padding: 12px; border: 1px solid #b8ddc9; border-radius: 7px; background: #f7fbf8; }
.hr-roster-assign > label { min-width: 0; margin: 0; }
.hr-roster-assign > .help { grid-column: 1 / -1; margin: 0; }
.hr-roster-tools { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin: 13px 0 8px; }
.hr-roster-tools label { flex: 1 1 280px; margin: 0; }
.hr-roster-tools .help { flex: 0 0 auto; padding-bottom: 9px; }
.hr-roster-table { max-height: 520px; border: 1px solid var(--line); border-radius: 6px; }
.hr-roster-table table { margin: 0; }
.hr-roster-table td { vertical-align: top; }
.hr-settings-card { max-width: 920px; }
.hr-rfid-quick-card { margin-bottom: 16px; border-top: 4px solid #14784a; }
.hr-rfid-quick-card .card-head { align-items: flex-start; }
.hr-rfid-step-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.hr-rfid-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 9px; align-items: center; padding: 10px; border: 1px solid #cfe2d5; border-radius: 7px; background: #f4faf6; }
.hr-rfid-step > span,
.hr-field-step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: #14784a; font-weight: 800; }
.hr-rfid-step > span { grid-row: 1 / span 2; width: 30px; height: 30px; }
.hr-rfid-step strong { color: var(--ink); font-size: 13px; }
.hr-rfid-step small { color: var(--muted); line-height: 1.3; }
.hr-rfid-registration-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; padding: 14px; border: 1px solid #c5dbcc; border-radius: 8px; background: #f9fcfa; }
.hr-rfid-registration-form > label { min-width: 0; margin: 0; }
.hr-rfid-registration-form > label > .hr-field-step { margin-right: 5px; vertical-align: middle; }
.hr-rfid-scan-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.hr-rfid-scan-control input { min-width: 0; letter-spacing: .12em; }
.hr-rfid-uid-input { -webkit-text-security: disc; }
.hr-rfid-scan-control .button { margin: 0; white-space: nowrap; }
.hr-rfid-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 3px; }
.hr-rfid-actions .button { margin: 0; }
.hr-rfid-status { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.hr-rfid-status.scanning { color: #8a5a00; }
.hr-rfid-status.ready { color: #0b6b3f; }
.hr-device-custom-fields { margin-top: 10px; padding: 10px; border: 1px solid #d8e4db; border-radius: 7px; background: var(--soft); }
.hr-device-custom-fields[hidden] { display: none; }
.hr-device-advanced { margin: 12px 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.hr-device-advanced summary { cursor: pointer; color: #0b6840; font-weight: 800; }
.hr-device-advanced .form-grid { margin-top: 10px; }
.hr-device-rfid-guidance { padding: 12px; border: 1px solid #cfe2d5; border-radius: 7px; background: #f4faf6; }
html[data-theme="dark"] .hr-rfid-step,
html[data-theme="dark"] .hr-rfid-registration-form,
html[data-theme="dark"] .hr-device-rfid-guidance { border-color: #315c43; background: #102418; }
html[data-theme="dark"] .hr-rfid-status.ready { color: #75dca3; }
html[data-theme="dark"] .hr-rfid-status.scanning { color: #f0c66d; }

.hr-kiosk-page { min-height: 100vh; margin: 0; color: #12382a; background: #edf5ef; }
.hr-kiosk-shell { width: min(920px, calc(100% - 28px)); min-height: 100vh; margin: 0 auto; padding: 18px 0 28px; }
.hr-kiosk-shell > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #cddfd3; }
.hr-kiosk-shell > header img { width: 48px; height: 48px; object-fit: contain; }
.hr-kiosk-shell > header strong,
.hr-kiosk-shell > header span { display: block; }
.hr-kiosk-shell > header span { margin-top: 2px; color: #5f7169; font-size: 13px; }
.hr-kiosk-clock { display: grid; place-items: center; padding: 28px 10px 20px; }
.hr-kiosk-clock time { font-size: clamp(40px, 9vw, 78px); font-weight: 850; line-height: 1; }
.hr-kiosk-clock span { margin-top: 7px; color: #5f7169; }
.hr-kiosk-result,
.hr-kiosk-scan { border: 1px solid #cddfd3; border-radius: 8px; background: #fff; box-shadow: 0 12px 35px rgba(23,70,49,.08); }
.hr-kiosk-result { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 14px; padding: 18px; border-left: 6px solid #14814e; }
.hr-kiosk-result.time-out { border-left-color: #b43b35; }
.hr-kiosk-check { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; color: #fff; background: #14814e; font-size: 36px; font-weight: 800; }
.hr-kiosk-result.time-out .hr-kiosk-check { background: #b43b35; }
.hr-kiosk-result small,
.hr-kiosk-result h1,
.hr-kiosk-result p { display: block; margin: 0; }
.hr-kiosk-result h1 { margin-top: 3px; font-size: 25px; }
.hr-kiosk-result p { margin: 4px 0 8px; color: #5f7169; }
.hr-kiosk-scan { display: grid; place-items: center; padding: 28px; text-align: center; }
.hr-kiosk-scan .module-icon { width: 64px; height: 64px; }
.hr-kiosk-scan h2 { margin: 10px 0 4px; }
.hr-kiosk-scan p { margin: 0 0 14px; color: #5f7169; }
.hr-kiosk-scan form { display: grid; grid-template-columns: minmax(220px, 380px) auto; gap: 8px; width: 100%; justify-content: center; }
.hr-kiosk-input { text-align: center; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.hr-kiosk-scan > small { margin-top: 12px; color: #718078; }

@media (max-width: 960px) {
  .hr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-onboarding-layout,
  .hr-devices-grid { grid-template-columns: 1fr; }
  .hr-rfid-registration-form { grid-template-columns: 1fr; }
  .hr-roster-assign { grid-template-columns: 1fr; }
  .hr-roster-assign > .help { grid-column: 1; }
  .hr-rfid-actions { grid-column: 1; }
  .hr-request-list { max-height: 420px; }
  .hr-attendance-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .hr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-inline-filters,
  .hr-attendance-filters { grid-template-columns: 1fr; }
  .hr-request-row,
  .hr-device-row { grid-template-columns: 34px minmax(0, 1fr); }
  .hr-request-row > .badge,
  .hr-device-row > .badge { grid-column: 2; justify-self: start; }
  .hr-request-facts { grid-template-columns: 1fr; }
  .hr-rfid-step-strip { grid-template-columns: 1fr; }
  .hr-roster-stats { grid-template-columns: 1fr; }
  .hr-roster-tools { align-items: stretch; flex-direction: column; }
  .hr-roster-tools .help { padding-bottom: 0; }
  .hr-rfid-actions { align-items: stretch; flex-direction: column; }
  .hr-rfid-actions .button { width: 100%; }
  .hr-rfid-scan-control { grid-template-columns: 1fr; }
  .hr-rfid-quick-card .card-head { display: grid; }
  .hr-rfid-quick-card .card-head > .button { width: 100%; }
  .hr-employee-table { overflow: visible; }
  .hr-employee-table table,
  .hr-employee-table tbody,
  .hr-employee-table tr,
  .hr-employee-table td { display: block; width: 100%; }
  .hr-employee-table thead { display: none; }
  .hr-employee-table tbody { display: grid; gap: 10px; }
  .hr-employee-table tr { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
  .hr-employee-table td { display: grid; grid-template-columns: minmax(105px, .72fr) minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 0; border: 0; overflow-wrap: anywhere; }
  .hr-employee-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .hr-employee-table td .actions { justify-content: flex-start; }
  .hr-kiosk-shell { width: min(100% - 18px, 920px); padding-top: 10px; }
  .hr-kiosk-shell > header { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .hr-kiosk-shell > header img { width: 40px; height: 40px; }
  .hr-kiosk-shell > header strong { font-size: 13px; }
  .hr-kiosk-clock { padding-top: 22px; }
  .hr-kiosk-result { grid-template-columns: 50px minmax(0, 1fr); padding: 14px; }
  .hr-kiosk-check { width: 48px; height: 48px; font-size: 26px; }
  .hr-kiosk-result h1 { font-size: 19px; }
  .hr-kiosk-scan { padding: 20px 14px; }
  .hr-kiosk-scan form { grid-template-columns: 1fr; }
}

@media print {
  .page-hr .sidebar,
  .page-hr .topbar,
  .page-hr .page-head .actions,
  .page-hr .hr-tabs,
  .page-hr .filters,
  .page-hr .hr-manual-entry,
  .page-hr .hr-correction { display: none !important; }
  .page-hr .content,
  .page-hr .main { margin: 0 !important; padding: 0 !important; width: 100% !important; }
  .page-hr .card { box-shadow: none; }
}

/* School ID Issuance */
.hr-public-card{width:min(760px,calc(100vw - 32px));max-width:760px}.hr-public-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.auth-form-foot{display:flex;flex-wrap:wrap;gap:10px 18px;justify-content:center}
.public-form-trap{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.public-account-type{display:grid;gap:4px;align-content:center;padding:10px 12px;border:1px solid #d9e5dc;border-radius:8px;background:#f7faf7}.public-account-type strong{color:#173b29;font-size:13px}.registration-data-notice{margin:18px 0 12px;padding:14px 16px;border:1px solid #cbded0;border-left:4px solid #16824c;border-radius:8px;background:#f5faf6;color:#355544}.registration-data-notice h2{margin:0 0 7px;color:#173b29;font-size:14px}.registration-data-notice p{margin:5px 0;font-size:11px;line-height:1.5}.registration-data-acknowledgment{align-items:flex-start!important;margin:0 0 16px;padding:11px 12px;border:1px solid #d6e2d8;border-radius:8px;background:#fff}.registration-data-acknowledgment input{flex:0 0 auto;margin-top:2px}.registration-data-acknowledgment span{font-size:12px;line-height:1.45}
.account-security-card{max-width:920px;margin:0 auto}.account-security-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:12px;margin-top:18px}.account-security-form .button{margin:0}.mfa-setup-steps{display:grid;gap:7px;margin:18px 0;padding-left:22px;color:#415d4c}.mfa-setup-secret{display:grid;gap:7px;padding:14px;border:1px solid #cbded0;border-radius:8px;background:#f5faf6}.mfa-setup-secret span{font-size:10px;font-weight:800;text-transform:uppercase}.mfa-setup-secret code,.mfa-advanced-setup code{overflow-wrap:anywhere;font-size:14px}.mfa-advanced-setup{margin-top:10px}.mfa-advanced-setup code{display:block;margin-top:8px;padding:10px;border-radius:7px;background:#f2f4f3}.mfa-recovery-codes{margin:18px 0;padding:16px;border:2px solid #b88908;border-radius:9px;background:#fffaf0}.mfa-recovery-codes h2{margin:0 0 5px;font-size:17px}.mfa-recovery-codes p{margin:0 0 12px}.mfa-recovery-codes ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0;padding:0;list-style:none}.mfa-recovery-codes code{display:block;padding:7px 9px;border:1px solid #ead8ad;border-radius:6px;background:#fff;font-weight:800;letter-spacing:.04em}.mfa-status-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0;padding:14px;border:1px solid #b8dfc8;border-radius:8px;background:#eff9f2}.account-security-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.account-security-actions .account-security-form{display:grid;grid-template-columns:1fr;margin:0;padding:16px;border:1px solid #d7e2da;border-radius:8px}.account-security-actions h2{margin:0;font-size:16px}.account-security-actions p{margin:0;color:var(--muted);font-size:11px}
html[data-theme="dark"] .mfa-setup-secret,html[data-theme="dark"] .mfa-status-summary{border-color:#315c43;background:#102418}html[data-theme="dark"] .mfa-recovery-codes{border-color:#7b5d21;background:#2b210f}html[data-theme="dark"] .mfa-recovery-codes code,html[data-theme="dark"] .mfa-advanced-setup code{border-color:#415749;background:#0d1d14;color:#e5f5e9}html[data-theme="dark"] .account-security-actions .account-security-form{border-color:#315c43}
@media(max-width:700px){.account-security-form,.account-security-actions{grid-template-columns:1fr}.mfa-recovery-codes ul{grid-template-columns:1fr}.mfa-status-summary{align-items:flex-start;flex-direction:column}}
.registration-public-card{width:min(820px,calc(100vw - 32px));max-width:820px}.registration-eyebrow{display:block;margin:0 0 8px;color:#1c6a40;font-size:11px;font-weight:700;text-align:center;text-transform:uppercase}.registration-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:24px 0 18px}.registration-choice{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:14px;min-height:116px;padding:16px;border:1px solid #d5e2d7;border-radius:8px;color:#173b29;background:#f8fbf8;text-decoration:none;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.registration-choice:hover,.registration-choice:focus-visible{border-color:#5aa276;box-shadow:0 10px 25px rgba(19,74,43,.12);transform:translateY(-2px);outline:none}.registration-choice.student{border-color:#ceddec;background:#f7fafe}.registration-choice.student:hover,.registration-choice.student:focus-visible{border-color:#4c88bf}.registration-choice-code{width:58px;height:58px;display:grid;place-items:center;border-radius:8px;color:#fff;background:#16824c;font-size:16px;font-weight:800}.registration-choice.student .registration-choice-code{background:#367fb9}.registration-choice strong,.registration-choice small{display:block}.registration-choice strong{margin-bottom:7px;font-size:15px}.registration-choice small{color:#62756a;font-size:11px;line-height:1.45}.registration-login-link{margin-top:12px}.registration-student-form .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.registrar-registration-filters{margin:14px 0}.registrar-registration-decisions{display:grid;grid-template-columns:max-content minmax(280px,1fr);align-items:end;gap:16px;margin-top:18px;padding-top:18px;border-top:1px solid #dce7de}.registrar-registration-decisions form{margin:0}.registration-reject-form{display:grid;grid-template-columns:minmax(220px,1fr) max-content;align-items:end;gap:10px}.registration-reject-form .button{margin:0}.registrar-registration-detail .detail-grid .span-3{grid-column:1/-1}
.school-id-tabs{margin-bottom:18px}.school-id-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.school-id-kpis>div{background:#fff;border:1px solid #cfe0d3;border-radius:6px;padding:14px 16px;box-shadow:0 5px 16px rgba(21,74,47,.06)}.school-id-kpis span{display:block;color:#64748b;font-size:12px}.school-id-kpis strong{display:block;color:#123f2a;font-size:24px;line-height:1.2;margin-top:4px}.school-id-batch-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:12px 0}.school-id-batch-toolbar label{min-width:170px}.school-id-batch-toolbar .help{max-width:560px}.school-id-list-photo{display:grid;place-items:center;width:48px;height:58px;border:1px solid #cbd5d1;border-radius:4px;background:#f3f7f4;overflow:hidden;color:#426151;font-size:12px;font-weight:700}.school-id-list-photo img{width:100%;height:100%;object-fit:cover}.school-id-table td{vertical-align:middle}.school-id-editor-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr);gap:18px;align-items:start}.school-id-media-editor{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}.school-id-upload-block{border:1px solid #cfe0d3;border-radius:6px;padding:12px;display:grid;gap:9px}.school-id-upload-block>span:first-child{font-weight:700;color:#173d2b}.school-id-editor-photo{width:132px;height:164px;display:grid;place-items:center;overflow:hidden;border:1px dashed #9eb8a6;border-radius:4px;background:#f5f8f6;color:#64748b}.school-id-editor-photo img{width:100%;height:100%;object-fit:cover}.school-id-editor-signature{height:82px;display:grid;place-items:center;overflow:hidden;border:1px dashed #9eb8a6;border-radius:4px;background:#fff;color:#64748b}.school-id-editor-signature img{width:100%;height:100%;object-fit:contain}.school-id-upload-block em{font-style:normal;font-size:12px}.school-id-card-actions{margin-top:14px}.school-id-card-actions form{display:inline-flex}.school-id-revoke{margin-top:16px;border-top:1px solid #e2e8e4;padding-top:12px}.school-id-revoke form{margin-top:10px}.school-id-preview-section{margin-top:18px;overflow:hidden}.school-id-preview-pair{display:flex;gap:18px;flex-wrap:wrap;align-items:flex-start;justify-content:center;background:#e9efeb;padding:20px;border-radius:6px}
.school-id-card{box-sizing:border-box;position:relative;width:2.125in;height:3.375in;overflow:hidden;border:1px solid #b9c8bf;border-radius:3mm;background:#fff;color:#10213a;font-family:Arial,"Microsoft JhengHei",Helvetica,sans-serif;letter-spacing:0;box-shadow:0 8px 22px rgba(18,63,42,.16);isolation:isolate}.school-id-card *{box-sizing:border-box;letter-spacing:0}.school-id-brand{height:16.5mm;display:grid;grid-template-columns:12mm minmax(0,1fr);align-items:center;gap:1.5mm;padding:1.6mm 2mm 1.3mm;border-bottom:.55mm solid var(--id-accent);background:#fff;color:var(--id-primary)}.school-id-brand img{width:11mm;height:11mm;object-fit:contain;filter:drop-shadow(0 .2mm .3mm rgba(0,0,0,.18))}.school-id-brand div{min-width:0;text-align:center}.school-id-brand span,.school-id-brand strong,.school-id-brand small{display:block;max-width:100%;overflow-wrap:anywhere}.school-id-brand span{font-size:5.6pt;font-weight:700;line-height:1.05}.school-id-brand strong{font-size:5.9pt;line-height:1.08;margin-top:.35mm}.school-id-brand small{font-size:3.7pt;line-height:1.12;margin-top:.45mm}.school-id-student.school-id-front .school-id-brand{border-bottom-color:#fff;background:var(--id-primary);color:#fff}.school-id-type{height:6mm;display:grid;place-items:center;padding:0 2mm;border-bottom:.4mm solid var(--id-accent);background:#f5f8fb;color:var(--id-primary);font-size:8pt;font-weight:900;text-align:center;text-transform:uppercase;overflow:hidden}.school-id-photo{display:grid;place-items:center;overflow:hidden;border:.55mm solid var(--id-primary);border-radius:2mm;background:#f2f5f8;color:#667788;font-size:6pt;font-weight:800}.school-id-photo img{width:100%;height:100%;object-fit:cover}.school-id-employee-front-content,.school-id-student-front-content{height:63.2mm;display:flex;flex-direction:column;align-items:center;min-width:0;padding:2mm 3mm 2.4mm;text-align:center}.school-id-employee-front-content .school-id-photo{width:32mm;height:32mm;flex:0 0 32mm}.school-id-number-badge{min-height:5mm;max-width:44mm;display:grid;place-items:center;margin-top:-1.5mm;padding:.7mm 2mm;border:.35mm solid #fff;border-radius:1mm;background:var(--id-primary);color:#fff;font-size:7pt;line-height:1;overflow-wrap:anywhere;z-index:1}.school-id-employee-front-content h2,.school-id-student-front-content h2{max-width:100%;margin:1.2mm 0 0;color:var(--id-primary);font-size:7.4pt;line-height:1.08;text-transform:uppercase;overflow-wrap:anywhere}.school-id-employee-front-content p,.school-id-student-front-content p{max-width:100%;margin:.7mm 0 0;color:#253b54;font-size:5.2pt;font-weight:700;line-height:1.15;overflow-wrap:anywhere}.school-id-employee-front-content p span{font-size:4.5pt;font-weight:500}.school-id-holder-signature{position:relative;width:31mm;height:8mm;display:flex;align-items:end;justify-content:center;margin-top:auto;border-bottom:.25mm solid #42566d}.school-id-holder-signature img{position:absolute;inset:0 0 1.8mm;width:100%;height:6mm;object-fit:contain}.school-id-holder-signature span{font-size:4pt;font-style:italic;line-height:1.1}.school-id-student-front-content{padding-top:2.4mm;background:#fff}.school-id-student-front-content .school-id-photo{width:36mm;height:42mm;flex:0 0 42mm;border-radius:1mm}.school-id-student-front-content h2{margin-top:1.6mm}.school-id-student-front-content p{min-height:3.2mm}.school-id-student-number{width:calc(100% + 6mm);min-height:7mm;display:grid;place-items:center;margin-top:auto;padding:1mm 2mm;background:var(--id-primary);color:#fff;font-family:Georgia,"Times New Roman",serif;font-size:11pt;line-height:1;overflow-wrap:anywhere}.school-id-card-reference{position:absolute;right:1.2mm;bottom:.7mm;max-width:48mm;color:rgba(255,255,255,.72);font-size:2.5pt;line-height:1;z-index:3}.school-id-employee.school-id-front:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3mm;background:var(--id-accent);z-index:-1}
.school-id-back{background:#fff}.school-id-back-brand{height:15mm;border-bottom:.55mm solid var(--id-primary)}.school-id-employee-back-content,.school-id-student-back-content{height:70.7mm;display:flex;flex-direction:column;min-width:0;padding:2.6mm 3mm 3mm}.school-id-back-title{color:#111827;font-family:Georgia,"Times New Roman",serif;font-size:6.2pt;font-style:italic;line-height:1.2}.school-id-emergency-table{display:grid;margin:1.8mm 0 0;border:.3mm solid #1f2937}.school-id-emergency-table div{display:grid;grid-template-columns:14mm minmax(0,1fr);min-height:6mm;border-bottom:.25mm solid #1f2937}.school-id-emergency-table div:last-child{border-bottom:0}.school-id-emergency-table dt,.school-id-emergency-table dd{display:flex;align-items:center;min-width:0;margin:0;padding:.9mm 1mm;font-size:5pt;line-height:1.1;overflow-wrap:anywhere}.school-id-emergency-table dt{border-right:.25mm solid #1f2937;font-weight:800;text-transform:uppercase}.school-id-emergency-table dd{font-weight:700}.school-id-employee-notice{margin:3mm 1mm 0;color:#111827;font-family:Georgia,"Times New Roman",serif;font-size:6.1pt;font-weight:700;line-height:1.25;text-align:center;overflow-wrap:anywhere}.school-id-authority{position:relative;min-height:14mm;display:flex;flex-direction:column;align-items:center;justify-content:end;margin-top:auto;padding-top:7mm;text-align:center}.school-id-authority:before{content:"";position:absolute;left:8mm;right:8mm;bottom:5.8mm;border-top:.25mm solid #1f2937}.school-id-authority img{position:absolute;left:7mm;right:7mm;bottom:5.9mm;width:calc(100% - 14mm);height:9mm;object-fit:contain}.school-id-authority strong,.school-id-authority span{position:relative;z-index:1;max-width:100%;overflow-wrap:anywhere}.school-id-authority strong{font-size:6.2pt;line-height:1.05}.school-id-authority span{font-size:4.5pt;font-style:italic;line-height:1.1;margin-top:.4mm}.school-id-student-back-content{padding-top:5mm}.school-id-student-back-content h2{margin:0;color:#111827;font-family:Georgia,"Times New Roman",serif;font-size:12pt;line-height:1;text-align:center}.school-id-student-back-content ul{display:grid;gap:2.2mm;margin:4mm 0 0;padding-left:5mm}.school-id-student-back-content li{padding-left:1mm;color:#111827;font-family:Georgia,"Times New Roman",serif;font-size:6pt;line-height:1.25;overflow-wrap:anywhere}.school-id-contact-block{display:flex;flex-direction:column;align-items:center;margin-top:3.2mm;color:#111827;text-align:center}.school-id-contact-block strong{font-size:7.2pt;line-height:1.05}.school-id-contact-block span{max-width:100%;font-family:Georgia,"Times New Roman",serif;font-size:5.2pt;line-height:1.18;overflow-wrap:anywhere}.school-id-student-back-content .school-id-authority{min-height:13mm}.school-id-card-reference-back{right:1.2mm;bottom:.8mm;color:#66758a}.school-id-back:before,.school-id-back:after{content:"";position:absolute;left:0;right:0;height:3mm;background:var(--id-primary);z-index:-1}.school-id-back:before{top:0}.school-id-back:after{bottom:0}.school-id-settings form{max-width:920px}.school-id-printer-profile{display:grid;gap:3px;margin:0 0 16px;padding:12px 14px;border:1px solid #b9d5c3;border-left:4px solid #0d7a45;border-radius:6px;background:#f4faf6}.school-id-printer-profile strong{color:#15432c;font-size:14px}.school-id-printer-profile span{color:#5f7167;font-size:12px;line-height:1.4}
.school-id-employee-front-content,.school-id-student-front-content{height:62.1mm}
.school-id-employee-back-content,.school-id-student-back-content{height:69.6mm}

/* Official SJS portrait CR80 template v3. */
.school-id-card {
  width: 53.975mm;
  height: 85.725mm;
  border: .25mm solid #aab7b1;
  border-radius: .8mm;
  background-color: #fff;
  color: #111827;
  font-family: Arial, "Microsoft JhengHei", Helvetica, sans-serif;
}

.school-id-card > * {
  position: relative;
  z-index: 2;
}

.school-id-card-reference {
  display: none;
}

.school-id-employee.school-id-front {
  background: #edf8f2 url("id-employee-front-bg.png") center / cover no-repeat;
}

.school-id-employee.school-id-front::after {
  display: none;
}

.school-id-employee.school-id-front > .school-id-brand {
  position: absolute;
  inset: 0 0 auto;
  height: 17.4mm;
  grid-template-columns: 12.5mm minmax(0, 1fr);
  gap: 1.1mm;
  padding: 1.3mm 3.2mm 1mm 2.8mm;
  border: 0;
  background: transparent;
  color: #102039;
}

.school-id-employee.school-id-front > .school-id-brand img {
  width: 11.8mm;
  height: 11.8mm;
}

.school-id-employee.school-id-front > .school-id-brand span {
  color: #132d6e;
  font-family: "Microsoft JhengHei", Arial, sans-serif;
  font-size: 6.4pt;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 .2mm 0 rgba(255, 255, 255, .88);
}

.school-id-employee.school-id-front > .school-id-brand strong {
  color: #112451;
  font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
  font-size: 4.05pt;
  font-weight: 900;
  line-height: 1.05;
  margin-top: .45mm;
  white-space: nowrap;
}

.school-id-employee.school-id-front > .school-id-brand small {
  color: #101827;
  font-size: 4pt;
  font-weight: 700;
  line-height: 1;
  margin-top: .45mm;
}

.school-id-employee.school-id-front > .school-id-type {
  display: none;
}

.school-id-employee-front-content {
  position: absolute;
  inset: 0;
  height: auto;
  padding: 18.2mm 3.4mm 3.1mm;
  background: transparent;
}

.school-id-employee-front-content .school-id-photo {
  width: 34.5mm;
  height: 35.5mm;
  flex: 0 0 35.5mm;
  border: .9mm solid #169cd4;
  border-radius: 7mm 7mm 4.5mm 4.5mm;
  background: #f5f8fb;
  box-shadow: 0 .8mm 1.8mm rgba(1, 34, 89, .2);
}

.school-id-employee-front-content .school-id-number-badge {
  width: 29mm;
  min-height: 5.6mm;
  max-width: 40mm;
  margin-top: -1.9mm;
  padding: .75mm 1.5mm;
  border: .45mm solid #fff;
  border-radius: 1.4mm;
  background: #07118f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7.3pt;
  font-weight: 900;
  box-shadow: 0 .45mm 1mm rgba(1, 29, 82, .22);
}

.school-id-employee-front-content h2 {
  margin-top: 1.25mm;
  color: #0c236f;
  font-size: 7.25pt;
  font-weight: 900;
  line-height: 1.02;
  text-shadow: 0 .2mm 0 #fff, 0 0 .8mm rgba(255, 255, 255, .9);
}

.school-id-employee-front-content p {
  margin-top: .7mm;
  color: #101827;
  font-size: 5.35pt;
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 .2mm 0 #fff, 0 0 .8mm rgba(255, 255, 255, .9);
}

.school-id-employee-front-content p span {
  display: none;
}

.school-id-employee-front-content .school-id-holder-signature {
  width: 31.5mm;
  height: 7.8mm;
  margin: auto 0 1.7mm;
  border-bottom-color: #111827;
}

.school-id-employee-front-content .school-id-holder-signature img {
  height: 6.5mm;
}

.school-id-employee-front-content .school-id-holder-signature span {
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4pt;
}

.school-id-student.school-id-front {
  background: #d7edfb url("id-student-front-bg.png") center / cover no-repeat;
}

.school-id-student.school-id-front > .school-id-brand {
  position: absolute;
  inset: 0 0 auto;
  height: 17.3mm;
  grid-template-columns: 12.5mm minmax(0, 1fr);
  gap: 1.2mm;
  padding: 1.4mm 2.4mm 1.2mm 2.5mm;
  border: 0;
  background: #082a74;
  color: #fff;
}

.school-id-student.school-id-front > .school-id-brand img {
  width: 11.8mm;
  height: 11.8mm;
}

.school-id-student.school-id-front > .school-id-brand span {
  font-size: 6.25pt;
  font-weight: 800;
  line-height: 1;
}

.school-id-student.school-id-front > .school-id-brand strong {
  font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
  font-size: 4.8pt;
  font-weight: 900;
  line-height: 1.05;
  margin-top: .45mm;
  white-space: nowrap;
}

.school-id-student.school-id-front > .school-id-brand small {
  font-size: 3.15pt;
  font-weight: 600;
  line-height: 1.1;
  margin-top: .5mm;
}

.school-id-student.school-id-front > .school-id-type {
  position: absolute;
  top: 18.2mm;
  left: 2.5mm;
  right: 2.5mm;
  height: 6.5mm;
  padding: 0;
  border: 0;
  background: transparent;
  color: #101827;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8.8pt;
  font-weight: 900;
  line-height: 1;
  text-shadow: -.3mm -.3mm 0 #fff, .3mm -.3mm 0 #fff, -.3mm .3mm 0 #fff, .3mm .3mm 0 #fff;
  z-index: 3;
}

.school-id-student-front-content {
  position: absolute;
  inset: 0;
  height: auto;
  padding: 25.8mm 0 9mm;
  background: transparent;
}

.school-id-student-front-content .school-id-photo {
  width: 35.5mm;
  height: 40mm;
  flex: 0 0 40mm;
  border: 1.25mm solid #fff;
  border-radius: .6mm;
  background: #f3f5f7;
  box-shadow: 0 .8mm 2mm rgba(1, 30, 77, .32);
}

.school-id-student-front-content h2 {
  width: 100%;
  margin: 1.1mm 0 0;
  padding: .7mm 2mm .35mm;
  background: rgba(255, 255, 255, .88);
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7.1pt;
  font-weight: 900;
  line-height: 1.02;
}

.school-id-student-front-content p {
  width: 100%;
  min-height: 3mm;
  margin: 0;
  padding: .2mm 2mm .65mm;
  background: rgba(255, 255, 255, .88);
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.3pt;
  font-weight: 700;
  line-height: 1.05;
}

.school-id-student-front-content .school-id-student-number {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  min-height: 9mm;
  margin: 0;
  padding: 1mm 2mm;
  background: #082a74;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11.2pt;
  font-weight: 900;
}

.school-id-employee.school-id-back {
  background: #fff;
}

.school-id-employee.school-id-back::before {
  content: "";
  position: absolute;
  inset: 21mm 5mm 12mm;
  height: auto;
  background: url("sjs-logo-small.png") center / 39mm auto no-repeat;
  opacity: .1;
  z-index: 0;
}

.school-id-employee.school-id-back::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10mm;
  background: #159bd7;
  clip-path: polygon(0 48%, 32% 15%, 64% 39%, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}

.school-id-employee.school-id-back > .school-id-back-brand {
  height: 17.8mm;
  grid-template-columns: 12mm minmax(0, 1fr);
  gap: 1mm;
  padding: 1.4mm 2.5mm 1.2mm;
  border: 0;
  background: transparent;
  color: #132d6e;
}

.school-id-employee.school-id-back > .school-id-back-brand img {
  width: 11.2mm;
  height: 11.2mm;
}

.school-id-employee.school-id-back > .school-id-back-brand span {
  font-size: 6.1pt;
  font-weight: 800;
  line-height: 1;
}

.school-id-employee.school-id-back > .school-id-back-brand strong {
  font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
  font-size: 4.15pt;
  font-weight: 900;
  line-height: 1.05;
  margin-top: .4mm;
  white-space: nowrap;
}

.school-id-employee.school-id-back > .school-id-back-brand small {
  color: #111827;
  font-size: 3.35pt;
  font-weight: 600;
  line-height: 1.05;
  margin-top: .45mm;
}

.school-id-employee-back-content {
  height: calc(100% - 17.8mm);
  padding: 1mm 3.5mm 4.8mm;
}

.school-id-employee-back-content .school-id-back-title {
  color: #111827;
  font-size: 5.7pt;
  line-height: 1.15;
}

.school-id-employee-back-content .school-id-emergency-table {
  margin-top: 1.5mm;
  border-width: .25mm;
  background: rgba(255, 255, 255, .72);
}

.school-id-employee-back-content .school-id-emergency-table div {
  grid-template-columns: 14.5mm minmax(0, 1fr);
  min-height: 5.6mm;
  border-bottom-width: .2mm;
}

.school-id-employee-back-content .school-id-emergency-table dt,
.school-id-employee-back-content .school-id-emergency-table dd {
  padding: .7mm .9mm;
  font-size: 4.75pt;
}

.school-id-employee-back-content .school-id-employee-notice {
  margin: 3.1mm 1mm 0;
  color: #111827;
  font-size: 5.65pt;
  font-weight: 700;
  line-height: 1.23;
}

.school-id-employee-back-content .school-id-authority {
  min-height: 14mm;
  margin: auto 2mm 1.3mm;
  padding-top: 7mm;
}

.school-id-employee-back-content .school-id-authority strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.8pt;
}

.school-id-employee-back-content .school-id-authority span {
  font-size: 4.3pt;
}

.school-id-student.school-id-back {
  background: #fff;
}

.school-id-student.school-id-back::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 15.5mm;
  background: #3158c8;
  clip-path: ellipse(72% 100% at 50% 0);
  z-index: 0;
}

.school-id-student.school-id-back::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12mm;
  background: #3158c8;
  clip-path: ellipse(72% 100% at 50% 100%);
  z-index: 0;
}

.school-id-student.school-id-back > .school-id-back-brand {
  display: none;
}

.school-id-student-back-content {
  height: 100%;
  padding: 16.5mm 4mm 8.2mm;
}

.school-id-student-back-content h2 {
  color: #111827;
  font-size: 12pt;
  font-weight: 900;
}

.school-id-student-back-content ul {
  gap: 2.2mm;
  margin-top: 4.2mm;
  padding-left: 5.5mm;
}

.school-id-student-back-content li {
  padding-left: .5mm;
  font-size: 5.55pt;
  font-weight: 700;
  line-height: 1.25;
}

.school-id-student-back-content .school-id-contact-block {
  margin-top: 3.6mm;
}

.school-id-student-back-content .school-id-contact-block strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7pt;
}

.school-id-student-back-content .school-id-contact-block span {
  font-size: 4.75pt;
  line-height: 1.14;
}

.school-id-student-back-content .school-id-authority {
  min-height: 13mm;
  margin-top: auto;
  padding-top: 6.5mm;
}

.school-id-student-back-content .school-id-authority strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.8pt;
}

.school-id-student-back-content .school-id-authority span {
  font-size: 4.2pt;
}

@media print {
  .school-id-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

@media(max-width:1000px){.school-id-editor-layout{grid-template-columns:1fr}.school-id-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.hr-public-form .form-grid{grid-template-columns:1fr}.hr-public-form .span-2{grid-column:auto}.school-id-kpis{grid-template-columns:1fr 1fr;gap:8px}.school-id-kpis>div{padding:10px}.school-id-kpis strong{font-size:20px}.school-id-media-editor{grid-template-columns:1fr}.school-id-preview-pair{padding:8px;justify-content:flex-start;overflow-x:auto}.school-id-card{flex:0 0 2.125in}.school-id-batch-toolbar{align-items:stretch}.school-id-batch-toolbar>*{width:100%}}

@keyframes portal-return-row-highlight {
  0%, 38% {
    background-color: rgba(23, 121, 72, .18);
    box-shadow: inset 4px 0 0 #177948;
  }
  100% {
    background-color: transparent;
    box-shadow: inset 4px 0 0 transparent;
  }
}

.table tbody tr.portal-return-row > td,
[data-record-row].portal-return-row {
  animation: portal-return-row-highlight 2.5s ease-out;
}
.topbar-account-text { display: grid; gap: 2px; line-height: 1.05; text-align: left; }
.topbar-account-text small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.topbar-account-text strong { max-width: 190px; overflow: hidden; color: var(--navy); font-size: 13px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.topbar-account-text em { display: block; max-width: 220px; overflow: hidden; color: #3f7052; font-size: 10px; font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.topbar-account.dept-tone-1 { --avatar-a: #0f6b3c; --avatar-b: #06391f; --avatar-glow: rgba(15, 107, 60, .18); }
.topbar-account.dept-tone-2 { --avatar-a: #c9342f; --avatar-b: #7f1d1d; --avatar-glow: rgba(201, 52, 47, .16); }
.topbar-account.dept-tone-3 { --avatar-a: #d89d31; --avatar-b: #854d0e; --avatar-glow: rgba(216, 157, 49, .18); }
.topbar-account.dept-tone-4 { --avatar-a: #2563eb; --avatar-b: #0f3c88; --avatar-glow: rgba(37, 99, 235, .15); }
.topbar-account.dept-tone-5 { --avatar-a: #7c3aed; --avatar-b: #452285; --avatar-glow: rgba(124, 58, 237, .15); }
.topbar-account.dept-tone-6 { --avatar-a: #0f766e; --avatar-b: #134e4a; --avatar-glow: rgba(15, 118, 110, .16); }
.topbar-account.dept-tone-7 { --avatar-a: #475569; --avatar-b: #1f2937; --avatar-glow: rgba(71, 85, 105, .15); }
.topbar-account.dept-tone-8 { --avatar-a: #be185d; --avatar-b: #831843; --avatar-glow: rgba(190, 24, 93, .15); }
.topbar-account-logout { position: absolute; top: calc(100% + 9px); right: 4px; z-index: 40; min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid rgba(201, 52, 47, .14); border-radius: 12px; background: rgba(255,255,255,.98); color: var(--red); font-size: 12px; font-weight: 900; text-decoration: none; box-shadow: 0 14px 34px rgba(15,79,42,.16); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-5px) scale(.98); transition: opacity .16s ease, visibility .16s ease, background .16s ease, color .16s ease, transform .16s ease; }
.topbar-account-security { position: absolute; top: calc(100% + 9px); right: 102px; z-index: 40; min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid rgba(15, 126, 72, .18); border-radius: 12px; background: rgba(255,255,255,.98); color: var(--green); font-size: 12px; font-weight: 900; text-decoration: none; box-shadow: 0 14px 34px rgba(15,79,42,.16); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-5px) scale(.98); transition: opacity .16s ease, visibility .16s ease, background .16s ease, color .16s ease, transform .16s ease; }
.topbar-account:hover .topbar-account-logout,
.topbar-account:focus-within .topbar-account-logout,
.topbar-account:hover .topbar-account-security,
.topbar-account:focus-within .topbar-account-security { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.topbar-account-logout:hover { background: #fff5f5; color: #9f1f1c; text-decoration: none; transform: translateY(0) scale(1.02); }
.topbar-account-security:hover { background: #f3fbf6; color: #0d663b; text-decoration: none; transform: translateY(0) scale(1.02); }
.topbar-account-logout svg,
.topbar-account-security svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.topbar-icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.topbar-icon-button:hover { background: rgba(15, 107, 60, .08); border-color: rgba(15, 107, 60, .14); color: var(--red); text-decoration: none; transform: translateY(-1px); }
.topbar-icon-button svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.main { padding: 26px 28px 50px; max-width: 1600px; margin: auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--muted); }
.page-sticky-toolbar {
  position: sticky;
  top: var(--sticky-toolbar-top);
  z-index: var(--sticky-toolbar-z);
  margin: -4px 0 16px;
  padding: 14px;
  border: 1px solid rgba(15, 107, 60, .16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 248, 239, .92));
  box-shadow: 0 18px 48px rgba(15, 79, 42, .12);
  backdrop-filter: blur(14px);
}
.card > .page-sticky-toolbar { margin: -4px -4px 16px; top: calc(var(--sticky-toolbar-top) + 8px); }
.page-sticky-toolbar .page-head { margin-bottom: 12px; }
.page-sticky-toolbar .filters { margin-bottom: 12px; }
.page-sticky-toolbar .bulk-actions { margin: 0; }
.page-sticky-toolbar > :last-child { margin-bottom: 0; }
html[data-theme="dark"] .page-sticky-toolbar {
  background: linear-gradient(135deg, rgba(15, 32, 23, .97), rgba(10, 26, 17, .9));
  border-color: #315c43;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .34);
}

.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; margin-bottom: 20px; }
.card { background: rgba(255, 255, 255, .96); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.kpi { border-left: 5px solid var(--blue); min-width: 0; overflow: hidden; }
a.kpi-link { display: block; color: inherit; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
a.kpi-link:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(15, 79, 42, .16); text-decoration: none; }
.kpi.green { border-color: var(--green); }
.kpi.orange { border-color: var(--orange); }
.kpi.red { border-color: var(--red); }
.kpi .label { color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.kpi .value { font-size: clamp(20px, 1.8vw, 27px); font-weight: 800; color: var(--navy); margin-top: 7px; line-height: 1.12; overflow-wrap: anywhere; }
.two-col { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.three-col { grid-template-columns: repeat(3, 1fr); }

.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; background: #fff; color: var(--text); font-weight: 600; cursor: pointer; box-shadow: 0 3px 10px rgba(15, 79, 42, .05); }
.button:hover { text-decoration: none; background: #f8fafc; }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.danger { background: var(--red); border-color: var(--red); color: #fff; }
.button.small { padding: 6px 10px; font-size: 12px; }
.mobile-action-symbol { display: none; }
.mobile-action-symbol svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mobile-action-label { min-width: 0; }
.button.sidebar-toggle { border-color: transparent; background: transparent; color: #fff; box-shadow: none; }
.button.sidebar-toggle:hover { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
html[data-theme="dark"] .button.sidebar-toggle { border-color: transparent; background: transparent; color: #d7f0df; box-shadow: none; }
html[data-theme="dark"] .button.sidebar-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; }
.section-head .bulk-action-form { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

.table-wrap { position: relative; overflow: auto; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.portal-table-scroll { overflow-x: auto; overflow-y: visible; scrollbar-gutter: stable; scroll-behavior: smooth; isolation: isolate; }
.portal-table-scroll.portal-table-scroll-inner-y { overflow-y: auto; }
.portal-table-scroll-x { overscroll-behavior-x: contain; }
.portal-table-scroll::-webkit-scrollbar,
.portal-scroll-sync-bar::-webkit-scrollbar { height: 12px; }
.portal-table-scroll::-webkit-scrollbar-track,
.portal-scroll-sync-bar::-webkit-scrollbar-track { background: rgba(15, 107, 60, .08); border-radius: 999px; }
.portal-table-scroll::-webkit-scrollbar-thumb,
.portal-scroll-sync-bar::-webkit-scrollbar-thumb { background: rgba(15, 107, 60, .42); border: 3px solid rgba(255, 255, 255, .88); border-radius: 999px; }
.portal-scroll-sync-bar {
  position: sticky;
  top: var(--portal-scrollbar-top);
  z-index: calc(var(--sticky-toolbar-z) + 8);
  height: 18px;
  margin: 0 0 6px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(15, 107, 60, .12);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(239, 248, 239, .94));
  box-shadow: 0 8px 22px rgba(15, 79, 42, .08);
}
.portal-scroll-sync-bar[hidden] { display: none !important; }
.portal-scroll-sync-bar > div { height: 1px; min-width: 100%; }
.portal-sticky-header-clone {
  position: fixed;
  z-index: calc(var(--sticky-toolbar-z) + 7);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px 9px 0 0;
  background: #eef7ee;
  box-shadow: 0 12px 28px rgba(15, 79, 42, .13);
  pointer-events: none;
}
.portal-sticky-header-clone[hidden] { display: none !important; }
.portal-sticky-header-scroll {
  width: 100%;
  overflow: hidden;
}
.portal-sticky-header-table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.portal-sticky-header-table th {
  box-shadow: inset 0 -1px 0 var(--border), 0 5px 14px rgba(15, 79, 42, .08);
}
.portal-table-scroll-hint {
  display: none;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.portal-has-overflow-x + .portal-table-scroll-hint,
.portal-has-overflow-x .portal-table-scroll-hint { display: block; }
.table { width: 100%; border-collapse: collapse; white-space: normal; }
.portal-wide-table { border-collapse: separate; border-spacing: 0; }
.portal-wide-table thead th {
  position: sticky;
  top: var(--portal-table-head-top);
  z-index: calc(var(--sticky-toolbar-z) + 2);
  background: #eef7ee;
  box-shadow: inset 0 -1px 0 var(--border), 0 5px 14px rgba(15, 79, 42, .08);
}
.portal-table-scroll-inner-y .portal-wide-table thead th { top: 0; }
.portal-wide-table thead th.inventory-select-col,
.portal-wide-table thead th.user-select-col,
.portal-wide-table thead th.inventory-actions-col,
.portal-wide-table thead th.table-actions-cell {
  z-index: calc(var(--sticky-toolbar-z) + 6);
}
.table th { background: #eef7ee; color: var(--navy); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.table th, .table td { max-width: 360px; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.table th { white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbf6f4; }
.table .wrap { white-space: normal; min-width: 220px; }
.inventory-table-wrap { position: relative; }
.inventory-table { min-width: 1520px; }
.inventory-table .inventory-select-col { position: sticky; left: 0; width: 44px; min-width: 44px; text-align: center; background: #fff; box-shadow: 12px 0 22px rgba(15, 79, 42, .08); z-index: 6; }
.inventory-table th.inventory-select-col { background: #eef7ee; z-index: calc(var(--sticky-toolbar-z) + 7); }
.inventory-table tbody tr:hover .inventory-select-col { background: #fbf6f4; }
.inventory-table .inventory-actions-col { position: sticky; right: 0; min-width: 168px; background: #fff; box-shadow: -12px 0 22px rgba(15, 79, 42, .10); z-index: 6; }
.inventory-table th.inventory-actions-col { background: #eef7ee; z-index: calc(var(--sticky-toolbar-z) + 7); }
.inventory-table tbody tr:hover .inventory-actions-col { background: #fbf6f4; }
.inventory-row-actions { flex-wrap: nowrap; justify-content: flex-end; }
.table .table-actions-cell { position: sticky; right: 0; min-width: 132px; max-width: 240px; white-space: nowrap; overflow-wrap: normal; background: #fff; box-shadow: -12px 0 22px rgba(15, 79, 42, .10); z-index: 6; text-align: right; }
.table th.table-actions-cell { background: #eef7ee; z-index: calc(var(--sticky-toolbar-z) + 7); }
.table tbody tr:hover .table-actions-cell { background: #fbf6f4; }
.table .table-actions-cell .button,
.table .table-actions-cell button { white-space: nowrap; }
.table .table-actions-cell .actions,
.table .table-actions-cell .approval-actions,
.table .table-actions-cell .inventory-row-actions { justify-content: flex-end; }
.user-table { min-width: 1220px; }
.user-table th, .user-table td { max-width: 260px; }
.user-table .table-actions-cell { min-width: 190px; }
.user-table .user-select-col { position: sticky; left: 0; width: 44px; min-width: 44px; max-width: 44px; text-align: center; background: #fff; box-shadow: 12px 0 22px rgba(15, 79, 42, .08); z-index: 6; vertical-align: middle; }
.user-table th.user-select-col { background: #eef7ee; z-index: calc(var(--sticky-toolbar-z) + 7); }
.user-table tbody tr:hover .user-select-col { background: #fbf6f4; }
.user-account-cell { min-width: 190px; }
.user-account-cell strong, .user-account-cell small { display: block; }
.user-account-cell small { margin-top: 3px; color: var(--muted); font-weight: 650; }
.user-column-preview { display: -webkit-box; max-width: 280px; overflow: hidden; color: var(--text); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.user-detail-toggle[aria-expanded="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.user-detail-row[hidden] { display: none !important; }
.user-detail-row > td { padding: 0 !important; background: linear-gradient(135deg, #fbfdf8, #f0f8f0); }
.user-detail-row:hover > td { background: linear-gradient(135deg, #fbfdf8, #f0f8f0); }
.user-detail-panel { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(220px, .85fr) minmax(0, 1.6fr); gap: 14px; padding: 16px; border-top: 1px solid rgba(15, 107, 60, .14); }
.user-detail-card { min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255, 255, 255, .82); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.user-detail-card.span-2 { grid-column: span 1; }
.user-detail-card h3 { margin: 0 0 10px; color: var(--green); font-size: 14px; }
.user-detail-card p { margin: 0; color: var(--text); }
.user-detail-list { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px 10px; margin: 0; }
.user-detail-list dt { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.user-detail-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.user-permission-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.user-permission-chip { display: inline-grid; gap: 2px; padding: 8px 10px; border: 1px solid rgba(15, 107, 60, .15); border-radius: 999px; background: #eef7ee; color: var(--green); }
.user-permission-chip strong { font-size: 12px; line-height: 1.1; }
.user-permission-chip small { color: #3f6f52; font-size: 10px; font-weight: 800; line-height: 1.1; }
.user-full-permission-text { margin-top: 12px !important; color: var(--muted) !important; font-size: 12px; line-height: 1.45; }
.password-reset-panel { border-color: rgba(249, 115, 22, .26); background: linear-gradient(145deg, #fffaf3, #fff); }
.password-reset-list { display: grid; gap: 10px; }
.password-reset-request { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 13px; border: 1px solid rgba(249, 115, 22, .22); border-radius: 12px; background: rgba(255, 255, 255, .84); }
.password-reset-request strong,
.password-reset-request small { display: block; }
.password-reset-request strong { color: var(--navy); font-size: 15px; font-weight: 650; }
.password-reset-request small { margin-top: 3px; color: var(--muted); line-height: 1.35; }
.bulk-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fbfdf8; }
.bulk-actions .help { margin: 0; }
.bulk-actions-buttons { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.bulk-delete-form, .bulk-action-form { margin: 0; }
.password-force-check { align-self: end; min-height: 44px; }
.password-force-check .help { display: block; margin-top: 4px; }
html[data-theme="dark"] .inventory-table .inventory-actions-col { background: rgba(15, 32, 23, .98); box-shadow: -12px 0 22px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .inventory-table th.inventory-actions-col,
html[data-theme="dark"] .inventory-table tbody tr:hover .inventory-actions-col { background: rgba(20, 50, 32, .98); }
html[data-theme="dark"] .inventory-table .inventory-select-col { background: rgba(15, 32, 23, .98); box-shadow: 12px 0 22px rgba(0, 0, 0, .24); }
html[data-theme="dark"] .inventory-table th.inventory-select-col,
html[data-theme="dark"] .inventory-table tbody tr:hover .inventory-select-col { background: rgba(20, 50, 32, .98); }
html[data-theme="dark"] .bulk-actions { background: rgba(10, 37, 24, .92); border-color: rgba(134, 239, 172, .24); }
html[data-theme="dark"] .password-reset-panel,
html[data-theme="dark"] .password-reset-request { background: rgba(15, 32, 23, .96); border-color: #854d0e; }
html[data-theme="dark"] .table .table-actions-cell { background: rgba(15, 32, 23, .98); box-shadow: -12px 0 22px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .table th.table-actions-cell,
html[data-theme="dark"] .table tbody tr:hover .table-actions-cell { background: rgba(20, 50, 32, .98); }
html[data-theme="dark"] .portal-wide-table thead th {
  background: rgba(20, 50, 32, .98);
  box-shadow: inset 0 -1px 0 #315c43, 0 5px 16px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .portal-scroll-sync-bar {
  border-color: rgba(134, 239, 172, .2);
  background: linear-gradient(180deg, rgba(15, 32, 23, .97), rgba(10, 26, 17, .93));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .portal-sticky-header-clone {
  border-color: #315c43;
  background: rgba(20, 50, 32, .98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
}
html[data-theme="dark"] .portal-table-scroll::-webkit-scrollbar-track,
html[data-theme="dark"] .portal-scroll-sync-bar::-webkit-scrollbar-track { background: rgba(134, 239, 172, .08); }
html[data-theme="dark"] .portal-table-scroll::-webkit-scrollbar-thumb,
html[data-theme="dark"] .portal-scroll-sync-bar::-webkit-scrollbar-thumb { background: rgba(134, 239, 172, .42); border-color: rgba(10, 26, 17, .9); }
html[data-theme="dark"] .user-table .user-select-col { background: rgba(15, 32, 23, .98); box-shadow: 12px 0 22px rgba(0, 0, 0, .24); }
html[data-theme="dark"] .user-table th.user-select-col,
html[data-theme="dark"] .user-table tbody tr:hover .user-select-col { background: rgba(20, 50, 32, .98); }
html[data-theme="dark"] .user-detail-row > td,
html[data-theme="dark"] .user-detail-row:hover > td { background: linear-gradient(135deg, rgba(15, 32, 23, .98), rgba(20, 50, 32, .94)); }
html[data-theme="dark"] .user-detail-card { background: rgba(10, 26, 18, .72); border-color: rgba(134, 239, 172, .16); }
html[data-theme="dark"] .user-permission-chip { background: #102418; border-color: #315c43; color: #8df0ad; }
html[data-theme="dark"] .user-permission-chip small { color: #b8c9be; }
.sort-link { display: inline-flex; align-items: center; gap: 6px; color: var(--navy); text-decoration: none; }
.sort-link:hover { color: var(--blue); text-decoration: none; }
.sort-link.active { color: var(--red); }
.sort-indicator { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid transparent; border-radius: 999px; padding: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 350; line-height: 1; }
.sort-indicator svg { width: 14px; height: 14px; display: block; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.sort-link:hover .sort-indicator { background: transparent; border-color: transparent; color: var(--green); }
.sort-link.active .sort-indicator { background: transparent; border-color: transparent; color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 35px !important; }

.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef1f5; color: #475467; }
.badge.success { background: #dcfae6; color: #166534; }
.badge.info { background: #dbeafe; color: #1e40af; }
.badge.warning { background: #ffedd5; color: #9a3412; }
.badge.danger { background: #fee2e2; color: #991b1b; }
a.badge-link { text-decoration: none; border: 1px solid rgba(30, 64, 175, .18); }
a.badge-link:hover { background: #bfdbfe; color: #17306f; text-decoration: none; }

.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.repair-parts-panel { border: 1px solid rgba(15, 107, 60, .14); border-radius: 16px; padding: 16px; background: linear-gradient(135deg, #fbfdf8, #fff); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.repair-parts-panel h2, .repair-parts-panel h3 { margin: 0 0 6px; color: var(--green); }
.repair-parts-lock-note { display: inline-flex; margin: 8px 0 0; padding: 8px 11px; border: 1px dashed rgba(245, 158, 11, .58); border-radius: 12px; background: #fff7ed; color: #9a3412; font-weight: 800; font-size: 12px; }
.repair-parts-panel.is-locked .repair-part-lines { opacity: .56; }
.repair-part-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.repair-part-fieldset:disabled { cursor: not-allowed; }
.repair-part-fieldset:disabled select,
.repair-part-fieldset:disabled input,
.repair-part-fieldset:disabled button { cursor: not-allowed; }
.repair-part-lines { display: grid; gap: 12px; margin-bottom: 12px; }
.repair-part-row { display: grid; grid-template-columns: minmax(280px, 1fr) 110px minmax(220px, .8fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.82); }
.repair-part-row label { min-width: 0; margin: 0; }
.repair-part-remove { align-self: start; margin-top: 27px; white-space: nowrap; }
html[data-theme="dark"] .repair-parts-panel { background: linear-gradient(135deg, rgba(15, 32, 23, .98), rgba(20, 50, 32, .95)); border-color: rgba(134, 239, 172, .18); }
html[data-theme="dark"] .repair-part-row { background: rgba(10, 26, 18, .72); border-color: rgba(134, 239, 172, .14); }
html[data-theme="dark"] .repair-parts-lock-note { background: rgba(120, 53, 15, .28); border-color: rgba(251, 191, 36, .46); color: #fde68a; }
label { display: block; font-weight: 650; color: #344054; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; border: 1px solid #cbd5e1; border-radius: 7px; padding: 9px 10px; background: #fff; color: var(--text); }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b8e3c6; border-color: var(--blue); }
.help { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 4px; }
.required:after { content: ' *'; color: var(--red); }

.filters { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.filters label { min-width: 170px; }
.filters input, .filters select { margin-top: 4px; }
.per-page-control { margin-top: 12px; margin-bottom: 0; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 15px; border: 1px solid; }
.alert.success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.alert.danger { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.alert.warning { background: #fffaeb; border-color: #fedf89; color: #b54708; }
.alert.info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }

.pagination { display: flex; gap: 5px; margin-top: 16px; }
.pagination a, .pagination span { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.pagination .current { background: var(--navy); color: #fff; }
.progress { height: 10px; background: #e5e7eb; border-radius: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--blue); }
.metric-list { list-style: none; padding: 0; margin: 0; }
.metric-list li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 10px 0; }
.metric-list li:last-child { border: 0; }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-title-row h2 { margin-bottom: 3px; }
.dashboard-insight-grid { grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); align-items: start; }
.dashboard-table-card, .dashboard-feed-card, .dashboard-feed-section { overflow: hidden; }
.dashboard-feed-list { display: grid; gap: 10px; }
.dashboard-feed-list li { display: block; border: 0; padding: 0; }
.dashboard-feed-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 14px; color: inherit; text-decoration: none; background: linear-gradient(135deg, #fff, #fbfdf8); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.dashboard-feed-link:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(15, 107, 60, .25); box-shadow: 0 14px 28px rgba(15, 79, 42, .12); }
.feed-dot { width: 14px; height: 14px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 5px rgba(15, 107, 60, .10); }
.feed-dot.warning, .feed-dot.pending, .feed-dot.pending-approval, .feed-dot.reported, .feed-dot.new-request, .feed-dot.orange { background: var(--orange); box-shadow: 0 0 0 5px rgba(249, 115, 22, .13); }
.feed-dot.danger, .feed-dot.overdue, .feed-dot.cancelled, .feed-dot.rejected, .feed-dot.red { background: var(--red); box-shadow: 0 0 0 5px rgba(201, 52, 47, .13); }
.feed-body { min-width: 0; display: grid; gap: 2px; }
.feed-body small { color: var(--muted); font-weight: 750; }
.feed-body strong { color: var(--navy); overflow-wrap: anywhere; }
.feed-body span { color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.feed-date-chip { min-width: 92px; padding: 8px 10px; border-radius: 12px; color: #065f46; background: #dcfae6; border: 1px solid rgba(15, 107, 60, .16); font-weight: 850; text-align: center; line-height: 1.15; }
.official-calendar-feed-link { grid-template-columns: auto minmax(0, 1fr) auto; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.detail { padding: 12px; background: #f8fbf5; border-radius: 7px; }
.detail small { display: block; color: var(--muted); margin-bottom: 5px; }
.detail strong { word-break: break-word; }
.dashboard-access-shell { margin-bottom: 18px; }
.dashboard-access-card { border: 1px solid rgba(15, 79, 42, .14); border-radius: 16px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); overflow: hidden; }
.dashboard-access-card summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; padding: 14px 16px; cursor: pointer; background: radial-gradient(circle at top right, rgba(15, 107, 60, .10), transparent 42%), linear-gradient(135deg, #fff, #f7fbf4); transition: background .18s ease, transform .18s ease; }
.dashboard-access-card summary::-webkit-details-marker { display: none; }
.dashboard-access-card summary:hover { background: radial-gradient(circle at top right, rgba(15, 107, 60, .16), transparent 42%), linear-gradient(135deg, #fff, #eef7ee); }
.access-summary-icon { width: 42px; height: 42px; border-radius: 14px; display: inline-grid; place-items: center; color: #06391f; background: linear-gradient(135deg, #bbf7d0, rgba(255,255,255,.84)); box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 10px 24px rgba(15, 79, 42, .12); }
.access-summary-icon svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.access-summary-main { min-width: 0; }
.access-summary-main small, .access-detail-block small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; margin-bottom: 4px; text-transform: uppercase; }
.access-summary-main strong { display: block; color: var(--navy); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-summary-pill, .access-summary-action { border-radius: 999px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.access-summary-pill { padding: 6px 10px; color: var(--green); background: #dcfae6; border: 1px solid rgba(15, 107, 60, .16); }
.access-summary-action { padding: 6px 11px; color: #fff; background: var(--green); box-shadow: 0 8px 18px rgba(15, 107, 60, .16); font-size: 0; }
.access-summary-action::after { content: "Click to view"; font-size: 12px; }
.dashboard-access-card[open] .access-summary-action { background: var(--red); }
.dashboard-access-card[open] .access-summary-action::after { content: "Hide details"; }
.dashboard-access-details { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; padding: 15px 16px 16px; border-top: 1px solid var(--border); background: rgba(248, 251, 245, .72); animation: access-panel-in .16s ease both; }
.access-detail-block { padding: 13px; border: 1px solid rgba(15, 79, 42, .10); border-radius: 13px; background: #fff; }
.access-detail-block.wide { min-width: 0; }
.access-detail-block strong { color: var(--navy); word-break: break-word; }
.access-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.access-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 7px 9px; border-radius: 999px; border: 1px solid rgba(15, 79, 42, .10); background: #f8fbf5; color: var(--text); }
.access-chip strong { color: var(--navy); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.access-chip small { margin: 0; padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: 0; text-transform: none; color: var(--muted); background: #eef1f5; white-space: nowrap; }
.access-chip.view small { color: #1e40af; background: #dbeafe; }
.access-chip.edit small { color: #166534; background: #dcfae6; }
.access-chip.approve small { color: #9a3412; background: #ffedd5; }
.access-chip.delete small { color: #991b1b; background: #fee2e2; }
.access-count-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.access-count-row span { padding: 4px 8px; border-radius: 999px; background: #f8fafc; border: 1px solid var(--border); }
.empty.compact { padding: 14px !important; text-align: left; }
@keyframes access-panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.print-report { max-width: 1400px; margin: 0 auto; }
.print-report-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 18px; border-bottom: 2px solid var(--green); margin-bottom: 16px; }
.print-report-brand { display: flex; gap: 14px; align-items: center; }
.print-report-brand img { width: 72px; height: 72px; object-fit: contain; border-radius: 50%; background: #fff; border: 1px solid var(--border); padding: 4px; }
.print-report-brand small { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.print-report-brand h1 { margin: 2px 0 3px; font-size: 25px; }
.print-report-brand strong { color: var(--red); font-size: 16px; }
.print-report-meta { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 8px; min-width: 390px; }
.print-report-meta div, .print-filter-note { border: 1px solid var(--border); border-radius: 8px; background: #fbfdf8; padding: 9px 10px; }
.print-report-meta span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.print-report-meta strong { display: block; margin-top: 3px; color: var(--navy); }
.print-filter-note { margin-bottom: 16px; color: var(--muted); }
.print-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.print-kpis .kpi { padding: 15px; }
.print-kpis .kpi .value { font-size: 20px; }
.print-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.print-summary-grid > section { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 16px; box-shadow: var(--shadow); }
.print-summary-grid h2, .print-section h2 { font-size: 17px; margin-bottom: 10px; }
.print-section { margin-top: 22px; }
.print-detail-table .wrap { min-width: 260px; }
.print-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 34px; }
.print-signatures div { min-height: 58px; border-top: 1px solid var(--text); padding-top: 8px; text-align: center; }
.print-signatures span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.print-signatures strong { display: block; margin-top: 5px; color: var(--navy); }
.permission-panel { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.permission-panel h2 { margin-bottom: 5px; }
.permission-grid { display: grid; gap: 10px; margin-top: 16px; }
.permission-row { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(6, minmax(112px, max-content)); gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: #fbfdf8; }
.permission-row > .help { margin: 0; white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.check input { display: inline-block; width: auto; margin: 0; }
.master-add-form { padding: 12px; background: #fbfdf8; border: 1px solid var(--border); border-radius: 9px; }
.master-edit-form { display: flex; gap: 8px; align-items: center; margin: 0; min-width: 260px; }
.master-edit-form.compact { min-width: 180px; }
.master-edit-form input { margin: 0; min-width: 140px; }
.master-tabs { margin-bottom: 4px; }
.master-list-sticky-head {
  position: relative;
  margin: -2px 0 18px;
  padding: 15px 16px 14px;
  border: 1px solid rgba(15, 107, 60, .14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(239, 248, 239, .94));
  box-shadow: 0 12px 30px rgba(15, 79, 42, .08);
}
.master-list-sticky-head .page-head { margin-bottom: 12px; }
.master-list-page-head { align-items: center; }
.master-list-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  max-width: 100%;
}
.master-list-tabs .button { white-space: nowrap; }
.portal-sticky-tabs {
  position: sticky;
  top: var(--portal-sticky-tabs-top);
  z-index: calc(var(--sticky-toolbar-z) + 6);
  margin-bottom: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(15, 107, 60, .12);
  background: linear-gradient(180deg, rgba(247, 250, 244, .98), rgba(239, 248, 239, .94));
  box-shadow: 0 10px 24px rgba(15, 79, 42, .08);
  backdrop-filter: blur(12px);
}
.master-tabs.portal-sticky-tabs,
.master-list-tabs.portal-sticky-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.master-tabs.portal-sticky-tabs .button,
.master-list-tabs.portal-sticky-tabs .button { flex: 0 0 auto; }
.department-monitoring-tabs.portal-sticky-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 16px;
  padding: 10px 8px;
  border: 1px solid rgba(15, 107, 60, .14);
  border-radius: 14px;
  background: rgba(247, 250, 244, .97);
  scrollbar-width: thin;
}

.department-monitoring-context{margin-bottom:16px}
.department-monitoring-context .filters{margin-bottom:8px}
.department-monitoring-selection{text-align:center;padding:42px 24px}
.department-monitoring-kpis a.kpi{color:inherit;text-decoration:none;position:relative}
.department-monitoring-kpis a.kpi:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(12,82,48,.12)}
.department-monitoring-kpis a.kpi:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.department-monitoring-kpis .kpi-link-label{display:block;margin-top:8px;color:#166534;font-size:.78rem;font-weight:700}
.department-monitoring-records{margin-top:18px}
.department-monitoring-records .card-head{align-items:flex-start}
@media(max-width:720px){
  .department-monitoring-head,.department-monitoring-records .card-head{display:block}
  .department-monitoring-head .actions,.department-monitoring-records .actions{margin-top:10px}
  .department-monitoring-context .filters{grid-template-columns:1fr}
}
.department-monitoring-tabs.portal-sticky-tabs a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
  white-space: nowrap;
}
.department-monitoring-tabs.portal-sticky-tabs a:hover,
.department-monitoring-tabs.portal-sticky-tabs a:focus-visible {
  border-color: rgba(15, 107, 60, .42);
  background: #eef8ef;
  text-decoration: none;
}
.department-monitoring-tabs.portal-sticky-tabs a.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  box-shadow: 0 7px 16px rgba(15, 107, 60, .18);
}
.department-monitoring-tabs.portal-sticky-tabs a span {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 107, 60, .10);
  text-align: center;
  font-size: 11px;
}
.department-monitoring-tabs.portal-sticky-tabs a.active span { background: rgba(255, 255, 255, .20); }
html[data-theme="dark"] .department-monitoring-tabs.portal-sticky-tabs { border-color: #315c43; background: rgba(10, 26, 17, .96); }
html[data-theme="dark"] .department-monitoring-tabs.portal-sticky-tabs a { border-color: #315c43; background: #102418; color: #d7f0df; }
html[data-theme="dark"] .department-monitoring-tabs.portal-sticky-tabs a.active { border-color: #28b463; background: #167442; color: #fff; }
.department-monitoring-actions {
  justify-content: flex-end;
  gap: 8px;
  margin: -4px 0 16px;
}
html[data-theme="dark"] .master-list-sticky-head {
  border-color: #315c43;
  background: linear-gradient(135deg, rgba(15, 32, 23, .98), rgba(10, 26, 17, .92));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .portal-sticky-tabs {
  border-bottom-color: rgba(134, 239, 172, .18);
  background: linear-gradient(180deg, rgba(7, 21, 13, .98), rgba(10, 26, 17, .94));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}
.button:disabled { opacity: .55; cursor: not-allowed; }

.finance-control-cell-head, .finance-control-cell { min-width: 142px; max-width: 190px; white-space: normal; }
.finance-control-cell { vertical-align: top; }
.finance-claim-cell { min-width: 210px; }
.finance-detail-cell { min-width: 148px; }
.finance-amounts { min-width: 150px; white-space: normal; }
.finance-amounts span { display: flex; justify-content: space-between; gap: 12px; line-height: 1.45; }
.finance-amounts b { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.finance-amounts em { font-style: normal; font-weight: 900; }
.finance-control-menu { position: relative; min-width: 142px; }
.finance-control-menu summary { list-style: none; display: grid; gap: 2px; padding: 7px 9px; border: 1px solid rgba(15, 107, 60, .18); border-radius: 10px; background: #eef7ee; color: var(--green); cursor: pointer; font-weight: 900; text-align: left; }
.finance-control-menu summary::-webkit-details-marker { display: none; }
.finance-control-menu summary span { font-size: 12px; line-height: 1.1; }
.finance-control-menu summary small { color: var(--muted); font-size: 10px; font-weight: 750; line-height: 1.15; }
.finance-control-menu[open] summary { background: var(--green); color: #fff; }
.finance-control-menu[open] summary small { color: rgba(255, 255, 255, .78); }
.finance-row-form { min-width: min(430px, calc(100vw - 58px)); margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(15, 79, 42, .14); }
.finance-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.finance-mini-grid .span-2 { grid-column: span 2; }
.finance-mini-grid label { font-size: 12px; }
.finance-mini-grid input, .finance-mini-grid select, .finance-mini-grid textarea { padding: 6px 8px; font-size: 12px; }
.finance-mini-grid textarea { min-height: 58px; }
.finance-row-form .button { width: 100%; }
.finance-budget-sheet { display: grid; gap: 8px; margin: 8px 0; }
.finance-budget-sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; color: var(--green); }
.finance-budget-sheet-head strong { font-size: 13px; }
.finance-budget-sheet-head span { color: var(--muted); font-size: 11px; text-align: right; }
.finance-budget-table-wrap { max-height: 360px; }
.finance-budget-table { min-width: 760px; }
.finance-budget-table th, .finance-budget-table td { padding: 7px 8px; vertical-align: middle; }
.finance-budget-table th:first-child, .finance-budget-table td:first-child { min-width: 220px; white-space: normal; }
.finance-budget-table input { width: 100%; min-width: 0; padding: 6px 8px; font-size: 12px; }
.finance-budget-table input[type="number"] { min-width: 96px; text-align: right; }
.finance-budget-table tfoot th { background: #f0f8ef; color: var(--green); font-weight: 950; }
.budget-remaining { display: inline-block; min-width: 92px; font-weight: 900; color: var(--green); text-align: right; }
.budget-send-form { display: grid; gap: 14px; }
.budget-department-picker { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: #fbfdf8; }
.budget-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.budget-picker-head strong,
.budget-picker-head span { display: block; }
.budget-picker-head strong { color: var(--green); font-size: 13px; }
.budget-picker-head span { color: var(--muted); font-size: 12px; font-weight: 750; }
.budget-department-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding-right: 4px; }
.budget-department-grid .check { margin: 0; padding: 8px 10px; border: 1px solid rgba(15, 107, 60, .14); border-radius: 11px; background: #fff; font-weight: 850; }
.budget-proposal-paper { display: grid; gap: 16px; }
.budget-paper-heading { display: grid; gap: 4px; text-align: center; color: var(--navy); }
.budget-paper-heading strong { font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.budget-paper-heading h2 { margin: 4px 0 0; text-transform: uppercase; }
.budget-paper-heading p { margin: 0; color: var(--text); }
.budget-proposal-form { display: grid; gap: 14px; }
.print-only { display: none !important; }
.budget-proposal-print { background: #fff; color: #111827; }
.budget-print-header { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; text-align: center; border-bottom: 2px solid #0f6b3c; padding-bottom: 12px; margin-bottom: 12px; }
.budget-print-header img { width: 64px; height: 64px; object-fit: contain; border-radius: 50%; border: 1px solid #cbd5d1; padding: 4px; background: #fff; }
.budget-print-header strong { display: block; text-transform: uppercase; color: #064e3b; font-size: 16px; letter-spacing: .02em; }
.budget-print-header span { display: block; color: #475569; font-weight: 850; margin-top: 2px; }
.budget-print-header h1 { margin: 5px 0 0; text-transform: uppercase; color: #064e3b; font-size: 20px; }
.budget-print-header p { margin: 2px 0 0; color: #111827; font-weight: 800; }
.budget-print-meta, .budget-print-kpis { display: grid; gap: 8px; margin-bottom: 12px; }
.budget-print-meta { grid-template-columns: repeat(3, 1fr); }
.budget-print-kpis { grid-template-columns: repeat(5, 1fr); }
.budget-print-meta div, .budget-print-kpis div { border: 1px solid #cbd5d1; border-radius: 8px; padding: 8px 10px; background: #fbfdf8; }
.budget-print-meta span, .budget-print-kpis span { display: block; color: #64748b; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.budget-print-meta strong, .budget-print-kpis strong { display: block; margin-top: 3px; color: #0f172a; font-size: 12px; }
.budget-print-kpis strong { color: #064e3b; font-size: 15px; }
.budget-print-block { margin-top: 12px; break-inside: avoid; }
.budget-print-block h2 { margin: 0 0 6px; color: #064e3b; font-size: 14px; }
.budget-print-block p { margin: 0; border: 1px solid #cbd5d1; border-radius: 8px; min-height: 34px; padding: 8px 10px; background: #fff; }
.budget-print-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.budget-print-table th, .budget-print-table td { border: 1px solid #cbd5d1; padding: 5px 6px; vertical-align: top; }
.budget-print-table th { background: #eaf6ec; color: #064e3b; text-transform: uppercase; font-size: 9px; letter-spacing: .03em; }
.budget-print-table tfoot th { background: #f0f8ef; color: #064e3b; }
.budget-print-table small { color: #475569; font-weight: 700; }
.budget-print-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; break-inside: avoid; }
.budget-print-signatures div { border-top: 1px solid #111827; padding-top: 6px; text-align: center; min-height: 42px; }
.budget-print-signatures span { display: block; color: #475569; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.budget-print-signatures strong { display: block; margin-top: 4px; color: #111827; font-size: 12px; }
.finance-expense-sheet { margin-top: 16px; }
.finance-expense-table { min-width: 1120px; }
.finance-expense-table th:first-child, .finance-expense-table td:first-child { min-width: 150px; }
.finance-expense-approval { min-width: 230px; }
.finance-expense-approval { display: grid; gap: 6px; }
.finance-expense-approval select,
.finance-expense-approval input { width: 100%; }
.finance-expense-approval small { color: var(--muted); font-size: 11px; line-height: 1.25; }
.finance-expense-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.finance-expense-actions .help { margin: 0; }

.school-calendar-overview { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; overflow: hidden; background: radial-gradient(circle at top right, rgba(52, 211, 153, .16), transparent 36%), rgba(255, 255, 255, .96); }
.school-calendar-mark { width: 58px; height: 58px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 18px; background: linear-gradient(135deg, #d1fae5, #34d399); color: #064e3b; box-shadow: 0 14px 34px rgba(15, 107, 60, .14); }
.school-calendar-mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.school-calendar-overview h2 { margin: 8px 0 4px; }
.school-calendar-grid { display: grid; gap: 22px; }
.school-calendar-page { overflow: hidden; padding: 0; }
.school-calendar-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, rgba(232, 246, 233, .95), rgba(255, 255, 255, .96)); }
.school-calendar-page-head h2 { margin: 7px 0 4px; }
.school-calendar-image-link { display: block; padding: 18px; background: #f8fbf6; overflow: auto; }
.school-calendar-image-link img { display: block; width: 100%; height: auto; min-width: 760px; border: 1px solid rgba(15, 79, 42, .14); border-radius: 8px; background: #fff; box-shadow: 0 10px 30px rgba(15, 79, 42, .10); }
.school-calendar-selected { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-bottom: 18px; border-color: rgba(15, 107, 60, .26); background: radial-gradient(circle at top right, rgba(52, 211, 153, .16), transparent 38%), rgba(255, 255, 255, .98); }
.school-calendar-selected h2 { margin: 8px 0 4px; }
.school-calendar-event-board { margin-bottom: 22px; }
.school-calendar-source-panel { margin-top: 22px; }
.school-calendar-source-panel > summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.school-calendar-source-panel > summary::-webkit-details-marker { display: none; }
.school-calendar-source-summary { color: var(--muted); font-size: 13px; }
.school-calendar-source-panel[open] > summary { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.school-calendar-events { display: grid; gap: 18px; }
.school-calendar-term { display: grid; gap: 10px; }
.school-calendar-term h3 { margin: 0; color: var(--green); }
.school-calendar-event-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.school-calendar-event { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; padding: 13px; border: 1px solid var(--border); border-left: 5px solid var(--green); border-radius: 14px; color: inherit; text-decoration: none; background: #fff; scroll-margin-top: 90px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.school-calendar-event:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(15, 79, 42, .12); }
.school-calendar-event.selected { border-color: rgba(15, 107, 60, .48); background: linear-gradient(135deg, #f0fdf4, #fff); box-shadow: 0 16px 36px rgba(15, 79, 42, .14); }
.school-calendar-event.tone-orange { border-left-color: var(--orange); }
.school-calendar-event.tone-red { border-left-color: var(--red); }
.calendar-event-date { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 8px; border-radius: 12px; color: #065f46; background: #dcfae6; font-weight: 850; text-align: center; line-height: 1.15; }
.school-calendar-event.tone-orange .calendar-event-date { color: #9a3412; background: #ffedd5; }
.school-calendar-event.tone-red .calendar-event-date { color: #991b1b; background: #fee2e2; }
.calendar-event-main { min-width: 0; display: grid; gap: 4px; }
.calendar-event-main strong { color: var(--navy); overflow-wrap: anywhere; }
.calendar-event-main small { color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }

.portal-module-section { margin-bottom: 20px; border-color: rgba(15, 107, 60, .22); background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(238, 247, 238, .88)); }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.module-card { --nav-accent: var(--green); display: grid; gap: 8px; align-content: start; min-height: 178px; padding: 16px; border: 1px solid rgba(15, 79, 42, .12); border-radius: 15px; color: inherit; text-decoration: none; background: linear-gradient(145deg, #fff, #fbfdf8); box-shadow: 0 10px 26px rgba(15, 79, 42, .08); overflow: hidden; position: relative; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.module-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at top right, color-mix(in srgb, var(--nav-accent) 24%, transparent), transparent 46%); opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.module-card:hover { transform: translateY(-2px); border-color: var(--nav-accent); box-shadow: 0 18px 38px rgba(15, 79, 42, .15); text-decoration: none; }
.module-card:hover::before { opacity: 1; }
.module-card:hover .module-icon { transform: translateY(-2px) scale(1.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 14px 28px rgba(15, 79, 42, .18); }
.module-card strong, .module-card small, .module-card b, .module-card .module-icon { position: relative; z-index: 1; }
.module-card strong { color: var(--navy); font-size: 17px; }
.module-card small { color: var(--muted); line-height: 1.45; }
.module-card b { width: fit-content; margin-top: auto; padding: 5px 9px; border-radius: 999px; background: #eef7ee; color: var(--green); font-size: 11px; transition: background .16s ease, color .16s ease; }
.module-card:hover b { background: var(--nav-accent); color: #06391f; }
.module-icon, .module-hero-icon { width: 44px; height: 44px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--nav-accent), rgba(255, 255, 255, .82)); color: #06391f; font-weight: 950; letter-spacing: .03em; box-shadow: inset 0 1px 0 rgba(255,255,255,.52), 0 10px 24px rgba(15, 79, 42, .12); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.module-icon svg, .module-hero-icon svg { width: 24px; height: 24px; }
.module-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; overflow: hidden; position: relative; }
.module-hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; top: -90px; border-radius: 999px; background: radial-gradient(circle, rgba(21, 108, 58, .14), transparent 66%); pointer-events: none; }
.module-hero h2 { margin: 8px 0 8px; }
.dashboard-home-hero { margin-bottom: 18px; }
.roadmap-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.roadmap-list li { padding: 11px 12px 11px 36px; border: 1px solid var(--border); border-radius: 11px; background: #fbfdf8; position: relative; }
.roadmap-list li::before { content: ""; position: absolute; left: 13px; top: 15px; width: 10px; height: 10px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 4px rgba(15, 107, 60, .10); }
.detail-grid.one-col { grid-template-columns: 1fr; }

.stock-cart-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 18px; align-items: start; }
.stock-cart-panel { position: sticky; top: 84px; }
.stock-catalog-stack { display: grid; gap: 16px; }
.stock-category-section { margin-bottom: 18px; }
.stock-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); border: 1px solid var(--border); border-right: 0; border-bottom: 0; border-radius: 10px; overflow: hidden; background: #fff; }
.stock-category-grid .empty { grid-column: 1 / -1; margin: 0; padding: 22px; }
.stock-category-tile { min-height: 162px; display: grid; justify-items: center; align-content: start; gap: 8px; padding: 13px 10px 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; text-align: center; background: #fff; transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.stock-category-tile:hover { background: #f8fbf5; text-decoration: none; transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(15, 107, 60, .12); }
.stock-category-tile.active { background: #eef7ee; box-shadow: inset 0 0 0 2px rgba(15, 107, 60, .22); }
.stock-category-thumb-wrap { width: 86px; height: 76px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.stock-category-thumb { width: 100%; height: 100%; display: block; object-fit: contain; padding: 6px; }
.stock-category-thumb.asset-thumb-placeholder { padding: 0; }
.stock-category-tile strong { min-height: 34px; display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1.28; font-weight: 650; }
.stock-category-tile small { color: var(--muted); font-size: 11px; line-height: 1.25; }
.stock-section-break { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.stock-section-break::before,
.stock-section-break::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.stock-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.stock-card { border: 1px solid var(--border); border-radius: 12px; background: #fbfdf8; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 218px; }
.stock-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stock-card-media { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.stock-card-image { width: 100%; height: 100%; display: block; object-fit: contain; }
.asset-thumb-placeholder { position: relative; display: block; background: #f8fafc; border: 1px dashed rgba(15, 79, 42, .22); }
.asset-thumb-placeholder::before,
.asset-thumb-placeholder::after { content: none; }
.stock-left { font-weight: 850; color: var(--green); background: #dcfae6; border-radius: 999px; padding: 4px 8px; font-size: 12px; }
.stock-card h3 { margin: 0; font-size: 16px; line-height: 1.25; }
.stock-card p { margin: 0; line-height: 1.35; }
.stock-card-meta { display: grid; gap: 4px; color: var(--muted); margin-top: auto; }
.stock-card-actions { display: grid; grid-template-columns: minmax(84px, 1fr) 44px; gap: 8px; align-items: center; }
.stock-card-actions input { margin: 0; }
.qty-stepper { min-width: 0; min-height: 38px; display: grid; grid-template-columns: minmax(0, 1fr) 24px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82); }
.qty-stepper input { width: 100%; min-width: 0; height: 100%; margin: 0; border: 0; border-radius: 0; background: transparent; padding: 8px 9px; text-align: left; font-weight: 800; color: var(--navy); appearance: textfield; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.qty-stepper-controls { display: grid; grid-template-rows: 1fr 1fr; border-left: 1px solid var(--border); background: #eef7ee; }
.qty-stepper-controls button { width: 24px; min-width: 24px; height: 19px; display: inline-grid; place-items: center; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--green); cursor: pointer; padding: 0; }
.qty-stepper-controls button:last-child { border-bottom: 0; }
.qty-stepper-controls button:hover { background: rgba(15, 107, 60, .12); color: var(--navy); }
.qty-stepper-controls svg { width: 13px; height: 13px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.qty-stepper.compact { min-height: 34px; }
.qty-stepper.compact .qty-stepper-controls button { height: 17px; }
.cart-add-button { width: 44px; height: 40px; padding: 0; border-radius: 13px; box-shadow: 0 8px 18px rgba(15, 107, 60, .18); }
.cart-add-button svg { width: 21px; height: 21px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cart-add-button:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 12px 24px rgba(15, 107, 60, .22); }
.cart-lines { display: grid; gap: 8px; }
.cart-line { display: grid; grid-template-columns: 44px minmax(0, 1fr) 92px auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: #fbfdf8; }
.cart-line-thumb { width: 44px; height: 44px; display: block; object-fit: contain; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.cart-line strong, .cart-line small { display: block; }
.cart-line small { color: var(--muted); margin-top: 2px; }
.cart-line input { margin: 0; }

.asset-picture-field input[type="file"] { margin-top: 8px; }
.asset-picture-preview { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fbfdf8; }
.asset-picture-preview img { width: 104px; height: 78px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.asset-picture-preview strong, .asset-picture-preview small { display: block; }
.asset-picture-preview small { color: var(--muted); margin: 3px 0 8px; }
.asset-photo-card { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 18px; }
.asset-photo-card h2 { margin: 0 0 6px; font-size: 18px; }
.asset-detail-image { width: 100%; max-width: 260px; aspect-ratio: 4 / 3; display: block; object-fit: contain; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.master-picture-cell { min-width: 150px; }
.master-picture-form { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: center; }
.master-list-thumb { width: 58px; height: 48px; display: block; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.master-picture-upload input { width: 100%; max-width: 170px; font-size: 12px; }
.master-picture-remove { grid-column: 2; margin: 0; font-size: 12px; }
.master-picture-form .button { grid-column: 2; width: fit-content; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.calendar-head, .calendar-day { min-height: 92px; padding: 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.calendar-head { min-height: auto; background: #eef7ee; color: var(--navy); font-weight: 800; text-align: center; }
.calendar-day:nth-child(7n), .calendar-head:nth-child(7n) { border-right: 0; }
.calendar-date { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 999px; font-weight: 800; color: var(--navy); }
.calendar-day.today .calendar-date { background: var(--red); color: #fff; }
.calendar-day.muted { background: #f8fafc; color: var(--muted); }
.calendar-event { display: block; margin-top: 7px; padding: 6px 7px; border-radius: 7px; background: #ecfdf3; color: #065f46; font-size: 12px; font-weight: 700; white-space: normal; }
.calendar-event small { display: block; color: #047857; font-weight: 500; margin-top: 2px; }
.calendar-event.pending-approval { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; animation: approval-pulse 1.1s ease-in-out infinite; }
.calendar-event.pending-approval small { color: #c2410c; }
.calendar-event.green-flag { background: #ecfdf3; color: #065f46; border: 1px solid #bbf7d0; }
.calendar-event.official-calendar { background: linear-gradient(135deg, #eefcf3, #eff6ff); border-color: #86efac; box-shadow: inset 4px 0 0 #0f6b3c; }
.approval-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.approval-actions form { margin: 0; }
.approval-meta { display: inline-block; min-width: 145px; white-space: normal; line-height: 1.35; }
.approval-meta small { color: var(--muted); }
.pending-section { margin-top: 18px; }
.activity-popup { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: min(380px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--red); box-shadow: 0 20px 60px rgba(15, 79, 42, .22); border-radius: 12px; padding: 16px; }
.approval-popup { bottom: 22px; border-left-color: var(--orange); }
.overdue-popup { top: 84px; bottom: auto; border-left-color: var(--red); box-shadow: 0 22px 70px rgba(185, 28, 28, .28); animation: overdue-alert-pulse 1.25s ease-in-out infinite; }
.reorder-popup { border-left-color: var(--orange); box-shadow: 0 20px 60px rgba(249, 115, 22, .24); }
.activity-popup h3 { margin-bottom: 10px; }
.activity-popup-card { padding: 10px 0; border-top: 1px solid var(--border); }
.activity-popup-card strong, .activity-popup-card small, .activity-popup-card span { display: block; }
.activity-popup-card small { color: var(--muted); margin: 3px 0; }
.approval-popup-card { color: inherit; text-decoration: none; }
.approval-popup-card:hover strong { text-decoration: underline; }
.overdue-popup-card strong { color: var(--red); }
.reorder-popup-card strong { color: var(--orange); }
.notification-center { position: fixed; right: 22px; bottom: 22px; z-index: 75; }
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 108px;
  z-index: 74;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 999px;
  background: radial-gradient(circle at 32% 25%, rgba(255,255,255,.34), transparent 24%), linear-gradient(135deg, #0f8a4c, #06391f);
  color: #fff;
  box-shadow: 0 18px 44px rgba(15, 79, 42, .28);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.back-to-top[hidden] { display: none !important; }
.back-to-top:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 22px 54px rgba(15, 79, 42, .36); }
.back-to-top:focus-visible { outline: 3px solid rgba(15, 107, 60, .28); outline-offset: 3px; }
.back-to-top svg { width: 23px; height: 23px; display: block; fill: currentColor; }
html[data-theme="dark"] .back-to-top { border-color: rgba(215, 240, 223, .2); box-shadow: 0 18px 44px rgba(0, 0, 0, .36); }
.notification-float-button { position: relative; width: 58px; height: 58px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--green), #0b5c34); color: #fff; box-shadow: 0 18px 44px rgba(15, 79, 42, .32); cursor: pointer; display: grid; place-items: center; }
.notification-float-button:hover { transform: translateY(-1px); box-shadow: 0 22px 54px rgba(15, 79, 42, .38); }
.notification-icon { font-size: 24px; line-height: 1; }
.notification-badge { position: absolute; top: -6px; right: -5px; min-width: 23px; height: 23px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--red); color: #fff; border: 0; font-size: 11px; font-weight: 900; }
.notification-center.has-alerts .notification-float-button { animation: notification-pulse 1.4s ease-in-out infinite; }
.notification-center.urgent .notification-float-button { background: linear-gradient(135deg, var(--red), #7f1d1d); animation: notification-urgent-pulse 1s ease-in-out infinite; }
.notification-panel { position: absolute; right: 0; bottom: 74px; width: min(420px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 120px)); overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 70px rgba(15, 79, 42, .26); padding: 14px; }
.notification-panel[hidden] { display: none; }
.notification-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.notification-panel-head strong, .notification-panel-head small { display: block; }
.notification-panel-head small { color: var(--muted); margin-top: 2px; }
.notification-close { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; font-weight: 900; }
.notification-close:hover { color: var(--red); border-color: rgba(201, 52, 47, .35); }
.notification-list { display: grid; gap: 10px; padding: 12px 0; }
.notification-card { display: block; padding: 12px 12px 12px 14px; border: 1px solid var(--border); border-left: 5px solid var(--green); border-radius: 12px; color: inherit; text-decoration: none; background: #fbfefb; }
.notification-card:hover { text-decoration: none; box-shadow: 0 10px 24px rgba(15, 79, 42, .12); transform: translateY(-1px); }
.notification-card.orange { border-left-color: var(--orange); background: #fffaf3; }
.notification-card.red { border-left-color: var(--red); background: #fff7f7; }
.notification-card strong, .notification-card small, .notification-card span { display: block; }
.notification-card strong { margin: 4px 0 2px; color: var(--navy); }
.notification-card small, .notification-card span { color: var(--muted); line-height: 1.4; }
.notification-tag { width: fit-content; padding: 3px 8px; border-radius: 999px; background: #eef7ee; color: var(--green); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
.notification-date { margin-top: 5px; color: #667085; font-size: 11px; font-weight: 800; letter-spacing: .01em; }
.notification-card.orange .notification-tag { background: #ffedd5; color: #9a3412; }
.notification-card.red .notification-tag { background: #fee2e2; color: #991b1b; }
.notification-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.notification-empty { margin: 0; padding: 18px; border-radius: 12px; background: #f8fafc; color: var(--muted); text-align: center; }
.chat-center { position: fixed; right: 92px; bottom: 22px; z-index: 76; }
.chat-float-button { width: 58px; height: 58px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--red), #a3211f); color: #fff; box-shadow: 0 18px 44px rgba(201, 52, 47, .28); cursor: pointer; display: grid; place-items: center; font-weight: 900; }
.chat-float-button:hover { transform: translateY(-1px); box-shadow: 0 22px 54px rgba(201, 52, 47, .34); }
.chat-badge { position: absolute; top: -6px; right: -5px; min-width: 23px; height: 23px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--orange); color: #06391f; border: 0; font-size: 11px; font-weight: 900; }
.chat-center.has-unread .chat-float-button { animation: chat-pulse 1.4s ease-in-out infinite; }
.chat-panel { position: absolute; right: -70px; bottom: 74px; width: min(720px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 26px 80px rgba(15, 79, 42, .30); }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, #083f24, var(--green)); color: #fff; }
.chat-head strong, .chat-head small { display: block; }
.chat-head small { opacity: .82; margin-top: 2px; }
.chat-close { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-weight: 900; }
.chat-body { display: grid; grid-template-columns: 250px 1fr; min-height: 0; flex: 1; }
.chat-users { border-right: 1px solid var(--border); padding: 12px; overflow: auto; background: #fbfefb; }
.chat-search { margin: 0 0 10px; }
.chat-user-list { display: grid; gap: 7px; }
.chat-user { width: 100%; border: 1px solid transparent; border-radius: 12px; padding: 10px; background: #fff; color: var(--text); text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-user:hover, .chat-user.active { border-color: rgba(15, 79, 42, .22); background: #eef7ee; }
.chat-user strong, .chat-user small { display: block; }
.chat-user small { color: var(--muted); margin-top: 2px; }
.chat-user b { min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; }
.chat-thread { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.chat-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-thread-head strong, .chat-thread-head small { display: block; }
.chat-thread-head small { color: var(--muted); margin-top: 2px; }
.chat-messages { flex: 1; min-height: 0; overflow: auto; padding: 14px; background: linear-gradient(180deg, #f8fbf5, #fff); }
.chat-message { max-width: 78%; margin: 0 0 10px; }
.chat-message.mine { margin-left: auto; text-align: right; }
.chat-message p { margin: 0; padding: 9px 11px; border-radius: 14px; background: #eef7ee; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.chat-message.mine p { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.chat-message.theirs p { border-bottom-left-radius: 4px; }
.chat-message .chat-deleted-message { background: #f3f4f6; color: var(--muted); border: 1px dashed #cbd5e1; font-style: italic; }
.chat-message.mine .chat-deleted-message { background: #f3f4f6; color: var(--muted); }
.chat-message small { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.chat-message-actions { display: flex; gap: 5px; justify-content: flex-end; margin-top: 4px; opacity: .85; }
.chat-message-actions button { border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; padding: 2px 7px; font-size: 10px; font-weight: 900; }
.chat-message-actions button:hover { color: var(--green); border-color: rgba(15, 79, 42, .25); background: #eef7ee; }
.chat-attachments { display: grid; gap: 6px; margin-top: 6px; }
.chat-attachments a { display: grid; gap: 5px; max-width: 260px; padding: 7px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--green); text-decoration: none; font-weight: 800; text-align: left; }
.chat-message.mine .chat-attachments a { margin-left: auto; }
.chat-attachments a:hover { background: #f8fbf5; text-decoration: none; }
.chat-attachments img { width: 100%; max-height: 170px; object-fit: cover; border-radius: 9px; border: 1px solid rgba(15, 79, 42, .12); }
.chat-attachments span { font-size: 11px; line-height: 1.25; word-break: break-word; }
.chat-compose { display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: center; padding: 12px; border-top: 1px solid var(--border); }
.chat-compose input { margin: 0; }
.chat-compose-main { min-width: 0; display: grid; gap: 6px; }
.chat-icon-button { width: 38px; height: 38px; min-height: 38px; line-height: 1; border: 1px solid var(--border); border-radius: 10px; padding: 0; background: #fff; color: var(--green); cursor: pointer; font-size: 17px; font-weight: 900; display: inline-grid; place-items: center; align-self: center; }
.chat-icon-button:hover { background: #eef7ee; border-color: rgba(15, 79, 42, .22); }
.chat-icon-button:disabled { opacity: .55; cursor: not-allowed; }
.chat-file-input, .chat-camera-input { display: none !important; width: 0 !important; height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; position: absolute !important; left: -9999px !important; }
.chat-file-preview { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat-file-preview span { max-width: 180px; padding: 3px 7px; border: 1px solid var(--border); border-radius: 999px; background: #eef7ee; color: var(--green); font-size: 10.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-preview button { border: 0; border-radius: 999px; background: #fee2e2; color: var(--red); padding: 3px 8px; cursor: pointer; font-size: 10.5px; font-weight: 900; }
.chat-empty { margin: 0; padding: 18px; color: var(--muted); text-align: center; }
.chat-empty.small { padding: 10px; font-size: 12px; }
.chat-call-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; background: #eef7ee; border-bottom: 1px solid var(--border); color: var(--green); font-weight: 800; }
.chat-call-strip.danger { background: #fff7f7; color: var(--red); }
.chat-call-strip.info, .chat-call-strip.incoming { background: #fffaf3; color: #9a3412; }
.chat-call-strip.success { background: #ecfdf3; color: #065f46; }
.chat-call-strip span { flex: 1; }
.chat-camera-panel { padding: 12px; display: grid; gap: 9px; background: #071f14; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; }
.chat-camera-panel[hidden] { display: none; }
.chat-camera-video, .chat-camera-preview { width: 100%; max-height: 280px; object-fit: contain; border-radius: 12px; background: #020f08; border: 1px solid rgba(255,255,255,.18); }
.chat-camera-status { color: rgba(255,255,255,.78); font-weight: 800; }
.chat-camera-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.notification-float-button, .chat-float-button { overflow: visible; isolation: isolate; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.notification-float-button::before, .chat-float-button::before { content: ""; position: absolute; inset: -8px; z-index: 0; border-radius: inherit; border: 0; background: radial-gradient(circle, rgba(15,107,60,.22), transparent 66%); opacity: .7; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.chat-float-button::before { background: radial-gradient(circle, rgba(201,52,47,.22), transparent 66%); }
.notification-float-button::after, .chat-float-button::after { content: ""; position: absolute; inset: 7px; z-index: 0; border-radius: inherit; background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.38), transparent 30%); opacity: .85; transform: none; transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.notification-float-button:hover, .chat-float-button:hover { transform: translateY(-3px) scale(1.03); filter: saturate(1.08); }
.notification-float-button:hover::before, .chat-float-button:hover::before { opacity: .95; transform: scale(1.08); }
.notification-float-button:hover::after, .chat-float-button:hover::after { opacity: 1; transform: scale(.94); }
.notification-icon, .chat-float-icon, .chat-head-mark { display: inline-grid; place-items: center; position: relative; z-index: 2; }
.notification-icon svg, .chat-float-icon svg, .chat-head-mark svg, .chat-icon-button svg { width: 23px; height: 23px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notification-float-button, .chat-float-button { width: 62px; height: 62px; }
.notification-float-button { background: radial-gradient(circle at 32% 25%, rgba(255,255,255,.34), transparent 24%), linear-gradient(135deg, #0f8a4c, #06391f); }
.chat-float-button { background: radial-gradient(circle at 32% 25%, rgba(255,255,255,.30), transparent 24%), linear-gradient(135deg, #d23a35, #7f1d1d); }
.notification-float-button[aria-expanded="true"], .chat-float-button[aria-expanded="true"] { transform: translateY(-3px) scale(1.04); }
.notification-icon, .chat-float-icon { width: 34px; height: 34px; border-radius: 18px; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.notification-center.has-alerts .notification-icon::after,
.chat-center.has-unread .chat-float-icon::after { content: ""; position: absolute; right: 3px; top: 3px; width: 8px; height: 8px; border-radius: 999px; background: #f3b229; border: 0; box-shadow: 0 0 0 5px rgba(243,178,41,.16); }
.chat-float-button { grid-template-rows: 1fr auto; gap: 1px; padding: 9px 0 7px; }
.chat-float-label { position: relative; z-index: 2; font-size: 10px; line-height: 1; letter-spacing: .02em; }
.notification-badge, .chat-badge { top: -10px; right: -8px; z-index: 5; border: 0; box-shadow: 0 8px 18px rgba(0,0,0,.24); pointer-events: none; }
.notification-panel, .chat-panel { border-color: rgba(15, 79, 42, .18); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); animation: floating-panel-in .18s ease both; }
.notification-panel.auto-open { animation: notification-auto-open .32s cubic-bezier(.2, .9, .25, 1.15) both; box-shadow: 0 28px 82px rgba(15, 79, 42, .34), 0 0 0 6px rgba(243, 178, 41, .12); }
.notification-panel::before, .chat-panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at top right, rgba(15,107,60,.12), transparent 38%); }
.notification-panel > *, .chat-panel > * { position: relative; z-index: 1; }
.notification-panel-head { margin: -14px -14px 0; padding: 15px 16px 13px; background: linear-gradient(135deg, rgba(6,57,31,.96), rgba(15,107,60,.88)); color: #fff; border-bottom: 0; }
.notification-panel-head { position: sticky; top: -14px; z-index: 8; align-items: center; }
.notification-head-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.notification-head-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.notification-head-icon:hover { transform: translateY(-1px) scale(1.03); background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.42); }
.notification-head-icon svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.portal-preferences-toggle { display: inline-flex; align-items: center; gap: 6px; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.portal-preferences-toggle:hover { background: rgba(255,255,255,.22); color: #fff; border-color: rgba(255,255,255,.42); }
.portal-preferences-toggle.primary { background: #fff; color: var(--green); border-color: #fff; }
.portal-preferences-toggle svg { width: 14px; height: 14px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-panel-head small { color: rgba(255,255,255,.76); }
.notification-close, .chat-close { transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.notification-close { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.12); }
.notification-close:hover, .chat-close:hover { transform: rotate(90deg) scale(1.04); }
.notification-card { position: relative; overflow: hidden; padding-left: 48px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.notification-card::before { content: ""; position: absolute; left: 14px; top: 16px; width: 20px; height: 20px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 5px rgba(15,107,60,.10); }
.notification-card.orange::before { background: var(--orange); box-shadow: 0 0 0 5px rgba(249,115,22,.12); }
.notification-card.red::before { background: var(--red); box-shadow: 0 0 0 5px rgba(201,52,47,.12); }
.notification-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); transform: translateX(-110%); transition: transform .46s ease; pointer-events: none; }
.notification-card:hover { transform: translateY(-2px) translateX(-1px); border-color: rgba(15,79,42,.22); }
.notification-card:hover::after { transform: translateX(110%); }
.notification-card.new { border-color: rgba(15, 107, 60, .32); box-shadow: 0 10px 28px rgba(15, 107, 60, .13); }
.notification-card.new .notification-tag::after { content: "New"; display: inline-flex; margin-left: 7px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .02em; }
.notification-actions { margin: 0 -2px -2px; }
.notification-actions:empty { display: none; }
.portal-preferences { display: grid; gap: 12px; margin-top: 12px; padding: 12px; border: 1px solid rgba(15,79,42,.12); border-radius: 13px; background: rgba(248,251,245,.92); }
.portal-preferences[hidden] { display: none; }
.portal-preference-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.portal-preference-row strong, .portal-preference-row small { display: block; }
.portal-preference-row small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.volume-row { align-items: flex-start; }
.volume-control { display: grid; grid-template-columns: minmax(130px, 1fr) 48px; align-items: center; gap: 9px; min-width: min(230px, 100%); }
.volume-control input[type="range"] { width: 100%; padding: 0; accent-color: var(--green); }
.volume-control strong { color: var(--green); font-size: 12px; text-align: right; }
.sound-toggle.is-muted { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.theme-choice-group { display: inline-flex; gap: 6px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.82); }
.theme-choice { border: 0; border-radius: 999px; padding: 7px 10px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 850; font-size: 12px; }
.theme-choice:hover { color: var(--green); background: rgba(15,107,60,.08); }
.theme-choice.active { color: #fff; background: var(--green); box-shadow: 0 7px 15px rgba(15,107,60,.16); }
html[data-theme="dark"] .portal-preferences,
html[data-theme="dark"] .theme-choice-group { background: rgba(10, 26, 17, .88); border-color: #315c43; }
html[data-theme="dark"] .sound-toggle.is-muted { background: #2b210d; color: #fde68a; border-color: #854d0e; }
html[data-theme="dark"] .volume-control input[type="range"] { accent-color: #4ade80; }
html[data-theme="dark"] .volume-control strong { color: #8df0ad; }
.chat-head { align-items: center; padding: 15px 16px; background: radial-gradient(circle at top right, rgba(243,178,41,.24), transparent 34%), linear-gradient(135deg, #06391f, #0f6b3c); }
.chat-head-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.chat-head-mark { width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); flex: 0 0 auto; }
.chat-body { background: #fff; }
.chat-users { background: linear-gradient(180deg, #f7fbf4, #eef7ee); }
.chat-search { border-radius: 999px; padding-left: 13px; background: rgba(255,255,255,.92); }
.chat-user { position: relative; padding-left: 48px; border-color: rgba(15,79,42,.08); box-shadow: 0 5px 16px rgba(15,79,42,.05); transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.chat-user::before { content: ""; position: absolute; left: 10px; top: 50%; width: 28px; height: 28px; border-radius: 999px; transform: translateY(-50%); background: linear-gradient(135deg, var(--green), #9ae6b4); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(15,79,42,.14); }
.chat-user::after { content: ""; position: absolute; left: 29px; top: calc(50% + 7px); width: 8px; height: 8px; border-radius: 999px; background: #94a3b8; border: 2px solid #fff; }
.chat-user.online::after { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .14); }
.chat-user.offline::after { background: #94a3b8; box-shadow: none; }
.chat-user:hover, .chat-user.active { transform: translateX(2px); border-color: rgba(15,79,42,.28); box-shadow: 0 10px 22px rgba(15,79,42,.11); }
.chat-user.active::before { background: linear-gradient(135deg, var(--red), #f3b229); }
html[data-theme="dark"] .chat-user { background: #102418; color: #e6f4ea; border-color: #315c43; box-shadow: 0 8px 18px rgba(0,0,0,.22); }
html[data-theme="dark"] .chat-user:hover,
html[data-theme="dark"] .chat-user.active { background: #173322; border-color: #4f8f65; box-shadow: 0 12px 24px rgba(0,0,0,.28); }
html[data-theme="dark"] .chat-user strong { color: #f2fff5; }
html[data-theme="dark"] .chat-user small { color: #b8c9be; }
html[data-theme="dark"] .chat-user::after { border-color: #102418; }
html[data-theme="dark"] .chat-user:hover::after,
html[data-theme="dark"] .chat-user.active::after { border-color: #173322; }
html[data-theme="dark"] .chat-thread-head,
html[data-theme="dark"] .chat-compose { background: rgba(15, 32, 23, .98); }
html[data-theme="dark"] .chat-empty { color: #b8c9be; }
.chat-thread-head { background: rgba(248,251,245,.82); }
.chat-call-button { border-radius: 999px; }
.chat-messages { scroll-behavior: smooth; background: radial-gradient(circle at top left, rgba(15,107,60,.09), transparent 28%), linear-gradient(180deg, #f8fbf5, #fff); }
.chat-message { animation: chat-message-in .18s ease both; }
.chat-message p { box-shadow: 0 8px 20px rgba(15,79,42,.08); }
.chat-message.mine p { background: linear-gradient(135deg, #0f6b3c, #0b5c34); box-shadow: 0 10px 22px rgba(15,107,60,.18); }
.chat-message.theirs p { background: #fff; border: 1px solid rgba(15,79,42,.10); }
.chat-message-actions { opacity: 0; transform: translateY(-2px); transition: opacity .16s ease, transform .16s ease; }
.chat-message:hover .chat-message-actions { opacity: 1; transform: translateY(0); }
.chat-compose { background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.chat-icon-button { border-radius: 12px; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.chat-icon-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15,79,42,.10); }
.chat-send-button { border-radius: 999px; min-height: 38px; padding-left: 16px; padding-right: 16px; }
.chat-file-preview span { background: #dcfae6; }
.chat-call-strip { box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.chat-camera-panel { background: radial-gradient(circle at top right, rgba(15,107,60,.22), transparent 40%), #071f14; }

html[data-theme="dark"] a { color: #68d391; }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .topbar-clock strong,
html[data-theme="dark"] .kpi .value,
html[data-theme="dark"] .detail strong,
html[data-theme="dark"] .access-summary-main strong,
html[data-theme="dark"] .access-detail-block strong,
html[data-theme="dark"] .module-card strong,
html[data-theme="dark"] .school-calendar-page-head h2,
html[data-theme="dark"] .calendar-event-main strong,
html[data-theme="dark"] .feed-body strong,
html[data-theme="dark"] .notification-card strong,
html[data-theme="dark"] .print-report-meta strong,
html[data-theme="dark"] .print-signatures strong,
html[data-theme="dark"] .calendar-date,
html[data-theme="dark"] .sort-link { color: #f2fff5; }
html[data-theme="dark"] label,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .metric-list li,
html[data-theme="dark"] .stock-card,
html[data-theme="dark"] .cart-line,
html[data-theme="dark"] .permission-row,
html[data-theme="dark"] .master-add-form,
html[data-theme="dark"] .master-import-form,
html[data-theme="dark"] .finance-row-form,
html[data-theme="dark"] .roadmap-list li { color: var(--text); }
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .help,
html[data-theme="dark"] .detail small,
html[data-theme="dark"] .access-summary-main small,
html[data-theme="dark"] .access-detail-block small,
html[data-theme="dark"] .module-card small,
html[data-theme="dark"] .school-calendar-page-head .text-muted,
html[data-theme="dark"] .calendar-event-main small,
html[data-theme="dark"] .feed-body small,
html[data-theme="dark"] .feed-body span,
html[data-theme="dark"] .stock-card-meta,
html[data-theme="dark"] .cart-line small,
html[data-theme="dark"] .approval-meta small,
html[data-theme="dark"] .chat-message small,
html[data-theme="dark"] .notification-card small,
html[data-theme="dark"] .notification-card span,
html[data-theme="dark"] .print-report-brand small,
html[data-theme="dark"] .print-report-meta span,
html[data-theme="dark"] .print-filter-note,
html[data-theme="dark"] .label-brand small,
html[data-theme="dark"] .label-meta span,
html[data-theme="dark"] .label-foot { color: #b8c9be; }
html[data-theme="dark"] .table th,
html[data-theme="dark"] .calendar-head { color: #d7f0df; background: rgba(20, 50, 32, .96); }
html[data-theme="dark"] .table tbody tr:hover { background: rgba(25, 60, 38, .76); }
html[data-theme="dark"] .detail,
html[data-theme="dark"] .access-detail-block,
html[data-theme="dark"] .permission-row,
html[data-theme="dark"] .master-add-form,
html[data-theme="dark"] .master-import-form,
html[data-theme="dark"] .stock-card,
html[data-theme="dark"] .cart-line,
html[data-theme="dark"] .calendar-grid,
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .activity-popup,
html[data-theme="dark"] .print-summary-grid > section,
html[data-theme="dark"] .print-report-meta div,
html[data-theme="dark"] .print-filter-note,
html[data-theme="dark"] .roadmap-list li { background: rgba(15, 32, 23, .96); border-color: #315c43; }
html[data-theme="dark"] .stock-category-grid,
html[data-theme="dark"] .stock-category-tile,
html[data-theme="dark"] .stock-category-thumb-wrap { background: #102418; border-color: #315c43; }
html[data-theme="dark"] .stock-category-tile { color: var(--text); }
html[data-theme="dark"] .stock-category-tile:hover,
html[data-theme="dark"] .stock-category-tile.active { background: #173322; box-shadow: inset 0 0 0 2px rgba(141, 240, 173, .18); }
html[data-theme="dark"] .stock-card-media,
html[data-theme="dark"] .cart-line-thumb,
html[data-theme="dark"] .asset-picture-preview,
html[data-theme="dark"] .asset-picture-preview img,
html[data-theme="dark"] .asset-detail-image,
html[data-theme="dark"] .master-list-thumb { background: #102418; border-color: #315c43; }
html[data-theme="dark"] .asset-thumb-placeholder { background: #102418; border-color: rgba(141, 240, 173, .28); }
html[data-theme="dark"] .dashboard-access-card summary,
html[data-theme="dark"] .dashboard-access-card summary:hover,
html[data-theme="dark"] .dashboard-access-details,
html[data-theme="dark"] .portal-module-section,
html[data-theme="dark"] .school-calendar-overview,
html[data-theme="dark"] .school-calendar-page-head,
html[data-theme="dark"] .school-calendar-selected,
html[data-theme="dark"] .dashboard-feed-link,
html[data-theme="dark"] .school-calendar-event,
html[data-theme="dark"] .module-card { background: linear-gradient(145deg, rgba(15, 32, 23, .98), rgba(9, 24, 15, .94)); border-color: #315c43; }
html[data-theme="dark"] .qty-stepper { background: #0a1a11; border-color: #315c43; box-shadow: none; }
html[data-theme="dark"] .qty-stepper input { color: #f2fff5; }
html[data-theme="dark"] .qty-stepper-controls { background: #102418; border-left-color: #315c43; }
html[data-theme="dark"] .qty-stepper-controls button { border-bottom-color: #315c43; color: #8df0ad; }
html[data-theme="dark"] .qty-stepper-controls button:hover { background: #173322; color: #f2fff5; }
html[data-theme="dark"] .school-calendar-image-link { background: rgba(6, 17, 9, .82); }
html[data-theme="dark"] .school-calendar-event.selected { background: linear-gradient(145deg, rgba(14, 52, 29, .98), rgba(9, 24, 15, .94)); border-color: #53c26f; }
html[data-theme="dark"] .school-calendar-source-summary { color: #b6d3bd; }
html[data-theme="dark"] .calendar-event-date,
html[data-theme="dark"] .feed-date-chip { background: #064e3b; color: #a7f3d0; border-color: #315c43; }
html[data-theme="dark"] .school-calendar-event.tone-orange .calendar-event-date { background: #78350f; color: #fde68a; }
html[data-theme="dark"] .school-calendar-event.tone-red .calendar-event-date { background: #7f1d1d; color: #fecaca; }
html[data-theme="dark"] .module-card b,
html[data-theme="dark"] .access-summary-pill,
html[data-theme="dark"] .stock-left,
html[data-theme="dark"] .notification-tag,
html[data-theme="dark"] .attachment-inline a { background: #173322; color: #8df0ad; border-color: #315c43; }
html[data-theme="dark"] .access-chip,
html[data-theme="dark"] .access-count-row span { background: #102418; color: var(--text); border-color: #315c43; }
html[data-theme="dark"] .access-chip strong { color: #f2fff5; }
html[data-theme="dark"] .access-chip small,
html[data-theme="dark"] .badge { background: #1f3529; color: #d8f7e0; }
html[data-theme="dark"] .badge.success { background: #064e3b; color: #a7f3d0; }
html[data-theme="dark"] .badge.info { background: #1e3a8a; color: #bfdbfe; }
html[data-theme="dark"] .badge.warning { background: #78350f; color: #fde68a; }
html[data-theme="dark"] .badge.danger { background: #7f1d1d; color: #fecaca; }
html[data-theme="dark"] a.badge-link { border-color: rgba(191, 219, 254, .22); }
html[data-theme="dark"] a.badge-link:hover { background: #1e40af; color: #eff6ff; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #7d9185; opacity: 1; }
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus { outline-color: #315c43; border-color: #4ade80; }
html[data-theme="dark"] input[type="file"]::file-selector-button { background: #173322; color: #e6f4ea; border: 1px solid #315c43; border-radius: 8px; padding: 6px 9px; }
html[data-theme="dark"] .calendar-day.muted { background: #0a1a11; color: #8da094; }
html[data-theme="dark"] .calendar-event,
html[data-theme="dark"] .calendar-event.green-flag { background: #0d2a19; color: #a7f3d0; border-color: #266b42; }
html[data-theme="dark"] .calendar-event.official-calendar { background: linear-gradient(135deg, #0d2a19, #0c2333); border-color: #2f8b53; box-shadow: inset 4px 0 0 #53c26f; }
html[data-theme="dark"] .calendar-event small,
html[data-theme="dark"] .calendar-event.green-flag small { color: #8df0ad; }
html[data-theme="dark"] .calendar-event.pending-approval { background: #2b210d; color: #fde68a; border-color: #854d0e; }
html[data-theme="dark"] .calendar-event.pending-approval small { color: #fbbf24; }
html[data-theme="dark"] .notification-card,
html[data-theme="dark"] .notification-card.orange,
html[data-theme="dark"] .notification-card.red,
html[data-theme="dark"] .notification-empty { background: #102418; color: var(--text); border-color: #315c43; }
html[data-theme="dark"] .notification-card::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); }
html[data-theme="dark"] .chat-body,
html[data-theme="dark"] .chat-users,
html[data-theme="dark"] .chat-messages { background: #07150d; }
html[data-theme="dark"] .chat-search,
html[data-theme="dark"] .chat-compose input { background: #07150d; color: var(--text); border-color: #315c43; }
html[data-theme="dark"] .chat-message.theirs p,
html[data-theme="dark"] .chat-message .chat-deleted-message,
html[data-theme="dark"] .chat-message.mine .chat-deleted-message,
html[data-theme="dark"] .chat-attachments a,
html[data-theme="dark"] .chat-message-actions button,
html[data-theme="dark"] .chat-icon-button,
html[data-theme="dark"] .chat-file-preview span { background: #102418; color: var(--text); border-color: #315c43; }
html[data-theme="dark"] .chat-icon-button:hover,
html[data-theme="dark"] .chat-message-actions button:hover,
html[data-theme="dark"] .chat-attachments a:hover { background: #173322; color: #8df0ad; }
html[data-theme="dark"] .chat-call-strip { background: #102418; color: #8df0ad; box-shadow: none; }
html[data-theme="dark"] .chat-call-strip.danger { background: #2a0d0d; color: #fecaca; }
html[data-theme="dark"] .chat-call-strip.info,
html[data-theme="dark"] .chat-call-strip.incoming { background: #2b210d; color: #fde68a; }
html[data-theme="dark"] .chat-call-strip.success { background: #0d2a19; color: #a7f3d0; }
html[data-theme="dark"] .finance-control-menu summary { background: #102418; border-color: #315c43; color: #8df0ad; }
html[data-theme="dark"] .finance-control-menu summary small { color: #b8c9be; }
html[data-theme="dark"] .finance-control-menu[open] summary { background: #166b3d; color: #fff; }
html[data-theme="dark"] .finance-control-menu[open] summary small { color: rgba(255,255,255,.78); }
html[data-theme="dark"] .finance-row-form { background: #102418; border-color: #315c43; box-shadow: 0 14px 34px rgba(0,0,0,.28); }
html[data-theme="dark"] .finance-budget-sheet-head { color: #8df0ad; }
html[data-theme="dark"] .finance-budget-sheet-head span { color: #b8c9be; }
html[data-theme="dark"] .finance-budget-table tfoot th { background: #173322; color: #8df0ad; }
html[data-theme="dark"] .budget-remaining { color: #8df0ad; }
html[data-theme="dark"] .budget-department-picker { background: #102418; border-color: #315c43; }
html[data-theme="dark"] .budget-picker-head strong { color: #8df0ad; }
html[data-theme="dark"] .budget-picker-head span { color: #b8c9be; }
html[data-theme="dark"] .budget-department-grid .check { background: #07150d; border-color: #315c43; }
html[data-theme="dark"] .finance-expense-approval small { color: #b8c9be; }
html[data-theme="dark"] .progress { background: #102418; }
html[data-theme="dark"] .label-brand { color: #0b3f24; }
html[data-theme="dark"] .scanner-help-grid div { background: #102418; border-color: #315c43; }
html[data-theme="dark"] .scanner-data-card { background: #102418; border-color: #315c43; }
html[data-theme="dark"] .scanner-data-card strong,
html[data-theme="dark"] .scanner-kv-grid strong { color: #eaf7ee; }
html[data-theme="dark"] .scanner-kv-grid div { background: #07150d; border-color: #315c43; }
html[data-theme="dark"] .scanner-result strong { color: #eaf7ee; }
html[data-theme="dark"] .scanner-result-green { background: #0d2a19; border-color: #16a34a; }
html[data-theme="dark"] .scanner-result-orange,
html[data-theme="dark"] .scanner-result-warning { background: #2b210d; border-color: #f59e0b; }
html[data-theme="dark"] .scanner-result-red { background: #2a0d0d; border-color: #ef4444; }
html[data-theme="dark"] .label-preview-title { color: #eaf7ee; }
html[data-theme="dark"] .label-preview-stage { background: linear-gradient(135deg, rgba(10, 27, 18, .96), rgba(15, 50, 31, .9)); border-color: #315c43; box-shadow: inset 0 0 0 1px rgba(141, 240, 173, .08); }

@keyframes floating-panel-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes notification-auto-open {
  0% { opacity: 0; transform: translateY(18px) scale(.94); }
  68% { opacity: 1; transform: translateY(-4px) scale(1.018); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes chat-message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.attachment-inline { margin-top: 6px; white-space: normal; }
.attachment-inline small { display: block; color: var(--muted); line-height: 1.45; }
.attachment-inline a { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 7px; border-radius: 999px; background: #eef7ee; border: 1px solid var(--border); color: var(--green); font-size: 11px; font-weight: 800; text-decoration: none; }
.attachment-inline a:hover { background: #dcfae6; color: var(--navy); }
.attachments-card .table .wrap { min-width: 260px; }
input[type="file"] { padding: 8px; }
.label-preview-panel { margin-top: 14px; display: grid; gap: 10px; }
.label-preview-title { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.label-preview-title strong { font-size: 15px; }
.label-preview-title span { color: var(--muted); font-size: 12px; font-weight: 800; }
.label-preview-stage { width: fit-content; max-width: 100%; padding: 12px; border: 1px dashed rgba(15, 79, 42, .28); border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(238,247,238,.88)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.85); overflow: auto; }
.label-preview-stage .label-sheet,
.label-preview-stage .label-sheet-stack { zoom: var(--label-preview-scale, 1); }
.label-preview-stage .label-sheet-stack .label-sheet { zoom: 1; }
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(70mm, 70mm)); gap: 12px; align-items: start; }
.label-sheet-stack { display: grid; gap: 14px; align-items: start; }
.label-sheet-a4,
.label-sheet-long { width: var(--label-sheet-width, 210mm); height: var(--label-sheet-height, 297mm); min-height: var(--label-sheet-height, 297mm); box-sizing: border-box; padding: 8mm; grid-template-columns: repeat(var(--label-sheet-cols, 2), var(--label-sheet-column, 70mm)); grid-auto-rows: var(--label-sheet-row, 40mm); gap: 4mm; justify-content: center; align-content: start; border: 1px solid #d1d5db; border-radius: 2mm; background: #fff; box-shadow: 0 20px 60px rgba(15, 79, 42, .14); overflow: hidden; }
.label-sheet-a4 { --label-sheet-width: 210mm; --label-sheet-height: 297mm; }
.label-sheet-long { --label-sheet-width: 215.9mm; --label-sheet-height: 330.2mm; }
.asset-label { position: relative; width: 70mm; height: 40mm; padding: 2.4mm; border: 1px solid #111827; border-radius: 2.5mm; background: linear-gradient(180deg, #fff, #fbfdfb); color: #111827; box-shadow: 0 8px 20px rgba(15, 79, 42, .10); break-inside: avoid; page-break-inside: avoid; overflow: hidden; }
.label-sheet-a4 .asset-label,
.label-sheet-long .asset-label { border: .25mm dashed #64748b; border-radius: 0; box-shadow: none; }
.label-sheet-a4 .asset-label::after,
.label-sheet-long .asset-label::after { content: ""; position: absolute; inset: 1.3mm; border: .15mm dotted rgba(100, 116, 139, .45); pointer-events: none; }
.label-size-70x40 { width: 70mm; height: 40mm; display: grid; grid-template-rows: 6.4mm minmax(0, 1fr) 5.6mm; gap: .45mm; padding: 1.7mm 1.8mm; }
.label-size-small { width: 45mm; height: 25mm; padding: 1.7mm; border-radius: 2mm; }
.label-size-cable { width: 50mm; height: 15mm; padding: 1.1mm; border-radius: 1.5mm; }
.label-size-item-tag { width: 45mm; height: 18mm; padding: 1.25mm 1.4mm; border-radius: 1.5mm; }
.label-brand { display: flex; align-items: center; gap: 6px; padding-bottom: 1.2mm; border-bottom: 1px solid #d1d5db; font-weight: 900; color: #0b3f24; line-height: 1.05; }
.label-brand img { width: 8.4mm; height: 8.4mm; object-fit: contain; border-radius: 50%; }
.label-brand small { display: block; margin-top: 1px; color: #4b5563; font-size: 6.6px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.label-brand-compact span { font-size: 9.2px; }
.label-body { display: grid; grid-template-columns: 21.5mm minmax(0, 1fr); gap: 2mm; align-items: start; padding-top: 1.2mm; }
.label-qr-wrap { width: 21.5mm; height: 21.5mm; display: grid; place-items: center; padding: .5mm; border: .25mm solid #d1d5db; border-radius: 1.2mm; background: #fff; }
.label-qr { width: 20mm; height: 20mm; display: block; }
.label-info { min-width: 0; display: grid; gap: .4mm; line-height: 1.05; }
.label-title { margin: 0; min-height: 0; max-height: 7.6mm; overflow: hidden; font-size: 8.8px; font-weight: 900; line-height: 1.08; color: #111827; }
.label-code-text { display: block; padding: .9mm 1.2mm; border-radius: 1.5mm; background: #eef7ee; color: #0b3f24; font-family: Consolas, "Courier New", monospace; font-size: 8.2px; font-weight: 900; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label-info small { display: block; color: #374151; font-size: 6.8px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label-barcode-wrap { height: 7.2mm; margin-top: .7mm; padding-top: .5mm; border-top: 1px solid #e5e7eb; background: rgba(255,255,255,.55); }
.label-barcode { width: 100%; height: 6.6mm; display: block; fill: #000; }
.label-size-70x40 .label-brand { min-width: 0; gap: 1.2mm; padding: 0 0 .45mm; overflow: hidden; }
.label-size-70x40 .label-brand img { width: 5.5mm; height: 5.5mm; flex: 0 0 5.5mm; }
.label-size-70x40 .label-brand span { display: block; min-width: 0; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.label-size-70x40 .label-brand small { margin-top: .2mm; font-size: 5.4px; }
.label-size-70x40 .label-body { min-height: 0; grid-template-columns: 19.5mm minmax(0, 1fr); gap: 1.4mm; align-items: center; padding-top: 0; overflow: hidden; }
.label-size-70x40 .label-qr-wrap { width: 19.5mm; height: 19.5mm; padding: .35mm; border-radius: .8mm; }
.label-size-70x40 .label-qr { width: 18.6mm; height: 18.6mm; }
.label-size-70x40 .label-info { min-height: 0; gap: .2mm; overflow: hidden; }
.label-size-70x40 .label-title { display: -webkit-box; max-height: 5.2mm; font-size: 7.4px; line-height: 1.05; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.label-size-70x40 .label-code-text { padding: .45mm .8mm; font-size: 6.7px; line-height: 1.05; }
.label-size-70x40 .label-info small { font-size: 5.5px; line-height: 1.05; }
.label-size-70x40 .label-barcode-wrap { min-height: 0; height: 5.6mm; margin-top: 0; padding-top: .25mm; overflow: hidden; }
.label-size-70x40 .label-barcode { height: 5mm; }
.label-size-small .label-brand { gap: 3px; padding-bottom: .7mm; }
.label-size-small .label-brand img { width: 5mm; height: 5mm; }
.label-size-small .label-brand-compact span { font-size: 6.2px; letter-spacing: -.01em; }
.label-size-small .label-brand small { display: none; }
.label-size-small .label-body { grid-template-columns: 14mm minmax(0, 1fr); gap: 1.2mm; padding-top: .9mm; }
.label-size-small .label-qr-wrap,
.label-size-small .label-qr { width: 14mm; height: 14mm; }
.label-size-small .label-title { max-height: 5.2mm; font-size: 7px; line-height: 1.05; }
.label-size-small .label-code-text { padding: .45mm .8mm; font-size: 6.4px; }
.label-size-small .label-info small { font-size: 5.8px; }
.label-size-small .label-info small:nth-of-type(n+2) { display: none; }
.label-size-small .label-barcode-wrap { height: 4.4mm; margin-top: .4mm; padding-top: .3mm; }
.label-size-small .label-barcode { height: 4mm; }
.label-size-cable .label-brand,
.label-size-cable .label-qr-wrap,
.label-size-cable .label-info small:nth-of-type(n+2) { display: none; }
.label-size-cable .label-body { display: block; padding-top: 0; }
.label-size-cable .label-info { display: grid; grid-template-columns: 1fr auto; gap: .6mm 1mm; align-items: center; }
.label-size-cable .label-title { grid-column: 1 / -1; max-height: 3.4mm; font-size: 6.7px; line-height: 1.02; white-space: nowrap; text-overflow: ellipsis; }
.label-size-cable .label-code-text { padding: .3mm .6mm; font-size: 6.3px; }
.label-size-cable .label-info small { font-size: 5.8px; text-align: right; }
.label-size-cable .label-barcode-wrap { height: 5.2mm; margin-top: .3mm; padding-top: .3mm; border-top: 0; }
.label-size-cable .label-barcode { height: 4.8mm; }
.label-size-item-tag { display: grid; grid-template-rows: 3.35mm minmax(0, 1fr) auto; gap: .25mm; background: #fff; }
.item-tag-head { display: grid; min-width: 0; align-items: center; color: #111827; line-height: 1; text-align: center; overflow: hidden; }
.item-tag-head strong { display: -webkit-box; max-width: 100%; overflow: hidden; color: #111827; font-size: 5.35px; font-weight: 950; letter-spacing: .01em; line-height: 1.04; text-align: center; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.item-tag-barcode { min-height: 0; display: grid; align-items: stretch; padding: .1mm .25mm 0; background: #fff; }
.item-tag-barcode .label-barcode { width: 100%; height: 8.8mm; display: block; }
.item-tag-code { display: block; overflow: hidden; color: #111827; font-family: Consolas, "Courier New", monospace; font-size: 5.4px; font-weight: 900; line-height: 1; letter-spacing: .02em; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.user-label { position: relative; width: 54mm; height: 30mm; padding: 1.6mm; border: 1px solid #111827; border-radius: 2mm; background: linear-gradient(180deg, #fff, #fbfdfb); color: #111827; box-shadow: 0 8px 20px rgba(15, 79, 42, .10); break-inside: avoid; page-break-inside: avoid; overflow: hidden; }
.label-sheet-a4 .user-label,
.label-sheet-long .user-label { border: .25mm dashed #64748b; border-radius: 0; box-shadow: none; }
.label-sheet-a4 .user-label::after,
.label-sheet-long .user-label::after { content: ""; position: absolute; inset: 1.3mm; border: .15mm dotted rgba(100, 116, 139, .45); pointer-events: none; }
.user-label-head { display: grid; grid-template-columns: 6.8mm minmax(0, 1fr); gap: 1.2mm; align-items: center; padding-bottom: .8mm; border-bottom: .2mm solid #d1d5db; color: #0b3f24; line-height: 1.05; }
.user-label-head img { width: 6.8mm; height: 6.8mm; object-fit: contain; border-radius: 50%; }
.user-label-head strong { display: block; overflow: hidden; font-size: 6.4px; font-weight: 950; text-transform: none; letter-spacing: 0; white-space: nowrap; text-overflow: ellipsis; }
.user-label-head small { display: block; overflow: hidden; color: #4b5563; font-size: 5.7px; font-weight: 900; white-space: nowrap; text-overflow: ellipsis; }
.user-label-body { display: grid; grid-template-columns: 14.5mm minmax(0, 1fr); gap: 1.5mm; align-items: start; padding-top: .9mm; }
.user-label-qr { width: 14.5mm; height: 14.5mm; display: grid; place-items: center; padding: .4mm; border: .2mm solid #d1d5db; border-radius: 1mm; background: #fff; }
.user-label-qr .label-qr { width: 13.4mm; height: 13.4mm; display: block; }
.user-label-info { display: grid; gap: .35mm; min-width: 0; line-height: 1.05; }
.user-label-info strong { display: -webkit-box; max-height: 5.2mm; overflow: hidden; color: #111827; font-size: 7.3px; font-weight: 950; line-height: 1.05; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.user-label-info small { display: block; overflow: hidden; color: #374151; font-size: 5.8px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.user-label-info span { display: block; overflow: hidden; padding: .45mm .7mm; border-radius: 1.2mm; background: #eef7ee; color: #0b3f24; font-family: Consolas, "Courier New", monospace; font-size: 5.9px; font-weight: 950; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.user-label-barcode { height: 5.3mm; margin-top: .5mm; padding-top: .35mm; border-top: .2mm solid #e5e7eb; background: rgba(255,255,255,.55); }
.user-label-barcode .label-barcode { width: 100%; height: 4.8mm; display: block; fill: #000; }
.scanner-card { display: grid; gap: 18px; }
.scanner-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.scanner-input-wrap input { min-height: 56px; font-size: 22px; font-weight: 900; letter-spacing: .03em; font-family: Consolas, "Courier New", monospace; }
.scanner-submit { min-height: 56px; }
.scanner-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.scanner-help-grid div { padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: #f8fbf5; }
.scanner-help-grid strong,
.scanner-help-grid span { display: block; }
.scanner-help-grid strong { color: var(--green); margin-bottom: 4px; }
.scanner-help-grid span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.scanner-data-card { display: grid; gap: 12px; padding: 15px; border: 1px dashed rgba(15, 79, 42, .26); border-radius: 16px; background: linear-gradient(135deg, #fbfffb, #eef7ee); }
.scanner-data-card > div:first-child { display: grid; gap: 4px; }
.scanner-data-card small,
.scanner-kv-grid small { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.scanner-data-card strong { color: var(--navy); }
.scanner-data-card span { color: var(--text); font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.scanner-kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 10px; }
.scanner-kv-grid div { display: grid; gap: 3px; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.82); }
.scanner-kv-grid strong { color: var(--navy); font-size: 13px; overflow-wrap: anywhere; }
.scanner-result { display: grid; gap: 6px; padding: 15px; border-radius: 14px; border: 1px solid var(--border); }
.scanner-result small { color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.scanner-result strong { font-size: 20px; color: var(--navy); }
.scanner-result span { color: var(--muted); }
.scanner-result-green { background: #ecfdf3; border-color: #16a34a; }
.scanner-result-orange,
.scanner-result-warning { background: #fff7ed; border-color: #f59e0b; }
.scanner-result-red { background: #fef2f2; border-color: #ef4444; }
.unit-serial-toggle { margin-top: 6px; padding: 10px 12px; border: 1px solid rgba(15, 79, 42, .18); border-radius: 12px; background: #f8fbf5; }
.unit-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.unit-detail-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
textarea[data-unit-serial-list],
textarea[data-unit-assignment-list] { min-height: 112px; font-family: Consolas, "Courier New", monospace; }
html[data-theme="dark"] .unit-serial-toggle { background: #102418; border-color: #315c43; }
@keyframes approval-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .42); }
  50% { box-shadow: 0 0 0 5px rgba(249, 115, 22, .08); }
}
@keyframes nav-approval-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .42); }
  50% { box-shadow: 0 0 0 5px rgba(249, 115, 22, .10), inset 0 0 0 1px rgba(254, 243, 199, .42); }
}
@keyframes overdue-alert-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 22px 70px rgba(185, 28, 28, .28); }
  50% { transform: translateY(-2px); box-shadow: 0 26px 80px rgba(185, 28, 28, .38); }
}
@keyframes notification-pulse {
  0%, 100% { box-shadow: 0 18px 44px rgba(15, 79, 42, .32), 0 0 0 0 rgba(15, 79, 42, .25); }
  50% { box-shadow: 0 22px 54px rgba(15, 79, 42, .38), 0 0 0 9px rgba(15, 79, 42, .08); }
}
@keyframes notification-urgent-pulse {
  0%, 100% { box-shadow: 0 18px 44px rgba(185, 28, 28, .30), 0 0 0 0 rgba(185, 28, 28, .28); }
  50% { box-shadow: 0 24px 58px rgba(185, 28, 28, .42), 0 0 0 10px rgba(185, 28, 28, .10); }
}
@keyframes chat-pulse {
  0%, 100% { box-shadow: 0 18px 44px rgba(201, 52, 47, .28), 0 0 0 0 rgba(201, 52, 47, .24); }
  50% { box-shadow: 0 22px 54px rgba(201, 52, 47, .34), 0 0 0 9px rgba(201, 52, 47, .08); }
}

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #06391f 0%, #0f6b3c 62%, #b6322e 100%); }
.auth-card { width: min(460px, 100%); background: #fff; border-top: 5px solid #137343; border-radius: 8px; padding: 32px; box-shadow: 0 25px 70px rgba(0, 0, 0, .25); text-align: left; }
.auth-logo { display: block; width: 104px; height: 104px; object-fit: contain; margin: 0 auto 14px; background: transparent; border-radius: 50%; padding: 0; box-shadow: none; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .96)) drop-shadow(0 3px 0 rgba(255, 255, 255, .55)) drop-shadow(0 14px 18px rgba(15, 79, 42, .24)) saturate(1.08) contrast(1.04); }
.auth-card h1 { text-align: center; }
.auth-card form { display: grid; gap: 16px; }
.auth-card .button { width: 100%; margin-top: 5px; }
.auth-card h1 { font-weight: 700; }
.auth-card label { font-weight: 560; }
.auth-form-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: -2px; }
.auth-form-foot a { color: var(--green); font-size: 13px; font-weight: 600; }
.auth-page.auth-workspace-finance { background: linear-gradient(135deg, #123f56 0%, #238a9a 66%, #d69a19 100%); }
.auth-workspace-finance .auth-card { border-top-color: #238a9a; }
.auth-page.auth-workspace-hr { background: linear-gradient(135deg, #692742 0%, #b45568 66%, #ef8d64 100%); }
.auth-workspace-hr .auth-card { border-top-color: #b45568; }
.auth-page.auth-workspace-registrar { background: linear-gradient(135deg, #31466d 0%, #627daf 66%, #168b78 100%); }
.auth-workspace-registrar .auth-card { border-top-color: #536fa0; }
.auth-page.auth-workspace-it-services { background: linear-gradient(135deg, #075357 0%, #10918b 66%, #d57b28 100%); }
.auth-workspace-it-services .auth-card { border-top-color: #10918b; }
.auth-page.auth-workspace-student-services { background: linear-gradient(135deg, #3f246f 0%, #8d62d7 66%, #c7a8f1 100%); }
.auth-workspace-student-services .auth-card { border-top-color: #8d62d7; }
.auth-page.auth-workspace-platform-admin { background: linear-gradient(135deg, #25342d 0%, #4c6d5d 66%, #b88908 100%); }
.auth-workspace-platform-admin .auth-card { border-top-color: #b88908; }
.auth-form-foot a:hover { color: var(--red); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--red); }
.right { text-align: right; }
.mobile-menu { display: none; }

@media (max-width: 1050px) {
  .grid.kpis { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .stock-cart-shell { grid-template-columns: 1fr; }
  .stock-cart-panel { position: static; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .permission-row { grid-template-columns: 1fr; }
  .form-grid .span-3 { grid-column: span 2; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-access-details { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { position: fixed; z-index: 90; left: min(-324px, -100vw); width: min(306px, calc(100vw - 40px)); transition: left .2s; }
  .sidebar.open { left: 0; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 80; display: block; border: 0; background: rgba(1, 19, 10, .38); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .sidebar-backdrop[hidden] { display: none; }
  html[data-sidebar="collapsed"] .app { display: block; }
  html[data-sidebar="collapsed"] .sidebar { padding: 22px 15px; overflow: auto; }
  html[data-sidebar="collapsed"] .brand { justify-content: flex-start; gap: 12px; margin: -22px -15px 10px; padding: 22px 15px 16px; }
  .brand { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 18px 14px 14px; align-items: center; font-size: 15px; }
  .brand img { width: 52px; height: 52px; }
  .brand span { gap: 3px; }
  .brand-title { font-size: 15px; line-height: 1.14; }
  .brand small { font-size: 11.5px; max-width: 100%; line-height: 1.22; }
  html[data-sidebar="collapsed"] .brand img { width: 58px; height: 58px; }
  html[data-sidebar="collapsed"] .brand span,
  html[data-sidebar="collapsed"] .nav-text,
  html[data-sidebar="collapsed"] .nav-section,
  html[data-sidebar="collapsed"] .sidebar-calendar,
  html[data-sidebar="collapsed"] .sidebar-website { display: grid; }
  html[data-sidebar="collapsed"] .nav a { justify-content: flex-start; gap: 10px; padding: 9px 11px 9px 9px; border-left-width: 4px; }
  html[data-sidebar="collapsed"] .nav-icon { width: 28px; height: 28px; }
  html[data-sidebar="collapsed"] .nav a.has-pending::after { position: static; width: 9px; height: 9px; margin-left: auto; border-width: 2px; }
  html[data-sidebar="collapsed"] .nav a::before { content: none; display: none; }
  .topbar { padding: 0 15px; }
  .topbar-actions { gap: 6px; }
  .topbar-clock span { display: none; }
  .topbar-account { min-height: 42px; padding: 4px; gap: 4px; border-radius: 14px; }
  .topbar-account::before { display: none; }
  .topbar-account-avatar { width: 34px; height: 34px; border-radius: 12px; font-size: 11px; }
  .topbar-account-text { display: none; }
  .topbar-account-logout { right: 0; width: auto; min-height: 34px; padding: 0 10px; justify-content: center; }
  .topbar-account-security { right: 44px; width: auto; min-height: 34px; padding: 0 10px; justify-content: center; }
  .topbar-account-logout span,
  .topbar-account-security span { display: none; }
  .topbar-icon-button { width: 38px; height: 38px; }
  .main { padding: 20px 14px; }
  .page-sticky-toolbar { top: var(--sticky-toolbar-top); margin: -2px 0 14px; padding: 12px; border-radius: 15px; }
  .card > .page-sticky-toolbar { margin: -2px -2px 14px; top: calc(var(--sticky-toolbar-top) + 6px); }
  .master-list-sticky-head { margin: -2px 0 14px; padding: 12px; border-radius: 15px; overflow: hidden; }
  .master-list-sticky-head .page-head { margin-bottom: 10px; }
  .master-list-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .master-list-tabs .button { flex: 0 0 auto; }
  .portal-sticky-tabs { padding: 8px 0; margin-bottom: 10px; }
  .portal-sticky-tabs,
  .portal-scroll-sync-bar,
  .page-sticky-toolbar,
  .master-list-sticky-head { z-index: 8; }
  .grid.kpis, .three-col, .form-grid { grid-template-columns: 1fr; }
  .repair-part-row { grid-template-columns: 1fr; }
  .repair-part-remove { justify-self: start; margin-top: 0; }
  .calendar-grid { grid-template-columns: 1fr; }
  .calendar-head { display: none; }
  .calendar-day { min-height: auto; border-right: 0; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: span 1; }
  .page-head { display: block; }
  .page-head .actions { margin-top: 12px; }
  .page-dashboard .dashboard-page-head > div:first-child { display: none; }
  .page-dashboard .dashboard-page-head { margin-bottom: 12px; }
  .page-dashboard .dashboard-page-head .actions { margin-top: 0; }
  .section-head { display: grid; gap: 10px; }
  .section-head .bulk-action-form { justify-content: flex-start; }
  .password-reset-request { grid-template-columns: 1fr; align-items: stretch; }
  .password-reset-request .actions { justify-content: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
  .school-calendar-overview { align-items: flex-start; }
  .school-calendar-selected { grid-template-columns: 1fr; }
  .school-calendar-selected .actions { justify-content: flex-start; }
  .section-title-row { display: grid; gap: 10px; }
  .dashboard-feed-link { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .dashboard-feed-link .badge { grid-column: 2; width: fit-content; }
  .official-calendar-feed-link { grid-template-columns: 1fr; }
  .official-calendar-feed-link .badge { grid-column: 1; }
  .feed-date-chip { width: fit-content; min-width: 0; }
  .school-calendar-event-list { grid-template-columns: 1fr; }
  .school-calendar-event { grid-template-columns: 1fr; }
  .calendar-event-date { width: fit-content; min-height: 0; }
  .school-calendar-source-panel > summary { align-items: flex-start; flex-direction: column; }
  .school-calendar-page-head { display: block; }
  .school-calendar-page-head .actions { margin-top: 12px; }
  .school-calendar-image-link { padding: 10px; }
  .school-calendar-image-link img { min-width: 680px; }
  .dashboard-access-card summary { grid-template-columns: auto minmax(0, 1fr); }
  .access-summary-pill, .access-summary-action { grid-column: 2; width: fit-content; }
  .access-chip strong { max-width: 150px; }
  .notification-center { right: 14px; bottom: 14px; }
  .back-to-top { right: 16px; bottom: 84px; width: 46px; height: 46px; }
  .notification-panel { width: calc(100vw - 28px); max-height: calc(100vh - 105px); bottom: 68px; }
  .chat-center { right: 82px; bottom: 14px; }
  .chat-panel { right: -68px; width: calc(100vw - 28px); height: calc(100vh - 105px); bottom: 68px; }
  .notification-float-button, .chat-float-button { width: 54px; height: 54px; }
  .notification-icon, .chat-float-icon { width: 30px; height: 30px; }
  .chat-float-label { font-size: 9px; }
  .portal-preferences-toggle span:last-child { display: none; }
  .chat-body { grid-template-columns: 1fr; }
  .chat-users { max-height: 190px; border-right: 0; border-bottom: 1px solid var(--border); }
  .scanner-form,
  .scanner-help-grid { grid-template-columns: 1fr; }
  .scanner-submit { width: 100%; }
  .unit-detail-grid { grid-template-columns: 1fr; }
  .stock-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-category-tile { min-height: 148px; }
  .asset-photo-card { grid-template-columns: 1fr; }
  .asset-detail-image { max-width: 100%; }
  .asset-picture-preview { grid-template-columns: 1fr; }
  .asset-picture-preview img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .cart-line { grid-template-columns: 44px minmax(0, 1fr); align-items: start; }
  .cart-line .qty-stepper { grid-column: 2; width: min(140px, 100%); }
  .cart-line .button { grid-column: 2; justify-self: start; }
  .button.mobile-icon-action {
    position: relative;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    gap: 0;
    border-radius: 12px;
  }
  .button.mobile-icon-action .mobile-action-symbol {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
  }
  .button.mobile-icon-action .mobile-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 900px) {
  .portal-scroll-sync-bar { display: none !important; }
  .portal-sticky-header-clone { display: none !important; }
  .portal-wide-table thead th { position: static; box-shadow: none; }
  .portal-table-scroll { overflow: visible; }
  .responsive-table-wrap { overflow: visible; border: 0; background: transparent; }
  .responsive-card-table { min-width: 0; width: 100%; white-space: normal; border-collapse: separate; border-spacing: 0 12px; }
  .responsive-card-table thead { display: none; }
  .responsive-card-table tbody, .responsive-card-table tr, .responsive-card-table td { display: block; width: 100%; }
  .responsive-card-table tr { border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
  .responsive-card-table td { display: grid; grid-template-columns: minmax(112px, 34%) minmax(0, 1fr); gap: 10px; align-items: start; width: 100% !important; min-width: 0 !important; max-width: none !important; padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
  .responsive-card-table td > * { min-width: 0; }
  .responsive-card-table td::before { content: attr(data-label); min-width: 0; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .03em; line-height: 1.25; text-transform: uppercase; white-space: normal; word-break: normal; overflow-wrap: normal; hyphens: none; writing-mode: horizontal-tb; }
  .responsive-card-table td.empty { display: block; }
  .responsive-card-table td.empty::before { content: none; }
  .responsive-card-table .wrap { min-width: 0; }
  .responsive-card-table .table-actions-cell,
  .responsive-card-table .inventory-actions-col,
  .responsive-card-table .inventory-select-col,
  .responsive-card-table .user-select-col { position: static; width: 100% !important; min-width: 0 !important; max-width: none !important; background: #f8fbf5; box-shadow: none; }
  .responsive-card-table .inventory-select-col,
  .responsive-card-table .user-select-col { display: grid; grid-template-columns: minmax(112px, 34%) minmax(0, 1fr); align-items: center; justify-content: initial; text-align: left; }
  .responsive-card-table .inventory-select-col input,
  .responsive-card-table .user-select-col input { justify-self: start; margin: 0; }
  .responsive-card-table .table-actions-cell,
  .responsive-card-table .inventory-actions-col { display: flex; justify-content: flex-end; }
  .responsive-card-table .table-actions-cell::before,
  .responsive-card-table .inventory-actions-col::before { content: none; }
  .responsive-card-table .mobile-actions-cell { display: flex; justify-content: flex-end; background: #f8fbf5; }
  .responsive-card-table .mobile-actions-cell::before { content: none; }
  .responsive-card-table .approval-actions,
  .responsive-card-table .actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .responsive-card-table .master-edit-form {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .responsive-card-table .master-edit-form input {
    width: 100%;
    min-width: 0;
  }
  .responsive-card-table .user-detail-row { margin-top: -12px; border-radius: 0 0 14px 14px; box-shadow: none; }
  .responsive-card-table .user-detail-row td { display: block; padding: 0 !important; border-bottom: 0; }
  .responsive-card-table .user-detail-row td::before { content: none; }
  .responsive-card-table .user-summary-row.is-open { border-radius: 14px 14px 0 0; }
  .user-table { min-width: 0; }
  .user-detail-panel { grid-template-columns: 1fr; padding: 12px; }
  .user-detail-list { grid-template-columns: 108px minmax(0, 1fr); }
  .inventory-row-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .finance-control-cell-head, .finance-control-cell { min-width: 0; max-width: none; }
  .finance-control-menu { width: 100%; min-width: 0; }
  .finance-row-form { width: 100%; min-width: 0; box-shadow: none; }
  .finance-mini-grid { grid-template-columns: 1fr; }
  .finance-mini-grid .span-2 { grid-column: span 1; }
  html[data-theme="dark"] .responsive-card-table tr,
  html[data-theme="dark"] .responsive-card-table .table-actions-cell,
  html[data-theme="dark"] .responsive-card-table .inventory-actions-col,
  html[data-theme="dark"] .responsive-card-table .inventory-select-col,
  html[data-theme="dark"] .responsive-card-table .user-select-col,
html[data-theme="dark"] .responsive-card-table .mobile-actions-cell { background: rgba(15, 32, 23, .98); }
}

/* Work Assignment and Progress Monitor */
.quick-repair-page-head,
.quick-repair-form {
  width: min(100%, 1160px);
  margin-right: auto;
  margin-left: auto;
}

.quick-repair-form { padding: 22px; }
.quick-repair-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.quick-repair-heading span:first-child {
  display: block;
  color: #0f6b3c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.quick-repair-heading h2 { margin: 3px 0 0; font-size: 20px; }
.quick-repair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.quick-repair-grid label { min-width: 0; }
.quick-repair-item,
.quick-repair-problem { grid-column: 1 / -1; }
.quick-repair-problem textarea { min-height: 155px; resize: vertical; }
.quick-repair-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.repair-item-picker { min-width: 0; }
.repair-item-picker > label { margin: 0; }
.repair-item-native-select { margin-top: 6px; }
.repair-item-picker.is-enhanced .repair-item-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.repair-item-picker-ui {
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid #b9d7c2;
  border-radius: 8px;
  background: #fff;
}
.repair-item-picker-ui[hidden],
.repair-item-preview-empty[hidden],
.repair-item-preview-content[hidden],
.repair-item-preview-photo img[hidden],
.repair-item-preview-photo .asset-thumb-placeholder[hidden],
.repair-item-no-results[hidden],
.repair-item-picker-error[hidden] { display: none !important; }
.repair-item-picker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(270px, .72fr);
  min-height: 390px;
}
.repair-item-browser { min-width: 0; border-right: 1px solid #dce9df; }
.repair-item-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-bottom: 1px solid #dce9df;
  background: #fbfefb;
}
.repair-item-search-row input { min-width: 0; margin: 0; min-height: 40px; }
.repair-item-result-count { color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.repair-item-option-list { max-height: 430px; overflow-y: auto; overscroll-behavior: contain; }
.repair-item-option {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) minmax(120px, 155px);
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #e8f0ea;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.repair-item-option[hidden] { display: none; }
.repair-item-option:hover { background: #f3faf5; }
.repair-item-option:focus-visible { position: relative; z-index: 1; outline: 3px solid #8fd3a5; outline-offset: -3px; }
.repair-item-option.is-selected { background: #ebf7ee; box-shadow: inset 4px 0 0 var(--green); }
.repair-item-option-photo,
.repair-item-preview-photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #c9dfcf;
  border-radius: 8px;
  background: #f8fafc;
}
.repair-item-option-photo { width: 58px; height: 58px; }
.repair-item-option-image,
.repair-item-option-photo .asset-thumb-placeholder,
.repair-item-preview-photo img,
.repair-item-preview-photo .asset-thumb-placeholder { width: 100%; height: 100%; display: block; object-fit: contain; }
.repair-item-option-main { min-width: 0; display: grid; gap: 3px; }
.repair-item-option-main > strong { color: #123b27; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.repair-item-option-main > small { color: var(--muted); font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; }
.repair-item-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.repair-item-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf4ff;
  color: #1e4b91;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.repair-item-chip.location { background: #eaf8ef; color: #176039; }
.repair-item-chip.department { background: #f3efff; color: #6741a5; }
.repair-item-chip.status { background: #fff4e5; color: #9a4c08; }
.repair-item-option-place { min-width: 0; color: #17442b; text-align: right; }
.repair-item-option-place strong,
.repair-item-option-place small { display: block; overflow-wrap: anywhere; }
.repair-item-option-place strong { font-size: 12px; line-height: 1.25; }
.repair-item-option-place small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.25; }
.repair-item-no-results { margin: 0; padding: 28px 18px; color: var(--muted); text-align: center; font-size: 13px; }
.repair-item-selected { min-width: 0; padding: 16px; background: linear-gradient(180deg, #fbfefb 0%, #f0f8f2 100%); }
.repair-item-preview-empty { display: grid; align-content: center; min-height: 100%; padding: 24px 8px; text-align: center; }
.repair-item-preview-empty strong { color: #17442b; font-size: 15px; }
.repair-item-preview-empty p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.repair-item-preview-head { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; align-items: center; }
.repair-item-preview-photo { width: 70px; height: 70px; background: #fff; }
.repair-item-preview-head > span:last-child { min-width: 0; }
.repair-item-preview-head small,
.repair-item-route small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.repair-item-preview-head strong { display: block; margin-top: 3px; color: #123b27; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.repair-item-preview-head [data-repair-preview-brand] { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.repair-item-preview-details { display: grid; gap: 0; margin: 14px 0 0; border-top: 1px solid #d8e7dc; }
.repair-item-preview-details > div { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 9px; padding: 7px 0; border-bottom: 1px solid #e4eee7; }
.repair-item-preview-details dt { color: var(--muted); font-size: 10px; font-weight: 700; }
.repair-item-preview-details dd { min-width: 0; margin: 0; color: #253c31; font-size: 11px; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.repair-item-route { display: grid; gap: 10px; margin-top: 14px; padding: 11px; border: 1px solid #bedcc7; border-radius: 8px; background: #fff; }
.repair-item-route > span { min-width: 0; }
.repair-item-route strong { display: block; margin-top: 2px; color: #11653a; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.repair-item-picker-error { display: block; margin-top: 6px; color: var(--red); font-size: 12px; font-weight: 700; }
.repair-item-picker.has-error .repair-item-picker-ui { border-color: var(--red); box-shadow: 0 0 0 2px rgba(217, 45, 32, .12); }

html[data-theme="dark"] .repair-item-picker-ui,
html[data-theme="dark"] .repair-item-option { background: #102418; border-color: #315c43; }
html[data-theme="dark"] .repair-item-search-row { background: #132b1c; border-color: #315c43; }
html[data-theme="dark"] .repair-item-browser { border-color: #315c43; }
html[data-theme="dark"] .repair-item-option:hover,
html[data-theme="dark"] .repair-item-option.is-selected { background: #193724; }
html[data-theme="dark"] .repair-item-option-main > strong,
html[data-theme="dark"] .repair-item-option-place,
html[data-theme="dark"] .repair-item-preview-head strong,
html[data-theme="dark"] .repair-item-preview-empty strong { color: #d7f5df; }
html[data-theme="dark"] .repair-item-option-photo,
html[data-theme="dark"] .repair-item-preview-photo { background: #0d1f15; border-color: #315c43; }
html[data-theme="dark"] .repair-item-selected { background: linear-gradient(180deg, #102418 0%, #132b1c 100%); }
html[data-theme="dark"] .repair-item-preview-details,
html[data-theme="dark"] .repair-item-preview-details > div { border-color: #315c43; }
html[data-theme="dark"] .repair-item-preview-details dd { color: #d4e7d9; }
html[data-theme="dark"] .repair-item-route { background: #0d1f15; border-color: #315c43; }
html[data-theme="dark"] .repair-item-route strong { color: #8df0ad; }

@media (max-width: 900px) {
  .repair-item-picker-layout { grid-template-columns: 1fr; }
  .repair-item-browser { border-right: 0; border-bottom: 1px solid #dce9df; }
  .repair-item-selected { min-height: 230px; }
  .repair-item-preview-empty { min-height: 190px; }
}

.quick-schedule-page-head,
.quick-schedule-form {
  width: min(100%, 980px);
  margin-right: auto;
  margin-left: auto;
}

.quick-schedule-form { padding: 22px; }
.quick-schedule-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.quick-schedule-heading > span:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  color: #fff;
  background: #0f6b3c;
  font-size: 21px;
}

.quick-schedule-heading small { color: var(--muted); }
.quick-schedule-heading h2 { margin: 3px 0 0; font-size: 20px; }
.quick-schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
}

.quick-schedule-grid label { min-width: 0; }
.quick-schedule-title,
.quick-schedule-venue,
.quick-schedule-purpose,
.quick-schedule-grid > .span-3 { grid-column: 1 / -1; }
.quick-schedule-purpose textarea { min-height: 160px; resize: vertical; }
.quick-schedule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 620px) {
  .quick-repair-form { padding: 15px; }
  .quick-repair-grid { grid-template-columns: 1fr; gap: 13px; }
  .quick-repair-item,
  .quick-repair-problem { grid-column: 1; }
  .repair-item-picker-layout { min-height: 0; }
  .repair-item-option-list { max-height: 390px; }
  .repair-item-option { grid-template-columns: 52px minmax(0, 1fr); gap: 9px; padding: 10px 9px; }
  .repair-item-option-photo { width: 48px; height: 48px; }
  .repair-item-option-place { grid-column: 2; text-align: left; }
  .repair-item-option-place strong,
  .repair-item-option-place small { display: inline; }
  .repair-item-option-place small::before { content: ' / '; }
  .repair-item-selected { padding: 13px; }
  .repair-item-preview-details > div { grid-template-columns: 86px minmax(0, 1fr); }
  .quick-repair-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .quick-repair-actions .button { width: 100%; }
  .quick-schedule-form { padding: 15px; }
  .quick-schedule-grid { grid-template-columns: 1fr; gap: 13px; }
  .quick-schedule-title,
  .quick-schedule-venue,
  .quick-schedule-purpose,
  .quick-schedule-grid > .span-3 { grid-column: 1; }
  .quick-schedule-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .quick-schedule-actions .button { width: 100%; }
}

@media (max-width: 430px) {
  .repair-item-search-row { grid-template-columns: 1fr; gap: 6px; }
  .repair-item-result-count { white-space: normal; }
  .repair-item-chips { gap: 4px; }
  .repair-item-chip { font-size: 9px; }
}

.work-monitor-panel {
  margin: 0 0 18px;
  padding: 0;
  overflow: hidden;
  border-color: rgba(15, 79, 42, .18);
}

.work-monitor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.work-monitor-head > div:first-child { min-width: 0; }
.work-monitor-head h2 { margin: 2px 0 3px; font-size: 22px; }
.work-monitor-head p { margin: 0; color: var(--muted); }
.work-monitor-eyebrow {
  display: block;
  color: #0f6b3c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.work-monitor-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 20px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: #f8fbf8;
}

.work-monitor-tabs a {
  flex: 0 0 auto;
  padding: 9px 12px 10px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.work-monitor-tabs a:hover,
.work-monitor-tabs a.active {
  border-bottom-color: #0f6b3c;
  color: #084a29;
  text-decoration: none;
}

.work-monitor-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(94px, 1fr));
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.work-monitor-kpis-page {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.work-monitor-kpi {
  display: block;
  min-width: 0;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid #dbe7dd;
  border-left: 4px solid #8ba596;
  border-radius: 7px;
  background: #fff;
}

.work-monitor-kpi.is-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.work-monitor-kpi.is-link:hover,
.work-monitor-kpi.is-link:focus-visible {
  border-color: #80ad91;
  box-shadow: 0 5px 14px rgba(5, 64, 35, .12);
  transform: translateY(-1px);
  text-decoration: none;
}

.work-monitor-kpi.is-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

.work-monitor-kpi.active {
  border-color: #0f6b3c;
  background: #eef8f1;
  box-shadow: inset 0 0 0 1px rgba(15, 107, 60, .12);
}

.work-monitor-kpi span {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.work-monitor-kpi strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 23px;
  line-height: 1;
}

.work-monitor-kpi.info { border-left-color: #2563eb; }
.work-monitor-kpi.warning { border-left-color: #d99b13; }
.work-monitor-kpi.danger { border-left-color: #c53b35; }
.work-monitor-kpi.success { border-left-color: #16844b; }

.work-monitor-focus-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #eef8f1;
  color: #174a2f;
  font-size: 13px;
}

.work-monitor-focus-summary a {
  color: #0f6b3c;
  font-weight: 700;
}

.work-monitor-compact-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(520px, 1.2fr);
  gap: 16px;
  align-items: end;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #f6faf7;
}

.work-monitor-compact-summary strong,
.work-monitor-compact-summary span {
  display: block;
}

.work-monitor-compact-summary strong {
  margin-bottom: 3px;
  color: #0b5d34;
  font-size: 13px;
}

.work-monitor-compact-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.work-monitor-employee-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.work-monitor-employee-picker label { min-width: 0; }
.work-monitor-employee-picker label > span {
  display: block;
  margin-bottom: 4px;
  color: #43564b;
  font-size: 11px;
  font-weight: 700;
}

.work-monitor-employee-picker select {
  width: 100%;
  min-width: 0;
}

.work-monitor-employee-picker .button { white-space: nowrap; }

.work-monitor-table-wrap { overflow-x: auto; }
.work-monitor-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.work-monitor-table th,
.work-monitor-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: left;
}

.work-monitor-table th {
  color: #53615a;
  background: #fbfdfb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.work-monitor-table th:nth-child(1) { width: 16%; }
.work-monitor-table th:nth-child(2) { width: 38%; }
.work-monitor-table th:nth-child(3) { width: 10%; }
.work-monitor-table th:nth-child(4) { width: 17%; }
.work-monitor-table th:nth-child(5) { width: 9%; }
.work-monitor-table th:nth-child(6) { width: 10%; }
.work-monitor-table tbody tr:last-child td { border-bottom: 0; }
.work-monitor-table td > small,
.work-task-list td > small { display: block; margin-top: 4px; color: var(--muted); }

.work-employee {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.work-employee > span:last-child { min-width: 0; }
.work-employee-link { color: inherit; text-decoration: none; }
.work-employee-link:hover strong { color: #0f6b3c; text-decoration: underline; }
.work-employee strong,
.work-employee small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-avatar {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: #e3f3e8;
  color: #0b5d34;
  font-size: 12px;
  font-weight: 800;
}

.user-profile-picture-field { align-self: stretch; }
.user-profile-picture-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfdfb;
}

.user-profile-picture-preview[hidden] { display: none; }

.user-profile-picture-preview > img {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 7px;
  object-fit: cover;
}

.user-profile-picture-preview strong,
.user-profile-picture-preview small { display: block; }
.user-profile-picture-preview small { margin: 3px 0 5px; color: var(--muted); }

body.profile-cropper-open { overflow: hidden; }
.profile-cropper-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(7, 18, 12, .72);
}

.profile-cropper-overlay[hidden] { display: none; }
.profile-cropper-dialog {
  width: min(100%, 590px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid #cadace;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .3);
}

.profile-cropper-head,
.profile-cropper-actions,
.profile-cropper-tool-row,
.profile-cropper-zoom {
  display: flex;
  align-items: center;
}

.profile-cropper-head { justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.profile-cropper-head h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.profile-cropper-stage {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #dfe8e1;
  touch-action: none;
}

.profile-cropper-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.profile-cropper-canvas.is-dragging { cursor: grabbing; }
.profile-cropper-guide {
  position: absolute;
  inset: 8%;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(4, 12, 8, .34);
}

.profile-cropper-tool-row { justify-content: space-between; gap: 12px; margin-top: 13px; }
.profile-cropper-tools { display: flex; gap: 7px; }
.profile-cropper-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fbf8;
  color: var(--green);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.profile-cropper-icon-button:hover { background: #eaf4ec; }
.profile-cropper-zoom { flex: 1 1 auto; justify-content: flex-end; gap: 8px; min-width: 180px; }
.profile-cropper-zoom label { flex: 0 0 auto; margin: 0; font-size: 11px; font-weight: 650; }
.profile-cropper-zoom input { width: min(220px, 38vw); margin: 0; accent-color: #16844b; }
.profile-cropper-actions { justify-content: flex-end; gap: 8px; margin-top: 14px; }
.profile-cropper-error { margin: 10px 0 0; color: #b72f2a; font-size: 12px; }
html[data-theme="dark"] .profile-cropper-dialog { border-color: #315c43; background: #102418; }
html[data-theme="dark"] .profile-cropper-icon-button { border-color: #315c43; background: #172d20; color: #8df0ad; }

@media (max-width: 600px) {
  .profile-cropper-overlay { align-items: end; padding: 8px; }
  .profile-cropper-dialog { max-height: calc(100vh - 16px); padding: 12px; }
  .profile-cropper-head h2 { font-size: 16px; }
  .profile-cropper-tool-row { align-items: flex-start; flex-direction: column; }
  .profile-cropper-zoom { width: 100%; justify-content: stretch; }
  .profile-cropper-zoom input { flex: 1 1 auto; width: auto; }
}
.user-account-profile { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-account-profile > span:last-child { min-width: 0; }
.user-account-avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #e3f3e8;
  color: #0b5d34;
  font-size: 11px;
  font-weight: 800;
}

.work-task-link { display: block; color: inherit; text-decoration: none; }
.work-task-link:hover strong { color: #0f6b3c; text-decoration: underline; }
.work-task-link small { display: block; margin-top: 4px; color: var(--muted); }
.work-latest-progress { display: grid; gap: 8px; min-width: 0; }
.work-latest-progress-head { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.work-latest-progress-head .work-task-link { flex: 1 1 auto; min-width: 0; }
.work-latest-progress-head .work-task-link strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-latest-progress-head .badge { flex: 0 0 auto; }
.work-progress-dashboard { min-width: 0; }
.work-progress-dashboard > span { height: 8px; }
.work-progress-dashboard small { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; }
.work-progress-dashboard time { color: #66736c; text-align: right; }
.work-latest-progress-update { padding-top: 7px; border-top: 1px solid var(--border); }
.work-latest-progress-update > span,
.work-next-step > span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.work-latest-progress-update p,
.work-next-step p { margin: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }
.work-latest-progress-update p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.work-next-step.is-blocked > span { color: #b72f2a; }
.work-no-task { color: var(--muted); font-style: italic; }
.work-capacity-note { display: block; margin-top: 5px; color: var(--muted); }
.work-monitor-empty { padding: 28px 16px !important; text-align: center !important; }
.work-monitor-empty .button { margin-top: 12px; }
.work-line-clamp {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.35;
}

.work-progress { min-width: 105px; }
.work-progress > span {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 5px;
  background: #dfe9e1;
}

.work-progress > span i {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: #16844b;
}

.work-progress small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.work-progress-large { margin-top: 18px; }
.work-progress-large > span { height: 10px; }
.work-progress-large strong { display: block; margin-top: 7px; font-size: 13px; }
.work-monitor-filters { margin-bottom: 16px; }
.work-task-list .work-progress { max-width: 180px; }
.work-task-editor { margin-bottom: 18px; }
.work-task-detail-grid { align-items: start; }

.work-task-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.work-task-summary-grid > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfdfb;
}

.work-task-summary-grid .span-2 { grid-column: span 2; }
.work-task-summary-grid small { display: block; margin-bottom: 4px; color: var(--muted); }
.work-task-summary-grid strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }

.work-update-details { display: grid; gap: 9px; margin: 18px 0 0; }
.work-update-details > div { padding-top: 9px; border-top: 1px solid var(--border); }
.work-update-details dt { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.work-update-details dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.work-progress-form h2 { margin-bottom: 3px; }
.work-history-card { margin-top: 18px; }
.work-history { display: grid; margin-top: 16px; }
.work-history article {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  padding-bottom: 18px;
}

.work-history article::before {
  position: absolute;
  top: 12px;
  bottom: -2px;
  left: 5px;
  width: 2px;
  background: #d9e6dc;
  content: "";
}

.work-history article:last-child::before { display: none; }
.work-history-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border: 3px solid #d8efdf;
  border-radius: 50%;
  background: #16844b;
}

.work-history-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.work-history-head time { margin-left: auto; color: var(--muted); font-size: 11px; }
.work-history p { margin: 5px 0; }
.work-history small { display: block; margin-top: 3px; color: var(--muted); }

.work-employee-form { max-width: 980px; }
.work-employee-identity-editor {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.work-avatar-editor {
  width: 84px;
  height: 84px;
  font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(15, 107, 60, .12);
}

.work-employee-profile-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.work-employee-profile-control > small,
.work-employee-profile-control > strong,
.work-employee-profile-control > .help { flex: 0 0 100%; }
.work-employee-profile-control > small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.work-employee-profile-control > strong { font-size: 15px; }
.work-employee-profile-control [hidden] { display: none !important; }
.work-employee-photo-upload {
  display: inline-flex;
  width: auto;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--green);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.work-employee-photo-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.work-employee-profile {
  display: grid;
  grid-template-columns: 64px minmax(220px, 1fr) minmax(360px, 1.3fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.work-avatar-large {
  width: 64px;
  height: 64px;
  font-size: 18px;
}

.work-employee-profile-main { min-width: 0; }
.work-employee-profile-main h2 { margin: 7px 0 2px; font-size: 21px; }
.work-employee-profile-main p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.work-employee-profile dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.work-employee-profile dl > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfdfb;
}

.work-employee-profile dt { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.work-employee-profile dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }

.hr-employee-record-head h1 { margin: 7px 0 3px; }
.hr-employee-record-profile { border-left: 4px solid #16844b; }
.hr-employee-record-profile .work-employee-profile-main > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hr-employee-record-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.hr-employee-record-tabs a { flex: 0 0 auto; white-space: nowrap; }
.hr-employee-record-grid { align-items: stretch; margin-bottom: 18px; }
.hr-employee-record-grid > .card { margin: 0; }
.hr-employee-bio { margin: 16px 0 0; color: var(--text); line-height: 1.65; white-space: normal; }
.hr-employee-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 16px 0 0;
}
.hr-employee-facts > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f9fcfa;
}
.hr-employee-facts dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.hr-employee-facts dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.hr-employee-facts-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hr-employee-employment .form-grid { margin-top: 16px; }
.hr-employee-status-nav { margin: 14px 0; }
.hr-employee-status-nav a { display: inline-flex; align-items: center; gap: 7px; }
.hr-employee-status-nav a span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(18, 90, 49, .09);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.hr-employee-status-nav a.active span { background: rgba(255, 255, 255, .2); }
.hr-employee-row-archived { background: #fffafa; }
.hr-employee-row-archived > td:first-child { border-left: 3px solid #b63a3a; }
.hr-employee-archive-note { margin-bottom: 18px; }
.hr-employee-archive-card { margin-top: 18px; border-left: 4px solid #b63a3a; }
.hr-employee-archive-card .form-grid { margin-top: 16px; }
.hr-employee-attendance-filters { grid-template-columns: repeat(2, minmax(150px, 220px)) auto; justify-content: start; }
.hr-attendance-report-center .card-head,
.hr-employee-attendance-summary .card-head,
.hr-employee-attendance-raw .card-head { align-items: flex-start; }
.hr-attendance-report-center .card-head .actions,
.hr-employee-attendance-summary .card-head .actions { justify-content: flex-end; }
.hr-attendance-report-center .hr-attendance-filters {
  grid-template-columns: repeat(4, minmax(145px, 1fr)) auto;
  align-items: end;
}
.hr-attendance-scope-note { margin: 14px 0; }
.hr-attendance-scope-note strong,
.hr-attendance-scope-note span { display: block; }
.hr-attendance-scope-note span { margin-top: 3px; }
.hr-attendance-daily-table table { min-width: 1120px; }
.hr-attendance-daily-table th,
.hr-attendance-daily-table td { vertical-align: top; white-space: nowrap; }
.hr-attendance-daily-table td:nth-child(2),
.hr-attendance-daily-table td:last-child { white-space: normal; }
.hr-employee-attendance-summary { border-left: 4px solid #16844b; }
.hr-employee-attendance-raw { margin-top: 18px; }
.hr-attendance-print-page { min-width: 0; background: #eef4ef; color: #17261e; }
.hr-attendance-print-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 24px auto;
  padding: 28px;
  border: 1px solid #cad8ce;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(26, 78, 45, .12);
}
.hr-attendance-print-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 18px; }
.hr-attendance-print-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #176f42;
}
.hr-attendance-print-header img { width: 68px; height: 68px; object-fit: contain; }
.hr-attendance-print-header strong { color: #174a2f; font-size: 13px; }
.hr-attendance-print-header h1 { margin: 4px 0; font-size: 22px; }
.hr-attendance-print-header p { margin: 0; color: #5f6f65; }
.hr-attendance-print-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 15px 0; }
.hr-attendance-print-meta span { padding: 8px 10px; border: 1px solid #d5e0d7; border-radius: 5px; font-size: 11px; }
.hr-attendance-print-shell table { width: 100%; border-collapse: collapse; font-size: 10px; }
.hr-attendance-print-shell th,
.hr-attendance-print-shell td { padding: 6px; border: 1px solid #cfd8d1; vertical-align: top; text-align: left; }
.hr-attendance-print-shell th { background: #e8f3eb; color: #174a2f; }
.hr-attendance-print-shell footer { margin-top: 14px; color: #66766c; font-size: 10px; text-align: center; }
.hr-employee-document-upload {
  margin: 16px 0 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fcf9;
}
.hr-credential-list { display: grid; gap: 9px; margin-top: 16px; }
.hr-credential-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f9fcfa;
}
.hr-credential-list span:first-child { min-width: 0; }
.hr-credential-list strong,
.hr-credential-list small { display: block; overflow-wrap: anywhere; }
.hr-credential-list small { margin-top: 3px; color: var(--muted); }

.work-report-filters { margin-bottom: 18px; }
.work-report-paper { padding: 28px; }
.work-report-header {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 2px solid #0f6b3c;
  text-align: center;
}

.work-report-header img { width: 68px; height: 68px; object-fit: contain; }
.work-report-header strong,
.work-report-header span { display: block; }
.work-report-header h1 { margin: 5px 0 0; font-size: 21px; }
.work-report-header span { color: var(--muted); font-size: 12px; }
.work-report-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.work-report-meta > div,
.work-report-summary > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
}

.work-report-meta span,
.work-report-summary span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.work-report-meta strong { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: 12px; }
.work-report-summary { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 10px; }
.work-report-summary > div { text-align: center; }
.work-report-summary strong { display: block; margin-top: 3px; font-size: 20px; }
.work-report-table { width: 100%; margin-top: 16px; border-collapse: collapse; table-layout: fixed; }
.work-report-table th,
.work-report-table td { padding: 8px; border: 1px solid #cfd8d1; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.work-report-table th { background: #edf6ef; color: #174a2f; font-size: 10px; }
.work-report-table td { font-size: 11px; }
.work-report-table td strong,
.work-report-table td small { display: block; }
.work-report-table td small { margin-top: 4px; color: var(--muted); }
.work-report-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 45px; text-align: center; }
.work-report-signatures span { display: block; margin-bottom: 24px; color: var(--muted); font-size: 10px; }
.work-report-signatures strong { display: block; padding-top: 6px; border-top: 1px solid #555; font-size: 11px; }

html[data-theme="dark"] .work-monitor-tabs,
html[data-theme="dark"] .work-monitor-table th,
html[data-theme="dark"] .work-task-summary-grid > div,
html[data-theme="dark"] .work-employee-profile dl > div { background: #17231c; }
html[data-theme="dark"] .work-monitor-kpis,
html[data-theme="dark"] .work-monitor-kpi { background: #101b15; }
html[data-theme="dark"] .work-monitor-kpi.active,
html[data-theme="dark"] .work-monitor-focus-summary { background: #173524; color: #d9f8e4; }
html[data-theme="dark"] .work-monitor-kpi strong { color: #f1f7f3; }
html[data-theme="dark"] .work-monitor-compact-toolbar { background: #132019; }
html[data-theme="dark"] .work-employee-photo-upload { border-color: #315c43; background: #102418; color: #8df0ad; }
html[data-theme="dark"] .hr-employee-facts > div,
html[data-theme="dark"] .hr-credential-list > div,
html[data-theme="dark"] .hr-employee-document-upload { background: #15231b; }

@media (max-width: 1180px) {
  .work-monitor-kpis { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
  .work-monitor-compact-toolbar { grid-template-columns: 1fr; }
  .work-report-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-employee-profile { grid-template-columns: 64px minmax(0, 1fr); }
  .work-employee-profile dl { grid-column: 1 / -1; }
  .hr-employee-facts-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-attendance-report-center .hr-attendance-filters { grid-template-columns: repeat(2, minmax(150px, 1fr)) auto; }
  .hr-attendance-print-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .work-monitor-head { flex-direction: column; padding: 15px; }
  .work-monitor-head .actions { width: 100%; }
  .work-monitor-head .actions .button { flex: 1 1 auto; }
  .work-monitor-tabs { padding-left: 10px; padding-right: 10px; }
  .work-monitor-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .work-monitor-kpi { min-height: 62px; }
  .work-monitor-kpi strong { font-size: 20px; }
  .work-monitor-compact-toolbar { padding: 12px; }
  .work-monitor-employee-picker { grid-template-columns: 1fr 1fr; }
  .work-monitor-employee-picker label { grid-column: 1 / -1; }
  .work-monitor-employee-picker .button { width: 100%; }
  .work-monitor-table { min-width: 0; table-layout: auto; }
  .work-monitor-table thead { display: none; }
  .work-monitor-table tbody { display: grid; gap: 10px; padding: 10px; background: #f4f8f5; }
  .work-monitor-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
  }
  .work-monitor-table td,
  .work-monitor-table td[colspan] {
    display: block;
    grid-column: auto;
    min-width: 0;
    padding: 10px;
    border-bottom: 1px solid var(--border);
  }
  .work-monitor-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
  }
  .work-monitor-table td:first-child,
  .work-monitor-table td:nth-child(2) { grid-column: 1 / -1; }
  .work-monitor-table td:last-child { border-bottom: 0; }
  .work-task-detail-grid { grid-template-columns: 1fr; }
  .work-employee-identity-editor { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .work-avatar-editor { width: 64px; height: 64px; font-size: 17px; }
  .work-employee-profile { grid-template-columns: 52px minmax(0, 1fr); padding: 15px; }
  .work-avatar-large { width: 52px; height: 52px; font-size: 15px; }
  .work-employee-profile dl { grid-template-columns: 1fr; }
  .hr-employee-record-tabs { margin-right: -14px; padding-right: 14px; }
  .hr-employee-facts,
  .hr-employee-facts-wide { grid-template-columns: 1fr; }
  .hr-employee-attendance-filters { grid-template-columns: 1fr; }
  .hr-attendance-report-center .card-head .actions,
  .hr-employee-attendance-summary .card-head .actions { width: 100%; justify-content: flex-start; }
  .hr-attendance-report-center .card-head .actions .button,
  .hr-employee-attendance-summary .card-head .actions .button { flex: 1 1 140px; }
  .hr-attendance-report-center .hr-attendance-filters { grid-template-columns: 1fr; }
  .hr-attendance-print-shell { width: calc(100% - 16px); margin: 8px auto; padding: 14px; }
  .hr-attendance-print-header { grid-template-columns: 52px minmax(0, 1fr); }
  .hr-attendance-print-header img { width: 50px; height: 50px; }
  .hr-attendance-print-header h1 { font-size: 17px; }
  .hr-attendance-print-meta { grid-template-columns: 1fr; }
  .hr-employee-document-upload { padding: 12px; }
  .work-report-paper { padding: 16px; }
  .work-report-header { grid-template-columns: 52px minmax(0, 1fr); text-align: left; }
  .work-report-header img { width: 50px; height: 50px; }
  .work-report-header h1 { font-size: 16px; }
  .work-report-summary { grid-template-columns: repeat(3, 1fr); }
  .work-report-table { display: block; overflow-x: auto; white-space: normal; }
  .work-report-table thead,
  .work-report-table tbody { min-width: 800px; }
  .work-report-signatures { grid-template-columns: 1fr; gap: 22px; }
}

/* Permission-aware SJS Operations Hub and module switcher. */
.page-operations-hub .app,
html[data-sidebar="collapsed"] .page-operations-hub .app {
  grid-template-columns: minmax(0, 1fr);
}

.page-operations-hub .sidebar,
.page-operations-hub .sidebar-backdrop {
  display: none !important;
}

.page-operations-hub .content {
  min-width: 0;
  background: #f3f8f4;
}

.page-operations-hub .main {
  width: min(1440px, 100%);
  max-width: none;
  min-height: calc(100vh - var(--app-header-height));
  padding: 42px clamp(24px, 5vw, 76px) 56px;
}

.topbar-hub-brand {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}

.topbar-hub-brand:hover { color: #fff; text-decoration: none; }
.topbar-hub-brand img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.18)); }
.topbar-hub-brand span { min-width: 0; display: grid; gap: 3px; }
.topbar-hub-brand strong,
.topbar-hub-brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-hub-brand strong { font-size: 15px; line-height: 1.1; }
.topbar-hub-brand small { color: #d7f0df; font-size: 10px; font-weight: 600; }

.topbar-app-launcher-wrap { position: relative; flex: 0 0 auto; }
.topbar-app-launcher { color: #174b2d; background: #edf3ee; border-color: rgba(15,79,42,.12); box-shadow: 0 6px 16px rgba(15,79,42,.10); }
.topbar-app-launcher svg { fill: currentColor; stroke: none; }
.topbar-app-launcher-wrap.is-open .topbar-app-launcher,
.topbar-app-launcher[aria-expanded="true"] { color: #fff; background: #0d7443; border-color: #0d7443; }

.topbar-app-launcher-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 125;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - var(--app-header-height) - 24px);
  overflow: auto;
  padding: 12px;
  border: 1px solid #c8d9cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 52px rgba(10, 53, 31, .22);
}
.topbar-app-launcher-panel[hidden] { display: none !important; }
.topbar-app-launcher-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 10px; border-bottom: 1px solid #e0ebe2; }
.topbar-app-launcher-head > span { min-width: 0; display: grid; gap: 2px; }
.topbar-app-launcher-head strong { color: #143d28; font-size: 13px; line-height: 1.1; }
.topbar-app-launcher-head small { color: #6a7b70; font-size: 9px; font-weight: 700; }
.topbar-app-launcher-head-actions { display: flex; align-items: center; gap: 2px; }
.topbar-app-launcher-home { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 50%; color: #587064; background: transparent; }
.topbar-app-launcher-home:hover,
.topbar-app-launcher-home:focus-visible { border-color: #c8d9cc; color: #117546; background: #f3f8f4; outline: none; }
.topbar-app-launcher-home svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar-app-launcher-close { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid transparent; border-radius: 50%; color: #587064; background: transparent; cursor: pointer; }
.topbar-app-launcher-close:hover,
.topbar-app-launcher-close:focus-visible { border-color: #c8d9cc; color: #a52c29; background: #f3f8f4; outline: none; }
.topbar-app-launcher-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.topbar-app-launcher-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-top: 10px; }
.topbar-app-module {
  --module-color: #0b9b58;
  position: relative;
  min-width: 0;
  min-height: 104px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 10px 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #173629;
  text-align: center;
  text-decoration: none;
}
.topbar-app-module:hover,
.topbar-app-module:focus-visible { border-color: #cfdfd2; color: #173629; background: #f2f8f3; text-decoration: none; outline: none; }
.topbar-app-module-icon { position: relative; width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.55); border-radius: 7px; color: #fff; background: var(--module-color); box-shadow: 0 8px 17px color-mix(in srgb, var(--module-color) 24%, transparent); }
.topbar-app-module-icon::after { content: ""; position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 7px; background: rgba(255,255,255,.20); transform: rotate(12deg); }
.topbar-app-module-icon strong { position: relative; z-index: 1; font-size: 14px; font-weight: 900; letter-spacing: 0; text-shadow: 0 2px 3px rgba(0,0,0,.14); }
.topbar-app-module-name { max-width: 100%; overflow-wrap: anywhere; color: inherit; font-size: 10px; line-height: 1.15; }
.topbar-app-module-status { position: absolute; top: 13px; left: calc(50% + 19px); z-index: 2; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.topbar-app-module-status.active { background: #24a865; }
.topbar-app-module-status.planned { background: #d89d31; }
.topbar-app-module.tone-gso { --module-color: #0b9b58; }
.topbar-app-module.tone-finance { --module-color: #2c9ed2; }
.topbar-app-module.tone-hr { --module-color: #d95b86; }
.topbar-app-module.tone-students { --module-color: #8d62d7; }
.topbar-app-module.tone-clinic { --module-color: #eb625a; }
.topbar-app-module.tone-guidance { --module-color: #e59b0c; }
.topbar-app-module.tone-registrar { --module-color: #5372a8; }
.topbar-app-module.tone-it { --module-color: #15968d; }

html[data-theme="dark"] .topbar-app-launcher-panel { border-color: #315c43; background: #0b1d13; box-shadow: 0 24px 56px rgba(0,0,0,.46); }
html[data-theme="dark"] .topbar-app-launcher-head { border-bottom-color: #244332; }
html[data-theme="dark"] .topbar-app-launcher-head strong,
html[data-theme="dark"] .topbar-app-module-name { color: #effaf2; }
html[data-theme="dark"] .topbar-app-launcher-head small { color: #a9baaf; }
html[data-theme="dark"] .topbar-app-module:hover,
html[data-theme="dark"] .topbar-app-module:focus-visible { border-color: #315c43; color: #effaf2; background: #12291b; }
html[data-theme="dark"] .topbar-app-module-status { border-color: #0b1d13; }
html[data-theme="dark"] .topbar-app-launcher-close { color: #b8c9be; }
html[data-theme="dark"] .topbar-app-launcher-home { color: #b8c9be; }
html[data-theme="dark"] .topbar-app-launcher-home:hover,
html[data-theme="dark"] .topbar-app-launcher-home:focus-visible { border-color: #315c43; color: #86efac; background: #12291b; }
html[data-theme="dark"] .topbar-app-launcher-close:hover,
html[data-theme="dark"] .topbar-app-launcher-close:focus-visible { border-color: #315c43; color: #fca5a5; background: #12291b; }

@media (max-width: 760px) {
  .registration-public-card { width: min(100%, calc(100vw - 20px)); padding: 22px 16px; }
  .registration-choice-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
  .registration-choice { min-height: 94px; padding: 12px; }
  .registration-choice-code { width: 50px; height: 50px; }
  .registration-student-form .form-grid { grid-template-columns: 1fr; }
  .registration-student-form .span-2,
  .registration-student-form .span-3 { grid-column: auto; }
  .registrar-registration-decisions,
  .registration-reject-form { grid-template-columns: 1fr; }
  .registrar-registration-decisions .button,
  .registration-reject-form .button { width: 100%; }
}

.operations-hub { width: 100%; }
.operations-hub-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.operations-hub-title { min-width: 0; }
.operations-hub-title > span { display: block; margin-bottom: 5px; color: #5e6e63; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.operations-hub-title h1 { margin: 0; color: #06391f; font-size: 38px; line-height: 1.05; letter-spacing: 0; }
.operations-hub-title p { margin: 9px 0 0; color: #607268; font-size: 14px; }

.operations-access-profile {
  min-width: 280px;
  max-width: 390px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid #bdd2c2;
  border-left: 4px solid #c9342f;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(18,76,45,.08);
}
.operations-access-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: #087c47; font-size: 17px; font-weight: 900; }
.operations-access-profile > span:last-child { min-width: 0; display: grid; gap: 2px; }
.operations-access-profile small { color: #697a70; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.operations-access-profile strong,
.operations-access-profile em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operations-access-profile strong { color: #163c28; font-size: 12px; }
.operations-access-profile em { color: #627268; font-size: 10px; font-style: normal; }

.operations-module-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: clamp(18px, 3vw, 38px); }
.operations-module-card {
  --module-color: #0f9f5a;
  position: relative;
  min-width: 0;
  min-height: 188px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px 12px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #173629;
  background: transparent;
  text-align: center;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.operations-module-card:hover,
.operations-module-card:focus-visible { border-color: #ccdcd0; background: #fff; color: #173629; text-decoration: none; box-shadow: 0 14px 30px rgba(19,72,43,.10); transform: translateY(-3px); outline: none; }
.operations-module-icon { position: relative; width: 78px; height: 78px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.56); border-radius: 8px; color: #fff; background: var(--module-color); box-shadow: 0 12px 24px color-mix(in srgb, var(--module-color) 28%, transparent); }
.operations-module-icon::after { content: ""; position: absolute; top: -14px; right: -13px; width: 44px; height: 44px; border-radius: 8px; background: rgba(255,255,255,.20); transform: rotate(12deg); }
.operations-module-icon strong { position: relative; z-index: 1; font-size: 20px; font-weight: 900; letter-spacing: 0; text-shadow: 0 2px 3px rgba(0,0,0,.16); }
.operations-module-name { max-width: 100%; overflow-wrap: anywhere; color: #173629; font-size: 14px; line-height: 1.15; }
.operations-module-card small { max-width: 205px; color: #687a70; font-size: 10px; line-height: 1.3; }
.operations-module-badge { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border: 1px solid transparent; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .035em; line-height: 1; text-transform: uppercase; }
.operations-module-badge.status-available { border-color: #b8dfc8; background: #e8f7ee; color: #12663d; }
.operations-module-badge.status-planned { border-color: #ecd09a; background: #fff7e5; color: #855d0c; }
.operations-module-badge.status-separate { border-color: #c9d7eb; background: #edf4fc; color: #345d8d; }
.operations-module-external { display: inline-block; margin-left: 5px; color: #345d8d; font-size: .82em; transform: translateY(-1px); }
.operations-module-card.is-external { border-style: dashed; }
.operations-module-card.tone-gso { --module-color: #0b9b58; }
.operations-module-card.tone-finance { --module-color: #2c9ed2; }
.operations-module-card.tone-hr { --module-color: #d95b86; }
.operations-module-card.tone-students { --module-color: #8d62d7; }
.operations-module-card.tone-clinic { --module-color: #eb625a; }
.operations-module-card.tone-guidance { --module-color: #e59b0c; }
.operations-module-card.tone-registrar { --module-color: #5372a8; }
.operations-module-card.tone-it { --module-color: #15968d; }

.operations-hub-legend { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 25px; color: #67796f; font-size: 10px; }
.operations-hub-legend span { display: inline-flex; align-items: center; gap: 7px; }
.operations-hub-legend i { width: 9px; height: 9px; border-radius: 50%; }
.operations-hub-legend i.available { background: #24a865; }
.operations-hub-legend i.planned { background: #d89d31; }
.operations-hub-legend i.separate { background: #4f78a8; }
.operations-hub-empty { max-width: 680px; margin: 70px auto 0; text-align: center; }

html[data-theme="dark"] .page-operations-hub .content { background: #07170e; }
html[data-theme="dark"] .operations-hub-title h1,
html[data-theme="dark"] .operations-module-name { color: #effaf2; }
html[data-theme="dark"] .operations-hub-title > span,
html[data-theme="dark"] .operations-hub-title p,
html[data-theme="dark"] .operations-module-card small,
html[data-theme="dark"] .operations-hub-legend { color: #a9baaf; }
html[data-theme="dark"] .operations-access-profile,
html[data-theme="dark"] .operations-module-card:hover,
html[data-theme="dark"] .operations-module-card:focus-visible { border-color: #315c43; background: #0f2017; }
html[data-theme="dark"] .operations-access-profile strong { color: #e5f5e9; }
html[data-theme="dark"] .operations-access-profile small,
html[data-theme="dark"] .operations-access-profile em { color: #a9baaf; }
html[data-theme="dark"] .operations-module-badge.status-available { border-color: #315f43; background: #102d1d; color: #9fe0b9; }
html[data-theme="dark"] .operations-module-badge.status-planned { border-color: #694f20; background: #30240e; color: #f2cf84; }
html[data-theme="dark"] .operations-module-badge.status-separate { border-color: #365270; background: #142638; color: #a9c9ee; }

@media (max-width: 1100px) {
  .operations-module-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 760px) {
  .topbar-app-launcher-panel { position: fixed; top: calc(var(--app-header-height) + 8px); right: 8px; left: 8px; width: auto; max-height: calc(100vh - var(--app-header-height) - 16px); max-height: calc(100dvh - var(--app-header-height) - 16px); padding: 10px; }
  .topbar-app-launcher-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .topbar-app-module { min-height: 96px; padding: 9px 4px 7px; }
  .topbar-app-module-icon { width: 48px; height: 48px; }
  .topbar-app-module-name { font-size: 9px; }
  .topbar-app-module-status { top: 11px; left: calc(50% + 18px); }
  .page-operations-hub .main { padding: 24px 14px 42px; }
  .page-operations-hub .topbar { padding-left: 12px; padding-right: 10px; }
  .topbar-hub-brand { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; }
  .topbar-hub-brand img { width: 38px; height: 38px; }
  .topbar-hub-brand strong { font-size: 12px; }
  .topbar-hub-brand small { font-size: 8px; }
  .operations-hub-heading { align-items: stretch; flex-direction: column; gap: 15px; margin-bottom: 20px; }
  .operations-hub-title h1 { font-size: 29px; }
  .operations-hub-title p { font-size: 12px; line-height: 1.4; }
  .operations-access-profile { min-width: 0; max-width: none; }
  .operations-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .operations-module-card { min-height: 154px; gap: 7px; padding: 14px 6px 12px; }
  .operations-module-icon { width: 60px; height: 60px; }
  .operations-module-icon strong { font-size: 16px; }
  .operations-module-name { font-size: 13px; }
  .operations-module-card small { font-size: 9px; }
  .operations-module-badge { top: 7px; right: 7px; min-height: 19px; padding: 2px 5px; font-size: 7px; }
  .operations-hub-legend { flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; }
}

@media (max-width: 430px) {
  .page-operations-hub .topbar-account { display: flex; }
  .page-operations-hub .topbar-account-text { display: none; }
  .page-operations-hub .topbar-communication .chat-float-button,
  .page-operations-hub .topbar-communication .notification-float-button { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
  .topbar-hub-brand strong { max-width: 150px; }
  .topbar-hub-brand small { display: none; }
  .operations-hub-title h1 { font-size: 26px; }
  .operations-module-card { min-height: 146px; }
  .operations-module-card small { max-width: 140px; }
}

@media (max-width: 360px) {
  .topbar-app-launcher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Sticky topbar communication controls, modeled after compact social app actions. */
.topbar {
  z-index: 70;
}

.topbar-actions {
  position: relative;
}

.topbar-communication {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.topbar-communication-mount {
  display: contents;
}

.topbar-communication .chat-center,
.topbar-communication .notification-center {
  position: static;
  inset: auto;
  z-index: auto;
}

.topbar-communication .chat-float-button,
.topbar-communication .notification-float-button {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  grid-template-rows: 1fr;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(15, 79, 42, .12);
  border-radius: 999px;
  background: #edf3ee;
  color: #174b2d;
  box-shadow: 0 6px 16px rgba(15, 79, 42, .10);
  transform: none;
}

.topbar-communication .chat-float-button::before,
.topbar-communication .chat-float-button::after,
.topbar-communication .notification-float-button::before,
.topbar-communication .notification-float-button::after {
  display: none;
}

.topbar-communication .chat-float-button:hover,
.topbar-communication .notification-float-button:hover,
.topbar-communication .chat-float-button[aria-expanded="true"],
.topbar-communication .notification-float-button[aria-expanded="true"] {
  border-color: rgba(15, 107, 60, .24);
  background: #dceee1;
  color: #0f6b3c;
  box-shadow: 0 9px 22px rgba(15, 79, 42, .16);
  transform: translateY(-1px);
  filter: none;
}

.topbar-communication .notification-center.urgent .notification-float-button {
  border-color: rgba(201, 52, 47, .20);
  background: #fce8e7;
  color: #a72521;
}

.topbar-communication .notification-icon,
.topbar-communication .chat-float-icon {
  width: 28px;
  height: 28px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topbar-communication .notification-icon svg,
.topbar-communication .chat-float-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.15;
}

.topbar-communication .chat-float-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar-communication .notification-badge,
.topbar-communication .chat-badge {
  top: -5px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  background: #d92d2a;
  color: #fff;
  font-size: 9px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(127, 29, 29, .26);
}

.topbar-communication .notification-badge[hidden],
.topbar-communication .chat-badge[hidden] {
  display: none !important;
}

.topbar-communication .notification-center.has-alerts .notification-icon::after,
.topbar-communication .chat-center.has-unread .chat-float-icon::after {
  display: none;
}

.topbar-communication .notification-panel,
.topbar-communication .chat-panel {
  top: calc(100% + 10px);
  right: 0;
  bottom: auto;
  z-index: 90;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 45, 28, .24);
}

.topbar-communication .notification-panel {
  width: min(420px, calc(100vw - 24px));
  max-height: min(620px, calc(100dvh - var(--app-header-height) - 20px));
}

.topbar-communication .chat-panel {
  width: min(720px, calc(100vw - 24px));
  height: min(560px, calc(100dvh - var(--app-header-height) - 20px));
}

.back-to-top {
  bottom: 22px;
}

html[data-theme="dark"] .topbar-communication .chat-float-button,
html[data-theme="dark"] .topbar-communication .notification-float-button {
  border-color: #315c43;
  background: #173322;
  color: #dff6e6;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .topbar-communication .chat-float-button:hover,
html[data-theme="dark"] .topbar-communication .notification-float-button:hover,
html[data-theme="dark"] .topbar-communication .chat-float-button[aria-expanded="true"],
html[data-theme="dark"] .topbar-communication .notification-float-button[aria-expanded="true"] {
  border-color: #4f8f65;
  background: #214a30;
  color: #fff;
}

html[data-theme="dark"] .topbar-communication .notification-badge,
html[data-theme="dark"] .topbar-communication .chat-badge {
  border-color: #0b2115;
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 10px;
  }

  .topbar-left {
    flex: 1 1 0;
    overflow: hidden;
  }

  .topbar-title-button {
    width: auto;
    max-width: none;
    padding: 6px 8px;
    font-size: 13px;
  }

  .topbar-actions,
  .topbar-communication {
    gap: 5px;
  }

  .topbar-clock {
    display: none;
  }

  .topbar-communication .chat-float-button,
  .topbar-communication .notification-float-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .topbar-communication .notification-icon,
  .topbar-communication .chat-float-icon {
    width: 25px;
    height: 25px;
  }

  .topbar-communication .notification-icon svg,
  .topbar-communication .chat-float-icon svg {
    width: 20px;
    height: 20px;
  }

  .topbar-communication .notification-panel,
  .topbar-communication .chat-panel {
    top: calc(100% + 8px);
    right: 0;
    width: calc(100vw - 20px);
    max-width: none;
    border-radius: 12px;
  }

  .topbar-communication .notification-panel {
    max-height: calc(100dvh - var(--app-header-height) - 18px);
  }

  .topbar-communication .chat-panel {
    height: calc(100dvh - var(--app-header-height) - 18px);
    max-height: none;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding: 0 8px;
  }

  .topbar-left {
    gap: 6px;
  }

  .sidebar-toggle,
  .topbar-communication .chat-float-button,
  .topbar-communication .notification-float-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .topbar-title-button {
    padding: 6px 7px;
    font-size: 12px;
  }

  .topbar-account {
    min-height: 38px;
    padding: 3px;
  }

  .topbar-account-avatar {
    width: 32px;
    height: 32px;
  }

  .topbar-communication .notification-panel,
  .topbar-communication .chat-panel {
    width: calc(100vw - 16px);
  }
}

/* Searchable list inputs: clicking a filled value still opens every option. */
.portal-combobox {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.portal-combobox > input { width: 100%; padding-right: 40px; }
.portal-combobox-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 3;
  display: grid;
  width: 36px;
  height: calc(100% - 2px);
  min-height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0 6px 6px 0;
  background: #f8fbf8;
  color: var(--green);
  cursor: pointer;
}

.portal-combobox-toggle > span {
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.portal-combobox:focus-within .portal-combobox-toggle { background: #edf7ef; }
.portal-combobox.is-open .portal-combobox-toggle > span {
  margin-top: 4px;
  transform: rotate(225deg);
}
.portal-combobox-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 120;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 79, 42, .16);
}
.portal-combobox.is-open-up .portal-combobox-panel {
  top: auto;
  bottom: calc(100% + 4px);
}
.portal-combobox-panel[hidden] { display: none; }
.portal-combobox-option {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 5px;
  cursor: pointer;
}
.portal-combobox-option:hover,
.portal-combobox-option.is-active { background: #edf7ef; }
.portal-combobox-option strong { overflow-wrap: anywhere; color: var(--text); font-size: 12px; font-weight: 650; }
.portal-combobox-option small { overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.portal-combobox-empty { padding: 10px; color: var(--muted); font-size: 12px; text-align: center; }
html[data-theme="dark"] .portal-combobox-toggle { border-color: #315c43; background: #17231c; color: #8df0ad; }
html[data-theme="dark"] .portal-combobox:focus-within .portal-combobox-toggle,
html[data-theme="dark"] .portal-combobox-option:hover,
html[data-theme="dark"] .portal-combobox-option.is-active { background: #173322; }
html[data-theme="dark"] .portal-combobox-panel { border-color: #315c43; background: #102418; box-shadow: 0 14px 32px rgba(0, 0, 0, .32); }

@media (max-width: 430px) {
  .work-monitor-table tr { grid-template-columns: 1fr; }
  .work-monitor-table td,
  .work-monitor-table td:first-child,
  .work-monitor-table td:nth-child(2) { grid-column: 1; }
  .work-task-summary-grid { grid-template-columns: 1fr; }
  .work-task-summary-grid .span-2 { grid-column: span 1; }
  .work-report-meta { grid-template-columns: 1fr; }
}

@media print {
  .hr-attendance-print-page { background: #fff; }
  .hr-attendance-print-shell {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .hr-attendance-print-actions { display: none !important; }
  .hr-attendance-print-shell table { page-break-inside: auto; }
  .hr-attendance-print-shell tr { page-break-inside: avoid; }
  .work-report-screen-head,
  .work-report-filters,
  .work-report-paper ~ *,
  .notification-center,
  .chat-center,
  .chat-float-button { display: none !important; }
  .work-report-paper {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .work-report-table { page-break-inside: auto; }
  .work-report-table tr { page-break-inside: avoid; }
  .work-report-signatures { page-break-inside: avoid; }
}

@media (max-width: 760px) {
  .page-request-cart .main { padding: 16px 8px 18px; }
  .page-request-cart .page-head h1 { font-size: 22px; line-height: 1.12; }
  .page-request-cart .page-head p { font-size: 12px; line-height: 1.3; }
  .page-request-cart .stock-category-section { margin-bottom: 12px; }
  .page-request-cart .stock-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 8px; }
  .page-request-cart .stock-category-tile { min-height: 112px; gap: 5px; padding: 8px 6px 7px; }
  .page-request-cart .stock-category-thumb-wrap { width: 58px; height: 50px; border-radius: 8px; }
  .page-request-cart .stock-category-thumb { padding: 3px; }
  .page-request-cart .stock-category-tile strong { min-height: 28px; font-size: 11px; line-height: 1.16; font-weight: 650; }
  .page-request-cart .stock-category-tile small { font-size: 9.5px; line-height: 1.18; }
  .page-request-cart .stock-cart-shell { gap: 12px; }
  .page-request-cart .stock-catalog-stack { gap: 10px; }
  .page-request-cart .stock-catalog-stack > .card { padding: 10px; border-radius: 10px; }
  .page-request-cart .stock-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .page-request-cart .stock-card { min-height: 0; gap: 6px; padding: 8px; border-radius: 9px; }
  .page-request-cart .stock-card-head { gap: 4px; align-items: flex-start; }
  .page-request-cart .stock-card .badge { padding: 3px 6px; font-size: 9.5px; line-height: 1.1; }
  .page-request-cart .stock-left { padding: 3px 6px; font-size: 10px; line-height: 1.1; white-space: nowrap; }
  .page-request-cart .stock-card-media { aspect-ratio: 5 / 4; border-radius: 8px; }
  .page-request-cart .stock-card h3 {
    min-height: 29px;
    font-size: 12px;
    line-height: 1.18;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .page-request-cart .stock-card p {
    font-size: 10.5px;
    line-height: 1.22;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .page-request-cart .stock-card-meta { display: none; }
  .page-request-cart .stock-card-actions { grid-template-columns: minmax(0, 1fr) 34px; gap: 5px; margin-top: auto; }
  .page-request-cart .qty-stepper { min-height: 32px; grid-template-columns: minmax(0, 1fr) 20px; border-radius: 8px; }
  .page-request-cart .qty-stepper input { padding: 6px 7px; font-size: 12px; }
  .page-request-cart .qty-stepper-controls button { width: 20px; min-width: 20px; height: 16px; }
  .page-request-cart .qty-stepper-controls svg { width: 11px; height: 11px; }
  .page-request-cart .cart-add-button { width: 34px; height: 32px; border-radius: 10px; box-shadow: 0 7px 14px rgba(15, 107, 60, .16); }
  .page-request-cart .cart-add-button svg { width: 17px; height: 17px; }
}

/* Request Consumables mobile catalog: compact, marketplace-style cards. */
@media (max-width: 760px) {
  .page-request-cart .main { padding: 14px 7px 18px; }
  .page-request-cart .page-head h1 { font-size: 21px; line-height: 1.1; }
  .page-request-cart .page-head h2 { font-size: 20px; line-height: 1.12; }
  .page-request-cart .page-head p { font-size: 12px; line-height: 1.25; }
  .page-request-cart .card { border-radius: 12px; }
  .page-request-cart .stock-category-section { margin-bottom: 10px; }
  .page-request-cart .stock-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 9px; }
  .page-request-cart .stock-category-tile { min-height: 96px; gap: 4px; padding: 7px 4px 6px; }
  .page-request-cart .stock-category-thumb-wrap { width: 50px; height: 40px; border-radius: 7px; }
  .page-request-cart .stock-category-thumb { padding: 2px; }
  .page-request-cart .stock-category-tile strong { min-height: 24px; font-size: 10.5px; line-height: 1.14; font-weight: 650; }
  .page-request-cart .stock-category-tile small { font-size: 9px; line-height: 1.12; }
  .page-request-cart .stock-cart-shell { gap: 10px; }
  .page-request-cart .stock-catalog-stack { gap: 9px; }
  .page-request-cart .stock-catalog-stack > .card { padding: 9px; border-radius: 11px; }
  .page-request-cart .stock-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .page-request-cart .stock-card { min-height: 0; gap: 4px; padding: 6px; border-radius: 9px; }
  .page-request-cart .stock-card-head { gap: 3px; align-items: flex-start; }
  .page-request-cart .stock-card .badge { padding: 2px 5px; font-size: 9px; line-height: 1.05; }
  .page-request-cart .stock-left { padding: 2px 5px; font-size: 9.5px; line-height: 1.05; white-space: nowrap; }
  .page-request-cart .stock-card-media {
    height: clamp(84px, 25vw, 112px);
    aspect-ratio: auto;
    border-radius: 7px;
  }
  .page-request-cart .stock-card-image { padding: 2px; }
  .page-request-cart .stock-card h3 {
    min-height: 26px;
    font-size: 11.2px;
    line-height: 1.15;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .page-request-cart .stock-card p {
    font-size: 9.8px;
    line-height: 1.18;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }
  .page-request-cart .stock-card-meta { display: none; }
  .page-request-cart .stock-card-actions { grid-template-columns: minmax(0, 1fr) 31px; gap: 4px; margin-top: auto; }
  .page-request-cart .qty-stepper { min-height: 29px; grid-template-columns: minmax(0, 1fr) 18px; border-radius: 7px; }
  .page-request-cart .qty-stepper input { min-height: 29px; padding: 5px 6px; font-size: 11px; }
  .page-request-cart .qty-stepper-controls button { width: 18px; min-width: 18px; height: 14.5px; }
  .page-request-cart .qty-stepper-controls svg { width: 10px; height: 10px; }
  .page-request-cart .cart-add-button { width: 31px; height: 29px; border-radius: 9px; box-shadow: 0 6px 12px rgba(15, 107, 60, .14); }
  .page-request-cart .cart-add-button svg { width: 15px; height: 15px; }
}

@media (max-width: 520px) {
  .responsive-card-table td,
  .responsive-card-table .inventory-select-col,
  .responsive-card-table .user-select-col {
    grid-template-columns: minmax(96px, 31%) minmax(0, 1fr);
    gap: 8px;
    padding: 10px 11px;
  }

  .responsive-card-table td::before {
    font-size: 10px;
    letter-spacing: .025em;
  }

  .responsive-card-table .button.small,
  .responsive-card-table button.small {
    min-height: 34px;
    padding: 7px 10px;
    white-space: normal;
  }

  .responsive-card-table .button.mobile-icon-action,
  .responsive-card-table button.mobile-icon-action {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    white-space: nowrap;
  }
}

.cafeteria-page-head { align-items: flex-start; }
.cafeteria-pos-shell { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.cafeteria-pos-main { min-width: 0; }
.cafeteria-pos-filter { margin-bottom: 14px; }
.cafeteria-pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cafeteria-empty-pos { grid-column: 1 / -1; }
.cafeteria-pos-item { min-height: 150px; border: 1px solid rgba(15, 107, 60, .16); border-radius: 18px; background: linear-gradient(145deg, #fff, #f1f8f0); padding: 14px; text-align: left; display: grid; gap: 7px; cursor: pointer; box-shadow: 0 12px 26px rgba(15, 79, 42, .08); transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.cafeteria-pos-item:hover:not(:disabled), .cafeteria-pos-item:focus-visible { transform: translateY(-2px); border-color: var(--green); box-shadow: 0 18px 34px rgba(15, 79, 42, .14); }
.cafeteria-pos-item strong { font-size: 17px; color: var(--navy); }
.cafeteria-pos-item em { font-style: normal; font-size: 18px; font-weight: 900; color: var(--green); }
.cafeteria-pos-item small { color: var(--muted); }
.cafeteria-pos-item b, .pos-item-category { width: fit-content; padding: 4px 8px; border-radius: 999px; background: #eef7ee; color: var(--green); font-size: 11px; font-weight: 900; }
.cafeteria-pos-item b { background: #fff7ed; color: #9a3412; }
.cafeteria-pos-item.is-out { opacity: .56; cursor: not-allowed; filter: grayscale(.2); }
.cafeteria-cart { position: sticky; top: 84px; }
.cafeteria-cart form { display: grid; gap: 12px; }
.cafeteria-cart-lines { display: grid; gap: 8px; max-height: 42vh; overflow: auto; padding-right: 4px; }
.cafeteria-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fbfdf8; }
.cafeteria-cart-line strong, .cafeteria-cart-line small { display: block; }
.cart-line-controls { display: flex; align-items: center; gap: 6px; }
.cart-line-controls button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: #fff; font-weight: 900; cursor: pointer; }
.cart-line-controls span { min-width: 28px; text-align: center; font-weight: 900; }
.cafeteria-cart-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cafeteria-total-board { display: grid; gap: 7px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, #0f4f2a, #156c3a); color: #fff; }
.cafeteria-total-board span { display: flex; justify-content: space-between; gap: 10px; }
.cafeteria-total-board strong { font-size: 18px; }
.cafeteria-checkout-button { width: 100%; min-height: 54px; font-size: 17px; }
.cafeteria-item-form { margin-bottom: 16px; }
.cafeteria-adjust-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cafeteria-adjust-form select { min-width: 112px; }
.cafeteria-adjust-form input[name="qty"] { width: 82px; }
.cafeteria-adjust-form input[name="remarks"] { min-width: 160px; }
html[data-theme="dark"] .cafeteria-pos-item, html[data-theme="dark"] .cafeteria-cart-line { background: rgba(15, 32, 23, .98); border-color: #315c43; }
html[data-theme="dark"] .cafeteria-pos-item strong { color: var(--text); }
html[data-theme="dark"] .cafeteria-pos-item small { color: #b7c7bc; }
html[data-theme="dark"] .cart-line-controls button { background: #102418; color: var(--text); border-color: #315c43; }

@media (max-width: 1100px) {
  .cafeteria-pos-shell { grid-template-columns: 1fr; }
  .cafeteria-cart { position: static; }
}

@media (max-width: 760px) {
  .cafeteria-pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cafeteria-cart-totals { grid-template-columns: 1fr; }
  .cafeteria-pos-item { min-height: 130px; }
}

@media print {
  @page { size: A4 landscape; margin: .35in; }
  .sidebar, .sidebar-backdrop, .topbar, .actions, .filters, .button, .label-toolbar, .screen-only, .chat-center, .notification-center, .back-to-top { display: none !important; }
  .app { display: block; }
  .main { padding: 0; max-width: none; }
  .page-sticky-toolbar { position: static; margin: 0 0 12px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .portal-sticky-tabs, .portal-scroll-sync-bar { display: none !important; }
  .portal-wide-table thead th { position: static; box-shadow: none; }
  .card, .table-wrap { box-shadow: none; border-color: #aaa; }
  .table-wrap { overflow: visible; }
  .school-calendar-overview, .school-calendar-selected, .school-calendar-event-board, .school-calendar-source-panel > summary, .school-calendar-page-head { display: none; }
  .school-calendar-source-panel { display: block; border: 0; box-shadow: none; padding: 0; }
  .school-calendar-source-panel:not([open]) .school-calendar-grid { display: grid; }
  .school-calendar-grid { gap: 0; }
  .school-calendar-page { border: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .school-calendar-page:last-child { break-after: auto; page-break-after: auto; }
  .school-calendar-image-link { padding: 0; background: #fff; overflow: visible; }
  .school-calendar-image-link img { min-width: 0; width: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .table { white-space: normal; }
  .table th, .table td { padding: 6px 7px; font-size: 10px; }
  .table th { font-size: 9px; }
  .badge { border: 1px solid #aaa; padding: 2px 5px; font-size: 9px; }
  .print-report { max-width: none; margin: 0; padding: 0; border: 0; }
  .print-report-header { margin-bottom: 10px; padding-bottom: 10px; break-inside: avoid; }
  .print-report-brand img { width: 58px; height: 58px; }
  .print-report-brand h1 { font-size: 20px; margin: 0 0 2px; }
  .print-report-brand strong { font-size: 13px; }
  .print-report-meta { min-width: 330px; gap: 5px; }
  .print-report-meta div, .print-filter-note { padding: 6px 7px; }
  .print-filter-note { margin-bottom: 10px; font-size: 10px; }
  .screen-budget-head, .screen-budget-editor, .screen-budget-decision { display: none !important; }
  .print-only.budget-proposal-print { display: block !important; width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; color: #111827; background: #fff; }
  .budget-print-header { grid-template-columns: 58px 1fr; gap: 10px; padding-bottom: 8px; margin-bottom: 8px; }
  .budget-print-header img { width: 54px; height: 54px; }
  .budget-print-header strong { font-size: 14px; }
  .budget-print-header h1 { font-size: 17px; }
  .budget-print-header p, .budget-print-header span { font-size: 11px; }
  .budget-print-meta { grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 8px; }
  .budget-print-kpis { grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 8px; }
  .budget-print-meta div, .budget-print-kpis div { padding: 5px 6px; border-radius: 5px; }
  .budget-print-meta span, .budget-print-kpis span { font-size: 8px; }
  .budget-print-meta strong, .budget-print-kpis strong { font-size: 10px; margin-top: 2px; }
  .budget-print-kpis strong { font-size: 12px; }
  .budget-print-block { margin-top: 8px; break-inside: auto; }
  .budget-print-block h2 { font-size: 11px; margin-bottom: 4px; }
  .budget-print-block p { padding: 5px 6px; min-height: 22px; font-size: 10px; border-radius: 5px; }
  .budget-print-table { font-size: 8.5px; break-inside: auto; page-break-inside: auto; }
  .budget-print-table tr { break-inside: avoid; page-break-inside: avoid; }
  .budget-print-table th, .budget-print-table td { padding: 3px 4px; }
  .budget-print-table th { font-size: 7.5px; }
  .budget-print-table small { font-size: 7.5px; }
  .budget-print-signatures { gap: 16px; margin-top: 20px; }
  .budget-print-signatures div { min-height: 34px; padding-top: 4px; }
  .budget-print-signatures span { font-size: 8px; }
  .budget-print-signatures strong { font-size: 10px; }
  .print-kpis { grid-template-columns: repeat(6, 1fr); gap: 7px; margin-bottom: 10px; break-inside: avoid; }
  .print-kpis .kpi { padding: 8px; }
  .print-kpis .kpi .label { font-size: 9px; }
  .print-kpis .kpi .value { font-size: 14px; margin-top: 3px; }
  .print-summary-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; break-inside: avoid; }
  .print-summary-grid > section { box-shadow: none; padding: 8px; }
  .print-summary-grid h2, .print-section h2 { font-size: 12px; margin-bottom: 6px; }
  .print-section { margin-top: 12px; }
  .print-detail-table .wrap { min-width: 0; }
  .print-signatures { gap: 22px; margin-top: 24px; break-inside: avoid; }
  @page label70x40 { size: 70mm 40mm; margin: 0; }
  @page labelSmall { size: 45mm 25mm; margin: 0; }
  @page labelCable { size: 50mm 15mm; margin: 0; }
  @page labelItemTag { size: 45mm 18mm; margin: 0; }
  .label-sheet-roll { display: block; }
  .label-sheet-roll .asset-label { margin: 0; box-shadow: none; border: 0; border-radius: 0; page-break-after: always; break-after: page; }
  .label-sheet-roll .asset-label.label-size-70x40 { page: label70x40; width: 70mm; height: 40mm; }
  .label-sheet-roll .asset-label.label-size-small { page: labelSmall; width: 45mm; height: 25mm; }
  .label-sheet-roll .asset-label.label-size-cable { page: labelCable; width: 50mm; height: 15mm; }
  .label-sheet-roll .asset-label.label-size-item-tag { page: labelItemTag; width: 45mm; height: 18mm; }
  .label-sheet-roll .asset-label:last-child { page-break-after: auto; break-after: auto; }
  body { background: #fff; }
}

/* Clarity override: keep live browser and VS Code previews sharp. */
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.brand,
.topbar,
.page-sticky-toolbar,
.master-list-sticky-head,
.notification-panel,
.chat-panel,
.chat-compose {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.brand {
  background: linear-gradient(180deg, #06391f 0%, #073b20 72%, #0b3f24 100%) !important;
}
.topbar {
  background: linear-gradient(90deg, #06391f 0%, #0f572f 15%, #e8f6e9 44%, #fff 100%) !important;
}
.page-sticky-toolbar,
.master-list-sticky-head,
.card,
.table-wrap,
.notification-panel,
.chat-panel,
.chat-compose {
  background-color: #fff !important;
}
html[data-theme="dark"] .topbar {
  background: linear-gradient(90deg, #031b0f 0%, #0b3f24 58%, #06170d 100%) !important;
}
html[data-theme="dark"] .brand {
  background: linear-gradient(180deg, #031b0f 0%, #0b3f24 72%, #06170d 100%) !important;
}
html[data-theme="dark"] .page-sticky-toolbar,
html[data-theme="dark"] .master-list-sticky-head,
html[data-theme="dark"] .card,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .chat-panel,
html[data-theme="dark"] .chat-compose {
  background-color: #0f2017 !important;
}

/* Mobile polish for the PWA shell and chat drawer. */
@media (max-width: 760px) {
  .sidebar {
    width: min(306px, calc(100vw - 40px));
    left: min(-324px, -100vw);
    box-shadow: 18px 0 46px rgba(2, 30, 15, .28);
  }

  .sidebar.open { left: 0; }

  .brand {
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 17px 13px 13px;
    cursor: pointer;
  }

  .brand img,
  html[data-sidebar="collapsed"] .brand img {
    width: 52px;
    height: 52px;
  }

  .brand span { font-size: inherit; }
  .brand-title { font-size: 15px; line-height: 1.14; }
  .brand small { max-width: 100%; font-size: 11.5px; line-height: 1.22; }
  .sidebar-general-services .nav {
    gap: 2px;
    margin-top: 16px;
    padding-bottom: 18px;
  }

  .sidebar-general-services .nav-section {
    margin: 18px 9px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
  }

  .sidebar-general-services .nav a {
    min-height: 31px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.14;
  }

  .sidebar .nav-department-link {
    min-height: 30px;
    padding: 6px 8px 6px 10px;
    font-size: 12.8px;
    font-weight: 500;
    line-height: 1.12;
  }

  .sidebar .nav-department-group {
    margin-top: 12px;
  }

  html[data-sidebar="collapsed"] .sidebar .nav-department-group {
    display: block;
  }

  .sidebar .nav-department-summary {
    margin: 0 5px 4px;
    padding: 7px 5px 7px 4px;
  }

  .sidebar .nav-department-list {
    max-height: 42vh;
  }

  .sidebar .nav-department-link::before {
    width: 6px;
    height: 6px;
    margin-right: 1px;
  }

  .sidebar .nav-department-link.has-pending::after {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
  }

  html[data-sidebar="collapsed"] .brand {
    justify-content: flex-start;
    gap: 10px;
    margin: -22px -15px 8px;
    padding: 17px 13px 13px;
  }

  html[data-sidebar="collapsed"] .sidebar-general-services {
    padding: 22px 15px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  html[data-sidebar="collapsed"] .sidebar-general-services .brand {
    top: -22px;
    justify-content: flex-start;
    gap: 10px;
    margin: -22px -15px 8px;
    padding: 17px 13px 13px;
  }

  html[data-sidebar="collapsed"] .sidebar-general-services .brand img {
    width: 52px;
    height: 52px;
  }

  html[data-sidebar="collapsed"] .sidebar-general-services .brand .brand-copy {
    display: flex;
  }

  html[data-sidebar="collapsed"] .sidebar-general-services .nav-text {
    display: block;
  }

  html[data-sidebar="collapsed"] .sidebar-general-services .nav-section {
    display: block;
  }

  .topbar-left { flex: 1 1 auto; gap: 9px; }

  /* Keep the white Hub title on the dark side of the mobile header gradient. */
  .page-operations-hub .topbar {
    background: linear-gradient(90deg, #06391f 0%, #0f572f 58%, #d7eddd 76%, #fff 100%) !important;
  }

  .page-operations-hub .topbar-hub-brand strong {
    color: #fff;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 27, 13, .48);
  }

  html[data-theme="dark"] .page-operations-hub .topbar {
    background: linear-gradient(90deg, #031b0f 0%, #0b3f24 70%, #06170d 100%) !important;
  }

  .topbar-title-button {
    display: grid;
    gap: 2px;
    flex: 1 1 auto;
    max-width: min(62vw, 320px);
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 7px 11px;
    border: 1px solid rgba(15, 107, 60, .18);
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    color: #06391f;
    box-shadow: 0 8px 18px rgba(15, 79, 42, .12);
    font-size: 14px;
    line-height: 1.05;
  }

  .topbar-title-button:hover,
  .topbar-title-button:focus-visible {
    background: #fff;
    color: #0f572f;
    outline: 2px solid rgba(15, 107, 60, .18);
    outline-offset: 2px;
  }

  .sidebar-toggle {
    width: 38px;
    height: 38px;
  }

  .topbar-actions { flex: 0 0 auto; }

  .chat-panel {
    right: -68px;
    bottom: 66px;
    height: min(82vh, calc(100vh - 96px));
    max-height: 760px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .chat-head {
    min-height: 82px;
    padding: 13px 14px;
  }

  .chat-head-title {
    align-items: center;
    gap: 10px;
  }

  .chat-head-title > div { min-width: 0; }
  .chat-head-title strong { font-size: 18px; }
  .chat-head small {
    max-width: 58vw;
    line-height: 1.25;
  }

  .chat-head-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .chat-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(235px, 42%) minmax(0, 1fr);
    grid-template-columns: 1fr;
  }

  .chat-center:not(.has-peer) .chat-body {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .chat-users {
    min-height: 0;
    max-height: none;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px;
  }

  .chat-center:not(.has-peer) .chat-users {
    border-bottom: 0;
  }

  .chat-search {
    min-height: 42px;
    margin-bottom: 8px;
  }

  .chat-user-list { gap: 8px; }

  .chat-user {
    min-height: 64px;
    padding: 9px 42px 9px 48px;
  }

  .chat-user strong,
  .chat-user small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-user b {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
  }

  .chat-thread {
    min-height: 0;
    overflow: hidden;
  }

  .chat-center:not(.has-peer) .chat-thread {
    min-height: auto;
  }

  .chat-center:not(.has-peer) .chat-thread-head,
  .chat-center:not(.has-peer) .chat-messages {
    display: none;
  }

  .chat-thread-head {
    padding: 9px 11px;
  }

  .chat-thread-head strong,
  .chat-thread-head small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 58vw;
  }

  .chat-messages {
    min-height: 86px;
    padding: 10px;
  }

  .chat-empty {
    padding: 12px 8px;
    font-size: 13px;
  }

  .chat-compose {
    grid-template-columns: 38px 38px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 9px;
  }

  .chat-icon-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .chat-send-button {
    min-height: 38px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

.payroll-governance-card,
.payroll-period-card,
.payroll-processing-card {
  display: grid;
  gap: 18px;
}

.payroll-create-period,
.payroll-certification-form,
.payroll-actions,
.payroll-history {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.payroll-certification-form,
.payroll-actions {
  display: grid;
  gap: 14px;
}

.payroll-processing-card {
  border-top: 4px solid var(--primary, #18753c);
  margin-top: 18px;
}

.payroll-entry-editor {
  background: var(--surface-soft, #f6faf7);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.payroll-entry-editor > summary {
  color: var(--primary, #18753c);
  cursor: pointer;
  font-weight: 800;
}

.payroll-entry-form {
  margin-top: 14px;
}

.payroll-processing-card .table-wrap {
  max-height: 620px;
}

.payroll-processing-card table thead {
  background: var(--surface, #fff);
  position: sticky;
  top: 0;
  z-index: 1;
}

html[data-theme="dark"] .payroll-entry-editor {
  background: rgba(255,255,255,.035);
}

.payroll-stage-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.payroll-stage {
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  padding: 10px 12px;
  text-align: center;
}

.payroll-stage.active {
  background: var(--primary-soft, #edf7ef);
  border-color: var(--primary, #18753c);
  color: var(--primary, #18753c);
}

@media (max-width: 760px) {
  .payroll-stage-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .payroll-stage {
    text-align: left;
  }

  .payroll-processing-card .table-wrap {
    max-height: none;
  }
}

/* HR work schedules and attendance classifications */
.hr-schedule-guidance {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.hr-schedules-layout {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.8fr);
  gap: 16px;
  align-items: start;
}

.hr-schedule-list,
.hr-schedule-editor {
  min-width: 0;
}

.hr-schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-top: 8px;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.hr-schedule-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hr-schedule-row > span:last-child {
  justify-items: end;
  text-align: right;
}

.hr-schedule-row:hover,
.hr-schedule-row.selected {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--panel));
}

.hr-schedule-row.selected {
  box-shadow: inset 4px 0 0 var(--green);
}

.hr-schedule-row:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 45%, transparent);
  outline-offset: 2px;
}

.hr-schedule-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-schedule-workdays {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.hr-schedule-workdays .check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: max-content;
}

.hr-schedule-assignments {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hr-schedule-assignment-form {
  margin-top: 14px;
}

.hr-schedule-assignment-form > summary {
  cursor: pointer;
  font-weight: 700;
}

.hr-schedule-assignment-form form {
  margin-top: 12px;
}

.hr-bulk-schedule-wizard {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 4%, var(--panel));
}

.hr-bulk-schedule-wizard > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
}

.hr-bulk-schedule-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.hr-bulk-preview-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.hr-bulk-preview-form .check {
  align-self: center;
}

.hr-bulk-apply-form {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.hr-bulk-select-all {
  flex-direction: row;
  align-items: center;
}

.hr-bulk-candidate-table {
  max-height: 390px;
}

.hr-bulk-candidate-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.hr-bulk-confirm {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line));
  border-radius: 10px;
  background: var(--panel);
}

.hr-readiness-guidance {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.hr-readiness-kpis .kpi {
  display: grid;
  align-content: start;
}

.hr-readiness-kpis .kpi.is-active {
  outline: 3px solid color-mix(in srgb, var(--green) 30%, transparent);
  border-color: var(--green);
  box-shadow: 0 16px 34px rgba(15, 79, 42, .18);
}

.hr-kpi-action {
  align-self: end;
  margin-top: 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.hr-kpi-action::after {
  content: " \2192";
}

.hr-readiness-focus {
  margin-bottom: 16px;
  scroll-margin-top: 20px;
}

.hr-readiness-focus:focus {
  outline: 3px solid color-mix(in srgb, var(--green) 28%, transparent);
  outline-offset: 3px;
}

.hr-readiness-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 16px;
  align-items: start;
}

.hr-readiness-layout > .card {
  min-width: 0;
}

.hr-readiness-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.hr-readiness-meta > span {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--green) 4%, var(--panel));
}

.hr-readiness-meta strong {
  color: var(--green);
  font-size: 20px;
}

.hr-readiness-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hr-readiness-missing span {
  padding: 4px 7px;
  color: #8c3f13;
  border: 1px solid #efc39f;
  border-radius: 999px;
  background: #fff6ed;
  font-size: 11px;
  font-weight: 750;
}

.hr-duplicate-groups {
  display: grid;
  gap: 10px;
}

.hr-duplicate-groups article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.hr-duplicate-groups article > header,
.hr-duplicate-groups article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.hr-duplicate-groups article > header {
  background: #fff6ed;
  color: #8c3f13;
}

.hr-duplicate-groups article > header strong {
  margin-right: auto;
}

.hr-duplicate-groups article > div + div {
  border-top: 1px solid var(--line);
}

.hr-duplicate-groups article > div > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hr-merge-preview {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
  scroll-margin-top: 20px;
}

.hr-merge-records,
.hr-merge-impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hr-merge-records article,
.hr-merge-impact-grid > section {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 3%, var(--panel));
}

.hr-merge-records article.primary {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
}

.hr-merge-records article.secondary {
  border-color: #efc39f;
  background: #fffaf5;
}

.hr-merge-records h3,
.hr-merge-impact-grid h3 {
  margin: 0;
}

.hr-merge-records .button {
  justify-self: start;
  margin-top: 4px;
}

.hr-merge-field-table {
  min-width: 980px;
}

.hr-merge-field-table th:last-child,
.hr-merge-field-table td:last-child {
  min-width: 290px;
  width: 34%;
}

.hr-merge-field-choice {
  display: grid;
  gap: 8px;
}

.hr-merge-field-choice label {
  display: grid;
  gap: 5px;
  margin: 0;
  font-weight: 700;
}

.hr-merge-field-choice label > span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.hr-merge-field-choice select,
.hr-merge-field-choice input,
.hr-merge-field-choice textarea {
  width: 100%;
  min-width: 0;
}

.hr-merge-custom-value {
  padding: 8px;
  border: 1px dashed color-mix(in srgb, var(--green) 35%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--green) 3%, #fff);
}

.hr-merge-custom-value small {
  font-weight: 500;
}

.hr-merge-impact-grid ul,
.hr-merge-blocks ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hr-merge-impact-grid li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.hr-merge-confirm {
  display: grid;
  gap: 13px;
}

.hr-merge-resolution-form {
  display: contents;
}

.hr-merge-confirm > .button {
  justify-self: start;
}

.hr-merged-record-note {
  margin-bottom: 16px;
}

.hr-kiosk-result .badge {
  display: inline-flex;
  margin-top: 8px;
}

@media (max-width: 1180px) {
  .hr-schedule-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hr-schedules-layout,
  .hr-readiness-layout,
  .hr-merge-records,
  .hr-merge-impact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hr-bulk-preview-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hr-schedule-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .hr-schedule-form .span-2 {
    grid-column: 1;
  }

  .hr-schedule-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .hr-schedule-row > span:last-child {
    justify-items: start;
    text-align: left;
  }

  .hr-bulk-preview-form,
  .hr-readiness-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .hr-bulk-preview-form .span-3 {
    grid-column: 1;
  }

  .hr-duplicate-groups article > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .hr-duplicate-groups article > header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

/* The shared calendar keeps a compact month grid on phones; legacy calendars may still stack. */
@media (max-width: 760px) {
  .calendar-month .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .calendar-month .calendar-weekday { display: block; min-height: 0; padding: 6px 1px; border-right: 1px solid var(--border); }
  .calendar-month .calendar-weekday:nth-child(7) { border-right: 0; }
  .calendar-month .calendar-day { min-height: 66px; padding: 3px; border-right: 1px solid var(--border); }
  .calendar-month .calendar-day:nth-child(7n) { border-right: 0; }
}

/* Conflict checker resource choices are intentionally isolated from shared checkbox styles. */
.calendar-activity-form .calendar-resource-picker label {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 10px 9px 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  cursor: pointer;
}

.calendar-activity-form .calendar-resource-picker label > span {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.calendar-activity-form .calendar-resource-picker input[type="checkbox"] {
  appearance: auto;
  position: static;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: block;
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  accent-color: var(--green);
  cursor: pointer;
}

.calendar-activity-form .calendar-resource-picker label:has(input:checked) {
  border-color: #2f8c57;
  background: #edf9f0;
  box-shadow: inset 0 0 0 1px #2f8c57;
}

.calendar-activity-form .calendar-resource-picker label:has(input:checked) > span {
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .calendar-activity-form .calendar-resource-picker label {
  background: #0f2017;
}

html[data-theme="dark"] .calendar-activity-form .calendar-resource-picker label:has(input:checked) {
  background: #173522;
}

.calendar-conflict-form,
.calendar-conflict-form .calendar-conflict-schedule-grid,
.calendar-conflict-form .calendar-conflict-resource-picker {
  min-width: 0;
  max-width: 100%;
}

.calendar-conflict-form .calendar-conflict-schedule-grid {
  align-items: end;
}

.calendar-conflict-form .calendar-conflict-all-day {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 2px;
  align-items: center;
  align-self: end;
  gap: 8px;
  cursor: pointer;
}

.calendar-conflict-form .calendar-conflict-all-day > span {
  line-height: 1.25;
}

.calendar-conflict-form .calendar-conflict-all-day input[type="checkbox"],
.calendar-conflict-form .calendar-conflict-resource-control input[type="checkbox"] {
  appearance: auto;
  position: static;
  inset: auto;
  display: block;
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  accent-color: var(--green);
  cursor: pointer;
}

.calendar-conflict-form .calendar-conflict-resource-picker {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calendar-conflict-form .calendar-conflict-resource-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  min-width: 0;
  min-height: 68px;
  padding: 11px 12px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.calendar-conflict-form .calendar-conflict-resource-option[hidden] {
  display: none;
}

.calendar-conflict-form .calendar-conflict-resource-option > .calendar-conflict-resource-text,
.calendar-conflict-form .calendar-conflict-resource-option > .calendar-conflict-resource-control {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.calendar-conflict-form .calendar-conflict-resource-text {
  display: grid;
  gap: 4px;
  align-content: center;
}

.calendar-conflict-form .calendar-conflict-resource-text strong {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.calendar-conflict-form .calendar-conflict-resource-text small {
  overflow: visible;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.calendar-conflict-form .calendar-conflict-resource-control {
  display: grid;
  width: 32px;
  justify-self: end;
  place-items: center;
}

.calendar-conflict-form .calendar-conflict-resource-option:hover {
  border-color: #75ad88;
  background: #f7fcf8;
}

.calendar-conflict-form .calendar-conflict-resource-option:has(.calendar-conflict-resource-control input:checked) {
  border-color: #2f8c57;
  background: #edf9f0;
  box-shadow: inset 4px 0 0 var(--green), inset 0 0 0 1px #2f8c57;
}

.calendar-conflict-form .calendar-conflict-resource-option:has(.calendar-conflict-resource-control input:focus-visible),
.calendar-conflict-form .calendar-conflict-all-day:has(input:focus-visible) {
  outline: 3px solid #9dd5ae;
  outline-offset: 2px;
}

.calendar-conflict-form .calendar-conflict-resource-option:has(input:disabled) {
  opacity: .58;
  cursor: not-allowed;
}

.calendar-conflict-form .calendar-conflict-resource-option:has(input:disabled) input {
  cursor: not-allowed;
}

html[data-theme="dark"] .calendar-conflict-form .calendar-conflict-resource-option {
  background: #0f2017;
}

html[data-theme="dark"] .calendar-conflict-form .calendar-conflict-resource-option:hover {
  border-color: #5fa878;
  background: #14291d;
}

html[data-theme="dark"] .calendar-conflict-form .calendar-conflict-resource-option:has(.calendar-conflict-resource-control input:checked) {
  border-color: #68b883;
  background: #173422;
  box-shadow: inset 4px 0 0 #68b883, inset 0 0 0 1px #68b883;
}

@media (max-width: 1180px) {
  .calendar-conflict-form .calendar-conflict-resource-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .calendar-conflict-form .calendar-conflict-resource-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content:has(.calendar-conflict-form) .topbar-clock,
  .content:has(.calendar-conflict-form) .topbar-account-text {
    display: none;
  }

  .content:has(.calendar-conflict-form) .topbar-account {
    min-height: 38px;
    padding: 3px;
  }
}

@media (max-width: 520px) {
  .calendar-conflict-form .calendar-conflict-schedule-grid,
  .calendar-conflict-form .calendar-conflict-resource-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-conflict-form .calendar-conflict-resource-picker h3 {
    grid-column: 1;
  }
}
.hr-schedule-gap-list{margin:0 0 1rem}.hr-schedule-gap-list>summary{cursor:pointer;font-weight:700}.hr-schedule-gap-names{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.5rem;margin-top:1rem}.hr-schedule-gap-names span{padding:.65rem .75rem;border:1px solid var(--border);border-radius:.65rem;background:#f7faf7}
.hr-workforce-grid{align-items:start}.hr-workforce-create{margin-top:1rem}.hr-workforce-request-detail{margin-top:1rem}.hr-attendance-rules-intro .alert{margin-bottom:0}.hr-employee-attendance-decisions{margin-top:1rem}

/* HRIS employee compliance and document-renewal phase */
.hr-compliance-guidance{margin-bottom:16px}
.hr-compliance-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.85fr);gap:16px;align-items:start}
.hr-compliance-queue,.hr-compliance-requirements{display:grid;gap:12px}
.hr-compliance-queue details,.hr-compliance-policy>details{border:1px solid var(--border);border-radius:12px;background:var(--surface-soft,#f6faf7);overflow:hidden}
.hr-compliance-queue summary,.hr-compliance-policy>details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;cursor:pointer;font-weight:800}
.hr-compliance-queue summary span{min-width:34px;padding:3px 9px;border-radius:999px;background:var(--surface);text-align:center}
.hr-compliance-queue details .table-wrap{border-top:1px solid var(--border);border-radius:0}
.hr-compliance-policy>details>form{padding:0 15px 15px}
.hr-compliance-requirements{margin-top:16px}
.hr-compliance-requirements article{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:13px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft,#f6faf7)}
.hr-compliance-requirements article>div:first-child{display:grid;gap:5px}
.hr-compliance-requirements article .badge{justify-self:start}
.hr-compliance-document-table td{vertical-align:top}
.hr-document-review{min-width:220px;margin-top:8px}
.hr-document-review summary{cursor:pointer;color:var(--primary);font-weight:800}
.hr-document-review form{display:grid;gap:8px;margin-top:8px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft,#f6faf7)}
html[data-theme="dark"] .hr-compliance-queue details,html[data-theme="dark"] .hr-compliance-policy>details,html[data-theme="dark"] .hr-compliance-requirements article,html[data-theme="dark"] .hr-document-review form{background:#15231b}
@media (max-width:1100px){.hr-compliance-layout{grid-template-columns:1fr}}
@media (max-width:720px){.hr-compliance-requirements article{display:grid}.hr-compliance-requirements article .actions{justify-content:flex-start}}

/* Inventory UOM and hierarchical category master data */
.inventory-master-create-card{margin-top:18px}
.inventory-master-table td{vertical-align:top}
.inventory-master-table details>summary{list-style:none;cursor:pointer}
.inventory-master-table details>summary::-webkit-details-marker{display:none}
.inventory-master-controls{display:flex;flex-wrap:wrap;align-items:flex-start;gap:7px;min-width:210px}
.inventory-master-controls>form{margin:0}
.inventory-master-inline-form{display:grid;grid-template-columns:repeat(2,minmax(150px,1fr));gap:10px;min-width:min(620px,70vw);margin-top:9px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft,#f6faf7);box-shadow:var(--shadow-sm)}
.inventory-master-inline-form label{display:grid;gap:5px}
.inventory-master-inline-form label:nth-of-type(4){grid-column:1/-1}
.inventory-category-path{padding-left:calc(12px + var(--category-depth,0)*18px)!important}
.inventory-category-path strong,.inventory-category-path small{display:block}
.inventory-category-path small{margin-top:4px;color:var(--muted)}
html[data-theme="dark"] .inventory-master-inline-form{background:#15231b}
@media (max-width:760px){
  .inventory-master-inline-form{grid-template-columns:1fr;min-width:min(76vw,520px)}
  .inventory-master-inline-form label:nth-of-type(4){grid-column:1}
  .inventory-category-path{padding-left:12px!important}
}
.inventory-readiness-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
    margin-bottom: 18px;
    border-top: 4px solid var(--primary);
}

.inventory-readiness-overview-main {
    min-width: 0;
}

.inventory-readiness-overview-heading,
.inventory-readiness-score,
.inventory-readiness-overview-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.inventory-readiness-overview-heading {
    justify-content: space-between;
    gap: 12px;
}

.inventory-readiness-overview-heading h2 {
    margin: 3px 0 0;
}

.inventory-readiness-score {
    gap: 14px;
    margin-top: 18px;
}

.inventory-readiness-score strong {
    color: var(--primary);
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: .9;
    letter-spacing: -.05em;
}

.inventory-readiness-score span {
    max-width: 340px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}

.inventory-readiness-progress {
    height: 11px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #dce8df;
}

.inventory-readiness-progress span {
    display: block;
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #27a55d);
}

.inventory-readiness-overview-meta {
    gap: 8px 20px;
    margin-top: 12px;
    color: var(--muted);
    font-size: .9rem;
}

.inventory-readiness-overview-meta strong {
    color: var(--text);
}

.inventory-readiness-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.inventory-readiness-check-panel {
    min-width: 0;
}

.inventory-readiness-check-panel .card-head {
    align-items: flex-start;
}

.inventory-readiness-check-panel .card-head h2 {
    margin-bottom: 4px;
}

.inventory-readiness-check-list {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.inventory-readiness-check {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas:
        "marker copy count"
        "marker copy action";
    gap: 2px 12px;
    align-items: center;
    min-height: 74px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: 12px;
    background: var(--surface-soft, #f6faf7);
    color: var(--text);
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.inventory-readiness-check:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.inventory-readiness-check.is-active {
    outline: 3px solid rgba(27, 119, 67, .17);
    outline-offset: 1px;
}

.inventory-readiness-check.is-attention {
    border-left-color: #ee9f17;
}

.inventory-readiness-check.is-clear {
    border-left-color: #21864c;
}

.inventory-readiness-check-marker {
    grid-area: marker;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff1d6;
    color: #8b4c00;
    font-weight: 900;
}

.inventory-readiness-check.is-clear .inventory-readiness-check-marker {
    background: #dff5e7;
    color: #126936;
}

.inventory-readiness-check-copy {
    grid-area: copy;
    display: grid;
    gap: 3px;
    min-width: 0;
}

.inventory-readiness-check-copy strong {
    line-height: 1.25;
}

.inventory-readiness-check-copy small {
    color: var(--muted);
    line-height: 1.3;
}

.inventory-readiness-check-count {
    grid-area: count;
    min-width: 54px;
    color: var(--text);
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    text-align: right;
}

.inventory-readiness-check-action {
    grid-area: action;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    text-align: right;
}

html[data-theme="dark"] .inventory-readiness-progress {
    background: #263d2e;
}

html[data-theme="dark"] .inventory-readiness-check {
    background: #15231b;
}

.inventory-readiness-bulk,
.inventory-opening-balance-department {
    margin-top: 18px;
}

.inventory-legacy-cost-summary {
    margin-bottom: 18px;
    border-top: 4px solid #b37a12;
}

.inventory-legacy-cost-summary .detail,
.inventory-legacy-cost-details .detail {
    gap: 5px;
}

.inventory-legacy-cost-summary .detail span,
.inventory-legacy-cost-details .detail span {
    color: var(--muted);
    font-size: .82rem;
}

.inventory-legacy-cost-card {
    margin-top: 18px;
    border-top: 4px solid #b37a12;
    scroll-margin-top: 90px;
}

.inventory-legacy-cost-form,
.inventory-legacy-cost-decision {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.inventory-legacy-cost-decision > label {
    display: grid;
    gap: 7px;
}

.inventory-opening-balance-cost-note {
    margin: 12px 0 0;
    line-height: 1.45;
}

.inventory-readiness-bulk-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.inventory-readiness-bulk-controls [data-bulk-field][hidden] {
    display: none !important;
}

.inventory-readiness-bulk-controls .inventory-readiness-bulk-wide {
    grid-column: span 2;
    min-width: 0;
}

.inventory-readiness-bulk-controls .inventory-readiness-bulk-wide .help {
    line-height: 1.35;
    white-space: normal;
}

[data-warranty-date-wrapper].is-disabled {
    opacity: 0.7;
}

.inventory-readiness-bulk-preview {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    border: 1px solid #cfe0d2;
    border-radius: 14px;
    background: #f5faf6;
    padding: 12px 14px;
}

.inventory-readiness-bulk-preview > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.inventory-readiness-bulk-preview strong,
.inventory-readiness-bulk-preview small {
    display: block;
}

.inventory-readiness-bulk-preview small {
    color: var(--muted);
}

.inventory-readiness-bulk-apply {
    grid-column: 1 / -1;
    justify-self: end;
    min-width: 230px;
}

html[data-theme="dark"] .inventory-readiness-bulk-preview {
    border-color: #355543;
    background: #15231b;
}

.inventory-readiness-issues {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inventory-readiness-issues span {
    border: 1px solid #efb06b;
    border-radius: 999px;
    background: #fff5e9;
    color: #8a4306;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
    padding: 4px 8px;
}

.inventory-readiness-issues span.is-advisory {
    border-color: #c9d5e8;
    background: #f2f6fb;
    color: #40546d;
}

.inventory-readiness-table td {
    vertical-align: top;
}

.inventory-readiness-review-grid {
    align-items: start;
}

.inventory-opening-balance-summary,
.inventory-opening-balance-department {
    break-inside: avoid;
}

.inventory-opening-balance-signatures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .9rem;
}

@media (max-width: 900px) {
    .inventory-readiness-overview,
    .inventory-readiness-groups,
    .inventory-readiness-bulk-controls,
    .inventory-opening-balance-signatures {
        grid-template-columns: 1fr;
    }

    .inventory-readiness-bulk-controls .inventory-readiness-bulk-wide {
        grid-column: span 1;
    }

    .inventory-readiness-overview > .button {
        justify-self: start;
    }

    .inventory-readiness-bulk-preview {
        align-items: flex-start;
        flex-direction: column;
    }

    .inventory-readiness-bulk-apply {
        justify-self: stretch;
        width: 100%;
    }
}

@media (max-width: 520px) {
    .inventory-readiness-overview-heading {
        align-items: flex-start;
    }

    .inventory-readiness-score {
        align-items: flex-start;
        flex-direction: column;
    }

    .inventory-readiness-check {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        gap: 2px 9px;
        padding: 10px;
    }

    .inventory-readiness-check-marker {
        width: 28px;
        height: 28px;
    }

    .inventory-readiness-check-count {
        min-width: 40px;
        font-size: 1.35rem;
    }
}

@media print {
    .inventory-opening-balance-department {
        box-shadow: none;
        border: 1px solid #b8c7b9;
        page-break-inside: avoid;
    }
}
.calendar-schedule-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.calendar-workflow-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.calendar-workflow-summary dl > div {
  border: 1px solid var(--line, #d8e3d8);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255,255,255,.72);
}
.calendar-workflow-summary dt {
  color: var(--muted, #607067);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.calendar-workflow-summary dd { margin: 5px 0 0; font-weight: 700; }
@media (max-width: 780px) {
  .calendar-schedule-type-options,
  .calendar-workflow-summary dl { grid-template-columns: 1fr; }
}

/* Compact activity scheduler: progressive disclosure keeps the primary form short. */
.calendar-settings-card { display: grid; gap: 14px; }
.calendar-settings-heading { align-items: center; margin: 0; }
.calendar-compact-summary {
  max-width: 48%;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 8%, var(--white));
  color: var(--primary);
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
}
.calendar-settings-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.calendar-settings-fieldset legend,
.calendar-visibility-select strong { display: block; margin-bottom: 6px; font-size: 12px; }
.calendar-schedule-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.calendar-schedule-type-options label { min-width: 0; cursor: pointer; }
.calendar-schedule-type-options label + label { border-left: 1px solid var(--border); }
.calendar-schedule-type-options input {
  inline-size: 0;
  block-size: 0;
  margin: 0;
  opacity: 0;
}
.calendar-schedule-type-options label > span[aria-hidden="true"] {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 8px 12px;
  background: var(--white);
  color: var(--primary);
  font-weight: 750;
  text-align: center;
}
.calendar-schedule-type-options input:checked + span {
  background: var(--primary);
  color: #fff;
}
.calendar-schedule-type-options input:focus-visible + span {
  position: relative;
  z-index: 1;
  outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: -3px;
}
.calendar-visibility-select label { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr); align-items: center; gap: 6px 14px; }
.calendar-visibility-select label > strong { margin: 0; }
.calendar-visibility-select select { min-height: 42px; }
.calendar-visibility-select small { grid-column: 2; color: var(--muted); }
.calendar-compact-picker { margin-top: 0; }
.calendar-conditional-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.calendar-conditional-head input { width: min(310px, 55%); }
.calendar-compact-picker .calendar-check-grid { max-height: 148px; overflow-y: auto; }
.calendar-summary-details { border-top: 1px solid var(--border); padding-top: 10px; }
.calendar-summary-details > summary,
.calendar-resource-section > summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 750;
}
.calendar-summary-details dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 0;
}
.calendar-summary-details dl > div { min-width: 0; padding: 9px; border: 1px solid var(--border); border-radius: 7px; }
.calendar-summary-details dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.calendar-summary-details dd { margin: 4px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.calendar-resource-section { padding: 0; overflow: clip; }
.calendar-resource-section > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  list-style-position: inside;
}
.calendar-resource-section > summary span:first-child { display: inline-grid; gap: 2px; }
.calendar-resource-section > summary small { color: var(--muted); font-weight: 500; }
.calendar-resource-section > summary span:last-child { white-space: nowrap; }
.calendar-resource-section[open] > summary { border-bottom: 1px solid var(--border); }
.calendar-resource-section-body { padding: 16px 18px 18px; }
html[data-theme="dark"] .calendar-schedule-type-options label > span[aria-hidden="true"],
html[data-theme="dark"] .calendar-compact-summary { background: #17251d; }
.calendar-schedule-type-options input:checked + span { background: var(--primary); }

@media (max-width: 820px) {
  .calendar-settings-heading { align-items: flex-start; }
  .calendar-compact-summary { max-width: 100%; text-align: left; }
  .calendar-visibility-select label { grid-template-columns: 1fr; }
  .calendar-visibility-select small { grid-column: 1; }
  .calendar-summary-details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .calendar-schedule-type-options { grid-template-columns: 1fr; border-radius: 8px; }
  .calendar-schedule-type-options label + label { border-top: 1px solid var(--border); border-left: 0; }
  .calendar-conditional-head { align-items: stretch; flex-direction: column; }
  .calendar-conditional-head input { width: 100%; }
  .calendar-summary-details dl { grid-template-columns: 1fr; }
  .calendar-resource-section > summary { align-items: flex-start; flex-direction: column; }
  .calendar-resource-section-body { padding: 13px; }
}
