:root {
  --ink: #07152f;
  --ink-soft: #3d4b63;
  --muted: #6d788b;
  --line: #dde4ed;
  --line-strong: #c8d3e1;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --surface-blue: #edf5ff;
  --blue: #075dd8;
  --blue-dark: #0447aa;
  --teal: #08a79f;
  --green: #198754;
  --amber: #c87900;
  --rose: #bd3f5b;
  --topbar-height: 68px;
  --sidebar-width: 226px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
}

button,
a,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

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

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button-primary {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 7px 18px rgba(7, 93, 216, 0.16);
}

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

.button-secondary {
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line-strong);
}

.button-secondary:hover {
  color: var(--blue);
  background: var(--surface-blue);
  border-color: #a9caf3;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--blue);
  background: var(--surface-blue);
  border-color: #b7d2f4;
}

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

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(460px, 1.1fr);
  background: #fff;
}

.login-brand {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 70px clamp(42px, 7vw, 112px);
  background: var(--ink);
  color: #fff;
}

.login-brand img {
  width: 210px;
  height: 150px;
  margin-bottom: 42px;
  object-fit: contain;
  object-position: left center;
}

.login-brand > span {
  color: #77e0d8;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.login-brand h1 {
  margin: 6px 0 8px;
  font-size: 42px;
  line-height: 1.1;
}

.login-brand p {
  margin: 0;
  color: #b8c5d8;
}

.login-panel {
  width: min(430px, calc(100% - 48px));
  align-self: center;
  justify-self: center;
}

.login-panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.secure-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
}

.secure-mark svg {
  width: 22px;
  height: 22px;
}

.login-panel-heading span:not(.secure-mark) {
  color: var(--teal);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.login-panel-heading h2 {
  margin: 2px 0 0;
  font-size: 25px;
}

.google-button {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
}

.google-button img {
  width: 18px;
  height: 18px;
}

.divider {
  position: relative;
  margin: 22px 0;
  text-align: center;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  border-top: 1px solid var(--line);
}

.divider span {
  position: relative;
  padding: 0 10px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
}

.login-form,
.material-form,
.dialog form {
  display: grid;
}

.login-form {
  gap: 14px;
}

.login-form .button {
  width: 100%;
  margin-top: 3px;
}

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

.field > span:first-child {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.field input,
.field select,
.field textarea,
.toolbar select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: 0;
}

.field textarea {
  min-height: 86px;
  padding: 10px 11px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar select:focus,
.search-control:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 93, 216, 0.09);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 44px;
}

.password-field button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}

.password-field button:hover {
  color: var(--blue);
  background: var(--surface-blue);
}

.password-field svg {
  width: 17px;
  height: 17px;
}

.status-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.menu-toggle {
  display: none;
}

