/* ========================================================
   DMS - Bright, Clean & Professional Centered Authentication
   ======================================================== */

:root {
	--auth-primary: #2563eb;
	--auth-primary-hover: #1d4ed8;
	--auth-primary-light: #eff6ff;
	--auth-primary-border: #bfdbfe;
	--auth-bg-light: #f8fafc;
	--auth-card-bg: #ffffff;
	--auth-text-dark: #0f172a;
	--auth-text-body: #334155;
	--auth-text-muted: #64748b;
	--auth-border: #e2e8f0;
	--auth-card-radius: 20px;
}

body.login-page {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background-color: #f8fafc;
	background-image: 
		radial-gradient(circle at 10% 12%, rgba(59, 130, 246, 0.09) 0%, transparent 45%),
		radial-gradient(circle at 90% 88%, rgba(14, 165, 233, 0.08) 0%, transparent 45%),
		radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
	background-attachment: fixed;
	color: var(--auth-text-body);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: relative;
	overflow-x: hidden;
}

/* Subtle Bright Ambient Grid Pattern */
.ambient-mesh {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image: 
		linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
	background-size: 36px 36px;
	mask-image: radial-gradient(circle at center, black 70%, transparent 100%);
	-webkit-mask-image: radial-gradient(circle at center, black 70%, transparent 100%);
}

/* Auth Outer Container - Centered, Focused */
.auth-wrapper {
	position: relative;
	z-index: 10;
	width: 100%;
	max-width: 480px;
	margin: 28px auto;
	padding: 0 16px;
}

/* Single Elegant Main Card */
.auth-main-card {
	background: #ffffff;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: var(--auth-card-radius);
	box-shadow: 
		0 20px 48px -12px rgba(15, 23, 42, 0.09),
		0 8px 24px -6px rgba(15, 23, 42, 0.04),
		0 0 0 1px rgba(226, 232, 240, 0.6);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	width: 100%;
	transition: box-shadow 0.3s ease;
}

/* Card Header: Brand & Identity */
.auth-card-header {
	background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
	padding: 28px 28px 22px 28px;
	text-align: center;
	border-bottom: 1px solid #f1f5f9;
	position: relative;
}

.brand-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #dbeafe;
	border: 1px solid #bfdbfe;
	padding: 5px 12px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	color: #1d4ed8;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	margin-top: 8px;
	margin-bottom: 0;
	box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.brand-badge i {
	color: #2563eb;
	font-size: 11px;
}

.brand-logo-wrap {
	width: 58px;
	height: 58px;
	border-radius: 14px;
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	padding: 6px;
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 12px auto;
}

.brand-logo-wrap img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.brand-titles h2 {
	font-size: 22px;
	font-weight: 800;
	margin: 0;
	color: var(--auth-text-dark);
	letter-spacing: -0.5px;
}

.brand-titles p {
	font-size: 12.5px;
	margin: 2px 0 0 0;
	color: #2563eb;
	font-weight: 700;
}

/* Card Body: Form Area */
.auth-card-body {
	padding: 22px 32px 30px 32px;
}

.form-header-group {
	margin-bottom: 20px;
	text-align: center;
}

.form-header-title {
	font-size: 18px;
	font-weight: 800;
	color: var(--auth-text-dark);
	letter-spacing: -0.3px;
	margin: 0 0 4px 0;
}

.form-header-subtitle {
	font-size: 13px;
	color: var(--auth-text-muted);
	margin: 0;
}

