#bb-dashboard-app {
	max-width: 1200px;
	margin-top: 16px;
	color: #000;
}

.bb-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.bb-toolbar .bb-back {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 8px 14px;
	cursor: pointer;
	font-weight: 500;
}

.bb-toolbar .bb-spacer {
	flex: 1;
}

.bb-range-presets button {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 6px 10px;
	margin-right: 6px;
	cursor: pointer;
}

.bb-range-presets button.is-active {
	border-color: #2271b1;
	color: #2271b1;
	background: #f0f6fc;
}

.bb-date-inputs {
	display: flex;
	align-items: center;
	gap: 6px;
}

.bb-date-inputs input[type="date"] {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 6px 8px;
}

.bb-card {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	padding: 20px 24px;
	margin-bottom: 16px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.bb-profile-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.bb-profile-identity {
	display: flex;
	align-items: center;
	gap: 14px;
}

.bb-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #dbeafe;
	color: #1d4ed8;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
}

.bb-profile-identity h2 {
	margin: 0;
	font-size: 16px;
}

.bb-profile-identity .bb-muted {
	font-size: 13px;
}

.bb-badges {
	display: flex;
	gap: 8px;
}

.bb-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 24px;
	margin-bottom: 16px;
}

.bb-kpi {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	padding: 18px 20px;
}

.bb-kpi .bb-kpi-label {
	font-size: 13px;
	color: #000;
	margin-bottom: 6px;
}

.bb-kpi .bb-kpi-value {
	font-size: 26px;
	font-weight: 600;
	line-height: 1.1;
}

.bb-kpi .bb-kpi-sub {
	font-size: 12px;
	color: #000;
	margin-top: 6px;
}

.bb-kpi .bb-kpi-sub.is-up { color: #1a7f37; }
.bb-kpi .bb-kpi-sub.is-down { color: #cf222e; }

.bb-card h3 {
	margin-top: 0;
	font-size: 15px;
}

.bb-card-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}

.bb-card-head .bb-muted {
	font-size: 12px;
}

.bb-select {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 6px 8px;
	font-size: 13px;
	cursor: pointer;
}

.bb-muted {
	color: #000;
}

table.bb-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

table.bb-table th {
	text-align: right;
	font-weight: 500;
	color: #000;
	padding: 8px 6px;
	border-bottom: 1px solid #e2e4e7;
}

table.bb-table th:first-child,
table.bb-table td:first-child {
	text-align: left;
}

table.bb-table td {
	text-align: right;
	padding: 10px 6px;
	border-bottom: 1px solid #f0f0f1;
}

table.bb-table tbody tr.is-clickable {
	cursor: pointer;
}

table.bb-table tbody tr.is-clickable:hover {
	background: #f6f7f7;
}

table.bb-table td.bb-include-cell {
	width: 1%;
	white-space: nowrap;
}

table.bb-table td.bb-include-cell input[type="checkbox"] {
	cursor: pointer;
}

table.bb-table tbody tr.is-excluded {
	opacity: 0.55;
}

.bb-affiliate-name {
	font-weight: 600;
}

.bb-affiliate-email {
	display: block;
	font-weight: 400;
	color: #000;
	font-size: 12px;
}

.bb-delta.is-up { color: #1a7f37; }
.bb-delta.is-down { color: #cf222e; }

.bb-status-pill {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	text-transform: capitalize;
}

.bb-status-pill.paid, .bb-status-pill.active { background: #dcfce7; color: #166534; }
.bb-status-pill.unpaid { background: #dbeafe; color: #1e40af; }
.bb-status-pill.pending, .bb-status-pill.inactive { background: #fef3c7; color: #92400e; }
.bb-status-pill.rejected { background: #fee2e2; color: #991b1b; }

.bb-table-footer {
	margin-top: 12px;
	text-align: center;
}

.bb-btn-outline {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 8px 16px;
	cursor: pointer;
}

.bb-chart svg text {
	font-size: 11px;
	fill: #000;
}

.bb-chart-legend {
	display: flex;
	gap: 16px;
	margin-bottom: 8px;
	font-size: 12px;
}

.bb-chart-legend span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.bb-chart-legend i {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	display: inline-block;
}

.bb-empty {
	color: #000;
	padding: 20px 0;
	text-align: center;
}

.bb-section-loading {
	color: #000;
	padding: 16px 0;
}

/* ---- Partner manager (front-end page) -------------------------------- */

.bb-manager-shell {
	max-width: 1200px;
	margin: 0 auto;
	color: #000;
	font-size: 14px;
}

.bb-manager-shell #bb-dashboard-app {
	margin-top: 0;
}

.bb-manager-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.bb-manager-header h2 {
	margin: 0;
}

.bb-notice {
	background: #fef3c7;
	border: 1px solid #fcd34d;
	border-radius: 6px;
	padding: 8px 12px;
	margin-bottom: 12px;
	font-size: 13px;
}

.bb-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid #e2e4e7;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.bb-tabs button {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 10px 14px;
	margin-bottom: -1px;
	cursor: pointer;
	font-size: 14px;
	color: #000;
}

.bb-tabs button.is-active {
	border-bottom-color: #2271b1;
	color: #2271b1;
	font-weight: 600;
}

[data-tab-panel][hidden] {
	display: none;
}

.bb-btn-primary {
	background: #2271b1;
	border: 1px solid #2271b1;
	color: #fff;
	border-radius: 6px;
	padding: 6px 14px;
	cursor: pointer;
}

.bb-btn-primary:disabled,
.bb-btn-outline:disabled {
	opacity: 0.5;
	cursor: default;
}

table.bb-table td.bb-actions-cell {
	white-space: nowrap;
}

table.bb-table td.bb-wrap-cell {
	max-width: 320px;
	text-align: left;
	white-space: normal;
}

.bb-form {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	flex-wrap: wrap;
}

.bb-form label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
}

.bb-form input[type="text"] {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 6px 8px;
}

.bb-form-message {
	color: #cf222e;
	font-size: 13px;
}

.bb-login-shell {
	max-width: 420px;
}

.bb-login-shell input[type="text"],
.bb-login-shell input[type="password"] {
	width: 100%;
	box-sizing: border-box;
}

/* The bb-table/bb-kpi-grid layouts were built for wp-admin widths. */
@media (max-width: 782px) {
	.bb-manager-shell table.bb-table {
		display: block;
		overflow-x: auto;
	}
}
