@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: #e8eef1;
  background: #070d12;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 1000px; min-height: 100%; margin: 0; }
body { overflow: hidden; background: #070d12; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .5; cursor: not-allowed; }
.hidden { display: none !important; }

.modal {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  overflow: auto;
}
.modal.wide { width: min(900px, calc(100vw - 32px)); }
.modal > form { padding: 26px; }
.modal-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #8b9893;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1, h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-weight: 600; }
.close-button {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(151,174,193,.23);
  border-radius: 50%;
  color: #9cabb4;
  background: rgba(151,174,193,.05);
  cursor: pointer;
  font-size: 19px;
}
.modal-intro {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}
.modal-actions > span { flex: 1; }
.primary-button, .ghost-button, .danger-button {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}
.primary-button { color: #071016; background: linear-gradient(135deg, #b78b31, #e0bd64); }
.ghost-button { color: #b6c2c8; background: #111c23; }
.danger-button { color: #ee9a91; background: rgba(125,42,36,.24); }
.modal input, .modal select {
  width: 100%;
  height: 38px;
  margin-top: 5px;
  padding: 0 11px;
  border: 1px solid #354750;
  border-radius: 8px;
  outline: none;
  color: #e8eef1;
  background: #071016;
}
.modal input:focus, .modal select:focus { border-color: #c3a151; }
.modal select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23c3a151' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.provider-list { overflow-y: auto; }
.provider-row {
  overflow: hidden;
  margin-bottom: 9px;
  border: 1px solid rgba(151,174,193,.18);
  border-radius: 14px;
  background: rgba(5,11,16,.52);
}
.provider-summary {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  color: #dce5e9;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.provider-summary:hover { background: rgba(151,174,193,.06); }
.provider-summary-main { min-width: 0; }
.provider-summary-main b, .provider-summary-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.provider-summary-main b { font-size: 12px; }
.provider-summary-main small { margin-top: 4px; color: #7c8d97; font-size: 9px; }
.provider-summary-type {
  padding: 5px 8px;
  border-radius: 7px;
  color: #b7c4cb;
  background: rgba(151,174,193,.09);
  font-size: 9px;
  white-space: nowrap;
}
.provider-chevron {
  color: #c9a94f;
  font-size: 18px;
  text-align: center;
  transition: transform .18s ease;
}
.provider-row.expanded .provider-chevron { transform: rotate(180deg); }
.provider-body { display: none; padding: 13px 14px 14px; border-top: 1px solid rgba(151,174,193,.14); }
.provider-row.expanded .provider-body { display: block; }
.provider-row-head {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 11px;
}
.provider-row-head label, .provider-fields label, .provider-options label {
  min-width: 0;
  margin: 0;
  color: #94a3ac;
  font-size: 9px;
}
.provider-row-actions { height: 38px; display: flex; gap: 6px; }
.provider-test, .provider-duplicate, .provider-delete {
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid #3a4b54;
  border-radius: 8px;
  color: #c0ccd2;
  background: #111c23;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}
.provider-delete {
  width: 38px;
  padding: 0;
  border-color: rgba(211,99,89,.35);
  color: #e58980;
  background: rgba(211,99,89,.06);
  font-size: 19px;
}
.provider-fields {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 10px;
}
.provider-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 9px;
}
.provider-options-note {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(199,165,79,.2);
  border-radius: 9px;
  color: #a89770;
  background: rgba(199,165,79,.055);
  font-size: 9px;
  line-height: 1.5;
}
.provider-options-note > b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #071016;
  background: #c9a94f;
}
.provider-test-status { display: none; margin: 8px 2px 0; font-size: 10px; line-height: 1.5; }
.provider-test-status.show { display: block; }
.provider-test-status.success { color: #63d7a8; }
.provider-test-status.error { color: #ee9a91; }
.add-provider {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px dashed rgba(204,169,81,.46);
  border-radius: 11px;
  color: #d8ba64;
  background: rgba(204,169,81,.055);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.toast {
  position: fixed;
  inset: auto 50% 10%;
  z-index: 9000;
  width: fit-content;
  max-width: min(680px, calc(100vw - 40px));
  margin: 0;
  padding: 12px 18px;
  border: 1px solid rgba(218,180,89,.3);
  border-radius: 10px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
  color: #f4ead0;
  background: #111c23;
  box-shadow: 0 12px 44px rgba(0,0,0,.5);
  pointer-events: none;
  font-size: 12px;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .provider-row-head, .provider-fields, .provider-options { grid-template-columns: 1fr; }
  .provider-options-note { grid-column: 1; }
}
