:root {
  --navy: #16345d;
  --navy-deep: #0c2342;
  --blue: #2962ff;
  --blue-soft: #eaf1ff;
  --purple: #7453e8;
  --purple-soft: #f0edff;
  --ink: #172033;
  --muted: #657489;
  --bg: #f4f7fb;
  --surface: #fff;
  --border: #dce4ee;
  --positive: #16825d;
  --positive-soft: #eaf7f1;
  --warning: #a96800;
  --warning-soft: #fff6dd;
  --negative: #c83b4e;
  --negative-soft: #fff0f2;
  --shadow: 0 10px 28px rgba(21, 52, 93, 0.07);
  --sidebar-expanded: 244px;
  --sidebar-collapsed: 74px;
  --header-height: 64px;
  --font-ui: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

button,
input,
select,
textarea {
  font-size: 1rem;
}

button,
.button {
  cursor: pointer;
}

a {
  color: var(--blue);
  text-decoration: none;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.25rem, 4vw, 3.4rem);
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin-top: 0;
}

code {
  padding: 3px 7px;
  border-radius: 5px;
  color: #5039b7;
  background: var(--purple-soft);
  font-size: 0.78rem;
}

.app-column {
  min-height: 100vh;
  transition: margin-left 180ms ease;
}

.has-sidebar .app-column {
  margin-left: var(--sidebar-expanded);
}

.nav-collapsed.has-sidebar .app-column {
  margin-left: var(--sidebar-collapsed);
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-expanded);
  flex-direction: column;
  padding: 12px 11px;
  color: #fff;
  background:
    radial-gradient(circle at 30px 100px, rgba(116, 83, 232, 0.18), transparent 150px),
    linear-gradient(180deg, var(--navy-deep), #102f55);
  transition: width 180ms ease, transform 180ms ease;
}

.sidebar-brand-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--navy);
}

.brand--sidebar {
  color: #fff;
}

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.24);
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1.13rem;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: -2px;
  color: #a9bdd5;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-toggle,
.menu-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #b5c7da;
  background: transparent;
  font-size: 1.5rem;
}

.sidebar-toggle:hover,
.menu-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-toggle .app-icon,
.menu-button .app-icon {
  width: 20px;
  height: 20px;
}

.user-avatar,
.conversation-avatar,
.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
}

.side-nav {
  display: grid;
  gap: 2px;
}

