:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --ink: #172033;
  --muted: #637084;
  --line: #d9e1ea;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --blue: #2563eb;
  --amber: #d97706;
  --red: #dc2626;
  --green: #15803d;
  --shadow: 0 14px 40px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.radio-hidden {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.alert {
  border-radius: 8px;
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.success-alert {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #14532d;
}

.error-alert {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

.info-alert {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.plain-fieldset {
  border: 0;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #121a28;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  padding: 18px;
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.session-box small {
  color: #aeb9c8;
  font-size: 0.78rem;
}

.main-nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d8e0ea;
  display: flex;
  gap: 9px;
  min-height: 36px;
  padding: 7px 12px;
  text-align: left;
}

.link-nav {
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-item svg,
button svg {
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.nav-dot {
  background: var(--red);
  border: 2px solid #121a28;
  border-radius: 999px;
  height: 11px;
  margin-left: auto;
  width: 11px;
}

.session-box {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: auto;
  padding-top: 10px;
}

.session-box span,
.session-box strong,
.session-box small {
  display: block;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-link {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f8fafc;
  display: inline-flex;
  gap: 8px;
  margin-top: 8px;
  min-height: 34px;
  padding: 7px 10px;
  text-decoration: none;
}

.session-link.active,
.session-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.account-toggle {
  display: none;
}

.session-message-button {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f8fafc;
  display: none;
  gap: 8px;
  margin-top: 8px;
  min-height: 34px;
  padding: 7px 10px;
  position: relative;
}

.session-message-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.message-dot {
  background: var(--red);
  border: 2px solid #121a28;
  border-radius: 999px;
  height: 12px;
  position: absolute;
  right: 6px;
  top: 5px;
  width: 12px;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar,
.screen-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--primary);
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.65rem, 2vw, 2.35rem);
  line-height: 1.1;
}

h2 {
  font-size: 1.03rem;
}

h3 {
  font-size: 0.98rem;
}

.top-actions,
.search-row,
.save-bar {
  align-items: center;
  display: flex;
  gap: 10px;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: inherit;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.icon-button:hover {
  background: #f1f5f9;
}

.pending-center {
  position: relative;
}

.pending-toggle {
  position: relative;
}

.pending-alert-dot {
  background: var(--red);
  border: 2px solid #ffffff;
  border-radius: 50%;
  height: 11px;
  position: absolute;
  right: 5px;
  top: 4px;
  width: 11px;
}

.pending-popover {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 12px;
  padding: 14px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(430px, calc(100vw - 32px));
  z-index: 80;
}

.pending-popover[hidden],
.live-notification[hidden] {
  display: none;
}

.pending-popover-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.pending-popover-header strong {
  display: block;
  margin-top: 2px;
}

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

.pending-summary span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-size: 0.75rem;
  gap: 2px;
  padding: 8px;
  text-align: center;
}

.pending-summary b {
  color: var(--ink);
  font-size: 1rem;
}

.pending-list {
  display: grid;
  gap: 6px;
  max-height: 330px;
  overflow-y: auto;
}

.pending-item {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 9px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 10px;
  text-decoration: none;
}

.pending-item:hover {
  background: #e6f1ef;
  border-color: #bddbd6;
}

.pending-item svg {
  color: var(--primary);
  height: 19px;
  margin-top: 1px;
  width: 19px;
}

.pending-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pending-item small,
.pending-item em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  overflow-wrap: anywhere;
}

.pending-item em {
  color: var(--primary-dark);
  font-weight: 700;
}

.pending-empty {
  color: var(--muted);
  padding: 12px;
  text-align: center;
}

.live-notification {
  align-items: center;
  background: #ffffff;
  border: 1px solid #86d8cc;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 10px;
  grid-template-columns: 24px minmax(0, 1fr) 38px;
  max-width: 420px;
  padding: 10px 10px 10px 12px;
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 120;
}

.live-notification > svg {
  color: var(--primary);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.home-layout {
  display: grid;
  gap: 16px;
  max-width: 980px;
}

.home-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.home-hero h2 {
  font-size: 1.55rem;
  margin: 4px 0 8px;
}

.home-hero p {
  color: var(--muted);
  line-height: 1.45;
}

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

.home-action {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  text-align: left;
}

.home-action:hover {
  border-color: #b8c6d6;
  box-shadow: var(--shadow);
}

.home-action svg {
  color: var(--primary);
  height: 28px;
  width: 28px;
}

.home-action strong {
  font-size: 1.15rem;
}

.home-action span {
  color: var(--muted);
  line-height: 1.35;
}

.primary-home-action {
  background: #e6f1ef;
  border-color: #bddbd6;
}

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

.home-summary article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.home-summary span,
.home-tool-list button {
  color: var(--muted);
}

.home-summary strong {
  display: block;
  font-size: 1.65rem;
  margin-top: 4px;
}

.home-dashboard {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pie-stat-card {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 142px minmax(0, 1fr);
}

.pie-chart-wrap {
  display: grid;
  justify-items: center;
}

.pie-chart {
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(var(--pie));
  border-radius: 50%;
  display: grid;
  justify-items: center;
  position: relative;
  width: 136px;
}

.pie-chart::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  inset: 28px;
  position: absolute;
}

.pie-chart span {
  color: var(--ink);
  font-size: 1.7rem;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.pie-stat-info {
  min-width: 0;
}

.pie-stat-info h2 {
  font-size: 1.08rem;
  margin: 3px 0 6px;
}

.pie-stat-info p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.pie-legend {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.pie-legend li {
  display: grid;
  gap: 2px 8px;
  grid-template-columns: 12px minmax(0, 1fr);
}

.legend-color {
  background: var(--legend-color);
  border-radius: 999px;
  grid-row: span 2;
  height: 12px;
  margin-top: 4px;
  width: 12px;
}

.pie-legend strong {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.pie-legend small {
  color: var(--muted);
  font-size: 0.82rem;
}

.home-tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-tool-list button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
}

.quick-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.simplified-layout {
  grid-template-columns: minmax(0, 900px);
  max-width: 920px;
}

.simplified-layout .optional-search,
.simplified-layout .right-rail {
  display: none;
}

.simplified-layout .panel {
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
}

.fast-form {
  display: grid;
  gap: 16px;
}

.panel,
.table-wrap,
.metric,
.org-card,
.column {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title.slim {
  margin-bottom: 12px;
}

.panel-title h2 {
  flex: 1;
}

.step {
  align-items: center;
  background: #dff5f2;
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span {
  color: #39465a;
  font-size: 0.86rem;
  font-weight: 700;
}

.field.full {
  width: 100%;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  line-height: 1.4;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.form-grid.two > .full {
  grid-column: 1 / -1;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.choice {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  white-space: nowrap;
}

.primary-button {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  background: #e6f1ef;
  border: 1px solid #bddbd6;
  color: var(--primary-dark);
  font-weight: 800;
}

.ghost-button {
  background: #ffffff;
  border: 1px solid var(--line);
  color: #263347;
}

.danger-button {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-weight: 800;
}

.danger-button:hover {
  background: #fecaca;
}

.small {
  min-height: 38px;
  padding: 8px 12px;
}

.compact {
  min-height: 34px;
  padding: 7px 10px;
}

.person-result {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px;
}

.person-result strong,
.person-result span {
  display: block;
}

.person-result span {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 3px;
}

.person-mode-actions,
.record-type-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.record-type-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  margin-top: 12px;
}

.mode-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  min-height: 72px;
  padding: 16px;
  text-align: left;
}

.mode-button svg {
  color: var(--primary);
  height: 24px;
  width: 24px;
}

.mode-button span {
  font-size: 1rem;
  font-weight: 800;
}

.mode-button:hover,
.mode-button.active {
  background: #e6f1ef;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.person-mode-panel {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.person-mode-panel[hidden] {
  display: none;
}

.selected-person {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #14532d;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr);
  margin-top: 10px;
  padding: 10px 12px;
}

.selected-person > div {
  display: grid;
  gap: 4px;
}

.selected-person span {
  color: var(--ink);
}

.selected-person-location {
  border-left: 1px solid #bbf7d0;
  padding-left: 16px;
}

.selected-person-location small {
  color: var(--muted);
}

.migration-option {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.migration-toggle {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.migration-toggle input {
  height: 22px;
  margin: 0;
  width: 22px;
}

.migration-toggle span {
  display: grid;
  gap: 2px;
}

.migration-toggle small {
  color: var(--muted);
}

.migration-fields {
  margin-top: 12px;
}

.migration-fields[hidden],
.migration-option[hidden] {
  display: none;
}

.substance-option {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 12px;
}

.substance-fields {
  display: grid;
  gap: 12px;
}

.substance-fields[hidden] {
  display: none;
}

.substance-label {
  color: var(--ink);
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.substance-choice-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.substance-choice {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
}

.substance-choice input {
  accent-color: var(--primary);
  flex: 0 0 auto;
  height: 18px;
  margin: 0;
  width: 18px;
}

.substance-choice span {
  font-weight: 700;
}

.substance-choice.compact {
  min-width: 120px;
}

.substance-question {
  display: grid;
  gap: 8px;
}

.substance-reason-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.document-upload-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 12px;
}

.document-upload-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.document-upload-header strong,
.document-upload-header span {
  display: block;
}

.document-upload-header span {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 2px;
}

.document-upload-header .document-counter {
  color: #475569;
  flex: 0 0 auto;
  margin: 0;
}

.document-upload-composer {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.6fr) minmax(190px, 1fr);
  padding: 12px;
}

.document-upload-composer .field.full,
.document-composer-actions {
  grid-column: 1 / -1;
}

.document-composer-actions {
  display: flex;
  justify-content: flex-end;
}

.document-feedback {
  color: var(--muted);
  font-size: 0.86rem;
  min-height: 20px;
  margin: -4px 0 0;
}

.document-feedback.is-error {
  color: #b91c1c;
  font-weight: 700;
}

.document-feedback.is-success {
  color: #047857;
}

.document-list-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.document-empty {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.document-empty[hidden] {
  display: none;
}

.document-upload-list {
  display: grid;
  gap: 8px;
}

.document-list-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(0, 1fr) 40px;
  padding: 9px 10px;
}

.document-item-number {
  align-items: center;
  background: #dff4f1;
  border-radius: 50%;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.document-item-details {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.document-item-details strong,
.document-item-details span,
.document-item-details small {
  overflow-wrap: anywhere;
}

.document-item-details span,
.document-item-details small {
  color: var(--muted);
}

.document-item-details span {
  font-size: 0.88rem;
}

.document-item-details small {
  font-size: 0.8rem;
}

.document-item-remove {
  height: 40px;
  padding: 0;
  width: 40px;
}

@media (max-width: 680px) {
  .selected-person {
    grid-template-columns: 1fr;
  }

  .selected-person-location {
    border-left: 0;
    border-top: 1px solid #bbf7d0;
    padding-left: 0;
    padding-top: 10px;
  }

  .document-upload-header {
    align-items: flex-start;
  }

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

  .document-composer-actions .secondary-button {
    width: 100%;
  }
}

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

.choice {
  background: #ffffff;
  border: 1px solid var(--line);
  color: #263347;
  cursor: pointer;
  font-weight: 700;
  min-width: 0;
  white-space: normal;
}

.choice:hover,
.choice.active {
  background: #e6f1ef;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.save-bar {
  background: rgba(244, 247, 251, 0.92);
  border-top: 1px solid var(--line);
  bottom: 0;
  justify-content: flex-end;
  padding: 12px 0 0;
  position: sticky;
}

.simplified-layout .save-bar {
  background: transparent;
  border-top: 0;
  justify-content: flex-start;
  padding: 2px 0 0;
  position: static;
}

.simplified-layout .save-bar .primary-button {
  min-width: 260px;
}

.right-rail {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.summary-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.summary-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.summary-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.summary-list dd {
  margin: 0;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
}

.urgent {
  background: #fee2e2;
  color: var(--red);
}

.warning {
  background: #fff3d6;
  color: var(--amber);
}

.info {
  background: #dbeafe;
  color: var(--blue);
}

.success {
  background: #dcfce7;
  color: var(--green);
}

.neutral {
  background: #f1f5f9;
  color: #475569;
}

.timeline {
  counter-reset: event;
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  border-left: 3px solid var(--line);
  padding-left: 12px;
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline span {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 3px;
}

.queue-panel {
  display: grid;
  gap: 10px;
}

.queue-item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}

.queue-item span {
  color: var(--muted);
}

.screen-heading h2 {
  font-size: 1.45rem;
}

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

.column {
  box-shadow: none;
  min-height: 340px;
  padding: 14px;
}

.column h3 {
  margin-bottom: 12px;
}

.case-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
}

.case-card.danger {
  border-left-color: var(--red);
}

.case-card.done {
  border-left-color: var(--green);
}

.case-card p {
  color: #3b4657;
}

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

.enc-list {
  display: grid;
  gap: 14px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-tabs .ghost-link {
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
}

.filter-tabs .ghost-link.active {
  background: #e6f1ef;
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 800;
}

.demand-filter {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.8fr) minmax(140px, 0.7fr) minmax(180px, 1fr) auto auto;
  margin-bottom: 14px;
}

.report-filter {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) auto;
  margin-bottom: 16px;
}

.enc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.enc-card.danger {
  border-left-color: var(--red);
}

.demand-card {
  border-left-color: var(--primary);
}

.demand-card.demand-urgency-alta {
  border-left-color: var(--red);
}

.demand-card.demand-urgency-media {
  border-left-color: var(--amber);
}

.demand-card.demand-urgency-baixa {
  border-left-color: #94a3b8;
}

.demand-card-body {
  display: grid;
  gap: 10px;
}

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

.demand-mini-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}

.demand-mini-grid dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.demand-mini-grid dd {
  color: #263347;
  margin: 3px 0 0;
}

.quick-complete-form {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto;
  padding-top: 12px;
}

.demand-forward-details {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
}

.demand-forward-details summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 12px;
}

.demand-forward-form {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.enc-main {
  display: grid;
  gap: 8px;
}

.enc-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.enc-head strong,
.enc-head span,
.enc-main small {
  display: block;
}

.enc-head span,
.enc-main small {
  color: var(--muted);
}

.enc-badges,
.enc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.enc-actions form {
  margin: 0;
}

.enc-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.empty-card {
  display: grid;
  gap: 6px;
}

.people-search {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  margin-bottom: 14px;
}

.ghost-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #263347;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  text-decoration: none;
}

.profile-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

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

.priority-panel {
  margin-bottom: 18px;
}

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

.open-demand-item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.open-demand-item strong,
.open-demand-item span {
  display: block;
}

.open-demand-item span,
.note-panel p {
  color: var(--muted);
}

.note-panel p {
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
}

.profile-form {
  display: grid;
  gap: 12px;
}

.profile-form .field.full {
  margin-top: 12px;
}

.profile-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.profile-save {
  justify-content: flex-start;
  position: static;
}

.password-panel {
  max-width: 620px;
}

.password-prompt-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.62);
  display: grid;
  inset: 0;
  padding: 18px;
  position: fixed;
  z-index: 50;
}

.password-prompt-dialog {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.28);
  margin: 0 auto;
  max-width: 480px;
  padding: 22px;
  width: 100%;
}

.password-prompt-step {
  display: grid;
  gap: 14px;
}

.password-prompt-step[hidden] {
  display: none;
}

.password-prompt-step h2,
.password-prompt-step p {
  margin: 0;
}

.password-prompt-step p {
  color: var(--muted);
  line-height: 1.45;
}

.modal-icon {
  align-items: center;
  background: #dff5f2;
  border-radius: 8px;
  color: #0f766e;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.modal-actions button {
  min-width: 150px;
}

.profile-history {
  margin-top: 18px;
}

.flat-table {
  box-shadow: none;
  margin-top: 0;
}

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

.management-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.management-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.management-tab.active {
  background: #0f8a7c;
  color: #fff;
}

.management-panel[hidden] {
  display: none;
}

.management-form {
  display: grid;
  gap: 14px;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.readonly-field input[disabled] {
  background: #f8fafc;
  color: #475569;
}

.management-section {
  margin-top: 18px;
}

.user-list-filters {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.user-filter-clear {
  min-height: 44px;
}

.user-filter-result {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

[data-user-filter-empty] td {
  padding: 24px 16px;
  color: #64748b;
  text-align: center;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.management-form .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.legacy-org-grid,
#view-organizacoes .screen-heading .primary-button {
  display: none;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
}

th {
  background: #f8fafc;
  color: #3a4658;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.metrics,
.org-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.access-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-settings-panel {
  display: grid;
  gap: 16px;
}

.system-setting-list {
  border: 1px solid var(--line);
}

.system-setting-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 0.4fr) minmax(0, 1fr);
  padding: 12px 14px;
}

.system-setting-row:last-child {
  border-bottom: 0;
}

.system-setting-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.system-setting-row strong,
.system-metrics .metric strong {
  overflow-wrap: anywhere;
}

.message-screen-heading {
  align-items: center;
}

.simulation-banner {
  align-items: center;
  background: #fff7d6;
  border: 1px solid #e7c75f;
  border-radius: 8px;
  color: #5f4700;
  display: flex;
  font-size: 0.88rem;
  font-weight: 900;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 44px;
  padding: 10px 13px;
  text-transform: uppercase;
}

.simulation-banner.compact {
  margin: 14px 0 0;
}

.simulation-banner svg {
  flex: 0 0 auto;
  height: 20px;
  width: 20px;
}

body:not([data-current-view="inicio"]) [data-home-new-button] {
  display: none !important;
}

.message-screen-heading > div {
  display: grid;
  gap: 3px;
}

.message-center {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  min-height: 620px;
}

.message-inbox-panel,
.message-content-panel {
  min-width: 0;
}

.message-inbox-panel {
  overflow: hidden;
  padding: 0;
}

.message-filter-tabs {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px;
}

.message-filter-tabs a {
  align-items: center;
  border: 1px solid transparent;
  color: var(--muted);
  display: flex;
  font-size: 0.84rem;
  font-weight: 800;
  gap: 6px;
  justify-content: center;
  min-height: 38px;
  padding: 7px 8px;
  text-decoration: none;
}

.message-filter-tabs a:hover,
.message-filter-tabs a.active {
  background: #e6f1ef;
  border-color: #bddbd6;
  color: var(--primary-dark);
}

.message-filter-tabs b {
  align-items: center;
  background: var(--red);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.7rem;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 5px;
}

.message-list {
  display: grid;
}

.message-list-item {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  text-decoration: none;
}

.message-list-item:last-child {
  border-bottom: 0;
}

.message-list-item:hover,
.message-list-item.active {
  background: #e6f1ef;
}

.message-list-item.active {
  box-shadow: inset 4px 0 0 var(--primary);
}

.message-list-item.unread {
  background: #fff8f7;
}

.message-list-heading {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.message-list-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list-heading time {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.72rem;
}

.message-list-item small,
.message-list-item em {
  color: var(--muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list-item em {
  font-style: normal;
}

.message-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list-footer {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.message-list-footer b,
.read-status {
  color: #526174;
  font-size: 0.74rem;
  font-weight: 800;
}

.message-list-footer b.read,
.read-status.read {
  color: var(--green);
}

.message-list-footer b.unread-status,
.read-status.unread {
  color: var(--red);
}

.unread-indicator {
  background: var(--red);
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.message-list-empty,
.message-welcome {
  align-content: center;
  color: var(--muted);
  display: grid;
  justify-items: center;
  min-height: 260px;
  padding: 28px;
  text-align: center;
}

.message-list-empty svg,
.message-welcome svg {
  color: var(--primary);
  height: 36px;
  margin-bottom: 10px;
  width: 36px;
}

.message-list-empty strong,
.message-welcome strong {
  color: var(--ink);
}

.message-list-empty span,
.message-welcome p {
  margin-top: 5px;
}

.message-content-panel {
  display: flex;
  flex-direction: column;
}

.message-content-heading,
.message-thread-heading {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.message-thread-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.message-thread-heading h2,
.message-content-heading h2 {
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

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

.message-form,
.message-reply-form {
  display: grid;
  gap: 12px;
}

.message-form {
  max-width: 720px;
}

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

.message-recipient-choice {
  justify-content: flex-start;
  min-height: 52px;
  width: 100%;
}

.message-recipient-choice svg {
  color: var(--primary);
  height: 22px;
  width: 22px;
}

[data-forward-user-field][hidden] {
  display: none;
}

.forward-destination-manager {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.forward-availability-suggestions,
.forward-availability-summary {
  background: #f8fbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.forward-availability-suggestions[hidden],
.forward-availability-summary[hidden] {
  display: none;
}

.forward-city-hint {
  color: #0f766e;
  font-size: 0.88rem;
  font-weight: 700;
  margin: -2px 0 0;
}

.forward-availability-header {
  display: grid;
  gap: 3px;
}

.forward-availability-header small,
.forward-availability-summary p,
.forward-availability-summary small,
.forward-availability-card small,
.forward-availability-card span,
.forward-availability-empty {
  color: var(--muted);
}

.forward-availability-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.forward-availability-card {
  background: #ffffff;
  border: 1px solid #cfe3df;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 12px;
  text-align: left;
}

.forward-availability-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.forward-availability-card strong {
  font-size: 0.96rem;
}

.forward-availability-card span {
  font-size: 0.78rem;
  font-weight: 700;
}

.forward-availability-empty {
  margin: 0;
}

.forward-availability-summary.success {
  border-color: #b9ddd2;
}

.forward-availability-summary.danger {
  border-color: #efc7c7;
}

.forward-availability-summary.neutral {
  border-color: #d7dee7;
}

.forward-availability-top {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.forward-availability-top strong {
  color: var(--text);
  display: block;
}

.forward-availability-top small {
  display: block;
  margin-top: 2px;
}

.forward-availability-summary p {
  margin: 0;
}

.forward-availability-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.forward-availability-metrics div {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 72px;
  padding: 10px 12px;
}

.forward-availability-metrics span {
  color: var(--muted);
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.forward-availability-metrics strong {
  color: var(--text);
  font-size: 1.25rem;
}

.forward-availability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.forward-recipient-choice {
  justify-content: flex-start;
  min-height: 52px;
  width: 100%;
}

.forward-recipient-choice svg {
  color: var(--primary);
  height: 22px;
  width: 22px;
}

[data-message-user-field][hidden] {
  display: none;
}

.message-form-actions,
.message-reply-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.message-thread {
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  margin-bottom: 16px;
}

.message-bubble {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  max-width: 76%;
  padding: 12px;
}

.message-bubble.mine {
  background: #e6f1ef;
  border-color: #bddbd6;
  justify-self: end;
}

.message-bubble.theirs {
  background: #ffffff;
  justify-self: start;
}

.message-bubble-head {
  display: grid;
  gap: 2px;
}

.message-bubble-head small {
  color: var(--muted);
}

.message-bubble p {
  white-space: pre-wrap;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-attachments a,
.message-attachment-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary-dark);
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  min-height: 40px;
  padding: 7px 10px;
  text-decoration: none;
}

.message-attachment-button {
  position: relative;
}

.message-attachment-button input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.message-selected-file {
  color: var(--muted);
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-top: 5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-selected-file.has-file {
  color: var(--primary-dark);
}

.message-reply-attachment {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.message-reply-attachment .message-selected-file {
  margin-top: 0;
  max-width: 280px;
}

.message-reply-form {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.message-mobile-back {
  display: none;
}

.flat-table td strong,
.flat-table td small {
  display: block;
}

.flat-table td small {
  color: var(--muted);
  margin-top: 3px;
}

.metric,
.org-card {
  box-shadow: none;
  display: grid;
  gap: 6px;
  padding: 16px;
}

.metric span,
.org-card span {
  color: var(--muted);
  font-weight: 700;
}

.metric strong {
  font-size: 2rem;
}

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

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

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

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

.report-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 14px;
}

.report-row span {
  color: #263347;
  font-weight: 700;
}

.report-row strong {
  color: var(--primary-dark);
  font-size: 1.25rem;
}

.bar-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 140px minmax(120px, 1fr) 42px;
}

.bar-row div {
  background: var(--surface-2);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.bar-row b {
  background: var(--primary);
  display: block;
  height: 100%;
}

.toast {
  background: #111827;
  border-radius: 8px;
  bottom: 20px;
  box-shadow: var(--shadow);
  color: #ffffff;
  left: 50%;
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 14px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.logout-form {
  margin-top: 8px;
}

.logout-form button {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f8fafc;
  display: inline-flex;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
}

.login-page {
  background: #eef3f8;
}

.login-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 20px;
}

.login-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 480px;
  padding: 26px;
  width: 100%;
}

.login-brand {
  color: var(--ink);
  margin-bottom: 28px;
}

.login-brand span {
  color: var(--muted);
}

.login-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-credentials {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.login-form input:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.check-row {
  align-items: center;
  color: #39465a;
  display: flex;
  gap: 9px;
  font-size: 0.92rem;
}

.check-row input {
  min-height: auto;
  width: auto;
}

.forward-toggle {
  margin-bottom: 14px;
}

.login-button {
  width: 100%;
}

.login-help {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 16px;
}

@media (max-width: 1180px) {
  .quick-layout {
    grid-template-columns: 1fr;
  }

  .right-rail {
    position: static;
  }

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

  .profile-side {
    position: static;
  }

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

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 14px;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 14px;
    position: static;
  }

  .main-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .session-box {
    margin-top: 0;
    padding-top: 12px;
  }

  .workspace {
    padding: 16px;
  }

  .topbar,
  .screen-heading,
  .enc-head,
  .person-result,
  .search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .save-bar {
    width: 100%;
  }

  .top-actions > *,
  .save-bar > *,
  .enc-actions > *,
  .search-row > button {
    flex: 1;
  }

  .choice-grid,
  .demand-filter,
  .demand-mini-grid,
  .form-grid.two,
  .kanban,
  .management-grid,
  .metrics,
  .person-summary,
  .person-mode-actions,
  .record-type-actions,
  .people-search,
  .report-filter,
  .substance-choice-grid,
  .org-grid {
    grid-template-columns: 1fr;
  }

  .open-demand-item {
    align-items: stretch;
    flex-direction: column;
  }

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

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

body.mobile-device {
  font-size: 16px;
}

body.mobile-device .app-shell {
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

body.mobile-device .sidebar {
  align-content: start;
  display: grid;
  gap: 6px;
  grid-template-areas:
    "brand nav"
    "session session";
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 30;
}

body.mobile-device .brand {
  grid-area: brand;
}

body.mobile-device .brand > div:not(.brand-mark) {
  display: none;
}

body.mobile-device .brand-mark {
  height: 36px;
  width: 36px;
}

body.mobile-device .main-nav {
  align-items: center;
  display: flex;
  gap: 6px;
  grid-area: nav;
  overflow-x: auto;
  padding-bottom: 0;
  scrollbar-width: thin;
}

body.mobile-device .nav-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
  font-size: 0.9rem;
  min-height: 38px;
  padding: 7px 10px;
}

body.mobile-device .nav-item svg,
body.mobile-device button svg {
  height: 20px;
  width: 20px;
}

body.mobile-device .session-box {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 4px 6px;
  grid-area: session;
  grid-template-areas: "unit user messages toggle";
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  margin-top: 0;
  min-height: 42px;
  padding: 5px 6px;
}

body.mobile-device .session-box span {
  color: #cbd5e1;
  font-size: 0.72rem;
  grid-area: unit;
  line-height: 1.2;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-device .session-box strong {
  color: #ffffff;
  font-size: 0.82rem;
  grid-area: user;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-device .session-box small {
  display: none;
}

body.mobile-device .account-toggle {
  align-items: center;
  background: #243044;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  gap: 6px;
  grid-area: toggle;
  justify-content: center;
  min-height: 32px;
  padding: 5px 8px;
}

body.mobile-device .session-message-button {
  align-items: center;
  background: #243044;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  grid-area: messages;
  justify-content: center;
  margin: 0;
  min-height: 32px;
  padding: 5px 8px;
}

body.mobile-device .session-message-button .message-button-label {
  display: none;
}

body.mobile-device .session-message-button .message-dot {
  border-color: #243044;
  right: 4px;
  top: 3px;
}

body.mobile-device .session-link {
  grid-area: password;
  margin: 0;
}

body.mobile-device .logout-form {
  grid-area: logout;
}

body.mobile-device .session-link,
body.mobile-device .logout-form {
  display: none;
}

body.mobile-device .session-box.open {
  grid-template-areas:
    "unit user messages toggle"
    "password password logout logout";
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

body.mobile-device .session-link,
body.mobile-device .logout-form button {
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

body.mobile-device .session-box.open .session-link,
body.mobile-device .session-box.open .logout-form {
  display: flex;
  margin-top: 4px;
}

body.mobile-device .session-link.active {
  display: none;
}

body.mobile-device .workspace {
  padding: 12px;
}

body.mobile-device h1 {
  font-size: 1.45rem;
}

body.mobile-device .topbar,
body.mobile-device .screen-heading,
body.mobile-device .enc-head,
body.mobile-device .person-result,
body.mobile-device .search-row {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}

body.mobile-device .top-actions,
body.mobile-device .modal-actions {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

body.mobile-device [data-home-new-button] {
  display: none !important;
}

body.mobile-device .screen-heading .primary-button[data-focus-form] {
  display: none;
}

body.mobile-device .top-actions > *,
body.mobile-device .modal-actions > *,
body.mobile-device .enc-actions > *,
body.mobile-device .search-row > button {
  width: 100%;
}

body.mobile-device .pending-center {
  width: 100%;
}

body.mobile-device .pending-toggle {
  justify-content: center;
  width: 100%;
}

body.mobile-device .pending-popover {
  left: 0;
  right: auto;
  width: min(430px, calc(100vw - 24px));
}

body.mobile-device .pending-summary {
  grid-template-columns: 1fr;
}

body.mobile-device .live-notification {
  left: 12px;
  right: 12px;
  top: 118px;
  width: auto;
}

body.mobile-device .quick-layout,
body.mobile-device .simplified-layout {
  max-width: none;
  width: 100%;
}

body.mobile-device .home-layout {
  gap: 12px;
}

body.mobile-device .home-hero {
  padding: 16px;
}

body.mobile-device .home-hero h2 {
  font-size: 1.3rem;
}

body.mobile-device .home-actions,
body.mobile-device .home-summary,
body.mobile-device .home-dashboard {
  grid-template-columns: 1fr;
}

body.mobile-device .pie-stat-card {
  grid-template-columns: 1fr;
  justify-items: stretch;
}

body.mobile-device .pie-chart {
  width: min(180px, 58vw);
}

body.mobile-device .home-action {
  min-height: 118px;
  padding: 16px;
}

body.mobile-device .home-tool-list {
  display: grid;
  grid-template-columns: 1fr;
}

body.mobile-device .home-tool-list button {
  justify-content: flex-start;
  width: 100%;
}

body.mobile-device .panel,
body.mobile-device .enc-card,
body.mobile-device .case-card {
  padding: 14px;
}

body.mobile-device .enc-list {
  gap: 8px;
}

body.mobile-device .enc-card {
  box-shadow: none;
  gap: 8px;
  padding: 10px;
}

body.mobile-device .demand-card .enc-head {
  align-items: flex-start;
  flex-direction: row;
  gap: 8px;
}

body.mobile-device .demand-card .enc-head > div:first-child {
  min-width: 0;
}

body.mobile-device .demand-card .enc-head strong,
body.mobile-device .demand-card .enc-head span,
body.mobile-device .enc-main p {
  line-height: 1.25;
}

body.mobile-device .demand-card-body {
  gap: 6px;
}

body.mobile-device .demand-card-body p {
  font-size: 0.9rem;
}

body.mobile-device .demand-mini-grid {
  display: block;
}

body.mobile-device .demand-mini-grid div {
  align-items: baseline;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 6px 0;
}

body.mobile-device .demand-mini-grid dt {
  flex: 0 0 auto;
  font-size: 0.66rem;
}

body.mobile-device .demand-mini-grid dd {
  font-size: 0.82rem;
  margin: 0;
  min-width: 0;
  text-align: right;
}

body.mobile-device .choice-grid,
body.mobile-device .demand-filter,
body.mobile-device .demand-mini-grid,
body.mobile-device .form-grid.two,
body.mobile-device .kanban,
body.mobile-device .management-grid,
body.mobile-device .metrics,
body.mobile-device .person-summary,
body.mobile-device .person-mode-actions,
body.mobile-device .record-type-actions,
body.mobile-device .people-search,
body.mobile-device .profile-layout,
body.mobile-device .report-filter,
body.mobile-device .org-grid {
  grid-template-columns: 1fr;
}

body.mobile-device .message-screen-heading {
  align-items: stretch;
  display: grid;
  gap: 12px;
}

body.mobile-device .message-screen-heading .primary-button {
  width: 100%;
}

body.mobile-device .message-center {
  display: block;
  min-height: 0;
}

body.mobile-device .message-content-panel {
  display: none;
  min-height: 0;
}

body.mobile-device .message-center.has-thread .message-inbox-panel,
body.mobile-device .message-center.is-composing .message-inbox-panel {
  display: none;
}

body.mobile-device .message-center.has-thread .message-content-panel,
body.mobile-device .message-center.is-composing .message-content-panel {
  display: flex;
}

body.mobile-device .message-mobile-back {
  align-items: center;
  color: var(--primary-dark);
  display: inline-flex;
  font-weight: 800;
  gap: 7px;
  margin-bottom: 14px;
  text-decoration: none;
}

body.mobile-device .message-recipient-options {
  grid-template-columns: 1fr;
}

body.mobile-device .forward-recipient-options {
  grid-template-columns: 1fr;
}

body.mobile-device .forward-availability-cards,
body.mobile-device .forward-availability-metrics {
  grid-template-columns: 1fr;
}

body.mobile-device .forward-availability-top {
  display: grid;
  gap: 8px;
}

body.mobile-device .message-bubble {
  max-width: 100%;
}

body.mobile-device .message-bubble.mine,
body.mobile-device .message-bubble.theirs {
  justify-self: stretch;
}

body.mobile-device .message-list-item,
body.mobile-device .message-bubble {
  padding: 10px;
}

body.mobile-device .message-thread-heading {
  align-items: stretch;
  display: grid;
}

body.mobile-device .message-thread-heading form,
body.mobile-device .message-thread-heading button,
body.mobile-device .message-form-actions,
body.mobile-device .message-form-actions > *,
body.mobile-device .message-reply-actions,
body.mobile-device .message-reply-actions .primary-button {
  width: 100%;
}

body.mobile-device .message-form-actions,
body.mobile-device .message-reply-actions {
  align-items: stretch;
  display: grid;
}

body.mobile-device .message-reply-attachment {
  align-items: stretch;
  display: grid;
  width: 100%;
}

body.mobile-device .message-reply-attachment .message-selected-file {
  max-width: 100%;
}

body.mobile-device .message-attachment-button {
  justify-content: center;
  min-height: 50px;
}

body.mobile-device .system-setting-row {
  align-items: flex-start;
  grid-template-columns: 1fr;
}

body.mobile-device input,
body.mobile-device select,
body.mobile-device textarea,
body.mobile-device .primary-button,
body.mobile-device .secondary-button,
body.mobile-device .ghost-button,
body.mobile-device .danger-button,
body.mobile-device .choice {
  min-height: 50px;
}

body.mobile-device textarea {
  min-height: 110px;
}

body.mobile-device .mode-button {
  min-height: 66px;
  padding: 14px;
}

body.mobile-device .field span {
  font-size: 0.92rem;
}

body.mobile-device .simplified-layout .save-bar,
body.mobile-device .save-bar {
  background: rgba(244, 247, 251, 0.96);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin: 0 -12px -12px;
  padding: 10px 12px;
  position: sticky;
  z-index: 20;
}

body.mobile-device .save-bar > *,
body.mobile-device .simplified-layout .save-bar .primary-button {
  min-width: 0;
  width: 100%;
}

body.mobile-device .filter-tabs,
body.mobile-device .enc-actions,
body.mobile-device .actions-row {
  display: grid;
  grid-template-columns: 1fr;
}

body.mobile-device .demand-card > .enc-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mobile-device .demand-card > .enc-actions .secondary-button,
body.mobile-device .demand-card > .enc-actions .ghost-button,
body.mobile-device .demand-card > .enc-actions .primary-button {
  min-height: 42px;
  padding: 8px 10px;
}

body.mobile-device .open-demand-item,
body.mobile-device .queue-item {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}

body.mobile-device .quick-complete-form {
  grid-template-columns: 1fr;
}

body.mobile-device .table-wrap {
  overflow-x: auto;
}

body.mobile-device .user-list-filters {
  grid-template-columns: 1fr;
}

body.mobile-device .user-filter-clear {
  width: 100%;
}

body.mobile-device .flat-table {
  min-width: 680px;
}

body.mobile-device .password-prompt-dialog {
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 18px;
}

body.mobile-device.login-page {
  padding: 12px;
}

body.mobile-device .login-shell {
  min-height: calc(100vh - 24px);
}

body.mobile-device .login-panel {
  padding: 18px;
}

.report-kinds {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
}

.report-kind {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #263347;
  display: flex;
  font-weight: 800;
  gap: 9px;
  min-height: 52px;
  padding: 11px 13px;
  text-decoration: none;
}

.report-kind svg {
  color: var(--primary);
  flex: 0 0 auto;
  height: 20px;
  width: 20px;
}

.report-kind.active {
  background: #e6f1ef;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.period-shortcuts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.period-shortcuts span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.period-shortcuts a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 10px;
  text-decoration: none;
}

.report-filter {
  grid-template-columns: minmax(150px, 210px) minmax(150px, 210px) auto;
}

.report-more-filters {
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
  padding-top: 10px;
}

.report-more-filters summary {
  align-items: center;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 8px;
  list-style: none;
}

.report-more-filters summary::-webkit-details-marker {
  display: none;
}

.report-more-filters summary svg {
  height: 18px;
  width: 18px;
}

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

.report-clear {
  grid-column: 1 / -1;
  justify-self: start;
}

.report-actions {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 0;
}

.report-actions > div {
  display: grid;
  flex: 1;
  gap: 2px;
}

.report-actions > div span,
.report-details .panel-title span {
  color: var(--muted);
  font-size: 0.84rem;
}

.report-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-metrics .metric {
  border-left: 3px solid var(--primary);
  min-height: 112px;
}

.report-breakdowns {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  margin-bottom: 16px;
}

.report-bar-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 180px) minmax(80px, 1fr) 34px;
  min-height: 38px;
}

.report-bar-row > span {
  color: #263347;
  font-size: 0.9rem;
  font-weight: 700;
}

.report-bar-row > div {
  background: #e8eef4;
  height: 8px;
  overflow: hidden;
}

.report-bar-row i {
  background: var(--primary);
  display: block;
  height: 100%;
}

.report-bar-row strong {
  color: var(--primary-dark);
  text-align: right;
}

.report-subtitle {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  margin-top: 4px;
  padding-top: 12px;
  text-transform: uppercase;
}

.report-details {
  box-shadow: none;
}

.report-details .panel-title > div {
  display: grid;
  gap: 3px;
}

.report-detail-table td small {
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.report-detail-table a {
  color: var(--primary-dark);
  font-weight: 800;
}

@media (max-width: 900px) {
  .report-kinds,
  .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-filter-grid,
  .report-breakdowns {
    grid-template-columns: 1fr;
  }
}

body.mobile-device .report-kinds {
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mobile-device .report-kind {
  font-size: 0.86rem;
  min-height: 48px;
  padding: 8px 9px;
}

body.mobile-device .report-filter-grid {
  grid-template-columns: 1fr;
}

body.mobile-device .report-actions {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mobile-device .report-actions > div {
  grid-column: 1 / -1;
}

body.mobile-device .report-actions .secondary-button {
  font-size: 0.82rem;
  min-height: 44px;
  padding: 8px;
}

body.mobile-device .report-metrics {
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mobile-device .report-metrics .metric {
  min-height: 94px;
  padding: 11px;
}

body.mobile-device .report-metrics .metric span {
  font-size: 0.76rem;
}

body.mobile-device .report-metrics .metric strong {
  font-size: 1.55rem;
}

body.mobile-device .report-metrics .metric small {
  font-size: 0.72rem;
}

body.mobile-device .report-breakdowns {
  grid-template-columns: 1fr;
}

body.mobile-device .report-table-wrap {
  overflow: visible;
}

body.mobile-device .report-detail-table,
body.mobile-device .report-detail-table tbody,
body.mobile-device .report-detail-table tr,
body.mobile-device .report-detail-table td {
  display: block;
  min-width: 0;
  width: 100%;
}

body.mobile-device .report-detail-table thead {
  display: none;
}

body.mobile-device .report-detail-table tr {
  border-bottom: 2px solid var(--line);
  padding: 8px 0;
}

body.mobile-device .report-detail-table td {
  align-items: baseline;
  border: 0;
  display: grid;
  font-size: 0.83rem;
  gap: 10px;
  grid-template-columns: 110px minmax(0, 1fr);
  padding: 5px 0;
}

body.mobile-device .report-detail-table td::before {
  color: var(--muted);
  content: attr(data-label);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

body.mobile-device .report-detail-table td[colspan]::before {
  display: none;
}

.checkbox-line {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.checkbox-line input[type="checkbox"] {
  margin-top: 4px;
}

.checkbox-line span {
  color: #263347;
  font-size: 0.92rem;
  line-height: 1.45;
}

.compact-grid {
  gap: 14px;
}

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

.time-range span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.accommodation-editor {
  display: grid;
  gap: 16px;
}

.accommodation-toggle-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
}

.accommodation-toggle-card input[type="checkbox"] {
  flex: 0 0 auto;
  height: 20px;
  width: 20px;
}

.accommodation-toggle-card span {
  font-weight: 700;
}

.accommodation-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.25fr) repeat(4, minmax(120px, 0.75fr));
  margin-bottom: 18px;
}

.accommodation-summary .metric {
  box-shadow: none;
  min-height: 116px;
  padding: 16px;
}

.accommodation-summary .metric span {
  line-height: 1.2;
}

.accommodation-status-card {
  align-content: center;
  border-left: 4px solid var(--primary);
}

.accommodation-status-card strong {
  font-size: clamp(1.6rem, 2vw, 2.15rem);
  line-height: 1.05;
  overflow-wrap: normal;
}

.accommodation-number-card {
  align-content: center;
}

.accommodation-number-card strong {
  font-size: 1.8rem;
  line-height: 1;
}

.accommodation-number-card small,
.accommodation-status-card small {
  line-height: 1.35;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 4px 0 0;
}

.availability-panel {
  display: grid;
  gap: 16px;
}

.availability-filter,
.availability-metrics {
  display: grid;
  gap: 12px;
}

.availability-filter {
  align-items: end;
  grid-template-columns: minmax(0, 280px) auto auto;
}

.availability-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.availability-list {
  display: grid;
  gap: 14px;
}

.availability-card {
  background: #fbfdff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.availability-card.success {
  border-left-color: #1f8a70;
}

.availability-card.danger {
  border-left-color: #d95f5f;
}

.availability-card.neutral {
  border-left-color: #7b8794;
}

.availability-head,
.availability-meta {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.availability-head strong {
  color: var(--text);
  display: block;
  font-size: 1rem;
}

.availability-head small,
.availability-meta,
.availability-status-text,
.availability-note {
  color: var(--muted);
}

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

.availability-grid div {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 74px;
  padding: 12px;
}

.availability-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.77rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.availability-grid strong {
  color: var(--text);
  font-size: 1.4rem;
}

.availability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.availability-status-text,
.availability-note {
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.availability-meta {
  flex-wrap: wrap;
  font-size: 0.84rem;
}

body.mobile-device .time-range {
  grid-template-columns: 1fr;
}

body.mobile-device .accommodation-summary {
  grid-template-columns: 1fr;
}

body.mobile-device .accommodation-summary .metric {
  min-height: auto;
}

body.mobile-device .accommodation-status-card strong,
body.mobile-device .accommodation-number-card strong {
  font-size: 1.55rem;
}

body.mobile-device .availability-filter,
body.mobile-device .availability-metrics,
body.mobile-device .availability-grid {
  grid-template-columns: 1fr;
}

body.mobile-device .availability-head,
body.mobile-device .availability-meta {
  display: grid;
  gap: 8px;
}
