/* ==============================================================
   CG Finance Login — Simple Card Design
   ============================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; padding: 0; }

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.web-header, .web-footer { display: none !important; }

/* ------------------------------------------------------------------ */
/*  PAGE — full screen background                                      */
/* ------------------------------------------------------------------ */
.page {
	position: relative;
	width: 100%;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: linear-gradient(135deg, rgba(5, 30, 15, 0.7), rgba(5, 26, 14, 0.6)),
		url("/assets/cg_finance/images/bg_blue_ruppee.webp") center / cover no-repeat fixed;
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/*  BOKEH — floating on background                                     */
/* ------------------------------------------------------------------ */
.bokeh {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(60px);
	opacity: 0.2;
	z-index: 0;
}

.b1 { width: 350px; height: 350px; background: rgba(134, 239, 172, 0.4); top: -80px; left: 5%; animation: bf 12s ease-in-out infinite alternate; }
.b2 { width: 250px; height: 250px; background: rgba(74, 222, 128, 0.3); bottom: 10%; right: 8%; animation: bf 10s ease-in-out infinite alternate-reverse; }
.b3 { width: 200px; height: 200px; background: rgba(167, 243, 208, 0.25); top: 40%; left: -30px; animation: bf 15s ease-in-out infinite alternate; }

@keyframes bf {
	0%   { transform: translate(0, 0) scale(1); }
	100% { transform: translate(25px, -15px) scale(1.1); }
}

/* ------------------------------------------------------------------ */
/*  CARD                                                               */
/* ------------------------------------------------------------------ */
.card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	background: #0a1628;
	border-radius: 24px;
	border: 1.5px solid #0091f3;
	box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,145,243,0.15);
	padding: 44px 40px 36px;
	animation: ci 0.5s ease-out;
}

.card-sm { max-width: 440px; }

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

/* ------------------------------------------------------------------ */
/*  TOP — Emblem + Govt text                                           */
/* ------------------------------------------------------------------ */
.top {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 28px;
}

.emblem {
	width: 128px; height: 128px;
	object-fit: contain;
	margin-bottom: 10px;
}

