/* =====================================================
   DesiERP Auth — clean professional sign-in (v3)
   Light page, centered white card with brand band.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
	--bg: #eef2f7;
	--surface: #ffffff;
	--ink: #0f172a;
	--ink-2: #334155;
	--muted: #64748b;
	--muted-2: #94a3b8;
	--primary: #2563eb;
	--primary-600: #1d4ed8;
	--border: #e2e8f0;
	--error: #dc2626;
	--radius-lg: 16px;
	--radius: 10px;
	--shadow: 0 6px 20px rgba(2, 6, 23, 0.08);
	--font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
html { overflow-x: hidden; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 14px;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	display: flex;
	flex-direction: column;
}

/* =====================================================
   SHELL — centers the card
   ===================================================== */
.shell {
	position: relative;
	flex: 1;
	width: 100%;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 36px 16px;
}

.panel--form { display: flex; justify-content: center; width: 100%; }

/* Fixed-width column for card + footer line */
.login-wrap { width: min(440px, calc(100vw - 32px)); }

/* =====================================================
   CARD
   ===================================================== */
.panel--form .card, .login-card {
	position: relative;
	width: 100%;
	background: #fff;
	border: 1px solid #e6eaf1;
	border-radius: 18px;
	box-shadow:
		0 2px 4px rgba(15, 23, 42, 0.04),
		0 24px 48px -12px rgba(15, 23, 42, 0.18);
	overflow: hidden;
	animation: cardIn .4s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes cardIn {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---- Brand band across the top of the card ---- */
.brand-block {
	display: flex; align-items: center; gap: 13px;
	padding: 22px 30px;
	background: #1e40af;
	color: #fff;
}
.logo-mark {
	width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
	display: inline-grid; place-items: center;
	background: rgba(255, 255, 255, 0.16);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.30);
	color: #fff; font-weight: 800; font-size: 21px; letter-spacing: -0.02em;
}
.brand-block .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-block .wordmark {
	font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: #fff;
}
.brand-block .wordmark .accent { color: #a5f3fc; }
.brand-block .tagline {
	font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, 0.85);
	letter-spacing: .04em; margin-top: 2px;
}

/* ---- Card inner body ---- */
.card-inner { padding: 26px 30px 24px; }

.card-h { margin-bottom: 20px; }
.card-h .h, .panel--form h2 {
	font-size: 20px; font-weight: 800;
	margin: 0 0 5px; letter-spacing: -0.02em; color: var(--ink);
}
.card-h .sub {
	color: var(--muted); font-size: 13px; margin: 0; line-height: 1.55;
}

/* =====================================================
   ALERT
   ===================================================== */
.alert {
	display: flex; align-items: center; gap: 9px;
	background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
	border-radius: var(--radius);
	padding: 10px 12px;
	font-size: 12.5px;
	margin-bottom: 16px;
}
.alert-dot {
	width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
	background: var(--error);
}
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* =====================================================
   FORM
   ===================================================== */
.form { display: block; }
.row { display: block; margin-bottom: 16px; }
.form .btn { margin-top: 2px; }
.row label, .form-row label {
	display: block;
	font-size: 12.5px; font-weight: 600; color: var(--ink-2);
	margin-bottom: 6px;
}
.row-head {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 6px;
}
.row-head label { margin-bottom: 0; }

/* Input with icon prefix */
.input-wrap { position: relative; }
.input-wrap .input-ico {
	position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
	width: 16px; height: 16px;
	color: var(--muted-2);
	pointer-events: none;
	display: inline-flex; align-items: center; justify-content: center;
}
.input-wrap .input-ico svg { width: 16px; height: 16px; display: block; }

/* Country-code selector beside the mobile field */
.phone-wrap { display: flex; gap: 10px; }
.cc-select {
	flex: 0 0 auto;
	width: 108px;
	height: 46px;
	padding: 0 8px 0 12px;
	font-family: inherit;
	font-size: 14px; font-weight: 600;
	color: var(--ink-2);
	background: #f1f5f9;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	outline: none;
	cursor: pointer;
	transition: border-color .14s ease, box-shadow .14s ease;
}
.cc-select:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.phone-wrap input {
	flex: 1;
	min-width: 0;
	border-radius: 10px;
}

input[type="tel"], input[type="email"], input[type="text"], input[type="number"] {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 500;
	letter-spacing: .01em;
	color: var(--ink);
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	outline: none;
	transition: border-color .14s ease, box-shadow .14s ease;
}
.input-wrap input { padding-left: 38px; }
input[type="tel"]:focus, input[type="email"]:focus, input[type="text"]:focus,
input[type="number"]:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
input::placeholder { color: var(--muted-2); font-weight: 400; }

/* =====================================================
   PIN BOXES — auto-advance handled by js/pin-input.js
   ===================================================== */
.pin { display: flex; gap: 9px; }
.pin-box {
	flex: 1;
	min-width: 0;
	height: 50px;
	text-align: center;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	color: var(--ink);
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	outline: none;
	caret-color: var(--primary);
	transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.pin-box:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.pin-box:not(:placeholder-shown):not(:focus) {
	border-color: #93c5fd;
	background: #eff6ff;
}

/* =====================================================
   EXTRAS + BUTTON
   ===================================================== */
.check {
	display: inline-flex; align-items: center; gap: 8px;
	cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 500;
	user-select: none;
}
.check input { accent-color: var(--primary); width: 15px; height: 15px; margin: 0; }
.extras { display: flex; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%;
	height: 48px;
	padding: 0 18px;
	border: none;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14.5px; font-weight: 700; letter-spacing: 0.01em;
	color: #fff;
	background: var(--primary);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10), 0 8px 16px -4px rgba(37, 99, 235, 0.35);
	cursor: pointer;
	transition: background .14s ease, box-shadow .14s ease, transform .08s ease;
}
.btn:hover {
	background: var(--primary-600);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10), 0 10px 20px -4px rgba(37, 99, 235, 0.45);
}
.btn:active { transform: translateY(1px); }

