/* =====================================================
   Client Admin Panel + Modals – fully isolated
   ===================================================== */

.client-panel-wrapper,
.client-panel-wrapper * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.client-panel-wrapper {
	max-width: 1100px;
	margin: 1.5rem auto;
	padding: 0 1rem;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	color: #0c1e30;
}

/* Header */
.client-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1.8rem;
	padding: 1.2rem 1.5rem;
	background: linear-gradient(135deg, #0b2b4f 0%, #1a4a7a 100%);
	border-radius: 20px;
	color: white;
	box-shadow: 0 10px 30px -10px rgba(11, 43, 79, 0.4);
}

.client-panel-brand {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.client-panel-brand i {
	font-size: 2rem;
	background: rgba(255,255,255,0.15);
	padding: 12px;
	border-radius: 16px;
}

.client-panel-brand h1 {
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0;
	color: white;
}

.client-welcome {
	font-size: 0.9rem;
	opacity: 0.9;
}

.client-panel-actions {
	display: flex;
	gap: 0.7rem;
	flex-wrap: wrap;
}

/* Buttons */
.client-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.65rem 1.2rem;
	border-radius: 50px;
	font-weight: 600;
	font-size: 0.9rem;
	border: none;
	cursor: pointer;
	transition: 0.2s;
	font-family: inherit;
	text-decoration: none;
}

