:root {
  --bg: #070a16;
  --bg-elev: #101733;
  --bg-elev-2: #1a2152;
  --text: #f3f6ff;
  --muted: #95a4ce;
  --line: #273067;
  --accent: #5f79ff;
  --accent-2: #9e57ff;
  --ok: #1fc8a6;
  --warn: #f6b34c;
  --err: #ff5f7e;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 600px at 85% -10%, #202b63 0%, transparent 58%), var(--bg);
  font-family: "Space Grotesk", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.34;
  pointer-events: none;
}

.bg-orb-1 {
  width: 280px;
  height: 280px;
  background: #6c7dff;
  left: -80px;
  top: 120px;
}

.bg-orb-2 {
  width: 340px;
  height: 340px;
  background: #944fff;
  right: -120px;
  bottom: 20px;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(7, 10, 22, 0.7);
  backdrop-filter: blur(16px);
  padding: 24px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.08rem;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(95, 121, 255, 0.8);
}

.nav-links {
  display: grid;
  gap: 8px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(95, 121, 255, 0.14);
}

.sidebar-cta {
  display: block;
  text-align: center;
  padding: 11px 14px;
}

.sidebar-cta.active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 8px 22px rgba(84, 110, 255, 0.35);
}

.nav-submenu {
  margin-top: 4px;
  margin-left: 4px;
  padding: 8px;
  border: 1px solid rgba(95, 121, 255, 0.28);
  border-radius: 12px;
  background: rgba(12, 18, 44, 0.7);
  display: grid;
  gap: 4px;
}

.nav-submenu-title {
  margin: 0 0 4px;
  padding: 0 6px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8ea0d7;
}

.nav-sublink {
  color: #beccf8;
  text-decoration: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.84rem;
  border: 1px solid transparent;
}

.nav-sublink:hover,
.nav-sublink.active {
  color: var(--text);
  border-color: rgba(95, 121, 255, 0.42);
  background: rgba(95, 121, 255, 0.2);
}

.sidebar-card {
  margin-top: 34px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(26, 33, 82, 0.45);
}

.sidebar-card-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.sidebar-card-value {
  margin: 10px 0 12px;
  font-size: 1.1rem;
}

.sidebar-card-link {
  color: #b9c5ff;
  text-decoration: none;
}

.content {
  grid-column: 2;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 4px 0 8px;
  backdrop-filter: blur(12px);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 23, 51, 0.72);
}

.user-chip-loading {
  opacity: 0.8;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.user-name {
  font-size: 0.86rem;
  color: #d9e0ff;
}

.user-menu {
  position: relative;
}

.user-menu > summary {
  list-style: none;
  cursor: pointer;
}

.user-menu > summary::-webkit-details-marker {
  display: none;
}

.user-menu-popover {
  position: absolute;
  right: 0;
  margin-top: 10px;
  width: min(280px, 85vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 23, 51, 0.97);
  padding: 12px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  z-index: 30;
}

.user-menu-line {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #d6deff;
}

.user-menu-link {
  display: inline-block;
  margin-top: 6px;
  color: #c7d2ff;
  text-decoration: none;
}

.user-menu-form {
  margin-top: 10px;
}

.app-footer {
  margin-top: auto;
  padding-top: 8px;
}

.footer-row {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-row a {
  color: #b9c5ff;
  text-decoration: none;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
}

.page-head p {
  margin-top: 6px;
  color: var(--muted);
}

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

.stats-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(29, 39, 96, 0.9), rgba(12, 18, 45, 0.85));
  animation: rise 320ms ease both;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
}

.stat-card h2 {
  margin: 8px 0 0;
  font-size: 2rem;
}

.panel-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(16, 23, 51, 0.75);
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 0;
}

.panel-head a {
  color: #bcc7ff;
  text-decoration: none;
}

.table-wrap {
  overflow-x: auto;
}

.table-pagination {
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-pagination-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.table-pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-link {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  color: #d3dcff;
  background: rgba(26, 33, 82, 0.5);
  font-size: 0.84rem;
}

.pagination-link.disabled {
  color: var(--muted);
  background: rgba(26, 33, 82, 0.22);
}

.pagination-page {
  color: #d5ddfb;
  font-size: 0.84rem;
}

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(39, 48, 103, 0.7);
  text-align: left;
}

th {
  color: #cdd6ff;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: rgba(95, 121, 255, 0.11);
}

.empty {
  color: var(--muted);
  text-align: center;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  border: 1px solid transparent;
}

