:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-soft: #f9fafc;
  --card-bg: #fbfcfe;
  --card-bg-hover: #f4f7fb;
  --line: #d8dee8;
  --line-strong: #b9c3d2;
  --text: #172334;
  --muted: #647286;
  --quiet: #8a96a8;
  --navy: #173153;
  --navy-2: #25446b;
  --teal: #0f766e;
  --teal-soft: #e6f4f2;
  --amber: #b7791f;
  --amber-soft: #fff4dc;
  --red: #b42318;
  --red-soft: #fff1f0;
  --green: #16794c;
  --shadow: 0 18px 50px rgba(23, 35, 52, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
}

html:has(#oc-intel-portal-root),
body:has(#oc-intel-portal-root),
body.oc-intel-portal-page {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  background: var(--bg) !important;
}

body:has(#oc-intel-portal-root) .wp-site-blocks,
body.oc-intel-portal-page .wp-site-blocks,
body:has(#oc-intel-portal-root) .site,
body.oc-intel-portal-page .site,
body:has(#oc-intel-portal-root) #page,
body.oc-intel-portal-page #page,
body:has(#oc-intel-portal-root) #content,
body.oc-intel-portal-page #content,
body:has(#oc-intel-portal-root) .site-content,
body.oc-intel-portal-page .site-content,
body:has(#oc-intel-portal-root) .content-area,
body.oc-intel-portal-page .content-area,
body:has(#oc-intel-portal-root) main,
body.oc-intel-portal-page main,
body:has(#oc-intel-portal-root) article,
body.oc-intel-portal-page article,
body:has(#oc-intel-portal-root) .entry-content,
body.oc-intel-portal-page .entry-content,
body:has(#oc-intel-portal-root) .wp-block-post-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.oc-intel-portal-page .wp-block-post-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:has(#oc-intel-portal-root) .wp-site-blocks main,
body.oc-intel-portal-page .wp-site-blocks main,
body:has(#oc-intel-portal-root) .wp-site-blocks main > .wp-block-group,
body.oc-intel-portal-page .wp-site-blocks main > .wp-block-group,
body:has(#oc-intel-portal-root) .wp-site-blocks main .wp-block-group,
body.oc-intel-portal-page .wp-site-blocks main .wp-block-group,
body:has(#oc-intel-portal-root) .wp-site-blocks main .wp-block-post-content,
body.oc-intel-portal-page .wp-site-blocks main .wp-block-post-content,
body:has(#oc-intel-portal-root) .wp-site-blocks main .wp-block-group > * {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  padding-top: 0 !important;
  padding-block-start: 0 !important;
}

body.oc-intel-portal-page .wp-site-blocks main .wp-block-group > * {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  padding-top: 0 !important;
  padding-block-start: 0 !important;
}

body:has(#oc-intel-portal-root) .alignfull,
body.oc-intel-portal-page .alignfull,
body:has(#oc-intel-portal-root) .has-global-padding,
body.oc-intel-portal-page .has-global-padding,
body:has(#oc-intel-portal-root) .wp-block-group.alignfull.has-global-padding,
body.oc-intel-portal-page .wp-block-group.alignfull.has-global-padding {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body:has(#oc-intel-portal-root) > header,
body.oc-intel-portal-page > header,
body:has(#oc-intel-portal-root) > footer,
body.oc-intel-portal-page > footer,
body:has(#oc-intel-portal-root) .wp-site-blocks > header,
body.oc-intel-portal-page .wp-site-blocks > header,
body:has(#oc-intel-portal-root) .wp-site-blocks > footer,
body.oc-intel-portal-page .wp-site-blocks > footer,
body:has(#oc-intel-portal-root) .wp-site-blocks > .wp-block-template-part:first-child,
body.oc-intel-portal-page .wp-site-blocks > .wp-block-template-part:first-child,
body:has(#oc-intel-portal-root) header.wp-block-template-part,
body.oc-intel-portal-page header.wp-block-template-part,
body:has(#oc-intel-portal-root) .site-header,
body.oc-intel-portal-page .site-header,
body:has(#oc-intel-portal-root) .site-footer,
body.oc-intel-portal-page .site-footer,
body:has(#oc-intel-portal-root) .entry-header,
body.oc-intel-portal-page .entry-header,
body:has(#oc-intel-portal-root) .entry-title,
body.oc-intel-portal-page .entry-title,
body:has(#oc-intel-portal-root) .wp-block-post-title,
body.oc-intel-portal-page .wp-block-post-title,
body:has(#oc-intel-portal-root) .post-thumbnail,
body.oc-intel-portal-page .post-thumbnail,
body:has(#oc-intel-portal-root) .comments-area {
  display: none !important;
}

body.oc-intel-portal-page .comments-area {
  display: none !important;
}

body:has(#oc-intel-portal-root) #oc-intel-portal-root,
body.oc-intel-portal-page #oc-intel-portal-root {
  display: block;
  width: 100vw;
  max-width: 100vw;
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
  margin: 0;
  padding: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

input,
textarea,
select,
button {
  font-size: 13px;
  line-height: 1.35;
}

button {
  border: 0;
  cursor: pointer;
}

.portal-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background:
    linear-gradient(120deg, rgba(18, 34, 59, 0.94), rgba(20, 48, 84, 0.84)),
    url("./assets/sidebar-flag.png") center / cover no-repeat;
}

.portal-login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(3, 12, 28, 0.32);
}

.portal-rollout-notice {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 15, 30, 0.62);
  backdrop-filter: blur(5px);
}

.portal-rollout-notice[hidden] {
  display: none;
}

.portal-rollout-card {
  position: relative;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.98)),
    #ffffff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

.portal-rollout-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  font-size: 20px;
  line-height: 1;
}

.portal-rollout-kicker {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portal-rollout-card h2 {
  margin: 0 34px 10px 0;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.portal-rollout-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.portal-rollout-action {
  width: 100%;
  min-height: 40px;
  margin-top: 18px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 850;
}

.portal-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.portal-login-brand img {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(23, 49, 83, 0.16);
}

.portal-login-brand p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.portal-login-brand h1 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.portal-login-copy {
  display: grid;
  gap: 5px;
}

.portal-login-copy h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  letter-spacing: 0;
}

.portal-login-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.staff-login .portal-login-copy h2::after,
.user-login .portal-login-copy h2::after {
  display: inline-flex;
  margin-left: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  vertical-align: middle;
}

.staff-login .portal-login-copy h2::after {
  content: "Admin";
  color: #7c2d12;
  background: #ffedd5;
}

.user-login .portal-login-copy h2::after {
  content: "User";
  color: var(--teal);
  background: var(--teal-soft);
}

.portal-login-alert {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #fecaca;
  font-size: 13px;
  font-weight: 750;
}

.portal-register-success {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.portal-login-debug {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.portal-login-form {
  display: grid;
  gap: 13px;
}

.portal-login-form p {
  margin: 0;
}

.portal-login-form label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.portal-login-form input[type="text"],
.portal-login-form input[type="email"],
.portal-login-form input[type="password"] {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font-size: 13px;
}

.portal-login-form input[type="text"]:focus,
.portal-login-form input[type="email"]:focus,
.portal-login-form input[type="password"]:focus {
  outline: 2px solid rgba(15, 118, 110, 0.2);
  border-color: var(--teal);
}

.portal-login-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.portal-login-password-row button {
  min-width: 64px;
  border-radius: 8px;
  color: var(--navy);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 850;
}

.login-remember label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.login-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
}

.login-submit input {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.staff-login .login-submit input {
  background: var(--navy);
}

.portal-login-note {
  margin: 0;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.portal-login-switch {
  margin: -4px 0 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.portal-login-switch span {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.portal-login-switch a,
.portal-login-switch button {
  display: inline-flex;
  justify-content: center;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.portal-login-switch a:hover,
.portal-login-switch button:hover {
  background: var(--card-bg-hover);
}

.portal-mfa-panel {
  width: min(640px, 100%);
}

.portal-mfa-setup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.portal-mfa-qr {
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.portal-mfa-qr img {
  width: 190px;
  height: 190px;
  display: block;
}

.portal-mfa-steps {
  display: grid;
  gap: 12px;
}

.portal-mfa-steps ol {
  margin: 0;
  padding-left: 19px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.portal-mfa-steps label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.portal-mfa-steps input,
.portal-mfa-code {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.portal-mfa-form {
  gap: 12px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

body.admin-bar:has(#oc-intel-portal-root) .shell,
body.admin-bar.oc-intel-portal-page .shell {
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
  padding-top: var(--wp-admin--admin-bar--height, 32px);
}

.sidebar {
  position: relative;
  overflow: hidden;
  background: #12223b url("./assets/sidebar-flag.png") center / cover no-repeat;
  color: #f7fbff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 12, 24, 0.28), rgba(6, 12, 24, 0.74));
  pointer-events: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 34% 7%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(4, 9, 18, 0.08), rgba(4, 9, 18, 0.48));
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 24, 48, 0.86), rgba(6, 13, 25, 0.78)),
    linear-gradient(90deg, rgba(191, 23, 56, 0.3), rgba(255, 255, 255, 0.12), rgba(16, 47, 102, 0.32));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(3px);
}

.mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: #ffffff;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 0 0 3px rgba(191, 23, 56, 0.34), 0 12px 24px rgba(0, 0, 0, 0.3);
}

.seal-mark {
  display: block;
}

.brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: #aebbd0;
  font-size: 12px;
}

.nav-section {
  display: grid;
  gap: 5px;
}

.nav-title {
  padding: 0 8px 5px;
  color: #91a2ba;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-item {
  min-height: 36px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #e8f0fb;
  background: rgba(6, 14, 27, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 7px 8px;
  text-align: left;
  font-size: 14px;
  backdrop-filter: blur(2px);
}

.nav-item svg {
  width: 17px;
  height: 17px;
}

.topic-nav-item {
  min-height: 48px;
  align-items: start;
}

.request-nav-item {
  min-height: 52px;
  align-items: start;
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.28), rgba(6, 14, 27, 0.62)),
    rgba(6, 14, 27, 0.58);
}

.topic-nav-item span {
  display: grid;
  gap: 2px;
}

.topic-nav-item strong,
.request-nav-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.2;
}

.topic-nav-item em,
.request-nav-item em {
  color: #b9c8dd;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.nav-item:hover,
.nav-item.active {
  background:
    linear-gradient(90deg, rgba(34, 105, 220, 0.42), rgba(255, 255, 255, 0.16)),
    rgba(6, 14, 27, 0.62);
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  box-shadow: inset 4px 0 0 #55a7ff;
}

.count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e8f3ff;
  color: #13243b;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(6, 14, 27, 0.68);
  box-shadow: inset 4px 0 0 rgba(18, 118, 255, 0.74);
  backdrop-filter: blur(3px);
}

.sidebar-foot strong {
  display: block;
  font-size: 13px;
}

.sidebar-foot span {
  display: block;
  margin-top: 4px;
  color: #b9c8dd;
  font-size: 12px;
  line-height: 1.35;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  min-height: 70px;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(12px);
}

.page-title h1 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.page-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.search {
  width: min(360px, 35vw);
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search svg {
  width: 17px;
  height: 17px;
  color: var(--quiet);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.primary-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 8px;
  color: white;
  background: var(--teal);
  font-size: 13px;
  font-weight: 750;
}

.mobile-install-action {
  min-height: 40px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
  font-size: 13px;
  font-weight: 850;
}

.primary-action svg,
.mobile-install-action svg,
.icon-button svg {
  width: 17px;
  height: 17px;
}

.content {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  padding: 18px 22px 26px;
}

.workspace {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  min-height: calc(100vh - 114px);
}

.portal-footer {
  padding: 10px 22px 14px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

#command,
#discussion,
#wiki,
#topics,
#glance,
#orange-county-news,
#regional-news,
#national-news,
#resources,
#directory {
  scroll-margin-top: 88px;
}

.wiki-row em {
  color: var(--quiet);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.briefing {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.briefing > .section-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
}

body.admin-bar:has(#oc-intel-portal-root) .topbar,
body.admin-bar.oc-intel-portal-page .topbar {
  top: 0;
}

.discussion-board {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 280px;
  min-height: 0;
  background: #ffffff;
}

.channel-nav {
  border-right: 1px solid var(--line);
  background: #f5f7fb;
  min-width: 0;
}

.channel-nav-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 8px 14px;
}

.channel-nav-title {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.channel-nav-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.add-channel-button {
  width: 30px;
  height: 30px;
  background: #ffffff;
}

.room-search {
  margin: 0 10px 10px 14px;
  min-height: 34px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.room-search svg {
  width: 16px;
  height: 16px;
}

.room-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
}

.new-channel-form {
  display: grid;
  grid-template-columns: minmax(82px, 0.45fr) minmax(0, 1fr);
  gap: 8px;
  padding: 0 10px 10px 14px;
  border-bottom: 1px solid var(--line);
}

.new-channel-form[hidden] {
  display: none;
}

.new-channel-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.new-channel-form label:nth-of-type(n + 3) {
  grid-column: 1 / -1;
}

.new-channel-form label em {
  color: var(--quiet);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.25;
}

.new-channel-form input,
.new-channel-form select,
.new-channel-form textarea {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: #ffffff;
  font-size: 13px;
  outline: 0;
}

.new-channel-form textarea {
  min-height: 62px;
  padding: 8px 10px;
  resize: vertical;
}

.new-channel-form button {
  grid-column: 1 / -1;
  justify-self: stretch;
}

.channel-item {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
  position: relative;
}

.channel-item:hover,
.channel-item.active {
  background: #ffffff;
  box-shadow: inset 4px 0 0 var(--teal);
}

.topic-nav-item,
.room-topic-item {
  position: relative;
}

.topic-nav-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  transform: translateY(-2px);
}

.topic-nav-item:hover .topic-nav-actions,
.topic-nav-item:focus-within .topic-nav-actions,
.room-topic-item:hover .topic-nav-actions,
.room-topic-item:focus-within .topic-nav-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.topic-nav-actions button {
  border: 1px solid #cfd8e4;
  border-radius: 6px;
  background: #ffffff;
  color: var(--navy);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 6px 8px;
  box-shadow: 0 8px 18px rgba(15, 27, 45, 0.1);
}

.topic-nav-actions button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.channel-hash {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.channel-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.channel-item strong {
  color: var(--navy);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-item em,
.channel-item small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-pill {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  color: #0c625b;
  background: var(--teal-soft);
  font-size: 10px;
  font-weight: 900;
}

.channel-unread {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #b91c1c;
  font-size: 10px;
  font-weight: 900;
}

.thread-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #ffffff;
}

.thread-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.room-title-block {
  min-width: 0;
}

.room-channel-label {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.thread-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
}

.thread-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.thread-head > span,
.thread-head-actions > span {
  flex: 0 0 auto;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #0c625b;
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 800;
}

.thread-messages {
  display: block;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 14px 18px;
  background: #ffffff;
}

.thread-message:last-child {
  border-bottom: 0;
}

.thread-message.has-admin-actions {
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
}

.thread-message {
  position: relative;
  grid-template-columns: 36px minmax(0, 1fr);
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
}

.thread-message:hover {
  background: #f8fafc;
}

.thread-message.grouped {
  padding-top: 2px;
  padding-bottom: 2px;
}

.thread-message.grouped .avatar {
  background: transparent;
  border: 0;
}

.message-copy {
  min-width: 0;
}

.message-copy p {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.message-hover-actions {
  position: absolute;
  right: 10px;
  top: -10px;
  display: none;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.thread-message:hover .message-hover-actions {
  display: inline-flex;
}

.message-hover-actions button {
  min-height: 24px;
  border: 0;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--text);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.message-hover-actions button:hover {
  background: var(--panel-soft);
}

.timeline-date-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.timeline-date-divider::before,
.timeline-date-divider::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--line);
}

.thread-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ghost-action {
  color: var(--navy);
  background: #ffffff;
  border-color: var(--line);
}

.room-context-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-left: 1px solid var(--line);
  background: #f8fafc;
  overflow-y: auto;
}

.room-info-card,
.room-topic-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.room-info-card {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.room-info-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.room-info-card p,
.room-info-card span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.room-info-kicker {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.warning-card {
  border-color: #fecdd3;
  background: #fff7f7;
}

.warning-card strong {
  color: #991b1b;
  font-size: 12px;
}

.room-topic-list {
  overflow: hidden;
}

.room-topic-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.room-topic-list-head strong {
  color: var(--navy);
  font-size: 12px;
}

.room-topic-list-head span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.room-topic-actions {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.room-topic-actions > .small-action {
  width: 100%;
  justify-content: center;
}

.new-topic-form {
  display: grid;
  gap: 8px;
}

.thread-new-topic-form {
  margin: 12px 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #f8fafc;
}

.thread-new-topic-form > div:first-child {
  display: grid;
  gap: 3px;
}

.thread-new-topic-form strong {
  color: var(--navy);
  font-size: 13px;
}

.thread-new-topic-form span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.new-topic-form[hidden] {
  display: none;
}

.new-topic-form input,
.new-topic-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  font-size: 12px;
  outline: 0;
}

.new-topic-form input {
  min-height: 34px;
  padding: 0 10px;
}

.new-topic-form textarea {
  min-height: 82px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.35;
}

.new-topic-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.room-topic-item {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.room-topic-open {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 0 56px 0 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.room-topic-item:last-child {
  border-bottom: 0;
}

.room-topic-item:hover,
.room-topic-item.active {
  background: #f1f5f9;
  box-shadow: inset 4px 0 0 var(--teal);
}

.room-topic-item strong {
  color: var(--navy);
  font-size: 12px;
}

.room-topic-item span,
.room-topic-item em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}

.delete-button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #f2b8b5;
  border-radius: 7px;
  color: #9b1c15;
  background: #fff1f0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.delete-button:hover {
  color: #ffffff;
  background: #b42318;
  border-color: #b42318;
}

.message-delete-button {
  margin-top: 2px;
}

.empty-state {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.empty-state.dark {
  color: rgba(255, 255, 255, 0.72);
}

.stream-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  align-self: flex-end;
  justify-content: flex-start;
  gap: 2px;
  order: -1;
  margin: 0 4px -15px 0;
  padding: 0 0 0 2px;
  overflow-x: auto;
  max-width: 100%;
}

.stream-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line);
  border-radius: 9px 9px 0 0;
  color: #516074;
  background: #edf1f7;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 -1px 0 rgba(23, 35, 52, 0.05);
  white-space: nowrap;
}

.stream-tab.active {
  z-index: 2;
  color: var(--navy);
  background: #ffffff;
  border-color: var(--line);
  border-bottom-color: #ffffff;
  box-shadow: 0 -2px 8px rgba(23, 35, 52, 0.06);
}

.stream-tab.attention {
  background: #b3261e;
  border-color: #9d2019;
  color: #fff;
}

.stream-tab.attention.active {
  background: #b3261e;
  border-top-color: #b3261e;
  border-bottom-color: #b3261e;
  color: #fff;
}

.stream-tab.flash-red,
.flash-red-button {
  animation: ocPortalFlashRed 1.25s ease-in-out infinite;
}

@keyframes ocPortalFlashRed {
  0%,
  100% {
    background: #b3261e;
    border-color: #9d2019;
    color: #fff;
    box-shadow: 0 0 0 rgba(179, 38, 30, 0);
  }

  50% {
    background: #ef4444;
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.18);
  }
}

.stream-tab:not(.active):hover {
  color: var(--navy);
  background: #f6f8fb;
}

.stream-tab.flash-red:not(.active):hover {
  color: #fff;
  background: #ef4444;
}

.wiki-stream-cards {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #f7f9fc;
}

.wiki-stream-title {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wiki-stream-card {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  text-align: left;
}

.wiki-stream-card strong {
  color: var(--navy);
  font-size: 13px;
}

.wiki-stream-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.wiki-stream-card em {
  color: var(--teal);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.wiki-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 0;
}

.wiki-index {
  border-right: 1px solid var(--line);
  background: #f7f9fc;
  overflow-y: auto;
}

.wiki-index-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.wiki-index-item:hover,
.wiki-index-item.active {
  background: #ffffff;
  box-shadow: inset 4px 0 0 var(--teal);
}

.wiki-index-item strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.25;
}

.wiki-index-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.wiki-reader {
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  background: #ffffff;
}

.wiki-article {
  padding: 22px 28px 30px;
  color: #202122;
  font-family: Georgia, "Times New Roman", serif;
}

.wiki-article-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid #a2a9b1;
}

.wiki-kicker {
  color: #54595d;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wiki-article h3 {
  margin: 4px 0 8px;
  color: #202122;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
}

.wiki-article-header p {
  margin: 0;
  color: #3b4045;
  font-size: 15px;
  line-height: 1.55;
}

.wiki-infobox {
  display: grid;
  gap: 7px;
  border: 1px solid #a2a9b1;
  background: #f8f9fa;
  padding: 10px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
}

.wiki-infobox strong {
  color: #202122;
  text-align: center;
}

.wiki-edit-button {
  min-height: 30px;
  border: 1px solid #a2a9b1;
  border-radius: 4px;
  color: #0645ad;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.wiki-edit-button:hover {
  background: #eaf3ff;
}

.wiki-info-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 18, 32, 0.58);
}

.wiki-log-modal {
  width: min(680px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.wiki-log-modal header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.wiki-log-modal h3 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 18px;
}

.wiki-log-list {
  display: grid;
  align-content: start;
  overflow-y: auto;
}

.wiki-log-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.wiki-log-row strong {
  color: var(--text);
  font-size: 14px;
}

.wiki-log-row span,
.wiki-log-row time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wiki-log-row p {
  grid-column: 1 / -1;
  margin: 0;
  color: #3d4655;
  font-size: 13px;
  line-height: 1.45;
}

.wiki-editor {
  display: grid;
  gap: 14px;
  padding: 22px 28px 30px;
  background: #ffffff;
}

.wiki-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #a2a9b1;
}

.wiki-editor-head h3 {
  margin: 4px 0 0;
  color: #202122;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
}

.wiki-editor-actions {
  display: inline-flex;
  gap: 8px;
}

.secondary-action {
  color: var(--navy);
  background: #e9eef6;
}

.request-new-action {
  color: #ffffff;
  background: #b42318;
  box-shadow: 0 10px 22px rgba(180, 35, 24, 0.22);
}

.request-new-action:hover,
.request-new-action:focus-visible {
  background: #951b12;
}

.wiki-editor label {
  display: grid;
  gap: 6px;
  color: #202122;
  font-size: 13px;
  font-weight: 900;
}

.wiki-editor-body-field {
  display: grid;
  gap: 6px;
}

.wiki-editor-body-field > label {
  display: block;
}

.wiki-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8dee7;
  border-radius: 6px;
  background: #f8fafc;
  padding: 7px;
}

.wiki-toolbar-hint {
  flex-basis: 100%;
  color: #5f6d80;
  font-size: 11px;
  font-weight: 750;
}

.wiki-editor-toolbar button {
  min-height: 30px;
  border: 1px solid #cbd8ee;
  border-radius: 6px;
  background: #ffffff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
  padding: 0 10px;
}

.wiki-editor-toolbar button:hover,
.wiki-editor-toolbar button:focus {
  border-color: var(--teal);
  background: #eef7f6;
}

.wiki-editor input,
.wiki-editor textarea {
  width: 100%;
  border: 1px solid #a2a9b1;
  border-radius: 4px;
  color: #202122;
  background: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  padding: 8px 10px;
}

.wiki-editor textarea {
  min-height: 90px;
  resize: vertical;
}

.wiki-attachment-input {
  display: none;
}

.wiki-editor .wiki-edit-body {
  min-height: 240px;
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
}

.wiki-editor-note {
  margin: 0;
  color: #54595d;
  font-size: 12px;
  font-weight: 700;
}

.wiki-toc {
  width: min(100%, 320px);
  display: grid;
  gap: 5px;
  margin: 16px 0;
  border: 1px solid #a2a9b1;
  background: #f8f9fa;
  padding: 10px 12px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
}

.wiki-toc strong {
  color: #202122;
  font-size: 13px;
}

.wiki-toc a {
  color: #0645ad;
  text-decoration: none;
}

.wiki-toc a:hover {
  text-decoration: underline;
}

.wiki-section-block {
  padding-top: 10px;
}

.wiki-section-block h4,
.wiki-references h4 {
  margin: 0 0 8px;
  border-bottom: 1px solid #a2a9b1;
  color: #202122;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
}

.wiki-section-block p,
.wiki-section-block li,
.wiki-references li {
  color: #202122;
  font-size: 14px;
  line-height: 1.65;
}

.wiki-section-body {
  display: grid;
  gap: 10px;
}

.wiki-section-body p {
  margin: 0;
}

.wiki-image {
  width: min(100%, 720px);
  margin: 8px 0;
  border: 1px solid #d8dee7;
  background: #f8f9fa;
  padding: 8px;
}

.wiki-image img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #ffffff;
}

.wiki-image figcaption {
  margin-top: 6px;
  color: #54595d;
  font-size: 12px;
  font-weight: 750;
}

.wiki-section-block ul {
  margin: 6px 0 0 20px;
  padding: 0;
}

.wiki-references {
  margin-top: 18px;
}

.wiki-references ol {
  margin: 8px 0 0 20px;
  padding: 0;
}

.wiki-references a {
  color: #0645ad;
  text-decoration: none;
}

.wiki-references a:hover {
  text-decoration: underline;
}

.wiki-workspace {
  grid-template-columns: 310px minmax(0, 1fr);
  background: #ffffff;
}

.wiki-index {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  background: #eef2f6;
}

.wiki-index-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #d7dee8;
  background: #f8fafc;
}

.wiki-index-head h3 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.2;
}

.wiki-search-box {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid #d7dee8;
  background: #ffffff;
  color: #516070;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.wiki-search-box input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #c9d3df;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  padding: 7px 9px;
}

.wiki-category-filter {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid #d7dee8;
  background: #f8fafc;
}

.wiki-category-filter button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #314159;
  font-size: 12px;
  font-weight: 850;
  padding: 0 9px;
  text-align: left;
}

.wiki-category-filter button.active,
.wiki-category-filter button:hover {
  border-color: #c9d3df;
  background: #ffffff;
  color: var(--navy);
}

.wiki-category-filter strong {
  min-width: 24px;
  border-radius: 999px;
  background: #e3e9f1;
  color: #324359;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}

.wiki-index-list {
  min-height: 0;
  overflow-y: auto;
}

.wiki-index-item {
  position: relative;
  gap: 6px;
  padding: 0;
  background: #f8fafc;
}

.wiki-index-item + .wiki-index-item {
  border-top: 1px solid #dfe5ee;
}

.wiki-index-item.active {
  background: #ffffff;
  box-shadow: inset 5px 0 0 var(--teal);
}

.wiki-index-main {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  gap: 6px;
  padding: 14px 86px 14px 16px;
  text-align: left;
  cursor: pointer;
}

.wiki-index-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  gap: 5px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.wiki-index-item:hover .wiki-index-actions,
.wiki-index-item:focus-within .wiki-index-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.wiki-index-actions button {
  border: 1px solid #cfd8e4;
  border-radius: 6px;
  background: #ffffff;
  color: #1d3352;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 6px 8px;
  box-shadow: 0 8px 18px rgba(15, 27, 45, 0.1);
}

.wiki-index-actions button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.wiki-index-actions button.danger {
  border-color: rgba(190, 18, 60, 0.25);
  color: #b91c1c;
}

.wiki-index-actions button.danger:hover {
  background: #fff1f2;
  border-color: #b91c1c;
}

.wiki-pin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-right: 6px;
  border: 1px solid rgba(18, 112, 104, 0.22);
  border-radius: 999px;
  background: #e6fffb;
  color: var(--teal);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  padding: 3px 7px;
  text-transform: uppercase;
  vertical-align: 1px;
}

.wiki-index-item em {
  color: #647287;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
}

.wiki-index-empty {
  margin: 14px;
  border: 1px dashed #c9d3df;
  border-radius: 8px;
  background: #ffffff;
  color: #647287;
  font-size: 13px;
  font-weight: 750;
  padding: 14px;
}

.wiki-reader {
  background: #ffffff;
}

.wiki-article {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 34px 40px;
}

.wiki-article-header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  border-bottom: 1px solid #d5dbe3;
}

.wiki-page-actions {
  display: inline-flex;
  gap: 8px;
  align-self: start;
}

.wiki-edit-button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.wiki-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.wiki-article-tags span {
  border: 1px solid #d8dee7;
  border-radius: 999px;
  background: #f8fafc;
  color: #516070;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
}

.wiki-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}

.wiki-main-column {
  min-width: 0;
}

.wiki-infobox {
  position: sticky;
  top: 12px;
  border-color: #d5dbe3;
  border-radius: 8px;
  background: #f8fafc;
}

.wiki-infobox dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.wiki-infobox div {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid #dfe5ee;
}

.wiki-infobox dt {
  color: #526075;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.wiki-infobox dd {
  margin: 0;
  color: #202122;
  line-height: 1.4;
}

.wiki-side-note {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e5e2;
  border-radius: 7px;
  background: #eef7f6;
  color: #39514f;
  padding: 9px;
}

.wiki-toc.compact {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 7px 12px;
  margin: 0 0 18px;
  border-color: #d5dbe3;
  border-radius: 8px;
}

.wiki-toc.compact strong {
  grid-column: 1 / -1;
}

.wiki-section-block h4,
.wiki-references h4 {
  border-bottom-color: #d5dbe3;
}

.wiki-editor {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 30px 36px;
}

.wiki-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.wiki-editor-fields {
  display: grid;
  gap: 14px;
}

.wiki-editor-help {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  background: #f8fafc;
  color: #445266;
  font-size: 12px;
  line-height: 1.45;
  padding: 14px;
}

.wiki-editor-help > strong {
  color: var(--navy);
  font-size: 14px;
}

.wiki-help-sample {
  display: grid;
  gap: 5px;
  border-top: 1px solid #d8dee7;
  padding-top: 10px;
}

.wiki-help-sample code {
  display: block;
  border-radius: 5px;
  background: #e9eef6;
  color: #26384f;
  font-size: 11px;
  padding: 5px 6px;
  white-space: normal;
}

@media (max-width: 920px) {
  .wiki-workspace,
  .wiki-page-layout,
  .wiki-editor-layout {
    grid-template-columns: 1fr;
  }

  .wiki-index {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wiki-infobox,
  .wiki-editor-help {
    position: static;
  }
}

.directory-panel {
  min-height: 0;
  overflow-y: auto;
  background: #ffffff;
}

.directory-panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.directory-panel-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.directory-panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.directory-card {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 15px;
}

.directory-card strong {
  color: var(--navy);
  font-size: 15px;
}

.directory-card p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.directory-card span,
.directory-card a {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.directory-card a:hover {
  text-decoration: underline;
}

.links-panel {
  display: grid;
  align-content: start;
}

.embedded-links-panel {
  display: grid;
  gap: 12px;
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 14px;
}

.embedded-links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.embedded-links-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.embedded-links-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.embedded-links-panel iframe {
  width: 100%;
  height: min(72vh, 820px);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.links-local-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.links-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(420px, 100%);
}

.portal-links-list {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.portal-link-section {
  display: grid;
  gap: 10px;
}

.portal-link-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.portal-link-section-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.portal-link-section-head span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.portal-link-card {
  position: relative;
  min-height: 150px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 10px 24px rgba(23, 35, 52, 0.06);
  overflow: hidden;
}

.portal-link-card:hover,
.portal-link-card:focus-within {
  background: var(--card-bg-hover);
  border-color: var(--line-strong);
}

.portal-link-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.portal-link-main span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-link-main strong {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.25;
}

.portal-link-main p {
  margin: 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
}

.portal-link-open {
  width: max-content;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.portal-link-open:hover {
  text-decoration: underline;
}

.portal-link-admin-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.portal-link-card:hover .portal-link-admin-actions,
.portal-link-card:focus-within .portal-link-admin-actions {
  opacity: 1;
  transform: translateY(0);
}

.portal-link-admin-actions button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.96);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(23, 35, 52, 0.1);
}

.portal-link-admin-actions button:hover {
  color: #ffffff;
  background: var(--navy);
}

.portal-link-editor-card {
  width: min(720px, calc(100vw - 32px));
}

.start-page-panel {
  min-height: 0;
  overflow-y: auto;
  background: var(--bg);
}

.links-start-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  color: var(--text);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(23, 35, 52, 0.06);
}

.links-start-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
}

.links-start-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.links-start-header .agency-search {
  min-width: 230px;
  background: var(--panel-soft);
  border-color: var(--line);
}

.start-add-link {
  color: #ffffff;
  background: var(--teal);
  border: 1px solid rgba(15, 118, 110, 0.35);
}

.links-start-board {
  padding: 14px;
}

.links-start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 14px;
  align-items: start;
}

.links-start-sidebar {
  display: grid;
  gap: 14px;
}

.start-widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 35, 52, 0.06);
  overflow: hidden;
}

.start-widget-head {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.start-widget-head > div {
  display: grid;
  gap: 3px;
}

.start-widget-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.investigator-links-notice {
  margin: 0;
  color: #b42318;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.start-link-list {
  display: grid;
  padding: 7px;
}

.start-link-row,
.start-tile {
  position: relative;
}

.draggable-link {
  cursor: grab;
}

.draggable-link:active {
  cursor: grabbing;
}

.draggable-link.is-dragging {
  opacity: 0.48;
}

.portal-link-section.is-drop-target {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
  background: var(--teal-soft);
}

.start-link-row a,
.start-tile a {
  color: var(--text);
  text-decoration: none;
}

.start-link-row a {
  min-height: 27px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.start-link-row:hover a,
.start-link-row:focus-within a {
  background: var(--card-bg-hover);
  color: var(--navy);
}

.start-link-tooltip {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% + 7px);
  z-index: 12;
  width: max-content;
  max-width: min(360px, calc(100vw - 48px));
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 16px 32px rgba(23, 35, 52, 0.14);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.start-link-row:hover .start-link-tooltip,
.start-link-row:focus-within .start-link-tooltip,
.start-tile:hover .start-link-tooltip,
.start-tile:focus-within .start-link-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.start-link-row a span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-link-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: contain;
}

.start-link-initial {
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--navy-2);
  font-size: 10px;
  font-weight: 800;
}

.start-link-admin-actions {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(-50%) translateX(5px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.start-link-row:hover .start-link-admin-actions,
.start-link-row:focus-within .start-link-admin-actions,
.start-tile:hover .start-link-admin-actions,
.start-tile:focus-within .start-link-admin-actions {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.start-link-admin-actions button {
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--navy);
  background: var(--panel);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(23, 35, 52, 0.12);
}

.start-link-admin-actions button:hover {
  color: #ffffff;
  background: var(--navy);
}

.start-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.start-tile a {
  min-height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 8px 5px;
  border-radius: 7px;
  text-align: center;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.18;
}

.start-tile a:hover,
.start-tile:focus-within a {
  background: var(--card-bg-hover);
  color: var(--navy);
}

.start-tile .start-link-icon {
  width: 28px;
  height: 28px;
}

.start-tile .start-link-initial {
  font-size: 13px;
}

.start-weather-widget .weather-widget {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.start-weather-widget .weather-widget dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agency-directory-panel {
  min-height: 0;
  overflow-y: auto;
  background: #ffffff;
}

.agency-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
}

.agency-directory-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.agency-directory-summary > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.agency-directory-summary strong {
  color: var(--navy);
  font-size: 24px;
}

.agency-directory-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.agency-search {
  width: min(260px, 42%);
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
}

.agency-search svg {
  width: 15px;
  height: 15px;
  color: var(--quiet);
}

.agency-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.agency-section-list {
  display: grid;
}

.agency-section {
  border-bottom: 1px solid var(--line);
}

.agency-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 10px;
}

.agency-section-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.agency-section-head span {
  display: block;
  margin-top: 3px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agency-record-list {
  display: grid;
  gap: 10px;
  padding: 0 20px 18px;
}

.agency-record {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 14px;
}

.agency-patch-wrap {
  display: grid;
  place-items: center;
  width: 68px;
  min-width: 68px;
}

.agency-patch {
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 4px;
}

.agency-patch-placeholder {
  display: grid;
  place-items: center;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.agency-record h5 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 15px;
}

.agency-record p {
  margin: 10px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.agency-accreditation {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #25446b;
  background: #e9f1fb;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.agency-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.agency-details div {
  min-width: 0;
}

.agency-details dt {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agency-details dd {
  margin: 3px 0 0;
  color: #172033;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agency-details a {
  color: var(--teal);
  font-weight: 850;
  text-decoration: none;
}

.agency-details a:hover {
  text-decoration: underline;
}

.agency-record-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.member-contact-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.member-contact-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 280px) auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.member-contact-search {
  width: 100%;
}

.member-contact-agency-filter {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.member-contact-agency-filter select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  padding: 0 10px;
}

.member-contact-toolbar strong {
  color: var(--navy);
  font-size: 22px;
}

.member-contact-toolbar > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.member-contact-groups {
  display: grid;
  gap: 14px;
  padding: 18px 20px 24px;
}

.member-contact-group {
  display: grid;
  gap: 10px;
}

.member-contact-group > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.member-contact-group h4 {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
}

.member-contact-group header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.member-contact-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.member-contact-avatar {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.member-contact-main {
  min-width: 0;
}

.member-contact-main h5 {
  margin: 0 0 2px;
  color: var(--navy);
  font-size: 15px;
}

.member-contact-main > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 8px;
}

.member-contact-main dl {
  margin: 0;
  display: grid;
  gap: 5px;
}

.member-contact-main dl div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
}

.member-contact-main dt {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.member-contact-main dd {
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.member-contact-main a {
  color: var(--teal);
  text-decoration: none;
}

.member-contact-main a:hover {
  text-decoration: underline;
}

.member-contact-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.agency-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 15, 30, 0.48);
}

.agency-editor-card {
  width: min(760px, 100%);
  max-height: min(760px, 92vh);
  overflow-y: auto;
  display: grid;
  gap: 14px;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(8, 15, 30, 0.28);
}

.agency-editor-card header,
.agency-editor-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agency-editor-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.agency-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agency-editor-card label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.agency-editor-card input,
.agency-editor-card select,
.agency-editor-card textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px 10px;
  color: #172033;
  font: inherit;
  font-size: 13px;
  background: #ffffff;
}

.agency-editor-card textarea {
  min-height: 92px;
  resize: vertical;
}

.agency-editor-wide {
  grid-column: 1 / -1;
}

.agency-editor {
  width: min(760px, 100%);
  max-height: min(760px, 92vh);
  overflow-y: auto;
  display: grid;
  gap: 12px;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(8, 15, 30, 0.28);
}

.agency-editor header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agency-editor h3 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.agency-editor label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.agency-editor input,
.agency-editor select,
.agency-editor textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px 10px;
  color: #172033;
  font: inherit;
  font-size: 13px;
}

.agency-editor textarea {
  resize: vertical;
}

.agency-patch-editor {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.agency-patch-preview-wrap {
  display: grid;
  place-items: center;
  width: 92px;
  min-width: 92px;
}

.agency-patch-preview {
  width: 78px;
  height: 78px;
  max-width: 78px;
  max-height: 78px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 5px;
}

.agency-patch-preview-placeholder {
  display: grid;
  place-items: center;
  color: var(--quiet);
  font-size: 13px;
  font-weight: 900;
}

.agency-patch-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.agency-patch-fields span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.agency-editor-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agency-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.global-search-panel {
  background: #ffffff;
  min-height: 0;
  overflow: auto;
}

.global-search-head {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 18px;
}

.global-search-head h3 {
  color: var(--navy);
  font-size: 22px;
  margin: 0 0 4px;
}

.global-search-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.global-search-filters {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  padding: 14px 18px;
}

.global-search-filters label {
  display: grid;
  gap: 5px;
}

.global-search-filters span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.global-search-filters select {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  min-height: 38px;
  padding: 7px 9px;
}

.global-search-list {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.global-search-row {
  align-items: flex-start;
  background: #f5f7fa;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.global-search-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.global-search-source {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.global-search-row strong {
  color: var(--ink);
  font-size: 16px;
}

.global-search-row p {
  color: #536174;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.global-search-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.global-search-meta span {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
}

.global-search-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-panel,
.forms-panel {
  min-height: 0;
  overflow-y: auto;
  background: #ffffff;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(420px, 1.25fr);
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.dashboard-hero h3 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
}

.dashboard-hero p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-weather .weather-widget {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-weather .weather-widget {
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
}

.dashboard-weather .weather-topline {
  align-items: center;
}

.dashboard-weather .weather-widget p {
  font-size: 12px;
}

.dashboard-weather .weather-stats {
  grid-template-columns: repeat(4, minmax(62px, 1fr));
}

.dashboard-weather .weather-widget dl div {
  padding: 7px;
}

.dashboard-weather .weather-widget em {
  align-self: end;
  text-align: right;
}

.dashboard-glance {
  display: grid;
  gap: 12px;
  padding: 16px 18px 0;
}

.dashboard-glance header {
  display: grid;
  gap: 3px;
}

.dashboard-glance h4 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.dashboard-glance p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-discovery-notice {
  display: block;
  margin-top: 4px;
  color: var(--red);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.35;
}

.dashboard-status-grid {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
}

.dashboard-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 14px;
  text-align: left;
}

.dashboard-nav-card:hover {
  border-color: var(--teal);
  background: var(--card-bg-hover);
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.12);
}

.dashboard-nav-card:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

.dashboard-card span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-card strong {
  color: var(--navy);
  font-size: 28px;
}

.dashboard-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.dashboard-section {
  display: grid;
  padding: 0 18px 18px;
}

.dashboard-section h4 {
  margin: 8px 0 10px;
  color: var(--navy);
  font-size: 15px;
}

.dashboard-section-note {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-news-section {
  gap: 0;
}

.brief-news-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 28, 48, .06);
}

.brief-news-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.brief-news-head h4 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 17px;
}

.brief-news-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.brief-news-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.brief-news-filters span {
  padding: 5px 8px;
  border: 1px solid #dce5ef;
  border-radius: 999px;
  color: var(--navy);
  background: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.brief-news-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fffafa;
}

.brief-news-feature > span {
  padding: 5px 8px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--red);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.brief-news-feature strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-news-feature em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.brief-news-feature a,
.brief-news-open {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.brief-news-feature a:hover,
.brief-news-open:hover {
  text-decoration: underline;
}

.brief-news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brief-news-column {
  min-width: 0;
}

.brief-news-column + .brief-news-column {
  border-left: 1px solid var(--line);
}

.brief-news-column-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.brief-news-column-head h5 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.2;
}

.brief-news-column-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.brief-news-column-head > span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.brief-news-list {
  display: grid;
  max-height: 430px;
  overflow-y: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.brief-news-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 28px auto;
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f3f5f8;
}

.brief-news-row:last-child {
  border-bottom: 0;
}

.brief-news-row:hover {
  background: #eef3f9;
}

.brief-news-tag {
  align-self: flex-start;
  min-width: 52px;
  padding: 5px 7px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--navy);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.brief-news-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.brief-news-title {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-news-title:hover {
  color: var(--navy);
  text-decoration: underline;
}

.brief-news-main p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.brief-news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.brief-news-meta em,
.brief-news-meta span {
  color: var(--quiet);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.brief-news-info {
  position: relative;
  width: 24px;
  height: 24px;
  border: 1px solid #cbd8ee;
  border-radius: 50%;
  color: var(--navy);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
  cursor: help;
}

.brief-news-hover {
  position: absolute;
  right: 0;
  top: 30px;
  z-index: 8;
  display: none;
  width: min(340px, 72vw);
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(23, 35, 52, 0.16);
  text-align: left;
}

.brief-news-hover strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.25;
}

.brief-news-hover small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.brief-news-info:hover .brief-news-hover,
.brief-news-info:focus .brief-news-hover {
  display: block;
}

.dashboard-alerts-section {
  padding-top: 16px;
}

.dashboard-alerts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-alerts-list .news-row {
  margin: 0;
  border-left: 4px solid var(--red);
}

.dashboard-news-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-news-column {
  min-width: 0;
}

.dashboard-news-column h4 {
  margin: 8px 0 10px;
  color: var(--navy);
  font-size: 15px;
}

.dashboard-news-list {
  display: grid;
  grid-template-columns: 1fr;
  overflow: visible;
  gap: 10px;
  max-height: 690px;
  overflow-y: auto;
  padding-right: 6px;
  border: 0;
  border-radius: 0;
  scrollbar-color: var(--line-strong) transparent;
}

.dashboard-news-list .news-row {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
}

.hesk-dashboard-section {
  padding-top: 0;
}

.hesk-dashboard-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hesk-dashboard-card.warning {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: #fff7ed;
  border-color: #fed7aa;
}

.hesk-dashboard-card.warning p {
  margin: 0;
  color: #7c2d12;
  font-size: 13px;
}

.request-command-panel {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(15, 28, 48, .08);
}

.request-command-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.request-command-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.request-command-mark {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  font-size: 13px;
  font-weight: 900;
}

.request-command-title h4 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.1;
}

.request-command-title p {
  margin-top: 5px;
}

.request-command-actions {
  justify-content: flex-end;
}

.request-status-strip {
  border-width: 0 0 1px;
  border-radius: 0;
}

.request-status-strip div {
  padding: 12px 14px;
}

.request-status-strip > div {
  grid-template-columns: minmax(72px, .8fr) minmax(96px, 1.2fr);
  align-items: center;
  gap: 10px;
}

.request-status-strip div.is-hot strong {
  color: #b83232;
}

.request-status-strip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.request-status-primary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.request-status-primary button,
.request-type-breakdown button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.request-status-primary button {
  display: grid;
  gap: 2px;
  padding: 0;
  color: inherit;
  background: transparent;
}

.request-status-primary button:hover strong,
.request-status-primary button:focus-visible strong {
  text-decoration: underline;
}

.request-type-breakdown {
  display: grid !important;
  gap: 4px !important;
  min-width: 0;
  max-height: 82px;
  overflow-y: auto;
  padding: 0 2px 0 0 !important;
  border-right: 0 !important;
}

.request-type-breakdown button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid #dce5ef;
  border-radius: 6px;
  background: #f3f5f8;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.request-type-breakdown button:hover,
.request-type-breakdown button:focus-visible {
  border-color: #b9c7db;
  background: #eef3f9;
}

.request-type-breakdown em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-type-breakdown strong {
  color: var(--navy);
  font-size: 12px;
  line-height: 1;
}

.request-type-empty {
  padding: 6px 0 !important;
  border-right: 0 !important;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.request-command-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-command-body.single-lane {
  grid-template-columns: 1fr;
}

.request-command-lane {
  min-width: 0;
  padding: 16px 18px 18px;
}

.request-command-lane + .request-command-lane {
  border-left: 1px solid var(--line);
  background: #fbfcfe;
}

.request-command-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.request-command-lane-head h5 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.2;
}

.request-command-lane-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.request-command-lane-head > span {
  border: 1px solid #c7e2da;
  border-radius: 999px;
  color: var(--teal);
  background: #e7f2ef;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.request-command-lane-head > span.blue {
  color: var(--navy);
  background: #e9eff9;
  border-color: #cbd8ee;
}

.request-command-list {
  display: grid;
  gap: 9px;
  max-height: 258px;
  overflow-y: auto;
  padding-right: 4px;
}

.request-command-row,
.request-command-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  color: var(--text);
  background: #f3f5f8;
  text-decoration: none;
}

.request-command-row:hover {
  border-color: #b9c7db;
  background: #eef3f9;
}

.request-command-id {
  min-width: 52px;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 7px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--navy);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.request-command-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.request-command-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-command-main small,
.request-command-time {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-shortcut-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
}

.request-shortcut-meta span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  color: #33445d;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-shortcut-meta b {
  color: #6f7d91;
  font-weight: 900;
}

.request-command-time {
  justify-self: end;
}

.request-command-empty {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.request-command-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.request-command-foot a,
.request-command-foot button {
  border: 0;
  padding: 0;
  color: var(--navy);
  background: transparent;
  font-weight: 900;
  text-decoration: none;
}

.request-command-foot a:hover,
.request-command-foot button:hover {
  text-decoration: underline;
}

.request-chart-action {
  background: #eef8f6;
  color: var(--teal);
  border: 1px solid rgba(15, 118, 110, 0.24);
}

.request-chart-action:hover {
  background: #dff3ef;
}

.confirm-officer-action {
  background: #b3261e;
  border: 1px solid #9d2019;
  color: #fff;
}

.confirm-officer-action span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.officer-confirm-backdrop {
  z-index: 999999;
}

.officer-confirm-modal {
  width: min(1180px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(8, 16, 31, 0.28);
}

.officer-confirm-modal header,
.officer-confirm-modal footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.officer-confirm-modal header {
  border-bottom: 1px solid var(--line);
}

.officer-confirm-modal footer {
  align-items: center;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.officer-confirm-modal h3 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.15;
}

.officer-confirm-modal p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.officer-confirm-frame-wrap {
  min-height: 0;
  background: #eef3f8;
}

.officer-confirm-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.request-charts-backdrop {
  z-index: 999999;
}

.request-charts-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(8, 16, 31, 0.28);
}

.request-charts-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.request-charts-modal h3 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.15;
}

.request-charts-modal p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.request-chart-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.request-chart-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #edf2f8;
  color: #5b687a;
  font-size: 13px;
  font-weight: 850;
}

.request-chart-tabs button.active {
  position: relative;
  top: 1px;
  background: #fff;
  color: var(--navy);
}

.request-chart-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 20px;
}

.request-chart-list {
  display: grid;
  gap: 10px;
}

.request-chart-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.request-chart-rank {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.request-chart-label {
  min-width: 0;
}

.request-chart-label strong {
  display: inline-block;
  max-width: 100%;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-chart-label span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-chart-bar-track {
  height: 12px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf4;
}

.request-chart-bar-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #1f3d6d);
}

.request-chart-value {
  justify-self: end;
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
}

.request-charts-modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.hesk-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hesk-dashboard-actions,
.hesk-requests-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hesk-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.hesk-status-strip div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.hesk-status-strip div:last-child {
  border-right: 0;
}

.hesk-status-strip strong {
  color: var(--navy);
  font-size: 24px;
  line-height: 1;
}

.hesk-status-strip span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.hesk-recent-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.hesk-request-row,
.hesk-request-empty {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  text-decoration: none;
}

.hesk-request-row:hover {
  border-color: var(--teal);
}

.hesk-request-row strong {
  font-size: 12px;
  line-height: 1.25;
}

.hesk-request-row span,
.hesk-request-empty {
  color: var(--muted);
  font-size: 11px;
}

.hesk-requests-panel {
  display: grid;
  grid-template-rows: auto auto minmax(620px, 1fr);
  min-height: 0;
  min-height: calc(100vh - 210px);
  height: auto;
  background: #fff;
  overflow: hidden;
}

.hesk-requests-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.hesk-requests-head h3 {
  margin: 0 0 4px;
  color: var(--navy);
}

.hesk-requests-head p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.customer-request-browser {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.customer-request-browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.customer-request-browser-head > div:first-child {
  display: grid;
  gap: 3px;
}

.customer-request-browser-head strong {
  color: var(--navy);
  font-size: 16px;
}

.customer-request-browser-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.request-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #ffffff;
}

.request-view-toggle span {
  padding: 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.request-view-toggle button {
  min-height: 32px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--navy);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.request-view-toggle button.active {
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 6px 14px rgba(45, 126, 118, .18);
}

.customer-request-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 256px;
  overflow-y: auto;
  padding-right: 4px;
}

.customer-request-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
}

.customer-request-row:hover {
  border-color: #b9c7db;
  background: #eef3f9;
}

.hesk-requests-frame {
  display: block;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 720px;
  border: 0;
  background: #fff;
}

.snipe-it-panel {
  display: grid;
  grid-template-rows: auto minmax(680px, 1fr);
  min-height: 760px;
  height: auto;
  background: #ffffff;
  overflow: hidden;
}

.snipe-it-frame {
  display: block;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 680px;
  border: 0;
  background: #ffffff;
}

.portal-embed-panel {
  display: grid;
  grid-template-rows: auto minmax(680px, 1fr);
  min-height: 760px;
  height: auto;
  background: #ffffff;
  overflow: hidden;
}

.portal-embed-frame {
  display: block;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 680px;
  border: 0;
  background: #ffffff;
}

.dfu-requests-panel {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  background: #f4f7fb;
  overflow: auto;
}

.dfu-hero,
.dfu-request-card,
.dfu-guidance-card,
.dfu-news-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 28, 48, 0.07);
}

.dfu-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #eef4f9 100%);
}

.dfu-hero h3,
.dfu-request-card h4,
.dfu-guidance-card h4,
.dfu-news-card h4 {
  margin: 0;
  color: var(--navy);
}

.dfu-hero h3 {
  font-size: 24px;
}

.dfu-hero p,
.dfu-request-card p,
.dfu-news-card p,
.dfu-tip p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dfu-open-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 8px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 850;
}

.dfu-request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
}

.dfu-request-card span,
.dfu-guidance-card header span,
.dfu-news-card header span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dfu-request-card h4 {
  font-size: 18px;
}

.dfu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 14px;
  align-items: start;
}

.dfu-guidance-card,
.dfu-news-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.dfu-guidance-card h4,
.dfu-news-card h4 {
  margin-top: 3px;
  font-size: 20px;
}

.dfu-tip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dfu-tip {
  min-height: 104px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.dfu-tip strong {
  color: var(--navy);
  font-size: 13px;
}

.dfu-guidance-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.dfu-guidance-card footer a {
  border: 1px solid #cbd8ee;
  border-radius: 999px;
  background: #eef4f9;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.dfu-news-list {
  max-height: 654px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dfu-news-list .brief-news-row {
  min-height: 104px;
}

.dfu-news-list::-webkit-scrollbar,
.feedback-log-list::-webkit-scrollbar {
  width: 8px;
}

.dfu-news-list::-webkit-scrollbar-thumb,
.feedback-log-list::-webkit-scrollbar-thumb {
  background: #b8c6d9;
  border-radius: 999px;
}

.staff-only-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 360px;
  padding: 30px;
  background: #ffffff;
  text-align: center;
}

.staff-only-panel h3 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
}

.staff-only-panel p {
  margin: 0;
  max-width: 480px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.dashboard-news-list::-webkit-scrollbar {
  width: 8px;
}

.dashboard-news-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
}

.dashboard-row {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  text-align: left;
}

.dashboard-row:hover {
  background: var(--card-bg-hover);
}

.dashboard-row strong {
  color: var(--navy);
  font-size: 13px;
}

.dashboard-row span {
  color: var(--muted);
  font-size: 12px;
}

.forms-storage-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.forms-storage-head h3 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: 22px;
}

.forms-storage-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-kicker {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.forms-storage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.forms-storage-stats div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.forms-storage-stats div:last-child {
  border-right: 0;
}

.forms-storage-stats strong {
  color: var(--navy);
  font-size: 18px;
}

.forms-storage-stats span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.forms-upload-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(180px, 240px) auto;
  gap: 14px;
  align-items: center;
  margin: 18px;
  padding: 15px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f1f5f9;
}

.forms-upload-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
}

.forms-upload-icon svg {
  width: 20px;
  height: 20px;
}

.forms-upload-copy {
  display: grid;
  gap: 3px;
}

.forms-upload-copy strong {
  color: var(--navy);
  font-size: 15px;
}

.forms-upload-copy span,
.forms-upload-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.forms-upload-button {
  cursor: pointer;
}

.forms-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.forms-section-select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--navy);
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.forms-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 0 18px 10px;
}

.forms-toolbar strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}

.forms-toolbar span {
  display: block;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.forms-list {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
}

.forms-file-section {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.forms-file-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 2px 2px 8px;
  border-bottom: 1px solid var(--line);
}

.forms-file-section-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.forms-file-section-head span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.forms-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.form-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 12px;
}

.forms-empty-section {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
}

.form-file-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e2e8f0;
  color: var(--navy);
  font-size: 11px;
  font-weight: 950;
}

.form-template-row .form-file-badge {
  background: #dcfce7;
  color: #166534;
}

.form-row-main {
  min-width: 0;
}

.form-row strong {
  color: var(--navy);
  font-size: 14px;
}

.form-row p {
  margin: 4px 0;
  color: #334155;
  font-size: 13px;
}

.form-row span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
}

.form-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: end;
}

.form-delete-button {
  position: static;
  width: 32px;
  height: 32px;
}

.form-version-input {
  display: none;
}

.missing-guide-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.missing-guide-list summary {
  cursor: pointer;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.missing-guide-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.missing-guide-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: #475569;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
}

.thread-composer {
  border-top: 1px solid var(--line);
}

.thread-composer.is-file-drop-target {
  background: #edf7f6;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.35);
}

.thread-composer.is-file-drop-target textarea {
  border-color: var(--teal);
  background: #ffffff;
}

.composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.composer-toolbar button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  color: var(--navy);
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.composer-toolbar button:hover {
  border-color: #bfd0e0;
  background: #f8fafc;
}

.intel-attachment-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  display: inline-flex;
  gap: 10px;
  margin-top: 6px;
  max-width: min(100%, 460px);
  padding: 9px 11px;
  text-decoration: none;
}

