/**
 * BMN Profile — profile.css
 *
 * Styles untuk:
 *  - Halaman profil user [bmn_profile]
 *  - Navigasi bar .bmn-fe-nav (dipakai di dashboard & profil)
 *  - Role badge .bmn-role-badge
 *
 * Prefix: .bmn-profile-* dan .bmn-fe-nav untuk isolasi dari tema.
 */

/* ── Navigasi bar ─────────────────────────────────────────────────── */
.bmn-fe-nav {
	display: flex;
	gap: 4px;
	padding: 0 0 16px;
	border-bottom: 2px solid #dee2e6;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.bmn-fe-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	color: #495057;
	text-decoration: none;
	border: 1.5px solid transparent;
	transition: background .15s, color .15s, border-color .15s;
}

.bmn-fe-nav-link:hover {
	background: #e9ecef;
	color: #212529;
	text-decoration: none;
}

.bmn-fe-nav-link--active {
	background: #e8f0fe;
	color: #1a6fc4;
	border-color: #c2d4f5;
	font-weight: 600;
}

/* ── Role badge ───────────────────────────────────────────────────── */
.bmn-role-badge {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .4px;
	text-transform: uppercase;
}

.bmn-role-badge--admin      { background: #dbeafe; color: #1d4ed8; }
.bmn-role-badge--editor     { background: #d1fae5; color: #065f46; }
.bmn-role-badge--plp        { background: #fef3c7; color: #92400e; }
.bmn-role-badge--contrib    { background: #ede9fe; color: #5b21b6; }
.bmn-role-badge--subscriber { background: #f3f4f6; color: #374151; }
.bmn-role-badge--other      { background: #f3f4f6; color: #374151; }

/* ── Profile wrap ─────────────────────────────────────────────────── */
.bmn-profile-wrap {
	max-width: 640px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	color: #212529;
	line-height: 1.55;
}

/* ── Profile header ───────────────────────────────────────────────── */
.bmn-profile-header {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px 24px;
	background: linear-gradient(135deg, #1a6fc4 0%, #0d4f9e 100%);
	border-radius: 10px 10px 0 0;
	color: #fff;
	margin-bottom: 0;
}

.bmn-profile-avatar-wrap {
	flex-shrink: 0;
}

.bmn-profile-avatar {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid rgba(255,255,255,.5);
	display: block;
	background: #4b9de8;
}

.bmn-profile-header-info {
	flex: 1;
	min-width: 0;
}

.bmn-profile-name {
	margin: 0 0 2px;
	font-size: 20px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bmn-profile-login {
	margin: 0 0 8px;
	font-size: 13px;
	opacity: .8;
}

/* ── Tabs ─────────────────────────────────────────────────────────── */
.bmn-profile-tabs {
	display: flex;
	background: #f7f9fc;
	border: 1px solid #dee2e6;
	border-top: none;
}

.bmn-profile-tab-btn {
	flex: 1;
	padding: 13px 8px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #6c757d;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color .15s, border-color .15s;
}

.bmn-profile-tab-btn:hover  { color: #1a6fc4; }
.bmn-profile-tab-btn.active {
	color: #1a6fc4;
	border-bottom-color: #1a6fc4;
	background: #fff;
}

/* ── Status message ───────────────────────────────────────────────── */
.bmn-profile-msg {
	margin: 12px 0;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 13px;
}

.bmn-profile-msg--info  { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.bmn-profile-msg--ok    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.bmn-profile-msg--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Panels ───────────────────────────────────────────────────────── */
.bmn-profile-panel {
	padding: 24px;
	background: #fff;
	border: 1px solid #dee2e6;
	border-top: none;
	border-radius: 0 0 10px 10px;
}

/* ── Field groups ─────────────────────────────────────────────────── */
.bmn-profile-field-group {
	padding: 16px 0 4px;
	margin-bottom: 4px;
}

.bmn-profile-field-group:first-child {
	padding-top: 0;
	border-bottom: 1px dashed #e9ecef;
	margin-bottom: 16px;
}

.bmn-profile-field {
	margin-bottom: 16px;
}

.bmn-profile-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 5px;
	color: #374151;
}

.bmn-profile-required { color: #ef4444; margin-left: 2px; }

.bmn-profile-input,
.bmn-profile-select {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	color: #111827;
	background: #fff;
	box-sizing: border-box;
	transition: border-color .15s, box-shadow .15s;
}

.bmn-profile-input:focus,
.bmn-profile-select:focus {
	outline: none;
	border-color: #1a6fc4;
	box-shadow: 0 0 0 3px rgba(26,111,196,.15);
}

.bmn-profile-input--readonly {
	background: #f8f9fa;
	color: #6c757d;
	cursor: not-allowed;
}

.bmn-profile-hint {
	display: block;
	font-size: 12px;
	color: #9ca3af;
	margin-top: 4px;
}

/* ── Password field ───────────────────────────────────────────────── */
.bmn-profile-pw-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.bmn-profile-pw-wrap .bmn-profile-input {
	padding-right: 42px;
}

.bmn-profile-pw-toggle {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	padding: 4px;
	color: #9ca3af;
}

.bmn-profile-pw-toggle:hover { color: #1a6fc4; }

/* ── Password strength ────────────────────────────────────────────── */
.bmn-pw-strength {
	margin-top: 8px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.bmn-pw-strength-bar {
	flex: 1;
	height: 5px;
	background: #e9ecef;
	border-radius: 3px;
	overflow: hidden;
}

.bmn-pw-strength-fill {
	height: 100%;
	width: 0;
	border-radius: 3px;
	transition: width .25s ease, background-color .25s ease;
}

.bmn-pw-strength-label {
	font-size: 12px;
	font-weight: 600;
	min-width: 80px;
}

/* ── Actions ──────────────────────────────────────────────────────── */
.bmn-profile-actions {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e9ecef;
}

.bmn-profile-submit {
	padding: 11px 28px;
	background: #1a6fc4;
	color: #fff;
	border: none;
	border-radius: 7px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .1s;
}

.bmn-profile-submit:hover  { background: #1558a0; }
.bmn-profile-submit:active { transform: scale(.98); }
.bmn-profile-submit:disabled {
	background: #93c5fd;
	cursor: not-allowed;
}

/* ── Login notice ─────────────────────────────────────────────────── */
.bmn-profile-login-notice {
	padding: 24px;
	text-align: center;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 520px) {
	.bmn-profile-header {
		flex-direction: column;
		text-align: center;
		gap: 12px;
	}

	.bmn-profile-header-info { width: 100%; }

	.bmn-profile-panel { padding: 16px; }

	.bmn-fe-nav { gap: 0; }
	.bmn-fe-nav-link { padding: 7px 12px; font-size: 13px; }
}