.client-btn-export {
	background: #10b981;
	color: white;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.client-btn-export:hover {
	background: #059669;
	transform: translateY(-1px);
}

.client-btn-logout {
	background: rgba(255,255,255,0.15);
	color: white;
	border: 1px solid rgba(255,255,255,0.3);
}

.client-btn-logout:hover {
	background: rgba(255,255,255,0.25);
}

.client-btn-edit {
	background: #2a7de1;
	color: white;
}

.client-btn-edit:hover {
	background: #1a6bc7;
}

.client-btn-profile {
	background: #6366f1;
	color: white;
}

.client-btn-profile:hover {
	background: #4f46e5;
}

.client-btn-delete {
	background: #ef4444;
	color: white;
}

.client-btn-delete:hover {
	background: #dc2626;
}

.client-btn-primary {
	background: #0b2b4f;
	color: white;
	box-shadow: 0 4px 14px rgba(11, 43, 79, 0.25);
}

.client-btn-primary:hover {
	background: #1a3f68;
}

.client-btn-secondary {
	background: #e2ecf3;
	color: #1b4057;
}

.client-btn-secondary:hover {
	background: #d0dfea;
}

/* Profile Card */
.client-profile-card {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
	background: white;
	border-radius: 24px;
	padding: 1.5rem 1.8rem;
	box-shadow: 0 10px 40px -15px rgba(0,0,0,0.12);
	border: 1px solid #e8eef5;
	margin-bottom: 1.8rem;
}

.client-profile-avatar {
	width: 90px;
	height: 90px;
	border-radius: 22px;
	background: linear-gradient(135deg, #e0f0ff, #c7e0ff);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}

.client-profile-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.client-profile-avatar i {
	font-size: 2.4rem;
	color: #1f6fd9;
}

.client-profile-info {
	flex: 1;
	min-width: 200px;
}

.client-profile-info h2 {
	font-size: 1.4rem;
	font-weight: 700;
	color: #0b1e33;
	margin-bottom: 0.4rem;
}

.client-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem 1.4rem;
	font-size: 0.9rem;
	color: #4b5b6e;
	margin-top: 0.3rem;
}

.client-meta i {
	color: #2a7de1;
	margin-right: 0.3rem;
}

.client-profile-btns {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* Details Grid */
.client-details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.2rem;
}

.client-detail-card {
	background: white;
	border-radius: 20px;
	padding: 1.3rem 1.4rem;
	box-shadow: 0 6px 20px -8px rgba(0,0,0,0.08);
	border: 1px solid #e8eef5;
}

.client-detail-card h3 {
	font-size: 1rem;
	font-weight: 600;
	color: #1e2f44;
	margin-bottom: 0.9rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e9eef3;
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.client-detail-card h3 i {
	color: #2a7de1;
}

.client-detail-card ul {
	list-style: none;
}

.client-detail-card li {
	font-size: 0.9rem;
	color: #3a4f66;
	padding: 0.35rem 0;
	line-height: 1.45;
}

.client-detail-card li strong {
	color: #1a2f44;
	font-weight: 600;
	margin-right: 0.3rem;
}

.client-status-active {
	background: #d1fae5;
	color: #065f46;
	padding: 0.15rem 0.6rem;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
}

/* ========== MODALS ========== */
.client-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(8, 25, 38, 0.55);
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: clientFadeIn 0.2s ease;
}

.client-modal-overlay.active {
	display: flex;
}

@keyframes clientFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.client-modal {
	background: white;
	border-radius: 28px;
	width: 100%;
	max-height: 92vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 40px 80px -20px rgba(0,0,0,0.35);
	animation: clientSlideUp 0.28s ease;
}

@keyframes clientSlideUp {
	from { transform: translateY(40px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

/* Horizontal modal for Edit */
.client-modal-horizontal {
	max-width: 980px;
}

.client-modal-profile {
	max-width: 480px;
}

.client-modal-close {
	position: absolute;
	top: 1.1rem;
	right: 1.3rem;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #f0f5fa;
	border: none;
	color: #5f7d95;
	font-size: 1.15rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: 0.2s;
	z-index: 2;
}

.client-modal-close:hover {
	background: #e2ebf4;
	color: #0b2b4f;
	transform: rotate(90deg);
}

.client-modal-header {
	padding: 1.6rem 1.8rem 0.8rem;
	border-bottom: 1px solid #eef3f8;
}

.client-modal-header h2 {
	font-size: 1.35rem;
	font-weight: 700;
	color: #0b1e33;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.client-modal-header h2 i {
	color: #2a7de1;
}

.client-modal-header p {
	font-size: 0.9rem;
	color: #5f7d95;
	margin-top: 0.25rem;
}

/* Horizontal 3-column body */
.client-modal-body-horizontal {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 0 1.5rem;
	padding: 1.2rem 1.8rem;
}

.client-modal-body {
	padding: 1.2rem 1.8rem;
}

.client-modal-col {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.client-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.client-field label {
	font-size: 0.82rem;
	font-weight: 500;
	color: #1f3349;
}

.client-field input,
.client-field textarea {
	width: 100%;
	padding: 0.65rem 0.9rem;
	font-size: 0.92rem;
	border: 1.5px solid #dce3ec;
	border-radius: 12px;
	background: #fafcff;
	transition: 0.2s;
	font-family: inherit;
	color: #0c1e30;
}

.client-field input:focus,
.client-field textarea:focus {
	outline: none;
	border-color: #2a7de1;
	box-shadow: 0 0 0 3px rgba(42, 125, 225, 0.12);
	background: white;
}

.client-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.8rem;
	padding: 1rem 1.8rem 1.5rem;
	border-top: 1px solid #eef3f8;
	flex-wrap: wrap;
}

.client-form-message {
	margin: 0 1.8rem 1.2rem;
	padding: 0.7rem 1.1rem;
	border-radius: 40px;
	text-align: center;
	font-weight: 500;
	font-size: 0.9rem;
}

.client-form-message.success {
	background: #d1fae5;
	color: #065f46;
}

.client-form-message.error {
	background: #fee2e2;
	color: #991b1b;
}

/* Mobile */
@media (max-width: 800px) {
	.client-modal-body-horizontal {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.client-panel-header {
		flex-direction: column;
		align-items: flex-start;
	}
	.client-profile-card {
		flex-direction: column;
		align-items: flex-start;
	}
	.client-profile-btns {
		flex-direction: row;
		flex-wrap: wrap;
		width: 100%;
	}
	.client-modal-body-horizontal {
		grid-template-columns: 1fr;
	}
	.client-modal {
		border-radius: 20px;
	}
	.client-modal-header,
	.client-modal-body-horizontal,
	.client-modal-body,
	.client-modal-footer {
		padding-left: 1.2rem;
		padding-right: 1.2rem;
	}
}

/* WP Admin list page small tweaks */
.client-admin-wrap .wp-list-table {
	margin-top: 12px;
}