.intel-attachment-card:hover {
  background: #eef5f7;
  border-color: #b9cbd6;
  text-decoration: none;
}

.intel-attachment-icon {
  align-items: center;
  background: #e7f0f4;
  border-radius: 7px;
  color: var(--teal);
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.intel-attachment-icon svg {
  height: 17px;
  width: 17px;
}

.intel-attachment-card strong,
.intel-attachment-card em {
  display: block;
}

.intel-attachment-card strong {
  font-size: 13px;
  line-height: 1.25;
}

.intel-attachment-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  margin-top: 2px;
}

.composer-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.discovery-warning {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-left: 4px solid #b91c1c;
  border-radius: 8px;
  color: #7f1d1d;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.discovery-warning strong {
  color: #991b1b;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.discovery-warning span {
  font-size: 13px;
  line-height: 1.35;
}

.discovery-ack {
  align-items: flex-start;
  color: var(--ink);
  display: flex;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.discovery-ack input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.compact-ack {
  color: var(--muted);
  font-size: 11px;
  padding: 0 2px;
}

.section-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.section-head > div:first-child {
  min-width: 0;
}

.section-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
  letter-spacing: 0;
}

.section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.section-head.admin-active {
  align-items: flex-end;
  min-height: 0;
  padding-bottom: 0;
}

