.api-docs-page,
.api-keys-page {
	width: 100%;
	max-width: none;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	color: #e2e8f0;
}

.api-center-shell-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.25rem;
}

.api-center-title h1,
.api-keys-title h1 {
	margin: 0;
	color: #fff;
	font-size: clamp(1.35rem, 2vw, 1.875rem);
	font-weight: 800;
	letter-spacing: 0;
}

.api-center-title p,
.api-keys-title p {
	margin: 0.35rem 0 0;
	color: #64748b;
	font-size: 0.875rem;
	line-height: 1.55;
}

.api-center-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.48rem 0.75rem;
	border: 1px solid rgba(34, 211, 238, 0.22);
	border-radius: 999px;
	background: rgba(34, 211, 238, 0.08);
	color: #a5f3fc;
	font-size: 0.75rem;
	font-weight: 700;
	white-space: nowrap;
}

.api-center-tabs {
	display: flex;
	gap: 0.25rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	overflow-x: auto;
	scrollbar-width: none;
}

.api-center-tabs::-webkit-scrollbar {
	display: none;
}

.api-center-tab {
	min-height: 2.75rem;
	padding: 0 1.15rem;
	border: 0;
	border-bottom: 2px solid transparent;
	background: transparent;
	color: #64748b;
	font-size: 0.875rem;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}

.api-center-tab:hover {
	color: #cbd5e1;
}

.api-center-tab.active {
	color: #22d3ee;
	border-bottom-color: #22d3ee;
}

.api-center-panel {
	min-width: 0;
}

.api-center-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.api-center-card {
	padding: 1rem 1.1rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 1rem;
	background: rgba(15, 23, 42, 0.5);
	box-shadow: 0 18px 34px -24px rgba(0, 0, 0, 0.8);
}

.api-center-card-wide {
	grid-column: 1 / -1;
}

.api-center-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.9rem;
}

.api-center-card h2 {
	margin: 0;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 800;
}

.api-center-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.6rem;
	border-radius: 999px;
	background: rgba(34, 211, 238, 0.08);
	color: #67e8f9;
	font-size: 0.72rem;
	font-weight: 700;
	white-space: nowrap;
}

.api-center-code {
	margin: 0;
	padding: 0.9rem;
	border-radius: 0.75rem;
	background: rgba(2, 6, 23, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.06);
	color: #cbd5e1;
	font-size: 0.8rem;
	line-height: 1.6;
	overflow: auto;
}

.api-keys-page {
	padding: 0;
}

.api-keys-title h1 {
	font-size: clamp(1.45rem, 2.15vw, 2rem);
}

.api-keys-create-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 2.35rem;
	padding: 0 0.9rem;
	border: 0;
	border-radius: 0.55rem;
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #ffffff;
	font-size: 0.86rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.api-keys-create-btn svg {
	width: 0.92rem;
	height: 0.92rem;
}

.api-keys-toolbar {
	display: flex;
	justify-content: flex-end;
	margin: 0.2rem 0 0.25rem;
}

.api-keys-refresh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.02);
	color: #cbd5e1;
	cursor: pointer;
}

.api-keys-refresh-btn:hover {
	border-color: rgba(34, 211, 238, 0.35);
	color: #fff;
}

.api-keys-table-card {
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 1rem;
	background: rgba(15, 23, 42, 0.5);
	box-shadow: 0 18px 34px -24px rgba(0, 0, 0, 0.8);
	overflow: hidden;
}

.api-keys-table-wrap {
	overflow-x: auto;
}

.api-keys-table {
	width: 100%;
	border-collapse: collapse;
	background: transparent;
	color: #e2e8f0;
}

.api-keys-table thead th {
	padding: 0.72rem 0.9rem;
	background: rgba(255, 255, 255, 0.06);
	color: #94a3b8;
	font-size: 0.82rem;
	font-weight: 700;
	text-align: left;
	white-space: nowrap;
}

.api-keys-table tbody td {
	padding: 0.82rem 0.9rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 0.86rem;
	vertical-align: middle;
}