/* Links */
.link { color: var(--primary); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link.small { font-size: 12.5px; }

.alt {
	margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center;
}

.legal, .note {
	margin: 18px 0 0; font-size: 11px; color: var(--muted-2); text-align: center;
	line-height: 1.55;
}
.subtitle { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }

.actions { margin-top: 14px; text-align: center; }

/* Footer line under the card */
.trust-row {
	display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap;
	margin-top: 16px;
	color: var(--muted);
	font-size: 12px; font-weight: 500;
}
.trust-row .dot {
	width: 3px; height: 3px; border-radius: 50%;
	background: var(--muted-2);
}

.powered-by {
	display: flex; align-items: center; justify-content: center; gap: 6px;
	margin-top: 14px;
	font-size: 11px; font-weight: 500; color: var(--muted-2);
	letter-spacing: .2px;
}
.powered-by .powered-logo {
	height: 22px; width: 22px; object-fit: contain; display: block;
}
.powered-by .powered-name {
	color: var(--ink-2); font-weight: 600;
}

/* =====================================================
   Standalone card pages (forgot.jsp etc.) — bare .card in body
   ===================================================== */
body > .card {
	margin: auto;
	width: min(420px, 92vw);
	background: #fff;
	border: 1px solid #e6eaf1;
	border-radius: 16px;
	box-shadow:
		0 2px 4px rgba(15, 23, 42, 0.04),
		0 24px 48px -12px rgba(15, 23, 42, 0.18);
	padding: 30px 30px 26px;
	animation: cardIn .4s cubic-bezier(.2,.8,.3,1) both;
}
body > .card h2 {
	font-size: 20px; font-weight: 800; letter-spacing: -0.02em;
	margin: 0 0 6px; color: var(--ink);
}
body > .card .form-row { margin-bottom: 16px; }
body > .card .btn { margin-top: 4px; }

/* Legacy footer strip (if present) */
.footer {
	flex: 0 0 auto;
	text-align: center;
	padding: 14px;
	color: var(--muted-2);
	font-size: 11px;
}
.footer .powered { margin: 0; }

/* Small screens */
@media (max-width: 480px) {
	.brand-block { padding: 18px 22px; }
	.card-inner { padding: 22px 20px 20px; }
	.pin { gap: 6px; }
	.pin-box { height: 46px; font-size: 18px; border-radius: 9px; }
}
