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

.api-admin-launcher {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #b8c4d5;
  border-radius: 10px;
  color: #12315e;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(7, 27, 61, 0.16);
  font: 800 14px/1.2 var(--font, Pretendard, "Noto Sans KR", sans-serif);
  cursor: pointer;
}

.api-admin-launcher:hover { color: #0645c9; border-color: #2c75f2; }

.api-admin-overlay {
  position: fixed;
  z-index: 300;
  inset: 0;
  overflow-y: auto;
  padding: 24px;
  font-family: var(--font, Pretendard, "Noto Sans KR", sans-serif);
}

.api-admin-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 18, 43, 0.7);
  backdrop-filter: blur(4px);
}

.api-admin-modal {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 3.5vw, 40px);
  color: #162641;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(4, 18, 43, 0.3);
}

.api-admin-head,
.api-section-head,
.api-admin-foot,
.api-collection-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.api-admin-head h2,
.api-section-head h3 { margin: 0; color: #071b3d; letter-spacing: -0.035em; }
.api-admin-head h2 { font-size: clamp(25px, 3vw, 34px); }
.api-section-head h3 { font-size: 20px; }
.api-admin-head p,
.api-section-head p { margin: 6px 0 0; color: #53627a; }

.api-admin-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ccd5e1;
  border-radius: 50%;
  color: #12315e;
  background: #fff;
  font: 400 24px/1 sans-serif;
  cursor: pointer;
}

.api-security-note {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  margin: 24px 0;
  padding: 16px 18px;
  color: #304e74;
  background: #edf4ff;
  border-left: 4px solid #0c56e8;
  border-radius: 8px;
}

.api-security-note strong { color: #071b3d; }

.api-provider-list { border-top: 1px solid #dce3ec; }

.api-provider-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(230px, 1.5fr) repeat(4, auto);
  gap: 9px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #dce3ec;
}

.api-provider-copy { display: flex; flex-direction: column; min-width: 0; }
.api-provider-copy strong { color: #071b3d; }
.api-provider-copy span { color: #64748b; font-size: 12px; }

.api-key-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: #162641;
  background: #fff;
  border: 1px solid #b8c4d5;
  border-radius: 8px;
}

.api-small-button,
.api-delete-button,
.api-text-button,
.api-primary-button,
.api-secondary-button,
.api-delete-all {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #ccd5e1;
  border-radius: 8px;
  color: #12315e;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.api-small-button.is-test,
.api-primary-button { color: #fff; background: #0645c9; border-color: #0645c9; }
.api-delete-button,
.api-delete-all { color: #c43128; }
.api-text-button { min-height: auto; padding: 5px; border: 0; color: #0645c9; }
.api-secondary-button { padding-inline: 16px; }
button:disabled { cursor: not-allowed; opacity: 0.48; }

.api-provider-status {
  grid-column: 2 / -1;
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.api-provider-status.is-ready { color: #08744e; }
.api-provider-status.is-error { color: #c43128; }
.api-provider-status.is-loading { color: #0645c9; }

.api-work-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid #ccd5e1;
}

.api-file-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
  padding: 14px 16px;
  color: #12315e;
  background: #f7f9fc;
  border: 1px dashed #aab4c2;
  border-radius: 10px;
  font-weight: 800;
}

.api-file-picker input { min-width: 0; }
.api-empty-copy,
.api-file-error,
.api-collection-progress { margin: 14px 0 0; padding: 14px 16px; border-radius: 8px; }
.api-empty-copy { color: #53627a; background: #f7f9fc; }
.api-file-error { color: #9e2b25; background: #fff1ef; }
.api-collection-progress { color: #0645c9; background: #edf4ff; font-weight: 800; }

.api-file-summary,
.api-collection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 14px 0 0;
  background: #dce3ec;
  border: 1px solid #dce3ec;
  border-radius: 10px;
}

.api-file-summary div,
.api-collection-summary div { min-width: 0; padding: 12px 14px; background: #fff; }
.api-file-summary dt,
.api-collection-summary dt { color: #64748b; font-size: 11px; font-weight: 800; }
.api-file-summary dd,
.api-collection-summary dd { margin: 4px 0 0; color: #071b3d; font-weight: 800; overflow-wrap: anywhere; }
.api-file-summary code { font-size: 10px; font-weight: 600; }

.api-route-list { margin-top: 12px; color: #53627a; }
.api-route-list summary { color: #0645c9; font-weight: 800; cursor: pointer; }
.api-route-list p { font-size: 12px; line-height: 1.8; }
.api-collection-actions { justify-content: flex-start; margin-top: 18px; }
.api-admin-foot { margin-top: 34px; padding-top: 20px; border-top: 1px solid #dce3ec; }

@media (max-width: 900px) {
  .api-provider-row { grid-template-columns: minmax(0, 1fr) repeat(4, auto); }
  .api-provider-copy,
  .api-key-field,
  .api-provider-status { grid-column: 1 / -1; }
  .api-file-summary,
  .api-collection-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .api-admin-overlay { padding: 0; }
  .api-admin-modal { min-height: 100vh; border-radius: 0; }
  .api-admin-head,
  .api-section-head { align-items: flex-start; }
  .api-provider-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .api-key-field,
  .api-provider-copy,
  .api-provider-status { grid-column: 1 / -1; }
  .api-small-button,
  .api-delete-button { width: 100%; }
  .api-file-summary,
  .api-collection-summary { grid-template-columns: 1fr; }
  .api-security-note { grid-template-columns: 1fr; }
  .api-file-picker { align-items: flex-start; flex-direction: column; }
  .api-admin-launcher { right: 12px; bottom: 12px; }
}

@media print {
  .api-admin-launcher,
  .api-admin-overlay { display: none !important; }
}
