/* Login / auth screens. Colors and font come ONLY from theme.css (var(--ec-...)).
   Layout: white page with a large teal curve on the right, and one floating card that holds
   a teal brand panel (illustration + features) and a white form panel.
   Mobile: the brand panel is hidden and the form card fills the width. */

.auth-body {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--ec-surface);
    overflow-x: hidden;
}

/* Big teal curve in the page background (right side) */
.auth-body::before {
    content: "";
    position: fixed;
    z-index: 0;
    top: -40vh;
    right: -60vw;
    width: 100vw;
    height: 180vh;
    border-radius: 50%;
    background: var(--ec-gradient-brand);
    pointer-events: none;
}

.auth-skip {
    position: absolute;
    z-index: 10;
    left: .75rem;
    top: .75rem;
    background: var(--ec-surface);
    color: var(--ec-heading);
    padding: .5rem .9rem;
    border-radius: var(--ec-radius-sm);
}

.auth-stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    display: flex;
    background: var(--ec-surface);
    border-radius: var(--ec-radius-lg);
    box-shadow: var(--ec-shadow-lg);
    overflow: hidden;
}

/* ============ Brand panel ============ */
.auth-brand {
    display: none;                            /* shown from 992px */
    position: relative;
    overflow: hidden;
    color: var(--ec-on-dark);
    background: var(--ec-primary);
}

.auth-blob {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02));
    pointer-events: none;
}

.auth-blob-top    { width: 200px; height: 200px; top: -90px;  right: -80px; }
.auth-blob-bottom { width: 280px; height: 280px; bottom: -170px; left: 18%; }

.auth-deco { position: absolute; pointer-events: none; }

.auth-deco-gear {
    width: 72px;
    height: 72px;
    top: 44px;
    left: 64px;
    stroke: rgba(255, 255, 255, .1);
}

.auth-deco-rupee {
    font-weight: 800;
    font-size: 2.4rem;
    line-height: 1;
    color: rgba(255, 255, 255, .1);
}

.auth-deco-r1 { left: 22px;  top: 64%; transform: rotate(-14deg); }
.auth-deco-r2 { right: 64px; bottom: 56px; transform: rotate(12deg); }

/* Illustration colors (inline SVG uses classes so colors stay in theme.css) */
.auth-illus {
    position: relative;
    display: block;
    width: 100%;
    max-width: 380px;
    height: auto;
    margin: 0 auto;
}

.il-white  { fill: var(--ec-surface); }
.il-soft   { fill: var(--ec-soft); }
.il-line   { fill: var(--ec-line); }
.il-mute   { fill: var(--ec-input-border); }
.il-ink    { fill: var(--ec-primary-darker); }
.il-teal   { fill: var(--ec-primary); }
.il-accent { fill: var(--ec-accent); }
.il-shade  { fill: rgba(0, 0, 0, .12); }
.il-shadow { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .18)); }

.il-stroke-ink {
    fill: none;
    stroke: var(--ec-primary-darker);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.il-stroke-white {
    fill: none;
    stroke: var(--ec-surface);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Feature list with amber check badges */
.auth-features {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.4rem;
}

.auth-features li { display: flex; align-items: flex-start; gap: .85rem; }

.auth-check {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ec-accent);
    color: var(--ec-heading);
}

.auth-features strong { display: block; font-size: 1rem; font-weight: 700; margin-bottom: .2rem; }
.auth-features span:not(.auth-check) { display: block; font-size: .9rem; line-height: 1.45; color: var(--ec-on-dark-mute); }

/* ============ Form panel ============ */
.auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 1.5rem;
}

.auth-form-wrap { width: 100%; max-width: 380px; }

.auth-logo-link { display: block; width: fit-content; margin: 0 auto 1.5rem; line-height: 0; }
.auth-logo { height: 46px; width: auto; max-width: 100%; }

.auth-head { text-align: center; margin-bottom: 2rem; }

.auth-title {
    margin: 0 0 .35rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ec-heading);
}

.auth-sub { margin: 0; color: var(--ec-mute); font-size: .95rem; }

