:root {
  --page: #f7f9fc;
  --ink: #172033;
  --muted: #657083;
  --line: #dfe6ef;
  --teal: #0f766e;
  --blue: #2563eb;
  --rose: #be123c;
  --amber: #b45309;
  --green: #15803d;
}

* {
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.65rem clamp(0.75rem, 2vw, 1rem);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand-lockup,
.header-actions,
.context-switcher {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-lockup {
  min-width: 0;
}

.brand-lockup > div:last-child {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.7rem;
  overflow: hidden;
  background: transparent;
  flex: 0 0 auto;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-mark.large {
  width: 4.75rem;
  height: 4.75rem;
  margin: 0 auto 1rem;
}

.brand-title {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
}

.context-line,
.muted,
.section-heading p,
.work-item p,
.module-hero p {
  color: var(--muted);
}

.context-line {
  max-width: min(22rem, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-switcher {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}

.context-switcher .form-select {
  min-width: 0;
  width: 100%;
  max-width: none;
}

.header-actions {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  justify-content: flex-end;
  gap: 0.4rem;
}

.profile-chip span {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.desktop-nav a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav a.active,
.desktop-nav a:hover {
  background: #ecfdf5;
  color: var(--teal);
}

.icon-button,
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.4rem 0.65rem;
  background: #fff;
}

.logout-form {
  margin: 0;
}

.logout-form button {
  font: inherit;
}

.notification-dot {
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
}

.app-main {
  padding-bottom: 5rem;
}

.app-container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1rem;
}

.app-container.narrow {
  width: min(760px, 100%);
}

.global-breadcrumb {
  padding-bottom: 0;
}

.breadcrumbs,
.back-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.breadcrumbs a,
.back-link {
  color: var(--teal);
}

.page-actions,
.row-actions,
.hub-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.row-actions form {
  margin: 0;
}

.qr-row-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.hub-card {
  min-height: 13rem;
}

.hub-card p,
.data-card p {
  margin: 0.4rem 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hub-card-footer {
  justify-content: space-between;
}

.hub-card-footer strong {
  font-size: 1.2rem;
}

.hub-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.search-result,
.activity-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.search-result i,
.activity-row small {
  margin-left: auto;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.filter-bar label > span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-complete,
.status-approved,
.status-closed,
.status-verified {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.status-critical,
.status-overdue,
.status-rejected {
  border-color: #fecdd3;
  background: #fff1f2;
  color: var(--rose);
}

.status-warning,
.status-returned,
.status-submitted_for_verification {
  border-color: #fde68a;
  background: #fffbeb;
  color: var(--amber);
}

.status-muted,
.status-cancelled,
.status-inactive {
  color: var(--muted);
}

.status-operational {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.status-partial,
.status-partially-built,
.status-setup,
.status-setup-required,
.status-planned-not-yet-built {
  border-color: #fde68a;
  background: #fffbeb;
  color: var(--amber);
}

.status-disabled {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--muted);
}

.quick-menu {
  position: relative;
}

.quick-menu summary {
  list-style: none;
}

.quick-menu summary::-webkit-details-marker {
  display: none;
}

.quick-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 30;
  display: grid;
  width: min(24rem, 86vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 16px 34px rgba(23, 32, 51, 0.16);
}

.quick-menu-panel a,
.action-list a,
.module-status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 0.6rem;
  align-items: center;
  padding: 0.55rem;
  color: var(--ink);
}

.quick-menu-panel small {
  grid-column: 2;
  color: var(--muted);
}

.context-summary {
  margin: 0.5rem 0 1rem;
  color: var(--muted);
}

.module-section {
  margin-top: 1.25rem;
}

.status-card {
  min-width: 0;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.split-grid,
.designer-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.action-list {
  display: grid;
  gap: 0.35rem;
}

.action-list a {
  border-bottom: 1px solid var(--line);
}

.status-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}

.status-board div,
.module-status-row {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.status-board div {
  padding: 0.8rem;
}

.status-board span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.module-status-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.module-status-row strong {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.82rem;
}

.studio-actions {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.studio-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 0.65rem;
  align-items: start;
  min-height: 5.25rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
}

.studio-action.primary {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.studio-action span {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.85rem;
}

.compact-actions .studio-action {
  min-height: 4.5rem;
}

.workflow-steps {
  display: grid;
  gap: 0.65rem;
  padding-left: 1.25rem;
}

.workflow-steps li {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.workflow-steps span {
  display: block;
  color: var(--muted);
}

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.tab-strip a {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.clean-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-panel,
.source-banner {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 0.3rem solid var(--blue);
  background: #fff;
}

.setup-grid {
  display: grid;
  gap: 0.55rem;
}

.setup-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  color: var(--muted);
}

.setup-step.complete {
  color: var(--green);
}

.related-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.related-actions a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.related-actions i {
  color: var(--teal);
}

.location-tree,
.detail-panel,
.data-card,
.assignment-card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem;
}

.tree-children {
  margin: 0.45rem 0 0.45rem 1rem;
  padding-left: 1rem;
  border-left: 2px solid #d1fae5;
}

.tree-node,
.tree-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.35rem 0;
}

.tree-row {
  justify-content: space-between;
}

.tree-row-muted {
  border: 1px dashed var(--line);
  border-radius: 0.45rem;
  background: #f8fafc;
  padding-inline: 0.65rem;
}

.tree-row > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.tree-row small {
  color: var(--muted);
}

.qr-print-sheet {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 2rem;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
}

.qr-print-sheet img {
  width: min(18rem, 80vw);
  aspect-ratio: 1;
}

.detail-grid,
.card-grid,
.assignment-grid,
.permission-preview {
  display: grid;
  gap: 0.8rem;
}

.detail-panel h2,
.data-card h2,
.assignment-card h2,
.permission-preview h2 {
  font-size: 1rem;
  font-weight: 800;
}

.detail-panel dl,
.assignment-card dl,
.data-card dl {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.detail-panel dl div,
.assignment-card dl div,
.data-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0;
}

.detail-panel dt,
.assignment-card dt,
.data-card dt {
  color: var(--muted);
  font-weight: 600;
}

.detail-panel dd,
.assignment-card dd,
.data-card dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.permission-row {
  display: flex;
  gap: 0.55rem;
  padding: 0.45rem 0;
  color: var(--muted);
}

.permission-row.granted {
  color: var(--green);
}

.permission-row.high-risk {
  color: #92400e;
}

.permission-row span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.permission-row code {
  display: block;
  color: inherit;
  font-size: 0.72rem;
}

.permission-matrix ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.45rem;
  padding: 0;
  list-style: none;
}

.permission-matrix label {
  display: flex;
  gap: 0.5rem;
  align-items: start;
  min-height: 3rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
}

.access-preview,
.source-banner {
  display: flex;
  gap: 0.75rem;
}

.access-preview {
  padding: 0.75rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}

.access-preview p,
.source-banner p {
  margin: 0.2rem 0 0;
}

.step-strip.labelled span {
  width: auto;
  height: auto;
  min-width: 4.5rem;
  padding: 0.4rem;
}

.step-strip.labelled small {
  margin-left: 0.3rem;
  color: var(--muted);
}

.compliance-app-nav,
.queue-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  overflow-x: visible;
  margin-bottom: 0.65rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.compliance-mobile-nav {
  display: none;
}

.compliance-app-nav a,
.queue-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.compliance-app-nav a.active,
.compliance-app-nav a:hover,
.queue-nav a:hover {
  background: #ecfdf5;
  color: var(--teal);
}

.hierarchy-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.7rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.4rem;
  background: #eff6ff;
  font-size: 0.85rem;
}

.assignment-card {
  display: grid;
  gap: 0.7rem;
}

.assignment-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.progress {
  height: 0.45rem;
}

.progress-bar {
  background: var(--teal);
}

.coverage-table {
  min-width: 76rem;
}

.mobile-module-menu {
  position: relative;
  z-index: 24;
  width: fit-content;
  margin: 0.5rem 1rem 0;
}

.mobile-module-menu summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.12);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  list-style: none;
}

.mobile-module-menu nav {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  display: grid;
  width: min(18rem, 86vw);
  max-height: 60vh;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.16);
}

.mobile-module-menu nav a {
  padding: 0.55rem;
  color: var(--ink);
}

.bottom-nav a.active {
  color: var(--teal);
  font-weight: 800;
}

.form-shell,
.list-panel,
.checkpoint-panel,
.definition-band,
.table-shell {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.form-shell input,
.form-shell select,
.form-shell textarea,
.form-shell .form-control,
.form-shell .form-select {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.table-shell {
  overflow-x: auto;
}

.table-shell table {
  margin: 0;
}

.metric-card {
  display: grid;
  min-height: 6.5rem;
  align-content: center;
  padding: 1rem;
  border-left: 0.3rem solid var(--teal);
  background: #fff;
}

.metric-card strong {
  font-size: 1.75rem;
}

.metric-card span {
  color: var(--muted);
}

.compliance-nav,
.step-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.compliance-nav a,
.step-strip span {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--ink);
}

.step-strip span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 800;
}

.status-strip {
  margin-bottom: 1rem;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  background: #fffbeb;
  color: #92400e;
  padding: 0.65rem 0.8rem;
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 1rem;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
}

.section-heading.compact h2 {
  font-size: 1.25rem;
}

.section-heading p {
  margin: 0.2rem 0 0;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.module-tile {
  position: relative;
  display: grid;
  min-height: 8.8rem;
  grid-template-rows: auto 1fr auto;
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(23, 32, 51, 0.05);
}

.module-tile:hover,
.work-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent, var(--teal)) 45%, var(--line));
}