.badge-draft,
.badge-queued {
  color: var(--warn);
  border-color: rgba(246, 179, 76, 0.4);
  background: rgba(246, 179, 76, 0.12);
}

.badge-running {
  color: #76d9ff;
  border-color: rgba(118, 217, 255, 0.4);
  background: rgba(118, 217, 255, 0.12);
}

.badge-done {
  color: var(--ok);
  border-color: rgba(31, 200, 166, 0.4);
  background: rgba(31, 200, 166, 0.12);
}

.badge-failed {
  color: var(--err);
  border-color: rgba(255, 95, 126, 0.4);
  background: rgba(255, 95, 126, 0.12);
}

.badge-canceled {
  color: #d3d9ef;
  border-color: rgba(211, 217, 239, 0.4);
  background: rgba(211, 217, 239, 0.12);
}

.controls-panel {
  margin-top: 18px;
  padding: 12px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rows-per-page {
  min-width: 120px !important;
}

input:not([type="checkbox"]):not([type="file"]),
select,
button {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1430;
  color: var(--text);
  padding: 0 12px;
  font-family: inherit;
}

input:not([type="checkbox"]):not([type="file"]),
select {
  min-width: 220px;
}

textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1430;
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
  resize: vertical;
}

.filters button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  font-weight: 600;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
}

#jobs-results {
  margin-top: 14px;
}

.progress-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 170px;
}

.progress-bar {
  width: 110px;
  height: 8px;
  border-radius: 999px;
  background: rgba(52, 66, 140, 0.6);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.progress-text {
  font-size: 0.78rem;
}

#documents-results {
  margin-top: 18px;
}

.danger-btn {
  background: rgba(255, 95, 126, 0.12);
  border: 1px solid rgba(255, 95, 126, 0.45);
  color: #ff90a5;
  cursor: pointer;
  font-weight: 600;
}

.cta-btn {
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 16px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px rgba(84, 110, 255, 0.35);
  white-space: nowrap;
}

.bulk-delete-form {
  display: grid;
}

.bulk-actions-row {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.summary-doc-grid {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.usage-panel {
  margin-top: 14px;
}

.config-panel {
  margin-top: 14px;
}

.config-prompt {
  font-size: 0.85rem;
  line-height: 1.35;
}

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

.usage-totals-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(26, 33, 82, 0.36);
  padding: 8px;
}

.usage-totals-grid .k {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.usage-totals-grid .v {
  display: block;
  margin-top: 3px;
}

.usage-models-table {
  margin-top: 12px;
}

.doc-card .panel-body {
  padding: 14px 16px 16px;
}

.panel-body {
  padding: 14px 16px;
}

.stacked-graph {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: #131c43;
}

.stacked-graph span {
  display: block;
  height: 100%;
}

.stacked-graph .g-ok {
  background: #1fc8a6;
}

.stacked-graph .g-minor {
  background: #f6b34c;
}

.stacked-graph .g-major {
  background: #ff7f57;
}

.stacked-graph .g-critical {
  background: #ff5f7e;
}

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

.severity-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(26, 33, 82, 0.36);
  padding: 8px;
}

.severity-grid .k {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.severity-grid .v {
  display: block;
  margin-top: 3px;
}

.sev-ok {
  color: #40e3bc;
}

.sev-minor {
  color: #ffd07a;
}

.sev-major {
  color: #ff9d77;
}

.sev-critical {
  color: #ff88a2;
}

.doc-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-link {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: #d3dcff;
  background: rgba(26, 33, 82, 0.5);
}

.action-link.disabled {
  color: var(--muted);
  cursor: default;
}

.alert-panel {
  margin-top: 14px;
}

.alert-panel-info {
  border-color: rgba(31, 200, 166, 0.45);
}

.error-text {
  color: #ff9bb0;
  margin: 0;
}

.info-text {
  color: #8ff0dc;
  margin: 0;
}

.flash-stack {
  position: fixed;
  right: 24px;
  top: 18px;
  width: min(360px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  z-index: 90;
}

.flash-toast {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 23, 51, 0.96);
  padding: 10px 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: rise 220ms ease both;
}

.flash-toast-info {
  border-color: rgba(31, 200, 166, 0.72);
  background: linear-gradient(135deg, rgba(20, 70, 63, 0.95), rgba(14, 41, 38, 0.95));
}

.flash-toast-error {
  border-color: rgba(255, 95, 126, 0.72);
  background: linear-gradient(135deg, rgba(97, 33, 48, 0.95), rgba(61, 21, 30, 0.95));
}

.flash-text {
  margin: 0;
  flex: 1;
}

.flash-toast-info .flash-text {
  color: #8ff0dc;
}

.flash-toast-error .flash-text {
  color: #ff9bb0;
}

.flash-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #d7e0ff;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
  padding: 0 !important;
}

.flash-toast.is-closing {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.new-job-panel {
  margin-top: 16px;
}

.new-job-form {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.new-job-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(26, 33, 82, 0.22);
}

.new-job-section h3 {
  margin: 0;
}

.help {
  color: var(--muted);
  margin: 6px 0 12px;
  font-size: 0.9rem;
}

.field-label {
  display: block;
  margin: 12px 0 6px;
  color: #d2dbff;
  font-size: 0.9rem;
}

.choice-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(39, 48, 103, 0.6);
  border-radius: 12px;
  padding: 10px;
  background: rgba(9, 14, 35, 0.6);
}

.choice-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #d6deff;
}

