/**
 * BMN Frontend Auth — auth.css
 *
 * Styles untuk form Login / Register / Lupa Password dan
 * tombol Keluar di header dashboard.
 * Menggunakan prefix .bmn-auth-* untuk isolasi dari tema aktif.
 */

/* ── Wrapper ─────────────────────────────────────────────────────── */
.bmn-auth-wrap {
	max-width: 420px;
	margin: 24px auto;
	background: #ffffff;
	border: 1px solid #dde1e7;
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .07);
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	color: #1a1a2e;
}

/* ── Header ──────────────────────────────────────────────────────── */
.bmn-auth-header {
	padding: 28px 28px 12px;
	text-align: center;
	background: linear-gradient(135deg, #1a6fc4 0%, #0d4f9e 100%);
	color: #fff;
}

.bmn-auth-icon {
	display: block;
	font-size: 32px;
	margin-bottom: 8px;
}

.bmn-auth-title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
}

.bmn-auth-subtitle {
	margin: 0;
	font-size: 13px;
	opacity: .85;
}

/* ── Tabs ─────────────────────────────────────────────────────────── */
.bmn-auth-tabs {
	display: flex;
	border-bottom: 2px solid #e8ecf0;
	background: #f7f9fc;
}

.bmn-auth-tab-btn {
	flex: 1;
	padding: 12px 8px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #666;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color .15s, border-color .15s;
}

.bmn-auth-tab-btn:hover {
	color: #1a6fc4;
}

.bmn-auth-tab-btn.active {
	color: #1a6fc4;
	border-bottom-color: #1a6fc4;
	background: #fff;
}

/* ── Status Message ───────────────────────────────────────────────── */
.bmn-auth-msg {
	margin: 12px 24px 0;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.5;
}

.bmn-auth-msg--info  { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.bmn-auth-msg--ok    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.bmn-auth-msg--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Panels ───────────────────────────────────────────────────────── */
.bmn-auth-panel {
	padding: 20px 28px 28px;
}

/* ── Fields ───────────────────────────────────────────────────────── */
.bmn-auth-field {
	margin-bottom: 16px;
}

.bmn-auth-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 5px;
	color: #374151;
}

.bmn-auth-input {
	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-auth-input:focus {
	outline: none;
	border-color: #1a6fc4;
	box-shadow: 0 0 0 3px rgba(26, 111, 196, .15);
}

.bmn-auth-input::placeholder { color: #9ca3af; }

/* ── Password toggle ──────────────────────────────────────────────── */
.bmn-auth-pw-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.bmn-auth-pw-wrap .bmn-auth-input {
	padding-right: 40px;
}

.bmn-auth-pw-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 4px;
	font-size: 15px;
	line-height: 1;
	color: #6b7280;
}

.bmn-auth-pw-toggle:hover { color: #1a6fc4; }

/* ── Remember me ──────────────────────────────────────────────────── */
.bmn-auth-check-row {
	margin-bottom: 18px;
}

.bmn-auth-check-label {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: #4b5563;
	cursor: pointer;
}

.bmn-auth-check-label input[type="checkbox"] {
	width: 15px;
	height: 15px;
	accent-color: #1a6fc4;
	cursor: pointer;
}

/* ── Submit button ────────────────────────────────────────────────── */
.bmn-auth-submit {
	display: block;
	width: 100%;
	padding: 11px 16px;
	background: #1a6fc4;
	color: #fff;
	border: none;
	border-radius: 7px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .1s;
}

.bmn-auth-submit:hover  { background: #1558a0; }
.bmn-auth-submit:active { transform: scale(.98); }
.bmn-auth-submit:disabled {
	background: #93c5fd;
	cursor: not-allowed;
}

/* ── Hint text ────────────────────────────────────────────────────── */
.bmn-auth-hint {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 16px;
	line-height: 1.6;
}

/* ── Standalone "already logged in" message ───────────────────────── */
.bmn-auth-already-in {
	padding: 16px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	font-size: 14px;
	color: #166534;
}

/* ── Dashboard header user area ───────────────────────────────────── */
.bmn-fe-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	flex-wrap: wrap;
}

.bmn-fe-header-user {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	margin-top: 2px;
}

.bmn-fe-username {
	font-size: 13px;
	color: #6b7280;
	max-width: 160px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Tombol logout kecil di header */
#bmn-fe-logout-btn {
	padding: 5px 14px;
	font-size: 13px;
	font-weight: 600;
	background: transparent;
	color: #1a6fc4;
	border: 1.5px solid #1a6fc4;
	border-radius: 20px;
	cursor: pointer;
	transition: background .15s, color .15s;
	white-space: nowrap;
}

#bmn-fe-logout-btn:hover {
	background: #1a6fc4;
	color: #fff;
}

#bmn-fe-logout-btn:disabled {
	opacity: .55;
	cursor: not-allowed;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 500px) {
	.bmn-auth-wrap  { margin: 12px; border-radius: 8px; }
	.bmn-auth-panel { padding: 16px 20px 24px; }
}
