@charset "UTF-8";

/* ── NAV: portal-specific btn-nav colour ── */
.btn-nav {
	background: var(--accent-2);
}

/* ── PORTAL MAIN LAYOUT ── */
.portal-main {
	min-height: calc(100vh - 60px - 73px); /* viewport minus nav and footer */
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 3rem 1rem 4rem;
}

/* ── TOAST NOTIFICATIONS ── */
.toast-container {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	z-index: 9999;
	pointer-events: none;
	max-width: min(360px, calc(100vw - 2rem));
}

.toast {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0.85rem 1rem;
	font-size: 0.85rem;
	line-height: 1.45;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	pointer-events: auto;
	animation: toast-in 0.25s ease forwards;
	border-left-width: 3px;
}

.toast.toast--success {
	border-left-color: var(--success);
}
.toast.toast--error {
	border-left-color: var(--danger);
}
.toast.toast--warn {
	border-left-color: var(--warn);
}
.toast.toast--info {
	border-left-color: var(--accent);
}

.toast.toast--out {
	animation: toast-out 0.2s ease forwards;
}

.toast-icon {
	font-size: 1rem;
	flex-shrink: 0;
	margin-top: 1px;
}

.toast-body {
	flex: 1;
	min-width: 0;
}

.toast-title {
	font-weight: 700;
	color: var(--text);
	margin-bottom: 0.1rem;
}

.toast-msg {
	color: var(--muted);
	font-size: 0.8rem;
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes toast-out {
	from {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
	to {
		opacity: 0;
		transform: translateY(4px) scale(0.97);
	}
}

/* Badge styles */
.badge {
	display: inline-block;
	padding: 0.15rem 0.45rem;
	font-size: 0.72rem;
	font-weight: 700;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ── CODE INLINE ── */
.code-inline {
	font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
	font-size: 0.82em;
	background: rgba(79, 142, 247, 0.1);
	color: var(--accent);
	border-radius: 4px;
	padding: 0.1em 0.4em;
}

/* Common form elements used across portal modules */
.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.form-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0.03em;
}

.form-input {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 8px;
	color: var(--text);
	font-size: 0.95rem;
	padding: 0.65rem 0.9rem;
	width: 100%;
	transition: border-color 0.2s, box-shadow 0.2s;
	outline: none;
	font-family: inherit;
}

.form-input::placeholder {
	color: var(--muted);
	opacity: 0.6;
}

.form-input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
}

.form-input.is-error {
	border-color: var(--danger);
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-input--inline {
	flex: 1;
	min-width: 0;
}

.form-row {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
}

/* Responsive adjustments */
@media (max-width: 640px) {
	.portal-main {
		padding: 2rem 1rem 3rem;
	}
	.form-row {
		flex-direction: column;
		align-items: stretch;
	}
}

@media (max-width: 400px) {
	.portal-main {
		padding: 1.5rem 0.75rem 2.5rem;
	}
	.toast-container {
		bottom: 1rem;
		right: 0.75rem;
		left: 0.75rem;
		max-width: none;
	}
}

@media (max-width: 320px) {
	.portal-main {
		padding: 1.25rem 0.5rem 2rem;
	}
}
/* ── AUTH CARD (email + OTP views) ── */
.auth-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 2.5rem 2rem;
	width: 100%;
	max-width: 420px;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.auth-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.auth-card-icon {
	font-size: 2rem;
	margin-bottom: 1rem;
	line-height: 1;
}

.auth-card-title {
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.025em;
	margin-bottom: 0.5rem;
}

.auth-card-sub {
	color: var(--muted);
	font-size: 0.9rem;
	line-height: 1.6;
	margin-bottom: 1.75rem;
}

.auth-card-note {
	font-size: 0.8rem;
	color: var(--muted);
	margin-top: 1.25rem;
}

/* ── AUTH FORM ── */
.auth-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	text-align: left;
}

/* OTP input: large centered digits */
.form-input--otp {
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: 0.35em;
	text-align: center;
	font-variant-numeric: tabular-nums;
	padding: 0.75rem 1rem;
}

/* ── AUTH BUTTON ── */
.btn-auth {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 700;
	padding: 0.75rem 1.5rem;
	cursor: pointer;
	width: 100%;
	transition: opacity 0.2s, transform 0.2s;
	font-family: inherit;
}

.btn-auth:hover:not(:disabled) {
	opacity: 0.88;
	transform: translateY(-1px);
}
.btn-auth:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.btn-auth--sm {
	width: auto;
	padding: 0.6rem 1.1rem;
	font-size: 0.875rem;
	flex-shrink: 0;
}

/* Spinner inside button */
.btn-auth-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
	flex-shrink: 0;
}

