/* API-token management is scoped to its administrator module. */
.api-tokens-page .api-tokens-breadcrumb { color: var(--wp-text-muted); font-size: 12px; }
.api-tokens-page h1 { margin-bottom: 8px; }
.api-tokens-page .api-token-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.api-tokens-page .api-token-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.api-tokens-page label { display: block; margin: 12px 0; }
.api-tokens-page label > .form-control { margin-top: 7px; width: 100%; }
.api-tokens-page small { display: block; font-size: 12px; color: var(--wp-text-muted); margin-top: 5px; }
.api-tokens-page fieldset { border: 1px solid var(--wp-border); border-radius: 8px; padding: 14px; margin: 16px 0; min-width: 0; }
.api-tokens-page legend { font-weight: 600; padding: 0 6px; }
.api-tokens-page .api-privilege { display: flex; gap: 12px; align-items: flex-start; }
.api-tokens-page .api-privilege input { margin-top: 5px; flex: 0 0 auto; }
.api-tokens-page .api-privilege code { overflow-wrap: anywhere; font-size: 12px; }
.api-tokens-page .api-token-unavailable { margin-left: 8px; color: var(--wp-text-muted); font-size: 11px; }
.api-tokens-page .api-token-search { margin-left: auto; }
.api-tokens-page .api-token-table { overflow-x: auto; }
.api-tokens-page td { vertical-align: top; overflow-wrap: anywhere; min-width: 100px; max-width: 290px; }
.api-tokens-page td .api-token-actions { margin: 0; }
.api-tokens-page .api-token-secret { font-family: monospace; }
.api-tokens-page [role=alert] { color: #b42318; }
.api-tokens-page [hidden] { display: none !important; }
@media (max-width: 768px) { .api-tokens-page .api-token-fields { grid-template-columns: 1fr; } }

/* Refined API credential workspace */
.api-tokens-page { width:100%;min-width:0;color:#173653; }
.api-tokens-page svg { display:block;width:1em;height:1em;flex:0 0 auto; }
.api-tokens-heading { display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px; }
.api-tokens-title { display:flex;align-items:center;gap:15px;min-width:0; }
.api-tokens-title-icon { display:flex;align-items:center;justify-content:center;flex:0 0 48px;width:48px;height:48px;border-radius:14px;background:linear-gradient(145deg,#8c5cfc,#6f3ddb);color:#fff;font-size:25px;box-shadow:0 10px 22px rgba(111,61,219,.2); }
.api-tokens-title-icon svg { display:none !important; }
.api-tokens-title-icon::before { width:28px;height:28px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='17' r='6'/%3E%3Cpath d='m16 13 12-9M23 8l5 5M19 11l4 4'/%3E%3C/svg%3E");content:""; }
.api-tokens-eyebrow { display:block;margin-bottom:4px;color:#7545de;font-size:10px;font-weight:750;letter-spacing:.09em;text-transform:uppercase; }
.api-tokens-heading h1 { margin:0;color:#102b48;font-size:28px;line-height:1.25;letter-spacing:-.025em; }
.api-tokens-heading p { margin:5px 0 0;color:#64748b;font-size:13px;line-height:1.5; }
.api-tokens-security { display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;min-height:32px;padding:6px 11px;border:1px solid #d9cdf8;border-radius:999px;background:#f7f4ff;color:#7040da;font-size:11px;font-weight:650;white-space:nowrap; }
.api-tokens-security svg { width:15px;height:15px; }
.api-token-overview { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px; }
.api-token-overview article { display:flex;align-items:center;gap:13px;min-width:0;padding:17px 18px;border:1px solid #e2e8f0;border-radius:13px;background:#fff;box-shadow:0 6px 18px rgba(26,42,68,.045); }
.api-token-overview article > span { display:flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;border-radius:11px;background:#f3effe;color:#7545de;font-size:20px; }
.api-token-overview article > div { min-width:0; }
.api-token-overview small,.api-token-overview strong { display:block;overflow-wrap:anywhere; }
.api-token-overview small { margin:0 0 3px;color:#718096;font-size:10px;line-height:1.35;letter-spacing:.03em;text-transform:uppercase; }
.api-token-overview strong { color:#173653;font-size:21px;line-height:1.2; }
.api-tokens-page .banner { margin-bottom:20px; }
.api-tokens-page .api-token-list-card { overflow:hidden;border:1px solid #e2e8f0;border-radius:15px;box-shadow:0 8px 24px rgba(26,42,68,.055); }
.api-token-list-card > .card-content { padding:0; }
.api-token-list-heading { display:flex;align-items:center;justify-content:space-between;gap:18px;padding:21px 23px;border-bottom:1px solid #e8edf3; }
.api-token-list-heading h2 { margin:0;color:#173653;font-size:18px;line-height:1.4; }
.api-token-list-heading p { margin:4px 0 0;color:#718096;font-size:11px;line-height:1.5; }
.api-token-toolbar { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 20px;border-bottom:1px solid #e8edf3;background:#fbfcfe; }
.api-tokens-page .api-token-toolbar .api-token-actions { margin:0; }
.api-token-toolbar .btn { min-height:38px; }
.api-token-toolbar .btn svg { width:15px;height:15px; }
.api-token-toolbar .btn--primary { display:inline-flex;align-items:center;gap:7px; }
.api-token-toolbar .btn--primary svg { display:none !important; }
.api-token-toolbar .btn--primary::before { color:#fff;font-size:18px;font-weight:700;line-height:1;content:"+"; }
.api-tokens-page .api-token-search { display:flex;align-items:center;gap:9px;flex:0 1 310px;margin:0; }
.api-token-search > span { flex:0 0 auto;color:#718096;font-size:11px;white-space:nowrap; }
.api-tokens-page .api-token-search > .form-control { min-width:150px;margin:0;background:#fff; }
.api-tokens-page .api-token-table { width:100%;max-width:100%;overflow-x:auto; }
.api-token-table .data-table { width:100%;min-width:1180px; }
.api-token-table .data-table th { padding:12px 14px;background:#f7f9fc;color:#60758c;font-size:10px;font-weight:700;letter-spacing:.055em;text-transform:uppercase;white-space:nowrap; }
.api-token-table .data-table td { min-width:105px;max-width:270px;padding:15px 14px;color:#38516a;font-size:11px;line-height:1.55;vertical-align:middle; }
.api-token-table .data-table td:first-child { min-width:145px; }
.api-token-table .data-table td:nth-child(2) { min-width:220px; }
.api-token-table .data-table td:last-child { min-width:245px; }
.api-token-table .data-table tbody tr:hover { background:#fbfaff; }
.api-token-table td > strong { color:#25435f;font-size:11px; }
.api-token-table td > small { max-width:250px;margin-top:4px;line-height:1.5; }
.api-token-name-icon { display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;margin-right:8px;border-radius:8px;background:#f3effe;color:#7545de;font-size:15px;vertical-align:middle; }
.api-token-name { display:inline;vertical-align:middle;color:#173653;font-size:12px; }
.api-token-state { display:inline-flex;align-items:center;min-height:24px;padding:3px 9px;border:1px solid #dfe5ed;border-radius:999px;background:#f8fafc;color:#52667a;font-size:10px;font-weight:700;text-transform:capitalize;white-space:nowrap; }
.api-token-state--active { border-color:#bde7d4;background:#effbf5;color:#087954; }
.api-token-state--revoked,.api-token-state--expired { border-color:#f3c8c4;background:#fff4f2;color:#b42318; }
.api-token-table td .api-token-actions { flex-wrap:nowrap;gap:5px; }
.api-token-table td .api-token-actions .btn { min-height:30px;padding:5px 8px;border-radius:7px;font-size:10px;white-space:nowrap; }
.api-token-list-card > .card-content > .api-token-actions:last-child { justify-content:flex-end;margin:0;padding:14px 20px;border-top:1px solid #e8edf3;background:#fbfcfe; }
.api-tokens-page > .card:not(.api-token-list-card),.api-tokens-page > form.card { overflow:hidden;border:1px solid #e2e8f0;border-radius:15px;box-shadow:0 8px 24px rgba(26,42,68,.055); }
.api-tokens-page > .card:not(.api-token-list-card) .card-content,.api-tokens-page > form.card { padding:25px; }
.api-tokens-page > .card h2,.api-tokens-page > form.card h2 { margin-top:0;color:#173653;font-size:20px; }
.api-tokens-page label { color:#38516a;font-size:12px;font-weight:600; }
.api-tokens-page label small { font-weight:400;line-height:1.55; }
.api-tokens-page .form-control { min-height:41px;border-color:#dce4f0;border-radius:8px; }
.api-tokens-page textarea.form-control { min-height:90px; }
.api-tokens-page fieldset { border-color:#dfe5ed;border-radius:11px;background:#fbfcfe; }
.api-tokens-page legend { color:#25435f;font-size:12px; }
.api-tokens-page .api-privilege { margin:8px 0;padding:9px 10px;border:1px solid transparent;border-radius:8px;background:#fff;font-weight:400; }
.api-tokens-page .api-privilege:hover { border-color:#d9cdf8;background:#fbf9ff; }
.api-tokens-page .api-privilege strong { display:block;color:#25435f;font-size:12px; }
.api-tokens-page .api-token-secret { padding:12px 13px;background:#f7f9fc;color:#173653;font-family:ui-monospace,SFMono-Regular,monospace;font-size:12px; }
.api-tokens-page [role=alert]:not(:empty) { padding:10px 12px;border:1px solid #f3c8c4;border-radius:8px;background:#fff4f2; }
.api-tokens-page :is(button,input,select,textarea,a):focus-visible { outline:3px solid rgba(131,82,241,.3);outline-offset:2px; }
@media (max-width:1100px) {
    .api-token-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .api-token-toolbar { align-items:stretch;flex-direction:column; }
    .api-tokens-page .api-token-search { flex:1 1 auto;max-width:420px; }
}
@media (max-width:700px) {
    .api-tokens-heading { align-items:flex-start;flex-direction:column; }
    .api-tokens-security { align-self:flex-start; }
    .api-token-overview { grid-template-columns:1fr; }
    .api-token-toolbar .api-token-actions { align-items:stretch;flex-direction:column;width:100%; }
    .api-token-toolbar .api-token-actions .btn { width:100%; }
    .api-tokens-page .api-token-search { align-items:stretch;flex-direction:column;max-width:none;width:100%; }
    .api-tokens-page .api-token-fields { grid-template-columns:1fr; }
}