.module-icon {
  display: grid;
  width: 2.9rem;
  height: 2.9rem;
  place-items: center;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--accent, var(--teal)) 14%, white);
  color: var(--accent, var(--teal));
  font-size: 1.45rem;
}

.module-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.config-errors {
  grid-column: 1 / -1;
  color: #b42318;
  font-size: 0.85rem;
}

.current-image-control {
  display: grid;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.current-image-control img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  border-radius: 6px;
}

.module-label {
  align-self: end;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
}

.module-badge,
.module-pill {
  width: fit-content;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.module-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border-left: 0.35rem solid var(--accent, var(--teal));
  background: #fff;
  border-radius: 0.65rem;
}

.module-hero h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.module-hero p {
  margin: 0.25rem 0 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.9rem;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.metric strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.7rem;
}

.work-list {
  display: grid;
  gap: 0.75rem;
}

.config-list {
  display: grid;
  gap: 0.8rem;
}

.config-row {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, minmax(7rem, 1fr));
  gap: 0.65rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.85rem;
}

.config-row-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.config-row-title h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.config-row-title p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.disabled-row {
  opacity: 0.72;
}

.preview-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.preview-tile {
  pointer-events: none;
}

.work-item {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  padding: 1rem;
}

.work-item h2 {
  margin: 0.35rem 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
}

