/* ============ MCMS sign-in / setup pages ============ */
:root {
    --brand-900: #0b2a4a;
    --brand-700: #12457a;
    --brand-600: #1a5fa8;
    --brand-500: #2475d1;
    --accent:    #f2b33d;
    --ink:       #14213d;
    --muted:     #5b6b82;
    --line:      #d8e0ea;
    --field:     #f6f8fb;
    --danger:    #c0392b;
    --success:   #1e8449;
    --radius:    12px;
    --font: "Segoe UI", "Nirmala UI", "Noto Sans Devanagari", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Devanagari", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

.auth-body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: #eef2f7;
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 46%) 1fr;
}

/* ---------- brand panel ---------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(1200px 600px at -10% 110%, rgba(242,179,61,.22), transparent 60%),
        radial-gradient(900px 500px at 110% -10%, rgba(36,117,209,.55), transparent 60%),
        linear-gradient(160deg, var(--brand-700) 0%, var(--brand-900) 100%);
}
.auth-brand::after {           /* subtle grid texture */
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand-top { display: flex; align-items: center; gap: 14px; }
.auth-logo {
    width: 52px; height: 52px; flex: none;
    display: grid; place-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(6px);
}
.auth-logo svg { width: 28px; height: 28px; fill: var(--accent); }
.auth-logo-sm { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-700); border: 0; }
.auth-logo-sm svg { width: 20px; height: 20px; }

.auth-brand-name { font-size: 1.15rem; font-weight: 700; letter-spacing: .2px; }
.auth-brand-address { font-size: .85rem; opacity: .75; margin-top: 2px; }

.auth-brand-body h2 {
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    line-height: 1.15;
    margin: 0 0 14px;
    font-weight: 700;
}
.auth-brand-body p { font-size: 1.05rem; opacity: .85; max-width: 30rem; margin: 0 0 28px; line-height: 1.55; }

.auth-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-features li { display: flex; align-items: center; gap: 12px; font-size: .98rem; opacity: .92; }
.auth-features .dot {
    width: 22px; height: 22px; flex: none; border-radius: 50%;
    background: rgba(242,179,61,.18);
    box-shadow: inset 0 0 0 1px rgba(242,179,61,.6);
    position: relative;
}
.auth-features .dot::after {
    content: ""; position: absolute; left: 7px; top: 4px; width: 6px; height: 10px;
    border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.auth-brand-foot { font-size: .8rem; opacity: .6; }

/* ---------- form side ---------- */
.auth-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: 40px 24px;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    padding: 40px 40px 32px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 40px rgba(16,24,40,.08);
    animation: auth-rise .45s ease-out both;
}
@keyframes auth-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.auth-card-mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 24px; color: var(--brand-900); }

.auth-title { font-size: 1.75rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -.3px; }
.auth-subtitle { color: var(--muted); margin: 0 0 28px; line-height: 1.5; }

