/**
 * B2B Portal Styles
 */

/* Reset and Base */
.b2bdp-portal-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #333;
	background: #f5f5f5;
	min-height: 100vh;
}

/* Topbar */
.b2bdp-topbar {
	background: #2c3e50;
	color: #fff;
	padding: 1rem 2rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.b2bdp-topbar-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1400px;
	margin: 0 auto;
}

.b2bdp-topbar-title {
	font-size: 1.5rem;
	font-weight: 600;
}

.b2bdp-topbar-user,
.b2bdp-topbar-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.b2bdp-topbar-cart {
	color: #fff;
	text-decoration: none;
	padding: 0.5rem 1rem;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	transition: background 0.3s;
}

.b2bdp-topbar-cart:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.b2bdp-cart-badge {
	background: #e74c3c;
	color: #fff;
	padding: 0.2rem 0.5rem;
	border-radius: 10px;
	font-size: 0.8rem;
	margin-left: 0.3rem;
}

.b2bdp-cart-count {
	font-size: 0.85rem;
	opacity: 0.9;
}

.b2bdp-user-name {
	font-weight: 500;
}

.b2bdp-logout-link {
	color: #fff;
	text-decoration: none;
	padding: 0.5rem 1rem;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	transition: background 0.3s;
}

.b2bdp-logout-link:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* Portal Content */
.b2bdp-portal-content {
	display: flex;
	max-width: 1400px;
	margin: 0 auto;
	padding: 2rem;
	gap: 2rem;
}

/* Sidebar */
.b2bdp-sidebar {
	width: 250px;
	flex-shrink: 0;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	padding: 1.5rem 0;
}

.b2bdp-sidebar-nav {
	width: 100%;
}

.b2bdp-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.b2bdp-nav-item {
	margin: 0;
}

.b2bdp-nav-link {
	display: block;
	padding: 1rem 1.5rem;
	color: #555;
	text-decoration: none;
	transition: all 0.3s;
	border-left: 3px solid transparent;
}

.b2bdp-nav-link:hover {
	background: #f8f9fa;
	color: #2c3e50;
}

.b2bdp-nav-item.b2bdp-active .b2bdp-nav-link {
	background: #e8f4f8;
	color: #2c3e50;
	border-left-color: #3498db;
	font-weight: 600;
}

/* Main Content */
.b2bdp-main-content {
	flex: 1;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	padding: 2rem;
}

.b2bdp-page-title {
	font-size: 2rem;
	font-weight: 600;
	margin: 0 0 2rem 0;
	color: #2c3e50;
}

/* Stats Grid */
.b2bdp-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.b2bdp-stat-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.b2bdp-stat-label {
	font-size: 0.9rem;
	opacity: 0.9;
	margin-bottom: 0.5rem;
}

.b2bdp-stat-value {
	font-size: 2rem;
	font-weight: 700;
}

/* Welcome Message */
.b2bdp-welcome-message {
	background: #f8f9fa;
	padding: 1.5rem;
	border-radius: 8px;
	border-left: 4px solid #3498db;
}

.b2bdp-welcome-message p {
	margin: 0.5rem 0;
}

/* Tables */
.b2bdp-catalog-table-wrapper,
.b2bdp-orders-table-wrapper {
	overflow-x: auto;
}

.b2bdp-catalog-table,
.b2bdp-orders-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
}

.b2bdp-catalog-table thead,
.b2bdp-orders-table thead {
	background: #f8f9fa;
}

.b2bdp-catalog-table th,
.b2bdp-orders-table th {
	padding: 1rem;
	text-align: left;
	font-weight: 600;
	color: #555;
	border-bottom: 2px solid #dee2e6;
}

.b2bdp-catalog-table td,
.b2bdp-orders-table td {
	padding: 1rem;
	border-bottom: 1px solid #dee2e6;
}

.b2bdp-catalog-table tbody tr:hover,
.b2bdp-orders-table tbody tr:hover {
	background: #f8f9fa;
}

/* Quantity Input */
.b2bdp-qty-input {
	width: 80px;
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-align: center;
}

/* Buttons */
.b2bdp-btn {
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 500;
	transition: all 0.3s;
	text-decoration: none;
	display: inline-block;
}

.b2bdp-btn-primary {
	background: #3498db;
	color: #fff;
}