/* ---- Fields ---- */
.auth-form .form-label {
    font-weight: 500;
    font-size: .875rem;
    color: var(--ec-ink);
    margin-bottom: .4rem;
}

.auth-form .form-control {
    min-height: 48px;                         /* comfortable touch target */
    font-size: 1rem;                          /* >=16px stops iOS zooming on focus */
    padding: .65rem .95rem;
    border-radius: var(--ec-radius-sm);
    border: 1px solid var(--ec-input-border);
    background: var(--ec-surface);
    color: var(--ec-ink);
}

.auth-form .form-control::placeholder { color: var(--ec-mute); opacity: .7; }

.auth-pass { position: relative; }
.auth-pass .form-control { padding-right: 3.1rem; }

.auth-pass-toggle {
    position: absolute;
    top: 50%;
    right: .35rem;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--ec-mute);
    border-radius: var(--ec-radius-sm);
}

.auth-pass-toggle:hover { color: var(--ec-primary); background: var(--ec-soft); }
.auth-pass-toggle:focus-visible { outline: 0; box-shadow: var(--ec-focus-ring); color: var(--ec-primary); }
.auth-pass-toggle .icon-hide { display: none; }
.auth-pass-toggle.is-on .icon-hide { display: inline; }
.auth-pass-toggle.is-on .icon-show { display: none; }

.auth-error { display: block; margin-top: .35rem; color: var(--ec-danger); font-size: .8rem; }
.auth-error:empty { display: none; }

.auth-caps { margin-top: .35rem; color: var(--ec-accent-dark); font-size: .8rem; font-weight: 600; }

.auth-form .form-check-input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; }
.auth-form .form-check-label { font-size: .9rem; color: var(--ec-body); }

/* ---- Button ---- */
.btn-signin {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border: 0;
    border-radius: var(--ec-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    color: var(--ec-on-dark);
    background: var(--ec-primary);
    box-shadow: var(--ec-shadow-btn);
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-signin:hover:not(:disabled) { background: var(--ec-primary-dark); transform: translateY(-1px); }
.btn-signin:active:not(:disabled) { transform: translateY(0); }
.btn-signin:focus-visible { outline: 0; box-shadow: var(--ec-focus-ring), var(--ec-shadow-btn); }
.btn-signin:disabled { opacity: .75; cursor: progress; }

/* ---- Alerts ---- */
.auth-alert {
    border-radius: var(--ec-radius-sm);
    font-size: .9rem;
    padding: .75rem .95rem;
    margin-bottom: 1.1rem;
}
.auth-alert:empty { display: none; }
.auth-alert ul { margin: 0; padding-left: 1.1rem; }

.auth-alert-danger {
    color: var(--ec-danger);
    background: var(--ec-danger-soft);
    border: 1px solid var(--ec-danger-border);
}

.auth-alert-info {
    color: var(--ec-heading);
    background: var(--ec-info-soft);
    border: 1px solid var(--ec-primary-soft);
}

.auth-foot {
    margin: 2rem 0 0;
    text-align: center;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ec-ink);
}

.auth-foot span { color: var(--ec-primary); }

.auth-copy {
    margin: .75rem 0 0;
    text-align: center;
    font-size: .75rem;
    color: var(--ec-mute);
}

/* ============ Small tablets ============ */
@media (min-width: 576px) {
    .auth-main { padding: 2.75rem 2.5rem 2rem; }
}

/* ============ Desktop: two-panel card ============ */
@media (min-width: 992px) {
    .auth-body::before { right: -42vw; width: 82vw; }

    .auth-stage { padding: 2.5rem 2rem; }

    .auth-card {
        max-width: 1180px;
        min-height: 620px;
    }

    .auth-brand {
        flex: 0 0 38%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2.75rem;
        padding: 3.5rem 3rem 3rem;
    }

    .auth-main { padding: 3rem; }

    .auth-title { font-size: 1.75rem; }
}

@media (min-width: 1200px) {
    .auth-brand { padding: 4rem 4rem 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-signin { transition: none; }
}
