:root{
--auth-bg:#eef2ff;
--auth-bg-accent:#f8fafc;
--auth-panel:#ffffff;
--auth-border:#e2e8f0;
--auth-text:#0f172a;
--auth-muted:#64748b;
--auth-primary:#2563eb;
--auth-primary-dark:#1d4ed8;
--auth-gradient-start:#4f46e5;
--auth-gradient-end:#7c3aed;
--auth-radius:24px;
--auth-radius-sm:14px;
--auth-shadow:0 24px 60px rgba(15,23,42,.10);
}

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

html,
body{
min-height:100%;
}

body.auth-body{
margin:0;
font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
color:var(--auth-text);
background:
radial-gradient(circle at top left,rgba(79,70,229,.12),transparent 34%),
radial-gradient(circle at bottom right,rgba(37,99,235,.10),transparent 30%),
linear-gradient(180deg,#f8fafc 0%,#eef2ff 100%);
}

.auth-shell{
min-height:100vh;
display:flex;
align-items:center;
justify-content:center;
padding:24px;
}

.auth-layout{
width:100%;
max-width:980px;
display:grid;
grid-template-columns:1.05fr .95fr;
gap:24px;
align-items:stretch;
}

.auth-brand-panel,
.auth-form-panel{
border:1px solid rgba(226,232,240,.92);
border-radius:var(--auth-radius);
background:var(--auth-panel);
box-shadow:var(--auth-shadow);
}

.auth-brand-panel{
position:relative;
overflow:hidden;
padding:42px 38px;
background:
linear-gradient(145deg,rgba(79,70,229,.96),rgba(37,99,235,.92)),
linear-gradient(180deg,#312e81,#1e3a8a);
color:#ffffff;
display:flex;
flex-direction:column;
justify-content:space-between;
min-height:560px;
}

.auth-brand-panel::after{
content:"";
position:absolute;
inset:auto -80px -80px auto;
width:220px;
height:220px;
border-radius:50%;
background:rgba(255,255,255,.08);
}

.auth-brand-top{
position:relative;
z-index:1;
}

.auth-logo{
width:min(280px, 88%);
max-width:100%;
margin-bottom:22px;
filter:brightness(0) invert(1);
}

.auth-back-home{
display:inline-flex;
align-items:center;
gap:6px;
margin:12px 0 0;
font-size:13px;
font-weight:600;
color:#64748b;
text-decoration:none;
transition:color .15s ease;
}

.auth-back-home:hover{
color:#0A1738;
}

.auth-back-home-arrow{
font-size:14px;
line-height:1;
}

.auth-form-footer{
margin-top:36px;
padding-top:8px;
text-align:center;
}

.auth-platform-tag{
display:block;
margin:0;
font-size:12px;
font-weight:600;
letter-spacing:.02em;
text-transform:none;
color:#64748b;
}

.auth-version{
display:block;
margin-top:6px;
font-size:11px;
font-weight:600;
color:#94a3b8;
}

.auth-footnote{
margin:14px 0 0;
text-align:center;
font-size:13px;
line-height:1.5;
color:var(--auth-muted);
}

.auth-brand-panel h1{
margin:0 0 10px;
font-size:34px;
line-height:1.15;
font-weight:800;
letter-spacing:-.02em;
}

.auth-brand-panel .auth-brand-subtitle{
margin:0;
font-size:15px;
line-height:1.6;
color:rgba(255,255,255,.86);
max-width:34ch;
}

.auth-brand-points{
position:relative;
z-index:1;
display:grid;
gap:12px;
margin:0;
padding:0;
list-style:none;
}

.auth-brand-points li{
display:flex;
align-items:flex-start;
gap:10px;
padding:12px 14px;
border-radius:16px;
background:rgba(255,255,255,.10);
border:1px solid rgba(255,255,255,.12);
font-size:13px;
line-height:1.5;
}

.auth-brand-points i{
margin-top:2px;
opacity:.92;
}

.auth-form-panel{
padding:42px 38px;
display:flex;
flex-direction:column;
justify-content:center;
}

.auth-form-header{
margin-bottom:28px;
}

.auth-form-header h2{
margin:0 0 8px;
font-size:28px;
font-weight:800;
letter-spacing:-.02em;
}

.auth-form-header p{
margin:0;
color:var(--auth-muted);
font-size:14px;
line-height:1.55;
}

.auth-alert{
padding:12px 14px;
border-radius:14px;
font-size:13px;
line-height:1.45;
margin-bottom:18px;
}

.auth-alert-danger{
background:#fef2f2;
border:1px solid #fecaca;
color:#991b1b;
}

.auth-alert-info{
background:#eff6ff;
border:1px solid #bfdbfe;
color:#1e40af;
}

.auth-field{
margin-bottom:18px;
}

.auth-field label{
display:block;
margin-bottom:8px;
font-size:13px;
font-weight:600;
color:#334155;
}

.auth-field .form-control{
height:52px;
border-radius:var(--auth-radius-sm);
border:1px solid #dbe3ee;
padding:12px 16px;
font-size:15px;
transition:border-color .15s ease, box-shadow .15s ease;
}

.auth-field .form-control:focus{
border-color:#6366f1;
box-shadow:0 0 0 4px rgba(99,102,241,.12);
}

.auth-field .form-control.is-invalid{
border-color:#ef4444;
box-shadow:0 0 0 4px rgba(239,68,68,.10);
}

.auth-field-error{
display:none;
margin-top:6px;
font-size:12px;
color:#dc2626;
}

.auth-field .form-control.is-invalid + .auth-field-error{
display:block;
}

.auth-btn{
display:inline-flex;
align-items:center;
justify-content:center;
gap:8px;
width:100%;
min-height:52px;
padding:0 18px;
border:none;
border-radius:var(--auth-radius-sm);
font-size:15px;
font-weight:700;
text-decoration:none;
cursor:pointer;
transition:transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.auth-btn-primary{
background:linear-gradient(135deg,var(--auth-gradient-start),var(--auth-gradient-end));
color:#ffffff;
box-shadow:0 10px 24px rgba(79,70,229,.22);
}

.auth-btn-primary:hover{
transform:translateY(-1px);
opacity:.96;
color:#ffffff;
}

.auth-btn-secondary{
background:#ffffff;
color:#334155;
border:1px solid #dbe3ee;
}

.auth-btn-secondary:hover{
background:#f8fafc;
color:#0f172a;
}

.auth-btn.is-loading{
pointer-events:none;
opacity:.88;
}

.auth-btn.is-loading .auth-btn-label{
opacity:.75;
}

.auth-btn-spinner{
display:none;
width:18px;
height:18px;
border:2px solid rgba(255,255,255,.35);
border-top-color:#ffffff;
border-radius:50%;
animation:auth-spin .8s linear infinite;
}

.auth-btn.is-loading .auth-btn-spinner{
display:inline-block;
}

.auth-error-shell{
padding-top:40px;
padding-bottom:40px;
}

.auth-error-card{
width:100%;
max-width:520px;
padding:42px 34px;
border-radius:var(--auth-radius);
background:rgba(255,255,255,.96);
border:1px solid var(--auth-border);
box-shadow:var(--auth-shadow);
text-align:center;
}

.auth-error-icon{
position:relative;
width:84px;
height:84px;
margin:0 auto 18px;
border-radius:24px;
display:flex;
align-items:center;
justify-content:center;
background:linear-gradient(135deg,#eff6ff,#eef2ff);
color:#2563eb;
font-size:28px;
}

.auth-error-icon span{
position:absolute;
right:-8px;
top:-8px;
min-width:34px;
height:34px;
padding:0 8px;
border-radius:999px;
background:#0f172a;
color:#ffffff;
font-size:12px;
font-weight:800;
display:flex;
align-items:center;
justify-content:center;
}

.auth-error-card h1{
margin:0 0 10px;
font-size:28px;
font-weight:800;
letter-spacing:-.02em;
}

.auth-error-card p{
margin:0;
color:var(--auth-muted);
font-size:14px;
line-height:1.6;
}

.auth-error-actions{
display:flex;
flex-direction:column;
gap:10px;
margin-top:24px;
}

.auth-error-footnote{
margin:22px 0 0;
font-size:11px;
letter-spacing:.06em;
text-transform:uppercase;
color:#94a3b8;
}

@keyframes auth-spin{
to{ transform:rotate(360deg); }
}

@media (max-width:900px){

.auth-layout{
grid-template-columns:1fr;
max-width:460px;
}

.auth-brand-panel{
min-height:auto;
padding:28px 24px;
}

.auth-logo{
width:min(240px, 82%);
}

.auth-brand-panel h1{
font-size:28px;
}

.auth-form-panel,
.auth-error-card{
padding:30px 24px;
}

}

@media (max-width:560px){

.auth-shell{
padding:16px;
}

.auth-form-header h2{
font-size:24px;
}

}