.btn-auth.is-loading .btn-auth-spinner {
	display: block;
}
.btn-auth.is-loading .btn-auth-text {
	opacity: 0.7;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* ── LINK STYLES ── */
.auth-link {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-color: rgba(79, 142, 247, 0.4);
	transition: opacity 0.2s;
}

.auth-link:hover {
	opacity: 0.8;
}

/* Ghost button that looks like a link */
.auth-link-btn {
	background: none;
	border: none;
	color: var(--accent);
	font-size: inherit;
	font-family: inherit;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-color: rgba(79, 142, 247, 0.4);
	transition: opacity 0.2s;
}

.auth-link-btn:hover {
	opacity: 0.8;
}

@media (max-width: 640px) {
	.auth-card {
		padding: 2rem 1.25rem;
	}
	.btn-auth--sm {
		width: 100%;
	}
}

@media (max-width: 400px) {
	.auth-card {
		padding: 1.75rem 1rem;
	}
	.auth-card-title {
		font-size: 1.3rem;
	}
	.form-input--otp {
		font-size: 1.4rem;
		letter-spacing: 0.25em;
	}
}

@media (max-width: 320px) {
	.auth-card {
		padding: 1.5rem 0.75rem;
	}
}
/* ── PORTAL DASHBOARD ── */
.portal-dashboard {
	width: 100%;
	max-width: 760px;
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

/* Dashboard header */
.dashboard-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.dashboard-title {
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	margin-bottom: 0.2rem;
}

.dashboard-sub {
	font-size: 0.85rem;
	color: var(--muted);
}

.badge-plan {
	background: rgba(79, 142, 247, 0.15);
	color: var(--accent);
	border: 1px solid rgba(79, 142, 247, 0.25);
}

.btn-logout {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--muted);
	border-radius: 6px;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0.4rem 0.9rem;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s, color 0.2s;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-logout:hover {
	border-color: var(--danger);
	color: var(--danger);
}

/* ── QUOTA CARD ── */
.quota-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
}

.quota-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.85rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.quota-card-label {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--muted);
}

.quota-card-meta {
	font-size: 0.75rem;
	color: var(--muted);
}

.quota-bar-wrap {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.quota-bar-track {
	flex: 1;
	height: 6px;
	background: var(--border);
	border-radius: 99px;
	overflow: hidden;
}

.quota-bar-fill {
	height: 100%;
	border-radius: 99px;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	transition: width 0.4s ease;
}

.quota-bar-fill.warn {
	background: var(--warn);
}
.quota-bar-fill.crit {
	background: var(--danger);
}

.quota-bar-pct {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ── QUICK START SECTION ── */
.quickstart-section {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 1.5rem;
}

.quickstart-title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 0.4rem;
}

.quickstart-sub {
	font-size: 0.85rem;
	color: var(--muted);
	margin-bottom: 1rem;
}

.code-block-wrap {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow-x: auto;
	margin-bottom: 0.85rem;
}

.code-block {
	margin: 0;
	padding: 1rem 1.25rem;
	font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
	font-size: 0.82rem;
	color: var(--text);
	line-height: 1.6;
	white-space: pre;
}

.quickstart-docs {
	font-size: 0.82rem;
	color: var(--muted);
}

@media (max-width: 640px) {
	.dashboard-header {
		flex-direction: column;
	}
	.btn-logout {
		align-self: flex-start;
	}
}

@media (max-width: 320px) {
	.quickstart-section {
		padding: 1rem;
	}
}
/* ── KEYS SECTION ── */
.keys-section {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
}

.keys-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--border);
	flex-wrap: wrap;
}