.upload-inline {
  display: block;
  padding: 10px;
  border: 1px dashed rgba(95, 121, 255, 0.45);
  border-radius: 12px;
  background: rgba(14, 21, 55, 0.65);
}

.upload-inline input[type="file"] {
  width: 100%;
  min-width: 0;
  background: rgba(10, 15, 37, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

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

.check-card {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(16, 23, 51, 0.82);
}

.check-card-fixed {
  opacity: 0.82;
}

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

.new-job-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-panel {
  margin-top: 16px;
}

.settings-categories {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-category {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(16, 23, 51, 0.62);
}

.settings-category.active {
  color: var(--text);
  background: rgba(95, 121, 255, 0.18);
  border-color: rgba(95, 121, 255, 0.5);
}

.settings-form {
  display: grid;
  gap: 10px;
  max-width: 640px;
}

.inline-choice {
  align-items: center;
}

.settings-provider-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.settings-active-credential {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(26, 33, 82, 0.26);
  padding: 12px;
  margin-bottom: 12px;
}

.settings-active-credential-title {
  margin: 0 0 6px;
  font-weight: 600;
}

.settings-provider-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(26, 33, 82, 0.32);
  padding: 10px;
}

.settings-provider-title {
  margin: 0 0 6px;
}

.settings-inline-form {
  margin-top: 8px;
}

.settings-generated-key {
  border: 1px solid rgba(95, 121, 255, 0.5);
  border-radius: 12px;
  background: rgba(95, 121, 255, 0.14);
  padding: 12px;
  margin-bottom: 12px;
}

.settings-generated-key-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.settings-key-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-color-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.settings-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.summary-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.settings-users-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.settings-user-card {
  min-width: 0;
}

.settings-user-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.settings-user-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
}

.settings-user-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-user-meta .settings-provider-title,
.settings-user-meta .help {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.settings-user-meta .settings-provider-title {
  margin-bottom: 4px;
}

.settings-user-meta .help {
  margin: 0;
}

.danger-zone {
  border-color: rgba(255, 95, 126, 0.6);
  background: rgba(55, 15, 28, 0.45);
}

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

.auth-card {
  width: min(680px, 96vw);
}

.error-page {
  background: #0e1221;
}

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

.error-surface {
  width: min(560px, 96vw);
  text-align: center;
  border: 1px solid #2b3259;
  border-radius: 14px;
  background: rgba(16, 23, 51, 0.88);
  padding: 32px 24px;
}

.error-code {
  margin: 0 0 8px;
  color: #9fb0ef;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.error-title {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.1;
}

.error-description {
  margin: 14px auto 0;
  max-width: 44ch;
  color: #b9c5ed;
  line-height: 1.5;
}

.error-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #3a4475;
  padding: 0 14px;
  font-weight: 600;
}

.error-btn-primary {
  background: #dbe5ff;
  color: #171d37;
  border-color: #dbe5ff;
}

.error-btn-secondary {
  background: transparent;
  color: #d6defd;
}

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

.summary-actions form {
  margin: 0;
}

.status-progress-wrap {
  min-width: 0;
}

.status-progress-bar {
  width: min(420px, 100%);
}

.status-metrics {
  margin-top: 14px;
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    position: static;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: auto;
  }

  .content {
    grid-column: 1;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 580px) {
  .content {
    padding: 16px;
  }

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

  input:not([type="checkbox"]):not([type="file"]),
  select,
  button {
    width: 100%;
  }

  .page-head-row {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    justify-content: flex-start;
    position: static;
    padding: 0;
  }

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

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

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

  .flash-stack {
    right: 14px;
    top: 10px;
    width: calc(100vw - 28px);
  }
}