.api-keys-name-cell {
	color: #fff;
	font-weight: 700;
}

.api-keys-copy-cell {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
}

.api-keys-mono {
	font-family: "JetBrains Mono", monospace;
	color: #cbd5e1;
	word-break: break-all;
}

.api-keys-copy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.1rem;
	height: 1.1rem;
	border: 0;
	background: transparent;
	color: #94a3b8;
	cursor: pointer;
	padding: 0;
}

.api-keys-copy-btn svg {
	width: 0.85rem;
	height: 0.85rem;
}

.api-keys-url-cell {
	color: #67e8f9;
	word-break: break-all;
}

.api-keys-row-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.api-keys-row-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	min-height: 1.75rem;
	padding: 0 0.7rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 0.45rem;
	background: rgba(255, 255, 255, 0.02);
	color: #cbd5e1;
	font-size: 0.78rem;
	cursor: pointer;
}

.api-keys-row-btn:hover {
	border-color: rgba(34, 211, 238, 0.35);
	color: #fff;
}

.api-keys-row-btn svg {
	width: 0.82rem;
	height: 0.82rem;
}

.api-keys-row-btn-danger {
	color: #fca5a5;
}

.api-keys-loading,
.api-keys-empty {
	padding: 1.5rem 0.85rem;
	text-align: center;
	color: #94a3b8;
}

.api-keys-empty-sub {
	margin-top: 0.35rem;
	font-size: 0.78rem;
}

.api-keys-modal {
	position: fixed;
	inset: 0;
	z-index: 120;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.api-keys-modal.is-hidden {
	display: none;
}

.api-keys-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.7);
	backdrop-filter: blur(8px);
}

.api-keys-modal-panel,
.api-keys-confirm-panel {
	position: relative;
	z-index: 1;
	width: min(520px, 100%);
	padding: 1rem;
	border-radius: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(15, 23, 42, 0.96);
	box-shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
	color: #e2e8f0;
}

.api-keys-confirm-panel {
	width: min(420px, 100%);
}

.api-keys-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.9rem;
}

.api-keys-modal-head h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}

.api-keys-modal-close {
	width: 2rem;
	height: 2rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.02);
	color: #cbd5e1;
	cursor: pointer;
	font-size: 1.1rem;
	line-height: 1;
}

.api-keys-form {
	display: grid;
	gap: 0.85rem;
}

.api-keys-field {
	display: grid;
	gap: 0.35rem;
}

.api-keys-field label {
	font-size: 0.82rem;
	font-weight: 700;
	color: #94a3b8;
}

.api-keys-field input {
	width: 100%;
	min-height: 2.5rem;
	padding: 0 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0.55rem;
	background: rgba(255, 255, 255, 0.03);
	color: #fff;
	outline: none;
}

.api-keys-field input:focus {
	border-color: rgba(34, 211, 238, 0.55);
	box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.api-keys-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.6rem;
	margin-top: 0.35rem;
}

.api-keys-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.2rem;
	padding: 0 0.9rem;
	border-radius: 0.55rem;
	border: 0;
	cursor: pointer;
	font-size: 0.84rem;
	font-weight: 700;
}

.api-keys-btn-primary {
	background: #22d3ee;
	color: #020617;
}

.api-keys-btn-ghost {
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: transparent;
	color: #cbd5e1;
}

.api-keys-confirm-text {
	margin: 0 0 1rem;
	color: #cbd5e1;
	font-size: 0.9rem;
	line-height: 1.6;
}

.api-keys-success-panel {
	position: relative;
	z-index: 1;
	width: min(520px, 100%);
	padding: 1rem;
	border-radius: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(15, 23, 42, 0.96);
	box-shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
	color: #e2e8f0;
}

.api-keys-success-panel .api-keys-modal-close {
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.02);
	color: #cbd5e1;
}

.api-keys-success-panel .api-keys-modal-close:hover {
	color: #ffffff;
	border-color: rgba(34, 211, 238, 0.35);
	background: rgba(34, 211, 238, 0.08);
}