.work-item p {
  margin: 0;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted);
}

.priority {
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-weight: 700;
}

.priority.low {
  background: #ecfdf5;
  color: var(--green);
}

.priority.normal {
  background: #eff6ff;
  color: var(--blue);
}

.priority.high {
  background: #fff7ed;
  color: var(--amber);
}

.priority.critical {
  background: #fff1f2;
  color: var(--rose);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
}

.status-pill.danger {
  background: #fff1f2;
  color: var(--rose);
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.workflow-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.85rem;
}

.workflow-card span {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--teal);
  font-weight: 900;
}

.workflow-card strong,
.workflow-card small {
  display: block;
}

.workflow-card small {
  color: var(--muted);
}

.workflow-card.active {
  border-color: rgba(15, 118, 110, 0.35);
}

.complaint-public-shell {
  max-width: 52rem;
}

.complaint-public-hero,
.panel-block {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  padding: 1rem;
}

.complaint-public-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.complaint-public-hero h1,
.panel-block h2 {
  margin: 0;
}

.complaint-location-summary {
  min-height: auto;
  margin-bottom: 1rem;
}

.complaint-public-form {
  display: grid;
  gap: 1rem;
}

.two-panel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
  gap: 1rem;
  align-items: start;
}

.complaint-status-form {
  display: grid;
  gap: 0.9rem;
}

.qr-actions {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.empty-state,
.scan-result {
  display: grid;
  place-items: center;
  gap: 0.7rem;
  min-height: 16rem;
  border: 1px dashed var(--line);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

.empty-state i,
.scan-result i {
  color: var(--teal);
  font-size: 2rem;
}

.empty-state.danger i {
  color: var(--rose);
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 0.15rem;
  min-height: 4.2rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.bottom-nav i {
  font-size: 1.2rem;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1rem;
}

.login-shell {
  width: min(27rem, 100%);
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  padding: 2rem;
  box-shadow: 0 16px 48px rgba(23, 32, 51, 0.08);
}

.login-panel h1,
.login-panel p {
  text-align: center;
}

.login-panel input {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.scan-result dl {
  width: min(28rem, 100%);
  margin: 0;
}

.scan-result dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0;
  text-align: left;
}

.scan-result dt {
  color: var(--muted);
  font-weight: 600;
}

.scan-result dd {
  margin: 0;
  font-weight: 800;
}

.scan-form {
  width: min(30rem, 100%);
  text-align: left;
}

@media (min-width: 720px) {
  .app-header {
    grid-template-columns: minmax(12rem, 0.85fr) minmax(18rem, 1.15fr) auto;
  }

  .context-switcher {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 12rem));
    justify-content: start;
  }

  .header-actions {
    grid-column: auto;
    grid-row: auto;
    justify-content: flex-end;
  }

  .launcher-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .work-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .related-actions,
  .detail-grid,
  .card-grid,
  .assignment-grid,
  .permission-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .config-row,
  .preview-form,
  .two-panel-layout {
    grid-template-columns: 1fr;
  }

  .workflow-strip {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) and (max-width: 900px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .context-switcher {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (min-width: 1040px) {
  body {
    --nexus-sidebar-width: 16.25rem;
  }

  .superadmin-sidebar-collapsed {
    --nexus-sidebar-width: 4.5rem;
  }

  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100% - var(--nexus-sidebar-width));
    margin-left: var(--nexus-sidebar-width);
    transition: margin-left 180ms ease, width 180ms ease;
  }

  .context-switcher {
    grid-template-columns: repeat(2, minmax(0, 13rem));
  }

  .desktop-nav {
    display: none;
  }

  .mobile-module-menu {
    display: none;
  }

  .bottom-nav {
    display: none;
  }

  .app-main {
    padding-bottom: 0;
  }

  .launcher-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) and (max-width: 1399px) {
  .context-switcher {
    grid-template-columns: repeat(2, minmax(0, 9.5rem));
  }

  .profile-chip span {
    max-width: 5.75rem;
  }

  .desktop-nav a {
    gap: 0.25rem;
    padding-inline: 0.35rem;
  }
}

@media (max-width: 719px) {
  .app-header {
    position: static;
  }

  .context-switcher .form-select {
    min-width: 0;
    max-width: 100%;
  }

  .header-actions {
    min-width: 0;
    gap: 0.35rem;
  }

  .header-actions .profile-chip,
  .header-actions .profile-chip span {
    min-width: 0;
  }

  .header-actions .profile-chip {
    overflow: hidden;
  }

  .header-actions .profile-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-actions,
  .page-actions .btn,
  .page-actions form,
  .page-actions form .btn {
    width: 100%;
  }

  .hub-search {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .hub-search .btn {
    grid-column: 1 / -1;
  }

  .table-shell {
    max-width: calc(100vw - 2rem);
  }

  .compliance-app-nav,
  .queue-nav {
    display: none;
  }

  .compliance-mobile-nav {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .compliance-mobile-nav details {
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: #fff;
  }

  .compliance-mobile-nav summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
    list-style: none;
  }

  .compliance-mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .compliance-mobile-nav summary::after {
    content: "\f282";
    color: var(--muted);
    font-family: "bootstrap-icons";
    font-size: 0.8rem;
  }

  .compliance-mobile-nav details[open] summary::after {
    content: "\f286";
  }

  .compliance-mobile-nav summary span {
    flex: 1 1 auto;
    min-width: 0;
  }

  .compliance-mobile-nav nav {
    display: grid;
    gap: 0.2rem;
    padding: 0 0.5rem 0.5rem;
  }

  .compliance-mobile-nav nav a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.6rem;
    border-radius: 0.4rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
  }

  .compliance-mobile-nav nav a.active,
  .compliance-mobile-nav nav a:hover {
    background: #ecfdf5;
    color: var(--teal);
  }

  .location-tree {
    overflow-wrap: anywhere;
  }

  .tree-children {
    margin-left: 0.35rem;
    padding-left: 0.5rem;
  }

  .tree-node {
    max-width: 100%;
  }

  .tree-row {
    align-items: flex-start;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .complaint-public-hero,
  .workflow-card {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .context-line {
    max-width: 13rem;
    font-size: 0.84rem;
  }

  .header-actions {
    gap: 0.3rem;
  }

  .header-actions .admin-sidebar-toggle span,
  .header-actions .profile-chip span {
    display: none;
  }

  .icon-button,
  .profile-chip {
    min-height: 2.25rem;
    padding: 0.35rem 0.55rem;
  }
}

.module-state-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.module-state-line code {
  color: var(--nexus-text-muted);
}

.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem 1.5rem;
}

.choice-grid {
  display: grid;
  gap: 0.45rem;
}

.choice-grid label {
  align-items: center;
  display: flex;
  gap: 0.45rem;
}

.signature-pad {
  aspect-ratio: 13 / 4;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 100%;
  touch-action: none;
}

.review-panel {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.review-panel:last-of-type {
  border-bottom: 0;
}

@media print {
  .app-header,
  .bottom-nav,
  .mobile-module-menu,
  .no-print,
  .global-breadcrumb {
    display: none !important;
  }

  .qr-print-sheet {
    border: 0;
  }
}

/* Permanent Platform Super Admin sidebar */
.nexus-admin-layout {
  min-width: 0;
}

.admin-sidebar-toggle {
  justify-content: center;
}

.superadmin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: min(19rem, 88vw);
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #1e293b;
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 18px 0 40px rgba(15, 23, 42, 0.24);
  transform: translateX(-105%);
  transition: width 180ms ease, transform 180ms ease;
}

.superadmin-menu-open .superadmin-sidebar {
  transform: translateX(0);
}

.superadmin-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  background: rgba(15, 23, 42, 0.56);
}

.superadmin-menu-open .superadmin-sidebar-overlay {
  display: block;
}

.superadmin-menu-open {
  overflow: hidden;
}

@media (max-width: 1039px) {
  body:not(.superadmin-menu-open) .superadmin-sidebar {
    display: none;
  }

  .superadmin-menu-open .superadmin-sidebar {
    display: flex;
  }
}

.superadmin-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.78rem 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: #0f172a;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  min-width: 0;
  color: #e2e8f0;
}

.sidebar-brand:hover {
  color: #fff;
}

.sidebar-brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.62rem;
}

