:root {
  --bg: #ecf6f7;
  --panel: #ffffff;
  --panel-alt: #0f2731;
  --text: #13222a;
  --muted: #5f7682;
  --line: rgba(19, 34, 42, 0.1);
  --brand: #16b3c4;
  --brand-deep: #0d8090;
  --navy: #0a1a22;
  --success: #2da86f;
  --warning: #d98c2b;
  --danger: #d85757;
  --muted-badge: #738790;
  --radius: 22px;
  --shadow: 0 20px 45px rgba(8, 26, 34, 0.1);
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 92px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(22, 179, 196, 0.2), transparent 28%),
    linear-gradient(180deg, #f4fbfc 0%, var(--bg) 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, .button, input, select, textarea {
  font: inherit;
}
button, .button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.button.secondary, .link-button {
  background: rgba(19, 34, 42, 0.08);
  color: var(--text);
}
.button.danger {
  background: var(--danger);
}
.link-button {
  width: 100%;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 1rem;
  background: #fff;
}
.file-input {
  padding: 0.9rem 1rem;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(22, 179, 196, 0.08), rgba(10, 26, 34, 0.03)),
    #fff;
}
.file-input::file-selector-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  padding: 0.8rem 1.15rem;
  margin-right: 0.85rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(13, 128, 144, 0.2);
}
.file-input::-webkit-file-upload-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  padding: 0.8rem 1.15rem;
  margin-right: 0.85rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(13, 128, 144, 0.2);
}
textarea { resize: vertical; }
label span, .eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }
small.muted { display: block; margin-top: 0.35rem; }
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}
.sidebar {
  background:
    linear-gradient(180deg, rgba(22, 179, 196, 0.12), transparent 22%),
    var(--navy);
  color: white;
  padding: 2rem 1.4rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: padding 180ms ease, width 180ms ease;
}
.sidebar-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}
.sidebar-toggle {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.brand-copy,
.nav form,
.nav a {
  transition: opacity 160ms ease, transform 160ms ease;
}
.brand-logo, .login-logo {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.brand h1, .login-card h1, .page-header h1 { margin: 0; }
.nav {
  display: grid;
  gap: 0.65rem;
}
.nav a, .nav .link-button {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.84);
}
.nav a.active, .nav a:hover, .nav .link-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.main {
  padding: 2rem;
  min-width: 0;
}
.page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.stats-grid, .cards-grid, .split-grid {
  display: grid;
  gap: 1rem;
}
.tabs-card {
  margin-bottom: 1rem;
}
.sort-card {
  margin-bottom: 1rem;
}
.section-toggle {
  min-width: 7.5rem;
  padding: 0.7rem 1rem;
}
.collapsible-card.is-collapsed {
  padding-bottom: 1rem;
}
.collapsible-card.is-collapsed .section-heading {
  margin-bottom: 0;
}
.category-nav {
  display: grid;
  gap: 1rem;
}
.category-nav-group {
  display: grid;
  gap: 0.65rem;
}
.category-nav-heading {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.category-nav-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.category-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.9rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(10, 26, 34, 0.04), rgba(22, 179, 196, 0.08));
  border: 1px solid rgba(19, 34, 42, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.category-nav-link strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(19, 34, 42, 0.08);
  font-size: 0.95rem;
  line-height: 1;
}
.category-nav-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.category-nav-link.active {
  background: linear-gradient(135deg, var(--navy), #12465b);
  color: white;
  border-color: rgba(22, 179, 196, 0.45);
}
.category-nav-link.active strong {
  background: rgba(255, 255, 255, 0.16);
}
.sort-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.sort-option {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(10, 26, 34, 0.04), rgba(22, 179, 196, 0.08));
  border: 1px solid rgba(19, 34, 42, 0.08);
}
.sort-option.active {
  background: linear-gradient(135deg, var(--navy), #12465b);
  color: white;
  border-color: rgba(22, 179, 196, 0.45);
}
.stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 1rem;
}
.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1rem;
}
.size-break-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.15rem 0.2rem 0;
}
.size-break-card strong {
  font-size: 1.9rem;
  line-height: 1;
}
.cards-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}
.settings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.settings-panel {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.settings-stat {
  padding: 1rem 1.1rem;
}
.settings-stat strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 2rem;
  line-height: 1;
}
.settings-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}
.settings-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}
.settings-card-head h3 {
  margin: 0;
}
.settings-card-head p {
  margin: 0.25rem 0 0;
}
.settings-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: rgba(22, 179, 196, 0.12);
  color: var(--navy);
  font-weight: 700;
}
.settings-create {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.2fr) 110px auto;
  gap: 0.65rem;
  align-items: center;
}
.settings-list {
  display: grid;
  gap: 0.7rem;
}
.settings-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.settings-search input {
  flex: 1 1 240px;
  margin-bottom: 0;
}
.settings-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.4fr) 84px 96px auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(19, 34, 42, 0.08);
  border-radius: 18px;
  background: rgba(244, 249, 251, 0.9);
}
.settings-row-wide {
  grid-template-columns: 66px minmax(0, 1.1fr) 44px minmax(0, 1.2fr) 52px minmax(0, 1fr) 84px 96px auto;
}
.settings-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.settings-hint {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}
.settings-row-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
}
.settings-row input,
.settings-row select,
.settings-create input,
.settings-create select {
  min-width: 0;
  margin-bottom: 0;
}
.settings-empty {
  padding: 1rem;
  border: 1px dashed rgba(19, 34, 42, 0.14);
  border-radius: 18px;
  background: rgba(244, 249, 251, 0.6);
}
.settings-empty p {
  margin: 0;
}
.settings-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.settings-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: rgba(244, 249, 251, 0.95);
  border: 1px solid rgba(19, 34, 42, 0.08);
  color: var(--navy);
  font-weight: 700;
}
.settings-page-link.active {
  background: linear-gradient(135deg, var(--navy), #12465b);
  color: white;
  border-color: rgba(22, 179, 196, 0.45);
}
.card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.stat-card strong {
  display: block;
  font-size: 2.1rem;
  margin-top: 0.3rem;
}
.filters, .form-grid, .inline-form, .stack, .list-stack {
  display: grid;
  gap: 1rem;
}
.filters, .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.detail-item {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(19, 34, 42, 0.08);
  border-radius: 18px;
  background: rgba(244, 249, 251, 0.7);
}
.detail-item span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-item strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.35;
}
.inline-form.wide {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: center;
}
.material-card {
  display: grid;
  grid-template-rows: 180px auto;
  overflow: hidden;
  padding: 0;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.material-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(8, 26, 34, 0.14);
}
.card-media {
  position: relative;
  height: 180px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.8rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(22, 179, 196, 0.2), rgba(10, 26, 34, 0.2));
}
.card-media img {
  max-width: none;
  max-height: none;
  width: calc(100% - 1.6rem);
  height: calc(100% - 1.6rem);
  object-fit: contain;
  object-position: center top;
  transform: scale(1.22);
  transform-origin: center top;
}
.media-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.placeholder-image {
  max-width: none;
  max-height: none;
  width: calc(100% - 1.6rem);
  height: calc(100% - 1.6rem);
  object-fit: contain;
  object-position: center top;
  transform: scale(1.22);
  transform-origin: center top;
  background: linear-gradient(135deg, rgba(22, 179, 196, 0.12), rgba(10, 26, 34, 0.08));
}
.material-meta {
  padding: 0.9rem 1.1rem 1rem 1.1rem;
}
.badge {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: white;
  font-size: 0.9rem;
}
.media-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 1;
}
.material-meta h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.05;
}
.material-shelf-number {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
}
.material-compact-meta {
  margin: 0.45rem 0 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}
