:root {
  --ink: #172033;
  --muted: #64748b;
  --line: #d9e2ec;
  --surface: #ffffff;
  --bg: #f4f8fb;
  --red: #bf1e2e;
  --blue: #1f3b68;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 96px;
  padding: 18px clamp(18px, 4vw, 42px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.2;
}

.topbar p {
  margin: 0 0 2px;
  color: var(--red);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.management-brand {
  color: var(--ink);
  text-decoration: none;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.topbar a,
.topbar button,
.auth-card button,
.grid-form button,
.user-list button,
.page-actions a,
.password-tools button,
.inline-form button,
.filter-bar button,
.status-form button,
.record-actions button,
.danger-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--blue);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.topbar .management-brand {
  min-height: 0;
  border: 0;
  padding: 0;
  color: var(--ink);
}

.topbar form {
  display: contents;
}

.topbar a,
.topbar button {
  flex: 0 0 auto;
}

.topbar button,
.auth-card button,
.grid-form button,
.user-list button,
.password-tools button,
.inline-form button,
.filter-bar button,
.status-form button,
.record-actions button,
.danger-button {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

button.is-submitting {
  cursor: wait;
  opacity: 0.78;
}

.module-menu {
  position: relative;
  align-self: flex-start;
  height: 46px;
  margin: 0;
}

.module-menu summary {
  display: inline-flex;
  align-items: center;
  height: 46px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 14px;
  background: var(--surface);
  color: var(--blue);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.topbar-actions > form button {
  display: inline-flex;
  align-items: center;
  height: 46px;
  min-height: 46px;
  margin: 0;
}

.topbar nav.topbar-actions {
  align-items: flex-start;
  height: 46px;
  min-height: 46px;
}

.topbar nav.topbar-actions > .module-menu,
.topbar nav.topbar-actions > button {
  height: 46px;
  min-height: 46px;
}

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

.module-menu-links {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(280px, calc(100vw - 36px));
  max-height: min(70vh, 620px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.module-menu-links a {
  width: 100%;
  border: 0;
  text-align: left;
}

.grid-form button.compact-action {
  justify-self: flex-start;
  width: auto;
}

.danger-button {
  background: #9f1724 !important;
  border-color: #9f1724 !important;
}

.shell {
  width: min(100%, calc(100vw - 32px));
  margin: 28px auto 56px;
  padding: 0;
}

.shell.narrow {
  width: min(1280px, calc(100vw - 32px));
}

.shell.wide {
  width: min(100%, calc(100vw - 32px));
}

.shell.parade-shell {
  margin-top: 28px;
}

.shell.parade-shell.wide {
  width: min(100%, calc(100vw - 32px));
}

.management-carshow {
  width: 100%;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
}

.management-carshow *,
.management-carshow button,
.management-carshow input,
.management-carshow select,
.management-carshow textarea,
.management-carshow table {
  font-family: inherit;
  letter-spacing: 0;
}

.carshow-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  width: 100%;
}

.carshow-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.management-carshow .carshow-page-head {
  align-items: flex-end;
  margin-bottom: 20px;
}

.management-carshow .carshow-page-head h2 {
  margin: 0;
  font-size: clamp(36px, 3vw, 42px);
  line-height: 1.08;
}

.management-carshow .carshow-page-head p {
  margin: 0;
}

.management-carshow .carshow-toolbar .button,
.management-carshow .tabs .tab {
  min-height: 40px;
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 750;
}

.management-carshow .carshow-toolbar .button.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.management-carshow .carshow-toolbar .button.ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--blue);
}

.management-carshow .tabs {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.management-carshow .tabs .tab {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.management-carshow .tabs .tab.active {
  background: var(--blue);
  color: #fff;
}

.management-carshow .metric,
.management-carshow .panel,
.management-carshow .category-card,
.management-carshow .category-results > .panel {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.management-carshow .metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: stretch;
  gap: 14px;
  margin-bottom: 18px;
}

.management-carshow .category-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.management-carshow .panel-heading,
.management-carshow .card-title {
  color: var(--ink);
}

.management-carshow .panel-heading h2,
.management-carshow .category-results > .panel .panel-heading h2,
.management-carshow .category-results > .panel .panel-heading h3,
.management-carshow .category-card h3 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 850;
}

.management-carshow .metric-grid > .metric,
.management-carshow #metrics > .metric {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 64px;
  padding: 12px 16px;
}

.management-carshow .metric-grid > .metric > span,
.management-carshow #metrics > .metric > span,
.management-carshow .metric .label {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px !important;
  line-height: 1.25;
  font-weight: 700;
}

.management-carshow .metric-grid > .metric > strong,
.management-carshow #metrics > .metric > strong,
.management-carshow .metric .value {
  color: var(--ink);
  font-size: 24px !important;
  line-height: 1.1;
  font-weight: 850;
}

.management-carshow .category-card,
.management-carshow .category-results > .panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  min-width: 0;
}

.management-carshow .category-results > .category-card,
.management-carshow .category-results > .panel {
  align-self: stretch;
  min-width: 0;
}

.management-carshow .category-results > .panel {
  overflow: hidden;
  padding: 0;
}

.management-carshow .category-card .card-title,
.management-carshow .category-card .category-header,
.management-carshow .category-results > .panel .panel-heading {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.management-carshow .category-card .table-wrap,
.management-carshow .category-results > .panel .table-wrap {
  flex: 1;
}

.management-carshow table {
  font-size: 16px;
}

.management-carshow th {
  font-size: 13px;
}

.management-carshow .table-wrap {
  border-radius: 0 0 8px 8px;
}

.page-head h1,
.page-head h2 {
  margin: 0;
  font-size: clamp(36px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-head .eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.page-head.compact {
  max-width: none;
}

.page-head p,
.function-card p,
.auth-card p,
.muted {
  color: var(--muted);
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.function-tile {
  display: grid;
  min-width: 0;
}

.function-tile.reorderable .function-card {
  border-radius: 8px 8px 0 0;
}

.module-order-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.module-order-controls button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-top: 0;
  padding: 7px 10px;
  background: var(--surface);
  color: var(--blue);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.module-order-controls button:first-child {
  border-radius: 0 0 0 8px;
}

.module-order-controls button:last-child {
  border-left: 0;
  border-radius: 0 0 8px 0;
}

.module-order-save {
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.module-order-save > div {
  display: grid;
  gap: 3px;
}

.module-order-save strong {
  font-size: 18px;
}

.module-order-save span {
  color: var(--muted);
}

.module-order-save button {
  min-height: 46px;
  border: 1px solid var(--red);
  border-radius: 6px;
  padding: 10px 22px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(191, 30, 46, 0.2);
}

.function-card,
.panel,
.auth-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: var(--ink);
}

.function-card span {
  font-size: 22px;
  font-weight: 850;
}

.auth-card {
  max-width: 420px;
  margin: 70px auto;
}

form,
.grid-form,
.user-list {
  display: grid;
  gap: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select {
  height: 46px;
  line-height: 1.25;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
}

fieldset legend {
  color: var(--ink);
  font-weight: 800;
  padding: 0 6px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
}

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

.user-row {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.user-row span {
  display: block;
  color: var(--muted);
}

.user-edit-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.password-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

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

.event-form {
  gap: 16px;
}

.event-section {
  scroll-margin-top: 18px;
}

.span-2 {
  grid-column: 1 / -1;
}

.alert {
  border-radius: 6px;
  padding: 10px 12px;
  background: #f9e5e9;
  color: var(--red);
  font-weight: 700;
}

.alert.success {
  background: #e7f5ed;
  color: #146b3a;
}

.compact {
  margin-bottom: 16px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 16px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.panel > .form-actions,
.panel > .actions,
.panel > button[type="submit"] {
  margin-top: 22px;
}

.panel > .actions {
  margin-bottom: 0;
}

.panel > .form-actions:first-child,
.panel > .actions:first-child {
  margin-top: 0;
}

.form-actions a,
.table-action {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--blue);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}

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

.panel h3 {
  margin: 0;
}

.panel-title-row,
.filter-bar,
.inline-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title-row {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.inline-form label,
.filter-bar label {
  flex: 1 1 220px;
  min-width: 220px;
}

.wide-filter {
  flex: 1 1 340px;
}

.filter-bar {
  margin-bottom: 16px;
}

.filter-bar a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.email-link {
  color: var(--blue);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.event-summary {
  margin: 0 0 8px;
}

.event-list {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
  padding-left: 18px;
}

.event-list li {
  overflow-wrap: anywhere;
}

.record-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 96px;
}

.record-actions form,
.status-form form {
  display: contents;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #e8eff8;
  color: var(--blue);
  font-weight: 800;
}

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

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

.management-table th,
.management-table td {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
  white-space: normal;
}

.management-table th {
  background: #edf3fa;
  color: #52627a;
  font-size: 13px;
  text-transform: uppercase;
}

.management-table .events-cell {
  min-width: 260px;
}

.management-table .long-cell {
  min-width: 300px;
  max-width: 520px;
  overflow-wrap: anywhere;
}

.management-table .permissions-cell {
  max-width: 520px;
  overflow-wrap: anywhere;
}

.user-table th:last-child,
.user-table td:last-child {
  width: 96px;
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 850;
}

.status-pill.active {
  background: #e7f5ed;
  color: #146b3a;
}

.status-pill.inactive {
  background: #f8e5e8;
  color: #9f1724;
}

.volunteer-table {
  table-layout: fixed;
}

.volunteer-table th:nth-child(1),
.volunteer-table td:nth-child(1) {
  width: 8%;
}

.volunteer-table th:nth-child(2),
.volunteer-table td:nth-child(2) {
  width: 11%;
}

.volunteer-table th:nth-child(3),
.volunteer-table td:nth-child(3) {
  width: 18%;
  overflow-wrap: anywhere;
}

.volunteer-table th:nth-child(4),
.volunteer-table td:nth-child(4) {
  width: 10%;
}

.volunteer-table th:nth-child(5),
.volunteer-table td:nth-child(5) {
  width: 6%;
}

.volunteer-table th:nth-child(6),
.volunteer-table td:nth-child(6) {
  width: 20%;
}

.volunteer-table th:nth-child(7),
.volunteer-table td:nth-child(7) {
  width: 19%;
}

.volunteer-table th:nth-child(8),
.volunteer-table td:nth-child(8) {
  width: 8%;
}

.volunteer-table .events-cell,
.volunteer-table .long-cell {
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
}

.volunteer-table .record-actions {
  min-width: 96px;
}

.volunteer-table .record-actions button {
  width: 100%;
  padding-inline: 8px;
}

.task-table th:nth-child(1),
.task-table td:nth-child(1) {
  width: 9%;
}

.task-table th:nth-child(2),
.task-table td:nth-child(2) {
  width: 24%;
}

.task-table th:nth-child(3),
.task-table td:nth-child(3),
.task-table th:nth-child(4),
.task-table td:nth-child(4) {
  width: 12%;
}

.task-table th:nth-child(5),
.task-table td:nth-child(5) {
  width: 16%;
}

.task-table th:nth-child(6),
.task-table td:nth-child(6),
.task-table th:nth-child(7),
.task-table td:nth-child(7),
.task-table th:nth-child(8),
.task-table td:nth-child(8) {
  width: 9%;
}

.task-table th:nth-child(9),
.task-table td:nth-child(9) {
  width: 10%;
}

.task-table .long-cell {
  min-width: 0;
  max-width: none;
}

.task-table .task-notes {
  margin: 8px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.task-table .overdue {
  color: var(--red);
  font-weight: 850;
}

.task-table .task-status {
  background: #edf3fa;
  color: var(--blue);
}

.repeating-rows,
.equipment-rows,
.organization-rows {
  display: grid;
  gap: 12px;
}

.timing-row {
  display: grid;
  grid-template-columns: minmax(120px, 11rem) minmax(240px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.row-order-actions {
  display: flex;
  gap: 6px;
}

.row-move {
  min-width: 42px;
  min-height: 42px;
  padding: 8px 10px;
}

.equipment-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 0.4fr) minmax(260px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.row-remove {
  min-height: 42px;
  white-space: nowrap;
}

.organization-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(240px, 1.2fr) minmax(200px, 1fr) auto;
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.event-form .panel-title-row .muted {
  max-width: 720px;
}

.nested-title {
  margin-top: 18px;
}

.nested-title h4 {
  margin: 0;
}

.organization-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 0 18px;
  border: 1px solid #cbd9e8;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 16px 18px;
  background: #f5f9fd;
}

.organization-actions > div {
  display: grid;
  gap: 4px;
  max-width: 920px;
}

.organization-actions strong {
  color: var(--ink);
  font-size: 17px;
}

.organization-actions span {
  color: var(--muted);
  line-height: 1.45;
}

.organization-actions button {
  flex: 0 0 auto;
  min-height: 46px;
  white-space: nowrap;
}

details {
  margin-top: 8px;
  max-width: 100%;
}

summary {
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.event-detail-section {
  display: block;
}

.event-detail-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  color: var(--ink);
  list-style: none;
}

.event-detail-section summary::-webkit-details-marker {
  display: none;
}

.event-detail-section summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #edf3fa;
  color: var(--blue);
  font-weight: 900;
}

.event-detail-section[open] summary {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.event-detail-section[open] summary::before {
  content: "-";
}

.event-detail-section summary > span:first-child {
  flex: 0 0 auto;
  font-size: 20px;
}

.event-detail-section summary > .muted {
  flex: 1 1 auto;
  text-align: right;
}

.section-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.safety-plan-fields {
  display: grid;
  gap: 24px;
}

.safety-plan-field {
  gap: 8px;
}

.field-help {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.site-safety-fields {
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.safety-plan-check {
  width: fit-content;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: #f6f9fd;
  color: var(--ink);
  font-weight: 750;
}

.safety-plan-check input {
  width: 19px;
  height: 19px;
  accent-color: var(--red);
}

pre {
  max-height: 260px;
  overflow: auto;
  border-radius: 6px;
  padding: 10px;
  background: #f6f9fd;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty-cell {
  color: var(--muted);
  font-weight: 750;
  text-align: center;
}

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

.feedback-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.feedback-item h3,
.feedback-item p {
  margin: 0 0 8px;
}

.feedback-item p {
  color: var(--ink);
}

.status-form {
  display: grid;
  gap: 10px;
}

@media (max-width: 1180px) {
  .equipment-row,
  .organization-row {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .equipment-row .check {
    min-height: 46px;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav,
  .carshow-toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .carshow-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .password-tools {
    grid-template-columns: 1fr;
  }

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

  .timing-row,
  .equipment-row,
  .organization-row {
    grid-template-columns: 1fr;
  }

  .organization-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .organization-actions button {
    width: 100%;
  }

  .feedback-item {
    grid-template-columns: 1fr;
  }

  .event-detail-section summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .event-detail-section summary > .muted {
    flex-basis: 100%;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100%, calc(100vw - 20px));
    margin-top: 18px;
  }

  .panel,
  .function-card,
  .auth-card {
    padding: 16px;
  }

  .form-actions > *,
  .page-actions > *,
  .filter-bar button,
  .inline-form button {
    width: 100%;
  }

  .management-table th,
  .management-table td {
    padding: 8px;
  }
}