.sidebar-brand-copy {
  min-width: 0;
}

.superadmin-sidebar-head strong,
.superadmin-sidebar-head small,
.superadmin-eyebrow {
  display: block;
}

.superadmin-sidebar-head strong {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.12;
}

.superadmin-sidebar-head small {
  margin-top: 0.12rem;
  color: #94a3b8;
  font-size: 0.68rem;
  line-height: 1.32;
}

.superadmin-eyebrow {
  color: #5eead4;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.sidebar-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.35rem;
}

.sidebar-icon-button,
.sidebar-close {
  display: grid;
  width: 2.05rem;
  height: 2.05rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.45rem;
  background: transparent;
  color: #e2e8f0;
}

.sidebar-icon-button:hover,
.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-search {
  display: grid;
  gap: 0.35rem;
  padding: 0.62rem 0.68rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: #0f172a;
}

.sidebar-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sidebar-search-field {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  min-height: 2.2rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.84);
  color: #94a3b8;
}

.sidebar-search-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-size: 0.78rem;
}

.sidebar-search-field input::placeholder {
  color: #94a3b8;
}

.sidebar-search-field input::-webkit-search-cancel-button {
  display: none;
}

.sidebar-search-field button {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: #94a3b8;
}

.sidebar-search-field button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-search-empty {
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 0.4rem;
  color: #fde68a;
  font-size: 0.74rem;
}

.sidebar-quick-create {
  margin: 0.55rem 0.65rem 0.45rem;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 0.55rem;
  background: rgba(15, 118, 110, 0.18);
}

.sidebar-quick-create summary,
.sidebar-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
  list-style: none;
}

.sidebar-quick-create summary::-webkit-details-marker,
.sidebar-group summary::-webkit-details-marker {
  display: none;
}

.sidebar-quick-create summary {
  padding: 0.58rem 0.62rem;
  color: #ccfbf1;
  font-size: 0.76rem;
  font-weight: 800;
}

.sidebar-quick-create summary span {
  margin-right: auto;
}

.sidebar-quick-create[open] summary .bi-chevron-down,
.sidebar-group[open] > summary > .bi-chevron-down {
  transform: rotate(180deg);
}

