/* ============================================================
   PRIME INSIGHT LAB - PROFILE & EDIT PROFILE PAGES
   Enqueued from benqu-child/functions.php
============================================================ */

/* ============================================================
   ACCOUNT - EDIT PROFILE VIEW (?type=profile)
============================================================ */
.pil-edit-profile {
	max-width: 760px;
	margin: 0 auto;
	padding: 10px 0 50px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #111827;
	line-height: 1.5;
}
.pil-edit-header {
	text-align: center;
	margin-bottom: 26px;
}
.pil-edit-header h2 {
	font-size: 27px;
	font-weight: 800;
	color: #008ECB;
	margin: 0 0 6px;
}
.pil-edit-header p {
	font-size: 14px;
	color: #6b7280;
	margin: 0;
}

.pil-ef-notice {
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 18px;
	border: 1px solid;
}
.pil-ef-notice-success { background: #dcfce7; border-color: #86efac; color: #14532d; }
.pil-ef-notice-error   { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }

.pil-ef-form {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 28px 30px 32px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.pil-ef-card {
	border: 1px solid #eef0f3;
	border-radius: 12px;
	padding: 18px 20px;
	margin-bottom: 20px;
	background: #fafbfc;
}
.pil-ef-label {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
	color: #374151;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 9px;
}
.pil-ef-section-title {
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 12px;
}

/* Cover */
.pil-cover-preview {
	height: 180px;
	border-radius: 12px;
	position: relative;
	background-size: cover;
	background-position: center;
}
.pil-cover-chip {
	position: absolute;
	left: 12px;
	bottom: 12px;
	background: rgba(15, 23, 42, 0.85);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 14px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
}
.pil-cover-remove {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: none;
	background: #ef4444;
	color: #fff;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, transform 0.15s;
}
.pil-cover-remove:hover { background: #dc2626; transform: scale(1.08); }
.pil-cover-actions { margin-top: 12px; }
.pil-cover-change {
	background: #fff;
	border: 1px solid #d1d5db;
	color: #374151;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.pil-cover-change:hover { border-color: #9ca3af; background: #f9fafb; }
.pil-cover-palette {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-top: 12px;
}
.pil-cover-swatch {
	position: relative;
	height: 62px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	padding: 0;
	overflow: hidden;
	transition: transform 0.15s, box-shadow 0.15s;
}
.pil-cover-swatch:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
}
.pil-cover-swatch span {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.55);
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	padding: 3px 6px;
	text-align: left;
}

/* Fields */
.pil-ef-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
}
.pil-ef-field {
	margin-bottom: 20px;
}
.pil-ef-row .pil-ef-field { margin-bottom: 0; }
.pil-ef-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}
.pil-ef-field label em {
	font-weight: 400;
	color: #9ca3af;
	font-style: normal;
	font-size: 12px;
}
.pil-ef-field input[type="text"],
.pil-ef-field input[type="email"],
.pil-ef-field input[type="url"],
.pil-ef-field input[type="password"],
.pil-ef-field select {
	width: 100%;
	padding: 11px 14px;
	font-size: 14px;
	color: #111827;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.pil-ef-field input:focus,
.pil-ef-field select:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.pil-ef-warn {
	font-size: 12.5px;
	color: #ea580c;
	margin: 7px 0 0;
}
.pil-ef-hint {
	font-size: 12.5px;
	color: #6b7280;
	margin: 10px 0 0;
}

/* Social grid */
.pil-social-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 16px;
}
.pil-social-grid .pil-ef-field { margin-bottom: 0; }