/* Demo Active Banner (Bright Fresh Accent) */
.demo-user-banner {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-left: 4px solid #16a34a;
	border-radius: 12px;
	padding: 10px 12px;
	margin-bottom: 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.demo-user-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.demo-user-info .icon-badge {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #dcfce7;
	color: #15803d;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	flex-shrink: 0;
}

.demo-user-text {
	font-size: 12px;
	color: #166534;
	line-height: 1.35;
}

.demo-user-text strong {
	color: #14532d;
	font-size: 12.5px;
}

.btn-use-demo {
	background: #16a34a;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 5px 10px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s;
	box-shadow: 0 2px 5px rgba(22, 163, 74, 0.25);
}

.btn-use-demo:hover {
	background: #15803d;
	box-shadow: 0 3px 8px rgba(22, 163, 74, 0.35);
	transform: translateY(-1px);
}

/* Form Controls - Clear, Bright, High Contrast */
.auth-field-group {
	margin-bottom: 16px;
}

.auth-label {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
	color: #334155;
	margin-bottom: 5px;
}

.auth-label i {
	color: #2563eb;
}

.auth-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.auth-input-icon {
	position: absolute;
	left: 14px;
	color: #94a3b8;
	font-size: 13.5px;
	pointer-events: none;
	transition: color 0.2s ease;
	z-index: 2;
}

.auth-input {
	width: 100%;
	height: 42px;
	padding: 8px 14px 8px 38px;
	font-size: 13px;
	font-family: inherit;
	color: #0f172a;
	background: #f8fafc;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	transition: all 0.2s ease;
}

.auth-input:hover {
	border-color: #94a3b8;
}

.auth-input:focus {
	outline: none;
	background: #ffffff;
	border-color: #2563eb;
	box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
	color: #2563eb;
}

/* Password Toggle Button */
.btn-toggle-pw {
	position: absolute;
	right: 12px;
	background: none;
	border: none;
	color: #64748b;
	cursor: pointer;
	padding: 4px;
	font-size: 13.5px;
	z-index: 3;
	transition: color 0.2s;
}

.btn-toggle-pw:hover {
	color: #2563eb;
}

/* Captcha Styling */
.captcha-container {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f8fafc;
	padding: 6px 10px;
	border-radius: 10px;
	border: 1.5px solid #cbd5e1;
}

.captcha-img-box {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #cbd5e1;
	cursor: pointer;
	display: flex;
	align-items: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.captcha-img-box img {
	height: 36px;
	display: block;
}

.captcha-input {
	height: 38px;
	padding: 6px 10px;
	text-align: center;
	letter-spacing: 2px;
	font-weight: 700;
	font-size: 14px;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	flex: 1;
	background: #ffffff;
}

.captcha-input:focus {
	border-color: #2563eb;
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Submit Button - Vibrant, Confident Primary Blue */
.btn-auth-submit {
	width: 100%;
	height: 44px;
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.2px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	margin-top: 10px;
	margin-bottom: 14px;
}

.btn-auth-submit:hover:not(:disabled) {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
	color: #ffffff;
}

.btn-auth-submit:active:not(:disabled) {
	transform: translateY(0);
}

.btn-auth-submit:disabled {
	opacity: 0.75;
	cursor: not-allowed;
}

/* Demo Registration Callout */
.demo-action-card {
	background: #f8fafc;
	border: 1.5px dashed #cbd5e1;
	border-radius: 12px;
	padding: 12px 14px;
	text-align: center;
	margin-top: 8px;
}

.demo-action-title {
	font-size: 12px;
	font-weight: 700;
	color: #475569;
	margin-bottom: 6px;
}

.btn-demo-register {
	background: #ffffff;
	color: #0284c7;
	border: 1.5px solid #bae6fd;
	border-radius: 8px;
	font-size: 12.5px;
	font-weight: 700;
	padding: 7px 12px;
	width: 100%;
	cursor: pointer;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.btn-demo-register:hover {
	background: #f0f9ff;
	border-color: #38bdf8;
	color: #0369a1;
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(14, 165, 233, 0.15);
}

.demo-hint-text {
	font-size: 11px;
	color: #64748b;
	margin-top: 6px;
}

.demo-hint-text code {
	background: #e2e8f0;
	color: #1e293b;
	padding: 2px 5px;
	border-radius: 4px;
	font-weight: 700;
}

/* Status Indicator Pill */
.status-indicator {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #15803d;
	font-weight: 700;
	font-size: 11.5px;
}

.status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background-color: #16a34a;
	box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
	animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(0.85); }
}

/* Global Footer */
.auth-page-footer {
	text-align: center;
	margin-top: 18px;
	margin-bottom: 24px;
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
	position: relative;
	z-index: 10;
}

.auth-page-footer a {
	color: #2563eb;
	text-decoration: none;
	font-weight: 600;
}

.auth-page-footer a:hover {
	text-decoration: underline;
}

/* Alert Styling override */
#box_message {
	margin-bottom: 16px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	border: none;
}

#box_message.alert-danger {
	background: #fef2f2;
	color: #991b1b;
	border-left: 4px solid #ef4444;
	box-shadow: 0 1px 3px rgba(239, 68, 68, 0.1);
}

#box_message.alert-success {
	background: #f0fdf4;
	color: #166534;
	border-left: 4px solid #22c55e;
	box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1);
}

/* Modern Bright Modal Styling */
.modal-content.auth-modal {
	border: none;
	border-radius: 20px;
	box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
	overflow: hidden;
}

.auth-modal .modal-header {
	background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
	color: var(--auth-text-dark);
	padding: 18px 22px;
	border-bottom: 1px solid #e2e8f0;
}

.auth-modal .modal-title {
	font-size: 16px;
	font-weight: 800;
	color: #0f172a;
}

.auth-modal .modal-header small {
	color: #64748b !important;
	font-weight: 500;
}

.auth-modal .modal-header .close {
	color: #64748b;
	opacity: 0.8;
}

.auth-modal .modal-header .close:hover {
	color: #0f172a;
	opacity: 1;
}

.auth-modal .modal-body {
	padding: 22px;
	background: #ffffff;
}

.auth-modal .modal-footer {
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	padding: 12px 22px;
}

@media (max-width: 480px) {
	.auth-wrapper {
		margin: 15px auto;
		padding: 0 10px;
	}

	.auth-card-body {
		padding: 20px 18px;
	}

	.auth-card-header {
		padding: 24px 18px 14px 18px;
	}

	.form-header-title {
		font-size: 17px;
	}
}