.section-head.admin-active > div:not(.stream-tabs) {
  display: none;
}

.tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.tab {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.tab.active {
  color: var(--navy);
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(23, 35, 52, 0.1);
}

.feed {
  display: grid;
}

.center-feed {
  min-height: 340px;
}

.center-list {
  display: grid;
}

.center-row {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 10px 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.center-row:last-child {
  margin-bottom: 10px;
}

.center-row > span {
  width: fit-content;
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #25446b;
  background: #e9f4ff;
  font-size: 11px;
  font-weight: 800;
}

.center-row strong {
  color: var(--text);
  font-size: 14px;
}

.news-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.center-row .news-title {
  font-size: 14px;
}

.news-title:hover {
  color: var(--teal);
  text-decoration: underline;
}

.center-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.center-row em {
  color: var(--quiet);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.post {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  margin: 10px 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.post:last-child {
  margin-bottom: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--navy-2);
  font-weight: 800;
  font-size: 13px;
}

.post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.post-head strong {
  color: var(--text);
  font-size: 14px;
}

.post-head span {
  color: var(--quiet);
  font-size: 12px;
}

.post p {
  margin: 6px 0 0;
  color: #243247;
  font-size: 14px;
  line-height: 1.5;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--navy-2);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 700;
}

.tag.priority {
  border-color: #fed7aa;
  color: #8a4b0f;
  background: var(--amber-soft);
}

.tag.secure {
  border-color: #c7ebe6;
  color: #0c625b;
  background: var(--teal-soft);
}

.alert-card {
  margin: 14px 16px;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-soft);
}

.alert-card h3 {
  margin: 0;
  color: #744210;
  font-size: 14px;
}

.alert-card p {
  margin: 6px 0 0;
  color: #573b16;
  font-size: 13px;
  line-height: 1.45;
}

.composer {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.composer textarea {
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  outline: 0;
  color: var(--text);
  background: var(--panel);
  font-size: 13px;
  line-height: 1.45;
}

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: white;
  font-size: 13px;
}

.small-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 8px;
  color: white;
  background: var(--navy);
  font-size: 13px;
  font-weight: 750;
}

