*[hidden] { display: none !important; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #f7faff, #edf3fb);
}

.auth-card {
  width: min(420px, 100%);
  padding: 32px;
  background: #fff;
  border: 1px solid #e2e9f3;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(69, 98, 145, .13);
}

.auth-heading { margin: 36px 0 22px; }
.auth-heading h1 { margin: 8px 0; font-size: 27px; color: #2f405c; }
.auth-heading p, .modal-card p { margin: 0; color: #8795a8; font-size: 12px; line-height: 1.7; }
.auth-form, .modal-card label { display: grid; gap: 14px; }
.auth-form label, .modal-card label { color: #65758e; font-size: 11px; font-weight: 600; }
.auth-form input, .modal-card input { width: 100%; box-sizing: border-box; margin-top: 7px; border: 1px solid #dce5f0; border-radius: 8px; padding: 11px 12px; color: #2f405c; outline: none; background: #fbfdff; }
.auth-form input:focus, .modal-card input:focus { border-color: #7890e5; box-shadow: 0 0 0 3px rgba(120, 144, 229, .12); }
.form-error, .inline-error { color: #b34f62; background: #fff4f5; border: 1px solid #f0d6db; border-radius: 8px; padding: 10px 12px; font-size: 11px; line-height: 1.5; }
.global-state { min-height: 0; padding: 0 34px; }
.global-state.loading { padding-top: 10px; color: #6f83d2; font-size: 11px; }
.global-state.error { padding-top: 10px; color: #b34f62; font-size: 11px; }
.inline-state { min-height: 24px; color: #8795a8; font-size: 11px; }
.overview-usage, .usage-detail { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.data-stat { padding: 13px; border: 1px solid #edf1f6; border-radius: 8px; background: #fbfcfe; }
.data-stat span, .data-stat strong { display: block; }
.data-stat span { color: #98a5b6; font-size: 10px; }
.data-stat strong { margin-top: 7px; color: #51698f; font-size: 18px; }
.empty-state { padding: 24px 12px; color: #9ba7b6; text-align: center; font-size: 11px; }
.model-option input { position: absolute; opacity: 0; pointer-events: none; }
.model-option { cursor: pointer; }
.model-option.disabled { cursor: not-allowed; opacity: .55; }
.model-option.readonly { cursor: default; background: #f8fafc; border-style: dashed; }
.model-option.readonly .readonly-dot { border-radius: 4px; background: #e7edf5; border-color: #cbd5e1; }
.model-copy small { display: block; margin-top: 5px; color: #a1adbc; font-size: 9px; overflow-wrap: anywhere; }
.model-tag.fixed { color: #5f6f87; background: #edf1f6; }
.policy-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid #f0f3f6; font-size: 10px; }
.policy-list > div:last-child { border-bottom: 0; }
.policy-list span { color: #9aa6b6; }
.policy-list strong { color: #607391; text-align: right; word-break: break-word; }
.fallback-row { cursor: default; }
.fallback-row button { margin-left: auto; }
.fallback-status.unknown { color: #9aa6b6; background: #f2f4f7; }
.health-badge.unknown { color: #8b97a7; background: #f2f4f7; }
.health-badge.down { color: #b34f62; background: #fff0f2; }
.health-badge.disabled { color: #8b97a7; background: #f2f4f7; }
.table-empty { padding: 24px !important; color: #9ba7b6; text-align: center; }
.device-cell > div span { display: block; margin-top: 4px; color: #9ba7b6; font-size: 9px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(32, 49, 78, .28); }
.modal-card { width: min(420px, 100%); padding: 22px; background: #fff; border-radius: 12px; box-shadow: 0 22px 60px rgba(33, 49, 78, .23); }
.modal-card .card-heading { margin-bottom: 15px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-actions .button { min-width: 100px; }
.inventory-note { padding: 22px; color: #9ba7b6; font-size: 11px; }
.release-row .release-meta { flex: 1; min-width: 0; }
.release-row .release-meta strong, .release-row .release-meta span { display: block; }
.release-row .release-meta span { margin-top: 4px; color: #9ba7b6; font-size: 9px; }
.audit-event .audit-main p { overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .auth-card { padding: 24px; }
  .global-state { padding: 0 16px; }
  .overview-usage, .usage-detail { grid-template-columns: 1fr; }
}

.provider-credentials-card { margin-top: 16px; }
.provider-credentials-card .card-heading { gap: 18px; }
.card-description { max-width: 620px; margin: 7px 0 0; color: #8795a8; font-size: 11px; line-height: 1.6; }
.credential-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.credential-card { min-width: 0; padding: 18px; border: 1px solid #e5ebf3; border-radius: 11px; background: linear-gradient(145deg, #fff, #fbfdff); }
.credential-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 39px; }
.credential-provider { display: flex; align-items: center; gap: 10px; min-width: 0; }
.credential-provider .provider-logo { width: 32px; height: 32px; }
.credential-provider h3 { margin: 0; color: #2f405c; font-size: 14px; }
.credential-provider span { display: block; margin-top: 4px; color: #9aa6b6; font-family: ui-monospace, monospace; font-size: 12px; }
.generation-label { flex: none; color: #9aa6b6; font-size: 12px; }
.generation-label strong { color: #607391; font-family: ui-monospace, monospace; font-weight: 650; }
.credential-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 17px 0; padding: 12px 0; border-top: 1px solid #eef2f6; border-bottom: 1px solid #eef2f6; }
.credential-status-grid > div { min-width: 0; }
.credential-status-grid > div > span { display: block; margin-bottom: 7px; color: #9aa6b6; font-size: 12px; }
.credential-badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 7px; border-radius: 11px; font-size: 12px; white-space: nowrap; }
.credential-badge i { width: 5px; height: 5px; flex: none; border-radius: 50%; background: currentColor; }
.credential-badge.good { color: #278f6a; background: #eaf9f2; }
.credential-badge.warning { color: #a3681f; background: #fff4e4; }
.credential-badge.danger { color: #a53f55; background: #fff0f2; }
.credential-badge.neutral { color: #718097; background: #f1f4f8; }
.credential-form { min-width: 0; }
.credential-form > label { display: block; margin-bottom: 7px; color: #65758e; font-size: 13px; font-weight: 650; }
.credential-input-row { display: flex; gap: 8px; align-items: stretch; }
.credential-input-row input { flex: 1; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 10px 12px; border: 1px solid #dce5f0; border-radius: 8px; outline: none; color: #2f405c; background: #fbfdff; font-family: ui-monospace, monospace; font-size: 13px; }
.credential-input-row input:focus { border-color: #6e89e4; box-shadow: 0 0 0 3px rgba(110, 137, 228, .18); }
.credential-input-row input[aria-invalid="true"] { border-color: #d35d70; }
.credential-input-row input:disabled { cursor: not-allowed; opacity: .6; }
.credential-toggle { min-width: 64px; min-height: 44px; padding: 8px 11px; border: 1px solid #dce5f0; border-radius: 8px; color: #566b91; background: #fff; cursor: pointer; font-size: 12px; font-weight: 650; }
.credential-toggle:hover { border-color: #bdcce2; background: #fafcff; }
.credential-toggle:disabled { cursor: not-allowed; opacity: .55; }
.credential-help { min-height: 31px; margin: 8px 0 0; color: #7d8ca2; font-size: 12px; line-height: 1.55; }
.credential-field-error { min-height: 18px; margin: 5px 0 0; color: #a53f55; font-size: 12px; line-height: 1.5; }
.credential-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; margin-top: 14px; }
.credential-actions .button { min-height: 44px; min-width: 112px; cursor: pointer; }
.credential-actions .button.primary { min-width: 132px; }
.credential-actions .button.danger { border-color: #f0d6db; color: #ad4d5c; background: #fff7f8; box-shadow: none; }
.credential-actions .button.danger:hover { border-color: #e5b7c0; background: #fff0f2; }
.credential-actions .button:disabled, .credential-toggle:disabled { cursor: not-allowed; }
.credential-operation-error { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; margin: 10px 0 0; padding: 8px 10px; border: 1px solid #f0d6db; border-radius: 7px; color: #a53f55; background: #fff4f5; font-size: 12px; line-height: 1.5; }
.credential-operation-error > span { min-width: 0; overflow-wrap: anywhere; }
.inline-retry { flex: none; min-height: 36px; padding: 6px 9px; border: 1px solid #e5b7c0; border-radius: 7px; color: #a53f55; background: #fff; cursor: pointer; font-size: 10px; font-weight: 650; }
.inline-retry:hover { background: #fff0f2; }
.credential-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 14px; color: #75849a; font-size: 12px; line-height: 1.55; }
.credential-note > span:first-child { display: grid; width: 16px; height: 16px; flex: none; place-items: center; border-radius: 50%; color: #6686d7; background: #e5edff; font-size: 10px; }
.credential-note > span:last-child { min-width: 0; }
.button:focus-visible, .credential-toggle:focus-visible, .inline-retry:focus-visible, .icon-button:focus-visible, input:focus-visible { outline: 2px solid #496bd2; outline-offset: 2px; }
.credential-actions .button[aria-busy="true"] { cursor: wait; }

@media (max-width: 700px) {
  .provider-credentials-card .card-heading { display: block; }
  .provider-credentials-card .card-heading > .safe-inline { display: inline-block; margin-top: 12px; }
  .credential-list { grid-template-columns: 1fr; }
  .credential-card { padding: 15px; }
  .credential-status-grid { gap: 6px; }
  .credential-badge { font-size: 12px; }
  .credential-actions .button { flex: 1 1 135px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-panel { animation: none; }
  .toast { transition: none; }
}