.brand {
  width: 130px;
  height: 56px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.brand img {
  width: 104px;
  height: 54px;
  object-fit: contain;
}

.private-badge {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: #087b70;
  background: #eaf8f6;
  border: 1px solid #b9e5df;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.private-badge svg {
  width: 13px;
  height: 13px;
}

.topbar-spacer {
  flex: 1;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 5px;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 850;
}

.admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-user > span:last-child {
  display: grid;
}

.admin-user strong {
  font-size: 11px;
}

.admin-user small {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: var(--topbar-height) auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 14px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-item.is-active {
  color: var(--blue);
  background: var(--surface-blue);
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.sidebar-footer {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 14px 10px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.sidebar-footer svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--teal);
}

.main-content {
  min-height: 100vh;
  padding: calc(var(--topbar-height) + 34px) 38px 50px calc(var(--sidebar-width) + 38px);
}

.page-header {
  max-width: 1240px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 26px;
}

.page-header span,
.dashboard-section header span,
.dialog header span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 3px 0 0;
  font-size: 29px;
  line-height: 1.2;
}

.admin-view {
  max-width: 1240px;
  margin: 0 auto;
}

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

.metric {
  min-width: 0;
  min-height: 106px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.metric-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.metric-icon svg {
  width: 19px;
  height: 19px;
}

.metric-icon.blue {
  color: var(--blue);
  background: var(--surface-blue);
}

.metric-icon.teal {
  color: #087b70;
  background: #eaf8f6;
}

.metric-icon.green {
  color: var(--green);
  background: #edf8f2;
}

.metric-icon.amber {
  color: var(--amber);
  background: #fff7e8;
}

.metric > div {
  min-width: 0;
  display: grid;
}

.metric span:not(.metric-icon) {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  margin-top: 1px;
  font-size: 27px;
  line-height: 1.2;
}

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

.dashboard-section {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.dashboard-section > header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 19px;
  border-bottom: 1px solid var(--line);
}

.dashboard-section h2 {
  margin: 1px 0 0;
  font-size: 16px;
}

.text-button {
  padding: 4px;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.compact-list {
  display: grid;
}

.compact-item {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

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

.compact-icon,
.user-photo {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--blue);
  background: var(--surface-blue);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 850;
}

.compact-icon svg {
  width: 16px;
  height: 16px;
}

.user-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-copy {
  min-width: 0;
  display: grid;
}

.compact-copy strong,
.user-cell strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-copy span,
.user-cell span,
.mobile-row p {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item time {
  color: var(--muted);
  font-size: 10px;
}

.empty-row {
  padding: 32px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.toolbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.search-control {
  width: min(380px, 100%);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 5px;
}

.search-control svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-control input {
  width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.toolbar select {
  width: 180px;
  height: 40px;
  font-size: 11px;
}

.result-count {
  margin-left: auto;
  padding: 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.table-shell {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 7px 7px;
}

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

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #fbfcfe;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

td {
  font-size: 11px;
}

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

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

.user-cell {
  min-width: 210px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.user-cell > span:last-child {
  min-width: 0;
  display: grid;
}

.material-cell {
  min-width: 220px;
  display: grid;
  gap: 2px;
}

.material-cell strong {
  font-size: 12px;
}

.material-cell span,
.organization-cell {
  color: var(--muted);
  font-size: 10px;
}

.status-tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.status-tag svg {
  width: 12px;
  height: 12px;
}

.status-tag.active,
.status-tag.published {
  color: var(--green);
  background: #edf8f2;
}

.status-tag.disabled,
.status-tag.hidden {
  color: var(--rose);
  background: #fff0f3;
}

.status-tag.pending {
  color: var(--amber);
  background: #fff7e8;
}

.status-tag.neutral {
  color: var(--muted);
  background: var(--surface-soft);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.row-actions .icon-button {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.danger-action:hover {
  color: var(--rose);
  background: #fff1f4;
  border-color: #efbdc8;
}

.mobile-list {
  display: none;
}

.material-form {
  gap: 24px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.material-form > header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.form-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: var(--surface-blue);
  border-radius: 50%;
}

.form-mark svg {
  width: 19px;
  height: 19px;
}

.material-form h2 {
  margin: 0;
  font-size: 19px;
}

.material-form header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.file-field {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
}

.file-field:hover {
  color: var(--blue);
  background: var(--surface-blue);
  border-color: #9fc4f2;
}

.file-field > svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.file-field > span {
  min-width: 0;
  display: grid;
}

.file-field strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-field small {
  color: var(--muted);
  font-size: 10px;
}

.file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.switch-control {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
}

.switch-control > span {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 36px;
  background: #cbd4df;
  border-radius: 10px;
  transition: background 160ms ease;
}

.switch-control > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(20, 37, 60, 0.24);
  transition: transform 160ms ease;
}

.switch-control input:checked + span {
  background: var(--blue);
}

.switch-control input:checked + span::after {
  transform: translateX(16px);
}

.switch-control input:focus-visible + span {
  outline: 3px solid rgba(7, 93, 216, 0.15);
}

.switch-control strong {
  font-size: 11px;
}

.upload-progress {
  height: 4px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 2px;
}

.upload-progress span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--teal);
  transition: width 160ms ease;
}

.material-form > footer,
.dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dialog {
  width: min(760px, calc(100% - 30px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(7, 21, 47, 0.2);
}

.dialog::backdrop {
  background: rgba(7, 21, 47, 0.46);
  backdrop-filter: blur(3px);
}

.dialog form,
.dialog > div {
  gap: 20px;
  padding: 24px;
}

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

.dialog h2 {
  margin: 2px 0 0;
  font-size: 21px;
}

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

.reset-dialog {
  width: min(560px, calc(100% - 30px));
}

.reset-dialog > div {
  display: grid;
}

.reset-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 22px;
  max-width: min(420px, calc(100% - 28px));
  padding: 11px 15px;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(7, 21, 47, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 11px;
}

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

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

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

@media (max-width: 820px) {
  :root {
    --sidebar-width: 0px;
  }

  .login-view {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 260px;
    padding: 34px max(24px, 8vw);
  }

  .login-brand img {
    width: 148px;
    height: 96px;
    margin-bottom: 12px;
  }

  .login-brand h1 {
    font-size: 32px;
  }

  .login-panel {
    padding: 42px 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .private-badge {
    display: none;
  }

  .sidebar {
    width: 226px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 40px rgba(7, 21, 47, 0.12);
  }

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

  .main-content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .table-shell {
    display: none;
  }

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

  .toolbar {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .mobile-row {
    display: grid;
    gap: 12px;
    padding: 15px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .mobile-row-header {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-row-header > div {
    min-width: 0;
    display: grid;
  }

  .mobile-row-header strong,
  .mobile-row-header span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-row-header span,
  .mobile-row p {
    color: var(--muted);
    font-size: 10px;
  }

  .mobile-row p {
    margin: 0;
  }

  .mobile-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mobile-row .row-actions {
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 8px;
    padding: 0 12px;
  }

  .brand {
    width: 88px;
  }

  .brand img {
    width: 76px;
  }

  .admin-user > span:last-child {
    display: none;
  }

  .main-content {
    padding: calc(var(--topbar-height) + 24px) 14px 34px;
  }

  .page-header {
    align-items: flex-start;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .page-header .button {
    width: 40px;
    min-height: 40px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    gap: 0;
  }

  .page-header .button svg {
    color: var(--ink-soft);
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .metric {
    min-height: 112px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
  }

  .metric-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .metric strong {
    font-size: 23px;
  }

  .toolbar,
  .material-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-control,
  .toolbar select {
    width: 100%;
  }

  .result-count {
    margin-left: 0;
  }

  .material-form {
    gap: 20px;
    padding: 18px;
  }

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

  .field-wide {
    grid-column: 1;
  }

  .toggle-row {
    flex-direction: column;
    gap: 14px;
  }

  .material-form > footer,
  .dialog footer {
    align-items: stretch;
    flex-direction: column;
  }

  .material-form > footer .button,
  .dialog footer .button {
    width: 100%;
  }

  .dialog form,
  .dialog > div {
    padding: 18px;
  }
}