.keys-section-title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 0.2rem;
}

.keys-section-sub {
	font-size: 0.78rem;
	color: var(--muted);
}

.btn-create-key {
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	padding: 0.45rem 0.9rem;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s, background 0.2s;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-create-key:hover {
	border-color: var(--accent);
	background: rgba(79, 142, 247, 0.06);
}

/* Create key inline form */
.create-key-form {
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--border);
	background: var(--surface-2);
}

.btn-cancel {
	background: none;
	border: none;
	color: var(--muted);
	font-size: 0.82rem;
	font-family: inherit;
	cursor: pointer;
	padding: 0.4rem 0.5rem;
	transition: color 0.2s;
}

.btn-cancel:hover {
	color: var(--text);
}

/* Key reveal banner */
.key-reveal-banner {
	margin: 1rem 1.5rem;
	background: rgba(34, 197, 94, 0.06);
	border: 1px solid rgba(34, 197, 94, 0.25);
	border-radius: 10px;
	padding: 1rem 1.25rem;
}

.key-reveal-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
}

.key-reveal-icon {
	font-size: 1rem;
}

.key-reveal-title {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--success);
}

.key-reveal-warning {
	font-size: 0.78rem;
	color: var(--muted);
	margin-bottom: 0.75rem;
}

.key-reveal-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.key-reveal-value {
	flex: 1;
	min-width: 0;
	font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
	font-size: 0.82rem;
	color: var(--success);
	background: rgba(34, 197, 94, 0.08);
	border: 1px solid rgba(34, 197, 94, 0.2);
	border-radius: 6px;
	padding: 0.45rem 0.75rem;
	word-break: break-all;
	overflow-wrap: anywhere;
}

