.bcal-wrap {
	max-width: 1180px;
}

.bcal-wrap .bcal-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px;
	margin: 8px 0 24px;
	flex-wrap: wrap;
}

.bcal-wrap h1 {
	margin: 0 0 6px;
	font-size: 26px;
	line-height: 1.25;
	font-weight: 600;
}

.bcal-lead {
	margin: 0;
	color: #50575e;
	max-width: 46em;
}

.bcal-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.bcal-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin-bottom: 20px;
}

.bcal-stat {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 16px 18px;
}

.bcal-stat-label {
	margin: 0;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #646970;
}

.bcal-stat-value {
	margin: 8px 0 0;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 600;
	color: #1d2327;
}

.bcal-toolbar {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.bcal-toolbar select,
.bcal-toolbar input[type="search"] {
	min-height: 36px;
}

.bcal-toolbar input[type="search"] {
	min-width: min(100%, 280px);
	flex: 1;
}

.bcal-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
}

.bcal-chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 999px;
	background: #fff;
	color: #1d2327;
	text-decoration: none;
	font-size: 12px;
	line-height: 1.6;
}

.bcal-chip:hover,
.bcal-chip:focus {
	border-color: #2271b1;
	color: #2271b1;
	box-shadow: none;
}

.bcal-chip.is-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.bcal-panel {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 0;
	margin-bottom: 20px;
	overflow: hidden;
}

.bcal-panel > h2 {
	margin: 0;
	padding: 14px 16px 0;
	font-size: 15px;
}

.bcal-panel .widefat {
	border: 0;
	box-shadow: none;
}

.bcal-table td,
.bcal-table th {
	vertical-align: top;
}

.bcal-table time {
	color: #646970;
	font-size: 12px;
	white-space: nowrap;
}

.bcal-ua {
	color: #646970;
	font-size: 12px;
	word-break: break-word;
	max-width: 240px;
}

.bcal-empty {
	text-align: center;
	padding: 48px 20px !important;
	color: #646970;
}

.bcal-tag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	background: #f0f0f1;
	color: #2c3338;
}

.bcal-tag-auth { background: #dbeafe; color: #1e3a8a; }
.bcal-tag-security { background: #fee2e2; color: #991b1b; }
.bcal-tag-user { background: #fef3c7; color: #92400e; }
.bcal-tag-system { background: #f3e8ff; color: #6b21a8; }
.bcal-tag-content { background: #dcfce7; color: #166534; }
.bcal-tag-traffic { background: #e0e7ff; color: #3730a3; }
.bcal-tag-search { background: #ffedd5; color: #9a3412; }
.bcal-tag-settings { background: #cffafe; color: #155e75; }

.bcal-copy {
	margin-left: 6px;
}

.bcal-danger-link {
	color: #b32d2e !important;
	border-color: #b32d2e !important;
}

.bcal-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
	gap: 16px;
}

.bcal-settings .bcal-panel {
	padding: 8px 20px 4px;
}

.bcal-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 14px 0;
	border-bottom: 1px solid #f0f0f1;
}

.bcal-row:last-child {
	border-bottom: 0;
}

.bcal-row .description {
	margin: 4px 0 0;
}

.bcal-row input[type="number"] {
	width: 96px;
}

.bcal-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 22px;
	flex-shrink: 0;
}

.bcal-switch input[type="checkbox"] {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.bcal-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #a7aaad;
	border-radius: 22px;
}

.bcal-slider:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
}

.bcal-switch input:checked + .bcal-slider {
	background: #2271b1;
}

.bcal-switch input:focus-visible + .bcal-slider {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.bcal-switch input:checked + .bcal-slider:before {
	transform: translateX(20px);
}

.bcal-help-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin-top: 16px;
}

.bcal-help-grid .bcal-panel {
	padding: 16px 18px 20px;
}

@media (max-width: 782px) {
	.bcal-split,
	.bcal-row {
		display: block;
	}

	.bcal-row input[type="number"],
	.bcal-switch {
		margin-top: 10px;
	}

	.bcal-stat-value {
		font-size: 22px;
	}
}
