.handl-aicac-tab-panel {
	margin-top: 1em;
}

.handl-aicac-log-wrap {
	margin-top: 0;
}

.nav-tab-wrapper {
	margin-bottom: 0;
}

.handl-aicac-table-filters {
	margin: 0 0 6px;
}

.handl-aicac-table-filters .subsubsub {
	float: none;
	margin: 0 0 6px;
}

.handl-aicac-table-filters .tablenav {
	clear: both;
	height: auto;
	margin: 0;
	padding: 0;
}

.handl-aicac-table-filters .tablenav .alignleft.actions {
	overflow: visible;
	padding: 0;
}

.handl-aicac-table-filters .tablenav .alignleft.actions select {
	margin-right: 6px;
	max-width: 14em;
	vertical-align: middle;
}

.handl-aicac-table-filters + .handl-aicac-log-meta,
.handl-aicac-table-filters + .widefat {
	margin-top: 0;
}

.handl-aicac-rules-save-form {
	display: none;
}

.handl-aicac-log-meta {
	margin: 0 0 12px;
	color: #646970;
	max-width: 72em;
}

.handl-aicac-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.handl-aicac-badge--allow {
	background: #d5f0d5;
	color: #1e4620;
}

.handl-aicac-badge--deny {
	background: #f5dcdc;
	color: #8a2424;
}

.handl-aicac-log-table code {
	font-size: 11px;
	word-break: break-all;
}

.handl-aicac-log-table .column-time {
	white-space: nowrap;
	width: 11em;
}

.handl-aicac-log-table .column-operation {
	width: 10em;
}

.handl-aicac-log-table .column-provider,
.handl-aicac-log-table .column-model {
	width: 8em;
}

.handl-aicac-log-table .column-tokens {
	width: 5.5em;
	text-align: right;
	white-space: nowrap;
}

.handl-aicac-token-count {
	font-variant-numeric: tabular-nums;
}

.handl-aicac-prompt-details summary {
	cursor: pointer;
	color: #2271b1;
	font-size: 12px;
}

.handl-aicac-prompt-details pre {
	margin: 6px 0 0;
	padding: 8px 10px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	font-size: 11px;
	line-height: 1.45;
	max-height: 120px;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
}

.handl-aicac-muted {
	color: #a7aaad;
}

.handl-aicac-suggested-rules {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.handl-aicac-quick-actions .handl-aicac-quick-rule-form {
	display: inline-block;
	margin: 0 4px 4px 0;
	vertical-align: middle;
}

.handl-aicac-quick-actions .button-small {
	height: auto;
	line-height: 1.4;
	padding: 2px 8px;
	min-height: 0;
}

.handl-aicac-log-table .column-actions {
	width: 11em;
	vertical-align: top;
}

.handl-aicac-kill-exceptions select[disabled] {
	opacity: 0.6;
}

/* Usage insights tab */
.handl-aicac-nav-tab--insights {
	position: relative;
}

.handl-aicac-insights-wrap {
	margin-top: 0;
	max-width: 1200px;
}

.handl-aicac-insights-hero {
	margin: 0 0 1.25em;
	padding: 1.25em 1.5em;
	border-radius: 10px;
	background: linear-gradient(135deg, #f0f6fc 0%, #f6f7f7 48%, #eef9f0 100%);
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.handl-aicac-insights-title {
	margin: 0 0 0.35em;
	font-size: 1.35em;
	font-weight: 600;
	line-height: 1.25;
}

.handl-aicac-insights-lead {
	margin: 0;
	max-width: 42em;
	color: #50575e;
	font-size: 14px;
	line-height: 1.5;
}

.handl-aicac-insights-meta,
.handl-aicac-insights-empty-note {
	margin: 0.75em 0 0;
	font-size: 13px;
	color: #646970;
}

.handl-aicac-insights-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin: 0 0 1.25em;
}

.handl-aicac-insights-stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border-radius: 8px;
	background: #fff;
	border: 1px solid #dcdcde;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.handl-aicac-insights-stat__label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #646970;
}

.handl-aicac-insights-stat__value {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
	color: #1d2327;
}

.handl-aicac-insights-stat__hint {
	font-size: 12px;
	color: #787c82;
	line-height: 1.35;
}

.handl-aicac-insights-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 14px;
}

.handl-aicac-insights-pills,
.handl-aicac-insights-metric-toggle {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.handl-aicac-insights-pill,
.handl-aicac-insights-metric {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	color: #2c3338;
	background: #fff;
	border: 1px solid #c3c4c7;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.handl-aicac-insights-pill:hover,
.handl-aicac-insights-metric:hover {
	border-color: #2271b1;
	color: #2271b1;
}

.handl-aicac-insights-pill.is-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.handl-aicac-insights-metric.is-active {
	background: #1d2327;
	border-color: #1d2327;
	color: #fff;
}

.handl-aicac-insights-panel {
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.handl-aicac-insights-table {
	margin: 0;
	border: 0;
}

.handl-aicac-insights-table thead th {
	background: #f6f7f7;
	font-size: 12px;
}

.handl-aicac-insights-table .column-rank {
	width: 3em;
	text-align: center;
}

.handl-aicac-insights-table .column-label {
	min-width: 12em;
}

.handl-aicac-insights-table .column-chart {
	width: 28%;
	min-width: 10em;
}

.handl-aicac-insights-table .column-num {
	width: 5.5em;
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.handl-aicac-insights-table .column-time {
	width: 9em;
	white-space: nowrap;
	font-size: 12px;
	color: #50575e;
}

.handl-aicac-insights-key {
	font-size: 11px;
	word-break: break-all;
}

.handl-aicac-insights-row--leader {
	background: linear-gradient(90deg, rgba(34, 113, 177, 0.06) 0%, transparent 55%);
}

.handl-aicac-insights-rank-badge {
	color: #dba617;
	font-size: 12px;
}

.handl-aicac-insights-bar {
	position: relative;
	height: 26px;
	border-radius: 6px;
	background: #f0f0f1;
	overflow: hidden;
}

.handl-aicac-insights-bar__fill {
	display: block;
	height: 100%;
	border-radius: 6px;
	background: linear-gradient(90deg, #72aee6 0%, #2271b1 100%);
	min-width: 0;
	transition: width 0.25s ease;
}

.handl-aicac-insights-row--leader .handl-aicac-insights-bar__fill {
	background: linear-gradient(90deg, #68de7c 0%, #00a32a 100%);
}

.handl-aicac-insights-bar__value {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 11px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: #1d2327;
	text-shadow: 0 0 4px #fff, 0 0 4px #fff;
}

.handl-aicac-insights-peak {
	font-weight: 600;
	color: #135e96;
}

.handl-aicac-insights-table-empty {
	padding: 2em;
	text-align: center;
	color: #646970;
	background: #f6f7f7;
	border-radius: 8px;
	border: 1px dashed #c3c4c7;
}

@media screen and (max-width: 960px) {
	.handl-aicac-insights-toolbar {
		flex-direction: column;
		align-items: flex-start;
	}

	.handl-aicac-insights-table .column-chart {
		width: 22%;
	}
}