.small-action svg {
  width: 16px;
  height: 16px;
}

.knowledge {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(23, 35, 52, 0.06);
  overflow: hidden;
}

.section-pulse {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 3px;
  transition: outline-color 0.25s ease;
}

.wiki-list,
.topic-list,
.resource-list {
  display: grid;
}

.wiki-row,
.topic-row,
.resource-row {
  display: grid;
  gap: 4px;
  margin: 10px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.wiki-row:first-child,
.topic-row:first-child,
.resource-row:first-child {
  margin-top: 10px;
}

.wiki-row strong,
.topic-row strong,
.resource-row strong {
  color: var(--text);
  font-size: 13px;
}

.wiki-row span,
.topic-row span,
.resource-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.wiki-row em {
  margin-top: 3px;
}

.aside {
  display: grid;
  align-content: start;
  gap: 16px;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.metric {
  padding: 13px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric:nth-child(even) {
  border-right: 0;
}

.metric strong {
  display: block;
  color: var(--navy);
  font-size: 20px;
}

.metric span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.weather-widget {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 255, 255, 0.88), transparent 26%),
    linear-gradient(135deg, rgba(55, 120, 190, 0.22), rgba(15, 118, 110, 0.2) 48%, rgba(247, 184, 75, 0.22)),
    #ffffff;
}

.weather-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.weather-topline > div:first-child {
  display: grid;
  gap: 4px;
}

.weather-widget span {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.weather-widget strong {
  color: var(--navy);
  font-size: 34px;
  line-height: 1;
}

.weather-badge {
  max-width: 140px;
  padding: 6px 9px;
  border: 1px solid rgba(23, 49, 83, 0.12);
  border-radius: 999px;
  color: #12304f;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.weather-widget p {
  margin: 0;
  color: #243247;
  font-size: 13px;
  font-weight: 800;
}

.weather-widget dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.weather-widget dl div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(23, 49, 83, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 18px rgba(23, 35, 52, 0.06);
}

.weather-widget dt {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
}

.weather-widget dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.weather-widget em {
  color: var(--quiet);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.incident {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.dot.amber {
  background: var(--amber);
}

.dot.red {
  background: var(--red);
}

.incident strong {
  display: block;
  font-size: 13px;
}

.incident span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.news-list {
  display: grid;
}

.news-row {
  position: relative;
  display: grid;
  gap: 5px;
  margin: 10px 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.news-row:first-child {
  margin-top: 10px;
}

.news-row:hover,
.center-row:hover,
.directory-card:hover,
.agency-record:hover,
.form-row:hover,
.wiki-stream-card:hover,
.resource-row:hover {
  background: var(--card-bg-hover);
}

.news-row strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.news-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.news-meta em {
  color: var(--quiet);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.news-meta a {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.news-meta a:hover {
  text-decoration: underline;
}

.news-hover {
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(100% - 4px);
  z-index: 6;
  display: none;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(23, 35, 52, 0.16);
}

.news-hover strong {
  color: var(--navy);
  font-size: 13px;
}

.news-hover span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.news-row:hover .news-hover,
.center-row:hover .news-hover,
.news-row:focus-within .news-hover,
.center-row:focus-within .news-hover {
  display: grid;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.mobile-menu {
  display: none;
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sidebar {
    padding: 14px 9px;
  }

  .brand {
    justify-content: center;
    padding: 4px 0 12px;
  }

  .brand div,
  .nav-title,
  .nav-item span:not(.count),
  .sidebar-foot {
    display: none;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .count {
    position: absolute;
    transform: translate(14px, -11px);
  }

  .content {
    grid-template-columns: 1fr;
  }

  .aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discussion-board {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .room-context-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  .portal-mfa-setup {
    grid-template-columns: 1fr;
  }

  .portal-mfa-qr img {
    width: 170px;
    height: 170px;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    max-height: none;
    width: 100%;
    max-width: 100vw;
    padding: 12px;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: visible;
    background-position: center top;
  }

  .sidebar::before {
    background: linear-gradient(180deg, rgba(6, 12, 24, 0.72), rgba(6, 12, 24, 0.88));
  }

  .brand {
    justify-content: flex-start;
    padding: 9px 10px;
  }

  .brand div,
  .nav-title,
  .nav-item span:not(.count) {
    display: block;
  }

  .brand span {
    display: none;
  }

  .mark {
    width: 42px;
    height: 42px;
  }

  .nav-section {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .nav-section::-webkit-scrollbar {
    display: none;
  }

  .nav-title {
    flex: 0 0 auto;
    align-self: center;
    padding: 0 2px;
    white-space: nowrap;
  }

  .nav-item {
    flex: 0 0 220px;
    max-width: 220px;
    min-height: 48px;
    grid-template-columns: 24px minmax(0, 1fr);
    scroll-snap-align: start;
  }

  .topic-nav-item strong,
  .topic-nav-item em,
  .wiki-nav-item strong,
  .wiki-nav-item em {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .count {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
    position: static;
  }

  .mobile-menu {
    display: none;
  }

  .page-title h1 {
    font-size: 18px;
  }

  .page-title p {
    display: none;
  }

  .search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .primary-action {
    display: none;
  }

  .mobile-install-action {
    display: inline-flex;
    justify-self: end;
  }

  .content {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }

  .workspace {
    min-height: auto;
  }

  .briefing {
    min-height: 72vh;
    border-radius: 8px;
  }

  .section-head,
  .composer-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-head {
    padding: 12px;
  }

  .stream-tabs {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    margin: 0 0 -12px;
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .section-head {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .stream-tab {
    min-height: 36px;
    padding: 0 12px;
    font-size: 11px;
  }

  .discussion-board {
    grid-template-columns: 1fr;
  }

  .channel-nav {
    max-height: 240px;
    overflow-y: auto;
  }

  .wiki-workspace,
  .wiki-article-header,
  .directory-grid,
  .agency-record,
  .agency-details,
  .agency-editor-row,
  .member-contact-toolbar,
  .member-contact-grid,
  .dashboard-hero,
  .dashboard-weather .weather-widget,
  .dashboard-news-columns,
  .brief-news-grid,
  .dashboard-alerts-list,
  .dashboard-grid,
  .dfu-grid,
  .dfu-request-card,
  .dfu-tip-list,
  .forms-storage-head,
  .forms-upload-card,
  .hesk-dashboard-card.warning,
  .hesk-status-strip,
  .hesk-recent-list,
  .upload-zone,
  .form-row,
  .wiki-log-row {
    grid-template-columns: 1fr;
  }

  .global-search-head,
  .global-search-row,
  .global-search-actions {
    align-items: flex-start;
  }

  .global-search-head {
    flex-direction: column;
  }

  .global-search-head,
  .global-search-row {
    grid-template-columns: 1fr;
  }

  .global-search-filters {
    grid-template-columns: 1fr;
  }

  .global-search-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .member-contact-head-actions {
    justify-content: flex-start;
  }

  .forms-storage-stats {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .forms-storage-stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .forms-storage-stats div:last-child {
    border-bottom: 0;
  }

  .brief-news-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .brief-news-filters {
    justify-content: flex-start;
  }

  .brief-news-feature {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .brief-news-feature strong {
    white-space: normal;
  }

  .brief-news-column + .brief-news-column {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .brief-news-list {
    max-height: 392px;
  }

  .request-charts-backdrop {
    padding: 10px;
  }

  .request-charts-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .officer-confirm-backdrop {
    padding: 10px;
  }

  .officer-confirm-modal {
    width: 100%;
    height: calc(100vh - 20px);
  }

  .officer-confirm-modal header,
  .officer-confirm-modal footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .request-charts-modal header,
  .request-charts-modal footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .request-chart-tabs {
    overflow-x: auto;
  }

  .request-chart-row {
    grid-template-columns: 34px minmax(0, 1fr) 52px;
    gap: 8px;
    padding: 9px;
  }

  .request-chart-rank {
    width: 28px;
    height: 28px;
  }

  .request-chart-value {
    font-size: 18px;
  }

  .brief-news-row {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .brief-news-tag {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  .brief-news-open {
    grid-column: 1;
    justify-self: flex-start;
  }

  .agency-directory-head,
  .agency-directory-summary,
  .dfu-hero,
  .embedded-links-head,
  .links-local-head,
  .hesk-dashboard-head,
  .hesk-requests-head,
  .agency-record-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hesk-dashboard-actions,
  .hesk-requests-actions {
    width: 100%;
  }

  .hesk-dashboard-actions .small-action,
  .hesk-requests-actions .small-action {
    flex: 1 1 140px;
    justify-content: center;
  }

  .dfu-requests-panel {
    padding: 12px;
  }

  .dfu-open-action,
  .dfu-request-card .small-action {
    width: 100%;
  }

  .request-command-head,
  .request-command-body {
    grid-template-columns: 1fr;
  }

  .request-command-title {
    align-items: flex-start;
  }

  .request-command-title h4 {
    font-size: 20px;
  }

  .request-command-actions {
    width: 100%;
    justify-content: stretch;
  }

  .request-command-actions .small-action {
    flex: 1 1 130px;
    justify-content: center;
  }

  .request-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-status-strip div {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .request-status-strip div:nth-child(even),
  .request-status-strip div:last-child {
    border-right: 0;
  }

  .request-command-lane + .request-command-lane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .request-command-lane-head {
    align-items: flex-start;
  }

  .request-command-row,
  .customer-request-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .customer-request-browser-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .request-view-toggle {
    width: 100%;
    flex-wrap: wrap;
  }

  .customer-request-list {
    grid-template-columns: 1fr;
    max-height: 320px;
  }

  .request-command-time {
    grid-column: 2;
    justify-self: start;
  }

  .hesk-status-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hesk-status-strip div:last-child {
    border-bottom: 0;
  }

  .hesk-requests-panel {
    grid-template-rows: auto auto minmax(72vh, 1fr);
    min-height: 82vh;
  }

  .portal-embed-panel {
    grid-template-rows: auto minmax(560px, 1fr);
    min-height: 70vh;
  }

  .hesk-requests-frame,
  .portal-embed-frame {
    min-height: 72vh;
  }

  .agency-patch-wrap {
    justify-content: start;
    width: 56px;
    min-width: 56px;
  }

  .agency-search {
    width: 100%;
  }

  .embedded-links-panel {
    margin: 12px;
  }

  .links-head-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .portal-links-list {
    padding: 12px;
  }

  .portal-link-grid {
    grid-template-columns: 1fr;
  }

  .portal-link-admin-actions {
    position: static;
    opacity: 1;
    transform: none;
  }

  .embedded-links-panel iframe {
    min-height: 480px;
    height: 68vh;
  }

  .links-start-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .links-start-header .links-head-actions,
  .links-start-header .agency-search,
  .links-start-header .small-action {
    width: 100%;
  }

  .links-start-grid {
    grid-template-columns: 1fr;
  }

  .start-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wiki-reader {
    max-height: none;
  }

  .channel-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #channelList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .thread-panel {
    min-height: 460px;
  }

  .room-context-panel {
    display: grid;
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 320px;
  }

  .thread-head {
    flex-direction: column;
  }

  .thread-head-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .message-hover-actions {
    position: static;
    display: flex;
    margin-top: 6px;
    width: fit-content;
    box-shadow: none;
  }

  .thread-messages {
    max-height: none;
  }

  .wiki-index {
    max-height: 230px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wiki-index-item {
    padding: 12px;
  }

  .wiki-article {
    padding: 18px 16px 24px;
  }

  .wiki-article h3 {
    font-size: 24px;
  }

  .wiki-infobox {
    order: -1;
  }

  .wiki-toc {
    width: 100%;
  }

  .agency-directory-head {
    position: static;
  }

  .agency-record-list,
  .agency-section-head,
  .agency-directory-summary,
  .directory-panel-head {
    padding-left: 12px;
    padding-right: 12px;
  }

  .agency-record-actions {
    width: 100%;
  }

  .agency-record-actions .small-action,
  .form-row-actions,
  .form-row-actions .small-action {
    width: 100%;
    justify-content: center;
  }

  .form-row-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .post {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 13px 12px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .knowledge,
  .aside {
    grid-template-columns: 1fr;
  }

  .aside {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .nav-item {
    flex-basis: 78vw;
  }

  #channelList {
    grid-template-columns: 1fr;
  }

  .post-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .wiki-info-actions {
    grid-template-columns: 1fr;
  }

  .weather-widget dl {
    grid-template-columns: 1fr;
  }

  .dashboard-news-list {
    grid-template-columns: 1fr;
  }

  .dashboard-news-list .news-row {
    border-right: 0;
  }

  .dashboard-news-list .news-row:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .dashboard-news-list .news-row:last-child {
    border-bottom: 0;
  }

.agency-editor {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }
}

.admin-shell {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px 12px 14px;
}

.admin-subtabs {
  align-items: center;
  background: #e6edf7;
  border: 1px solid #bdc9da;
  border-radius: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 7px;
  width: fit-content;
}

.admin-subtab {
  background: #f8fafc;
  border: 1px solid #cbd6e5;
  border-radius: 7px;
  color: #394963;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  min-height: 42px;
  padding: 10px 16px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.admin-subtab:hover,
.admin-subtab:focus-visible {
  background: #ffffff;
  border-color: #94a9c6;
  color: var(--navy);
}

.admin-subtab.active {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 8px 18px rgba(16, 38, 74, 0.18);
  color: #ffffff;
}

.admin-subtab.warning {
  background: #fff1f2;
  border-color: #ef4444;
  color: #991b1b;
}

.admin-subtab.warning.active {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.admin-panel {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  padding: 0;
}

.admin-panel.logs-view {
  grid-template-columns: 1fr;
}

.admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.admin-card > header {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px;
}

.admin-card h3 {
  color: var(--ink);
  font-size: 18px;
  margin: 0 0 4px;
}

.admin-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.user-management-card {
  grid-column: 1 / -1;
}

.admin-shortcut-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.admin-shortcut-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: inherit;
  display: grid;
  gap: 6px;
  min-height: 108px;
  padding: 14px;
  text-decoration: none;
}

.admin-shortcut-card:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.admin-shortcut-card strong {
  color: var(--navy);
  font-size: 15px;
}

.admin-shortcut-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mfa-reset-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.mfa-reset-form label {
  display: grid;
  gap: 6px;
}

.mfa-reset-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mfa-reset-form input,
.mfa-reset-form select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  min-height: 38px;
  padding: 8px 10px;
}

.admin-result {
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  min-height: 43px;
  padding: 12px 16px;
}

.dashboard-feedback-button {
  align-items: center;
  background: var(--teal);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  min-height: 36px;
  margin-top: 12px;
  padding: 0 14px;
}

.portal-feedback-dialog {
  align-items: center;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 999999;
}

.portal-feedback-dialog[hidden] {
  display: none;
}

.portal-feedback-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.24);
  color: var(--ink);
  max-width: 520px;
  padding: 22px;
  position: relative;
  width: min(520px, 100%);
}

.portal-feedback-close {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 24px;
  height: 30px;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 10px;
  width: 30px;
}

.portal-feedback-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.portal-feedback-card h2,
.portal-feedback-card h3 {
  color: var(--navy);
  font-size: 22px;
  margin: 0 36px 16px 0;
}

.portal-feedback-card form {
  display: grid;
  gap: 12px;
}

.portal-feedback-card label {
  display: grid;
  gap: 6px;
}

.portal-feedback-card label span,
.portal-feedback-type span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.portal-feedback-card input[type="text"],
.portal-feedback-card input[type="email"],
.portal-feedback-card textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 9px 10px;
}

.portal-feedback-card textarea {
  min-height: 96px;
  resize: vertical;
}

.portal-feedback-type {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-feedback-type label {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  padding: 9px 12px;
}

.portal-feedback-type input {
  accent-color: var(--teal);
}

.portal-feedback-submit {
  background: var(--teal);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  min-height: 40px;
}

.portal-feedback-result {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
}

.feedback-log-list {
  display: grid;
  max-height: 412px;
  overflow: auto;
}

.feedback-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 103px;
  padding: 14px 16px;
  position: relative;
  transition: background .16s ease, opacity .16s ease;
}

.feedback-row:hover,
.feedback-row:focus-within {
  background: #f7fafc;
}

.feedback-row.is-resolved,
.feedback-row.is-completed {
  background: #f8faf9;
  opacity: .82;
}

.feedback-row strong,
.feedback-row p,
.feedback-row small {
  display: block;
}

.feedback-row strong {
  color: var(--ink);
  font-size: 14px;
  margin: 6px 0 4px;
}

.feedback-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 8px;
}

.feedback-row small,
.feedback-row aside {
  color: var(--muted);
  font-size: 12px;
}

.feedback-row aside {
  display: grid;
  gap: 4px;
  justify-items: end;
  white-space: nowrap;
}

.feedback-type {
  background: #eaf7f4;
  border-radius: 999px;
  color: var(--teal);
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
  text-transform: uppercase;
}

.feedback-type.issue {
  background: #fff1ed;
  color: #b33a1c;
}

.feedback-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  margin-left: 6px;
  padding: 4px 8px;
  text-transform: uppercase;
}

.feedback-status.resolved,
.feedback-status.completed {
  background: #edf8ee;
  color: #24703a;
}

.feedback-resolve-button,
.feedback-complete-button {
  background: var(--teal);
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  opacity: 0;
  padding: 7px 10px;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease;
}

.feedback-row:hover .feedback-resolve-button,
.feedback-row:focus-within .feedback-resolve-button,
.feedback-row:hover .feedback-complete-button,
.feedback-row:focus-within .feedback-complete-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.feedback-resolve-button:disabled,
.feedback-complete-button:disabled {
  cursor: wait;
  opacity: .7;
}

.audit-log-list {
  display: grid;
  height: min(520px, 58vh);
  min-height: 260px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.admin-audit-grid {
  display: grid;
  gap: 16px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-radio-card {
  grid-column: 1 / -1;
}

.vehicle-radio-toolbar {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  padding: 14px 16px;
}

.vehicle-radio-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vehicle-radio-summary button {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 5px;
  padding: 12px;
  text-align: left;
}

.vehicle-radio-summary button.active {
  background: #eaf7f4;
  border-color: #9bd0c7;
  box-shadow: inset 4px 0 0 var(--teal);
}

.vehicle-radio-summary span,
.vehicle-radio-search span,
.vehicle-radio-form label span,
.vehicle-radio-form .inline-check span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.vehicle-radio-summary strong {
  color: var(--navy);
  font-size: 24px;
}

.vehicle-radio-search {
  display: grid;
  gap: 6px;
}

.vehicle-radio-search input,
.vehicle-radio-form input,
.vehicle-radio-form select,
.vehicle-radio-form textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 9px 10px;
  width: 100%;
}

.vehicle-radio-form textarea {
  min-height: 84px;
  resize: vertical;
}

.vehicle-radio-list {
  max-height: min(660px, 70vh);
  overflow: auto;
}

.vehicle-radio-table-wrap {
  overflow: auto;
  width: 100%;
}

.vehicle-radio-table {
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  font-size: 12px;
  min-width: 1320px;
  width: 100%;
}

.vehicle-radio-table.compact {
  min-width: 760px;
}

.vehicle-radio-table th,
.vehicle-radio-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.vehicle-radio-table th:first-child,
.vehicle-radio-table td:first-child {
  border-left: 1px solid var(--line);
}

.vehicle-radio-table thead th {
  background: #173153;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.vehicle-radio-table tbody tr:nth-child(even):not(.vehicle-radio-section-row) {
  background: #f8fbfd;
}

.vehicle-radio-table tbody tr:hover:not(.vehicle-radio-section-row) {
  background: #e5f0fb;
}

.vehicle-radio-table td.vehicle-exp-warning {
  background: #fee2e2 !important;
  color: #991b1b;
  font-weight: 900;
}

.vehicle-radio-table td:nth-child(9),
.vehicle-radio-table td:nth-child(10),
.vehicle-radio-table td:nth-child(12) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-radio-section-row td {
  color: #0b1f3f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  padding: 10px 12px;
  text-transform: uppercase;
}

.vehicle-radio-section-row span {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0;
  margin-left: 8px;
  text-transform: none;
}

.vehicle-section-investigators:not(.vehicle-radio-section-row) {
  background: #eef6fb;
}

.vehicle-section-investigators.vehicle-radio-section-row td {
  background: #dcecf7;
}

.vehicle-section-ada-s:not(.vehicle-radio-section-row) {
  background: #f5f0fb;
}

.vehicle-section-ada-s.vehicle-radio-section-row td {
  background: #eadff7;
}

.vehicle-section-narco:not(.vehicle-radio-section-row) {
  background: #eef8f2;
}

.vehicle-section-narco.vehicle-radio-section-row td {
  background: #daf0e3;
}

.vehicle-section-outside:not(.vehicle-radio-section-row) {
  background: #fff6e7;
}

.vehicle-section-outside.vehicle-radio-section-row td {
  background: #f8e8c8;
}

.vehicle-section-mobile:not(.vehicle-radio-section-row) {
  background: #eef6fb;
}

.vehicle-section-mobile.vehicle-radio-section-row td {
  background: #dcecf7;
}

.vehicle-section-portable:not(.vehicle-radio-section-row) {
  background: #eef8f2;
}

.vehicle-section-portable.vehicle-radio-section-row td {
  background: #daf0e3;
}

.vehicle-radio-table tbody tr.vehicle-radio-inactive:not(.vehicle-radio-section-row) td {
  background: #fde8e8 !important;
  color: #7f1d1d;
}

.vehicle-radio-table tbody tr.vehicle-radio-inactive:hover:not(.vehicle-radio-section-row) td {
  background: #fbd2d2 !important;
}

.vehicle-radio-grid-actions {
  display: flex;
  gap: 6px;
}

.vehicle-radio-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.vehicle-radio-modal {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(3, 12, 28, 0.3);
  color: var(--text);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(860px, calc(100vh - 48px));
  overflow: hidden;
  width: min(980px, calc(100vw - 36px));
}

.vehicle-radio-modal header {
  align-items: start;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px;
}

.vehicle-radio-modal header h3 {
  color: var(--navy);
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 5px;
}

.vehicle-radio-modal header p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.vehicle-radio-form {
  background: #ffffff;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 16px 20px 20px;
}

.vehicle-radio-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.vehicle-radio-form label > span,
.vehicle-radio-form .inline-check span {
  color: var(--muted) !important;
  display: block;
  font-size: 11px !important;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.2;
  position: static;
  text-transform: uppercase;
}

.vehicle-radio-form input,
.vehicle-radio-form select,
.vehicle-radio-form textarea {
  background: #ffffff;
  display: block;
  min-width: 0;
  width: 100%;
}

.vehicle-radio-form .form-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 4px;
  padding-top: 14px;
}

.vehicle-radio-form .inline-check {
  align-items: center;
  display: flex;
  gap: 8px;
}

.vehicle-radio-install-field.is-hidden,
.vehicle-radio-fields.is-hidden,
.vehicle-linked-radio-field.is-hidden {
  display: none;
}

.vehicle-linked-radio-field {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.vehicle-linked-radio-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-linked-radio-field small,
.vehicle-radio-muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.vehicle-radio-link {
  background: transparent;
  border: 0;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-decoration: underline;
}

.retention-list {
  display: grid;
}

.retention-list article {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 13px 16px;
}

.retention-list article:last-child {
  border-bottom: 0;
}

.retention-list strong {
  color: var(--ink);
  font-size: 13px;
}

.retention-list span,
.export-panel span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.export-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.audit-row {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(140px, auto);
  padding: 13px 16px;
}

.audit-row-warning {
  border-left: 4px solid #b42318;
}

.audit-row:last-child {
  border-bottom: 0;
}

.audit-row strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
  text-transform: capitalize;
}

.audit-row span,
.audit-row small,
.audit-row time {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.audit-row aside {
  text-align: right;
}

@media (max-width: 980px) {
  .admin-audit-grid {
    grid-template-columns: 1fr;
  }
}

.firearm-quals-panel {
  background: #f7f9fc;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.firearm-qual-hero,
.firearm-qual-layout,
.firearm-qual-form,
.firearm-qual-records {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(20, 36, 66, .05);
}

.firearm-qual-hero {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
  padding: 18px;
}

.firearm-qual-hero h3,
.firearm-qual-form h4,
.firearm-qual-records h4 {
  color: var(--ink);
  margin: 0;
}

.firearm-qual-hero p,
.firearm-qual-records p {
  color: var(--muted);
  margin: 4px 0 0;
}

.local-preview-note {
  color: #8a4b10 !important;
  font-size: 12px;
  font-weight: 750;
}

.firearm-qual-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.firearm-qual-stats div {
  background: #f3f6fa;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
}

.firearm-qual-stats strong {
  color: var(--navy);
  display: block;
  font-size: 24px;
}

.firearm-qual-stats span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.firearm-qual-layout {
  align-items: start;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  overflow: hidden;
}

.firearm-qual-form {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.firearm-qual-form label {
  color: var(--ink);
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.firearm-qual-form input,
.firearm-qual-form select,
.firearm-qual-form textarea,
.compact-search input {
  border: 1px solid #d7deea;
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  min-width: 0;
  padding: 9px 10px;
}

.form-grid.two {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.firearm-qual-records {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}

.panel-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  padding: 14px 16px;
}

.compact-search {
  align-items: center;
  display: flex;
  gap: 8px;
}

.compact-search svg {
  color: var(--muted);
  flex: 0 0 auto;
  width: 17px;
}

.compact-search input {
  width: 100%;
}

.firearm-qual-list {
  display: grid;
  max-height: 620px;
  overflow: auto;
}

.firearm-qual-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  padding: 14px 16px;
}

.firearm-qual-row:last-child {
  border-bottom: 0;
}

.firearm-qual-row strong,
.firearm-qual-row span,
.firearm-qual-row small {
  display: block;
}

.firearm-qual-row span,
.firearm-qual-row small,
.firearm-qual-row p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 3px 0 0;
}

.firearm-qual-score {
  background: #edf7f4;
  border: 1px solid #cfe7df;
  border-radius: 8px;
  color: var(--teal);
  padding: 10px;
  text-align: center;
}

.firearm-qual-score.failed {
  background: #fff1f0;
  border-color: #f4c7c2;
  color: #a83424;
}

.firearm-qual-score strong {
  font-size: 15px;
}

.firearm-qual-actions {
  align-items: end;
  display: grid;
  gap: 7px;
  justify-items: end;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 850;
  padding: 5px 8px;
}

.status-pill.passed {
  background: #e8f5ef;
  color: var(--teal);
}

.status-pill.failed {
  background: #fff1f0;
  color: #a83424;
}

.ghost-button.compact {
  font-size: 12px;
  padding: 6px 9px;
}

.task-force-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

.tf-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tf-card h4 {
  color: var(--navy);
  margin: 0;
}

.tf-card p,
.tf-personnel-row small,
.tf-record-row small {
  color: var(--muted);
  margin: 4px 0 0;
}

.tf-command-panel {
  box-shadow: none;
}

.tf-command-scope {
  text-align: right;
  color: var(--muted);
}

.tf-command-scope span {
  display: block;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tf-command-scope strong {
  color: var(--navy);
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.tf-command-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.tf-command-stats div {
  padding: 14px 18px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.tf-command-stats div:last-child {
  border-right: 0;
}

.tf-command-stats span,
.tf-detail-grid span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.tf-command-stats strong,
.tf-detail-grid strong {
  color: var(--navy);
  display: block;
  font-size: 24px;
  line-height: 1.15;
  margin-top: 5px;
}

.tf-command-stats small {
  color: var(--quiet);
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-top: 3px;
}

.tf-summary-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tf-summary-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px 0;
}

.tf-summary-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.tf-summary-block {
  background: #fff;
  padding: 0;
}

.tf-summary-block h4 {
  color: var(--navy);
  margin: 0 0 10px;
}

.tf-money-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
}

.tf-money-card {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.tf-summary-band .tf-money-card {
  background: linear-gradient(120deg, #eef8f6, #f8fafd);
  border-color: #b9d8d4;
}

.tf-money-card header strong {
  color: var(--navy);
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.tf-money-card header span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.tf-money-card dl {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 0;
}

.tf-money-card dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.tf-money-card dd {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  margin: 2px 0 0;
}

.tf-workspace {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(640px, 1.45fr) minmax(340px, 0.55fr);
}

.tf-admin-review-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.05fr);
}

.tf-submit-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tf-workspace.review-only {
  grid-template-columns: 1fr;
}

.tf-card {
  font-size: 14px;
  line-height: 1.35;
  padding: 16px;
}

.tf-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tf-record-tools,
.tf-archive-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tf-archive-filters {
  border-top: 1px solid var(--line);
  margin: -2px -16px 12px;
  padding: 12px 16px;
}

.tf-archive-filters label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 850;
  gap: 4px;
  min-width: 160px;
  text-transform: uppercase;
}

.tf-archive-filters select {
  border: 1px solid #d3dce9;
  border-radius: 6px;
  color: var(--navy);
  font-size: 13px;
  padding: 7px 9px;
  text-transform: none;
}

.tf-ledger-form,
.tf-personnel-form,
.tf-paper-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-force-personnel-modal,
.task-force-paper-modal {
  width: min(860px, 100%);
}

.task-force-resubmit-modal,
.task-force-detail-modal {
  width: min(1180px, calc(100vw - 36px));
  max-height: min(860px, calc(100vh - 36px));
}

.task-force-detail-modal {
  grid-template-rows: minmax(0, 1fr);
}

.task-force-detail-modal .tf-detail-card,
.task-force-resubmit-modal .tf-ledger-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  overflow-y: auto;
}

.task-force-detail-modal .tf-detail-card {
  padding: 20px;
}

.task-force-resubmit-modal .tf-ledger-card {
  padding: 16px 20px 20px;
}

.task-force-personnel-modal .tf-personnel-form {
  overflow-y: auto;
  padding: 16px 20px 20px;
}

.task-force-paper-modal .tf-paper-form {
  padding: 16px 20px 20px;
}

.tf-admin-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tf-paper-warning {
  align-items: center;
  background: #fff8e8;
  border: 1px solid #f2d28a;
  border-radius: 8px;
  color: #5f4a12;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.tf-paper-warning strong {
  color: #17365f;
  font-size: 12px;
  text-transform: uppercase;
}

.tf-paper-warning span {
  font-size: 13px;
  line-height: 1.35;
}

.tf-personnel-form select[multiple] {
  min-height: 104px;
}

.tf-ledger-context {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
}

.tf-ledger-context div {
  border-right: 1px solid var(--line);
  min-width: 0;
  padding: 10px 12px;
}

.tf-ledger-context div:last-child {
  border-right: 0;
}

.tf-ledger-context span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.tf-ledger-context strong {
  color: var(--navy);
  display: block;
  font-size: 13px;
  line-height: 1.2;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-invoice-month-panel {
  align-items: stretch;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 56%, #eef6f4 100%);
  border: 2px solid #b9c7df;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(23, 43, 87, .08);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
}

.tf-invoice-month-main {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 16px 18px;
}

.tf-invoice-month-mark {
  align-items: center;
  background: var(--navy);
  border-radius: 12px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18);
  color: #fff;
  display: flex;
  font-size: 22px;
  font-weight: 900;
  height: 64px;
  justify-content: center;
  letter-spacing: .03em;
  min-width: 68px;
  overflow: hidden;
  padding-top: 12px;
  position: relative;
}

.tf-invoice-month-mark::before {
  background: #bf1e2e;
  content: "";
  height: 15px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.tf-invoice-month-main span,
.tf-invoice-month-control label span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tf-invoice-month-main strong {
  color: var(--navy);
  display: block;
  font-size: 27px;
  line-height: 1;
  margin-top: 4px;
}

.tf-invoice-month-main p {
  color: #526178;
  font-size: 13px;
  margin: 5px 0 0;
}

.tf-invoice-month-control {
  align-items: center;
  background: rgba(255, 255, 255, .78);
  border-left: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(210px, 280px) auto;
  padding: 16px 18px;
}

.tf-invoice-month-control button {
  font-size: 20px;
  font-weight: 900;
  height: 42px;
  min-width: 42px;
  padding: 0;
}

.tf-invoice-month-control label {
  margin: 0;
}

.tf-invoice-month-control input {
  border: 2px solid var(--green);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  min-height: 46px;
  padding: 8px 12px;
}

.tf-invoice-month-control small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  grid-column: 1 / -1;
  justify-self: end;
}

.tf-member-only-field[hidden] {
  display: none;
}

.tf-year-field {
  grid-column: 1 / 2;
}

.tf-line-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.tf-line-table {
  border-collapse: collapse;
  min-width: 1040px;
  width: 100%;
}

.tf-line-table th,
.tf-line-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

.tf-line-table th {
  background: #17365f;
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
}

.tf-line-table input,
.tf-line-table select,
.tf-personnel-form input,
.tf-personnel-form select,
.tf-paper-form input,
.tf-paper-form select,
.tf-paper-form textarea,
.tf-ledger-form input,
.tf-ledger-form select,
.tf-ledger-form textarea,
.tf-detail-card textarea {
  border: 1px solid #d3dce9;
  border-radius: 6px;
  font-size: 13px;
  padding: 8px 10px;
  width: 100%;
}

.tf-line-table input[readonly],
.tf-personnel-form input[readonly],
.tf-ledger-form input[readonly] {
  background: #f4f7fb;
  color: #56647a;
}

.tf-other-municipality {
  margin-top: 6px;
}

.tf-line-actions {
  display: flex;
  justify-content: flex-end;
}

.tf-line-total {
  color: var(--navy);
  font-weight: 900;
  white-space: nowrap;
}

.tf-form-total {
  color: var(--muted);
  display: flex;
  font-weight: 850;
  gap: 18px;
  justify-content: flex-end;
}

.tf-form-total strong {
  color: var(--navy);
  margin-left: 6px;
}

.tf-personnel-list,
.tf-record-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.tf-personnel-tabs {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 10px;
  padding-bottom: 10px;
}

.tf-personnel-tabs button {
  appearance: none;
  background: #f4f7fb;
  border: 1px solid #d7e0ec;
  border-radius: 999px;
  color: #34445d;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 7px 10px;
}

.tf-personnel-tabs button:hover,
.tf-personnel-tabs button:focus-visible {
  border-color: #b8c7da;
  background: #eef3f9;
}

.tf-personnel-tabs button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.tf-personnel-tabs span {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.78;
}

.tf-personnel-row {
  align-items: center;
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 74px;
  padding: 9px 10px;
}

.tf-personnel-row strong,
.tf-personnel-row span,
.tf-personnel-row small {
  display: block;
}

.tf-admin-card .tf-card-head h4 {
  font-size: 16px;
  line-height: 1.2;
}

.tf-admin-card .tf-card-head p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  max-width: 560px;
}

.tf-admin-card .eyebrow {
  font-size: 10px;
  line-height: 1.2;
}

.tf-personnel-row > div:first-child {
  min-width: 0;
}

.tf-personnel-row > div:last-child {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tf-personnel-row strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.2;
}

.tf-personnel-row span {
  color: #34445d;
  font-size: 11px;
  line-height: 1.25;
  margin-top: 2px;
}

.tf-personnel-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  margin-top: 3px;
}

.tf-personnel-row .status-pill {
  font-size: 10px;
  min-width: 92px;
  text-align: center;
}

.tf-personnel-row .ghost-button.compact {
  font-size: 11px;
  padding: 5px 8px;
}

.tf-record-row button {
  align-items: center;
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
  text-align: left;
  width: 100%;
}

.tf-record-row.active button,
.tf-record-row button:hover {
  background: #eef8f6;
  border-color: var(--teal);
}

.tf-record-row strong,
.tf-record-row small {
  grid-column: 2;
}

.tf-detail-card {
  border-color: #b7c7dc;
  margin-top: 12px;
}

.tf-detail-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.tf-detail-card .tf-detail-grid div {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}

.tf-detail-card .tf-detail-grid span {
  font-size: 10px;
}

.tf-detail-card .tf-detail-grid strong {
  font-size: 15px;
  line-height: 1.2;
}

.tf-detail-card .tf-line-table th,
.tf-detail-card .tf-line-table td {
  font-size: 12px;
  line-height: 1.3;
  padding: 8px;
}

.tf-detail-card .form-actions {
  gap: 8px;
}

.print-action {
  background: #17365f;
  box-shadow: none;
}

.danger-action {
  background: #b3261e;
  box-shadow: none;
}

.danger-action:hover {
  background: #931b15;
}

.tf-review-lines {
  margin-bottom: 12px;
  min-width: 0;
}

.tf-review-note {
  background: #f8fafd;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  color: var(--text);
  margin: 0 0 12px;
  padding: 10px 12px;
}

.tf-review-note strong {
  color: var(--navy);
  display: block;
  font-size: 12px;
  line-height: 1.2;
}

.tf-review-note p {
  color: #34445d;
  font-size: 12px;
  line-height: 1.4;
  margin: 5px 0 0;
}

.tf-review-note.rejected {
  background: #fff6f5;
  border-color: #f1c5c0;
}

.tf-review-note.rejected strong {
  color: #a72b20;
}

.tf-note-history {
  background: #f8fafd;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  margin: 0 0 12px;
  overflow: hidden;
}

.tf-note-history header {
  align-items: baseline;
  background: #eef3f9;
  border-bottom: 1px solid #d5dfec;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
}

.tf-note-history h5 {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.2;
  margin: 0;
}

.tf-note-list {
  display: grid;
}

.tf-note-row {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.tf-note-row + .tf-note-row {
  border-top: 1px solid #d5dfec;
}

.tf-note-row strong {
  color: var(--navy);
  display: block;
  font-size: 12px;
  line-height: 1.2;
}

.tf-note-row span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 750;
  margin-top: 2px;
}

.tf-note-row p {
  color: #34445d;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  white-space: pre-wrap;
}

.status-pill.submitted {
  background: #fff4d6;
  color: #8a5d00;
}

.status-pill.supervisor_approved {
  background: #e9f1ff;
  color: #174b8a;
}

.status-pill.da_approved {
  background: #e7f8ef;
  color: #136b3a;
}

.status-pill.rejected {
  background: #ffe7e7;
  color: #9d1f1f;
}

.task-force-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tf-nested-tabs {
  align-items: center;
  background: #e6edf7;
  border: 1px solid #bdc9da;
  border-radius: 8px;
  display: flex;
  gap: 6px;
  padding: 7px;
  width: fit-content;
}

.tf-nested-tabs button {
  background: #f8fafc;
  border: 1px solid #cbd6e5;
  border-radius: 7px;
  color: #394963;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  padding: 10px 16px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.tf-nested-tabs button:hover,
.tf-nested-tabs button:focus-visible {
  background: #ffffff;
  border-color: #94a9c6;
  color: var(--navy);
}

.tf-nested-tabs button.active {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 8px 18px rgba(16, 38, 74, 0.18);
  color: #fff;
}

.wire-schedule-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wire-command-panel {
  box-shadow: none;
}

.wire-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ghost-button.danger,
.ghost-button.compact.danger {
  color: #9d1f1f;
}

.wire-operation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 620px;
  overflow-y: auto;
}

.wire-active-strip {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.wire-active-strip-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.wire-active-strip-head h4 {
  color: var(--navy);
  font-size: 18px;
  margin: 0;
}

.wire-active-strip-head strong {
  background: #e7f4ef;
  border-radius: 999px;
  color: #136b5b;
  font-size: 12px;
  padding: 7px 10px;
}

.wire-operation-list.compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  max-height: none;
  overflow: visible;
}

.wire-operation-list button {
  align-items: center;
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  cursor: pointer;
  display: grid;
  gap: 3px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 11px;
  text-align: left;
}

.wire-operation-list button.active,
.wire-operation-list button:hover {
  background: #eaf3ff;
  border-color: #9fb9dd;
}

.wire-operation-list strong,
.wire-operation-list span {
  display: block;
}

.wire-operation-list strong {
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wire-operation-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-top: 3px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wire-operation-list em {
  align-self: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  grid-row: 1 / span 2;
  padding: 6px 9px;
}

.wire-detail-card {
  min-height: 360px;
}

.wire-detail-card.full-width {
  padding: 14px 16px 18px;
  width: 100%;
}

.wire-detail-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  margin: -2px -2px 12px;
  padding-bottom: 12px;
}

.wire-detail-head h4 {
  font-size: 19px;
}

.wire-meta-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.wire-meta-grid div,
.wire-meta-grid button {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  padding: 10px;
  text-align: left;
}

.wire-meta-grid button {
  cursor: pointer;
}

.wire-meta-grid button:hover,
.wire-meta-grid button:focus-visible {
  background: #eaf3ff;
  border-color: #9fb9dd;
}

.wire-meta-grid span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.wire-meta-grid strong {
  color: var(--navy);
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.wire-meta-grid small {
  color: var(--teal);
  display: block;
  font-size: 11px;
  font-weight: 900;
  margin-top: 3px;
}

.wire-shift-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wire-shift-row {
  align-items: center;
  background: #f8fafd;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.wire-shift-row.surveillance {
  border-left-color: #b23a48;
}

.wire-shift-row span,
.wire-shift-row small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 750;
}

.wire-shift-row strong {
  color: var(--navy);
  display: block;
  font-size: 15px;
  margin: 2px 0;
}

.wire-shift-row aside {
  min-width: 150px;
  text-align: right;
}

.wire-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 20px;
}

.wire-form label {
  color: var(--ink);
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.wire-form input,
.wire-form select,
.wire-form textarea {
  border: 1px solid #d3dce9;
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.wire-form select[multiple] {
  min-height: 220px;
}

.wire-roster-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 14px 20px 0;
}

.wire-roster-list.full {
  max-height: min(540px, 65vh);
}

.wire-roster-row {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.wire-roster-row strong,
.wire-roster-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wire-roster-row strong {
  color: var(--ink);
  font-size: 14px;
}

.wire-roster-row span {
  color: var(--muted);
  font-size: 12px;
}

.wire-invite-history {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
}

.wire-invite-history h4 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.wire-invite-history button {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  padding: 9px 10px;
  text-align: left;
}

.wire-invite-history button:hover {
  background: #eef4ff;
  border-color: #b7c8e4;
}

.wire-invite-history strong,
.wire-invite-history em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wire-invite-history strong {
  font-size: 13px;
}

.wire-invite-history em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  margin-top: 2px;
}

.wire-assign-builder {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1.2fr) auto;
}

.wire-calendar-card {
  display: grid;
  gap: 12px;
}

.wire-calendar-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.wire-calendar-main-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wire-calendar-toolbar label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 4px;
  text-transform: uppercase;
}

.wire-calendar-toolbar input {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-size: 13px;
  padding: 8px 10px;
}

.wire-view-tabs {
  background: #f3f6fa;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  padding: 4px;
}

.wire-view-tabs button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 8px 14px;
}

.wire-view-tabs button.active {
  background: #173158;
  color: #fff;
}

.wire-date-nav {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  padding: 4px;
}

.wire-date-nav button {
  align-items: center;
  background: #f3f6fa;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  min-width: 32px;
  padding: 0 10px;
}

.wire-date-nav strong {
  color: var(--ink);
  font-size: 13px;
  min-width: 190px;
  text-align: center;
}

.wire-access-pill {
  background: #e7f4ef;
  border-radius: 999px;
  color: #136b5b;
  font-size: 12px;
  font-weight: 900;
  padding: 9px 12px;
}

.wire-open-filter {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 9px 12px;
}

.wire-open-filter.active {
  background: #b4232c;
  border-color: #b4232c;
  color: #fff;
}

.wire-calendar {
  display: grid;
  gap: 10px;
}

.wire-calendar.week {
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  overflow-x: auto;
}

.wire-calendar.month {
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  overflow-x: auto;
}

.wire-calendar-weekdays {
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  overflow-x: auto;
}

.wire-calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 8px 10px;
  text-align: center;
  text-transform: uppercase;
}

.wire-calendar-day {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.wire-calendar.month .wire-calendar-day {
  min-height: 210px;
}

.wire-calendar-day.empty {
  background: #f2f5f9;
  border-style: dashed;
}

.wire-calendar-day > header {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
}

.wire-calendar-day > header strong {
  color: var(--ink);
  font-size: 13px;
}

.wire-calendar-day > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.wire-calendar-slots {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.wire-calendar-slot {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #173158;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px;
}

.wire-calendar-slot.surveillance {
  border-left-color: #2f7d72;
}

.wire-calendar-slot.filled {
  background: #e9f8ef;
  border-color: #b8dfc7;
  border-left-color: #1f8a4c;
  cursor: pointer;
}

.wire-calendar-slot.filled:hover {
  background: #ddf3e7;
  border-color: #8ecda7;
}

.wire-calendar-slot span,
.wire-calendar-slot small,
.wire-calendar-slot strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wire-calendar-slot span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.wire-calendar-slot strong {
  color: var(--ink);
  font-size: 12px;
}

.wire-calendar-slot small {
  color: var(--muted);
  font-size: 11px;
}

.wire-calendar-slot aside {
  display: flex;
  gap: 5px;
}

.wire-empty-day {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  padding: 8px 2px;
}

.wire-slot-action {
  align-items: center;
  background: #173158;
  border: 0;
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.wire-slot-action.urgent {
  background: #b4232c;
}

.wire-open-shift-summary {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  margin: 14px 20px 0;
  padding: 12px;
}

.wire-open-shift-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.wire-open-shift-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wire-operation-modal,
.wire-admin-modal,
.wire-assign-modal,
.wire-shift-modal {
  width: min(940px, calc(100vw - 36px));
}

.wire-shift-hour-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wire-shift-hour-grid fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
}

.wire-shift-hour-grid legend {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 0 4px;
  text-transform: uppercase;
}

.forfeiture-panel {
  display: grid;
  gap: 14px;
}

.forfeiture-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.forfeiture-case-list,
.forfeiture-detail-card,
.forfeiture-access-list,
.forfeiture-distribution,
.forfeiture-notes,
.forfeiture-attachments,
.forfeiture-form-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.forfeiture-case-list {
  align-self: start;
  display: grid;
  gap: 8px;
  max-height: 720px;
  overflow: auto;
  padding: 12px;
}

.forfeiture-case-list header,
.forfeiture-distribution header,
.section-inline-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.forfeiture-case-list button,
.forfeiture-access-row,
.forfeiture-attachments a,
.forfeiture-attachment-row {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 10px;
  text-align: left;
  text-decoration: none;
}

.forfeiture-attachment-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.forfeiture-attachment-row a {
  background: transparent;
  border: 0;
  padding: 0;
}

.forfeiture-case-list button.active {
  background: #eaf2ff;
  border-color: #9eb9e7;
  box-shadow: inset 4px 0 0 var(--navy);
}

.forfeiture-case-list button.status-pending {
  background: #fff1f2;
  border-color: #fecdd3;
  box-shadow: inset 4px 0 0 #b91c1c;
}

.forfeiture-case-list button.status-received {
  background: #fff7ed;
  border-color: #fed7aa;
  box-shadow: inset 4px 0 0 #ea580c;
}

.forfeiture-case-list button.status-paid {
  background: #ecfdf5;
  border-color: #bbf7d0;
  box-shadow: inset 4px 0 0 #15803d;
}

.forfeiture-case-list button.status-pending.active {
  background: #ffe4e6;
  border-color: #fb7185;
  box-shadow: inset 6px 0 0 #991b1b;
}

.forfeiture-case-list button.status-received.active {
  background: #ffedd5;
  border-color: #fb923c;
  box-shadow: inset 6px 0 0 #c2410c;
}

.forfeiture-case-list button.status-paid.active {
  background: #dcfce7;
  border-color: #4ade80;
  box-shadow: inset 6px 0 0 #166534;
}

.forfeiture-case-list strong,
.forfeiture-detail-card h4,
.forfeiture-distribution h4,
.forfeiture-notes h4,
.forfeiture-attachments h4 {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  margin: 0;
}

.forfeiture-case-list span,
.forfeiture-case-list small,
.forfeiture-access-row span,
.forfeiture-attachments span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.forfeiture-detail-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.forfeiture-detail-card > header {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.forfeiture-distribution,
.forfeiture-notes,
.forfeiture-attachments,
.forfeiture-form-section {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.forfeiture-distribution-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.forfeiture-distribution-grid div,
.forfeiture-splits div,
.forfeiture-audit-steps div,
.forfeiture-notes article {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.forfeiture-distribution-grid span,
.forfeiture-splits span,
.forfeiture-audit-steps span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.forfeiture-distribution-grid strong,
.forfeiture-splits strong,
.forfeiture-audit-steps strong {
  color: var(--ink);
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.forfeiture-audit-steps {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px;
}

.forfeiture-audit-steps summary {
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.forfeiture-splits {
  display: grid;
  gap: 8px;
}

.forfeiture-splits h5 {
  color: var(--ink);
  font-size: 13px;
  margin: 0;
}

.forfeiture-splits div,
.forfeiture-audit-steps div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.forfeiture-notes article strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
}

.forfeiture-notes article span {
  color: var(--muted);
  font-weight: 700;
}

.forfeiture-notes article p {
  color: var(--ink);
  font-size: 13px;
  margin: 6px 0 0;
}

.forfeiture-notes form,
.forfeiture-attachments form {
  display: grid;
  gap: 8px;
}

.forfeiture-scan-helper {
  align-items: center;
  background: #f7f9fc;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
  padding: 12px;
}

.forfeiture-scan-helper h5 {
  color: var(--ink);
  font-size: 14px;
  margin: 0 0 3px;
}

.forfeiture-scan-helper p,
.forfeiture-scan-helper small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}

.scan-helper-download {
  white-space: nowrap;
}

#forfeitureScanHelperStatus {
  flex: 0 0 100%;
}

@media (max-width: 760px) {
  .forfeiture-scan-helper {
    align-items: stretch;
    flex-direction: column;
  }
}

.forfeiture-agency-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  margin-top: 8px;
}

.forfeiture-expense-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 150px minmax(140px, 0.7fr) 120px auto;
  margin-top: 8px;
}

.forfeiture-vehicle-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.forfeiture-modal,
.forfeiture-case-modal {
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 32px);
}

.forfeiture-case-modal .wire-form {
  overflow: auto;
  padding-bottom: 0;
}

.forfeiture-case-modal .form-actions {
  background: #ffffff;
  border-top: 1px solid var(--line);
  bottom: 0;
  margin: 4px -20px 0;
  padding: 12px 20px 16px;
  position: sticky;
  z-index: 2;
}

.forfeiture-case-modal #forfeitureCaseStatus {
  background: #ffffff;
  bottom: 0;
  margin: 0;
  padding: 0 20px 12px;
  position: sticky;
  z-index: 2;
}

.forfeiture-case-modal .forfeiture-form-section {
  max-height: min(360px, 42vh);
  overflow: auto;
}

.forfeiture-access-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .admin-panel {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .admin-shortcut-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-radio-toolbar {
    grid-template-columns: 1fr;
  }

  .vehicle-radio-summary {
    grid-template-columns: 1fr;
  }

  .vehicle-radio-table {
    min-width: 980px;
  }

  .audit-row {
    grid-template-columns: 1fr;
  }

  .audit-row aside {
    text-align: left;
  }

  .firearm-qual-hero,
  .firearm-qual-layout,
  .tf-workspace,
  .tf-admin-review-grid,
  .tf-invoice-month-panel,
  .tf-invoice-month-control,
  .wire-layout,
  .forfeiture-layout,
  .forfeiture-agency-row,
  .forfeiture-expense-row,
  .wire-assign-builder,
  .panel-toolbar,
  .firearm-qual-row {
    grid-template-columns: 1fr;
  }

  .firearm-qual-stats,
  .tf-command-stats,
  .tf-detail-grid,
  .tf-ledger-context,
  .tf-money-grid,
  .wire-meta-grid,
  .forfeiture-distribution-grid,
  .wire-shift-hour-grid,
  .form-grid.two,
  .form-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-command-stats div:nth-child(2) {
    border-right: 0;
  }

  .tf-command-stats div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .tf-ledger-context div {
    border-bottom: 1px solid var(--line);
  }

  .tf-invoice-month-control {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .tf-invoice-month-control small {
    justify-self: start;
  }

  .tf-money-card dl {
    grid-template-columns: 1fr;
  }

  .firearm-qual-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .firearm-qual-actions {
    justify-items: start;
  }

  .wire-shift-row {
    grid-template-columns: 1fr;
  }

  .wire-shift-row aside {
    text-align: left;
  }
}