.btn-copy {
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 6px;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.4rem 0.8rem;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s, background 0.2s;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-copy:hover {
	border-color: var(--accent);
	background: rgba(79, 142, 247, 0.06);
}

.btn-copy.copied {
	border-color: var(--success);
	color: var(--success);
}

/* Keys table */
.keys-table {
	overflow-x: auto;
}

.keys-table-header {
	display: grid;
	grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr auto;
	align-items: center;
	padding: 0.55rem 1.5rem;
	background: var(--surface-2);
	border-bottom: 1px solid var(--border);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	gap: 0.5rem;
}

.keys-row {
	display: grid;
	grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr auto;
	align-items: center;
	padding: 0.85rem 1.5rem;
	border-bottom: 1px solid var(--border);
	gap: 0.5rem;
	font-size: 0.875rem;
	transition: background 0.15s;
}

.keys-row:last-child {
	border-bottom: none;
}
.keys-row:hover {
	background: var(--surface-2);
}

.keys-row--loading {
	grid-template-columns: 1fr;
	justify-content: center;
	color: var(--muted);
	font-size: 0.85rem;
	text-align: center;
}

.key-name {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.key-prefix {
	font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
	font-size: 0.78rem;
	color: var(--muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.key-date {
	font-size: 0.78rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.btn-revoke {
	background: none;
	border: 1px solid transparent;
	color: var(--muted);
	border-radius: 5px;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.3rem 0.6rem;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
	white-space: nowrap;
}

.btn-revoke:hover {
	border-color: var(--danger);
	color: var(--danger);
	background: rgba(239, 68, 68, 0.06);
}

.keys-empty-note {
	font-size: 0.82rem;
	color: var(--muted);
	padding: 1.25rem 1.5rem;
	text-align: center;
}

@media (max-width: 640px) {
	.keys-table-header,
	.keys-row {
		grid-template-columns: 2fr 1.5fr auto;
	}

	/* Hide Created and Last Used columns on small screens */
	.keys-table-header > *:nth-child(3),
	.keys-table-header > *:nth-child(4),
	.keys-row > *:nth-child(3),
	.keys-row > *:nth-child(4) {
		display: none;
	}

	.keys-section-header {
		flex-direction: column;
		align-items: flex-start;
	}
	.btn-create-key {
		align-self: flex-start;
	}
}

@media (max-width: 400px) {
	.key-reveal-row {
		flex-direction: column;
		align-items: stretch;
	}
	.btn-copy {
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 320px) {
	.keys-section-header {
		padding: 1rem;
	}
	.keys-table-header,
	.keys-row {
		padding: 0.7rem 1rem;
	}
	.create-key-form {
		padding: 0.75rem 1rem;
	}
	.key-reveal-banner {
		margin: 0.75rem 1rem;
	}
	.btn-cancel {
		text-align: center;
	}
}
/* ── SLA COMPLIANCE REPORTS SECTION ── */
.sla-section {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	margin-bottom: 2rem;
	overflow: hidden;
}

.sla-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--border);
}

.sla-section-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.25rem 0;
}

.sla-section-sub {
	font-size: 0.78rem;
	color: var(--muted);
	margin: 0;
}

/* SLA Threshold Widget */
.sla-threshold-widget {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sla-threshold-label {
	font-size: 0.78rem;
	color: var(--muted);
	font-weight: 600;
}

.sla-threshold-input-wrap {
	display: flex;
	align-items: center;
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: 4px;
	overflow: hidden;
	height: 32px;
}

.sla-threshold-input {
	border: none;
	background: transparent;
	width: 58px;
	height: 100%;
	padding: 0 0.5rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--foreground);
	text-align: right;
}

.sla-threshold-input:focus {
	outline: none;
}

.sla-threshold-pct {
	font-size: 0.8rem;
	color: var(--muted);
	font-weight: 600;
	padding-right: 0.4rem;
}

.btn-save-threshold {
	border: none;
	border-left: 1px solid var(--border);
	background: var(--surface);
	color: var(--foreground);
	font-size: 0.75rem;
	font-weight: 600;
	height: 100%;
	padding: 0 0.75rem;
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-save-threshold:hover {
	background: var(--border);
}

/* SLA Table Grid */
.sla-table {
	width: 100%;
}

.sla-table-header {
	display: grid;
	grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr 1fr;
	padding: 0.8rem 1.5rem;
	background: var(--background);
	border-bottom: 1px solid var(--border);
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.sla-row {
	display: grid;
	grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr 1fr;
	padding: 0.9rem 1.5rem;
	border-bottom: 1px solid var(--border);
	align-items: center;
	font-size: 0.85rem;
}

.sla-row:last-child {
	border-bottom: none;
}

.sla-row--loading {
	display: block;
	text-align: center;
	color: var(--muted);
	padding: 2.5rem;
}

.badge-compliance {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	border-radius: 9999px;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
}

.badge-compliance--ok {
	background: #f0fdf4;
	color: #10b981;
	border: 1px solid #bbf7d0;
}

.badge-compliance--breach {
	background: #fef2f2;
	color: #ef4444;
	border: 1px solid #fecaca;
}

.badge-compliance--draft {
	background: #fef3c7;
	color: #d97706;
	border: 1px solid #fde68a;
}

.btn-download-sla {
	background: var(--primary);
	color: var(--white);
	border: none;
	border-radius: 4px;
	padding: 0.45rem 0.8rem;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
	display: inline-block;
	text-align: center;
}

.btn-download-sla:hover {
	opacity: 0.9;
}

.btn-download-sla:disabled {
	background: var(--border);
	color: var(--muted);
	cursor: not-allowed;
}

@media (max-width: 768px) {
	.sla-section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.sla-table-header {
		display: none;
	}

	.sla-row {
		grid-template-columns: 1fr;
		gap: 0.5rem;
		padding: 1.25rem 1.5rem;
	}

	.sla-row > span::before {
		content: attr(data-label) ": ";
		font-weight: 600;
		color: var(--muted);
		display: inline-block;
		width: 140px;
	}

	.sla-row > span {
		display: flex;
		align-items: center;
	}

	.btn-download-sla {
		width: 100%;
		margin-top: 0.5rem;
	}
}
/* ── SLACK ALERTS SECTION ── */
.slack-section {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	margin-top: 2rem;
}

.slack-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--border);
	flex-wrap: wrap;
}

.slack-section-title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 0.2rem;
}

.slack-section-sub {
	font-size: 0.78rem;
	color: var(--muted);
}

.btn-create-slack {
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	padding: 0.45rem 0.9rem;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s, background 0.2s;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-create-slack:hover {
	border-color: #4a154b;
	background: rgba(74, 21, 75, 0.06);
}

/* Create slack inline form */
.create-slack-form {
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--border);
	background: var(--surface-2);
}

/* Slack table */
.slack-table {
	overflow-x: auto;
}

.slack-table-header {
	display: grid;
	grid-template-columns: 3fr 1.5fr 1.5fr auto;
	align-items: center;
	padding: 0.55rem 1.5rem;
	background: var(--surface-2);
	border-bottom: 1px solid var(--border);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	gap: 0.5rem;
}

.slack-row {
	display: grid;
	grid-template-columns: 3fr 1.5fr 1.5fr auto;
	align-items: center;
	padding: 0.85rem 1.5rem;
	border-bottom: 1px solid var(--border);
	gap: 0.5rem;
	font-size: 0.875rem;
	transition: background 0.15s;
}

.slack-row:last-child {
	border-bottom: none;
}
.slack-row:hover {
	background: var(--surface-2);
}

.slack-row--loading {
	grid-template-columns: 1fr;
	justify-content: center;
	color: var(--muted);
	font-size: 0.85rem;
	text-align: center;
}

.slack-url {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.slack-quota {
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--text);
}

.slack-date {
	font-size: 0.78rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.slack-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.btn-test-slack {
	background: none;
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 5px;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.35rem 0.7rem;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s, background 0.2s, color 0.2s;
	white-space: nowrap;
}

.btn-test-slack:hover:not(:disabled) {
	border-color: #4a154b;
	background: rgba(74, 21, 75, 0.06);
}

.btn-test-slack:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	border-color: var(--border);
	background: none;
}

.btn-delete-slack {
	background: none;
	border: 1px solid transparent;
	color: var(--muted);
	border-radius: 5px;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.35rem 0.7rem;
	cursor: pointer;
	font-family: inherit;
	transition: color 0.15s, border-color 0.15s;
}

.btn-delete-slack:hover {
	color: var(--danger);
	border-color: rgba(239, 68, 68, 0.15);
	background: rgba(239, 68, 68, 0.04);
}

.slack-empty-note {
	padding: 2.5rem 1.5rem;
	text-align: center;
	font-size: 0.85rem;
	color: var(--muted);
}

@media (max-width: 640px) {
	.slack-table-header,
	.slack-row {
		grid-template-columns: 2fr auto;
	}

	.slack-table-header > *:nth-child(2),
	.slack-table-header > *:nth-child(3),
	.slack-row > *:nth-child(2),
	.slack-row > *:nth-child(3) {
		display: none;
	}

	.slack-section-header {
		flex-direction: column;
		align-items: flex-start;
	}
	.btn-create-slack {
		align-self: flex-start;
	}
}

@media (max-width: 320px) {
	.slack-section-header {
		padding: 1rem;
	}
	.slack-table-header,
	.slack-row {
		padding: 0.7rem 1rem;
	}
	.create-slack-form {
		padding: 0.75rem 1rem;
	}
}
/* ── WEBHOOKS SECTION ── */
.webhooks-section {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	margin-top: 2rem;
}

.webhooks-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--border);
	flex-wrap: wrap;
}

