@import url('public-sans.css');

:root {
	--blue: #005bea;
	--navy: #073b90;
	--red: #dc2438;
	--ink: #202d40;
	--muted: #607086;
	--line: #dbe2ec;
	--surface: #fff;
	--background: #f3f6fa;
}
* { box-sizing: border-box; letter-spacing: 0; }
body {
	font: 14px/1.55 'Public Sans', sans-serif;
	color: var(--ink);
	margin: 0;
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 28px 20px;
	background: linear-gradient(135deg, #edf3fc, #f8fafc 55%, #edf4f3);
}
a { color: #084bb6; text-underline-offset: 3px; }
a:hover { color: #003681; }
h1, h2, h3 { line-height: 1.3; overflow-wrap: anywhere; }
h1 { margin: 0 0 8px; font-size: 24px; }
h2 { margin: 0 0 10px; font-size: 20px; }
p { color: var(--muted); }
.panel { width: min(480px, 100%); padding: 32px; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 32px #203a5c0a; }
label { display: block; margin: 16px 0; font-size: 13px; font-weight: 600; }
input, select, textarea {
	display: block; width: 100%; min-width: 0; min-height: 42px;
	padding: 9px 12px; margin-top: 6px; border: 1px solid #cfd8e5;
	border-radius: 5px; background: #fff; color: var(--ink); font: inherit;
}
input[readonly] { background: #f3f5f8; }
input:focus, select:focus, textarea:focus { outline: 3px solid #005bea21; border-color: var(--blue); }
input[type=hidden] { display: none; }
input[type=file] { padding: 8px; }
input[type=file]::file-selector-button { border: 0; border-radius: 3px; padding: 6px 10px; margin-right: 10px; color: #084bb6; background: #eaf1ff; font: inherit; }
button, .button-link {
	display: inline-flex; justify-content: center; align-items: center; gap: 8px;
	width: 100%; min-height: 42px; padding: 10px 18px; border: 1px solid var(--blue);
	border-radius: 5px; background: var(--blue); color: white; font: inherit; font-weight: 600;
	text-decoration: none; cursor: pointer;
}
button:hover, .button-link:hover { background: #004bc2; color: white; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible { outline: 3px solid #80b3ff; outline-offset: 3px; }
.button-outline { background: white; color: #084bb6; border-color: #93b0d9; }
.button-outline:hover { background: #edf4ff; color: #084bb6; }
.error { padding: 12px 14px; background: #fff0f2; color: #a51d31; border: 1px solid #f4c9d1; border-radius: 5px; }
.error ul { margin: 0; padding-left: 18px; }
small, .field-note { display: block; font-size: 12px; color: var(--muted); }
[hidden] { display: none !important; }
.public-crest { display: block; width: 56px; height: 64px; object-fit: contain; margin: 0 auto 14px; }
.setup-card, .invalid-card { border-radius: 8px; box-shadow: 0 8px 32px #203a5c0a; }
.setup-header, .invalid-header { background: #073b90; padding: 26px; }
.setup-body, .invalid-body { padding: 28px; }
.setup-body .btn-primary, .invalid-body .btn-primary { background: #005bea; border-color: #005bea; border-radius: 5px; }
.setup-body .form-control { border-radius: 5px; min-height: 42px; }
.setup-body label { margin: 10px 0 6px; }
.auth-shell { display: grid; grid-template-columns: 1.05fr 1fr; width: min(920px, 100%); min-height: 560px; border-radius: 8px; overflow: hidden; background: white; border: 1px solid var(--line); box-shadow: 0 18px 60px #163a6814; }
.auth-brand { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 28px; color: white; background: #073b90; }
.auth-brand::before, .auth-brand::after { content: ''; position: absolute; z-index: -1; width: 1000px; height: 280px; background: #0062eb; transform: rotate(-32deg); }
.auth-brand::before { top: -185px; left: -160px; border-bottom: 24px solid #0051ca; }
.auth-brand::after { bottom: -185px; left: 120px; border-top: 26px solid #0051ca; }
.auth-brand img { width: 142px; height: 148px; object-fit: contain; margin-bottom: 22px; }
.auth-brand h1 { font-size: 24px; max-width: 340px; }
.auth-brand p { color: #dae8ff; max-width: 310px; font-size: 13px; margin: 6px 0 0; }
.auth-form { padding: 38px 36px 26px; display: flex; flex-direction: column; justify-content: center; }
.auth-heading { margin-bottom: 8px; }
.auth-heading h2 { font-size: 20px; }
.auth-heading p { font-size: 13px; margin: 4px 0 12px; }
.input-with-icon { position: relative; display: block; margin-top: 6px; }
.input-with-icon > i { position: absolute; left: 12px; top: 11px; color: #41638d; font-size: 17px; }
.input-with-icon input { padding-left: 38px; margin: 0; }
.input-with-icon input[type=password], .input-with-icon input[data-password] { padding-right: 45px; }
.password-toggle { position: absolute; right: 2px; top: 2px; width: 38px; min-height: 38px; padding: 4px; background: transparent; border: 0; color: #536e8c; }
.password-toggle:hover { background: #eef3fb; color: #073b90; }
.auth-forgot { text-align: right; font-size: 12px; margin: 8px 0 18px; }
.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; margin: 22px 0 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-register { width: auto; align-self: center; min-width: 190px; }
.auth-support { text-align: center; }
.auth-support img { height: 150px; object-fit: contain; }
.login-page .auth-majestic-logo { display: block; width: min(240px, 100%); height: 135px; object-fit: contain; align-self: center; margin-bottom: 16px; }
@media (min-width: 681px) {
	.login-page { padding: 0; background: white; }
	.login-page .auth-shell { width: 100%; min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.login-page .auth-form { width: 100%; max-width: 480px; justify-self: center; padding: 32px; }
}
.registration-page { align-items: start; }
.registration-panel { width: min(900px, 100%); padding: 26px; }
.registration-header { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 22px; }
.registration-header img { width: 48px; height: 54px; object-fit: contain; }
.registration-header h1 { font-size: 22px; margin: 0; }
.registration-header p { margin: 4px 0 0; font-size: 12px; }
.registration-form fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.registration-form legend { width: 100%; padding: 10px 12px; margin: 0 0 14px; border-bottom: 1px solid var(--line); background: #f3f6fa; font-size: 13px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid label { margin: 0; }
.span-full { grid-column: 1 / -1; }
.required { color: #c52b41; margin-left: 3px; }
.registration-actions { display: flex; gap: 12px; justify-content: center; padding-top: 16px; border-top: 1px solid var(--line); }
.registration-actions button, .registration-actions a { width: auto; min-width: 160px; }
.form-notice { background: #e9f7fc; border: 1px solid #b9e1f0; padding: 12px 14px; border-radius: 5px; color: #24586d; font-size: 12px; }
.success-panel { text-align: center; padding: 32px 12px; }
@media (prefers-reduced-motion: no-preference) { .auth-shell, .registration-panel { animation: arrive .3s ease-out; } @keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } } }
@media (max-width: 680px) {
	body { padding: 16px 12px; }
	.auth-shell { grid-template-columns: 1fr; }
	.auth-brand { padding: 24px 20px; }
	.auth-brand img { width: 70px; height: 76px; margin-bottom: 10px; }
	.auth-brand h1 { font-size: 22px; }
	.auth-brand p { display: none; }
	.auth-form { padding: 24px; }
	.form-grid { grid-template-columns: 1fr; }
	.registration-panel, .panel { padding: 22px 18px; }
	.registration-actions { flex-wrap: wrap; }
	.registration-actions button, .registration-actions a { width: 100%; }
}