.govt { line-height: 1.3; }
.g1 { display: block; font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.6px; }
.g2 { display: block; font-size: 24px; font-weight: 700; color: #ffffff; }

/* ------------------------------------------------------------------ */
/*  TITLE                                                              */
/* ------------------------------------------------------------------ */
.title {
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 20px;
	text-align: center;
	letter-spacing: -0.3px;
}

.sub {
	font-size: 13px;
	color: rgba(255,255,255,0.45);
	text-align: center;
	margin: -12px 0 20px;
}

/* ------------------------------------------------------------------ */
/*  FORM FIELDS                                                       */
/* ------------------------------------------------------------------ */
.fld { margin-bottom: 16px; }

.lbl {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: rgba(255,255,255,0.45);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 6px;
}

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

.ic {
	position: absolute;
	left: 16px;
	font-size: 13px;
	color: rgba(255,255,255,0.18);
	pointer-events: none;
	z-index: 1;
}

.inp {
	width: 100%;
	padding: 14px 16px 14px 44px;
	font-size: 14px;
	line-height: 1.5;
	color: #ffffff;
	background: rgba(0,0,0,0.25);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 50px;
	outline: none;
	font-family: inherit;
	transition: all 0.25s;
}

.inp::placeholder { color: rgba(255,255,255,0.2); }

.inp:focus {
	background: rgba(0,0,0,0.35);
	border-color: rgba(0,145,243,0.5);
	box-shadow: 0 0 0 3px rgba(0,145,243,0.12);
}

.inp:focus ~ .ic,
.wrap:focus-within .ic { color: rgba(0,145,243,0.6); }

/* Error */
.fld.invalid .inp { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.06); }
.fld.invalid .err { display: block; }
.err { font-size: 11px; color: #f87171; margin-top: 4px; padding-left: 16px; display: none; }

/* Password toggle */
.pwv {
	position: absolute;
	right: 6px;
	background: none;
	border: none;
	padding: 8px 12px;
	color: rgba(255,255,255,0.2);
	cursor: pointer;
	font-size: 14px;
	z-index: 1;
	transition: color 0.2s;
}
.pwv:hover { color: rgba(255,255,255,0.5); }

/* Options row */
.opt { display: flex; justify-content: flex-end; margin: -2px 0 20px; }

.fgt {
	font-size: 12px;
	color: rgba(255,255,255,0.4);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s;
}
.fgt:hover { color: #66b8ff; text-decoration: underline; }

/* ------------------------------------------------------------------ */
/*  BUTTON                                                             */
/* ------------------------------------------------------------------ */
.btn-primary {
	width: 100%;
	padding: 15px 24px;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	background: linear-gradient(135deg, #0091f3, #0072c4);
	border: none;
	border-radius: 50px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: inherit;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	transition: all 0.25s;
	box-shadow: 0 4px 16px rgba(0,145,243,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}

.btn-primary:hover {
	background: linear-gradient(135deg, #0072c4, #005799);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0,145,243,0.45);
}

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

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

.spin { font-size: 16px; }

/* ------------------------------------------------------------------ */
/*  ALERT                                                              */
/* ------------------------------------------------------------------ */
.alert {
	padding: 10px 16px;
	border-radius: 12px;
	font-size: 13px;
	margin-bottom: 16px;
	display: none;
}

.alert.danger { display: block; background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }
.alert.success { display: block; background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.2); }

/* Frappe error banner */
.login-error-banner {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: rgba(239,68,68,0.12);
	border: 1px solid rgba(239,68,68,0.2);
	border-radius: 12px;
	color: #fca5a5;
	font-size: 13px;
	margin-bottom: 16px;
}
.login-error-banner span { flex: 1; }

/* ------------------------------------------------------------------ */
/*  BOTTOM — signup link                                               */
/* ------------------------------------------------------------------ */
.btm {
	text-align: center;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid rgba(255,255,255,0.06);
	font-size: 13px;
	color: rgba(255,255,255,0.4);
}

.btm a { color: #66b8ff; font-weight: 600; text-decoration: none; margin-left: 4px; }
.btm a:hover { text-decoration: underline; }
.bk { color: rgba(255,255,255,0.5) !important; font-weight: 500 !important; }
.bk i { margin-right: 6px; }

/* ------------------------------------------------------------------ */
/*  OVERLAYS                                                           */
/* ------------------------------------------------------------------ */
.overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(0,0,0,0.65);
	backdrop-filter: blur(6px);
}

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

.overlay .inner { padding: 0; }

/* ------------------------------------------------------------------ */
/*  SIGNUP FORM (from Frappe template)                                 */
/* ------------------------------------------------------------------ */
.form-signup { margin-top: 4px; }

.form-signup .inp {
	margin-bottom: 12px;
	padding: 14px 16px 14px 44px;
	border-radius: 50px;
	background: rgba(0,0,0,0.25);
	border: 1px solid rgba(255,255,255,0.06);
	color: #ffffff;
	outline: none;
	font-family: inherit;
	font-size: 14px;
	width: 100%;
}

.form-signup .inp:focus {
	background: rgba(0,0,0,0.35);
	border-color: rgba(0,145,243,0.5);
	box-shadow: 0 0 0 3px rgba(0,145,243,0.12);
}

.form-signup .inp::placeholder { color: rgba(255,255,255,0.2); }

.form-signup .btn-signup {
	width: 100%;
	padding: 15px 24px;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	background: linear-gradient(135deg, #0091f3, #0072c4);
	border: none;
	border-radius: 50px;
	cursor: pointer;
	text-align: center;
	font-family: inherit;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.25s;
	box-shadow: 0 4px 16px rgba(0,145,243,0.35);
}

.form-signup .btn-signup:hover:not(:disabled) {
	background: linear-gradient(135deg, #0072c4, #005799);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0,145,243,0.45);
}

.form-signup .btn-signup:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.form-signup .field-label { display: none; }
.form-signup .lbl { display: none; }

.form-signup .sr-only {
	position: static !important;
	width: auto !important;
	height: auto !important;
	padding: 0 !important;
	margin: 0 0 6px !important;
	border: 0 !important;
	clip: none !important;
	display: block !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	color: rgba(255,255,255,0.45) !important;
	text-transform: uppercase !important;
	letter-spacing: 1px !important;
}

.form-signup input:first-of-type { margin-top: 4px; }

/* ------------------------------------------------------------------ */
/*  UTILITY                                                            */
/* ------------------------------------------------------------------ */
.d-none { display: none !important; }
.tc { text-align: center; }
.tm { color: rgba(255,255,255,0.5); }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.mt-2 { margin-top: 8px; }

/* ------------------------------------------------------------------ */
/*  RESPONSIVE                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 480px) {
	.card { padding: 32px 24px 28px; border-radius: 20px; }
	.page { padding: 16px; }
	.title { font-size: 22px; }
	.emblem { width: 52px; height: 52px; }
	.g2 { font-size: 16px; }
}

/* Fix Frappe signup wrapper */
.page-card-body { width: 100%; }
.page-card-actions { width: 100%; }

/* Frappe signup template uses its own class names — map to ours */
.form-signup .form-control {
	width: 100%;
	padding: 14px 16px 14px 44px;
	font-size: 14px;
	line-height: 1.5;
	color: #ffffff;
	background: rgba(0,0,0,0.25);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 50px;
	outline: none;
	font-family: inherit;
	transition: all 0.25s;
	margin-bottom: 12px;
	box-sizing: border-box;
}

.form-signup .form-control:focus {
	background: rgba(0,0,0,0.35);
	border-color: rgba(0,145,243,0.5);
	box-shadow: 0 0 0 3px rgba(0,145,243,0.12);
}

.form-signup .form-control::placeholder { color: rgba(255,255,255,0.2); }

.form-signup .form-group { margin-bottom: 0; }

.form-signup .field-error {
	font-size: 11px;
	color: #f87171;
	margin-top: -6px;
	margin-bottom: 8px;
	padding-left: 16px;
	display: none;
}

.form-signup .form-group.invalid .form-control {
	border-color: rgba(239,68,68,0.4);
	background: rgba(239,68,68,0.06);
}

.form-signup .form-group.invalid .field-error { display: block; }

.form-signup .hide { display: none; }

.form-signup .text-center { text-align: center; }

.form-signup .sign-up-message { margin-top: 12px; font-size: 13px; }

.form-signup .blue { color: #66b8ff; text-decoration: none; font-weight: 500; }
.form-signup .blue:hover { text-decoration: underline; }
