.client-keys-page {display:grid;gap:18px;min-width:0}
.client-keys-page>.page-head {margin:0}
.client-keys-page>.page-head>div:first-child {min-width:0}
.client-keys-page .head-actions {flex-shrink:0}
.key-banner {display:flex;align-items:center;gap:14px;padding:20px;background:var(--primary-soft);border:1px solid var(--primary-border);min-width:0}
.key-banner-icon {display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:6px;background:#dbeafe;color:var(--primary-ink)}
.key-banner-icon>.icon {width:24px;height:24px}
.key-banner-copy {min-width:0;flex:1}
.key-banner-copy h2 {font-size:18px;line-height:28px;color:var(--primary-ink)}
.key-banner-copy p {font-size:12px;line-height:22px;margin-top:5px;color:var(--text)}
.key-banner-copy code {padding:3px 7px;background:white;color:var(--primary-ink);border-radius:4px;overflow-wrap:anywhere}
.key-steps {display:flex;gap:8px;flex-wrap:wrap;padding:0;margin:0;list-style:none;font-size:12px;color:var(--primary-ink)}
.key-steps li {display:flex;align-items:center;gap:7px;padding:7px 10px;background:#dbeafe;border-radius:6px;white-space:nowrap}
.key-steps b {display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:white;font-size:12px}
.key-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.key-stats .stat,.key-stats .stat:first-child,.key-stats .stat:last-child {border:1px solid var(--line);min-height:80px;padding:16px;gap:12px;align-items:center;border-radius:8px}
.key-stats .stat strong {font-size:26px;line-height:30px;margin:3px 0 0}
.key-stats .stat small {display:none}
.key-stats .key-stat-running .stat-icon {background:#eaf8f4;color:#16806b}
.key-stats .key-stat-calls .stat-icon {background:#f2f4f7;color:#667085}
.key-stats .key-stat-expiry .stat-icon {background:#fff4e5;color:#b26a11}
.key-stats .stat .stat-icon>.icon {color:inherit}
.key-list {padding:22px 18px;background:var(--surface);min-width:0}
.key-list-heading {padding:6px 12px 16px}
.key-list-heading h2 {font-size:15px;line-height:24px}
.key-list-heading p {font-size:12px;line-height:20px;margin-top:4px}
.key-table-wrap {position:relative;padding-bottom:65px;margin-bottom:-65px;isolation:isolate}
.key-table-wrap:has(.key-more[open]) {padding-bottom:250px;margin-bottom:-250px}
.key-table {table-layout:fixed;min-width:1124px;border-collapse:separate;border-spacing:0}
.key-table .key-name-col {width:210px}
.key-table .key-description-col {width:145px}
.key-table .key-creator-col {width:105px}
.key-table .key-date-col {width:100px}
.key-table .key-expiry-col {width:115px}
.key-table .key-scope-col {width:225px}
.key-table .key-actions-col {width:224px}
.key-table th,.key-table td {border-bottom:1px solid var(--line)}
.key-table tbody tr {background:#fff}
.key-table tbody tr:nth-child(even) {background:#f8f9fb}
.key-table td {background:inherit}
.key-name-cell {display:flex;align-items:center;gap:10px;min-width:0}
.key-row-icon {width:28px;height:28px;display:grid;place-items:center;border-radius:6px;background:var(--primary-soft);color:var(--primary);flex-shrink:0}
.key-row-icon>.icon {width:16px;height:16px}
.key-identity {min-width:0}
.key-name-text {display:block;color:var(--ink);font-weight:600}
.key-identity>.key-prefix {display:block;color:#8993a3;font-size:var(--font-meta);line-height:20px;overflow-wrap:anywhere;white-space:normal}
.key-full-text {display:block;min-width:0}
.key-name-text .cell-full-text-body {font-weight:400}
.key-status {display:inline-block;font-size:var(--font-meta);color:var(--muted)}
.key-status.expired {color:var(--red)}
.key-creator {display:flex;align-items:center;gap:7px;min-width:0}
.key-creator>.key-full-text {flex:1}
.key-avatar {width:27px;height:27px;display:grid;place-items:center;flex:0 0 27px;border-radius:50%;background:#dbeafe;color:var(--primary-ink);font-size:12px;font-weight:600}
.key-expiry-note {display:block;font-size:var(--font-meta);line-height:20px;color:#8993a3;margin-top:3px}
.key-permanent {font-size:12px;color:#a76a16;border-bottom:1px dashed #d6ad69}
.key-actions-cell,.key-table th:last-child {position:sticky;right:0;z-index:1;box-shadow:-5px 0 10px -8px #475467}
.key-table td.key-actions-cell {overflow:visible}
.key-table th:last-child {background:var(--surface-subtle)}
.key-row-actions {display:flex;align-items:center;justify-content:flex-start;gap:11px}
.key-link.btn {min-height:var(--compact-height);padding:5px 0;border:0;background:transparent;color:var(--primary-ink);gap:5px}
.key-link.btn:hover {background:transparent;text-decoration:underline}
.key-link.btn:disabled {color:#93b9f7;opacity:.8}
.key-more {position:relative;font-size:var(--font-ui);color:var(--primary-ink)}
.key-more>summary {display:flex;align-items:center;gap:4px;cursor:pointer;list-style:none;white-space:nowrap;min-height:var(--compact-height);padding:5px 0}
.key-more>summary::-webkit-details-marker {display:none}
.key-more>summary>.icon {width:14px;height:14px}
.key-more-menu {position:absolute;right:0;top:calc(100% + 4px);z-index:4;width:180px;padding:7px 12px;background:white;border:1px solid var(--line);box-shadow:0 5px 12px #20212416;border-radius:6px;display:grid;gap:3px}
.key-more-menu>.btn {width:100%;justify-content:flex-start}
.key-copy-note {font-size:var(--font-meta);line-height:20px;color:var(--muted);white-space:normal;padding-bottom:8px;border-bottom:1px solid var(--line)}
.key-more-menu>[data-action="runtime-revoke-key"] {color:var(--red)}
.key-table tr:has(.key-more[open]) .key-actions-cell {z-index:3}
dialog:has(.client-key-form) {width:600px;max-width:calc(100% - 28px);border-radius:5px}
dialog:has(.client-key-form) .modal-head {padding:15px;border-bottom:0;align-items:flex-start}
dialog:has(.client-key-form) .modal-head h2 {font-size:17px;font-weight:500;overflow-wrap:anywhere}
dialog:has(.client-key-form) .modal-head .icon-btn {border:0;background:none;width:24px;height:24px}
dialog:has(.client-key-form) .modal-body {padding:1px 15px 15px}
.client-key-form {display:grid;gap:16px}
.key-form-row {display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;align-items:start;min-width:0}
.key-form-row>label,.key-form-label {padding-top:7px;text-align:right;font-size:13px;color:#60666f;font-weight:400;line-height:22px}
.key-form-row .required {color:#e56b6f}
.key-form-row input,.key-form-row textarea,.key-form-row select,.key-form-row .select-control {width:100%;min-width:0}
.key-form-row input,.key-form-row textarea {font-size:13px}
.key-form-row textarea {height:49px;min-height:49px;padding:5px 10px;resize:vertical;line-height:22px}
.key-name-input {position:relative;min-width:0}
.key-name-input input[readonly] {background:#f6f7fa;padding-right:38px}
.key-name-input>.icon-btn {position:absolute;right:6px;top:5px;width:26px;height:26px;border:0;background:none;color:var(--primary-ink)}
.key-scope-row {margin-top:3px}
.key-scope-groups {display:grid;gap:16px;min-width:0}
.key-scope-groups>div {display:grid;gap:7px;min-width:0}
.key-scope-groups>div>label {font-size:13px;font-weight:600;line-height:20px;color:#344054}
.key-scope-groups p,.key-expiry-preview {font-size:11px;line-height:19px;color:#929cab;margin:0}
.key-scope-groups .tag-error[hidden] {display:none}
.key-scope-groups .tag-picker {min-height:32px;padding:3px 32px 3px 7px;border-radius:4px}
.key-scope-groups .tag-token {max-width:100%;border-radius:3px;background:#f2f3f5;color:#60666f;font-size:11px;min-height:23px}
.key-scope-groups .tag-query {font-size:13px;min-height:24px}
.key-lifetimes {display:flex;flex-wrap:wrap;gap:0;margin:3px 0 10px;min-width:0}
.key-lifetimes>label {position:relative;cursor:pointer}
.key-lifetimes input {position:absolute;width:1px;height:1px;min-height:0;opacity:0;padding:0;inset:50% auto auto 50%}
.key-lifetimes span {display:block;min-height:25px;padding:2px 10px;font-size:12px;line-height:20px;border:1px solid #d6d9df;margin-left:-1px;background:white;white-space:nowrap}
.key-lifetimes>label:first-child span {margin-left:0;border-radius:4px 0 0 4px}
.key-lifetimes>label:last-child span {border-radius:0 4px 4px 0}
.key-lifetimes input:checked+span {position:relative;background:var(--primary);border-color:var(--primary);color:white}
.key-lifetimes input:focus-visible+span {position:relative;outline:2px solid var(--primary-focus);outline-offset:2px;z-index:1}
#key-expiry-date {margin:0 0 10px}
.client-key-form>.form-error {margin:0}
.client-key-form>.form-error:empty {display:none}
.client-key-form>.modal-footer {border:0;padding:12px 0 0;margin:0;justify-content:flex-end;gap:10px}
.client-key-form>.modal-footer>.btn {font-size:var(--font-ui);min-width:56px;min-height:var(--control-height);padding:7px 12px}
.key-connection>p {font-size:13px}
.key-connection section {margin-top:20px}
.key-connection h3 {margin-bottom:8px;overflow-wrap:anywhere}
.key-connection .codeblock {white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
.key-usage .data-table {min-width:480px}
@media (max-width:1450px) {
  .key-banner {flex-wrap:wrap}
  .key-steps {margin-left:56px}
}
@media (max-width:1000px) {
  .key-stats {grid-template-columns:repeat(2,minmax(0,1fr))}
  .key-actions-cell,.key-table th:last-child {position:static;box-shadow:none}
}
@media (max-width:760px) {
  .client-keys-page {gap:14px}
  .client-keys-page>.page-head {flex-direction:column}
  .client-keys-page .head-actions {flex-wrap:wrap;gap:8px}
  .key-banner {padding:14px;gap:10px}
  .key-banner-icon {width:34px;height:34px;flex-basis:34px}
  .key-banner-copy h2 {font-size:15px;line-height:24px}
  .key-banner-copy p {font-size:11px;line-height:20px}
  .key-steps {margin:0;gap:6px}
  .key-steps li {font-size:11px;padding:4px 7px}
  .key-stats {gap:10px}
  .key-stats .stat,.key-stats .stat:first-child,.key-stats .stat:last-child {padding:12px 10px;gap:8px;min-height:84px}
  .key-stats .stat .stat-label {font-size:12px}
  .key-stats .stat strong {font-size:24px}
  .key-list {padding:15px 0}
  .key-list-heading {padding:0 14px 14px}
  .key-list-heading p {font-size:11px}
  .key-form-row {grid-template-columns:76px minmax(0,1fr);gap:10px}
  .key-form-row>label,.key-form-label {font-size:12px}
  .key-scope-groups {gap:16px}
  .key-lifetimes span {padding:3px 8px}
}
@media (max-width:380px) {
  .key-stats .stat {flex-direction:column;align-items:flex-start}
  .key-form-row {grid-template-columns:minmax(0,1fr);gap:5px}
  .key-form-row>label,.key-form-label {text-align:left;padding-top:0}
}