.auth-form { display: grid; gap: 18px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-field { display: grid; gap: 7px; }
.auth-label { font-size: .88rem; font-weight: 600; color: #34425a; }

.auth-input-wrap { position: relative; }
.auth-input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; fill: #8a99ad; pointer-events: none;
    transition: fill .15s;
}
.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    font: inherit; font-size: 1rem; color: var(--ink);
    background: var(--field);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-input-plain { padding: 0 14px; }
.auth-input::placeholder { color: #9aa8ba; }
.auth-input:hover { border-color: #b9c6d6; }
.auth-input:focus {
    background: #fff;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(36,117,209,.15);
}
.auth-input-wrap:focus-within .auth-input-icon { fill: var(--brand-500); }
.auth-input.input-validation-error { border-color: var(--danger); background: #fff; }
.auth-input.input-validation-error:focus { box-shadow: 0 0 0 4px rgba(192,57,43,.12); }

.auth-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; border-radius: 8px;
    background: transparent; cursor: pointer;
    display: grid; place-items: center;
}
.auth-toggle:hover { background: #e9eef5; }
.auth-toggle:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 1px; }
.auth-toggle svg { width: 20px; height: 20px; fill: #6b7b90; }
.auth-toggle .eye-closed { display: none; }
.auth-toggle[aria-pressed="true"] .eye-open { display: none; }
.auth-toggle[aria-pressed="true"] .eye-closed { display: block; }

.auth-error { color: var(--danger); font-size: .84rem; }
.auth-error:empty { display: none; }
.auth-caps { color: #9a6700; font-size: .82rem; font-weight: 600; }

.auth-alert {
    border-radius: 10px; padding: 12px 14px; font-size: .92rem; line-height: 1.45;
}
.auth-alert ul { margin: 0; padding: 0; list-style: none; }
.auth-alert-error { background: #fdecea; color: #8e2a1f; border: 1px solid #f5c6c0; }
.auth-alert-success { background: #e8f6ee; color: #145a32; border: 1px solid #bfe5cd; margin-bottom: 18px; }
.validation-summary-valid { display: none; }

.auth-check { display: inline-flex; align-items: center; gap: 10px; font-size: .93rem; color: #34425a; cursor: pointer; user-select: none; }
.auth-check input { width: 18px; height: 18px; accent-color: var(--brand-600); cursor: pointer; }

.auth-submit {
    position: relative;
    height: 50px;
    border: 0; border-radius: var(--radius);
    font: inherit; font-size: 1rem; font-weight: 600; color: #fff;
    background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
    box-shadow: 0 6px 16px rgba(26,95,168,.28);
    cursor: pointer;
    transition: transform .08s, box-shadow .15s, filter .15s;
}
.auth-submit:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(26,95,168,.34); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible { outline: 3px solid rgba(36,117,209,.45); outline-offset: 2px; }
.auth-submit[disabled] { cursor: progress; filter: saturate(.7); }

.auth-spinner {
    display: none;
    position: absolute; left: 50%; top: 50%;
    width: 22px; height: 22px; margin: -11px 0 0 -11px;
    border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}
.auth-submit.is-loading .auth-submit-text { visibility: hidden; }
.auth-submit.is-loading .auth-spinner { display: block; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-help { margin: 4px 0 0; text-align: center; font-size: .86rem; color: var(--muted); }
.auth-setup-link {
    display: block; text-align: center; font-size: .9rem; font-weight: 600;
    color: var(--brand-600); text-decoration: none; padding: 10px; border-radius: 10px;
    background: #eef5fd;
}
.auth-setup-link:hover { background: #e1edfb; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-card-mobile-brand { display: flex; }
    .auth-main {
        min-height: 100vh;
        align-items: start;
        padding-top: 72px;
        background:
            linear-gradient(180deg, var(--brand-700) 0, var(--brand-900) 220px, transparent 220px),
            #eef2f7;
    }
}
@media (max-width: 480px) {
    .auth-main { padding: 24px 14px; }
    .auth-card { padding: 28px 22px 24px; border-radius: 16px; }
    .auth-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-card { animation: none; }
    .auth-spinner { animation-duration: 1.6s; }
}

.auth-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; background: #fff; padding: 4px; }
.auth-logo:has(img) { overflow: hidden; }


/* Marathi + English (see site.css / Services/Bilingual.cs) */
.en { display: inline; margin-inline-start: .4em; font-size: .8em; font-weight: 400; opacity: .78; }
h1 > .en, h2 > .en, label > .en, p > .en, .bi-block > .en { display: block; margin-inline-start: 0; line-height: 1.3; }

/* ---------- breathing room for Marathi + English ---------- */
.auth-brand-body { max-width: 34rem; }
.auth-brand-body h2 { margin-bottom: 18px; }
.auth-brand-body h2 > .en { font-size: .5em; font-weight: 500; opacity: .75; margin-top: 8px; letter-spacing: .2px; }
.auth-brand-body p { margin-bottom: 32px; }
.auth-brand-body p > .en { font-size: .88em; margin-top: 6px; opacity: .8; }
.auth-features { gap: 18px; }
.auth-features li { align-items: flex-start; line-height: 1.4; }
.auth-features .dot { margin-top: 1px; }
.auth-feature-text > .en { display: block; margin: 2px 0 0; font-size: .82em; opacity: .7; }

.auth-card { max-width: 460px; padding: 44px 44px 36px; }
.auth-title { margin-bottom: 8px; }
.auth-title > .en { font-size: .55em; font-weight: 500; color: var(--muted); opacity: 1; margin-top: 4px; letter-spacing: 0; }
.auth-subtitle { margin-bottom: 32px; }
.auth-subtitle > .en { font-size: .86em; margin-top: 2px; }
.auth-form { gap: 22px; }
.auth-field { gap: 8px; }
/* field labels keep English on the same line, small and muted, so each field is one label line */
.auth-label > .en, .auth-check .en { display: inline; margin-inline-start: .45em; color: var(--muted); font-weight: 500; opacity: 1; }
.auth-check { margin-top: -4px; }
.auth-submit .en { display: inline; margin-inline-start: .5em; opacity: .85; }
.auth-help { margin-top: 2px; line-height: 1.5; }
.auth-help > .en { font-size: .92em; margin-top: 2px; }
.auth-caps > .en { display: inline; }
@media (max-width: 480px) {
    .auth-card { padding: 30px 22px 26px; }
    .auth-form { gap: 18px; }
}