.sidebar-quick-panel {
  display: grid;
  gap: 0.2rem;
  padding: 0 0.45rem 0.45rem;
}

.sidebar-quick-panel a {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.52rem 0.6rem;
  border-radius: 0.4rem;
  color: #e2e8f0;
  font-size: 0.78rem;
}

.sidebar-quick-panel a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.superadmin-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0.55rem 0.8rem;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
  scrollbar-width: thin;
}

.sidebar-primary-links {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 0.65rem;
}

.sidebar-group {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-group > summary {
  padding: 0.62rem 0.5rem 0.34rem;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-group > summary span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sidebar-group-links {
  display: grid;
  gap: 0.12rem;
  padding-bottom: 0.6rem;
}

.sidebar-link {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.18rem;
  padding: 0.42rem 0.52rem;
  border-radius: 0.42rem;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 650;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(45, 212, 191, 0.13);
  color: #fff;
}

.sidebar-link.active {
  box-shadow: inset 3px 0 #2dd4bf;
}

.sidebar-link > i {
  color: #94a3b8;
  font-size: 0.9rem;
}

.sidebar-link.active > i,
.sidebar-link:hover > i {
  color: #5eead4;
}

.sidebar-note {
  grid-column: 2 / -1;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 500;
}

.sidebar-status,
.sidebar-count {
  min-width: 2.8rem;
  padding: 0.12rem 0.28rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 800;
}

.sidebar-status.status-operational {
  border-color: rgba(74, 222, 128, 0.42);
  color: #86efac;
}

.sidebar-status.status-partially-built,
.sidebar-status.status-setup-required {
  border-color: rgba(251, 191, 36, 0.42);
  color: #fde68a;
}

.sidebar-status.status-planned-not-yet-built,
.sidebar-status.status-disabled {
  color: #94a3b8;
}

.sidebar-count {
  min-width: 1.5rem;
  border-color: rgba(251, 113, 133, 0.45);
  color: #fda4af;
}

.sidebar-legend {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0.35rem 0.65rem;
  padding: 0.65rem 0.75rem 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.64rem;
}

.sidebar-legend strong,
.sidebar-legend small {
  grid-column: 1 / -1;
}

.sidebar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #64748b;
}

.legend-dot.live {
  background: #4ade80;
}

.legend-dot.partial {
  background: #fbbf24;
}

.legend-dot.planned {
  background: #64748b;
}

@media (min-width: 1040px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-header .brand-lockup,
  .app-header .desktop-nav {
    display: none;
  }

  .app-header .context-switcher {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 13rem));
  }

  .nexus-admin-layout {
    display: block;
  }

  .nexus-admin-layout > .app-main {
    min-width: 0;
    margin-left: var(--nexus-sidebar-width);
    transition: margin-left 180ms ease;
  }

  .superadmin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: var(--nexus-sidebar-width);
    height: 100vh;
    box-shadow: none;
    transform: none;
  }

  body:not(.superadmin-sidebar-collapsed) .sidebar-search-focus {
    display: none;
  }

  .superadmin-sidebar-collapsed .superadmin-sidebar {
    width: var(--nexus-sidebar-width);
  }

  .superadmin-sidebar-collapsed .superadmin-sidebar-head {
    display: grid;
    justify-content: center;
    justify-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.48rem;
  }

  .superadmin-sidebar-collapsed .sidebar-brand {
    grid-template-columns: 2.25rem;
    justify-content: center;
  }

  .superadmin-sidebar-collapsed .sidebar-brand-mark {
    width: 2.15rem;
    height: 2.15rem;
  }

  .superadmin-sidebar-collapsed .sidebar-brand-copy,
  .superadmin-sidebar-collapsed .sidebar-search,
  .superadmin-sidebar-collapsed .sidebar-close,
  .superadmin-sidebar-collapsed .sidebar-legend,
  .superadmin-sidebar-collapsed .sidebar-link span,
  .superadmin-sidebar-collapsed .sidebar-link small,
  .superadmin-sidebar-collapsed .sidebar-note,
  .superadmin-sidebar-collapsed .sidebar-status,
  .superadmin-sidebar-collapsed .sidebar-count,
  .superadmin-sidebar-collapsed .sidebar-quick-create summary span,
  .superadmin-sidebar-collapsed .sidebar-quick-create summary .bi-chevron-down,
  .superadmin-sidebar-collapsed .sidebar-group > summary .bi-chevron-down {
    display: none;
  }

  .superadmin-sidebar-collapsed .sidebar-head-actions {
    display: grid;
    gap: 0.45rem;
  }

  .superadmin-sidebar-collapsed .superadmin-nav {
    padding: 0.42rem 0.48rem 0.75rem;
  }

  .superadmin-sidebar-collapsed .sidebar-quick-create {
    margin: 0.48rem;
    border-color: transparent;
    background: transparent;
  }

  .superadmin-sidebar-collapsed .sidebar-quick-create summary,
  .superadmin-sidebar-collapsed .sidebar-group > summary,
  .superadmin-sidebar-collapsed .sidebar-link,
  .superadmin-sidebar-collapsed .sidebar-quick-panel a {
    display: grid;
    grid-template-columns: 1.35rem;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.5rem;
  }

  .superadmin-sidebar-collapsed .sidebar-group > summary {
    color: #94a3b8;
    font-size: 0;
  }

  .superadmin-sidebar-collapsed .sidebar-group > summary span {
    justify-content: center;
  }

  .superadmin-sidebar-collapsed .sidebar-group > summary span i {
    font-size: 0.95rem;
  }

  .superadmin-sidebar-collapsed .sidebar-primary-links {
    padding-bottom: 0.45rem;
  }

  .superadmin-sidebar-collapsed .sidebar-link.active {
    box-shadow: inset 3px 0 #fbbf24;
  }

  .superadmin-sidebar-overlay,
  .sidebar-close,
  .admin-sidebar-toggle {
    display: none !important;
  }

  .superadmin-menu-open {
    overflow: auto;
  }
}

