/* ===== CECB Login Page Styles ===== */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
	font-family: "Inter", system-ui, -apple-system, sans-serif;
}

body {
	background: #f2f8fa url(/assets/cecb_app/images/background.webp) center / cover no-repeat fixed;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 20px;
}

/* Suppress Frappe default web padding */
.page-content-wrapper {
	padding: 0 !important;
	margin: 0 !important;
	width: 100% !important;
	min-height: 100vh !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: transparent !important;
}

/* Background overlay */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(30, 94, 93, 0.15);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	z-index: -1;
}

/* ===== Page container ===== */
.page {
	width: 420px;
	max-width: 100%;
	position: relative;
}

/* ===== Card ===== */
.card {
	background: #ffffff;
	border-radius: 16px;
	padding: 44px 40px 40px;
	box-shadow: 0 8px 32px rgba(30, 94, 93, 0.1), 0 2px 8px rgba(30, 94, 93, 0.04);
	position: relative;
	overflow: hidden;
}

.card.card-sm .inner {
	padding: 8px 0;
}

/* ===== Bokeh ===== */
.bokeh {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.b1 {
	width: 200px;
	height: 200px;
	background: radial-gradient(circle, rgba(60, 179, 141, 0.08) 0%, transparent 70%);
	top: -60px;
	right: -60px;
}

.b2 {
	width: 150px;
	height: 150px;
	background: radial-gradient(circle, rgba(107, 184, 214, 0.08) 0%, transparent 70%);
	bottom: -40px;
	left: -40px;
}

.b3 {
	width: 100px;
	height: 100px;
	background: radial-gradient(circle, rgba(147, 197, 209, 0.08) 0%, transparent 70%);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* ===== Logo / Brand ===== */
.brand {
	text-align: center;
	margin-bottom: 28px;
}

.brand img {
	width: 72px;
	height: auto;
	display: block;
	margin: 0 auto 14px;
}

.brand .name-hi {
	font-size: 18px;
	font-weight: 700;
	color: #1e5e5d;
	line-height: 1.4;
}

.brand .name-en {
	font-size: 13px;
	color: #5ba6a0;
	font-weight: 500;
	margin-top: 4px;
}

/* ===== Title ===== */
.title {
	font-size: 22px;
	font-weight: 700;
	color: #1e5e5d;
	margin-bottom: 6px;
	text-align: center;
}

.sub {
	font-size: 14px;
	color: #5ba6a0;
	margin-bottom: 24px;
	line-height: 1.5;
	text-align: center;
}

/* ===== Alert ===== */
.alert {
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 20px;
	display: none;
	line-height: 1.5;
}

.alert.error {
	display: block;
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.alert.success {
	display: block;
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

/* ===== Form fields ===== */
.fld {
	margin-bottom: 18px;
}

.lbl {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1e5e5d;
	margin-bottom: 6px;
}

.wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.inp {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1.5px solid #dce8ec;
	border-radius: 10px;
	font-size: 14px;
	color: #1e5e5d;
	background: #f2f8fa;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.inp:focus {
	border-color: #3cb38d;
	box-shadow: 0 0 0 3px rgba(60, 179, 141, 0.15);
}

.inp::placeholder {
	color: #93c5d1;
}

/* Password eye toggle */
.pwv {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #93c5d1;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.pwv:hover {
	color: #3cb38d;
}

.pwv.visible {
	color: #3cb38d;
}

.err {
	font-size: 12px;
	color: #b91c1c;
	margin-top: 4px;
	min-height: 0;
}

/* ===== Options row ===== */
.opt {
	text-align: right;
	margin: -10px 0 20px;
}

.opt a {
	font-size: 13px;
	color: #6bb8d6;
	text-decoration: none;
	font-weight: 500;
}

.opt a:hover {
	color: #3cb38d;
	text-decoration: underline;
}

/* ===== Submit button ===== */
.btn-primary {
	width: 100%;
	height: 48px;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, #3cb38d 0%, #1e5e5d 100%);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
	font-family: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(60, 179, 141, 0.3);
}

.btn-primary:active {
	transform: translateY(0);
}

.btn-primary:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Spinner (hidden by default) */
.spin {
	animation: rot 0.6s linear infinite;
}

.spin.d-none {
	display: none;
}

@keyframes rot {
	to {
		transform: rotate(360deg);
	}
}

/* ===== Bottom link ===== */
.btm {
	text-align: center;
	margin-top: 22px;
}

.btm span {
	font-size: 13px;
	color: #93c5d1;
}

.btm a {
	color: #6bb8d6;
	text-decoration: none;
	font-weight: 500;
	font-size: 13px;
}

.btm a:hover {
	color: #3cb38d;
	text-decoration: underline;
}

.btm .bk {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* ===== Overlays (Forgot Password) ===== */
.overlay {
	position: fixed;
	inset: 0;
	background: rgba(30, 94, 93, 0.2);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 100;
}

.overlay.d-none {
	display: none;
}