.badge.success { background: var(--success); }
.badge.warning { background: var(--warning); }
.badge.danger { background: var(--danger); }
.badge.sold { background: #7564d8; }
.badge.muted { background: var(--muted-badge); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.media-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  padding-top: 0.8rem;
}
.media-actions-column {
  display: grid;
  align-items: stretch;
}
.media-card {
  display: grid;
  gap: 0.8rem;
}
.placeholder-card img {
  max-height: 260px;
  object-fit: contain;
  background: linear-gradient(135deg, rgba(22, 179, 196, 0.12), rgba(10, 26, 34, 0.08));
  padding: 1rem;
}
.media-card img {
  border-radius: 16px;
}
.preview-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 16px;
}
.preview-card p {
  margin-bottom: 0;
}
.description-render {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(19, 34, 42, 0.08);
  border-radius: 18px;
  background: rgba(244, 249, 251, 0.7);
}
.repair-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 40;
}
.repair-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 26, 34, 0.45);
  backdrop-filter: blur(4px);
}
.repair-modal-card,
.repair-ticket-card {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(19, 34, 42, 0.08);
  border-radius: 18px;
  background: rgba(244, 249, 251, 0.7);
}
.repair-modal-card {
  position: relative;
  width: min(100%, 760px);
  max-height: min(90vh, 860px);
  overflow: auto;
  box-shadow: 0 28px 60px rgba(8, 26, 34, 0.28);
  background: rgba(255, 255, 255, 0.96);
}
.repair-ticket-list {
  display: grid;
  gap: 0.9rem;
}
.repair-list-card {
  display: grid;
  gap: 0.8rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.repair-list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(8, 26, 34, 0.14);
}
.repair-list-description {
  padding: 0.85rem 1rem;
}
.repair-list-description p {
  margin: 0;
}
.repair-ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.repair-ticket-head h2,
.repair-ticket-head h3 {
  margin: 0;
}
.repair-ticket-head p {
  margin: 0.3rem 0 0;
}
.repair-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.repair-inline-form {
  display: grid;
  gap: 0.75rem;
  align-items: end;
}
.repair-close-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.description-empty {
  min-height: 5rem;
  display: grid;
  align-items: center;
}
.description-render > :first-child {
  margin-top: 0;
}
.description-render > :last-child {
  margin-bottom: 0;
}
.code-textarea {
  min-height: 18rem;
  font-family: "SFMono-Regular", "Menlo", "Monaco", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
}
.checkbox {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.checkbox input {
  width: auto;
}
body.modal-open {
  overflow: hidden;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.login-card, .narrow {
  width: min(100%, 480px);
}
.alert.error {
  color: var(--danger);
}

html.sidebar-collapsed .app-shell {
  grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}
html.sidebar-collapsed .sidebar {
  padding-inline: 0.9rem;
}
html.sidebar-collapsed .sidebar-top {
  justify-content: center;
}
html.sidebar-collapsed .brand {
  justify-content: center;
  margin-bottom: 1rem;
}
html.sidebar-collapsed .brand-copy,
html.sidebar-collapsed .nav form,
html.sidebar-collapsed .nav a {
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
}
html.sidebar-collapsed .nav {
  gap: 0;
}
html.sidebar-collapsed .brand-logo {
  width: 52px;
  height: 52px;
}
html.sidebar-collapsed .sidebar-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
html.sidebar-collapsed .sidebar-toggle span:nth-child(2) {
  opacity: 0;
}
html.sidebar-collapsed .sidebar-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    height: auto;
    padding: 0.6rem 0.85rem;
    z-index: 20;
    box-shadow: var(--shadow);
    overflow: visible;
  }
  .sidebar-top {
    justify-content: flex-start;
    margin-bottom: 0;
  }
  .sidebar-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .brand {
    margin: 0.55rem 0 0 0;
    gap: 0.7rem;
  }
  .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }
  .brand-copy .eyebrow {
    margin-bottom: 0.1rem;
    font-size: 0.68rem;
  }
  .brand-copy h1 {
    font-size: 1rem;
    line-height: 1.1;
  }
  .nav {
    margin-top: 0.75rem;
  }
  html.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }
  html.sidebar-collapsed .sidebar {
    right: auto;
    width: 3.8rem;
    padding: 0.55rem;
  }
  html.sidebar-collapsed .sidebar-top {
    justify-content: center;
  }
  html.sidebar-collapsed .brand,
  html.sidebar-collapsed .nav {
    display: none;
  }
  .main {
    padding: 5.25rem 1rem 1rem 1rem;
  }
  .page-header {
    align-items: flex-start;
  }
  .page-header .button {
    width: 100%;
  }
  .section-toggle {
    min-width: 0;
    padding-inline: 0.9rem;
  }
  .category-nav-items {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }
  .category-nav-items::-webkit-scrollbar {
    display: none;
  }
  .category-nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .sort-options {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .sort-options::-webkit-scrollbar {
    display: none;
  }
  .sort-option {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .sort-card {
    padding: 0.9rem 0.95rem;
    margin-bottom: 0.8rem;
  }
  .sort-card .section-heading {
    margin-bottom: 0.5rem;
  }
  .sort-card h2 {
    margin: 0;
    font-size: 1.05rem;
  }
  .sort-options {
    gap: 0.45rem;
  }
  .sort-option {
    min-height: 2.4rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.95rem;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .material-card {
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-rows: 1fr;
    align-items: stretch;
    min-height: 120px;
  }
  .card-media {
    height: auto;
    min-height: 120px;
    padding: 0.55rem;
    border-radius: 22px 0 0 22px;
  }
  .card-media img,
  .placeholder-image {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    transform: none;
  }
  .material-meta {
    display: grid;
    align-content: center;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem 0.85rem 0.9rem;
  }
  .material-meta h2 {
    font-size: 1.15rem;
    line-height: 1.05;
  }
  .material-shelf-number,
  .material-compact-meta {
    margin-top: 0;
    font-size: 0.95rem;
    line-height: 1.2;
  }
  .media-badge {
    top: 0.45rem;
    right: 0.45rem;
    padding: 0.28rem 0.6rem;
    font-size: 0.78rem;
  }
  .repair-ticket-head {
    flex-direction: column;
    align-items: stretch;
  }
  .repair-actions-grid,
  .repair-close-form {
    grid-template-columns: 1fr;
  }
  .repair-modal-card,
  .repair-ticket-card {
    padding: 0.95rem;
  }
  .repair-modal {
    padding: 0.75rem;
  }
  .repair-modal-card {
    width: 100%;
    max-height: calc(100vh - 1.5rem);
  }
  .stats-grid, .split-grid, .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-summary {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    overflow-x: auto;
    gap: 0.7rem;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }
  .settings-summary::-webkit-scrollbar {
    display: none;
  }
  .settings-stat {
    min-height: 112px;
    padding: 0.95rem 1rem;
  }
  .settings-stat strong {
    font-size: 1.75rem;
  }
  .settings-panel {
    gap: 0.85rem;
  }
  .settings-card {
    gap: 0.8rem;
    padding: 0.95rem;
  }
  .settings-card-head {
    align-items: center;
  }
  .settings-card-head p {
    margin-top: 0.15rem;
    font-size: 0.95rem;
    line-height: 1.35;
  }
  .settings-count {
    min-width: 2rem;
    height: 2rem;
    padding-inline: 0.6rem;
  }
  .settings-create,
  .settings-row,
  .settings-row-wide {
    grid-template-columns: 1fr;
  }
  .settings-create {
    gap: 0.55rem;
    padding: 0.75rem;
    border-radius: 18px;
    background: rgba(244, 249, 251, 0.75);
  }
  .settings-create > .button,
  .settings-create > button {
    width: 100%;
  }
  .settings-search {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .settings-search .button,
  .settings-search button {
    width: 100%;
  }
  .settings-row,
  .settings-row-wide {
    gap: 0.45rem;
    padding: 0.85rem;
    border-radius: 20px;
  }
  .settings-row .settings-label,
  .settings-row-wide .settings-label {
    margin-top: 0.25rem;
  }
  .settings-row input,
  .settings-row select,
  .settings-row-wide input,
  .settings-row-wide select {
    min-height: 3rem;
  }
  .settings-row-actions {
    justify-content: stretch;
    margin-top: 0.35rem;
  }
  .settings-row-actions > * {
    flex: 1;
  }
  .settings-hint {
    white-space: normal;
    padding: 0.15rem 0 0.3rem;
  }
  .settings-pagination {
    justify-content: center;
    gap: 0.45rem;
  }
  .settings-page-link {
    min-width: 2.3rem;
    height: 2.3rem;
    padding-inline: 0.75rem;
  }
}