.webhooks-section-title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 0.2rem;
}

.webhooks-section-sub {
	font-size: 0.78rem;
	color: var(--muted);
}

.btn-create-webhook {
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	padding: 0.45rem 0.9rem;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s, background 0.2s;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-create-webhook:hover {
	border-color: var(--accent);
	background: rgba(79, 142, 247, 0.06);
}

/* Create webhook inline form */
.create-webhook-form {
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--border);
	background: var(--surface-2);
}

/* Webhook reveal banner */
.webhook-reveal-banner {
	margin: 1rem 1.5rem;
	background: rgba(34, 197, 94, 0.06);
	border: 1px solid rgba(34, 197, 94, 0.25);
	border-radius: 10px;
	padding: 1rem 1.25rem;
}

.webhook-reveal-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
}

.webhook-reveal-icon {
	font-size: 1rem;
}

.webhook-reveal-title {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--success);
}

.webhook-reveal-warning {
	font-size: 0.78rem;
	color: var(--muted);
	margin-bottom: 0.75rem;
}

.webhook-reveal-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.webhook-reveal-value {
	flex: 1;
	min-width: 0;
	font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
	font-size: 0.82rem;
	color: var(--success);
	background: rgba(34, 197, 94, 0.08);
	border: 1px solid rgba(34, 197, 94, 0.2);
	border-radius: 6px;
	padding: 0.45rem 0.75rem;
	word-break: break-all;
	overflow-wrap: anywhere;
}