.api-keys-success-panel .api-keys-btn-primary {
	background: #22d3ee;
	color: #020617;
}

.api-keys-success-panel .api-keys-btn-primary:hover {
	background: #67e8f9;
}

.api-keys-success-desc {
	margin: 0 0 1rem;
	color: #cbd5e1;
	font-size: 0.9rem;
	line-height: 1.6;
}

.api-keys-success-meta {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.api-keys-success-meta.is-hidden {
	display: none;
}

.api-keys-success-meta-item {
	min-width: 0;
	padding: 0.78rem 0.82rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 0.35rem;
	background: rgba(255, 255, 255, 0.03);
}

.api-keys-success-meta-item-wide {
	grid-column: 1 / -1;
}

.api-keys-success-meta-label {
	display: block;
	margin-bottom: 0.28rem;
	color: #94a3b8;
	font-size: 0.75rem;
	font-weight: 700;
}

.api-keys-success-meta-value {
	display: block;
	color: #f8fafc;
	font-size: 0.84rem;
	line-height: 1.55;
	word-break: break-all;
}

.api-keys-success-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}

.api-keys-success-field {
	display: grid;
	gap: 0.45rem;
	min-width: 0;
}

.api-keys-success-field-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	color: #e2e8f0;
	font-size: 1rem;
	font-weight: 500;
}

.api-keys-success-copy {
	display: inline-flex;
	align-items: center;
	gap: 0.28rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: #a5f3fc;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
}

.api-keys-success-copy:hover {
	color: #67e8f9;
}

.api-keys-success-copy.is-copied {
	color: #34d399;
}

.api-keys-success-copy svg {
	width: 0.82rem;
	height: 0.82rem;
}

.api-keys-success-value input,
.api-keys-success-value textarea {
	width: 100%;
	min-height: 2rem;
	padding: 0.48rem 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 0.55rem;
	background: rgba(2, 6, 23, 0.62);
	color: #f8fafc;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.88rem;
	line-height: 1.55;
	outline: none;
	resize: none;
}

.api-keys-success-value textarea {
	min-height: 3.25rem;
}

.api-keys-success-value input:focus,
.api-keys-success-value textarea:focus {
	border-color: rgba(34, 211, 238, 0.55);
	box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.api-keys-success-value input[readonly],
.api-keys-success-value textarea[readonly] {
	cursor: text;
}

.api-keys-success-note {
	margin-bottom: 1rem;
	padding: 0.85rem 0.9rem;
	border: 1px solid rgba(34, 211, 238, 0.18);
	border-radius: 0.65rem;
	background: rgba(34, 211, 238, 0.06);
}

.api-keys-success-note-head {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 0.4rem;
	color: #ffffff;
	font-size: 0.84rem;
	font-weight: 700;
}

.api-keys-success-note-head svg {
	width: 0.95rem;
	height: 0.95rem;
	color: #67e8f9;
	flex-shrink: 0;
}

.api-keys-success-note p {
	margin: 0;
	color: #cbd5e1;
	font-size: 0.86rem;
	line-height: 1.6;
}

.api-keys-success-actions {
	justify-content: flex-end;
}

.api-toast {
	position: fixed;
	right: 24px;
	top: 80px;
	z-index: 200;
	padding: 0.55rem 0.8rem;
	border-radius: 0.5rem;
	background: rgba(17, 24, 39, 0.95);
	color: #fff;
	font-size: 0.82rem;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.api-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.api-toast-error {
	background: rgba(185, 28, 28, 0.95);
}

@media (max-width: 768px) {
	.api-toast {
		top: 72px;
		right: 16px;
		left: 16px;
		max-width: none;
	}
}

@media (max-width: 768px) {
	.api-center-shell-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.api-center-grid {
		grid-template-columns: 1fr;
	}

	.api-keys-success-meta,
	.api-keys-success-grid {
		grid-template-columns: 1fr;
	}

	.api-keys-success-meta-item-wide {
		grid-column: auto;
	}

	.api-keys-row-actions {
		flex-direction: column;
		align-items: flex-start;
	}
}
