:root {
  color-scheme: dark;
  --bg: #111111;
  --surface: #191919;
  --surface-2: #222222;
  --surface-3: #2b2b2b;
  --ink: #f3f3f3;
  --muted: #a4a4a4;
  --faint: #757575;
  --line: rgba(241, 241, 241, .14);
  --line-strong: rgba(241, 241, 241, .38);
  --accent: #f3f3f3;
  --accent-ink: #171717;
  --ok: #bfbfbf;
  --bad: #adadad;
  --warn: #cbcbcb;
  --scrollbar-track: #151515;
  --scrollbar-thumb: #383838;
  --scrollbar-thumb-hover: #505050;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f1f1f1;
  --surface-3: #e9e9e9;
  --ink: #1a1a1a;
  --muted: #6c6c6c;
  --faint: #8a8a8a;
  --line: rgba(24, 24, 24, .13);
  --line-strong: rgba(24, 24, 24, .36);
  --accent: #1a1a1a;
  --accent-ink: #ffffff;
  --ok: #646464;
  --bad: #545454;
  --warn: #6a6a6a;
  --scrollbar-track: #ededed;
  --scrollbar-thumb: #bdbdbd;
  --scrollbar-thumb-hover: #9c9c9c;
}
* { box-sizing: border-box; }
/* Thin square-edged custom scrollbars, styled to follow each account's theme. */
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: var(--scrollbar-track); }
*::-webkit-scrollbar-thumb { min-height: 24px; background: var(--scrollbar-thumb); border: 1px solid var(--scrollbar-track); border-radius: 0; }
*::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
*::-webkit-scrollbar-corner { background: var(--scrollbar-track); }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--bg); font: 13.78px/1.55 var(--sans); transition: background-color .2s, color .2s; }
html, body { cursor: url('/cursor.svg') 13 13, auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
a, button, .btn, summary, [role="button"] { cursor: url('/cursor.svg') 13 13, pointer; }
input:not([type="checkbox"]):not([type="radio"]), textarea { cursor: text; }
.app { display: flex; width: 100%; min-height: 100vh; background: var(--bg); }
.content { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.sidebar { position: sticky; top: 0; display: flex; width: 224px; height: 100vh; flex: 0 0 224px; flex-direction: column; padding: 25px 18px 18px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; letter-spacing: .06em; font: 12.72px var(--mono); }
.logo { display: block; width: 19px; height: 20px; background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.brand-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 7.42px; letter-spacing: .14em; }
.rail-code { margin: 38px 0 15px; color: var(--faint); font: 9.54px/1.45 var(--mono); letter-spacing: .16em; }
.sidebar nav { display: flex; flex-direction: column; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 9px 10px; color: var(--muted); border: 1px solid transparent; text-decoration: none; font-size: 12.72px; transition: color .15s, background .15s, border-color .15s; }
.sidebar nav a svg { width: 16px; height: 16px; }
.sidebar nav a .sidebar-notification-count { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; margin-left: auto; padding: 0 5px; color: var(--accent-ink); background: var(--accent); border-radius: 9px; font: 9.54px/1 var(--mono); }
.sidebar nav a:hover, .sidebar nav a.active { color: var(--ink); border-color: var(--line); background: var(--surface-2); }
.sidebar-foot { margin-top: auto; color: var(--faint); font: 9.54px/1.6 var(--mono); letter-spacing: .14em; }
.topbar { display: flex; align-items: center; gap: 25px; min-height: 84px; padding: 15px clamp(20px, 4vw, 56px); border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar-context { display: flex; flex: 0 0 210px; flex-direction: column; gap: 4px; }
.topbar-kicker { color: var(--faint); font: 9.54px var(--mono); letter-spacing: .16em; }
.topbar-title { font-size: 14.84px; }
.search { display: flex; align-items: center; gap: 9px; flex: 1; max-width: 500px; margin-left: auto; }
.search span { color: var(--muted); font-size: 19.08px; }
.search input { width: 100%; padding: 8px 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.search input::placeholder { color: var(--faint); }
.user { display: flex; align-items: center; gap: 12px; }
.who { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.who strong { font-size: 12.72px; font-weight: 500; }
.who small { margin-top: 3px; color: var(--muted); font: 9.54px var(--mono); text-transform: uppercase; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line-strong); border-radius: 0; font: 12.72px var(--mono); }
.theme-toggle { display: inline-grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 0; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.theme-toggle:hover { background: var(--surface-2); border-color: var(--line-strong); transform: rotate(-8deg); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:root:not([data-theme="light"]) .sun-icon { display: block; }
:root:not([data-theme="light"]) .moon-icon { display: none; }
:root[data-theme="light"] .sun-icon { display: none; }
:root[data-theme="light"] .moon-icon { display: block; }
main { width: 100%; padding: clamp(25px, 4vw, 58px) clamp(20px, 4vw, 56px) 64px; }
h1 { margin: 0 0 24px; font-size: clamp(29.68px, 3.18vw, 40.28px); font-weight: 450; letter-spacing: -.05em; }
h2 { margin: 34px 0 15px; font-size: 13.78px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 0 30px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.stat { display: flex; min-height: 104px; flex-direction: column; justify-content: space-between; padding: 16px; background: var(--surface); }
.stat span { color: var(--muted); font: 9.54px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.stat strong { font-size: 31.8px; font-weight: 400; letter-spacing: -.06em; }
.stat.hl { background: var(--surface-2); }
.card { max-width: 720px; padding: 22px; background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); font-size: 12.72px; }
th, td { padding: 14px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); background: var(--surface-2); font: 9.54px var(--mono); letter-spacing: .09em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
label { display: block; margin-bottom: 17px; color: var(--muted); font: 10.6px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
input, select, textarea { display: block; width: 100%; margin-top: 7px; padding: 10px 11px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 0; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--line-strong); }
textarea { min-height: 110px; resize: vertical; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline input, .inline select { width: auto; margin: 0; flex: 1 1 145px; }
.equipment-filters { margin-bottom: 18px; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
button, .btn, .share { display: inline-block; padding: 9px 15px; color: var(--accent-ink); background: var(--accent); border: 1px solid var(--accent); border-radius: 0; text-decoration: none; font-weight: 600; transition: .18s ease; }
button:hover, .btn:hover { filter: brightness(1.12); box-shadow: 0 4px 18px rgba(0, 0, 0, .1); }
button:active, .btn:active { transform: translateY(1px); }
button.share { padding: 7px 11px; color: var(--ink); background: transparent; border-color: var(--line-strong); font-size: 10.6px; }
button.share:hover { color: var(--accent-ink); background: var(--accent); }
button.link { padding: 0; color: var(--ink); background: none; border: 0; text-decoration: underline; font-weight: 400; }
/* Request actions stay text-only; hover/focus glows the label, never a box. */
.request-table .acts button.link,
table button.link {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
  filter: none;
  text-decoration: none;
  transition: color .18s ease, text-shadow .18s ease;
}
.request-table .acts button.link:hover,
.request-table .acts button.link:focus-visible,
table button.link:hover,
table button.link:focus-visible {
  color: #ffffff;
  background: transparent;
  border: 0;
  box-shadow: none;
  filter: none;
  text-shadow: 0 0 5px rgba(255, 255, 255, .85), 0 0 12px rgba(255, 255, 255, .5);
}
:root[data-theme="light"] .request-table .acts button.link:hover,
:root[data-theme="light"] .request-table .acts button.link:focus-visible,
:root[data-theme="light"] table button.link:hover,
:root[data-theme="light"] table button.link:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 255, 255, .85), 0 0 12px rgba(255, 255, 255, .5);
}
.acts { white-space: nowrap; }
.acts form { display: inline-block; margin: 0 12px 0 0; }
.acts form:last-child { margin-right: 0; }
.request-table-wrap { width: 100%; margin: 12px 0 20px; overflow-x: auto; }
.request-table { min-width: 1180px; table-layout: fixed; }
.request-table th { white-space: nowrap; }
.request-table th:nth-child(1) { width: 14%; }
.request-table th:nth-child(2) { width: 13%; }
.request-table th:nth-child(3) { width: 14%; }
.request-table th:nth-child(4) { width: 6%; }
.request-table th:nth-child(5) { width: 14%; }
.request-table th:nth-child(6) { width: 13%; }
.request-table th:nth-child(7) { width: 8%; }
.request-table th:nth-child(8) { width: 18%; }
.request-table td { overflow-wrap: anywhere; }
.request-table td.acts { min-width: 185px; overflow-wrap: normal; white-space: normal; }
.request-table tbody tr:nth-child(even) { background: var(--surface-2); }
.request-table td.acts > form { display: inline-block; width: auto; margin: 0 12px 8px 0; }
.request-table td.acts > form:last-child { margin-right: 0; }
.muted { color: var(--muted); }
.flash { margin: 0 0 20px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--ink); }
.flash.ok { color: var(--ok); border-left-color: var(--ok); }
.flash.error { color: var(--bad); border-left-color: var(--bad); }
.badge { padding: 3px 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 0; font: 9.54px var(--mono); text-transform: uppercase; }
.badge.approved, .badge.returned { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.badge.rejected, .badge.cancelled { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.badge.pending { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.category-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 18px; padding: 0; list-style: none; }
.category-chips li { padding: 5px 10px; color: var(--muted); border: 1px solid var(--line); font: 10.6px var(--mono); }
.return-dates summary { cursor: pointer; color: var(--muted); text-decoration: underline; }
.return-dates ul { margin: 5px 0 0; padding-left: 17px; }
.auth-body { background: var(--bg); }
.app.guest { position: relative; display: block; min-height: 100vh; background: var(--bg); }
.guest > .theme-toggle { position: absolute; z-index: 2; top: 24px; right: clamp(20px, 4vw, 56px); }
.guest .content { min-height: 100vh; }
.guest main { display: flex; min-height: 100vh; align-items: center; padding: clamp(70px, 10vw, 130px) clamp(24px, 10vw, 150px); }
.forced-password-layout { position: fixed; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: clamp(20px, 5vw, 48px); background: var(--bg); }
.forced-password-layout > main { width: min(100%, 560px); margin: 0; padding: 0; transform: translateX(85px); }
.forced-password-layout .auth-form-area { margin: 0; padding: clamp(24px, 5vw, 44px); background: var(--surface); border: 1px solid var(--line); }
.forced-password-layout .auth-form-area > form { width: min(100%, 420px); margin: 24px auto 0; }
.forced-password-layout .auth-form-area > form > button { display: block; margin: 16px auto 0; }
.forced-password-layout .auth-kicker { display: block; text-align: center; }
.forced-password-layout .auth-form-area > h1 { margin: 8px 0 12px; text-align: center; font-size: clamp(27.56px, 4.24vw, 36.04px); }
.forced-password-layout .auth-form-area > p:not(.flash) { max-width: 42ch; margin: 0 auto 24px; color: var(--muted); text-align: center; }
.auth-shell { display: grid; width: min(100%, 1320px); grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr); align-items: center; gap: clamp(42px, 9vw, 150px); margin: auto; }
.auth-intro { max-width: 580px; }
.auth-intro h1 { margin: 0 0 16px; font-size: clamp(57.24px, 9.54vw, 106px); font-weight: 500; letter-spacing: -.075em; line-height: .98; }
.auth-intro p { max-width: 420px; margin: 0; color: var(--muted); font-size: clamp(14.84px, 1.48vw, 18.02px); }
.auth-form-area { padding: 10px 0 10px clamp(28px, 5vw, 72px); border-left: 1px solid var(--line); }
.auth-card { width: 100%; max-width: none; padding: 0; border: 0; background: transparent; }
.auth-card label { margin-bottom: 24px; }
.auth-card input { margin-top: 8px; padding: 13px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; font-size: 14.84px; }
.auth-card input:focus { border-bottom-color: var(--ink); }
.auth-card input:focus,
.auth-card input:focus-visible {
  outline: none;
  outline-offset: 0;
  box-shadow: none;
}
.auth-card input:focus-visible {
  border: 0;
  border-bottom: 1px solid var(--ink);
}
.auth-card button { width: 100%; margin-top: 10px; padding: 13px 16px; }
.field-note { color: var(--muted); font-size: 11.66px; }
.auth-switch { margin-top: 23px; color: var(--muted); font-size: 11.66px; }
.auth-switch a { color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: none; }
@media (max-width: 900px) {
  .sidebar { width: 190px; flex-basis: 190px; }
  .topbar-context { flex-basis: 145px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); gap: 42px; }
  .guest main { padding-right: 7vw; padding-left: 7vw; }
}
@media (max-width: 700px) {
  .app:not(.guest) { min-height: 100vh; flex-direction: column; }
  .sidebar { position: relative; top: auto; width: 100%; height: auto; min-height: 0; flex: none; flex-direction: row; align-items: center; padding: 12px 15px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { flex: 1; flex-direction: row; justify-content: flex-end; gap: 3px; }
  .sidebar nav a { min-height: 38px; padding: 8px; }
  .sidebar nav a span, .rail-code, .sidebar-foot, .brand-copy { display: none; }
  .topbar { flex-wrap: wrap; min-height: auto; gap: 12px; padding: 14px 15px; }
  .topbar-context { flex: 1; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin: 3px 0 0; }
  .who { display: none; }
  .user { gap: 8px; }
  .topbar .theme-toggle { width: 36px; height: 36px; flex-basis: 36px; }
  main { padding: 25px 15px 42px; }
  h1 { font-size: 30.74px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .guest main { min-height: 100vh; padding: 90px 24px 48px; }
  .guest > .theme-toggle { top: 18px; right: 20px; }
  .auth-shell { width: min(100%, 520px); grid-template-columns: 1fr; gap: 35px; }
  .auth-intro h1 { font-size: clamp(50.88px, 14.84vw, 72.08px); }
  .auth-form-area { padding: 25px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Photo-led equipment cards: full-width grid, with the item name and image inside each box. */
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.catalog-heading h1 { margin: 5px 0 0; }
.catalog-kicker { color: var(--muted); font: 9.54px var(--mono); letter-spacing: .15em; }
.catalog-count { padding-bottom: 7px; color: var(--muted); font: 11.66px var(--mono); text-transform: uppercase; }
.equipment-grid, .admin-equipment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; width: 100%; }
.equipment-card, .admin-equipment-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color .18s, transform .18s; }
.equipment-card:hover, .admin-equipment-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.equipment-card-image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.equipment-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.equipment-card-body { display: flex; min-height: 215px; flex-direction: column; align-items: flex-start; padding: 17px; }
.equipment-card-meta { display: flex; width: 100%; justify-content: space-between; gap: 10px; color: var(--muted); font: 9.54px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.equipment-card-body h2 { margin: 13px 0 18px; font-size: 23.32px; font-weight: 500; letter-spacing: -.035em; text-transform: none; }
.equipment-card-stock { display: flex; width: 100%; justify-content: space-between; gap: 14px; padding-top: 11px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11.66px; }
.equipment-card-stock strong { color: var(--ink); font-weight: 500; }
.equipment-card .return-dates { margin-top: 10px; color: var(--muted); font-size: 11.66px; }
.equipment-card .equipment-request { width: 100%; margin-top: auto; padding: 9px 12px; text-align: center; }
.equipment-unavailable { margin-top: auto; padding-top: 18px; color: var(--faint); font-size: 11.66px; }
.admin-equipment-card .equipment-card-image { aspect-ratio: 16 / 10; }
.admin-equipment-editor { padding: 15px; }
.admin-item-form { display: grid; gap: 9px; }
.admin-item-form input, .admin-item-form select { width: 100%; margin: 0; min-width: 0; }
.admin-item-form button { margin-top: 4px; }
.admin-equipment-editor > form:last-child { margin-top: 12px; }
@media (max-width: 700px) {
  .equipment-grid, .admin-equipment-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
  .catalog-heading { align-items: center; }
  .equipment-card-body { min-height: 200px; padding: 14px; }
  .equipment-card-body h2 { font-size: 20.14px; }
}
@media (max-width: 480px) {
  .equipment-grid, .admin-equipment-grid { grid-template-columns: 1fr; }
}

/* Sidebar controls and profile popover */
.sidebar { overflow-y: auto; overscroll-behavior: contain; }
html[data-sidebar="hidden"] .app > .sidebar { display: none; }
.sidebar-toggle { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 0; }
.sidebar-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
html[data-sidebar="hidden"] .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar-toggle:hover { background: var(--surface-2); border-color: var(--line-strong); }
.topbar { gap: 17px; }
.topbar-context { flex-basis: 190px; }
.sidebar-controls { margin-top: 23px; padding-top: 16px; border-top: 1px solid var(--line); }
.sidebar-controls-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sidebar-controls-heading h2 { margin: 0; color: var(--muted); font-size: 10.6px; letter-spacing: .12em; }
.sidebar-controls-heading a { color: var(--muted); font-size: 10.6px; text-decoration: none; }
.sidebar-controls-heading a:hover { color: var(--ink); text-decoration: underline; }
.sidebar-filter-form { display: grid; gap: 8px; }
.sidebar-filter-form label { margin: 0; font-size: 9.54px; }
.sidebar-filter-form input, .sidebar-filter-form select { margin-top: 5px; padding: 8px 9px; font: 11.66px var(--sans); letter-spacing: 0; text-transform: none; }
.sidebar-filter-form button { width: 100%; margin-top: 4px; padding: 9px 10px; font-size: 11.66px; }
.account-menu { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 11px; padding: 4px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 0; text-align: left; }
.account-trigger:hover, .account-trigger:focus-visible { background: var(--surface); border-color: var(--line); box-shadow: none; }
.account-trigger .who { display: flex; }
.account-trigger .avatar { width: 36px; height: 36px; background: var(--surface); }
.account-popover[hidden] { display: none !important; }
.account-popover { position: absolute; z-index: 10; top: calc(100% + 9px); right: 0; width: 230px; padding: 15px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(0, 0, 0, .2); opacity: 0; transform: translateY(8px) scale(.98); transform-origin: top right; visibility: hidden; pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.account-popover.is-open { opacity: 1; transform: translateY(0) scale(1); visibility: visible; pointer-events: auto; transition: opacity .18s ease, transform .18s ease, visibility 0s; }
.account-popover .account-menu-name { display: block; overflow: hidden; color: var(--ink); font-size: 12.72px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-popover > small { display: block; overflow: hidden; margin: 3px 0 14px; color: var(--muted); font-size: 10.6px; text-overflow: ellipsis; white-space: nowrap; }
.account-popover form { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.account-popover .signout-button { width: 100%; padding: 9px 11px; color: var(--ink); background: transparent; border: 1px solid var(--line); text-align: left; }
.account-popover .signout-button:hover { background: var(--surface-2); box-shadow: none; }
@media (max-width: 700px) {
  .topbar { gap: 9px; }
  .topbar-context { flex-basis: auto; }
  .sidebar-toggle { width: 35px; height: 35px; flex-basis: 35px; }
  .sidebar { height: auto; max-height: 75vh; }
  .sidebar-controls { width: 100%; }
  .account-trigger { gap: 6px; }
  .account-trigger .who { display: none; }
  .account-popover { right: -2px; }
}

/* Sidebar identity and appearance controls sit together at the bottom edge. */
.sidebar-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.sidebar-bottom .account-menu { min-width: 0; flex: 1; }
.sidebar-bottom .account-trigger { width: 100%; min-width: 0; justify-content: flex-start; gap: 10px; padding: 4px; border-radius: 0; }
.sidebar-bottom .account-trigger .who { min-width: 0; flex: 1; text-align: left; }
.sidebar-bottom .account-trigger .who strong, .sidebar-bottom .account-trigger .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom .account-trigger .avatar { flex: 0 0 36px; }
.sidebar-bottom .theme-toggle { width: 38px; height: 38px; flex-basis: 38px; }
.sidebar .account-popover { top: auto; right: auto; bottom: calc(100% + 9px); left: 0; width: calc(100% + 46px); max-width: 260px; }
@media (max-width: 700px) {
  .sidebar-bottom { width: 100%; margin-top: 12px; }
  .sidebar-bottom .account-trigger .who { display: flex; }
}

/* Sidebar header now owns the minimize control. A slim rail remains so it can be reopened. */
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-bottom: 21px; }
.sidebar-heading .brand { min-width: 0; }
.sidebar-heading .sidebar-toggle { width: 34px; height: 34px; flex-basis: 34px; border-radius: 0; }
.sidebar nav { gap: 9px; }
.sidebar nav a { min-height: 46px; gap: 12px; padding: 11px 12px; }
.sidebar-controls { margin-top: 29px; padding-top: 19px; }
.sidebar-controls-heading { margin-bottom: 16px; }
.sidebar-filter-form { gap: 14px; }
.sidebar-filter-form label { margin-bottom: 0; }
.sidebar-filter-form input, .sidebar-filter-form select { margin-top: 7px; padding: 9px 10px; }
.sidebar-bottom { padding-top: 16px; }
html[data-sidebar="hidden"] .app > .sidebar { display: flex; width: 58px; flex: 0 0 58px; align-items: center; padding: 17px 9px; }
html[data-sidebar="hidden"] .sidebar-heading { justify-content: center; margin: 0; }
html[data-sidebar="hidden"] .sidebar-heading .brand,
html[data-sidebar="hidden"] .sidebar > nav,
html[data-sidebar="hidden"] .sidebar > .sidebar-controls,
html[data-sidebar="hidden"] .sidebar > .sidebar-bottom { display: none; }
html[data-sidebar="hidden"] .sidebar-heading .sidebar-toggle { flex-basis: 38px; width: 38px; height: 38px; }
@media (max-width: 700px) {
  .sidebar { flex-direction: column; align-items: stretch; gap: 10px; }
  .sidebar-heading { margin-bottom: 2px; }
  .sidebar nav { width: 100%; flex: none; justify-content: flex-start; }
  .sidebar-controls { width: 100%; margin-top: 12px; padding-top: 14px; }
  .sidebar-bottom { width: 100%; margin-top: 9px; }
  html[data-sidebar="hidden"] .app > .sidebar { width: 100%; height: auto; min-height: 58px; flex: none; align-items: flex-start; padding: 10px 14px; }
  html[data-sidebar="hidden"] .sidebar-heading { justify-content: flex-start; margin: 0; }
}

/* Cleaner icon controls and the requested white hover glow. */
.theme-toggle,
.sidebar-toggle {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.theme-toggle:hover,
.sidebar-toggle:hover {
  color: var(--ink);
  border: 0;
  background: transparent;
  box-shadow: 0 0 14px rgba(255, 255, 255, .55), 0 0 30px rgba(255, 255, 255, .26);
}
.avatar { border: 0; }
.avatar { position: relative; overflow: hidden; }
.avatar .avatar-initial { position: relative; z-index: 0; }
.avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.account-trigger { border: 0; }
.account-trigger:hover,
.account-trigger:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: 0 0 14px rgba(255, 255, 255, .45), 0 0 28px rgba(255, 255, 255, .2);
}
button:hover,
.btn:hover,
.account-popover .signout-button:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .38), 0 0 15px rgba(255, 255, 255, .48), 0 0 30px rgba(255, 255, 255, .24);
}
.account-popover .signout-button:hover { background: var(--surface-2); }

/* Reference-inspired equipment cards: quiet outlines, compact labels, oversized titles. */
.equipment-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  background: transparent;
  border: 0;
}
.equipment-card {
  position: relative;
  display: flex;
  min-height: 304px;
  aspect-ratio: 0.69;
  flex-direction: column;
  overflow: hidden;
  background: #101010;
  border: 1px solid var(--line);
  transition: outline-color .18s, background-color .18s;
}
@media (max-width: 1200px) {
  .equipment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .equipment-grid { grid-template-columns: minmax(0, 1fr); }
  .forced-password-layout > main { transform: none; }
}
.equipment-card:hover {
  z-index: 1;
  background: #141414;
  outline: 2px solid rgba(241, 241, 241, .48);
  outline-offset: -2px;
  transform: none;
}
.equipment-card-body {
  position: relative;
  display: flex;
  min-height: 0;
  height: 100%;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  padding: 15px 14px 13px;
}
.equipment-card-meta {
  align-items: center;
  gap: 8px;
  color: #797979;
  font-size: 8.48px;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: none;
}
.equipment-card-meta span:last-child { text-align: right; }
.equipment-card-body h2 {
  max-width: 100%;
  margin: 9px 0 0;
  color: #f0f0f0;
  font-size: clamp(22.26px, 2.33vw, 30.74px);
  font-weight: 550;
  line-height: 1.08;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.equipment-card-stock {
  justify-content: flex-end;
  gap: 5px;
  margin-top: auto;
  padding: 0;
  color: #777777;
  border: 0;
  font-size: 9.54px;
  line-height: 1.3;
}
.equipment-card-stock strong { color: #bcbcbc; font-weight: 400; }
.equipment-card .return-dates { margin-top: 7px; color: #8a8a8a; font-size: 9.54px; }
.equipment-card .return-dates summary { font-size: 9.54px; }
.equipment-card .equipment-request {
  width: 120px;
  align-self: center;
  margin: 10px auto 0;
  padding: 5px 10px;
  color: #171717;
  background: #f3f3f3;
  border: 1px solid #f3f3f3;
  font-size: 9.54px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0 6px rgba(255, 255, 255, .12);
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.equipment-card .equipment-request:hover {
  color: #111111;
  background: #ffffff;
  border-color: #ffffff;
  text-decoration: none;
  box-shadow: 0 0 9px rgba(255, 255, 255, .56), 0 0 20px rgba(255, 255, 255, .32);
}
.equipment-card .equipment-request:active { transform: translateY(1px); }
.equipment-unavailable { margin-top: 5px; padding: 0; color: #777777; font-size: 9.54px; }
@media (max-width: 1050px) {
  .equipment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equipment-card { min-height: 270px; }
  .equipment-card-body { padding: 13px 12px 11px; }
}
@media (max-width: 420px) {
  .equipment-grid { grid-template-columns: 1fr; }
  .equipment-card { min-height: 270px; aspect-ratio: 1.25; }
}

/* Smoothly animate the sidebar as it collapses to its slim reopen rail. */
.sidebar {
  overflow-x: hidden;
  transition: width .28s ease, flex-basis .28s ease, padding .28s ease;
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

/* Hover glow is applied to sidebar labels and icons, not their borders. */
.sidebar nav a:hover {
  color: #ffffff;
  border-color: transparent;
  background: transparent;
  text-shadow: 0 0 5px rgba(255, 255, 255, .8), 0 0 12px rgba(255, 255, 255, .5);
  box-shadow: none;
}
.sidebar nav a:hover svg {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .95)) drop-shadow(0 0 9px rgba(255, 255, 255, .55));
}
.sidebar-toggle:hover {
  color: #ffffff;
  box-shadow: none;
}
.sidebar-toggle:hover svg {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .95)) drop-shadow(0 0 9px rgba(255, 255, 255, .55));
}

/* Profile controls glow their text/icons on hover, never the surrounding box. */
.sidebar-bottom .account-trigger:hover,
.sidebar-bottom .account-trigger:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.sidebar-bottom .account-trigger:hover .avatar,
.sidebar-bottom .account-trigger:focus-visible .avatar {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 255, 255, .8), 0 0 12px rgba(255, 255, 255, .5);
}
.sidebar-bottom .account-trigger:hover .who,
.sidebar-bottom .account-trigger:focus-visible .who {
  text-shadow: 0 0 5px rgba(255, 255, 255, .8), 0 0 12px rgba(255, 255, 255, .5);
}
.account-popover:hover .account-menu-name,
.account-popover:hover > small {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 255, 255, .8), 0 0 12px rgba(255, 255, 255, .45);
}
.account-popover .signout-button:hover {
  color: #ffffff;
  border-color: transparent;
  background: transparent;
  text-shadow: 0 0 5px rgba(255, 255, 255, .85), 0 0 12px rgba(255, 255, 255, .5);
  box-shadow: none;
}

/* Theme toggle: no circular border or halo; glow only the sun/moon icon. */
.sidebar-bottom .theme-toggle,
.guest > .theme-toggle {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.sidebar-bottom .theme-toggle:hover,
.guest > .theme-toggle:hover {
  color: #ffffff;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.sidebar-bottom .theme-toggle:hover svg,
.guest > .theme-toggle:hover svg {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .95)) drop-shadow(0 0 9px rgba(255, 255, 255, .55));
}

/* Light theme: white equipment cards, black request buttons, black text/icon glows. */
:root[data-theme="light"] .equipment-card {
  color: #1a1a1a;
  background: #ffffff;
}
:root[data-theme="light"] .equipment-card:hover {
  background: #ffffff;
  outline-color: rgba(0, 0, 0, .28);
}
:root[data-theme="light"] .equipment-card-meta { color: #6c6c6c; }
:root[data-theme="light"] .equipment-card-body h2 { color: #1a1a1a; }
:root[data-theme="light"] .equipment-card-stock { color: #6c6c6c; }
:root[data-theme="light"] .equipment-card-stock strong { color: #1a1a1a; }
:root[data-theme="light"] .equipment-card .return-dates { color: #6c6c6c; }
:root[data-theme="light"] .equipment-unavailable { color: #6c6c6c; }
:root[data-theme="light"] .equipment-card .equipment-request {
  color: #ffffff;
  background: #1a1a1a;
  border-color: #1a1a1a;
  box-shadow: none;
}
:root[data-theme="light"] .equipment-card .equipment-request:hover {
  color: #ffffff;
  background: #1a1a1a;
  border-color: #1a1a1a;
  text-shadow: 0 0 5px rgba(255, 255, 255, .75), 0 0 12px rgba(255, 255, 255, .45);
  box-shadow: none;
}
:root[data-theme="light"] button:hover,
:root[data-theme="light"] .btn:hover,
:root[data-theme="light"] .share:hover,
:root[data-theme="light"] .account-popover .signout-button:hover {
  color: #111111;
  text-shadow: 0 0 5px rgba(0, 0, 0, .65), 0 0 12px rgba(0, 0, 0, .35);
  box-shadow: none;
}
:root[data-theme="light"] .equipment-card .equipment-request:hover {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 255, 255, .75), 0 0 12px rgba(255, 255, 255, .45);
}
:root[data-theme="light"] .sidebar nav a:hover,
:root[data-theme="light"] .sidebar-bottom .account-trigger:hover,
:root[data-theme="light"] .sidebar-bottom .account-trigger:focus-visible,
:root[data-theme="light"] .account-popover:hover .account-menu-name,
:root[data-theme="light"] .account-popover:hover > small {
  color: #111111;
  text-shadow: 0 0 5px rgba(0, 0, 0, .65), 0 0 12px rgba(0, 0, 0, .35);
}
:root[data-theme="light"] .sidebar nav a:hover svg,
:root[data-theme="light"] .sidebar-toggle:hover svg,
:root[data-theme="light"] .sidebar-bottom .theme-toggle:hover svg,
:root[data-theme="light"] .guest > .theme-toggle:hover svg {
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, .8)) drop-shadow(0 0 9px rgba(0, 0, 0, .4));
}
:root[data-theme="light"] .sidebar-bottom .account-trigger:hover .avatar,
:root[data-theme="light"] .sidebar-bottom .account-trigger:hover .who,
:root[data-theme="light"] .sidebar-bottom .account-trigger:focus-visible .avatar,
:root[data-theme="light"] .sidebar-bottom .account-trigger:focus-visible .who {
  text-shadow: 0 0 5px rgba(0, 0, 0, .65), 0 0 12px rgba(0, 0, 0, .35);
}
:root[data-theme="light"] .account-popover .signout-button:hover {
  color: #111111;
  border-color: transparent;
  background: transparent;
  text-shadow: 0 0 5px rgba(0, 0, 0, .65), 0 0 12px rgba(0, 0, 0, .35);
  box-shadow: none;
}

/* Keep sidebar filter submit labels white and softly glowing on the dark button in light mode. */
:root[data-theme="light"] .sidebar-filter-form > button:hover,
:root[data-theme="light"] .sidebar-filter-form > button:focus-visible {
  color: #ffffff;
  background: #1a1a1a;
  border-color: #1a1a1a;
  text-shadow: 0 0 5px rgba(255, 255, 255, .8), 0 0 12px rgba(255, 255, 255, .5);
  box-shadow: 0 0 9px rgba(255, 255, 255, .42), 0 0 20px rgba(255, 255, 255, .22);
  filter: none;
}


/* Animated split-screen authentication layout inspired by the supplied reference. */
.auth-body .guest main {
  min-height: 100vh;
  padding: 0;
  align-items: stretch;
  overflow: hidden;
}
.auth-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
  max-width: none;
  gap: 0;
  margin: 0;
  overflow: hidden;
  background: #0b0b0b;
}
.auth-form-panel,
.auth-art-panel {
  position: relative;
  display: flex;
  width: 50%;
  min-width: 50%;
  min-height: 100vh;
  transition: transform .62s cubic-bezier(.76, 0, .24, 1), opacity .62s ease;
}
.auth-form-panel {
  z-index: 2;
  align-items: center;
  justify-content: center;
  padding: clamp(72px, 10vw, 120px) clamp(28px, 9vw, 150px);
  color: #f4f4f4;
  background: #0b0b0b;
}
.auth-art-panel {
  z-index: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  color: #161616;
  background: #ffffff;
}
.auth-form-area {
  width: min(100%, 380px);
  padding: 0;
  border: 0;
}
.auth-kicker {
  margin-bottom: 58px;
  color: #dedede;
  font: 11.66px var(--mono);
  letter-spacing: .22em;
  text-align: center;
  text-transform: uppercase;
}
.auth-form-area h1 {
  display: none;
}
.auth-form-copy {
  display: none;
}
.auth-card label {
  margin-bottom: 27px;
  color: #b8b8b8;
  font-size: 11.66px;
  letter-spacing: .04em;
}
.auth-card input {
  margin-top: 7px;
  padding: 11px 0 12px;
  color: #f4f4f4;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #656565;
  border-radius: 0;
  font-size: 13.78px;
}
.auth-card input:focus {
  border-bottom-color: #f4f4f4;
  box-shadow: 0 6px 16px -14px #ffffff;
}
.auth-card button {
  position: relative;
  width: 106px;
  margin: 27px auto 0;
  padding: 11px 10px;
  color: #ededed;
  background: transparent;
  border: 0;
  font: 10.6px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.auth-card button::before,
.auth-card button::after {
  position: absolute;
  width: 10px;
  height: 10px;
  content: '';
  transition: width .2s ease, height .2s ease;
}
.auth-card button::before {
  top: 0;
  left: 0;
  border-top: 1px solid #868686;
  border-left: 1px solid #868686;
}
.auth-card button::after {
  right: 0;
  bottom: 0;
  border-right: 1px solid #868686;
  border-bottom: 1px solid #868686;
}
.auth-card button:hover {
  box-shadow: none;
  text-shadow: 0 0 8px rgba(255, 255, 255, .65);
}
.auth-card button:hover::before,
.auth-card button:hover::after {
  width: 100%;
  height: 100%;
}
.auth-switch {
  margin-top: 86px;
  color: #787878;
  font: 10.6px var(--mono);
  letter-spacing: .05em;
  text-align: center;
}
.auth-switch a {
  display: block;
  margin-top: 13px;
  color: #ededed;
  font-size: 10.6px;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
}
.auth-switch a:hover {
  text-shadow: 0 0 8px rgba(255, 255, 255, .72);
}
.auth-logo-glow {
  display: grid;
  width: 156px;
  height: 156px;
  place-items: center;
  border-radius: 0;
  background: radial-gradient(circle, rgba(245, 245, 245, .98) 0 39%, rgba(255, 255, 255, .82) 54%, rgba(255, 255, 255, 0) 73%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .08);
}
.auth-logo-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1.4px solid #777777;
  border-radius: 0;
}
.auth-logo-mark::before {
  position: absolute;
  top: -2px;
  left: 20px;
  width: 1px;
  height: 24px;
  background: #777777;
  content: '';
  transform: rotate(42deg);
  transform-origin: bottom center;
}
.auth-logo-mark span {
  position: absolute;
  right: -1px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-bottom: 1.4px solid #777777;
  border-left: 1.4px solid #777777;
  border-radius: 0;
  transform: rotate(2deg);
}
.auth-logo-caption {
  color: #a1a1a1;
  font: 9.54px var(--mono);
  letter-spacing: .2em;
}
.register-mode { flex-direction: row-reverse; }
.switch-to-register .auth-form-panel { transform: translateX(100%); }
.switch-to-register .auth-art-panel { transform: translateX(-100%); }
.switch-to-login .auth-form-panel { transform: translateX(-100%); }
.switch-to-login .auth-art-panel { transform: translateX(100%); }
.auth-body .flash.error {
  margin: 0 0 20px;
  color: #adadad;
  background: transparent;
  border-color: #adadad;
}
@media (max-width: 700px) {
  .auth-shell { min-height: 100svh; }
  .auth-form-panel,
  .auth-art-panel {
    width: 100%;
    min-width: 100%;
    min-height: 100svh;
  }
  .auth-form-panel { padding: 74px 30px 48px; }
  .auth-art-panel { padding: 48px 30px; }
  .auth-kicker { margin-bottom: 48px; }
  .auth-switch { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-form-panel,
  .auth-art-panel { transition: none; }
}


/* Supplied animated geometric logo, adapted into the white auth panel. */
.auth-logo-button {
  position: relative;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  padding: 0;
  color: #050505;
  background: transparent;
  border: 0;
  cursor: pointer;
  isolation: isolate;
}
.auth-logo-button:hover { box-shadow: none; }
.auth-logo-button:focus-visible { outline: 2px solid #050505; outline-offset: 12px; }
.auth-logo-svg {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 240ms ease;
}
.auth-logo-button:hover .auth-logo-svg { transform: scale(1.08); }
.auth-logo-button .orbit {
  stroke-dasharray: 74 52;
  transform-origin: 24px 24px;
  animation: orbit-rotation 8s linear infinite;
}
.auth-logo-button .orbit-secondary {
  opacity: .5;
  stroke-dasharray: 42 44;
  animation-duration: 5s;
  animation-direction: reverse;
}
.auth-logo-button .core {
  fill: currentColor;
  stroke: none;
  transform-origin: 24px 25px;
  animation: core-pulse 3s ease-in-out infinite;
}
.auth-logo-button .core-lines { stroke: #ffffff; stroke-width: 1.5; }
.auth-logo-button.is-shocking .auth-logo-svg { animation: logo-impact 650ms cubic-bezier(.2,.8,.2,1); }
.auth-logo-button .shockwave {
  position: fixed;
  z-index: 1;
  left: 75%;
  top: 50%;
  width: 100vmax;
  height: 100vmax;
  border: 2px solid #050505;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.02);
}
.auth-logo-button.is-shocking .shockwave:nth-child(1) { animation: full-screen-wave 2800ms cubic-bezier(.12,.7,.2,1) forwards; }
.auth-logo-button.is-shocking .shockwave:nth-child(2) { animation: full-screen-wave 2800ms 300ms cubic-bezier(.12,.7,.2,1) forwards; }
.auth-logo-button.is-shocking .shockwave:nth-child(3) { animation: full-screen-wave 2800ms 600ms cubic-bezier(.12,.7,.2,1) forwards; }
.auth-logo-button.is-shocking .shockwave:nth-child(4) { animation: full-screen-wave 2800ms 900ms cubic-bezier(.12,.7,.2,1) forwards; }
@keyframes full-screen-wave {
  0% { opacity: .85; transform: translate(-50%, -50%) scale(.02); }
  62% { opacity: .3; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.55); }
}
@keyframes orbit-rotation { to { transform: rotate(360deg); } }
@keyframes core-pulse { 0%, 100% { transform: scale(.92); opacity: .82; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes logo-impact { 0%, 100% { transform: scale(1); } 18% { transform: scale(.86); } 52% { transform: scale(1.16); } }
@media (prefers-reduced-motion: reduce) {
  .auth-logo-button .orbit,
  .auth-logo-button .core,
  .auth-logo-button.is-shocking .shockwave,
  .auth-logo-button.is-shocking .auth-logo-svg { animation: none !important; }
  .auth-logo-button.is-shocking .shockwave { opacity: 0; }
}


/* Final auth polish: larger mark, calmer shockwave, and centered auth controls. */
.auth-form-area {
  text-align: center;
}
.auth-form-area .auth-card {
  text-align: left;
}
.auth-logo-button {
  width: 260px;
  height: 260px;
}
.auth-logo-svg {
  width: 158px;
  height: 158px;
}
.auth-logo-button .shockwave {
  left: 75%;
}
.auth-logo-button.is-shocking .shockwave:nth-child(1) { animation-duration: 5200ms; }
.auth-logo-button.is-shocking .shockwave:nth-child(2) { animation-duration: 5200ms; animation-delay: 560ms; }
.auth-logo-button.is-shocking .shockwave:nth-child(3) { animation-duration: 5200ms; animation-delay: 1120ms; }
.auth-logo-button.is-shocking .shockwave:nth-child(4) { animation-duration: 5200ms; animation-delay: 1680ms; }
.auth-logo-caption { display: none; }


/* Reference match: compact centered fields and corner-line action buttons. */
.auth-form-area {
  width: min(100%, 360px);
}
.auth-kicker {
  margin-bottom: 76px;
  font-size: 12.72px;
  letter-spacing: .2em;
}
.auth-card label {
  margin-bottom: 29px;
}
.auth-password-field {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 8px;
  border-bottom: 1px solid var(--line);
}
.auth-password-field:focus-within { border-bottom-color: var(--ink); }
.auth-password-group { margin-bottom: 18px; }
.auth-password-group > label { display: block; margin: 0; color: #b8b8b8; font-size: 11.66px; }
.auth-password-field input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 13px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.auth-password-field input::placeholder { color: #a4a4a4; opacity: 1; }
.password-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle [data-icon-hide] { display: none; }
.password-toggle[aria-pressed="true"] [data-icon-show] { display: none; }
.password-toggle[aria-pressed="true"] [data-icon-hide] { display: block; }
.auth-card .password-toggle {
  position: relative;
  flex: 0 0 28px;
  display: grid;
  width: 28px;
  height: 28px;
  margin: 0 0 0 8px;
  place-items: center;
  padding: 0;
  color: #a7a7a7;
  background: transparent;
  border: 0;
  font-size: 13.78px;
  line-height: 1;
  align-self: center;
  transform: none;
}
.password-toggle,
.password-toggle:hover,
.password-toggle:focus-visible,
:root[data-theme="light"] .auth-card .password-toggle:hover,
:root[data-theme="light"] .auth-card .password-toggle:focus-visible {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}
.auth-card .password-toggle::before,
.auth-card .password-toggle::after,
.auth-card .password-toggle:hover::before,
.auth-card .password-toggle:hover::after,
.auth-card .password-toggle:focus-visible::before,
.auth-card .password-toggle:focus-visible::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  content: none !important;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: #ffffff;
}
.password-toggle:hover svg,
.password-toggle:focus-visible svg {
  filter: drop-shadow(0 0 3px currentColor) drop-shadow(0 0 7px currentColor);
}
:root[data-theme="light"] .auth-card .password-toggle:hover,
:root[data-theme="light"] .auth-card .password-toggle:focus-visible {
  color: #1a1a1a;
}
:root[data-theme="light"] .auth-card .password-toggle:hover svg,
:root[data-theme="light"] .auth-card .password-toggle:focus-visible svg {
  filter: drop-shadow(0 0 3px rgba(26, 26, 26, .7)) drop-shadow(0 0 7px rgba(26, 26, 26, .45));
}

.auth-card button:not(.password-toggle) {
  width: 106px;
  margin: 48px auto 0;
  padding: 11px 10px;
  background:
    linear-gradient(#868686, #868686) left top / 11px 1px no-repeat,
    linear-gradient(#868686, #868686) left top / 1px 11px no-repeat,
    linear-gradient(#868686, #868686) right top / 11px 1px no-repeat,
    linear-gradient(#868686, #868686) right top / 1px 11px no-repeat,
    linear-gradient(#868686, #868686) left bottom / 11px 1px no-repeat,
    linear-gradient(#868686, #868686) left bottom / 1px 11px no-repeat,
    linear-gradient(#868686, #868686) right bottom / 11px 1px no-repeat,
    linear-gradient(#868686, #868686) right bottom / 1px 11px no-repeat;
}
.auth-card button:not(.password-toggle)::before,
.auth-card button:not(.password-toggle)::after { display: none; }
.auth-card button:not(.password-toggle):hover {
  background:
    linear-gradient(#ffffff, #ffffff) left top / 100% 1px no-repeat,
    linear-gradient(#ffffff, #ffffff) left bottom / 100% 1px no-repeat,
    linear-gradient(#ffffff, #ffffff) left top / 1px 100% no-repeat,
    linear-gradient(#ffffff, #ffffff) right top / 1px 100% no-repeat;
}
.auth-switch {
  margin-top: 86px;
  text-align: center;
}
.auth-logo-button .shockwave {
  border-width: 4px;
}
@media (max-width: 700px) {
  .auth-kicker { margin-bottom: 58px; }
  .auth-logo-button { width: 230px; height: 230px; }
  .auth-logo-svg { width: 142px; height: 142px; }
}


/* Placeholder-led auth fields from the reference crop. */
.auth-card > label {
  font-size: 0;
  text-align: left;
}
.auth-card > label input {
  font-size: 13.78px;
}
.auth-card > label input::placeholder {
  color: #787878;
  opacity: 1;
}
.auth-card button:not(.password-toggle) {
  display: block;
  height: 35px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}


/* Compact reference spacing. */
.auth-kicker { margin-bottom: 42px; }
.auth-card label { margin-bottom: 18px; }
.auth-card button:not(.password-toggle) { margin-top: 26px; }
.auth-switch { margin-top: 42px; }
@media (max-width: 700px) {
  .auth-kicker { margin-bottom: 34px; }
  .auth-card label { margin-bottom: 16px; }
  .auth-switch { margin-top: 34px; }
}


/* Auth hover: preserve corner lines and glow only the lettering. */
.auth-card button:not(.password-toggle):hover {
  color: #ffffff;
  background:
    linear-gradient(#868686, #868686) left top / 11px 1px no-repeat,
    linear-gradient(#868686, #868686) left top / 1px 11px no-repeat,
    linear-gradient(#868686, #868686) right top / 11px 1px no-repeat,
    linear-gradient(#868686, #868686) right top / 1px 11px no-repeat,
    linear-gradient(#868686, #868686) left bottom / 11px 1px no-repeat,
    linear-gradient(#868686, #868686) left bottom / 1px 11px no-repeat,
    linear-gradient(#868686, #868686) right bottom / 11px 1px no-repeat,
    linear-gradient(#868686, #868686) right bottom / 1px 11px no-repeat;
  box-shadow: none;
  text-shadow: 0 0 5px rgba(255, 255, 255, .9), 0 0 13px rgba(255, 255, 255, .55);
}
.auth-switch a:hover,
.auth-switch a:focus-visible {
  color: #ffffff;
  box-shadow: none;
  text-shadow: 0 0 5px rgba(255, 255, 255, .9), 0 0 13px rgba(255, 255, 255, .55);
}


/* Registration CTA and logo-origin shockwave fix. */
.register-mode .auth-card button:not(.password-toggle) {
  width: 168px;
}
.auth-logo-button .shockwave {
  position: absolute;
  left: 50%;
  top: 50%;
}


/* Only the two panels slide; swapped form content does not fade or animate. */
.auth-form-area {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}
.auth-form-panel,
.auth-art-panel {
  transition: transform .62s cubic-bezier(.76, 0, .24, 1) !important;
}
@media (prefers-reduced-motion: reduce) {
  .auth-form-panel,
  .auth-art-panel { transition: none !important; }
}


/* Admin equipment image uploads. */
.image-upload-field {
  display: flex;
  min-width: 180px;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font: 9.54px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.image-upload-field input[type="file"] {
  width: 100%;
  margin: 0;
  padding: 7px 8px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  font: 11.66px var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.image-upload-field small {
  color: var(--faint);
  font: 9.54px/1.35 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.admin-item-form .image-upload-field {
  grid-column: 1 / -1;
}


/* Shared supplied moving logo for the authenticated portal brand. */
.brand-logo {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
}
.brand-logo svg {
  width: 24px;
  height: 24px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-orbit {
  stroke-dasharray: 74 52;
  transform-origin: 24px 24px;
  animation: orbit-rotation 8s linear infinite;
}
.brand-orbit-secondary {
  opacity: .5;
  stroke-dasharray: 42 44;
  animation-duration: 5s;
  animation-direction: reverse;
}
.brand-core {
  fill: currentColor;
  stroke: none;
  transform-origin: 24px 25px;
  animation: core-pulse 3s ease-in-out infinite;
}
.brand-core-lines {
  stroke: var(--bg);
  stroke-width: 1.5;
}
@media (prefers-reduced-motion: reduce) {
  .brand-orbit,
  .brand-core { animation: none; }
}


/* Keep one consistent custom cursor across the app; only its monochrome glow follows the theme. */
:root { --forced-cursor: url('/cursor-dark.png') 4 3, default; }
:root[data-theme="light"] { --forced-cursor: url('/cursor-light.png') 4 3, default; }
html, body, body *, body *::before, body *::after {
  cursor: var(--forced-cursor) !important;
}

/* Fixed theme-aware cursor: one static glowing circle across all page and hover states. */
:root { cursor: url('/cursor.svg') 16 16, auto; }
:root * { cursor: url('/cursor.svg') 16 16, auto !important; }
:root a, :root button, :root .btn, :root summary, :root [role="button"] {
  cursor: url('/cursor.svg') 16 16, pointer !important;
}
:root[data-theme="light"] { cursor: url('/cursor-light.svg') 16 16, auto; }
:root[data-theme="light"] * { cursor: url('/cursor-light.svg') 16 16, auto !important; }
:root[data-theme="light"] a,
:root[data-theme="light"] button,
:root[data-theme="light"] .btn,
:root[data-theme="light"] summary,
:root[data-theme="light"] [role="button"] {
  cursor: url('/cursor-light.svg') 16 16, pointer !important;
}

/* Keep the same cursor while elements are hovered, focused, or pressed. */
:root *,
:root *:hover,
:root *:active,
:root *:focus,
:root *:focus-visible,
:root *:focus-within {
  cursor: url('/cursor.svg') 16 16, auto !important;
}
:root[data-theme="light"] *,
:root[data-theme="light"] *:hover,
:root[data-theme="light"] *:active,
:root[data-theme="light"] *:focus,
:root[data-theme="light"] *:focus-visible,
:root[data-theme="light"] *:focus-within {
  cursor: url('/cursor-light.svg') 16 16, auto !important;
}

/* The overlay remains unchanged on hover, focus, press, and input fields. */
:root[data-custom-cursor="active"],
:root[data-custom-cursor="active"] *,
:root[data-custom-cursor="active"] *:hover,
:root[data-custom-cursor="active"] *:active,
:root[data-custom-cursor="active"] *:focus,
:root[data-custom-cursor="active"] *:focus-visible,
:root[data-custom-cursor="active"] *:focus-within {
  cursor: none !important;
}
#custom-cursor {
  position: fixed;
  z-index: 2147483647;
  top: var(--custom-cursor-y, 0px);
  left: var(--custom-cursor-x, 0px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 5px 2px rgba(255, 255, 255, .95),
              0 0 13px 6px rgba(255, 255, 255, .58),
              0 0 25px 11px rgba(255, 255, 255, .28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: none;
  will-change: left, top;
}
#custom-cursor.is-visible { opacity: 1; }
:root[data-custom-cursor-positioned="true"] #custom-cursor { opacity: 1; }
:root[data-theme="light"] #custom-cursor {
  background: #111;
  box-shadow: 0 0 5px 2px rgba(0, 0, 0, .88),
              0 0 13px 6px rgba(0, 0, 0, .44),
              0 0 25px 11px rgba(0, 0, 0, .2);
}

/* Apply the final login/register layout without starting another panel movement. */
.auth-switch-settle .auth-form-panel,
.auth-switch-settle .auth-art-panel {
  transition: none !important;
}

/* CSPC Equipment Desk first-visit loading intro, reusing the exact login-screen logo. */
.site-intro {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #f4f4f4;
  background: radial-gradient(circle at 50% 44%, #171717 0, #0b0b0b 58%, #050505 100%);
  opacity: 1;
  transition: opacity .45s ease;
  will-change: opacity;
}
html[data-intro-seen="true"] #site-intro,
#site-intro.is-complete {
  display: none !important;
}
#site-intro.is-exiting {
  opacity: 0;
  pointer-events: none;
}
.site-intro-content {
  display: flex;
  width: min(100%, 380px);
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.site-intro-logo {
  position: relative;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  color: #050505;
  background: radial-gradient(circle, rgba(245, 245, 245, .98) 0 39%, rgba(255, 255, 255, .82) 54%, rgba(255, 255, 255, 0) 73%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .08);
  opacity: 0;
  animation: cspc-intro-logo-fade-in .45s ease-out both;
  transform: translateX(0);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
@keyframes cspc-intro-logo-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.site-intro-logo .auth-logo-svg {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-intro-logo .orbit {
  stroke-dasharray: 74 52;
  transform-origin: 24px 24px;
  animation: orbit-rotation 8s linear infinite;
}
.site-intro-logo .orbit-secondary {
  opacity: .5;
  stroke-dasharray: 42 44;
  animation-duration: 5s;
  animation-direction: reverse;
}
.site-intro-logo .core {
  fill: currentColor;
  stroke: none;
  transform-origin: 24px 25px;
  animation: core-pulse 3s ease-in-out infinite;
}
.site-intro-logo .core-lines {
  stroke: #ffffff;
  stroke-width: 1.5;
}
#site-intro.is-exiting .site-intro-logo {
  transform: translateX(25vw);
}
.site-intro-tagline {
  margin: 0;
  color: #e6e6e6;
  font: 12.72px var(--mono);
  font-weight: 600;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .38s ease, transform .38s ease;
}
.site-intro-tagline[hidden] {
  display: none;
}
.site-intro-tagline.is-visible {
  opacity: 1;
  transform: translateY(0);
}
#site-intro.is-exiting .site-intro-tagline {
  opacity: 0;
  transform: translateY(-4px);
}
@media (max-width: 700px) {
  #site-intro.is-exiting .site-intro-logo {
    transform: scale(.88);
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-intro,
  .site-intro-logo,
  .site-intro-tagline {
    transition: none;
  }
  .site-intro-logo {
    opacity: 1;
    animation: none;
  }
  .site-intro-logo .orbit,
  .site-intro-logo .core {
    animation: none;
  }
}


/* Private borrower/admin chat */
.chat-page { display: flex; max-width: 1180px; flex-direction: column; gap: 18px; }
.chat-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.chat-page-heading h1 { margin: 6px 0 5px; }
.chat-page-heading p, .chat-inbox-header p, .chat-thread-header p { margin: 0; color: var(--muted); font-size: 12.72px; }
.chat-kicker { color: var(--muted); font: 9.54px var(--mono); letter-spacing: .16em; }
.chat-status { padding-bottom: 7px; color: var(--muted); font: 10.6px var(--mono); text-align: right; }
.chat-status.is-error { color: var(--danger, #e27676); }
.chat-layout { display: grid; min-height: 560px; gap: 14px; }
.chat-layout-admin { grid-template-columns: minmax(210px, 275px) minmax(0, 1fr); }
.chat-layout-borrower { grid-template-columns: minmax(0, 1fr); }
.chat-panel { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.chat-inbox { display: flex; max-height: 680px; flex-direction: column; }
.chat-inbox-header { padding: 17px 18px; border-bottom: 1px solid var(--line); }
.chat-inbox-header h2, .chat-thread-header h2 { margin: 0 0 6px; font-size: 16.96px; font-weight: 500; }
.chat-conversation-list { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow-y: auto; }
.chat-conversation { display: flex; width: 100%; flex-direction: column; gap: 5px; padding: 14px 16px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; text-align: left; cursor: pointer; font: 400 12.72px/1.35 var(--sans); }
.chat-conversation:hover, .chat-conversation.is-active { background: var(--surface-2); }
.chat-conversation:hover { box-shadow: none !important; }
.chat-conversation.is-active { border-left-color: var(--accent); }
.chat-conversation { position: relative; }
.chat-conversation.is-active::before {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: -4px;
  width: 22px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 35%, transparent) 0,
    color-mix(in srgb, var(--accent) 65%, transparent) 2px,
    var(--accent) 4px 6px,
    color-mix(in srgb, var(--accent) 62%, transparent) 6px,
    color-mix(in srgb, var(--accent) 35%, transparent) 12px,
    color-mix(in srgb, var(--accent) 12%, transparent) 16px,
    transparent 22px);
  content: '';
  pointer-events: none;
}
.chat-conversation-top { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; line-height: 1.25; }
.chat-conversation-top strong { min-width: 0; overflow: hidden; flex: 1 1 auto; font-size: 12.72px; font-weight: 550; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.chat-conversation-email, .chat-conversation-preview { display: block; min-width: 0; max-width: 100%; overflow: hidden; color: var(--muted); font: 400 10.6px/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.chat-conversation-preview { color: var(--faint); }
.chat-unread-badge { display: inline-grid; min-width: 19px; height: 19px; flex: 0 0 auto; place-items: center; padding: 0 5px; color: var(--bg); background: var(--accent); border-radius: 99px; font: 10.6px var(--mono); }
.chat-thread { display: flex; min-height: 560px; flex-direction: column; }
.chat-thread-header { padding: 18px 21px; border-bottom: 1px solid var(--line); }
.chat-thread-header h2 { overflow-wrap: anywhere; }
.chat-messages { display: flex; min-height: 270px; max-height: 560px; flex: 1; flex-direction: column; gap: 12px; overflow-y: auto; padding: 18px; }
.chat-empty { margin: auto; padding: 20px; color: var(--muted); font-size: 12.72px; text-align: center; }
.chat-inbox-empty { margin: 0; }
.chat-message { max-width: min(82%, 620px); align-self: flex-start; padding: 10px 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; }
.chat-message.is-own { align-self: flex-end; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px 12px 3px 12px; }
.chat-message-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 5px; color: var(--muted); font: 9.54px var(--mono); }
.chat-message-body { margin: 0; color: var(--ink); font-size: 13.78px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-composer { display: flex; flex-direction: column; gap: 9px; padding: 14px; border-top: 1px solid var(--line); }
.chat-composer textarea { width: 100%; min-height: 78px; max-height: 180px; margin: 0; resize: vertical; }
.chat-composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-composer-footer p { margin: 0; color: var(--muted); font-size: 10.6px; }
.chat-composer-footer button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 900px) {
  .chat-layout-admin { grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .chat-page-heading { align-items: flex-start; flex-direction: column; }
  .chat-status { padding-bottom: 0; text-align: left; }
  .chat-layout-admin { grid-template-columns: minmax(0, 1fr); }
  .chat-inbox { max-height: 230px; }
  .chat-thread { min-height: 500px; }
  .chat-messages { min-height: 260px; padding: 13px; }
  .chat-message { max-width: 92%; }
  .chat-composer { padding: 11px; }
  .chat-composer-footer { align-items: flex-end; }
}


/* Full-bleed equipment cards: imagery sits behind the editorial card content. */
.equipment-card {
  isolation: isolate;
}
.equipment-card::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 7, 7, .76) 0%, rgba(7, 7, 7, .34) 34%, rgba(7, 7, 7, .78) 100%),
    linear-gradient(90deg, rgba(7, 7, 7, .22), transparent 62%);
  transition: background .2s ease;
}
.equipment-card-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  background: #101010;
}
.equipment-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .72;
  filter: grayscale(.16) contrast(1.04) saturate(.84);
  transition: opacity .25s ease, transform .35s ease, filter .25s ease;
}
.equipment-card:hover .equipment-card-image img {
  opacity: .84;
  filter: grayscale(0) contrast(1.05) saturate(.94);
  transform: scale(1.035);
}
.equipment-card:hover::after {
  background:
    linear-gradient(180deg, rgba(7, 7, 7, .7) 0%, rgba(7, 7, 7, .28) 34%, rgba(7, 7, 7, .74) 100%),
    linear-gradient(90deg, rgba(7, 7, 7, .18), transparent 62%);
}
.equipment-card-body {
  z-index: 2;
}
@media (max-width: 420px) {
  .equipment-card { aspect-ratio: 1.25; }
}

/* Image blending: keep the card transparent so the subject fades into the page instead of sitting on a gray tile. */
.equipment-card,
.admin-equipment-card { background: transparent; }
.equipment-card::after { display: none; }
.equipment-card-image { background: transparent; border: 0; }
.equipment-card-image img {
  opacity: .95;
  mix-blend-mode: screen;
  filter: grayscale(.08) contrast(1.02) saturate(.9);
}
.equipment-card:hover .equipment-card-image img {
  opacity: 1;
  filter: grayscale(0) contrast(1.04) saturate(1);
}
.equipment-card-body {
  background: linear-gradient(180deg, rgba(7, 7, 7, .16), transparent 42%, rgba(7, 7, 7, .28));
}

/* Admin stock workspace: filters stay in the left control panel and edits save together. */
.admin-stock-heading,
.admin-items-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.admin-stock-heading { margin-bottom: 24px; }
.admin-stock-heading h1 { margin: 5px 0 0; }
.admin-items-toolbar { margin-top: 34px; margin-bottom: 15px; align-items: center; }
.admin-items-toolbar h2 { margin: 0; }
.admin-equipment-grid {
  align-items: stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.admin-equipment-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
}
.admin-equipment-card .equipment-card-image {
  position: relative;
  inset: auto;
  height: 170px;
  flex: 0 0 170px;
}
.admin-equipment-card .equipment-card-image img { object-position: center; }
.admin-equipment-editor {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}
.admin-item-fields { display: grid; gap: 10px; }
.admin-item-fields label { margin: 0; }
.admin-item-fields input,
.admin-item-fields select { width: 100%; margin-top: 5px; min-width: 0; }
.admin-item-fields .image-upload-field small {
  display: block;
  margin-top: 5px;
  color: var(--faint);
  font: 9.54px/1.45 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.admin-delete-button {
  align-self: flex-start;
  margin-top: 14px;
  text-decoration: none;
}
.admin-delete-button.link { text-decoration: none; }
.admin-delete-button,
.admin-delete-button:hover,
.admin-delete-button:focus-visible {
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
  text-shadow: none;
}
.admin-delete-button:hover,
.admin-delete-button:focus-visible {
  text-decoration: none;
  text-shadow: 0 0 7px rgba(255, 255, 255, .9), 0 0 18px rgba(255, 255, 255, .46);
}
/* Client-side images are contained slightly inside the card so they do not feel oversized. */
.equipment-card:not(.admin-equipment-card) .equipment-card-image img {
  width: 86%;
  height: 86%;
  margin: 7% auto;
  object-fit: contain;
}
html[data-sidebar="hidden"] .admin-equipment-grid {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1050px) {
  .admin-equipment-grid,
  html[data-sidebar="hidden"] .admin-equipment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .admin-equipment-grid,
  html[data-sidebar="hidden"] .admin-equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .admin-stock-heading,
  .admin-items-toolbar { align-items: flex-start; }
  .admin-stock-heading { flex-direction: column; gap: 5px; }
  .admin-items-toolbar { flex-wrap: wrap; }
  .admin-items-toolbar button { width: 100%; }
}
@media (max-width: 480px) {
  .admin-equipment-grid,
  html[data-sidebar="hidden"] .admin-equipment-grid { grid-template-columns: 1fr; }
}

/* No glow on the name/email text inside the account popup. */
.account-popover .account-menu-name,
.account-popover > small,
.account-popover:hover .account-menu-name,
.account-popover:hover > small,
:root[data-theme="light"] .account-popover:hover .account-menu-name,
:root[data-theme="light"] .account-popover:hover > small {
  text-shadow: none !important;
}


/* Custom in-page department menu (native select popups bypass the glowing cursor). */
.department-select { position: relative; z-index: 1; display: block; width: 100%; min-width: 0; margin-top: 7px; font: 13.78px/1.4 var(--mono); letter-spacing: 0; text-transform: none; }
.department-select:focus-within { z-index: 30; }
.department-select input[type="hidden"] { display: none !important; }
.auth-card .department-select button.department-select-trigger {
  display: flex;
  width: 100%;
  height: auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  font: 13.78px/1.4 var(--mono);
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
.auth-card .department-select button.department-select-trigger:hover,
.auth-card .department-select button.department-select-trigger:focus-visible,
.auth-card .department-select button.department-select-trigger:active {
  color: var(--ink);
  background: var(--bg);
  border-color: var(--line-strong);
  box-shadow: none;
  filter: none;
  text-shadow: none;
  transform: none;
  outline: none;
}
.department-select:not(.has-value) [data-department-label] { color: #b8b8b8; }
.department-select-trigger [data-department-label] { display: block; min-width: 0; overflow: hidden; flex: 1 1 auto; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.department-select:not(.has-value) .department-select-trigger [data-department-label] { color: #b8b8b8; }
.department-select-trigger,
.department-select-menu { border-radius: 8px; }

/* White CSPCean authentication refresh. */
.auth-body {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --ink: #111111;
  --muted: #686868;
  --faint: #9a9a9a;
  --line: rgba(17, 17, 17, .14);
  --line-strong: rgba(17, 17, 17, .42);
  color: #111111;
  background: #ffffff;
}
.auth-body .app.guest,
.auth-body .guest main,
.auth-body .auth-shell { background: #ffffff; }
.auth-body .auth-form-panel { color: #111111; background: #ffffff; }
.auth-body .auth-art-panel { position: relative; display: flex; width: 50%; min-width: 50%; min-height: 100vh; align-items: center; justify-content: center; overflow: hidden; background: #ffffff; }
.auth-body .auth-form-area { width: min(100%, 420px); }
.auth-body .auth-form-area, .auth-body .auth-form-area input, .auth-body .auth-form-area button, .auth-body .auth-form-area a { font-family: var(--sans); }
.auth-body .auth-welcome { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 34px; color: #111111; font: 23.32px/1.1 var(--sans); letter-spacing: -.045em; }
.auth-body .auth-welcome-logo { display: inline-grid; width: 38px; height: 38px; place-items: center; color: #111111; }
.auth-body .auth-welcome-logo .auth-logo-svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.auth-body .auth-welcome-logo .orbit { stroke-dasharray: 74 52; transform-origin: 24px 24px; animation: orbit-rotation 8s linear infinite; }
.auth-body .auth-welcome-logo .orbit-secondary { opacity: .5; stroke-dasharray: 42 44; animation: orbit-rotation 5s linear infinite reverse; }
.auth-body .auth-welcome-logo .core { fill: currentColor; stroke: none; transform-origin: 24px 25px; animation: core-pulse 3s ease-in-out infinite; }
.auth-body .auth-welcome-logo .core-lines { stroke: #ffffff; stroke-width: 1.5; }
.auth-body .auth-kicker { margin-bottom: 34px; color: #111111; }
.auth-body .auth-card > label { color: #777777; }
.auth-body .auth-card input { color: #111111; border-bottom-color: rgba(17,17,17,.32); }
.auth-body .auth-card input::placeholder { color: #858585; }
.auth-body .auth-card input:focus { border-bottom-color: #111111; box-shadow: 0 6px 16px -14px #111111; }
.auth-body .auth-card button:not(.password-toggle) { color: #111111; }
.auth-body .auth-card button:not(.password-toggle):hover { color: #111111; text-shadow: 0 0 5px rgba(0,0,0,.3); }
.auth-body .auth-switch { color: #858585; }
.auth-body .auth-switch a { color: #111111; }
.auth-body .auth-switch a:hover, .auth-body .auth-switch a:focus-visible { color: #111111; text-shadow: 0 0 5px rgba(0,0,0,.32); }
.auth-body .auth-divider { color: #999999; }
.auth-body .google-sign-in { color: #111111; border-color: rgba(17,17,17,.35); }
.auth-body .google-sign-in:hover, .auth-body .google-sign-in:focus-visible { color: #111111; background: #f5f5f5; border-color: #111111; }
.dot-field { position: relative; width: min(78%, 590px); aspect-ratio: 1; border-radius: 50%; background-image: radial-gradient(circle, rgba(17,17,17,.72) 0 1.2px, transparent 1.7px); background-position: var(--dot-x, 50%) var(--dot-y, 50%); background-size: 15px 15px; opacity: .8; mask-image: radial-gradient(ellipse at 50% 50%, #000 0 37%, transparent 75%); transition: transform .6s cubic-bezier(.2,.8,.2,1), background-position .35s ease; }
.dot-field::before, .dot-field::after { position: absolute; inset: 6%; border: 1px solid rgba(17,17,17,.3); border-radius: 50%; content: ''; transform: scale(var(--dot-scale, 1)); transition: transform .6s ease; }
.dot-field::after { inset: 18%; border-color: rgba(17,17,17,.16); }
.dot-field:hover { --dot-scale: 1.035; transform: rotate(2deg) scale(1.02); }
.auth-body .auth-welcome { min-height: 48px; margin-bottom: 28px; }
.auth-body .auth-welcome-logo { width: 48px; height: 48px; }
.auth-body .auth-welcome-logo .auth-logo-svg { width: 48px; height: 48px; }
.auth-body .auth-kicker { font: 700 11.66px/1 var(--mono); letter-spacing: .2em; }
.auth-body .auth-card > label { font-weight: 600; }
.auth-body .auth-card input { font-weight: 500; letter-spacing: .01em; }
.auth-body .auth-switch, .auth-body .auth-forgot { font-weight: 500; letter-spacing: .01em; }
.auth-art-canvas { position: relative; display: flex; width: min(100%, 760px); height: min(78vh, 760px); align-items: center; justify-content: center; overflow: hidden; background: #ffffff; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.auth-art-canvas:hover { transform: scale(1.012); }
.auth-art-canvas { width: min(100%, 820px); height: min(82vh, 820px); background: #ffffff; }
.auth-art-canvas::before { position: absolute; inset: -12%; background-image: radial-gradient(circle, #111111 0 1.9px, transparent 2.25px); background-position: calc((var(--art-x, 50) - 50) * .16px) calc((var(--art-y, 50) - 50) * .16px); background-size: 11px 11px; content: ''; opacity: .96; mask-image: radial-gradient(ellipse 70% 70% at calc(72% + (var(--art-x, 50) - 50) * .12%) calc(48% + (var(--art-y, 50) - 50) * .12%), #000 0 17%, rgba(0,0,0,.92) 27%, rgba(0,0,0,.62) 43%, rgba(0,0,0,.22) 61%, transparent 78%); transition: background-position .25s ease, mask-position .35s ease; }
.auth-art-canvas::after { position: absolute; inset: 7% -8% 7% 12%; border: 1px solid rgba(17,17,17,.12); border-radius: 50%; content: ''; transform: rotate(-18deg) scale(calc(1 + (var(--art-x, 50) - 50) * .0004)); transition: transform .6s ease; }
.auth-art-canvas:hover::before { opacity: 1; }
.auth-art-canvas:hover::after { border-color: rgba(17,17,17,.2); }
.auth-art-canvas { display: block; width: min(100%, 820px); height: min(82vh, 820px); flex: 0 1 820px; cursor: default; pointer-events: auto; touch-action: none; }
.auth-art-canvas::before, .auth-art-canvas::after { display: none; }
.auth-body .auth-art-panel { align-self: stretch; padding: 0; }
.auth-body .auth-art-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  flex: none;
  background: #ffffff;
  transform: none;
}
.auth-body .auth-art-canvas:hover { transform: none; }
.auth-body .google-sign-in { font: 600 12.72px/1.2 var(--sans); letter-spacing: .01em; color: #ffffff; background: #4285f4; border-color: #4285f4; box-shadow: 0 0 6px rgba(66,133,244,.8), 0 0 18px rgba(66,133,244,.48), 0 0 30px rgba(66,133,244,.22); }
.auth-body .google-sign-in:hover, .auth-body .google-sign-in:focus-visible { color: #ffffff; background: #4285f4; border-color: #6ea0ff; box-shadow: 0 0 8px rgba(66,133,244,1), 0 0 22px rgba(66,133,244,.8), 0 0 40px rgba(66,133,244,.42); }
.auth-body .google-sign-in .google-g-mark, .auth-body .google-sign-in:hover .google-g-mark, .auth-body .google-sign-in:focus-visible .google-g-mark { color: #ffffff; }
.auth-body .site-intro { color: #111111; background: #ffffff; }
.auth-body .site-intro-logo { background: transparent; box-shadow: none; }
.auth-body .site-intro-logo .core-lines { stroke: #ffffff; }
.auth-body .site-intro-tagline { color: #111111; }
@media (max-width: 700px) {
  .auth-body .auth-art-panel { display: none; }
  .auth-body .auth-form-panel { width: 100%; min-width: 100%; }
  .auth-body .auth-welcome { margin-bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-body .auth-welcome-logo .orbit,
  .auth-body .auth-welcome-logo .orbit-secondary,
  .auth-body .auth-welcome-logo .core { animation: none; }
  .dot-field, .dot-field::before, .dot-field::after { transition: none; }
}
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--faint); font: 10.6px var(--mono); text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.google-sign-in { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; color: var(--ink); background: transparent; border: 1px solid var(--line-strong); text-decoration: none; font-size: 12.72px; transition: background .18s, border-color .18s; }
.google-sign-in:hover, .google-sign-in:focus-visible { color: var(--ink); background: var(--surface-2); border-color: var(--ink); outline: none; }
.google-g-mark { color: #4285f4; font: 700 16.96px/1 Arial, sans-serif; }
.department-select-chevron { width: 8px; height: 8px; flex: 0 0 8px; margin: -4px 3px 0 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.department-select-menu {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 3px);
  right: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  max-height: min(250px, 38vh);
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .55);
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transform-origin: top center;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.department-select-menu.is-open { opacity: 1; transform: translateY(0) scale(1); visibility: visible; pointer-events: auto; transition: opacity .16s ease, transform .16s ease, visibility 0s; }
.department-select-menu[hidden] { display: none; }
.department-select-menu.opens-upward { top: auto; bottom: calc(100% + 3px); transform: translateY(6px) scale(.985); transform-origin: bottom center; }
.department-select-menu.opens-upward.is-open { transform: translateY(0) scale(1); }
.auth-card .department-select button.department-option {
  display: block;
  width: 100%;
  height: auto;
  margin: 2px 0;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: 12.72px/1.4 var(--mono);
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
}
.auth-card .department-select button.department-option:hover,
.auth-card .department-select button.department-option:focus-visible,
.auth-card .department-select button.department-option.is-selected {
  color: var(--ink);
  background: var(--surface-3);
  border-radius: 6px;
  box-shadow: none;
  filter: none;
  text-shadow: none;
  transform: none;
  outline: none;
}
.department-error { display: block; margin-top: 6px; color: var(--bad); font: 10.6px/1.4 var(--mono); letter-spacing: 0; text-transform: none; }
.department-error[hidden] { display: none; }
@keyframes department-select-pick {
  0% { transform: scale(1); }
  45% { transform: scale(1.012); }
  100% { transform: scale(1); }
}
.department-select.is-selecting button.department-select-trigger { animation: department-select-pick .24s ease; }
@media (prefers-reduced-motion: reduce) {
  .department-select-menu,
  .chat-filter-panel,
  .account-popover,
  .department-select.is-selecting button.department-select-trigger { transition: none !important; animation: none !important; }
}

/* Admin inbox department filters. */
.chat-inbox-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-inbox-header h2 { margin-bottom: 5px; }
.chat-filter-toggle,
.chat-filter-clear {
  padding: 7px 10px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  font-size: 10.6px;
  font-weight: 500;
  white-space: nowrap;
}
.chat-filter-toggle:hover,
.chat-filter-clear:hover { background: var(--surface-2); box-shadow: none; }
.chat-filter-panel { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); opacity: 0; transform: translateY(-7px); transform-origin: top; visibility: hidden; pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.chat-filter-panel.is-open { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; transition: opacity .18s ease, transform .18s ease, visibility 0s; }
.chat-filter-panel[hidden] { display: none; }
.chat-filter-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.chat-filter-panel-heading strong { color: var(--muted); font: 9.54px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.chat-filter-clear { padding: 4px 7px; font-size: 9.54px; }
.chat-filter-options { display: flex; max-height: 220px; flex-direction: column; gap: 2px; overflow-y: auto; }
.chat-filter-options label { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 5px 0; color: var(--ink); font: 10.6px/1.4 var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; }
.chat-filter-options input[type="checkbox"] { display: block; width: 14px; height: 14px; flex: 0 0 14px; margin: 0; padding: 0; accent-color: var(--ink); }
.chat-conversation-department { display: block; min-width: 0; max-width: 100%; overflow: hidden; color: var(--muted); font: 400 9.54px/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }


/* Hide the native cursor on every target; the glowing tracker is the only visible cursor. */
:root[data-custom-cursor="active"],
:root[data-custom-cursor="active"] *,
:root[data-custom-cursor="active"] *:hover,
:root[data-custom-cursor="active"] *:active,
:root[data-custom-cursor="active"] *:focus,
:root[data-custom-cursor="active"] *:focus-visible,
:root[data-custom-cursor="active"] *:focus-within,
:root[data-custom-cursor="active"] *::before,
:root[data-custom-cursor="active"] *::after {
  cursor: none !important;
}
#custom-cursor,
#custom-cursor.is-visible {
  pointer-events: none !important;
}
#custom-cursor.is-visible { opacity: 1 !important; }


/* Admin stock actions and Add Item modal. */
.admin-items-actions { display: flex; align-items: center; gap: 10px; }
.admin-items-actions button { width: auto; min-width: 132px; margin: 0; }
.admin-add-dialog {
  position: fixed;
  inset: 0;
  width: min(560px, calc(100vw - 32px));
  height: fit-content;
  max-width: none;
  max-height: min(88vh, 820px);
  margin: auto;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .58);
}
.admin-add-dialog[open] { display: block; animation: admin-add-dialog-fade-in .2s ease both; }
.admin-add-dialog.is-closing { animation: admin-add-dialog-fade-out .18s ease both; }
.admin-add-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); animation: admin-add-backdrop-in .18s ease both; }
.admin-add-dialog.is-closing::backdrop { animation: admin-add-backdrop-out .18s ease both; }
.admin-add-dialog-content { max-height: min(88vh, 820px); overflow-y: auto; padding: clamp(20px, 4vw, 30px); animation: admin-add-dialog-content-in .2s cubic-bezier(.2,.8,.2,1) both; }
.admin-add-dialog.is-closing .admin-add-dialog-content { animation: admin-add-dialog-content-out .18s cubic-bezier(.4,0,1,1) both; }
.admin-add-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-add-dialog-heading h2 { margin: 6px 0 0; color: var(--ink); font-size: 23.32px; font-weight: 500; }
.admin-add-dialog-close { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; margin: 0; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); font: 25.44px/1 var(--sans); }
.admin-add-dialog-close:hover,
.admin-add-dialog-close:focus-visible { color: var(--ink); background: var(--surface-2); border-color: var(--line-strong); box-shadow: none; }
.admin-add-dialog .admin-item-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; }
.admin-add-dialog .admin-item-form > input,
.admin-add-dialog .admin-item-form > select { width: 100%; min-width: 0; margin: 0; padding: 11px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); }
.admin-add-dialog .admin-item-form > input:focus,
.admin-add-dialog .admin-item-form > select:focus { border-color: var(--line-strong); }
.admin-add-dialog .admin-item-form .image-upload-field { min-width: 0; }
.admin-add-dialog .admin-item-form > button { width: 100%; margin: 4px 0 0; }
@keyframes admin-add-dialog-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes admin-add-dialog-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes admin-add-dialog-content-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes admin-add-dialog-content-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes admin-add-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes admin-add-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 700px) {
  .admin-items-actions { width: 100%; }
  .admin-items-actions button { width: auto; min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-add-dialog[open],
  .admin-add-dialog::backdrop,
  .admin-add-dialog-content { animation: none !important; }
}


/* Animated sidebar filter dropdowns used by both borrower and administrator equipment pages. */
.sidebar-filter-form .filter-select { width: 100%; min-width: 0; margin-top: 5px; }
.sidebar-filter-form .filter-select button.department-select-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  font: 11.66px var(--sans);
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
.sidebar-filter-form .filter-select button.department-select-trigger:hover,
.sidebar-filter-form .filter-select button.department-select-trigger:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow: none;
  filter: none;
  outline: none;
}
.sidebar-filter-form .filter-select button.department-option {
  display: block;
  width: 100%;
  margin: 2px 0;
  padding: 8px 9px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: 11.66px/1.4 var(--sans);
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
.sidebar-filter-form .filter-select button.department-option:hover,
.sidebar-filter-form .filter-select button.department-option:focus-visible,
.sidebar-filter-form .filter-select button.department-option.is-selected {
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 6px;
  box-shadow: none;
  filter: none;
  outline: none;
}


/* Keep the glowing overlay as the only cursor, including navigation hover/click and page-load states. */
:root:not([data-theme="light"]),
:root:not([data-theme="light"]) *,
:root:not([data-theme="light"]) *:hover,
:root:not([data-theme="light"]) *:active,
:root:not([data-theme="light"]) *:focus,
:root:not([data-theme="light"]) *:focus-visible,
:root:not([data-theme="light"]) *:focus-within,
:root:not([data-theme="light"]) *::before,
:root:not([data-theme="light"]) *::after,
:root[data-theme="light"],
:root[data-theme="light"] *,
:root[data-theme="light"] *:hover,
:root[data-theme="light"] *:active,
:root[data-theme="light"] *:focus,
:root[data-theme="light"] *:focus-visible,
:root[data-theme="light"] *:focus-within,
:root[data-theme="light"] *::before,
:root[data-theme="light"] *::after {
  cursor: none !important;
}


/* Admin profile password-change action and modal. */
.account-popover > .account-menu-action {
  width: 100%;
  margin: 0 0 10px;
  padding: 9px 11px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  text-align: left;
}
.account-popover > .account-menu-action:hover,
.account-popover > .account-menu-action:focus-visible { background: var(--surface-2); border-color: var(--line-strong); box-shadow: none; }
.password-change-dialog {
  position: fixed;
  inset: 0;
  width: min(460px, calc(100vw - 32px));
  height: fit-content;
  max-width: none;
  max-height: min(88vh, 760px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .58);
}
.rejection-reason-dialog { position: fixed; inset: 0; width: min(520px, calc(100vw - 32px)); height: fit-content; max-width: none; max-height: min(88vh, 760px); margin: auto; padding: 0; overflow: visible; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 24px 80px rgba(0, 0, 0, .58); isolation: isolate; }
.rejection-reason-dialog[open] { display: block; animation: password-dialog-fade-in .18s ease both; }
.rejection-reason-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
.password-change-dialog[open] { display: block; animation: password-dialog-fade-in .18s ease both; }
.password-change-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
.password-dialog-content { display: grid; gap: 14px; padding: clamp(20px, 4vw, 30px); animation: password-dialog-content-in .18s ease both; }
.password-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 4px; }
.password-dialog-heading h2 { margin: 6px 0 0; color: var(--ink); font-size: 23.32px; font-weight: 500; }
.password-dialog-close { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; margin: 0; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); font: 25.44px/1 var(--sans); }
.password-dialog-close:hover,
.password-dialog-close:focus-visible { color: var(--ink); background: var(--surface-2); border-color: var(--line-strong); box-shadow: none; }
.password-dialog-content > label { display: grid; gap: 6px; margin: 0; color: var(--muted); font-size: 10.6px; letter-spacing: .08em; text-transform: uppercase; }
.password-dialog-content > label input { width: 100%; min-width: 0; margin: 0; padding: 11px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); font: 13.78px var(--sans); letter-spacing: 0; text-transform: none; }
.password-dialog-content > label textarea { width: 100%; min-width: 0; min-height: 120px; margin: 0; padding: 11px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); font: 13.78px var(--sans); letter-spacing: 0; text-transform: none; resize: vertical; }
.password-dialog-content > label input:focus { border-color: var(--line-strong); }
.password-dialog-content .field-note { margin: 0; }
.password-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; }
.password-dialog-actions button { width: auto; margin: 0; }
.password-dialog-actions .password-dialog-cancel { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.password-dialog-actions .password-dialog-cancel:hover { background: var(--surface-2); box-shadow: none; }
@keyframes password-dialog-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes password-dialog-content-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) {
  .password-dialog-actions { flex-direction: column-reverse; }
  .password-dialog-actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .password-change-dialog[open], .password-change-dialog::backdrop { animation: none !important; }
  .rejection-reason-dialog[open], .rejection-reason-dialog::backdrop { animation: none !important; }
}


/* Keep the app's glowing cursor in the dialog top layer above the password form. */
.password-change-dialog { overflow: visible; isolation: isolate; }
.password-dialog-content { max-height: min(88vh, 760px); overflow: auto; }
.password-change-dialog > #custom-cursor,
.rejection-reason-dialog > #custom-cursor {
  position: fixed !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
}
.password-change-dialog > #custom-cursor.is-visible,
.rejection-reason-dialog > #custom-cursor.is-visible { opacity: 1 !important; }

.chat-composer-entry { display: flex; align-items: center; gap: 9px; }
.chat-attach-toggle { display: grid; width: 42px; min-width: 42px; min-height: 42px; place-items: center; padding: 0; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 50%; font-size: 26.5px; line-height: 1; }
.chat-attach-toggle:hover:not(:disabled) { background: var(--surface-3); }
.chat-attach-toggle:disabled { opacity: .45; cursor: not-allowed; }
.chat-composer-entry textarea { width: 100%; }
.chat-item-picker { display: flex; flex-direction: column; gap: 9px; padding: 11px 13px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.chat-item-picker[hidden], .chat-item-preview[hidden] { display: none; }
.chat-item-picker-heading { display: flex; align-items: center; justify-content: space-between; font-size: 11.66px; }
.chat-item-picker-heading button { width: 27px; height: 27px; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); font-size: 18.02px; }
.chat-item-options { display: flex; max-height: 190px; flex-direction: column; gap: 5px; overflow-y: auto; }
.chat-item-option { display: flex; min-width: 0; align-items: center; gap: 7px; margin: 0; padding: 7px 8px; border: 1px solid var(--line); background: var(--surface); font: 10.6px/1.4 var(--sans); letter-spacing: 0; text-align: left; text-transform: none; cursor: pointer; }
.chat-item-option input { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; margin: 0; padding: 0; accent-color: var(--ink); }
.chat-item-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-option small { margin-left: auto; color: var(--faint); font-size: 9.54px; }
.chat-item-preview { color: var(--muted); font-size: 10.6px; }
.chat-item-preview > div { display: flex; flex-wrap: wrap; gap: 7px; }
.chat-item-preview-entry { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid var(--line); background: var(--surface); }
.chat-item-preview-entry img { width: 38px; height: 38px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); }
.chat-item-attachments { display: grid; gap: 6px; margin-top: 9px; }
.chat-item-attachment { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); }
.chat-item-attachment-image { width: 48px; height: 48px; flex: 0 0 48px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); }
.chat-item-attachment-details { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.chat-item-attachment small { color: var(--muted); font-size: 9.54px; }
.chat-item-attachment strong { color: var(--ink); font-size: 11.66px; font-weight: 550; }
@media (max-width: 700px) {
  .chat-composer-entry { align-items: flex-end; }
}


/* Request workflow and security updates */
.notification-list { display: grid; gap: 12px; margin-top: 20px; }
.notification-card { position: relative; display: block; padding: 18px 18px 62px; border: 1px solid var(--line, #333); background: var(--surface, #111); }
.notification-card.is-unread { border-left: 3px solid var(--accent, #d8d8d8); }
.notification-actions { position: absolute; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 12px; }
.notification-actions form { margin: 0; }
.notification-delete-button { display: grid; width: 36px; height: 36px; place-items: center; margin: 0; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); }
.notification-delete-button:hover,
.notification-delete-button:focus-visible { color: var(--bad); background: var(--surface-2); border-color: var(--line-strong); box-shadow: none; }
.notification-delete-button svg { width: 17px; height: 17px; }
.notification-delete-button:disabled { opacity: 1; }
.notification-card.is-deleting,
.notification-card.is-deleting-all { overflow: hidden; animation: notification-trash-shell .52s ease var(--trash-delay, 0ms) forwards; }
.notification-card.is-deleting > div:first-child,
.notification-card.is-deleting-all > div:first-child { transform-origin: right bottom; animation: notification-trash-drop .52s cubic-bezier(.55, 0, .9, .3) var(--trash-delay, 0ms) forwards; }
.notification-card.is-deleting .notification-delete-button { color: var(--bad); background: var(--surface-2); transform: scale(1.08); }
.notification-list-footer { display: flex; justify-content: flex-end; margin-top: 12px; }
.notification-list-footer form { margin: 0; }
.notification-delete-all-button { display: grid; width: 42px; height: 42px; place-items: center; margin: 0; padding: 0; color: var(--bad); background: var(--surface); border: 1px solid var(--line-strong); }
.notification-delete-all-button:hover,
.notification-delete-all-button:focus-visible { background: var(--surface-2); border-color: var(--bad); box-shadow: none; }
.notification-delete-all-button:disabled { opacity: 1; }
.notification-delete-all-button.is-deleting svg { animation: notification-trash-control .85s ease forwards; }
@keyframes notification-trash-control {
  0% { transform: scale(1) rotate(0); }
  45% { transform: scale(1.2) rotate(-9deg); }
  100% { transform: scale(.9) rotate(0); }
}
@keyframes notification-trash-drop {
  0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
  35% { opacity: 1; transform: translate(16px, -5px) scale(.9) rotate(1deg); }
  100% { opacity: 0; transform: translate(40px, 46px) scale(.3) rotate(5deg); }
}
@keyframes notification-trash-shell {
  0% { border-color: var(--line, #333); background: var(--surface, #111); }
  100% { border-color: transparent; background: transparent; }
}
.notification-card p { margin: 8px 0 0; }
.notification-card time { display: block; color: var(--muted, #999); font-size: 12.72px; margin-top: 5px; }
.rejection-reason { display: block; margin-top: 6px; color: var(--muted, #999); max-width: 26ch; white-space: normal; }
.borrow-request-form > label { margin: 12px 0; }
.borrow-request-form textarea { width: 100%; min-height: 90px; }
.borrow-request-form [data-availability-message] { min-height: 1.4em; margin: 8px 0; color: var(--muted, #999); }
.verification-area { max-width: 560px; margin: 4vh auto; padding: clamp(20px, 5vw, 48px); }
.verification-area .auth-card { margin-top: 24px; }
.verification-area input[name="code"] { text-align: center; letter-spacing: .35em; font-size: 1.43rem; }
button:disabled { cursor: not-allowed; opacity: .5; }
/* Department-account creation */
.department-admin-create-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.department-admin-create-card h2 { margin: 0 0 5px; }
.department-admin-create-card .field-note { margin: 0; }
.department-admin-create-card > button { flex: 0 0 auto; }
.department-admin-dialog { position: fixed; inset: 0; width: min(520px, calc(100vw - 32px)); max-width: none; max-height: min(90vh, 760px); margin: auto; padding: 0; overflow: visible; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 24px 80px rgba(0,0,0,.58); isolation: isolate; }
.department-admin-dialog[open] { display: block; animation: password-dialog-fade-in .18s ease both; }
.department-admin-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.department-admin-dialog .password-dialog-content { max-height: min(90vh, 760px); overflow: auto; }
.department-admin-dialog .password-dialog-content > label { display: grid; gap: 6px; margin: 0; color: var(--muted); font-size: 10.6px; letter-spacing: .08em; text-transform: uppercase; }
.department-admin-dialog .password-dialog-content > label input { width: 100%; min-width: 0; margin: 0; padding: 11px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); font: 13.78px var(--sans); letter-spacing: 0; text-transform: none; }
.department-admin-dialog .password-dialog-content > label input:focus { border-color: var(--line-strong); }
@media (max-width: 600px) { .department-admin-create-card { align-items: stretch; flex-direction: column; } .department-admin-create-card > button { width: 100%; } }
/* Password recovery */
.auth-forgot { margin: 20px 0 0; text-align: center; font-size: 11.66px; }
.auth-forgot a { color: var(--muted); text-decoration: none; }
.auth-forgot a:hover { color: var(--ink); }
.recovery-area { width: min(100%, 560px); margin: auto; }
.recovery-area .field-note { max-width: 42ch; margin: 18px auto 0; text-align: center; }

/* Seamless Campus artwork: fade the halftone at the panel edges instead of ending at a hard rectangle. */
.auth-body .auth-art-panel {
  overflow: visible;
  isolation: isolate;
}
.auth-body .auth-art-canvas {
  overflow: visible;
  z-index: 0;
  mask-image: radial-gradient(ellipse 92% 86% at 58% 50%, #000 42%, rgba(0, 0, 0, .94) 58%, rgba(0, 0, 0, .56) 76%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 92% 86% at 58% 50%, #000 42%, rgba(0, 0, 0, .94) 58%, rgba(0, 0, 0, .56) 76%, transparent 100%);
}
@media (max-width: 700px) {
  .auth-body .auth-art-panel { overflow: hidden; }
}


/* Vault sign-in hierarchy: oversized logo at the top, account CTA pinned to the bottom. */
.auth-body .login-mode .auth-form-panel {
  align-items: stretch;
  justify-content: stretch;
  padding-top: clamp(30px, 5vw, 72px);
  padding-bottom: clamp(28px, 4vw, 58px);
}
.auth-body .login-mode .auth-form-area {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  width: min(100%, 420px);
  margin: 0 auto;
}
.auth-body .login-mode .auth-welcome {
  min-height: 0;
  margin: 0 auto clamp(26px, 4vh, 48px);
}
.auth-body .login-mode .auth-welcome-logo,
.auth-body .login-mode .auth-welcome-logo .auth-logo-svg {
  width: 48px;
  height: 48px;
}
.auth-body .login-mode .auth-kicker { margin-bottom: clamp(34px, 5vh, 58px); }
.auth-body .login-mode .auth-switch {
  margin-top: auto;
  padding-top: clamp(28px, 5vh, 64px);
}

/* Smooth single-circle hover treatment for the interactive CSPC logo. */
.auth-body .auth-welcome-logo {
  position: relative;
  border-radius: 50%;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), color .25s ease;
}
.auth-body .auth-welcome-logo::after {
  position: absolute;
  inset: -9px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: '';
  opacity: 0;
  transform: scale(.78);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.auth-body .auth-welcome-logo:hover {
  transform: scale(1.08);
}
.auth-body .auth-welcome-logo:hover::after,
.auth-body .auth-welcome-logo:focus-visible::after {
  opacity: .52;
  transform: scale(1);
}
.auth-body .auth-welcome-logo .orbit-secondary { display: none; }

/* The intro now presents the Vault name and geometric mark as the primary brand moment. */
.auth-body .site-intro-content {
  width: min(100%, 760px);
  gap: clamp(34px, 6vh, 64px);
}
.auth-body .site-intro-logo {
  width: 190px;
  height: 190px;
}
.auth-body .site-intro-logo .auth-logo-svg {
  width: 112px;
  height: 112px;
  stroke-width: 1.6;
}
.auth-body .site-intro-tagline {
  font: 600 12.72px var(--mono);
  letter-spacing: .14em;
}
@media (max-width: 700px) {
  .auth-body .login-mode .auth-form-panel { padding-top: 30px; padding-bottom: 28px; }
  .auth-body .login-mode .auth-welcome-logo,
  .auth-body .login-mode .auth-welcome-logo .auth-logo-svg { width: 48px; height: 48px; }
}


/* Keep the sign-in fields centered between the top logo and bottom account CTA. */
.auth-body .login-mode .auth-form-main {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  margin: auto 0;
}
.auth-body .login-mode .auth-switch {
  margin-top: 0;
  padding-top: clamp(28px, 5vh, 64px);
  white-space: nowrap;
}
.auth-body .login-mode .auth-switch a {
  display: inline;
  margin-top: 0;
  margin-left: 6px;
}
@media (max-width: 420px) {
  .auth-body .login-mode .auth-switch { font-size: 9.54px; letter-spacing: .02em; }
  .auth-body .login-mode .auth-switch a { margin-left: 4px; letter-spacing: .08em; }
}


/* Match the create-account screen to the centered Vault sign-in hierarchy. */
.auth-body .register-mode .auth-form-panel {
  align-items: stretch;
  justify-content: stretch;
  padding-top: clamp(30px, 5vw, 72px);
  padding-bottom: clamp(28px, 4vw, 58px);
}
.auth-body .register-mode .auth-form-area {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  width: min(100%, 420px);
  margin: 0 auto;
}
.auth-body .register-mode .auth-welcome {
  min-height: 0;
  margin: 0 auto clamp(26px, 4vh, 48px);
}
.auth-body .register-mode .auth-welcome-logo,
.auth-body .register-mode .auth-welcome-logo .auth-logo-svg {
  width: 48px;
  height: 48px;
}
.auth-body .register-mode .auth-form-main {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  margin: auto 0;
}
.auth-body .register-mode .auth-switch {
  margin-top: 0;
  padding-top: clamp(28px, 5vh, 64px);
  white-space: nowrap;
}
.auth-body .register-mode .auth-switch a {
  display: inline;
  margin-top: 0;
  margin-left: 6px;
}
@media (max-width: 420px) {
  .auth-body .register-mode .auth-switch { font-size: 9.54px; letter-spacing: .02em; }
  .auth-body .register-mode .auth-switch a { margin-left: 4px; letter-spacing: .08em; }
}


/* Bring the Vault title close beneath the intro logo and resolve the intro into the sign-in logo from above. */
.auth-body .site-intro-content {
  gap: 10px;
}
.auth-body #site-intro.is-exiting .site-intro-logo {
  transform: translateY(-38vh) scale(.58);
}
@media (max-width: 700px) {
  .auth-body #site-intro.is-exiting .site-intro-logo {
    transform: translateY(-39vh) scale(.72);
  }
}


/* Keep navigation icons visible when the left control panel is minimized. */
@media (min-width: 701px) {
  html[data-sidebar="hidden"] .app > .sidebar > nav {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 7px;
    margin-top: 18px;
  }
  html[data-sidebar="hidden"] .app > .sidebar > nav a {
    display: grid;
    width: 40px;
    height: 40px;
    min-height: 40px;
    margin: 0 auto;
    place-items: center;
    padding: 0;
    border-radius: 11px;
  }
  html[data-sidebar="hidden"] .app > .sidebar > nav a span { display: none; }
  html[data-sidebar="hidden"] .app > .sidebar > nav a svg {
    display: block;
    width: 19px;
    height: 19px;
    margin: 0;
  }
  html[data-sidebar="hidden"] .app > .sidebar > nav a:hover,
  html[data-sidebar="hidden"] .app > .sidebar > nav a.active { transform: none; }
}

/* Keep the light-mode department-account button blue normally and black-glowing on hover. */
:root[data-theme="light"] .department-admin-create-card > button {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(37, 99, 235, .42), 0 0 24px rgba(37, 99, 235, .22);
}
:root[data-theme="light"] .department-admin-create-card > button:hover,
:root[data-theme="light"] .department-admin-create-card > button:focus-visible {
  color: #ffffff;
  background: #050505;
  border-color: #050505;
  box-shadow: 0 0 10px rgba(0, 0, 0, .66), 0 0 26px rgba(0, 0, 0, .34);
  text-shadow: 0 0 6px rgba(255, 255, 255, .48);
}

/* Keep navigation icons visible when the left control panel is minimized. */
@media (min-width: 701px) {
  html[data-sidebar="hidden"] .app > .sidebar > nav {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 7px;
    margin-top: 18px;
  }
  html[data-sidebar="hidden"] .app > .sidebar > nav a {
    display: grid;
    width: 40px;
    height: 40px;
    min-height: 40px;
    margin: 0 auto;
    place-items: center;
    padding: 0;
    border-radius: 11px;
  }
  html[data-sidebar="hidden"] .app > .sidebar > nav a span { display: none; }
  html[data-sidebar="hidden"] .app > .sidebar > nav a svg {
    display: block;
    width: 19px;
    height: 19px;
    margin: 0;
  }
  html[data-sidebar="hidden"] .app > .sidebar > nav a:hover,
  html[data-sidebar="hidden"] .app > .sidebar > nav a.active { transform: none; }
}

/* Department account button: black, white text, square corners, black hover glow. */
.department-admin-create-card > button,
.department-admin-create-card > button:hover,
.department-admin-create-card > button:focus-visible,
.department-admin-create-card > button:active {
  color: #ffffff !important;
  background: #050505 !important;
  border-color: #050505 !important;
  border-radius: 0 !important;
}
.department-admin-create-card > button {
  box-shadow: 0 0 8px rgba(0, 0, 0, .52), 0 0 18px rgba(0, 0, 0, .24) !important;
}
.department-admin-create-card > button:hover,
.department-admin-create-card > button:focus-visible {
  box-shadow: 0 0 12px rgba(0, 0, 0, .78), 0 0 30px rgba(0, 0, 0, .44) !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, .48);
}

/* Dark mode department account button: white surface with black text. */
:root:not([data-theme="light"]) .department-admin-create-card > button,
:root:not([data-theme="light"]) .department-admin-create-card > button:hover,
:root:not([data-theme="light"]) .department-admin-create-card > button:focus-visible,
:root:not([data-theme="light"]) .department-admin-create-card > button:active {
  color: #050505 !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
  border-radius: 0 !important;
}
:root:not([data-theme="light"]) .department-admin-create-card > button {
  box-shadow: 0 0 8px rgba(255, 255, 255, .24), 0 0 18px rgba(255, 255, 255, .12) !important;
}
:root:not([data-theme="light"]) .department-admin-create-card > button:hover,
:root:not([data-theme="light"]) .department-admin-create-card > button:focus-visible {
  box-shadow: 0 0 12px rgba(0, 0, 0, .72), 0 0 28px rgba(0, 0, 0, .42) !important;
  text-shadow: none;
}

/* Dark mode hover: keep the white button and add a white glow. */
:root:not([data-theme="light"]) .department-admin-create-card > button:hover,
:root:not([data-theme="light"]) .department-admin-create-card > button:focus-visible {
  color: #050505 !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, .82), 0 0 30px rgba(255, 255, 255, .44) !important;
  text-shadow: none;
}

/* Resolve the intro mark into the actual sign-in logo using coordinates measured by intro.js. */
.auth-body #site-intro.is-exiting .site-intro-logo {
  transform: translate3d(var(--intro-dx, 0px), var(--intro-dy, -38vh), 0) scale(var(--intro-scale, .58));
}
@media (max-width: 700px) {
  .auth-body #site-intro.is-exiting .site-intro-logo {
    transform: translate3d(var(--intro-dx, 0px), var(--intro-dy, -39vh), 0) scale(var(--intro-scale, .72));
  }
}


/* CSPC artwork: remove the outer decorative hover ring; keep only inner dot interaction. */
.auth-body .auth-art-canvas::before,
.auth-body .auth-art-canvas::after {
  display: none !important;
  content: none !important;
}


/* System Admin reset-password button: white text on black with a stronger black hover glow. */
.department-password-reset-button,
.department-password-reset-button:hover,
.department-password-reset-button:focus-visible,
.department-password-reset-button:active {
  color: #ffffff !important;
  background: #050505 !important;
  border-color: #050505 !important;
}
.department-password-reset-button {
  box-shadow: 0 0 8px rgba(0, 0, 0, .52), 0 0 18px rgba(0, 0, 0, .24) !important;
}
.department-password-reset-button:hover,
.department-password-reset-button:focus-visible {
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(0, 0, 0, .78), 0 0 30px rgba(0, 0, 0, .44) !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, .48);
  filter: none !important;
}


/* Floating account and appearance dock replaces the fixed left control rail. */
.floating-portal-controls {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 14px;
  width: min(390px, calc(100vw - 28px));
}
.floating-controls-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 58px;
  padding: 7px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  backdrop-filter: blur(14px);
}
.floating-controls-bar .account-menu { min-width: 0; flex: 1; }
.floating-controls-bar .account-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
}
.floating-controls-bar .account-trigger:hover,
.floating-controls-bar .account-trigger:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
  border: 0;
  box-shadow: none;
}
.floating-controls-bar .account-trigger .avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: var(--ink);
  background: var(--surface-2);
}
.floating-controls-bar .account-trigger .who {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  text-align: left;
}
.floating-controls-bar .account-trigger .who strong,
.floating-controls-bar .account-trigger .who small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.floating-controls-bar .account-trigger .who strong { font-size: 12.72px; }
.floating-controls-bar .account-trigger .who small { font-size: 9.54px; }
.account-chevron { display: grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; color: var(--muted); }
.account-chevron svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.account-trigger[aria-expanded="true"] .account-chevron svg { transform: rotate(180deg); }
.floating-portal-controls .account-popover {
  top: calc(100% + 9px);
  right: auto;
  left: 0;
  width: min(260px, calc(100vw - 32px));
  transform-origin: top left;
}
.floating-controls-bar .theme-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: background .18s ease, color .18s ease;
}
.floating-controls-bar .theme-toggle:hover,
.floating-controls-bar .theme-toggle:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
  border: 0;
  box-shadow: none;
  filter: none;
}
.floating-controls-bar .theme-toggle svg { width: 18px; height: 18px; }
.account-expand-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: var(--muted);
}
.account-expand-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-trigger[aria-expanded="true"] .account-expand-icon { color: var(--ink); }

.app > .content > main { padding-top: clamp(104px, 11vw, 132px); }
@media (max-width: 480px) {
  .floating-portal-controls { top: 10px; left: 10px; width: calc(100vw - 20px); }
  .floating-controls-bar { min-height: 54px; padding: 6px; }
  .floating-controls-bar .account-trigger { gap: 7px; padding-right: 5px; padding-left: 5px; }
  .floating-controls-bar .account-trigger .avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .floating-controls-bar .account-trigger .who strong { font-size: 11.66px; }
  .floating-controls-bar .account-trigger .who small { font-size: 8.48px; }
  .floating-controls-bar .theme-toggle { width: 36px; height: 36px; flex-basis: 36px; }
  .app > .content > main { padding-top: 94px; }
}
@media (prefers-reduced-motion: reduce) {
  .account-chevron svg,
  .account-expand-icon svg { transition: none; }
}


/* Account Security forced password change: keep every field and text mark black; retain the panel border. */
.forced-password-layout .auth-form-area,
.forced-password-layout .auth-form-area .auth-kicker,
.forced-password-layout .auth-form-area h1,
.forced-password-layout .auth-form-area > p:not(.flash),
.forced-password-layout .auth-password-group > label,
.forced-password-layout .auth-password-field input,
.forced-password-layout .auth-password-field input::placeholder,
.forced-password-layout .auth-card .password-toggle,
.forced-password-layout .auth-card .password-toggle:hover,
.forced-password-layout .auth-card .password-toggle:focus-visible,
.forced-password-layout .auth-card button:not(.password-toggle),
.forced-password-layout .auth-card button:not(.password-toggle):hover {
  color: #000 !important;
}
.forced-password-layout .auth-password-field input {
  -webkit-text-fill-color: #000;
  opacity: 1;
}
.forced-password-layout .auth-password-field input::placeholder { opacity: 1; }
.forced-password-layout .auth-password-field,
.forced-password-layout .auth-password-field:focus-within {
  border-bottom-color: #000;
}
.forced-password-layout .auth-card button:not(.password-toggle) {
  background:
    linear-gradient(#000, #000) left top / 11px 1px no-repeat,
    linear-gradient(#000, #000) left top / 1px 11px no-repeat,
    linear-gradient(#000, #000) right top / 11px 1px no-repeat,
    linear-gradient(#000, #000) right top / 1px 11px no-repeat,
    linear-gradient(#000, #000) left bottom / 11px 1px no-repeat,
    linear-gradient(#000, #000) left bottom / 1px 11px no-repeat,
    linear-gradient(#000, #000) right bottom / 11px 1px no-repeat,
    linear-gradient(#000, #000) right bottom / 1px 11px no-repeat;
}
.forced-password-layout .auth-card button:not(.password-toggle):hover {
  background:
    linear-gradient(#000, #000) left top / 100% 1px no-repeat,
    linear-gradient(#000, #000) left bottom / 100% 1px no-repeat,
    linear-gradient(#000, #000) left top / 1px 100% no-repeat,
    linear-gradient(#000, #000) right top / 1px 100% no-repeat;
}

/* Department Admin and Borrower accounts use the fixed left control panel. */
.sidebar-portal .content > main { padding-top: 28px; }

/* System Admin department reset: keep the control black with white text in every theme. */
.department-password-reset-request { display: inline-flex; margin: 0; }
.department-password-reset-button,
.department-password-reset-button:hover,
.department-password-reset-button:focus-visible,
.department-password-reset-button:active {
  color: #ffffff !important;
  background: #050505 !important;
  border-color: #050505 !important;
  border-radius: 0 !important;
}
.department-password-reset-button {
  box-shadow: 0 0 8px rgba(0, 0, 0, .52), 0 0 18px rgba(0, 0, 0, .24) !important;
  transition: box-shadow .2s ease, transform .2s ease;
}
.department-password-reset-button:hover,
.department-password-reset-button:focus-visible {
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(0, 0, 0, .82), 0 0 30px rgba(0, 0, 0, .50) !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, .48);
}

/* System Admin reset buttons invert in dark mode: white surface and glow, black label. */
:root:not([data-theme="light"]) .department-password-reset-button,
:root:not([data-theme="light"]) .department-password-reset-button:hover,
:root:not([data-theme="light"]) .department-password-reset-button:focus-visible,
:root:not([data-theme="light"]) .department-password-reset-button:active {
  color: #050505 !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
  text-shadow: none !important;
}
:root:not([data-theme="light"]) .department-password-reset-button {
  box-shadow: 0 0 8px rgba(255, 255, 255, .45), 0 0 18px rgba(255, 255, 255, .22) !important;
}
:root:not([data-theme="light"]) .department-password-reset-button:hover,
:root:not([data-theme="light"]) .department-password-reset-button:focus-visible {
  box-shadow: 0 0 12px rgba(255, 255, 255, .82), 0 0 30px rgba(255, 255, 255, .48) !important;
}

/* Create-account dialog submit: glow in both themes, matching the launcher button. */
.department-admin-dialog .department-admin-create-submit,
.department-admin-dialog .department-admin-create-submit:hover,
.department-admin-dialog .department-admin-create-submit:focus-visible,
.department-admin-dialog .department-admin-create-submit:active {
  border-radius: 0 !important;
  filter: none !important;
  transition: box-shadow .2s ease, transform .2s ease;
}
:root[data-theme="light"] .department-admin-dialog .department-admin-create-submit,
:root[data-theme="light"] .department-admin-dialog .department-admin-create-submit:hover,
:root[data-theme="light"] .department-admin-dialog .department-admin-create-submit:focus-visible,
:root[data-theme="light"] .department-admin-dialog .department-admin-create-submit:active {
  color: #ffffff !important;
  background: #050505 !important;
  border-color: #050505 !important;
}
:root[data-theme="light"] .department-admin-dialog .department-admin-create-submit {
  box-shadow: 0 0 8px rgba(0, 0, 0, .52), 0 0 18px rgba(0, 0, 0, .24) !important;
}
:root[data-theme="light"] .department-admin-dialog .department-admin-create-submit:hover,
:root[data-theme="light"] .department-admin-dialog .department-admin-create-submit:focus-visible {
  box-shadow: 0 0 12px rgba(0, 0, 0, .78), 0 0 30px rgba(0, 0, 0, .44) !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, .48);
}
:root:not([data-theme="light"]) .department-admin-dialog .department-admin-create-submit,
:root:not([data-theme="light"]) .department-admin-dialog .department-admin-create-submit:hover,
:root:not([data-theme="light"]) .department-admin-dialog .department-admin-create-submit:focus-visible,
:root:not([data-theme="light"]) .department-admin-dialog .department-admin-create-submit:active {
  color: #050505 !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
  text-shadow: none !important;
}
:root:not([data-theme="light"]) .department-admin-dialog .department-admin-create-submit {
  box-shadow: 0 0 8px rgba(255, 255, 255, .24), 0 0 18px rgba(255, 255, 255, .12) !important;
}
:root:not([data-theme="light"]) .department-admin-dialog .department-admin-create-submit:hover,
:root:not([data-theme="light"]) .department-admin-dialog .department-admin-create-submit:focus-visible {
  box-shadow: 0 0 12px rgba(255, 255, 255, .82), 0 0 30px rgba(255, 255, 255, .44) !important;
}

/* Keep the sign-in landing view within the visible viewport; allow an internal
   panel fallback on short screens so controls are never clipped. */
html:has(body.auth-body) { height: 100%; overflow: hidden; }
body.auth-body { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.auth-body .app.guest,
.auth-body .guest .content,
.auth-body .guest main,
.auth-body .auth-shell { height: 100%; min-height: 0; overflow: hidden; }
.auth-body .auth-form-panel,
.auth-body .auth-art-panel { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
@media (max-width: 700px) {
  .auth-body .auth-shell,
  .auth-body .auth-form-panel,
  .auth-body .auth-art-panel { height: 100%; min-height: 0; }
  .auth-body .auth-form-panel,
  .auth-body .auth-art-panel { -webkit-overflow-scrolling: touch; }
}
/* Department-admin inventory search: top-right, above the visible item count. */
.admin-stock-heading-meta { display: flex; min-width: 190px; align-items: flex-end; flex-direction: column; gap: 7px; }
.admin-stock-heading-meta .catalog-count { align-self: flex-end; }
.admin-stock-search { position: relative; display: flex; width: min(100%, 260px); align-items: center; margin: 0; }
.admin-stock-search input {
  width: 100%;
  height: 37px;
  margin: 0;
  padding: 8px 38px 8px 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 12.72px;
}
.admin-stock-search input::placeholder { color: var(--muted); }
.admin-stock-search input:focus { border-color: var(--line-strong); }
:root[data-theme="light"] input[type="search"]::-webkit-search-cancel-button {
  filter: brightness(0);
}
:root:not([data-theme="light"]) input[type="search"]::-webkit-search-cancel-button {
  filter: brightness(0) invert(1);
}
.admin-stock-search kbd {
  position: absolute;
  right: 9px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  font: 11.66px/1 var(--mono);
}
@media (max-width: 700px) {
  .admin-stock-heading-meta { width: 100%; min-width: 0; align-items: stretch; }
  .admin-stock-search { width: 100%; max-width: none; }
  .admin-stock-heading-meta .catalog-count { align-self: flex-end; }
}

/* Keep department-admin equipment search immediately left of Add Item. */
.admin-stock-heading-meta { display: contents; }
.admin-items-actions .admin-stock-search { width: min(240px, 30vw); flex: 0 1 240px; }
.admin-items-actions .admin-stock-search input { width: 100%; }
@media (max-width: 700px) {
  .admin-items-actions { flex-wrap: wrap; }
  .admin-items-actions .admin-stock-search { width: 100%; max-width: none; flex: 1 0 100%; }
  .admin-items-actions button { flex: 1 1 0; }
}


/* Give the department-admin search room for its placeholder and slash hint. */
.admin-items-actions .admin-stock-search {
  width: 240px;
  flex: 0 0 240px;
}
.admin-items-actions .admin-stock-search input {
  height: 38px;
}
@media (max-width: 700px) {
  .admin-items-actions .admin-stock-search {
    width: 100%;
    flex: 1 0 100%;
  }
}

/* Enforce identical vertical dimensions for the inventory search and Add Item. */
.admin-items-actions > .admin-stock-search,
.admin-items-actions > button[data-open-add-item] {
  height: 42px;
}
.admin-items-actions > .admin-stock-search input {
  height: 42px !important;
}
@media (max-width: 700px) {
  .admin-items-actions > .admin-stock-search {
    height: 42px;
  }
}


/* User-resizable left control panel (desktop only). */
@media (min-width: 701px) {
  .app.sidebar-portal > .sidebar {
    position: sticky;
    width: var(--sidebar-width, 224px);
    flex: 0 0 var(--sidebar-width, 224px);
    transition: none;
  }
  .sidebar-resize-handle {
    position: absolute;
    z-index: 20;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
  }
  .sidebar-resize-handle::after {
    position: absolute;
    top: 0;
    right: 3px;
    width: 1px;
    height: 100%;
    background: transparent;
    content: "";
    transition: background-color .15s, box-shadow .15s;
  }
  .sidebar-resize-handle:hover::after,
  .sidebar-resize-handle:focus-visible::after,
  .sidebar-resizing .sidebar-resize-handle::after {
    background: var(--line-strong);
    box-shadow: 0 0 7px var(--line-strong);
  }
  html[data-sidebar="hidden"] .sidebar-resize-handle { display: none; }
  html.sidebar-resizing, html.sidebar-resizing * { user-select: none !important; }
}

/* The glowing cursor remains the sole cursor while active, including controls and resize handles. */
:root[data-custom-cursor="active"],
:root[data-custom-cursor="active"] *,
:root[data-custom-cursor="active"] *::before,
:root[data-custom-cursor="active"] *::after {
  cursor: none !important;
}
#custom-cursor { pointer-events: none !important; }
#custom-cursor.is-visible { opacity: 1 !important; }

/* Animate the sidebar rail when minimizing/restoring; preserve the current saved width. */
@media (min-width: 701px) {
  .app.sidebar-portal > .sidebar {
    transition: width .32s cubic-bezier(.22, .8, .25, 1),
                flex-basis .32s cubic-bezier(.22, .8, .25, 1),
                padding .32s cubic-bezier(.22, .8, .25, 1);
    will-change: width, flex-basis;
  }
  .sidebar-toggle svg {
    transition: transform .32s cubic-bezier(.22, .8, .25, 1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .app.sidebar-portal > .sidebar,
  .sidebar-toggle svg {
    transition-duration: .01ms !important;
  }
}


/* Keep the fixed glowing cursor above the Add Item top-layer dialog without clipping it. */
.admin-add-dialog { overflow: visible !important; }
.admin-add-dialog > #custom-cursor {
  position: fixed !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
}
.admin-add-dialog > #custom-cursor.is-visible { opacity: 1 !important; }

/* Light-mode control-panel filter action: white label with a glow that intensifies on hover. */
:root[data-theme="light"] .sidebar-filter-form > button {
  color: #fff !important;
  background: #171717 !important;
  border-color: #171717 !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, .38);
  box-shadow: 0 0 7px rgba(0, 0, 0, .24), 0 0 14px rgba(0, 0, 0, .12);
  transition: color .18s ease, background-color .18s ease, border-color .18s ease,
              box-shadow .18s ease, text-shadow .18s ease;
}
:root[data-theme="light"] .sidebar-filter-form > button:hover,
:root[data-theme="light"] .sidebar-filter-form > button:focus-visible,
:root[data-theme="light"] .sidebar-filter-form > button:active {
  color: #fff !important;
  background: #111 !important;
  border-color: #111 !important;
  text-shadow: 0 0 5px rgba(255, 255, 255, .86), 0 0 12px rgba(255, 255, 255, .56);
  box-shadow: 0 0 12px rgba(0, 0, 0, .52), 0 0 25px rgba(0, 0, 0, .28),
              0 0 9px rgba(255, 255, 255, .24);
  filter: none !important;
}

/* Equipment action buttons: black glow in light mode and white glow in dark mode. */
:root[data-theme="light"] .sidebar-filter-form > button,
:root[data-theme="light"] .admin-items-actions > button,
:root[data-theme="light"] .admin-add-dialog .admin-item-form > button {
  color: #fff !important;
  background: #080808 !important;
  border-color: #080808 !important;
  text-shadow: none !important;
  box-shadow: 0 0 8px rgba(0, 0, 0, .48), 0 0 18px rgba(0, 0, 0, .24) !important;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease,
              box-shadow .18s ease, text-shadow .18s ease;
}
:root[data-theme="light"] .sidebar-filter-form > button:hover,
:root[data-theme="light"] .sidebar-filter-form > button:focus-visible,
:root[data-theme="light"] .sidebar-filter-form > button:active,
:root[data-theme="light"] .admin-items-actions > button:hover,
:root[data-theme="light"] .admin-items-actions > button:focus-visible,
:root[data-theme="light"] .admin-items-actions > button:active,
:root[data-theme="light"] .admin-add-dialog .admin-item-form > button:hover,
:root[data-theme="light"] .admin-add-dialog .admin-item-form > button:focus-visible,
:root[data-theme="light"] .admin-add-dialog .admin-item-form > button:active {
  color: #fff !important;
  background: #000 !important;
  border-color: #000 !important;
  text-shadow: 0 0 5px rgba(255, 255, 255, .72), 0 0 12px rgba(255, 255, 255, .4) !important;
  box-shadow: 0 0 13px rgba(0, 0, 0, .78), 0 0 29px rgba(0, 0, 0, .48) !important;
}
:root:not([data-theme="light"]) .sidebar-filter-form > button,
:root:not([data-theme="light"]) .admin-items-actions > button,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button {
  color: #050505 !important;
  background: #fff !important;
  border-color: #fff !important;
  text-shadow: none !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, .48), 0 0 18px rgba(255, 255, 255, .24) !important;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease,
              box-shadow .18s ease, text-shadow .18s ease;
}
:root:not([data-theme="light"]) .sidebar-filter-form > button:hover,
:root:not([data-theme="light"]) .sidebar-filter-form > button:focus-visible,
:root:not([data-theme="light"]) .sidebar-filter-form > button:active,
:root:not([data-theme="light"]) .admin-items-actions > button:hover,
:root:not([data-theme="light"]) .admin-items-actions > button:focus-visible,
:root:not([data-theme="light"]) .admin-items-actions > button:active,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:hover,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:focus-visible,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:active {
  color: #050505 !important;
  background: #fff !important;
  border-color: #fff !important;
  text-shadow: 0 0 5px rgba(0, 0, 0, .48), 0 0 12px rgba(0, 0, 0, .28) !important;
  box-shadow: 0 0 13px rgba(255, 255, 255, .78), 0 0 29px rgba(255, 255, 255, .48) !important;
}

/* Match the System Admin black-glow treatment in both themes. */
:root:not([data-theme="light"]) .sidebar-filter-form > button,
:root:not([data-theme="light"]) .admin-items-actions > button,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button {
  box-shadow: 0 0 8px rgba(0, 0, 0, .52), 0 0 18px rgba(0, 0, 0, .3) !important;
}
:root:not([data-theme="light"]) .sidebar-filter-form > button:hover,
:root:not([data-theme="light"]) .sidebar-filter-form > button:focus-visible,
:root:not([data-theme="light"]) .sidebar-filter-form > button:active,
:root:not([data-theme="light"]) .admin-items-actions > button:hover,
:root:not([data-theme="light"]) .admin-items-actions > button:focus-visible,
:root:not([data-theme="light"]) .admin-items-actions > button:active,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:hover,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:focus-visible,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:active {
  box-shadow: 0 0 13px rgba(0, 0, 0, .82), 0 0 29px rgba(0, 0, 0, .54) !important;
}

/* Dark-mode action buttons use the matching white-glow treatment. */
:root:not([data-theme="light"]) .sidebar-filter-form > button,
:root:not([data-theme="light"]) .admin-items-actions > button,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button {
  box-shadow: 0 0 8px rgba(255, 255, 255, .48), 0 0 18px rgba(255, 255, 255, .24) !important;
}
:root:not([data-theme="light"]) .sidebar-filter-form > button:hover,
:root:not([data-theme="light"]) .sidebar-filter-form > button:focus-visible,
:root:not([data-theme="light"]) .sidebar-filter-form > button:active,
:root:not([data-theme="light"]) .admin-items-actions > button:hover,
:root:not([data-theme="light"]) .admin-items-actions > button:focus-visible,
:root:not([data-theme="light"]) .admin-items-actions > button:active,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:hover,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:focus-visible,
:root:not([data-theme="light"]) .admin-add-dialog .admin-item-form > button:active {
  box-shadow: 0 0 13px rgba(255, 255, 255, .82), 0 0 29px rgba(255, 255, 255, .54) !important;
}

/* Put Clear directly under Apply Filters in the left-panel filter forms. */
.sidebar-filter-clear {
  justify-self: end;
  margin-top: 2px;
  margin-right: 6px;
  color: var(--muted);
  font-size: 12.72px;
  text-decoration: none;
}
.sidebar-filter-clear:hover,
.sidebar-filter-clear:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Do not animate the persisted sidebar width as a new page initializes. */
@media (min-width: 701px) {
  html.sidebar-width-initializing .app.sidebar-portal > .sidebar {
    transition: none !important;
  }
}

/* Department-admin accounts: soften boxy corners without changing existing colors. */
.dept-account-portal :is(
  .sidebar,
  .sidebar-controls,
  .account-popover,
  [class*="card"],
  [class*="panel"],
  [class*="dialog"],
  [class*="modal"],
  [class*="toolbar"],
  .notification-card,
  table
) {
  border-radius: 12px !important;
}
.dept-account-portal :is(button, .btn, input, select, textarea, summary, [role="button"]) {
  border-radius: 8px !important;
}
.dept-account-portal .sidebar nav a,
.dept-account-portal .sidebar-toggle,
.dept-account-portal .theme-toggle,
.dept-account-portal .account-trigger {
  border-radius: 8px !important;
}
.dept-account-portal .equipment-card,
.dept-account-portal .notification-card {
  overflow: hidden;
}


/* Sidebar navigation transitions affect content only; the control panel stays fixed. */
@keyframes sidebar-content-enter-from-bottom {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sidebar-content-enter-from-top {
  from { opacity: 0; transform: translateY(-22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sidebar-content-exit-up {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-18px); }
}
@keyframes sidebar-content-exit-down {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(18px); }
}
html[data-nav-transition="up"] .app > .content > main {
  animation: sidebar-content-enter-from-bottom .34s cubic-bezier(.2,.75,.25,1) both;
}
html[data-nav-transition="down"] .app > .content > main {
  animation: sidebar-content-enter-from-top .34s cubic-bezier(.2,.75,.25,1) both;
}
html[data-nav-leaving="up"] .app > .content > main {
  animation: sidebar-content-exit-up .34s cubic-bezier(.4,0,.7,.25) both;
}
html[data-nav-leaving="down"] .app > .content > main {
  animation: sidebar-content-exit-down .34s cubic-bezier(.4,0,.7,.25) both;
}
@media (prefers-reduced-motion: reduce) {
  html[data-nav-transition] .app > .content > main,
  html[data-nav-leaving] .app > .content > main {
    animation: none !important;
  }
}

/* One shared gray nav highlight slides behind the selected sidebar link. */
.app.sidebar-portal .sidebar nav[data-sliding-indicator] {
  position: relative;
  isolation: isolate;
}
.app.sidebar-portal .sidebar nav[data-sliding-indicator] > .sidebar-nav-active-indicator {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 0;
  pointer-events: none;
  transition: transform .36s cubic-bezier(.22, .78, .24, 1),
              width .36s cubic-bezier(.22, .78, .24, 1),
              height .36s cubic-bezier(.22, .78, .24, 1);
  will-change: transform;
}
.app.sidebar-portal .sidebar nav[data-sliding-indicator] > a {
  position: relative;
  z-index: 1;
  background: transparent;
}
.app.sidebar-portal .sidebar nav[data-sliding-indicator] > a.active {
  border-color: transparent;
}
.dept-account-portal .sidebar nav[data-sliding-indicator] > .sidebar-nav-active-indicator {
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .app.sidebar-portal .sidebar nav[data-sliding-indicator] > .sidebar-nav-active-indicator {
    transition-duration: .01ms;
  }
}

/* Keep the shared moving active-state background rounded. */
.app.sidebar-portal .sidebar nav[data-sliding-indicator] > .sidebar-nav-active-indicator {
  border-radius: 8px;
}

/* Ensure department-account cards and responsive table shells show their rounded corners. */
.dept-account-portal [class*="card"] {
  border-radius: 12px !important;
  overflow: hidden;
}
.dept-account-portal .request-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
}
.dept-account-portal table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
}

/* Rounded statistics cards on department dashboard and request queue. */
.dept-account-portal .stats {
  border-radius: 12px;
}
.dept-account-portal .stats > .stat {
  border-radius: 11px;
}

/* Connected KPI tiles: no gutters, with rounding only around the group's outside edge. */
.dept-account-portal .stats {
  gap: 0;
  column-gap: 0;
  border-radius: 12px;
  overflow: hidden;
}
.dept-account-portal .stats > .stat {
  border-radius: 0;
}
.dept-account-portal .stats > .stat:first-child {
  border-radius: 11px 0 0 11px;
}
.dept-account-portal .stats > .stat:last-child {
  border-radius: 0 11px 11px 0;
}
@media (max-width: 760px) {
  .dept-account-portal .stats > .stat:first-child { border-radius: 11px 0 0 0; }
  .dept-account-portal .stats > .stat:nth-child(2) { border-radius: 0 11px 0 0; }
  .dept-account-portal .stats > .stat:nth-child(3) { border-radius: 0 0 0 11px; }
  .dept-account-portal .stats > .stat:last-child { border-radius: 0 0 11px 0; }
}

/* Department KPI cards: divider lines, right-side icons, and stronger type hierarchy. */
.dept-account-portal .stats > .stat:not(:last-child) {
  border-right: 1px solid var(--line);
}
.dept-account-portal .stats > .stat {
  position: relative;
  padding-right: 56px;
}
.dept-account-portal .stats > .stat > .stat-label {
  font-size: 12px;
}
.dept-account-portal .stats > .stat > strong {
  font-size: 40px;
}
.dept-account-portal .stats > .stat > .stat-icon {
  position: absolute;
  top: 50%;
  right: 16px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--muted);
  opacity: .82;
  transform: translateY(-50%);
}
.dept-account-portal .stats > .stat > .stat-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* KPI icons are enabled only for the department-account cards styled above. */
.stat > .stat-icon { display: none; }

/* Keep all four department KPI tiles visually consistent with a more compact type scale. */
.dept-account-portal .stats > .stat.hl {
  background: var(--surface);
}
.dept-account-portal .stats > .stat > .stat-label {
  font-size: 10.6px;
}
.dept-account-portal .stats > .stat > strong {
  font-size: 31.8px;
}

/* Sidebar theme preferences and compact account profile card. */
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.theme-switcher {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.theme-switcher .theme-option {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  height: 32px;
  place-items: center;
  margin: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  box-shadow: none;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.theme-switcher .theme-option svg {
  display: block !important;
  width: 16px;
  height: 16px;
  visibility: visible !important;
  opacity: 1 !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: filter .36s cubic-bezier(.22, .78, .24, 1), color .36s ease;
}
.theme-switcher .theme-option:hover,
.theme-switcher .theme-option:focus-visible {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.theme-switcher .theme-option:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.theme-switcher .theme-option.is-active,
.theme-switcher .theme-option.is-active:hover {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.theme-switcher .theme-option.is-active > svg {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 1))
          drop-shadow(0 0 10px rgba(255, 255, 255, .86))
          drop-shadow(0 0 17px rgba(255, 255, 255, .56));
}
:root[data-theme="light"] .theme-switcher .theme-option.is-active > svg {
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, .9))
          drop-shadow(0 0 10px rgba(0, 0, 0, .72))
          drop-shadow(0 0 17px rgba(0, 0, 0, .48));
}
.theme-switcher-indicator {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  pointer-events: none;
  transition: transform .36s cubic-bezier(.22, .78, .24, 1),
              width .36s cubic-bezier(.22, .78, .24, 1),
              height .36s cubic-bezier(.22, .78, .24, 1);
  view-transition-name: theme-active-indicator;
  will-change: transform;
}
html.theme-anim,
html.theme-anim *,
html.theme-anim ::before,
html.theme-anim ::after {
  transition: background-color .5s, border-color .5s, color .5s, fill .5s, stroke .5s,
              box-shadow .5s, outline-color .5s !important;
}
html.theme-anim .theme-switcher-indicator {
  transition: transform .36s cubic-bezier(.22, .78, .24, 1) !important,
              width .36s cubic-bezier(.22, .78, .24, 1) !important,
              height .36s cubic-bezier(.22, .78, .24, 1) !important;
}
html.theme-anim .theme-switcher .theme-option > svg {
  transition: filter .36s cubic-bezier(.22, .78, .24, 1) !important,
              color .5s ease !important;
}
/* Bryllim-style circular reveal: a clean color wipe, with no blur or glass overlay. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-group(theme-active-indicator) {
  animation-duration: .36s;
  animation-timing-function: cubic-bezier(.22, .78, .24, 1);
}
::view-transition-old(theme-active-indicator),
::view-transition-new(theme-active-indicator) {
  animation: none;
  mix-blend-mode: normal;
}
.sidebar-account-card {
  width: 100%;
  min-width: 0;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.sidebar-account-card .account-menu {
  position: relative;
  width: 100%;
}
.sidebar-account-card .account-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 4px 5px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  box-shadow: none;
  text-align: left;
}
.sidebar-account-card .account-trigger:hover,
.sidebar-account-card .account-trigger:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
  border-color: transparent;
  box-shadow: none;
}
.sidebar-account-card .avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
}
.sidebar-account-card .who {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}
.sidebar-account-card .who strong,
.sidebar-account-card .who small {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-account-card .who strong { color: var(--ink); font-size: 11.5px; font-weight: 600; }
.sidebar-account-card .who small { color: var(--muted); font-size: 9.5px; }
.sidebar-account-card .account-chevron {
  display: flex;
  width: 14px;
  flex: 0 0 14px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--muted);
}
.sidebar-account-card .account-chevron svg {
  display: block;
  width: 12px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-account-card .account-trigger[aria-expanded="true"] .account-chevron { color: var(--ink); }
.sidebar-account-card .account-popover { width: min(260px, calc(100vw - 32px)); }
@media (max-width: 700px) {
  .sidebar-account-card .account-trigger .who { display: flex; }
}
/* The account menu is portaled to the document body so sidebar overflow cannot clip it. */
.account-popover.account-popover-portal {
  position: fixed;
  z-index: 2147483000;
  top: 12px;
  right: auto;
  bottom: auto;
  left: 12px;
  width: min(260px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 12px;
  transform: translateY(-8px) scale(.98);
  transform-origin: top left;
}
.account-popover.account-popover-portal.opens-upward {
  transform: translateY(8px) scale(.98);
  transform-origin: bottom left;
}
.account-popover.account-popover-portal.is-open { transform: translateY(0) scale(1); }

/* Keep the native file-selection behavior, but make its picker control match the stock-action buttons. */
.image-upload-field input[type="file"]::file-selector-button {
  min-height: 38px;
  margin: 0 12px 0 0;
  padding: 8px 14px;
  color: #fff;
  background: #080808;
  border: 1px solid #080808;
  border-radius: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, .48), 0 0 18px rgba(0, 0, 0, .24);
  transition: color .18s ease, background-color .18s ease, border-color .18s ease,
              box-shadow .18s ease, text-shadow .18s ease;
}
.image-upload-field input[type="file"]:hover::file-selector-button,
.image-upload-field input[type="file"]:focus-visible::file-selector-button {
  color: #fff;
  background: #000;
  border-color: #000;
  box-shadow: 0 0 13px rgba(0, 0, 0, .78), 0 0 29px rgba(0, 0, 0, .48);
  text-shadow: 0 0 5px rgba(255, 255, 255, .72), 0 0 12px rgba(255, 255, 255, .4);
}
:root:not([data-theme="light"]) .image-upload-field input[type="file"]::file-selector-button {
  color: #050505;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, .48), 0 0 18px rgba(255, 255, 255, .24);
}
:root:not([data-theme="light"]) .image-upload-field input[type="file"]:hover::file-selector-button,
:root:not([data-theme="light"]) .image-upload-field input[type="file"]:focus-visible::file-selector-button {
  color: #050505;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 13px rgba(255, 255, 255, .82), 0 0 29px rgba(255, 255, 255, .54);
  text-shadow: 0 0 5px rgba(0, 0, 0, .48), 0 0 12px rgba(0, 0, 0, .28);
}

/* Match the chat send control's glow to the app's monochrome theme buttons. */
.chat-composer-footer button[data-chat-send]:not(:disabled) {
  transition: box-shadow .2s ease, text-shadow .2s ease, filter .2s ease;
}
:root[data-theme="light"] .chat-composer-footer button[data-chat-send]:not(:disabled) {
  box-shadow: 0 0 8px rgba(0, 0, 0, .48), 0 0 18px rgba(0, 0, 0, .24);
}
:root[data-theme="light"] .chat-composer-footer button[data-chat-send]:not(:disabled):hover,
:root[data-theme="light"] .chat-composer-footer button[data-chat-send]:not(:disabled):focus-visible {
  color: #fff;
  background: #050505;
  border-color: #050505;
  filter: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, .78), 0 0 30px rgba(0, 0, 0, .44);
  text-shadow: 0 0 6px rgba(255, 255, 255, .48);
}
:root:not([data-theme="light"]) .chat-composer-footer button[data-chat-send]:not(:disabled) {
  box-shadow: 0 0 8px rgba(255, 255, 255, .24), 0 0 18px rgba(255, 255, 255, .12);
}
:root:not([data-theme="light"]) .chat-composer-footer button[data-chat-send]:not(:disabled):hover,
:root:not([data-theme="light"]) .chat-composer-footer button[data-chat-send]:not(:disabled):focus-visible {
  color: #050505;
  background: #fff;
  border-color: #fff;
  filter: none;
  box-shadow: 0 0 12px rgba(255, 255, 255, .82), 0 0 30px rgba(255, 255, 255, .44);
  text-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  .theme-switcher-indicator { transition-duration: .01ms; }
  html.theme-anim,
  html.theme-anim *,
  html.theme-anim ::before,
  html.theme-anim ::after { transition: none !important; }
  html.theme-anim .theme-switcher-indicator { transition-duration: .01ms !important; }
  ::view-transition-group(theme-active-indicator) { animation-duration: .01ms; }
}

/* Rounded file-picker and account-menu action controls; keep the panel outline visibly neutral gray. */
.image-upload-field input[type="file"]::file-selector-button { border-radius: 8px; }
.account-popover.account-popover-portal { border-color: var(--line); }
.account-popover.account-popover-portal > .account-menu-action,
.account-popover.account-popover-portal .signout-button { border-radius: 8px !important; }

/* In the compact rail, keep only the monitor and the user's real avatar visible. */
.theme-switcher-trigger {
  display: none;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}
.theme-switcher-trigger:hover,
.theme-switcher-trigger:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
}
.theme-switcher-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-sidebar="hidden"] .app.sidebar-portal > .sidebar > .sidebar-bottom {
  display: flex;
  width: 40px;
  min-width: 40px;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}
html[data-sidebar="hidden"] .sidebar-bottom .theme-switcher-trigger { display: grid; }
html[data-sidebar="hidden"] .sidebar-bottom .theme-switcher { display: none; }
html[data-sidebar="hidden"] .sidebar-bottom.is-theme-open .theme-switcher {
  position: fixed;
  z-index: 1200;
  display: grid;
  width: 160px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}
html[data-sidebar="hidden"] .sidebar-bottom.is-theme-open .theme-switcher .theme-option {
  height: 34px;
}
html[data-sidebar="hidden"] .sidebar-bottom .sidebar-account-card {
  width: 40px;
  min-width: 40px;
  padding: 0;
  background: transparent;
  border: 0;
}
html[data-sidebar="hidden"] .sidebar-bottom .account-trigger {
  width: 40px;
  height: 40px;
  min-height: 40px;
  justify-content: center;
  gap: 0;
  padding: 2px;
  border-radius: 50%;
}
html[data-sidebar="hidden"] .sidebar-bottom .account-trigger .who,
html[data-sidebar="hidden"] .sidebar-bottom .account-trigger .account-chevron { display: none; }
html[data-sidebar="hidden"] .sidebar-bottom .account-trigger .avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 50%;
}
@media (max-width: 700px) {
  html[data-sidebar="hidden"] .app.sidebar-portal > .sidebar > .sidebar-bottom {
    width: 40px;
    min-width: 40px;
    margin-top: auto;
    align-items: center;
  }
}

/* Let the current page's navigation icon stand out without changing its button. */
.app.sidebar-portal .sidebar nav a.active svg {
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, .98))
          drop-shadow(0 0 8px rgba(255, 255, 255, .82))
          drop-shadow(0 0 15px rgba(255, 255, 255, .48));
  transition: filter .3s ease;
}
:root[data-theme="light"] .app.sidebar-portal .sidebar nav a.active svg {
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, .88))
          drop-shadow(0 0 8px rgba(0, 0, 0, .68))
          drop-shadow(0 0 15px rgba(0, 0, 0, .42));
}

/* Give the system-admin account and theme modes separate rounded cards. */
.floating-portal-controls {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: auto;
  height: 0;
  pointer-events: none;
}
.floating-controls-bar {
  display: contents;
}
.system-admin-account-card,
.system-admin-theme-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.system-admin-account-card {
  position: fixed;
  z-index: 1001;
  top: 14px;
  left: 14px;
  display: flex;
  width: min(300px, calc(50vw - 26px));
  min-height: 58px;
  align-items: center;
  padding: 5px;
  pointer-events: auto;
}
.system-admin-account-card .account-menu { width: 100%; min-width: 0; }
.system-admin-account-card .account-trigger { border-radius: 8px; }
.system-admin-account-card .account-trigger .avatar { border-radius: 50%; }
.system-admin-theme-card {
  position: fixed;
  z-index: 1001;
  top: 14px;
  right: 14px;
  display: flex;
  width: 174px;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 5px 8px;
  pointer-events: auto;
}
.system-admin-theme-card .theme-switcher {
  width: 100%;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 8px;
}
.system-admin-theme-card .theme-option { height: 32px; }
@media (max-width: 480px) {
  .system-admin-account-card {
    top: 10px;
    left: 10px;
    width: calc(50vw - 26px);
  }
  .system-admin-theme-card {
    top: 10px;
    right: 10px;
    width: min(174px, calc(50vw - 20px));
    padding: 5px;
  }
}

/* Rounded system-admin workspace surfaces, without affecting borrower/department pages. */
.system-admin-portal :is(.card, .department-admin-create-card, .department-admin-dialog, .password-change-dialog, .account-popover) {
  border-radius: 14px;
}
.system-admin-portal table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
}
.system-admin-portal :is(input, select, textarea) { border-radius: 10px; }
.system-admin-portal :is(button, .btn, [role="button"]) { border-radius: 10px; }
.system-admin-portal .link { border-radius: 8px; }
.system-admin-portal :is(.catalog-count, .badge, .flash) { border-radius: 999px; }
.system-admin-portal .password-dialog-content { border-radius: 14px; }
:root .system-admin-portal :is(button:not(.theme-option), .btn, [role="button"]) { border-radius: 10px !important; }
:root .system-admin-portal .link { border-radius: 8px !important; }
:root .system-admin-portal .department-admin-create-card > button,
:root .system-admin-portal .department-admin-create-card > button:hover,
:root .system-admin-portal .department-admin-create-card > button:focus-visible,
:root .system-admin-portal .department-admin-create-card > button:active,
:root:not([data-theme="light"]) .system-admin-portal .department-admin-create-card > button,
:root:not([data-theme="light"]) .system-admin-portal .department-admin-create-card > button:hover,
:root:not([data-theme="light"]) .system-admin-portal .department-admin-create-card > button:focus-visible,
:root:not([data-theme="light"]) .system-admin-portal .department-admin-create-card > button:active {
  border-radius: 12px !important;
}

/* Sidebar navigation always uses the existing fixed custom-cursor overlay. */
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a:hover,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a:active,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a:focus,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a:focus-visible,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a.active,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a *,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a *:hover,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a *:active,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a *:focus,
:root[data-custom-cursor="active"] .app.sidebar-portal .sidebar nav a *:focus-visible {
  cursor: none !important;
}
:root[data-nav-leaving] #custom-cursor { opacity: 1 !important; }

/* Keep equipment and filter dropdown borders rounded against the square base form styles. */
.admin-equipment-card .admin-item-fields select { border-radius: 10px !important; }
.sidebar-filter-form .filter-select button.department-select-trigger,
.department-select-menu { border-radius: 8px !important; }

/* Equipment form dropdowns: keep the existing select-like control and round each menu option. */
.equipment-custom-select { margin-top: 5px; }
.admin-item-form > .equipment-custom-select { width: 100%; min-width: 0; margin: 0; }
.admin-equipment-card .admin-item-fields .equipment-custom-select { margin-top: 5px; }
.equipment-custom-select button.department-select-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px !important;
  font: 13.78px/1.55 var(--sans);
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  box-shadow: none;
  transform: none;
}
.equipment-custom-select button.department-select-trigger:hover,
.equipment-custom-select button.department-select-trigger:focus-visible,
.equipment-custom-select button.department-select-trigger:active {
  color: var(--ink);
  background: var(--bg);
  border-color: var(--line-strong);
  border-radius: 10px !important;
  box-shadow: none;
  filter: none;
  text-shadow: none;
  transform: none;
  outline: none;
}
.equipment-custom-select .department-select-menu {
  padding: 4px;
  border-radius: 10px !important;
}
.equipment-custom-select button.department-option {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 2px 0 3px;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 7px !important;
  font: 13.78px/1.4 var(--sans);
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  box-shadow: none;
  transform: none;
}
.equipment-custom-select button.department-option:hover,
.equipment-custom-select button.department-option:focus-visible,
.equipment-custom-select button.department-option.is-selected {
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 7px !important;
  box-shadow: none;
  filter: none;
  text-shadow: none;
  transform: none;
  outline: none;
}
:root[data-theme="light"] .equipment-custom-select button.department-option.is-selected,
:root[data-theme="light"] .equipment-custom-select button.department-option.is-selected:hover,
:root[data-theme="light"] .equipment-custom-select button.department-option.is-selected:focus-visible {
  color: #ffffff;
  background: #1f66d2;
}

/* Shared loading skeletons: shown only while image/API work is actually pending. */
.chat-skeleton-line,
.is-image-loading::before,
.field-note.is-availability-loading::before {
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%);
  background-size: 220% 100%;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
}
@keyframes cspc-skeleton-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}
.equipment-card-image[data-image-skeleton],
.chat-item-attachment-image-frame[data-image-skeleton],
.chat-item-preview-image-frame[data-image-skeleton] { position: relative; overflow: hidden; }
.is-image-loading::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  content: '';
}
.is-image-loading > img { opacity: 0; }
.equipment-card-image > img { position: relative; z-index: 3; transition: opacity .12s ease; }
.avatar[data-image-skeleton]::before { border-radius: inherit; }
.chat-item-attachment-image-frame { display: block; width: 48px; height: 48px; flex: 0 0 48px; background: var(--surface-2); }
.chat-item-attachment-image-frame .chat-item-attachment-image { display: block; width: 100%; height: 100%; border: 1px solid var(--line); object-fit: cover; }
.chat-item-preview-image-frame { display: block; width: 38px; height: 38px; flex: 0 0 38px; background: var(--surface-2); }
.chat-item-preview-image-frame img { display: block; width: 100%; height: 100%; border: 1px solid var(--line); object-fit: cover; }
.chat-conversation-skeleton { display: flex; min-height: 94px; flex-direction: column; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; }
.chat-skeleton-line { display: block; height: 9px; border-radius: 5px; }
.chat-conversation-skeleton .name { width: 55%; height: 12px; }
.chat-conversation-skeleton .email { width: 72%; height: 9px; }
.chat-conversation-skeleton .detail { width: 48%; height: 8px; }
.chat-conversation-skeleton .preview { width: 82%; height: 8px; }
.chat-message-skeleton-group { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.chat-message-skeleton { display: flex; width: min(72%, 620px); flex-direction: column; align-self: flex-start; gap: 8px; padding: 12px 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; }
.chat-message-skeleton.is-own { align-self: flex-end; border-radius: 12px 12px 3px 12px; }
.chat-message-skeleton .meta { width: 38%; height: 8px; margin-bottom: 2px; }
.chat-message-skeleton .body { height: 9px; }
.chat-message-skeleton .long { width: 96%; }
.chat-message-skeleton .medium { width: 74%; }
.chat-message-skeleton .short { width: 47%; }
.field-note.is-availability-loading { position: relative; min-height: 1.55em; color: transparent !important; }
.field-note.is-availability-loading::before { position: absolute; top: .15em; left: 0; width: min(220px, 72%); height: 1.15em; border-radius: 5px; content: ''; }
@media (max-width: 700px) {
  .chat-message-skeleton { width: 88%; }
  .chat-conversation-skeleton { min-height: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-skeleton-line,
  .is-image-loading::before,
  .field-note.is-availability-loading::before { animation: none; }
  .equipment-card-image > img { transition: none; }
}

/* Full-page skeleton snapshot displayed only while an in-site document request is in flight. */
.page-loading-skeleton-layer {
  position: fixed;
  z-index: 200000;
  inset: 0;
  overflow: auto;
  background: var(--bg);
  pointer-events: auto;
}
.page-loading-skeleton-copy { min-height: 100vh; color: transparent !important; pointer-events: none !important; }
.page-loading-skeleton-copy * { color: transparent !important; caret-color: transparent !important; text-shadow: none !important; }
.page-loading-skeleton-copy :is(.sidebar, .topbar, .floating-portal-controls, .admin-equipment-card, .equipment-card, .stat, .chat-panel, .card, table, .notification-card, .request-card) {
  background-color: var(--surface) !important;
}
.page-loading-skeleton-copy :is(.sidebar nav a, .admin-equipment-card, .equipment-card, .stat, .chat-panel, .notification-card, .request-card, table) {
  border-color: var(--line) !important;
}
.page-loading-skeleton-copy .page-loading-skeleton-text {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
  border-radius: 5px;
}
.page-loading-skeleton-copy .page-loading-skeleton-text::after {
  position: absolute;
  inset: 15% 0 20%;
  border-radius: inherit;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%);
  background-size: 220% 100%;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
  content: '';
}
.page-loading-skeleton-copy .page-loading-skeleton-control {
  color: transparent !important;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%) !important;
  background-size: 220% 100% !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
}
.page-loading-skeleton-copy :is(input, textarea)::placeholder { color: transparent !important; opacity: 0 !important; }
.page-loading-skeleton-copy .page-loading-skeleton-control::before,
.page-loading-skeleton-copy .page-loading-skeleton-control::after { content: none !important; display: none !important; }
.page-loading-skeleton-copy .page-loading-skeleton-image,
.page-loading-skeleton-copy .page-loading-skeleton-chart {
  color: transparent !important;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%) !important;
  background-size: 220% 100% !important;
  border-color: var(--line) !important;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
}
.page-loading-skeleton-copy .page-loading-skeleton-image { object-fit: cover; }
.page-loading-skeleton-copy .page-loading-skeleton-icon {
  color: transparent !important;
  fill: var(--surface-2) !important;
  stroke: var(--surface-2) !important;
  opacity: .85;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%);
  background-size: 220% 100%;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
}
.page-loading-skeleton-copy .logo {
  clip-path: none !important;
  border-radius: 50% !important;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%) !important;
  background-size: 220% 100% !important;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
}
.page-loading-skeleton-copy .page-loading-skeleton-control:is(input[type="checkbox"], input[type="radio"]) {
  appearance: none;
  border: 1px solid var(--line-strong) !important;
}
.page-loading-skeleton-copy .page-loading-skeleton-control:is(input[type="checkbox"]) { border-radius: 3px !important; }
.page-loading-skeleton-copy .page-loading-skeleton-control:is(input[type="radio"]) { border-radius: 50% !important; }
.page-loading-skeleton-copy .page-loading-skeleton-control::-webkit-file-upload-button,
.page-loading-skeleton-copy .page-loading-skeleton-control::file-selector-button {
  color: transparent !important;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%) !important;
  background-size: 220% 100% !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
}
.page-loading-skeleton-copy :is(th, td) { background-color: var(--surface-2) !important; }
.page-loading-skeleton-copy :is(.sidebar nav a, .pagination, [aria-label*="pagination" i]) { color: transparent !important; }
html[data-page-skeleton-loading="true"] { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .page-loading-skeleton-copy .page-loading-skeleton-text::after,
  .page-loading-skeleton-copy .page-loading-skeleton-control,
  .page-loading-skeleton-copy .page-loading-skeleton-image,
  .page-loading-skeleton-copy .page-loading-skeleton-chart,
  .page-loading-skeleton-copy .page-loading-skeleton-icon,
  .page-loading-skeleton-copy .logo,
  .page-loading-skeleton-copy .page-loading-skeleton-control::file-selector-button { animation: none; }
}

/* Component-aware refinements: use the site's own structures, measured text lines, and real control geometry. */
.page-loading-skeleton-copy .page-loading-skeleton-text-group {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  vertical-align: middle;
}
.page-loading-skeleton-copy .page-loading-skeleton-text-group > .page-loading-skeleton-text { display: block; }
.page-loading-skeleton-copy .page-loading-skeleton-account-trigger {
  color: transparent !important;
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
  animation: none !important;
}
.page-loading-skeleton-copy .page-loading-skeleton-avatar {
  color: transparent !important;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%) !important;
  background-size: 220% 100% !important;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
}
.page-loading-skeleton-copy .page-loading-skeleton-avatar .avatar-initial { visibility: hidden !important; }
.page-loading-skeleton-copy .page-loading-skeleton-icon { fill: transparent !important; stroke: transparent !important; border-radius: 5px; }
.page-loading-skeleton-copy .page-loading-skeleton-small-icon { border-radius: 4px; }
.page-loading-skeleton-copy .page-loading-skeleton-stat-icon { border-radius: 8px; }
.page-loading-skeleton-copy .page-loading-skeleton-logo {
  clip-path: none !important;
  border-radius: 8px !important;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%) !important;
  background-size: 220% 100% !important;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
}
.page-loading-skeleton-copy .page-loading-skeleton-equipment-image { z-index: 0 !important; }
.page-loading-skeleton-copy .page-loading-skeleton-equipment-body { position: relative; z-index: 2 !important; }
.page-loading-skeleton-copy .page-loading-skeleton-equipment-card::after { display: none !important; }
.chat-conversation-skeleton { min-height: 0; gap: 5px; padding: 14px 16px; }
.chat-conversation-skeleton .name { height: 15px; }
.chat-conversation-skeleton .email,
.chat-conversation-skeleton .preview { height: 12px; }
.chat-conversation-skeleton .detail { height: 13.35px; }
.chat-message-skeleton { width: min(82%, 620px); gap: 0; padding: 10px 13px; }
.chat-message-skeleton .meta { height: 12px; margin-bottom: 5px; }
.chat-message-skeleton .body { position: relative; height: 21.36px; background: transparent; }
.chat-message-skeleton .body::after {
  position: absolute;
  inset: 6px 0;
  border-radius: 5px;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 45%, var(--surface-2) 70%);
  background-size: 220% 100%;
  animation: cspc-skeleton-shimmer 1.45s ease-in-out infinite;
  content: '';
}
@media (max-width: 700px) {
  .chat-message-skeleton { width: 88%; }
}
@media (prefers-reduced-motion: reduce) {
  .page-loading-skeleton-copy .page-loading-skeleton-avatar,
  .page-loading-skeleton-copy .page-loading-skeleton-logo,
  .page-loading-skeleton-copy .page-loading-skeleton-text-group > .page-loading-skeleton-text::after,
  .chat-message-skeleton .body::after { animation: none; }
}

/* Do not flash shimmer on fast connections; the app enables this state from live network hints. */
.is-image-loading::before { display: none; }
.is-image-loading > img { opacity: 1; }
:root[data-skeleton-enabled="true"] .is-image-loading::before { display: block; }
:root[data-skeleton-enabled="true"] .is-image-loading > img { opacity: 0; }
:root:not([data-skeleton-enabled="true"]) .field-note.is-availability-loading { color: var(--muted) !important; }
:root:not([data-skeleton-enabled="true"]) .field-note.is-availability-loading::before { display: none !important; }
:root[data-skeleton-enabled="true"] .field-note.is-availability-loading { color: transparent !important; }
:root[data-skeleton-enabled="true"] .field-note.is-availability-loading::before { display: block; }


/* Chat inbox: improve borrower text hierarchy and legibility without changing card geometry. */
.chat-conversation,
.chat-conversation * {
  text-shadow: none !important;
}
.chat-conversation {
  gap: 5px;
  line-height: 1.4;
}
.chat-conversation-top {
  align-items: center;
  gap: 9px;
}
.chat-conversation-top strong {
  color: var(--ink);
  font-size: 13.78px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.chat-conversation-email {
  color: var(--muted);
  font-size: 11.66px;
  line-height: 1.35;
  letter-spacing: .005em;
}
.chat-conversation-department {
  color: var(--muted);
  font-size: 10.6px;
  font-weight: 500;
  line-height: 1.35;
}
.chat-conversation-preview {
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  font-size: 11.66px;
  line-height: 1.4;
}
.chat-unread-badge {
  min-width: 20px;
  height: 20px;
  font-size: 10.6px;
  font-weight: 600;
}


/* Request Queue search mirrors the Manage Equipment search and stays above the count. */
.request-queue-heading-meta {
  display: flex;
  min-width: 240px;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}
.request-queue-heading-meta .catalog-count { align-self: flex-end; }
.request-queue-search {
  width: 240px;
  height: 42px;
  flex: 0 0 42px;
}
.request-queue-search input { height: 42px !important; }
@media (max-width: 700px) {
  .request-queue-heading-meta {
    width: 100%;
    min-width: 0;
    align-items: flex-end;
  }
  .request-queue-search {
    width: min(100%, 320px);
    max-width: 100%;
    flex: 0 0 42px;
  }
}