/* Webhooks table */
.webhooks-table {
	overflow-x: auto;
}

.webhooks-table-header {
	display: grid;
	grid-template-columns: 3fr 1.5fr 1.5fr auto;
	align-items: center;
	padding: 0.55rem 1.5rem;
	background: var(--surface-2);
	border-bottom: 1px solid var(--border);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	gap: 0.5rem;
}

.webhooks-row {
	display: grid;
	grid-template-columns: 3fr 1.5fr 1.5fr auto;
	align-items: center;
	padding: 0.85rem 1.5rem;
	border-bottom: 1px solid var(--border);
	gap: 0.5rem;
	font-size: 0.875rem;
	transition: background 0.15s;
}

.webhooks-row:last-child {
	border-bottom: none;
}
.webhooks-row:hover {
	background: var(--surface-2);
}

.webhooks-row--loading {
	grid-template-columns: 1fr;
	justify-content: center;
	color: var(--muted);
	font-size: 0.85rem;
	text-align: center;
}

.webhook-url {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.webhook-quota {
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--text);
}

.webhook-date {
	font-size: 0.78rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.webhook-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.btn-test-webhook {
	background: none;
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 5px;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.35rem 0.7rem;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s, background 0.2s, color 0.2s;
	white-space: nowrap;
}

.btn-test-webhook:hover:not(:disabled) {
	border-color: var(--accent);
	background: rgba(79, 142, 247, 0.06);
}

.btn-test-webhook:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	border-color: var(--border);
	background: none;
}

.btn-delete-webhook {
	background: none;
	border: 1px solid transparent;
	color: var(--muted);
	border-radius: 5px;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.35rem 0.7rem;
	cursor: pointer;
	font-family: inherit;
	transition: color 0.15s, border-color 0.15s;
}

.btn-delete-webhook:hover {
	color: var(--danger);
	border-color: rgba(239, 68, 68, 0.15);
	background: rgba(239, 68, 68, 0.04);
}

.webhooks-empty-note {
	padding: 2.5rem 1.5rem;
	text-align: center;
	font-size: 0.85rem;
	color: var(--muted);
}

@media (max-width: 640px) {
	.webhooks-table-header,
	.webhooks-row {
		grid-template-columns: 2fr auto;
	}

	.webhooks-table-header > *:nth-child(2),
	.webhooks-table-header > *:nth-child(3),
	.webhooks-row > *:nth-child(2),
	.webhooks-row > *:nth-child(3) {
		display: none;
	}

	.webhooks-section-header {
		flex-direction: column;
		align-items: flex-start;
	}
	.btn-create-webhook {
		align-self: flex-start;
	}
}

@media (max-width: 400px) {
	.webhook-reveal-row {
		flex-direction: column;
		align-items: stretch;
	}
}

@media (max-width: 320px) {
	.webhooks-section-header {
		padding: 1rem;
	}
	.webhooks-table-header,
	.webhooks-row {
		padding: 0.7rem 1rem;
	}
	.create-webhook-form {
		padding: 0.75rem 1rem;
	}
	.webhook-reveal-banner {
		margin: 0.75rem 1rem;
	}
}