@media (max-width: 1039px) {
  .app-header .admin-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar-collapse-toggle {
    display: none;
  }
}

@media print {
  .superadmin-sidebar,
  .superadmin-sidebar-overlay,
  .admin-sidebar-toggle {
    display: none !important;
  }

  .nexus-admin-layout {
    display: block;
  }
}

/* Functional Checklist Studio */
.studio-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.studio-progress span {
  padding: 0.72rem 0.75rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.8rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.studio-progress span.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.studio-progress span.complete {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.studio-form {
  padding: 0;
  overflow: hidden;
}

.studio-form-section,
.designer-section {
  padding: 1.35rem;
  border-bottom: 1px solid #e5e7eb;
}

.studio-form-section:last-of-type,
.designer-section:last-of-type {
  border-bottom: 0;
}

.studio-form-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.studio-form-heading > span {
  display: inline-flex;
  width: 2.1rem;
  height: 2.1rem;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 900;
}

.studio-form-heading h2,
.designer-section h2 {
  margin: 0;
  font-size: 1.05rem;
}

.studio-form-heading p,
.section-help {
  margin: 0.28rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
}

.new-definition-box {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed #bfdbfe;
  border-radius: 0.85rem;
  background: #f8fbff;
}

.new-definition-box h3 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
}

.studio-field.has-error .form-control,
.studio-field.has-error .form-select {
  border-color: #dc2626;
}

.studio-check {
  margin-top: 2rem;
}

.studio-submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.35rem;
  border-top: 1px solid #dbe4ef;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
}

.designer-section h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.evidence-explainer {
  display: grid;
  gap: 0.25rem;
  align-content: start;
  padding: 0.85rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
}

.evidence-disabled {
  background: #fafafa;
}

.checklist-editor-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.checklist-editor-summary > div {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  background: #fff;
}

.checklist-editor-summary span,
.checklist-editor-summary small {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
}

.checklist-editor-summary strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1rem;
}

.checkpoint-card-list {
  display: grid;
  gap: 0.75rem;
}

.checkpoint-editor-card {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  background: #fff;
}

.checkpoint-order {
  display: inline-flex;
  width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.checkpoint-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.required-chip {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.64rem;
  font-weight: 800;
}

.checkpoint-meta,
.checkpoint-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
  color: #64748b;
  font-size: 0.76rem;
}

.status-muted {
  color: #64748b;
  background: #f1f5f9;
}

.checkpoint-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  max-width: 18rem;
}