/* Photo */
.pil-photo-zone {
	border: 2px dashed #d1d5db;
	border-radius: 12px;
	background: #f9fafb;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 22px;
	min-height: 190px;
}
.pil-photo-zone .uwp-user-avatar {
	position: relative;
	display: inline-block;
}
.pil-photo-zone .uwp-user-avatar img {
	width: 128px !important;
	height: 128px !important;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #fff;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

/* Bio editor */
.pil-editor-wrap {
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid #d1d5db;
	background: #fff;
}
.pil-editor-wrap .wp-editor-container { border: none; }
.pil-editor-wrap iframe { min-height: 180px; }
.pil-about-bio-content {
	font-size: 14.5px;
	line-height: 1.7;
	color: #475569;
}
.pil-about-bio-content p { margin: 0 0 12px; }
.pil-about-bio-content p:last-child { margin-bottom: 0; }

/* Submit */
.pil-ef-submit-row {
	display: flex;
	align-items: center;
	gap: 18px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 8px;
}
.pil-ef-submit {
	background: linear-gradient(135deg, #6d28d9, #008ECB);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 13px 42px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	min-width: 300px;
	transition: transform 0.15s, box-shadow 0.15s;
	box-shadow: 0 8px 20px rgba(99, 102, 241, 0.32);
}
.pil-ef-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(99, 102, 241, 0.4);
}
.pil-ef-preview {
	color: #008ECB;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.pil-ef-preview:hover { text-decoration: underline; }

@media (max-width: 640px) {
	.pil-ef-form { padding: 20px 16px; }
	.pil-ef-row { grid-template-columns: 1fr; }
	.pil-social-grid { grid-template-columns: 1fr; }
	.pil-cover-palette { grid-template-columns: repeat(2, 1fr); }
	.pil-ef-submit { min-width: 100%; }
}

/* ============================================================
   PROFILE PAGE - CREATIVE LAYOUT
============================================================ */
.pil-profile-wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px 0 60px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #111827;
	line-height: 1.5;
}

/* Hero */
.pil-profile-hero {
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}
.pil-profile-cover {
	height: 235px;
	background-size: cover;
	background-position: center;
	position: relative;
}
.pil-profile-cover-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0) 35%, rgba(15, 23, 42, 0.5) 100%);
}
.pil-profile-hero-body {
	position: relative;
	padding: 0 28px 20px;
}
.pil-profile-avatar {
	position: relative;
	z-index: 2;
	margin-top: -58px;
	width: 132px;
	height: 132px;
	border-radius: 50%;
	padding: 4px;
	background: #fff;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}
.pil-profile-avatar img {
	width: 124px;
	height: 124px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.pil-profile-id {
	margin-top: 16px;
	max-width: 720px;
}
.pil-profile-name-row {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
}
.pil-profile-name {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.3px;
	color: #0f172a;
	margin: 0;
}
.pil-profile-handle {
	font-size: 14px;
	font-weight: 500;
	color: #64748b;
}
.pil-profile-bio {
	font-size: 15px;
	line-height: 1.65;
	color: #475569;
	margin: 10px 0 0;
}
.pil-profile-location {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	font-size: 13px;
	color: #64748b;
}
.pil-profile-loc-icon {
	font-size: 14px;
}
.pil-profile-social {
	display: flex;
	gap: 8px;
	margin-top: 14px;
}
.pil-profile-social a {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #334155;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.pil-profile-social a:hover {
	background: #009FD8;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(0, 159, 216, 0.28);
}
.pil-profile-actions {
	position: absolute;
	top: 20px;
	right: 24px;
	z-index: 3;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.pil-profile-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.pil-profile-btn:hover {
	transform: translateY(-1px);
	text-decoration: none;
}
.pil-profile-btn-primary {
	background: linear-gradient(135deg, #009FD8, #008ECB);
	color: #fff;
	box-shadow: 0 6px 16px rgba(0, 159, 216, 0.3);
}
.pil-profile-btn-primary:hover {
	color: #fff;
	box-shadow: 0 10px 22px rgba(0, 159, 216, 0.38);
}
.pil-profile-btn-ghost {
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(6px);
	color: #0f172a;
	border: 1px solid rgba(255, 255, 255, 0.6);
}
.pil-profile-btn-ghost:hover {
	background: #fff;
}
.pil-profile-btn-soft {
	background: #EAF2FB;
	color: #008ECB;
}
.pil-profile-btn-soft:hover {
	background: #D6E7F8;
}

/* Stats */
.pil-profile-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border-top: 1px solid #eef0f3;
	background: #f8fafc;
}
.pil-profile-stat {
	padding: 16px 20px;
	text-align: center;
	border-right: 1px solid #eef0f3;
}
.pil-profile-stat:last-child {
	border-right: none;
}
.pil-stat-value {
	display: block;
	font-size: 19px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.2;
}
.pil-stat-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: #7a8797;
	margin-top: 3px;
}

/* Tabs */
.pil-profile-tabs {
	display: flex;
	gap: 4px;
	margin: 28px 0 0;
	padding: 0 2px;
	border-bottom: 1px solid #e5e7eb;
	overflow-x: auto;
	scrollbar-width: none;
}
.pil-profile-tabs::-webkit-scrollbar {
	display: none;
}
.pil-profile-tab {
	background: none;
	border: none;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	white-space: nowrap;
	transition: color 0.15s, border-color 0.15s;
	font-family: inherit;
}
.pil-profile-tab:hover {
	color: #0f172a;
}
.pil-profile-tab.is-active {
	color: #009FD8;
	border-color: #009FD8;
}

/* Panels */
.pil-profile-panel {
	display: none;
}
.pil-profile-panel.is-active {
	display: block;
	animation: pilFadeUp 0.35s ease;
}
@keyframes pilFadeUp {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

/* Articles grid */
.pil-articles-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin-top: 22px;
}
.pil-article-card {
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #eef0f3;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.pil-article-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
	border-color: #dbe4f0;
	text-decoration: none;
	color: inherit;
}
.pil-article-thumb {
	height: 148px;
	background-size: cover;
	background-position: center;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pil-article-thumb-emoji {
	font-size: 36px;
	opacity: 0.95;
}
.pil-article-cat {
	position: absolute;
	left: 10px;
	bottom: 10px;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	backdrop-filter: blur(4px);
}
.pil-article-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 7px;
	flex: 1;
}
.pil-article-title {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.pil-article-meta {
	font-size: 12px;
	color: #94a3b8;
	margin-top: auto;
}
.pil-profile-more {
	margin-top: 26px;
	text-align: center;
}

/* Businesses grid */
.pil-biz-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin-top: 22px;
}
.pil-biz-card {
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #eef0f3;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.pil-biz-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
	border-color: #dbe4f0;
	text-decoration: none;
	color: inherit;
}
.pil-biz-thumb {
	height: 148px;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pil-biz-thumb-emoji {
	font-size: 36px;
	opacity: 0.95;
}
.pil-biz-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.pil-biz-title {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.pil-biz-meta {
	font-size: 12px;
	color: #94a3b8;
	margin-top: auto;
}

/* Empty + About */
.pil-profile-empty {
	text-align: center;
	padding: 56px 20px;
	margin-top: 22px;
	background: #f8fafc;
	border: 1px dashed #dbe4f0;
	border-radius: 14px;
}
.pil-profile-empty-icon {
	font-size: 38px;
}
.pil-profile-empty h3 {
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
	margin: 10px 0 4px;
}
.pil-profile-empty p {
	font-size: 14px;
	color: #6b7280;
	margin: 0;
}
.pil-about-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 18px;
	margin-top: 22px;
}
.pil-about-card {
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 14px;
	padding: 24px 26px;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
.pil-about-card h3 {
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 12px;
}
.pil-about-card p {
	font-size: 14.5px;
	line-height: 1.7;
	color: #475569;
	margin: 0;
}
.pil-about-muted {
	color: #94a3b8 !important;
}
.pil-about-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.pil-about-list li {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 0;
	border-bottom: 1px dashed #e5e7eb;
	font-size: 13.5px;
}
.pil-about-list li:last-child {
	border-bottom: none;
}
.pil-about-list span {
	color: #6b7280;
}
.pil-about-list strong {
	color: #0f172a;
	text-align: right;
	font-weight: 600;
}
.pil-about-list a {
	color: #009FD8;
	text-decoration: none;
}
.pil-about-list a:hover {
	text-decoration: underline;
}

/* Not found */
.pil-profile-notfound {
	text-align: center;
	padding: 70px 24px;
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 18px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.pil-profile-notfound-icon {
	font-size: 44px;
}
.pil-profile-notfound h2 {
	font-size: 22px;
	font-weight: 800;
	color: #0f172a;
	margin: 12px 0 6px;
}
.pil-profile-notfound p {
	font-size: 14px;
	color: #6b7280;
	margin: 0 0 20px;
}
.pil-profile-notfound-btn {
	display: inline-flex;
	padding: 11px 24px;
	border-radius: 999px;
	background: linear-gradient(135deg, #009FD8, #008ECB);
	color: #fff;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
}
.pil-profile-notfound-btn:hover {
	color: #fff;
	text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
	.pil-articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pil-biz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pil-profile-stats { grid-template-columns: repeat(2, 1fr); }
	.pil-profile-stat { border-bottom: 1px solid #eef0f3; }
	.pil-about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.pil-profile-hero-body { padding: 0 18px 16px; }
	.pil-profile-actions { position: static; margin-top: 14px; }
	.pil-profile-avatar { width: 108px; height: 108px; margin-top: -46px; }
	.pil-profile-avatar img { width: 100px; height: 100px; }
	.pil-profile-cover { height: 170px; }
	.pil-profile-name { font-size: 21px; }
	.pil-articles-grid { grid-template-columns: 1fr; }
	.pil-biz-grid { grid-template-columns: 1fr; }
}
