/**
 * FairBusiness — Dashboard Styles
 *
 * Structural CSS for user, company, and admin dashboards.
 * BEM naming convention.
 */

/* Dashboard wrapper */
.fb-dashboard {
	max-width: 960px;
	margin: 0 auto;
	padding: 24px;
}

.fb-dashboard__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
}

.fb-dashboard__title {
	margin: 0;
	font-size: 24px;
}

/* Warning notice variant */
.fb-notice--warning {
	background: #fffbeb;
	color: #92400e;
	border: 1px solid #fde68a;
}

/* Email verification banner */
.fb-dashboard__verify-banner {
	margin-bottom: 24px;
	padding: 16px 20px;
	border-radius: 8px;
}

.fb-verify-banner__content {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.fb-verify-banner__text {
	flex: 1;
}

.fb-verify-banner__text strong {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
}

.fb-verify-banner__text p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

.fb-verify-banner__actions {
	flex-shrink: 0;
}

.fb-verify-banner__otp-form {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.fb-verify-banner__otp-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.fb-verify-banner__otp-row .fb-input {
	max-width: 180px;
	height: 40px;
	padding: 8px 12px;
	font-size: 16px;
	letter-spacing: 4px;
	text-align: center;
}

.fb-verify-banner__message {
	margin-top: 10px;
	padding: 8px 12px;
	font-size: 13px;
	border-radius: 4px;
}

@media (max-width: 640px) {
	.fb-verify-banner__content {
		flex-direction: column;
	}

	.fb-verify-banner__otp-row {
		flex-wrap: wrap;
	}

	.fb-verify-banner__otp-row .fb-input {
		max-width: none;
		flex: 1;
	}
}

/* Tabs */
.fb-dashboard__tabs {
	display: flex;
	border-bottom: 2px solid #eee;
	margin-bottom: 24px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.fb-dashboard__tab {
	padding: 12px 20px;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: border-color 0.2s;
	color: #666;
}

.fb-dashboard__tab--active {
	border-bottom-color: #333;
	color: #333;
}

.fb-dashboard__tab:hover {
	color: #333;
}

.fb-dashboard__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	margin-left: 6px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 10px;
	background: #eee;
	color: #666;
}

.fb-dashboard__tab--active .fb-dashboard__badge {
	background: #333;
	color: #fff;
}

/* Tab content (panels) */
.fb-dashboard__panel {
	display: none;
}

.fb-dashboard__panel--active {
	display: block;
}

/* Stats row */
.fb-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.fb-stat-card {
	padding: 20px;
	border: 1px solid #eee;
	border-radius: 8px;
	text-align: center;
}

.fb-stat-card__value {
	font-size: 28px;
	font-weight: 700;
	margin-bottom: 4px;
}

.fb-stat-card__label {
	font-size: 13px;
	color: #666;
}

/* Item list */
.fb-item-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fb-item-list__item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid #f3f4f6;
}

.fb-item-list__item:last-child {
	border-bottom: none;
}

/* Bulk action toolbar */
.fb-bulk-toolbar {
	display: none;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	margin-bottom: 16px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.fb-bulk-toolbar--active {
	display: flex;
}

.fb-bulk-toolbar__count {
	font-size: 14px;
	font-weight: 500;
	margin-right: auto;
}

.fb-bulk-toolbar__select-all {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	cursor: pointer;
}

/* Checkbox */
.fb-checkbox-col {
	flex-shrink: 0;
	width: 20px;
	padding-top: 2px;
}

.fb-checkbox-col input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* Status badges */
.fb-status {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 500;
	border-radius: 12px;
	white-space: nowrap;
}

.fb-status--pending {
	background: #fef3c7;
	color: #92400e;
}

.fb-status--approved,
.fb-status--resolved {
	background: #d1fae5;
	color: #065f46;
}

.fb-status--rejected {
	background: #fee2e2;
	color: #991b1b;
}

.fb-status--processing,
.fb-status--accepted {
	background: #dbeafe;
	color: #1e40af;
}

.fb-status--unresolved {
	background: #fce7f3;
	color: #9d174d;
}

.fb-status--pending_resolution {
	background: #fef3c7;
	color: #b45309;
}

.fb-status--admin_review {
	background: #ede9fe;
	color: #6d28d9;
}

/* Action buttons row */
.fb-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* Filters bar */
.fb-filters {
	display: flex;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.fb-filters__select {
	padding: 8px 12px;
	font-size: 13px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

/* Complaint thread — resolution proposal */
.fb-complaint-thread__resolution-proposal {
	margin: 16px 0;
	padding: 16px;
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-radius: 8px;
}

.fb-complaint-thread__resolution-proposal h4 {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: #92400e;
}

.fb-complaint-thread__resolution-message {
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.5;
}

.fb-complaint-thread__resolution-actions {
	display: flex;
	gap: 8px;
}

.fb-complaint-thread__waiting-notice {
	margin: 8px 0 0;
	font-size: 13px;
	font-style: italic;
	color: #92400e;
}

.fb-complaint-thread__propose-form {
	margin-top: 12px;
}

.fb-complaint-thread__propose-form h4 {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
}

/* Button variants */
.fb-btn--warning {
	background: #f59e0b;
	color: #fff;
	border: none;
}

.fb-btn--warning:hover {
	background: #d97706;
}

.fb-btn--danger {
	background: #ef4444;
	color: #fff;
	border: none;
}

.fb-btn--danger:hover {
	background: #dc2626;
}

/* Responsive */
@media (max-width: 640px) {
	.fb-dashboard {
		padding: 16px;
	}

	.fb-dashboard__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.fb-dashboard__tabs {
		/* Scroll on mobile instead of wrapping */
	}

	.fb-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.fb-item-list__item {
		flex-direction: column;
	}

	.fb-bulk-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.fb-bulk-toolbar__count {
		margin-right: 0;
		margin-bottom: 8px;
	}

	/* Fixed bottom bar for bulk actions on mobile */
	.fb-bulk-toolbar--mobile {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 100;
		border-radius: 0;
		border: none;
		border-top: 1px solid #e5e7eb;
	}
}