.icon-button.danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.phone-preview-shell {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.phone-preview {
  width: min(100%, 28rem);
  overflow: hidden;
  border: 10px solid #111827;
  border-radius: 2rem;
  background: #f8fafc;
  box-shadow: 0 20px 50px rgba(15,23,42,0.18);
}

.phone-preview-head {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem;
  background: #1d4ed8;
  color: #fff;
}

.phone-preview-head span,
.phone-preview-head small {
  opacity: 0.8;
  font-size: 0.72rem;
}

.preview-checkpoint {
  margin: 0.75rem;
  padding: 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  background: #fff;
}

.preview-question {
  display: flex;
  gap: 0.65rem;
}

.preview-question > span {
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.preview-question strong,
.preview-question small {
  display: block;
}

.preview-question em {
  color: #dc2626;
}

.preview-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.preview-control button,
.preview-control input,
.preview-control select,
.preview-control textarea,
.signature-preview {
  min-height: 2.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  background: #fff;
}

.preview-evidence,
.preview-critical {
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.6rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.74rem;
}

.preview-critical {
  background: #fff1f2;
  color: #be123c;
}

.phone-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.phone-actions button {
  padding: 0.75rem;
  border: 0;
  border-radius: 0.65rem;
  background: #e2e8f0;
  font-weight: 800;
}

.phone-actions button:last-child {
  background: #1d4ed8;
  color: #fff;
}

@media (max-width: 900px) {
  .studio-progress {
    grid-template-columns: 1fr;
  }
  .checklist-editor-summary {
    grid-template-columns: 1fr 1fr;
  }
  .checkpoint-editor-card {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }
  .checkpoint-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 540px) {
  .checklist-editor-summary {
    grid-template-columns: 1fr;
  }
  .studio-form-section,
  .designer-section {
    padding: 1rem;
  }
  .studio-submit-bar {
    flex-direction: column-reverse;
  }
  .studio-submit-bar .btn {
    width: 100%;
  }
}


/* Checkpoint Designer compact professional polish */
.checkpoint-designer-page {
  --checkpoint-blue: #2563eb;
  --checkpoint-blue-soft: #eff6ff;
  --checkpoint-line: #dbe4ef;
  --checkpoint-text: #172033;
  --checkpoint-muted: #64748b;
}

.checkpoint-designer-page .checkpoint-designer-heading {
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.checkpoint-designer-heading h1 {
  margin: 0.2rem 0 0.2rem;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.checkpoint-designer-heading p {
  margin-bottom: 0;
  max-width: 48rem;
}

.checkpoint-designer-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.checkpoint-designer-status span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.6rem;
  border: 1px solid var(--checkpoint-line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.checkpoint-designer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 0.85rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.checkpoint-form-alert {
  margin: 0.85rem 1rem 0;
}

.checkpoint-designer .designer-section {
  padding: 0.95rem 1rem;
}

.checkpoint-designer .designer-section + .designer-section {
  border-top: 1px solid #edf1f6;
}

.checkpoint-designer .designer-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.checkpoint-designer .designer-section-icon {
  display: inline-flex;
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 1.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: var(--checkpoint-blue-soft);
  color: var(--checkpoint-blue);
  font-size: 0.92rem;
}

.checkpoint-designer .designer-section-heading h2 {
  margin: 0;
  color: var(--checkpoint-text);
  font-size: 0.98rem;
  line-height: 1.25;
}

.checkpoint-designer .designer-section-heading p {
  margin: 0.15rem 0 0;
  color: var(--checkpoint-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.checkpoint-designer .studio-field {
  min-width: 0;
}

.checkpoint-designer .form-label {
  margin-bottom: 0.27rem;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 750;
}

.checkpoint-designer .form-control,
.checkpoint-designer .form-select {
  min-height: 2.3rem;
  padding: 0.42rem 0.62rem;
  border-color: #cbd5e1;
  border-radius: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.35;
}

.checkpoint-designer textarea.form-control {
  min-height: 4rem;
  max-height: 12rem;
  resize: vertical;
}

.checkpoint-designer #id_text {
  min-height: 5.1rem;
}

.checkpoint-designer #id_guidance,
.checkpoint-designer #id_failure_action {
  min-height: 4rem;
}

.checkpoint-designer #id_options_text {
  min-height: 5rem;
}

.checkpoint-designer .form-text {
  margin-top: 0.23rem;
  color: #718096;
  font-size: 0.7rem;
  line-height: 1.3;
}

.checkpoint-designer .invalid-feedback {
  margin-top: 0.25rem;
  font-size: 0.74rem;
}

.checkpoint-designer .studio-field--toggle {
  display: flex;
  align-items: stretch;
}

.checkpoint-designer .studio-toggle {
  display: flex;
  width: 100%;
  min-height: 3.45rem;
  align-items: flex-start;
  gap: 0.62rem;
  margin: 0;
  padding: 0.62rem 0.7rem;
  border: 1px solid #d8e1ec;
  border-radius: 0.65rem;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.checkpoint-designer .studio-toggle:hover {
  border-color: #93b4e8;
  background: #f4f8ff;
}

.checkpoint-designer .studio-toggle:focus-within {
  border-color: var(--checkpoint-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.checkpoint-designer .studio-toggle-input {
  display: flex;
  flex: 0 0 auto;
  padding-top: 0.08rem;
}

.checkpoint-designer .form-check-input {
  float: none;
  width: 1.05rem;
  min-width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  flex: 0 0 1.05rem;
  border-radius: 0.28rem;
}

.checkpoint-designer .studio-toggle-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.checkpoint-designer .studio-toggle-title {
  color: #263247;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
}

.checkpoint-designer .studio-toggle-help {
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.3;
}

.checkpoint-designer .studio-field-is_mandatory .studio-toggle {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.checkpoint-designer .studio-field-is_critical .studio-toggle {
  border-color: #fed7aa;
  background: #fff7ed;
}

.checkpoint-designer .studio-field-auto_capa .studio-toggle {
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.checkpoint-designer .studio-field-na_allowed .studio-toggle,
.checkpoint-designer .studio-field-na_reason_required .studio-toggle {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.checkpoint-designer .evidence-explainer {
  height: 100%;
  min-height: 4.4rem;
  gap: 0.14rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #f8fafc;
  font-size: 0.72rem;
  line-height: 1.3;
}

.checkpoint-designer .evidence-disabled {
  background: #fcfcfd;
}

.checkpoint-designer .checkpoint-submit-bar {
  gap: 0.55rem;
  padding: 0.7rem 1rem;
}

.checkpoint-designer .checkpoint-submit-bar .btn {
  min-height: 2.25rem;
  padding: 0.42rem 0.78rem;
  font-size: 0.84rem;
  font-weight: 750;
}

@media (max-width: 900px) {
  .checkpoint-designer-page .checkpoint-designer-heading {
    align-items: flex-start;
  }

  .checkpoint-designer-status {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .checkpoint-designer-page .checkpoint-designer-heading {
    gap: 0.55rem;
    margin-bottom: 0.65rem;
  }

  .checkpoint-designer-status {
    width: 100%;
  }

  .checkpoint-designer .designer-section {
    padding: 0.78rem;
  }

  .checkpoint-designer .designer-section-heading {
    margin-bottom: 0.58rem;
  }

  .checkpoint-designer .studio-toggle {
    min-height: 3.2rem;
  }

  .checkpoint-designer .checkpoint-submit-bar {
    padding: 0.65rem 0.78rem;
  }
}

@media (max-width: 575.98px) {
  .checkpoint-designer-status span {
    font-size: 0.7rem;
  }

  .checkpoint-designer .designer-section-heading p {
    font-size: 0.73rem;
  }

  .checkpoint-designer .checkpoint-submit-bar {
    gap: 0.45rem;
  }
}


/* Checkpoint Designer mobile navigation clearance */
@media (max-width: 767.98px) {
  .checkpoint-designer-page {
    padding-bottom: 0;
  }

  .checkpoint-designer-page .compliance-app-nav {
    gap: 0.2rem;
    margin-bottom: 0.45rem;
    padding: 0.28rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .checkpoint-designer-page .compliance-app-nav a {
    padding: 0.34rem 0.44rem;
    font-size: 0.69rem;
    scroll-snap-align: start;
  }

  .checkpoint-designer .checkpoint-submit-bar {
    position: static;
    bottom: auto;
    z-index: 5;
  }
}


/* Milestone 2.2.1 — schedule form UX */
.schedule-builder-page {
  max-width: 1180px;
}

.schedule-page-heading {
  margin-bottom: 1rem;
}

.schedule-builder {
  display: grid;
  gap: 1rem;
}

.schedule-section {
  padding: 1rem;
  border: 1px solid #d9e2ec;
  border-radius: 0.8rem;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.035);
}

.schedule-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8edf3;
}

.schedule-section-heading h2 {
  margin: 0;
  color: #172033;
  font-size: 1rem;
  font-weight: 850;
}

.schedule-section-heading p {
  margin: 0.2rem 0 0;
  color: #667085;
  font-size: 0.76rem;
  line-height: 1.45;
}

.schedule-step {
  display: inline-grid;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 1.7rem;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #2457d6;
  font-size: 0.76rem;
  font-weight: 850;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.schedule-field {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 0.3rem;
}

.schedule-field-wide {
  grid-column: 1 / -1;
}

.schedule-field > label {
  margin: 0;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 800;
}

.schedule-field input:not([type="checkbox"]),
.schedule-field select,
.schedule-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfd8e3;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #172033;
  font-size: 0.82rem;
}

.schedule-field input:focus,
.schedule-field select:focus,
.schedule-field textarea:focus {
  border-color: #4b7bec;
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12);
  outline: 0;
}

.schedule-field [hidden] {
  display: none !important;
}

.schedule-status-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d9e2ec;
  border-radius: 0.6rem;
  background: #f8fafc;
}

.schedule-status-card > div {
  display: grid;
  gap: 0.15rem;
}

.schedule-status-card strong {
  color: #25324a;
  font-size: 0.8rem;
}

.schedule-status-card span {
  color: #667085;
  font-size: 0.7rem;
}

.schedule-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.55rem;
  height: 1.45rem;
  flex: 0 0 auto;
  cursor: pointer;
}

.schedule-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.schedule-switch > span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #98a2b3;
  transition: background 0.15s ease;
}

.schedule-switch > span::after {
  position: absolute;
  top: 0.18rem;
  left: 0.2rem;
  width: 1.08rem;
  height: 1.08rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.24);
  content: "";
  transition: transform 0.15s ease;
}

.schedule-switch input:checked + span {
  background: #2457d6;
}

.schedule-switch input:checked + span::after {
  transform: translateX(1.05rem);
}

.schedule-switch input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.18);
}

.schedule-weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

.schedule-weekday-option {
  position: relative;
  display: grid;
  min-height: 3.25rem;
  place-items: center;
  padding: 0.45rem 0.25rem;
  border: 1px solid #d5dde8;
  border-radius: 0.55rem;
  background: #f8fafc;
  color: #475467;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.schedule-weekday-option input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
}

.schedule-weekday-option:has(input:checked) {
  border-color: #2457d6;
  background: #eef4ff;
  color: #1746b0;
  box-shadow: inset 0 0 0 1px #2457d6;
}

.schedule-weekday-option:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.15);
}

.day-short {
  font-size: 0.78rem;
  font-weight: 850;
}

.day-full {
  color: inherit;
  font-size: 0.62rem;
}

.schedule-preview-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.schedule-occurrence-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.schedule-preview-item {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
  padding: 0.7rem;
  border: 1px solid #d7e0ea;
  border-radius: 0.6rem;
  background: #ffffff;
}

.schedule-preview-item > span {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 999px;
  color: #2457d6;
  background: #eef4ff;
  font-size: 0.68rem;
  font-weight: 850;
}

.schedule-preview-item strong {
  overflow: hidden;
  color: #25324a;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-preview-item small {
  color: #667085;
  font-size: 0.69rem;
}

.schedule-preview-empty {
  grid-column: 1 / -1;
  padding: 0.9rem;
  border: 1px dashed #cfd8e3;
  border-radius: 0.6rem;
  color: #667085;
  background: #ffffff;
  font-size: 0.78rem;
  text-align: center;
}

.schedule-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid #d9e2ec;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(8px);
}

.schedule-error-summary {
  margin-bottom: 1rem;
}

.schedule-error-summary a {
  color: inherit;
  font-weight: 700;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

@media (max-width: 900px) {
  .schedule-occurrence-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .schedule-section {
    padding: 0.8rem;
  }

  .schedule-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-field-wide,
  .schedule-status-card {
    grid-column: auto;
  }

  .schedule-weekday-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .schedule-occurrence-preview {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-form-actions .btn {
    flex: 1 1 auto;
  }
}