.b2bdp-btn-primary:hover:not(:disabled) {
	background: #2980b9;
	transform: translateY(-1px);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.b2bdp-btn-primary:disabled {
	background: #bdc3c7;
	cursor: not-allowed;
	opacity: 0.6;
}

.b2bdp-btn-secondary {
	background: #95a5a6;
	color: #fff;
}

.b2bdp-btn-secondary:hover {
	background: #7f8c8d;
}

/* Messages */
.b2bdp-message {
	padding: 1rem;
	border-radius: 4px;
	margin: 1rem 0;
}

.b2bdp-message.b2bdp-error {
	background: #fee;
	color: #c33;
	border-left: 4px solid #c33;
}

.b2bdp-message.b2bdp-success {
	background: #d4edda;
	color: #155724;
	border-left: 4px solid #28a745;
}

/* Cart */
.b2bdp-cart-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 2rem;
}

.b2bdp-cart-table th {
	text-align: left;
	padding: 1rem;
	background: #f8f9fa;
	border-bottom: 2px solid #dee2e6;
}

.b2bdp-cart-table td {
	padding: 1rem;
	border-bottom: 1px solid #eee;
}

.b2bdp-cart-qty {
	width: 70px;
	padding: 0.5rem;
	text-align: center;
}

.b2bdp-cart-footer {
	padding-top: 1.5rem;
	border-top: 1px solid #dee2e6;
}

.b2bdp-cart-total {
	margin-bottom: 1.5rem;
	font-size: 1.25rem;
}

.b2bdp-order-fields {
	margin-bottom: 1.5rem;
	max-width: 400px;
}

.b2bdp-btn-remove {
	background: #e74c3c;
	color: #fff;
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
}

.b2bdp-btn-remove:hover {
	background: #c0392b;
}

.b2bdp-btn-large {
	padding: 1rem 2rem;
	font-size: 1rem;
}

.b2bdp-exported {
	font-size: 0.85rem;
	opacity: 0.8;
	margin-left: 0.5rem;
}

/* Account Info */
.b2bdp-account-info {
	max-width: 600px;
}

.b2bdp-info-section {
	margin-bottom: 2rem;
}

.b2bdp-section-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #2c3e50;
}

.b2bdp-info-row {
	display: flex;
	padding: 1rem 0;
	border-bottom: 1px solid #eee;
}

.b2bdp-info-label {
	font-weight: 600;
	width: 200px;
	color: #555;
}

.b2bdp-info-value {
	color: #333;
}

/* Order Status */
.b2bdp-order-status {
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 500;
	display: inline-block;
}

.b2bdp-order-status-processing {
	background: #fff3cd;
	color: #856404;
}

.b2bdp-order-status-completed {
	background: #d4edda;
	color: #155724;
}

.b2bdp-order-status-pending {
	background: #d1ecf1;
	color: #0c5460;
}

/* Login Form */
.b2bdp-login-wrapper {
	max-width: 400px;
	margin: 3rem auto;
	padding: 2rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.b2bdp-login-title {
	text-align: center;
	margin-bottom: 2rem;
	color: #2c3e50;
}

.b2bdp-form-group {
	margin-bottom: 1.5rem;
}

.b2bdp-form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: #555;
}

.b2bdp-form-input {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
}

.b2bdp-form-input:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.b2bdp-form-message {
	padding: 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
	display: none;
}

.b2bdp-form-message.b2bdp-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
	display: block;
}

.b2bdp-form-message.b2bdp-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	display: block;
}

/* Responsive */
@media (max-width: 768px) {
	.b2bdp-portal-content {
		flex-direction: column;
		padding: 1rem;
	}

	.b2bdp-sidebar {
		width: 100%;
	}

	.b2bdp-topbar-content {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.b2bdp-stats-grid {
		grid-template-columns: 1fr;
	}

	.b2bdp-catalog-table-wrapper,
	.b2bdp-orders-table-wrapper {
		overflow-x: scroll;
	}

	.b2bdp-catalog-table,
	.b2bdp-orders-table {
		font-size: 0.9rem;
	}

	.b2bdp-catalog-table th,
	.b2bdp-catalog-table td,
	.b2bdp-orders-table th,
	.b2bdp-orders-table td {
		padding: 0.5rem;
	}
}
