.prefix-page {
  width: 100%;
}
.prefix-inventory {
  overflow: hidden;
}
.prefix-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.prefix-search {
  width: min(100%, 360px);
}
.prefix-search input {
  width: 100%;
  height: 38px;
  padding: 0 13px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 12px var(--font-body);
  outline: 0;
}
.prefix-search input:focus,
.prefix-filter:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.prefix-filters {
  display: flex;
  gap: 10px;
}
.prefix-filter {
  min-width: 150px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 12px var(--font-body);
  outline: 0;
}
.prefix-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.prefix-summary-item {
  min-height: 74px;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
}
.prefix-summary-item:last-child {
  border-right: 0;
}
.prefix-summary-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.prefix-summary-item b {
  display: block;
  font: 600 22px var(--font-display);
  color: var(--text);
}
.prefix-table-wrap {
  overflow-x: auto;
}
.prefix-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}
.prefix-table th {
  padding: 12px 16px;
  background: var(--surface-muted, #f6f8fa);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.prefix-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  vertical-align: middle;
}
.prefix-table tbody tr:last-child td {
  border-bottom: 0;
}
.prefix-table tbody tr:hover td {
  background: var(--surface-muted, #f8fafc);
}
.prefix-name-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 270px;
}
.prefix-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 500 10px var(--font-mono);
}
.prefix-name-text {
  min-width: 0;
}
.cell-primary {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}
.cell-primary:hover {
  color: var(--accent);
}
.prefix-code {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font: 10px var(--font-mono);
}
.prefix-mono {
  font: 11px var(--font-mono);
}
.prefix-utilization {
  width: 225px;
}
.prefix-utilization-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 10px;
}
.prefix-utilization-top span {
  color: var(--text-muted);
  font: 10px var(--font-mono);
}
.prefix-utilization-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce3eb;
}
.prefix-utilization-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.prefix-utilization small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 9px;
}
.prefix-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.prefix-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}
.prefix-count,
.prefix-empty {
  color: var(--text-muted);
  font-size: 11px;
}
.prefix-empty {
  padding: 40px 20px;
  text-align: center;
}
.prefix-modal {
  width: min(1000px, calc(100vw - 32px));
  max-width: 1000px;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgb(15 23 42 / 24%);
}
.prefix-modal::backdrop {
  background: rgb(15 23 42 / 58%);
  backdrop-filter: blur(2px);
}
.prefix-modal-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 32px);
}
.prefix-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.prefix-modal-head h2 {
  margin: 3px 0 0;
  font: 600 22px var(--font-display);
}
.eyebrow {
  color: var(--accent);
  font: 500 10px var(--font-mono);
  letter-spacing: 0.08em;
}
.prefix-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
.prefix-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.prefix-modal-body {
  overflow-y: auto;
}
.prefix-form-section {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.prefix-form-section h3 {
  margin: 0;
  font: 600 16px var(--font-display);
}
.prefix-form-section > p {
  margin: 5px 0 18px;
  color: var(--text-muted);
  font-size: 12px;
}
.prefix-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 18px;
}
.prefix-field {
  min-width: 0;
}
.prefix-field.full {
  grid-column: 1/-1;
}
.prefix-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.prefix-field label span {
  color: var(--text-muted);
  font-weight: 400;
}
.prefix-field input,
.prefix-field select,
.prefix-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 12px var(--font-body);
  outline: 0;
}
.prefix-field input,
.prefix-field select {
  height: 42px;
  padding: 0 12px;
}
.prefix-field textarea {
  min-height: 90px;
  padding: 11px 12px;
  resize: vertical;
}
.prefix-field input:focus,
.prefix-field select:focus,
.prefix-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.prefix-field input:disabled {
  background: var(--surface-muted, #f5f7fa);
  color: var(--text-muted);
  cursor: not-allowed;
}
.mono-input {
  font-family: var(--font-mono) !important;
}
.prefix-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
@media (max-width: 900px) {
  .prefix-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .prefix-search {
    width: 100%;
  }
  .prefix-filters {
    width: 100%;
  }
  .prefix-filter {
    flex: 1;
  }
  .prefix-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .prefix-summary-item:nth-child(2) {
    border-right: 0;
  }
  .prefix-summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 650px) {
  .prefix-form-grid {
    grid-template-columns: 1fr;
  }
  .prefix-field.full {
    grid-column: auto;
  }
  .prefix-filters {
    flex-direction: column;
  }
  .prefix-filter {
    width: 100%;
  }
  .prefix-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .prefix-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
}