.side-nav a,
.sidebar-footer a {
  position: relative;
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 9px;
  color: #bed0e1;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.side-nav a:hover,
.side-nav a.active,
.sidebar-footer a:hover {
  color: #fff;
  background: rgba(70, 136, 235, 0.15);
}

.side-nav a.active {
  box-shadow: inset 3px 0 0 #7cb8ff;
}

.nav-glyph {
  display: grid;
  width: 20px;
  flex: 0 0 20px;
  place-items: center;
  font-size: 1rem;
}

.app-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-badge {
  min-width: 20px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  font-size: 0.67rem;
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #1b73c9;
  outline-offset: 3px;
}

.rich-content,
.checklist-cell {
  overflow-wrap: anywhere;
}

.panel {
  min-width: 0;
  overflow-wrap: break-word;
}

@media (max-width: 700px) {
  .filter-bar,
  .form-actions,
  .button-row {
    align-items: stretch;
  }

  .filter-bar > label,
  .filter-bar input,
  .filter-bar select,
  .form-actions .button {
    width: 100%;
    min-width: 0;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.nav-section-label {
  margin: 9px 10px 3px;
  color: #718da8;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-footer {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-label {
  opacity: 1;
}

.nav-collapsed .sidebar {
  width: var(--sidebar-collapsed);
}

.nav-collapsed .sidebar-label,
.nav-collapsed .nav-badge {
  display: none;
}

.nav-collapsed .sidebar-brand-row {
  justify-content: center;
}

.nav-collapsed .sidebar-toggle {
  position: absolute;
  top: 23px;
  left: 59px;
  width: 24px;
  color: #d7e3f0;
  background: var(--navy-deep);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  transform: rotate(180deg);
}

.nav-collapsed .side-nav a,
.nav-collapsed .sidebar-footer a {
  justify-content: center;
  padding-inline: 8px;
}

.site-header {
  position: sticky;
  z-index: 25;
  top: 0;
  display: flex;
  height: var(--header-height);
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.menu-button {
  display: none;
  color: var(--navy);
}

.header-context {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.header-context a {
  color: var(--navy);
  font-weight: 700;
}

.header-context a:hover {
  color: var(--blue);
}

.breadcrumb-separator {
  color: #a3afbd;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 4px var(--positive-soft);
}

.user-cluster {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  flex: 0 0 auto;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  font-size: 0.74rem;
}

.user-name {
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
}

.notification-link {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #8090a4;
  background: #f3f6fa;
}

.notification-link .app-icon {
  width: 17px;
  height: 17px;
}

.notification-link span {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  padding: 2px 4px;
  border-radius: 999px;
  color: #fff;
  background: var(--negative);
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
}

.user-menu {
  position: relative;
}

.user-menu__trigger {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 3px 5px 3px 3px;
  border: 0;
  border-radius: 10px;
  color: var(--navy);
  background: transparent;
}

.user-menu__trigger:hover,
.user-menu__trigger[aria-expanded="true"] {
  background: #f1f5fa;
}

.user-menu__trigger > .app-icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.user-menu__panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 9px);
  right: 0;
  width: min(300px, calc(100vw - 28px));
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(12, 35, 66, 0.18);
  overflow: hidden;
}

.user-menu__panel[hidden] {
  display: none;
}

.user-menu__profile {
  display: grid;
  justify-items: center;
  padding: 24px 20px 18px;
  text-align: center;
}

.profile-avatar.profile-avatar--menu {
  width: 58px;
  height: 58px;
  margin-bottom: 11px;
  font-size: 1.15rem;
}

.user-menu__profile strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.user-menu__profile span,
.user-menu__profile small {
  color: var(--muted);
  font-size: 0.74rem;
}

.user-menu__actions {
  display: grid;
  padding: 7px;
  border-top: 1px solid var(--border);
}

.user-menu__actions a,
.user-menu__actions button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
}

.user-menu__actions a:hover,
.user-menu__actions button:hover {
  color: var(--navy);
  background: #f3f6fa;
}

.user-menu__actions form:last-child {
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.text-button,
.link-button {
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
}

.text-button:hover,
.link-button:hover {
  text-decoration: underline;
}

.link-button--danger {
  color: var(--negative);
}

.page-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 42px 36px 70px;
}

.page-heading {
  margin-bottom: 28px;
}

.page-heading h1 {
  font-size: clamp(2.025rem, 3.6vw, 3.06rem);
}

.page-heading--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-heading .lede {
  max-width: 760px;
}

.eyebrow,
.kicker {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 0.66rem;
}

.lede {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.occurrence-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.panel,
.entity-card,
.metric-card,
.notice-card,
.conversation-card,
.notification-card,
.empty-card,
.store-day-banner,
.auth-card {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  margin-bottom: 22px;
}

.panel-heading {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 21px;
  border-bottom: 1px solid var(--border);
}

.panel-heading h2,
.panel-heading p {
  margin-bottom: 0;
}

.panel-heading p {
  color: var(--muted);
  font-size: 0.82rem;
}

.panel--compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.panel--form {
  max-width: 760px;
  padding: 24px;
}

.panel--form-wide {
  max-width: 980px;
}

.form-panel {
  max-width: 980px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-section {
  padding: 25px 27px;
  border-bottom: 1px solid var(--border);
}

.form-section__heading {
  margin-bottom: 20px;
}

.form-section__heading h2 {
  margin-bottom: 4px;
}

.form-section__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.form-grid {
  display: grid;
  gap: 17px;
}

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

.form-section > .field + .field,
.form-section > .field + .form-grid,
.form-section > .form-grid + .field {
  margin-top: 17px;
}

.form-footer {
  display: flex;
  gap: 9px;
  padding: 18px 27px;
  background: #f8fafc;
}

.field--checkbox-card {
  align-self: end;
  min-height: 67px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.field--checkbox-card > label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.field--checkbox-card input {
  flex: 0 0 auto;
}

.choice-field > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-field > div > div label {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.choice-field input {
  flex: 0 0 auto;
}

.choice-field[data-policy-field="stores"] > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field[hidden] {
  display: none;
}

.schedule-summary {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.field--editor .django-quill-widget-container {
  width: 100%;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 600;
  text-decoration: none;
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #4259ee 65%, var(--purple));
  box-shadow: 0 7px 15px rgba(41, 98, 255, 0.18);
}

.button--primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.button--secondary {
  border-color: #cbd8e7;
  color: var(--navy);
  background: #fff;
}

.button--secondary:hover {
  border-color: #96afd0;
  background: #f8fbff;
}

.button--ghost {
  color: var(--muted);
  background: transparent;
}

.button--danger-ghost {
  border-color: #f0ccd1;
  color: var(--negative);
  background: #fff;
}

.button--small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.75rem;
}

.button--wide {
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.inline-form {
  display: inline;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.message {
  padding: 11px 14px;
  border: 1px solid #cbd8e7;
  border-radius: 9px;
  color: var(--navy);
  background: #edf5ff;
}

.message.success {
  border-color: #bfe3d4;
  color: var(--positive);
  background: var(--positive-soft);
}

.message.error {
  border-color: #f0cbd1;
  color: var(--negative);
  background: var(--negative-soft);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  padding: 0;
  overflow: hidden;
}

.dashboard-summary-card__metric {
  position: relative;
  padding: 22px;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.dashboard-summary-card__metric::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: currentColor;
  content: "";
}

.dashboard-summary-card__metric--stores {
  color: var(--blue);
  background: linear-gradient(135deg, #f7faff, var(--blue-soft));
}

.dashboard-summary-card__metric--completion {
  color: var(--positive);
  background: linear-gradient(135deg, #fbfffd, var(--positive-soft));
}

.dashboard-summary-card__metric--overdue {
  color: var(--negative);
  background: linear-gradient(135deg, #fffafb, var(--negative-soft));
}

.dashboard-summary-card__metric--overdue.is-clear {
  color: var(--positive);
  background: linear-gradient(135deg, #fbfffd, var(--positive-soft));
}

.dashboard-summary-card__metric:last-child {
  border-right: 0;
}

.dashboard-summary-card span,
.dashboard-summary-card small,
.dashboard-summary-card strong {
  display: block;
}

.dashboard-summary-card span {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dashboard-summary-card strong {
  margin-bottom: 7px;
  color: currentColor;
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
}

.dashboard-summary-card small {
  color: var(--muted);
}

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

.report-insights h2 {
  margin-top: 0;
}

.report-stat-list {
  display: grid;
  gap: 8px;
}

.report-stat-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.report-stat-list > div:last-child {
  border-bottom: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.metric-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  position: relative;
  min-height: 145px;
  padding: 22px;
  overflow: hidden;
}

.metric-card--primary {
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.17), transparent 90px),
    linear-gradient(135deg, var(--navy), #2458a0);
}

.metric-card::after {
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 90px;
  height: 90px;
  border: 16px solid rgba(116, 83, 232, 0.07);
  border-radius: 50%;
  content: "";
}

.metric-card span,
.metric-card small,
.metric-card strong {
  position: relative;
  z-index: 1;
  display: block;
}

.metric-card > span {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.metric-card--primary > span,
.metric-card--primary small {
  color: #c9dcf3;
}

.metric-card strong {
  margin-bottom: 8px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
}

.metric-card--primary strong {
  color: #fff;
}

.metric-card small {
  color: var(--muted);
}

.positive {
  color: var(--positive) !important;
}

.negative {
  color: var(--negative) !important;
}

.progress,
.mini-progress {
  height: 7px;
  border-radius: 999px;
  background: #e7edf4;
  overflow: hidden;
}

.progress {
  margin-top: 12px;
}

.progress span,
.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--purple));
}

.mini-progress {
  display: inline-block;
  width: 88px;
  margin-right: 8px;
  vertical-align: middle;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap > table {
  min-width: 680px;
}

.table-wrap > .dashboard-table {
  min-width: 720px;
}

.table-wrap > .todo-table {
  min-width: 920px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 17px;
  border-bottom: 1px solid #e7edf4;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  font-size: 0.82rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fbfdff;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.table-link {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75rem;
}

.dot {
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-radius: 50%;
}

.dot--complete {
  background: var(--positive);
}

.dot--progress {
  background: #d3951a;
}

.dot--not-started {
  background: #9aa8b8;
}

.dot--overdue {
  background: var(--negative);
}

.status-pill,
.review-pill,
.scope-chip,
.ref-chip,
.required-label,
.unread-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill {
  padding: 5px 9px;
  color: var(--muted);
  background: #eef2f6;
}

.status-pill--active,
.status-pill--published,
.status-pill--complete {
  color: var(--positive);
  background: var(--positive-soft);
}

.status-pill--in_progress,
.status-pill--draft {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-pill--overdue,
.status-pill--past_due,
.status-pill--removed {
  color: var(--negative);
  background: var(--negative-soft);
}

.status-pill--not_started,
.status-pill--inactive,
.status-pill--archived {
  color: var(--muted);
  background: #eef2f6;
}

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

.entity-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: 20px;
}

.entity-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.entity-card p {
  color: var(--muted);
}

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

.detail-grid div {
  min-width: 0;
}

.detail-grid dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  font-weight: 600;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 19px;
}

.empty-card,
.empty-state {
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-card {
  grid-column: 1 / -1;
}

.stack-form {
  display: grid;
  gap: 17px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > label,
.filter-bar label {
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-size: 0.7rem;
}

.field--checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.field--checkbox label {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #cbd7e4;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.11);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

select[multiple] {
  min-height: 90px;
}

textarea {
  resize: vertical;
}

.errorlist {
  margin: 0;
  padding: 0;
  color: var(--negative);
  font-size: 0.72rem;
  list-style: none;
}

.form-actions {
  display: flex;
  gap: 9px;
  padding-top: 5px;
}

.date-control,
.work-controls,
.direct-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-control a,
.date-control button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 1.4rem;
}

.date-control input {
  width: 155px;
}

.work-controls > select {
  width: 220px;
}

.store-day-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 17px 20px;
  background: linear-gradient(135deg, #fff, #f6f4ff);
}

.store-day-banner h2,
.store-day-banner span {
  margin: 0;
}

.store-day-banner > div:last-child {
  display: grid;
  color: var(--muted);
  text-align: right;
}

.scope-chip {
  padding: 6px 10px;
  color: #563dc1;
  background: var(--purple-soft);
  font-size: 0.75rem;
}

.ref-chip {
  padding: 6px 10px;
  color: #1557b5;
  background: var(--blue-soft);
  font-size: 0.75rem;
}

.document-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.document-index {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 5px;
  padding: 18px;
}

.document-index h2 {
  margin-bottom: 7px;
}

.document-index a {
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: 7px;
  padding: 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.document-index a:hover {
  color: var(--navy);
  background: var(--blue-soft);
}

.document-index a span {
  color: var(--blue);
  font-weight: 700;
}

.document-body {
  padding: 26px;
}

.knowledge-section {
  scroll-margin-top: 90px;
  padding-bottom: 27px;
  border-bottom: 1px solid var(--border);
}

.knowledge-section + .knowledge-section {
  padding-top: 27px;
}

.knowledge-section:last-child {
  border-bottom: 0;
}

.knowledge-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.knowledge-section__head h2 {
  margin: 0;
}

.knowledge-section__head > a {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
}

.rich-content {
  color: #344258;
  font-size: 0.92rem;
  line-height: 1.65;
}

.rich-content p:last-child {
  margin-bottom: 0;
}

.rich-content--compact {
  max-height: 160px;
  overflow: hidden;
  font-size: 0.78rem;
}

.rich-content--preview {
  max-height: 115px;
  overflow: hidden;
}

.builder {
  display: grid;
  gap: 20px;
}

.builder-draft-notice {
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a5f;
  font-size: 0.9rem;
  font-weight: 650;
}

.builder-section {
  margin: 0;
}

.builder-section--inactive {
  border-style: dashed;
  background: #fafafa;
}

.builder-section--deleted {
  border-style: dashed;
  background: #f8fafc;
  color: var(--muted);
}

.builder-section--deleted .table-wrap {
  opacity: 0.58;
}

.builder-row--deleted {
  background: #f8fafc;
  color: var(--muted);
}

.builder-row--deleted td:not(:last-child) {
  opacity: 0.62;
}

.builder-row--deleted .status-pill {
  margin-left: 8px;
}

.knowledge-reference-list {
  display: grid;
  gap: 10px;
}

.builder-section__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.builder-section__meta .kicker {
  margin: 0;
}

.builder-section__actions form {
  display: inline-flex;
}

.checklist-status-card {
  display: grid;
  min-width: 290px;
  gap: 11px;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.checklist-status-card__state,
.checklist-status-card__score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.past-due-indicator {
  color: var(--negative);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.past-due-indicator[hidden] {
  display: none;
}

.checklist-status-card__score {
  align-items: end;
}

.checklist-status-card__score strong {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.checklist-status-card__score small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.checklist-status-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef4;
}

.checklist-status-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  transition: width 180ms ease;
}

.checklist-status-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 0.66rem;
}

.checklist-status-card__details strong {
  color: var(--navy);
}

.checklist-submit-area {
  padding-top: 2px;
  border-top: 1px solid var(--border);
}

.checklist-submit-area [hidden] {
  display: none;
}

.checklist-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 11px;
}

.checklist-action-row form {
  min-width: 0;
}

.checklist-action-row .button {
  width: 100%;
  min-width: 0;
}

.checklist-submit-help {
  display: block;
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.4;
}

.checklist-submit-area .button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.export-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px rgba(12, 35, 66, 0.28);
}

.export-dialog:not([open]) {
  display: none;
}

.export-dialog::backdrop {
  background: rgba(12, 35, 66, 0.56);
  backdrop-filter: blur(2px);
}

.export-dialog__form {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.export-dialog__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.export-dialog__heading h2 {
  margin: 2px 0 0;
  color: var(--navy);
}

.export-dialog__close {
  display: inline-grid;
  width: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-size: 1.35rem;
}

.export-dialog__close:focus-visible,
.export-dialog__choice:has(input:focus-visible) {
  outline: 3px solid rgba(41, 98, 255, 0.18);
  outline-offset: 2px;
}

.export-dialog__choices {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.export-dialog__choices legend {
  margin-bottom: 9px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
}

.export-dialog__choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.export-dialog__choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.export-dialog__choice input {
  margin-top: 2px;
}

.export-dialog__choice strong,
.export-dialog__choice small {
  display: block;
}

.export-dialog__choice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.export-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.checklist-submitted {
  display: grid;
  gap: 3px;
  padding-top: 11px;
}

.checklist-submitted strong {
  color: var(--positive);
  font-size: 0.76rem;
}

.checklist-submitted span {
  color: var(--muted);
  font-size: 0.65rem;
}

.occurrence-status {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.occurrence-status small {
  color: var(--negative);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.save-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -10px 0 14px;
  color: var(--muted);
  font-size: 0.73rem;
}

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--positive);
}

.checklist-grid {
  display: grid;
  grid-template-columns: 52px minmax(210px, 1.7fr) 86px minmax(190px, 1.2fr) minmax(130px, 0.85fr) minmax(125px, 0.8fr) 125px;
}

.checklist-grid--header {
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.checklist-grid--header > div,
.checklist-cell {
  padding: 12px;
  border-right: 1px solid #e7edf4;
  border-bottom: 1px solid #e7edf4;
}

.checklist-grid--header > div:last-child,
.checklist-cell:last-child {
  border-right: 0;
}

.checklist-row:last-child .checklist-cell {
  border-bottom: 0;
}

.checklist-cell {
  min-width: 0;
  font-size: 0.78rem;
}

.checklist-sequence {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.particulars strong {
  display: block;
  margin-bottom: 7px;
}

.required-label {
  padding: 3px 7px;
  color: var(--purple);
  background: var(--purple-soft);
}

.row-save-state {
  display: block;
  margin-top: 8px;
  color: var(--positive);
  font-size: 0.64rem;
}

.row-save-state.is-saving {
  color: var(--warning);
}

.row-save-state.is-error,
.row-save-state.is-conflict {
  color: var(--negative);
}

.answer-cell input,
.answer-cell select,
.answer-cell textarea {
  min-height: 36px;
  padding: 7px 8px;
  font-size: 0.78rem;
}

.checklist-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.check-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.answer-checkboxes {
  display: grid;
  gap: 7px;
}

.answer-checkboxes .check-control {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}

.answer-checkboxes input {
  width: 17px;
  min-height: 17px;
}

.upload-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 9px;
  border: 1px dashed #aebfd2;
  border-radius: 7px;
  color: var(--blue);
  background: #f8fbff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.upload-button--camera {
  border-style: solid;
  color: #fff;
  background: var(--blue);
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.attachment-list {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

.checklist-attachment {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
}

.checklist-attachment:hover {
  border-color: #a9b9cb;
  box-shadow: 0 4px 12px rgba(16, 40, 72, 0.09);
}

.checklist-attachment img,
.checklist-attachment__type {
  width: 48px;
  height: 48px;
  border-radius: 6px;
}

.checklist-attachment img {
  display: block;
  object-fit: cover;
  background: #eef2f7;
}

.checklist-attachment__type {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--purple));
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.checklist-attachment--pdf .checklist-attachment__type {
  background: linear-gradient(135deg, #a5283e, #d65468);
}

.checklist-attachment__name {
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

.reference-popover {
  position: relative;
}

.reference-popover summary {
  list-style: none;
  cursor: pointer;
}

.reference-popover > div {
  position: absolute;
  z-index: 20;
  top: 32px;
  left: 0;
  width: min(340px, 78vw);
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 40, 72, 0.2);
}

.reference-popover > div > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
}

.reference-popover > div > a {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.review-cell {
  display: grid;
  align-content: start;
  gap: 5px;
}

.review-pill {
  padding: 4px 8px;
  color: var(--muted);
  background: #eef2f6;
}

.review-pill--agreed {
  color: var(--positive);
  background: var(--positive-soft);
}

.review-pill--not_agreed {
  color: var(--negative);
  background: var(--negative-soft);
}

.review-pill--not_applicable {
  color: #563dc1;
  background: var(--purple-soft);
}

.review-control {
  display: grid;
  gap: 6px;
}

.review-control label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.review-control select,
.review-control textarea {
  width: 100%;
  font-size: 0.72rem;
}

.review-comment span {
  display: block;
}

.review-comment[hidden] {
  display: none;
}

.audit-cell strong,
.audit-cell small {
  display: block;
}

.audit-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.66rem;
}

.bulk-review select {
  width: 160px;
}

.bulk-review input {
  flex: 1;
}

.filter-bar {
  flex-wrap: wrap;
}

.filter-bar label {
  display: grid;
  gap: 4px;
}

.filter-bar input,
.filter-bar select {
  min-width: 145px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.profile-summary {
  display: grid;
  justify-items: center;
  padding: 28px;
  text-align: center;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  margin-bottom: 13px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  font-size: 1.4rem;
}

.profile-summary h2 {
  margin-bottom: 3px;
}

.profile-summary > p {
  color: var(--muted);
}

.profile-summary .detail-grid {
  width: 100%;
  margin: 12px 0 21px;
  text-align: left;
}

.notice-board-layout {
  display: grid;
  grid-template-columns: minmax(118px, 10%) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.notice-timeline {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  padding: 18px 13px;
}

.notice-timeline > strong {
  display: block;
  margin-bottom: 15px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1rem;
}

.notice-timeline > div {
  display: grid;
  gap: 2px;
  border-left: 2px solid #dce4ee;
}

.notice-timeline a {
  position: relative;
  display: grid;
  padding: 7px 4px 7px 13px;
  color: var(--ink);
}

.notice-timeline a::before {
  position: absolute;
  top: 15px;
  left: -5px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
  content: "";
}

.notice-timeline a:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.notice-timeline a span {
  font-weight: 700;
}

.notice-timeline a small {
  color: var(--muted);
  font-size: 0.62rem;
}

.notice-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.notice-card {
  padding: 21px;
}

.notice-card--wall {
  scroll-margin-top: calc(var(--header-height) + 16px);
  padding: 24px 26px;
}

.notice-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.notice-card__meta strong,
.notice-card__meta small {
  display: block;
}

.notice-card__meta small {
  color: var(--muted);
  font-size: 0.69rem;
}

.notice-card h2 a {
  color: var(--navy);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}

.notice-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.7rem;
}

.notice-attachments {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.notice-attachment {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #f5f7fa;
}

.notice-attachment__media {
  display: block;
  background: #141a24;
}

.notice-attachment__image {
  display: block;
  width: 100%;
  max-height: 520px;
  margin: 0 auto;
  object-fit: contain;
}

.notice-attachment__pdf {
  display: block;
  width: 100%;
  height: clamp(300px, 48vw, 500px);
  border: 0;
  background: #e9edf3;
}

.notice-attachment__file {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 13px;
  padding: 15px;
  color: var(--navy);
}

.notice-attachment__file:hover {
  background: #eef2f7;
}

.notice-attachment__file > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.notice-attachment__file strong {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-attachment__file small {
  color: var(--muted);
  font-size: 0.68rem;
}

.notice-attachment__type {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--purple));
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.notice-attachment figcaption {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
  font-size: 0.7rem;
}

.notice-attachment figcaption span {
  overflow: hidden;
  color: var(--navy);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-attachment figcaption a {
  flex: 0 0 auto;
  font-weight: 700;
}

.notice-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.notice-card__actions button,
.notice-card__actions a {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
}

.notice-card__actions button:hover,
.notice-card__actions a:hover {
  color: var(--navy);
  background: #f5f7fa;
}

.notice-card__actions button.is-selected {
  color: var(--purple);
  background: var(--purple-soft);
}

.feed-comments {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.feed-comment {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
}

.feed-comment .user-avatar {
  width: 30px;
  height: 30px;
}

.feed-comment > div {
  padding: 9px 11px;
  border-radius: 11px;
  background: #f3f6fa;
}

.feed-comment > div > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.feed-comment strong {
  color: var(--navy);
  font-size: 0.74rem;
}

.feed-comment time {
  color: var(--muted);
  font-size: 0.65rem;
}

.feed-comment p {
  margin: 4px 0 0;
  font-size: 0.78rem;
}

.view-all-comments {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.notice-comment-form {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px;
  margin-top: 16px;
}

.notice-comment-form .user-avatar {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
}

.notice-comment-form textarea {
  min-height: 42px;
  max-height: 150px;
  resize: vertical;
}

.notice-comment-form .button {
  align-self: end;
}

.notice-inline-state {
  display: block;
  min-height: 17px;
  margin-top: 5px;
  color: var(--positive);
  font-size: 0.67rem;
  text-align: right;
}

.notice-inline-state.is-error {
  color: var(--negative);
}

.notice-detail {
  padding: 26px;
}

.attachment-block {
  display: block;
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  background: #f7f9fc;
}

.attachment-block h3 {
  margin-bottom: 2px;
}

.attachment-block .notice-attachments {
  margin-bottom: 0;
}

.reaction-bar {
  display: flex;
  gap: 7px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.reaction-bar button {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.reaction-bar button.is-selected {
  border-color: #b9abf7;
  color: var(--purple);
  background: var(--purple-soft);
}

.comments {
  padding: 21px;
}

.comments .panel-heading {
  margin: -21px -21px 0;
}

.comment {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

.comment > div > div {
  display: flex;
  gap: 9px;
}

.comment time {
  color: var(--muted);
  font-size: 0.68rem;
}

.comment p {
  margin: 7px 0;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 9px;
  margin-top: 18px;
}

.comment-form .button {
  align-self: end;
}

.direct-chat-form select {
  width: 240px;
}

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

.conversation-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 16px;
  color: var(--ink);
  transition: border-color 150ms ease, transform 150ms ease;
}

.conversation-card:hover {
  border-color: #aabdda;
  transform: translateY(-1px);
}

.conversation-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--navy), var(--purple));
  font-size: 0.72rem;
}

.conversation-card strong,
.conversation-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.71rem;
}

.unread-pill {
  min-width: 23px;
  justify-content: center;
  padding: 4px 7px;
  color: #fff;
  background: var(--purple);
}

.chat-shell {
  display: grid;
  height: calc(100vh - 134px);
  min-height: 560px;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-heading {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}

.chat-heading .back-link {
  margin-bottom: 9px;
}

.chat-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-heading h1 {
  margin: 0;
  font-size: 1.45rem;
}

.chat-heading small {
  color: var(--muted);
}

.message-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background:
    linear-gradient(rgba(244, 247, 251, 0.88), rgba(244, 247, 251, 0.88)),
    radial-gradient(circle at 10px 10px, #d8e1ed 1px, transparent 1px);
  background-size: auto, 22px 22px;
  overflow-y: auto;
}

.chat-message {
  width: fit-content;
  max-width: min(72%, 620px);
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 4px 13px 13px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(16, 40, 72, 0.04);
}

.chat-message.is-own {
  align-self: flex-end;
  border-color: #cbd9ff;
  border-radius: 13px 4px 13px 13px;
  background: #edf3ff;
}

.chat-message > div {
  display: flex;
  gap: 8px;
}

.chat-message strong {
  color: var(--navy);
  font-size: 0.72rem;
}

.chat-message time {
  color: var(--muted);
  font-size: 0.63rem;
}

.chat-message p {
  margin: 5px 0 0;
  white-space: pre-wrap;
}

.chat-file {
  display: block;
  margin-top: 7px;
  font-size: 0.72rem;
  font-weight: 600;
}

.chat-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.chat-attachment-actions {
  display: flex;
  gap: 5px;
}

.chat-composer textarea {
  max-height: 120px;
  resize: none;
}

.attach-control {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  cursor: pointer;
  font-size: 1.25rem;
}

.attach-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

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

.notification-card {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  text-align: left;
}

.notification-card.is-unread {
  border-color: #b7c9f8;
  background: #f8faff;
}

.notification-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--purple);
  background: var(--purple-soft);
  font-weight: 700;
}

.notification-card strong,
.notification-card small,
.notification-card time {
  display: block;
}

.notification-card small {
  margin-top: 2px;
  color: var(--muted);
}

.notification-card time {
  margin-top: 4px;
  color: #8a98a9;
  font-size: 0.65rem;
}

.auth-page {
  background: #f2f2f0;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 30px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 34px;
}

.login-shell {
  display: grid;
  width: min(980px, 100%);
  grid-template-columns: minmax(360px, 1.05fr) minmax(380px, 0.95fr);
  border-radius: 20px;
  background: #050505;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.login-brand-panel {
  display: grid;
  min-height: 610px;
  place-items: center;
  padding: 55px;
  background: #000;
}

.login-wordmark {
  display: block;
  width: min(100%, 430px);
  height: auto;
}

.login-shell .auth-card {
  display: flex;
  width: auto;
  flex-direction: column;
  justify-content: center;
  padding: 55px 50px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-brand .brand-mark {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border: 1px solid #e0e0dc;
  box-shadow: none;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  color: #101010;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.auth-brand small {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-help {
  display: block;
  margin-top: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.login-shell .auth-card h1 {
  color: #050505;
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  letter-spacing: 0.025em;
}

.muted {
  color: var(--muted);
}

.sidebar-backdrop {
  display: none;
}

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

  .card-grid,
  .conversation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checklist-section {
    overflow-x: auto;
  }

  .checklist-grid {
    min-width: 940px;
  }
}

@media (max-width: 1100px) {
  .has-sidebar .app-column,
  .nav-collapsed.has-sidebar .app-column {
    margin-left: 0;
  }

  .sidebar,
  .nav-collapsed .sidebar {
    width: min(286px, 88vw);
    transform: translateX(-105%);
  }

  .nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-collapsed .sidebar-label,
  .nav-collapsed .nav-badge {
    display: initial;
  }

  .nav-collapsed .sidebar-brand-row {
    justify-content: space-between;
  }

  .nav-collapsed .side-nav a,
  .nav-collapsed .sidebar-footer a {
    justify-content: flex-start;
  }

  .nav-collapsed .sidebar-toggle,
  .sidebar-toggle {
    display: none;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    background: rgba(8, 22, 41, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-button {
    display: grid;
  }

  .site-header {
    padding: 0 18px;
  }

  .page-shell {
    padding: 30px 22px 55px;
  }

  .document-layout {
    grid-template-columns: 1fr;
  }

  .document-index {
    position: static;
  }

  .notice-feed {
    grid-template-columns: 1fr;
  }

  .notice-board-layout {
    grid-template-columns: 1fr;
  }

  .notice-timeline {
    position: static;
    padding: 14px 16px;
  }

  .notice-timeline > strong {
    margin-bottom: 9px;
  }

  .notice-timeline > div {
    display: flex;
    gap: 4px;
    padding: 2px 0;
    border-left: 0;
    overflow-x: auto;
  }

  .notice-timeline a {
    min-width: 72px;
    padding: 7px 9px;
    border-radius: 8px;
    text-align: center;
  }

  .notice-timeline a::before {
    display: none;
  }

  .login-shell {
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  }

  .login-brand-panel {
    padding: 32px;
  }

  .checklist-grid--header {
    display: none;
  }

  .checklist-grid {
    display: block;
    min-width: 0;
    padding: 10px;
  }

  .checklist-row {
    margin: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 5px 13px rgba(16, 40, 72, 0.04);
  }

  .checklist-cell {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid #e7edf4;
  }

  .checklist-cell::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .checklist-sequence {
    text-align: left;
  }

  .checklist-grid.checklist-grid--header {
    display: none;
  }

  .attach-control,
  .upload-button {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 700px) {
  .dashboard-summary-card {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-card__metric {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .dashboard-summary-card__metric:last-child {
    border-bottom: 0;
  }

  h1 {
    font-size: 2.25rem;
  }

  .page-heading h1 {
    font-size: 2.025rem;
  }

  .page-shell {
    padding: 24px 14px 44px;
  }

  .page-heading--split {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading--split > .button,
  .page-heading--split > .button-row {
    align-self: flex-start;
  }

  .header-context span:not(.live-dot):not([aria-current="page"]),
  .user-name {
    display: none;
  }

  .metric-grid,
  .metric-grid--three,
  .card-grid,
  .conversation-grid,
  .two-column,
  .form-grid--two,
  .report-insights {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 21px 18px;
  }

  .form-footer {
    padding: 16px 18px;
  }

  .choice-field[data-policy-field="stores"] > div {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 130px;
  }

  .work-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .work-controls > select {
    width: 100%;
  }

  .date-control {
    width: 100%;
  }

  .date-control input {
    flex: 1;
  }

  .panel--compact,
  .bulk-review,
  .filter-bar,
  .direct-chat-form {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-review select,
  .direct-chat-form select {
    width: 100%;
  }

  .checklist-grid--header {
    display: none;
  }

  .checklist-grid {
    display: block;
    min-width: 0;
    padding: 10px;
  }

  .checklist-row {
    margin: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 5px 13px rgba(16, 40, 72, 0.04);
  }

  .checklist-cell {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid #e7edf4;
  }

  .checklist-cell::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .checklist-sequence {
    text-align: left;
  }

  .chat-shell {
    height: calc(100vh - 105px);
    min-height: 500px;
    margin: -8px -6px 0;
    border-radius: 12px;
  }

  .chat-composer {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .chat-composer > .button {
    grid-column: 2;
    justify-self: end;
  }

  .attach-control,
  .upload-button {
    min-width: 44px;
    min-height: 44px;
  }

  .chat-message {
    max-width: 88%;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .notice-card--wall {
    padding: 20px 17px;
  }

  .notice-comment-form {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .notice-comment-form .button {
    grid-column: 2;
    justify-self: end;
  }

  .auth-shell {
    padding: 16px;
  }

  .auth-card {
    padding: 27px 22px;
  }

  .login-shell {
    display: block;
    border-radius: 16px;
    background: #fff;
  }

  .login-brand-panel {
    min-height: 132px;
    padding: 22px 40px;
  }

  .login-wordmark {
    width: min(100%, 235px);
  }

  .login-shell .auth-card {
    padding: 30px 24px 32px;
  }

  .login-shell .auth-card h1 {
    font-size: 2.5rem;
  }

  .site-header {
    gap: 6px;
    padding-inline: 10px;
  }

  .header-context {
    overflow: hidden;
    white-space: nowrap;
  }

  .header-context [aria-current="page"] {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-cluster {
    gap: 5px;
  }

  .user-menu__trigger {
    width: 40px;
    overflow: hidden;
    padding: 3px;
  }

  .user-menu__trigger > .app-icon {
    display: none;
  }

  .table-wrap--cards {
    overflow: visible;
  }

  .table-wrap--cards > .responsive-card-table {
    display: block;
    min-width: 0;
  }

  .responsive-card-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .responsive-card-table tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .responsive-card-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 13px rgba(16, 40, 72, 0.05);
    overflow: hidden;
  }

  .responsive-card-table tbody tr:hover td {
    background: transparent;
  }

  .responsive-card-table td {
    display: block;
    min-width: 0;
    padding: 11px 13px;
    border: 0;
    overflow-wrap: break-word;
  }

  .responsive-card-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .responsive-card-table td:not([data-label])::before {
    display: none;
  }

  .responsive-card-table [data-cell="identity"],
  .responsive-card-table [data-cell="status"],
  .responsive-card-table [data-cell="action"] {
    grid-column: 1 / -1;
  }

  .responsive-card-table [data-cell="identity"] {
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e7edf4;
  }

  .responsive-card-table [data-cell="identity"] strong {
    color: var(--navy);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }

  .responsive-card-table [data-cell="status"] {
    border-top: 1px solid #edf1f5;
    border-bottom: 1px solid #edf1f5;
  }

  .responsive-card-table [data-cell="action"] {
    padding-top: 2px;
    padding-bottom: 13px;
  }

  .responsive-card-table [data-cell="action"] .button,
  .responsive-card-table [data-cell="action"] .table-link {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd8e7;
    border-radius: 9px;
    background: #fff;
  }

  .responsive-card-table .mini-progress {
    display: block;
    width: 100%;
    margin: 8px 0 5px;
  }

  .dashboard-table [data-cell="count"] {
    grid-column: 1;
    grid-row: 2;
  }

  .dashboard-table [data-cell="completion"] {
    grid-column: 2;
    grid-row: 2;
  }

  .dashboard-table [data-cell="status"] {
    grid-row: 3;
  }

  .dashboard-table [data-cell="action"] {
    grid-row: 4;
  }

  .dashboard-table .status-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px 8px;
  }

  .dashboard-table .status-summary .dot {
    margin-left: 0;
  }

  .todo-table [data-cell="sequence"] {
    display: none;
  }

  .todo-table [data-cell="due"],
  .todo-table [data-cell="review"] {
    align-self: stretch;
  }

  .todo-table [data-cell="answers"],
  .todo-table [data-cell="files"] {
    border-top: 1px solid #edf1f5;
  }

  .responsive-card-table .responsive-card-table__empty {
    display: block;
  }

  .responsive-card-table__empty td {
    width: 100%;
    padding: 26px 18px;
  }
}
