﻿/* ===============================
   PAATHSHALA AUTH – FINAL STYLE
    USED IN LOGIN PAGES
=============================== */

/* Self-hosted Inter — owns the family name so a hijacked / corrupted
   "Inter" installed locally on a user's PC can't be picked up. If the
   woff2 files are missing, the family is unavailable and the stack
   falls through to Segoe UI rather than a symbol font. */
@font-face {
    font-family: 'Inter';
    src: url('/Resources/Fonts/Inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/Resources/Fonts/Inter/Inter-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/Resources/Fonts/Inter/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/Resources/Fonts/Inter/Inter-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, Inter, Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #0b1d3a, #020617);
}

/* Background grid */
.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Card */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 18px;
    padding: 36px 34px 30px;
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

/* Wider variant used on Forgot Password / flows with multiple fields */
.auth-card--wide {
    max-width: 520px;
}

/* Forced-change notice banner */
.auth-forced-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-left: 4px solid #d97706;
    border-radius: 8px;
    color: #78350f;
    font-size: 13px;
    line-height: 1.45;
}
.auth-forced-note i { color: #d97706; font-size: 16px; flex-shrink: 0; }

/* Inline button tucked inside the input field (show/hide pwd, generate) */
.cp-input-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cp-input-btn + .cp-input-btn { right: 38px; }
.cp-input-btn:hover { background: #e0edff; color: #2563eb; }
.input-wrapper:has(.cp-input-btn) .form-input { padding-right: 78px; }

/* Strength meter */
.cp-strength {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}
.cp-strength .cp-bar {
    height: 4px;
    width: 48px;
    background: #e5e7eb;
    border-radius: 2px;
    transition: background .2s;
}
.cp-strength-label {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Inline informational note (used in VerifyEmail OTP step) */
.form-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1e3a8e;
    margin-bottom: 14px;
    line-height: 1.45;
}

/* Multi-step indicator (Change Email) */
.ce-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 6px 0 18px;
}
.ce-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    transition: all .2s;
}
.ce-step em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #fff;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
}
.ce-step.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8e;
}
.ce-step.active em { background: #2563eb; }
.ce-step.done {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.ce-step.done em { background: #16a34a; }
.ce-step-line {
    flex: 0 0 24px;
    height: 1px;
    background: #cbd5e1;
}

/* OTP code input — large, monospace, spaced */
.ve-otp-input {
    text-align: center;
    letter-spacing: 8px;
    font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
    font-size: 18px;
    font-weight: 600;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 26px;
}

.auth-header img {
    height: 54px;
}

        .auth-title {
            margin-top: 18px;
            font-size: 18px;
            font-weight: 600;
            color: #111827;
            text-align: center;
        }

.auth-subtitle {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;          /* soft neutral gray */
    text-align: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

        .auth-message {
            margin-top: 14px;
            font-size: 14px;
            color: #374151;
            line-height: 1.6;
        }

        .auth-hint {
            margin-top: 18px;
            font-size: 13px;
            color: #6b7280;
            text-align: center;
        }

            .auth-hint ul {
                padding-left: 18px;
                margin: 8px 0 0;
            }

 /* ===== CONTENT ===== */
        .auth-section {
            margin-top: 18px;
            font-size: 14px;
            color: #374151;
            line-height: 1.65;
        }

        .auth-section h3 {
            margin: 18px 0 8px;
            font-size: 15px;
            color: #111827;
        }

        .auth-section ul {
            margin: 8px 0 0;
            padding-left: 18px;
        }

        .auth-section li {
            margin-bottom: 6px;
        }

/* Form */
.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-input {
    width: 100%;
    height: 46px;
    padding: 0 46px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 14px;
    color: #111827;
}

/* Filled style (like screenshot) */
.form-input.filled {
    background: #fffbc5;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* Icons */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;   /* ✅ THIS fixes the issue */
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 16px;
    cursor: pointer;
    color: #9ca3af;
}

.form-input {
    padding-left: 44px;
    padding-right: 44px; /* for eye icon */
}


/* Button */
.btn-primary,
.btn-secondary
{
    margin-top: 6px;
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    /* Anchor-tag parity with <button> */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
}
a.btn-primary,
a.btn-secondary {
    text-decoration: none;
}
a.btn-primary:hover,
a.btn-secondary:hover {
    text-decoration: none;
}

.btn-primary:hover {
    background: #1e40af;
}

        .btn-secondary {
            background: #f3f4f6;
            color: #111827;
        }

        .btn-secondary:hover {
            background: #e5e7eb;
        }

/* Footer */
.auth-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
}

.auth-footer a {
    color: #2563eb;
    text-decoration: none;
}

.auth-footer span {
    margin: 0 6px;
    color: #9ca3af;
}

.caps-warning {
    margin-top: 6px;
    font-size: 12px;
    color: #dc2626;
    display: none;
}

/* Mobile */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 22px;
    }
            .btn-group {
                flex-direction: column;
            }
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.btn-group .btn-primary,
.btn-group .btn-secondary {
    flex: 1;
    margin-top: 0;
}

/* Floating background dots */
.bg-dot {
    position: absolute;
    top: -10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    animation-name: floatDown;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes floatDown {
    from {
        transform: translateY(-10vh);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    to {
        transform: translateY(110vh);
        opacity: 0;
    }
}


.cursor-glow {
    position: fixed;
    width: 260px;
    height: 260px;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(56,189,248,0.18),
        transparent 60%
    );
    transform: translate(-50%, -50%);
    z-index: -1; /* stays behind card */
}

/* =========================
   VALIDATION STATES
========================= */

.form-group.error .form-input {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}

.form-error {
    margin-top: 6px;
    font-size: 12px;
    color: #dc2626;
    display: none;
}

/* ===============================
   LOGIN OVERLAY
=============================== */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-box {
    background: #ffffff;
    padding: 26px 30px;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 280px;
}

.login-text {
    display: flex;
    flex-direction: column;
}

.login-text strong {
    font-size: 15px;
    color: #0f172a;
}

.login-text span {
    font-size: 13px;
    color: #64748b;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-error {
    display: none;
    margin-top: 12px;
    padding: 10px 12px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    font-size: 13px;
}

.auth-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.auth-alert-box {
    background: #ffffff;
    border-radius: 14px;
    width: 90%;
    max-width: 360px;
    padding: 26px 24px 22px;
    text-align: center;
    box-shadow: 0 30px 70px rgba(0,0,0,.35);
}

.auth-alert-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
}

.auth-alert-body {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 20px;
    text-align: left;
}
.auth-alert-body .auth-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin: 10px 0 4px;
}
.auth-alert-body .auth-info ul {
    margin: 0 0 8px 18px;
    padding: 0;
}
.auth-alert-body .auth-info li {
    margin-bottom: 4px;
}

/* ===============================
   AUTH ALERT SEVERITY
=============================== */

.auth-alert-box.info {
    border-top: 6px solid #2563eb;   /* blue */
}

.auth-alert-box.warning {
    border-top: 6px solid #f59e0b;   /* amber */
}

.auth-alert-box.danger {
    border-top: 6px solid #dc2626;   /* red */
}

.auth-alert-box.info .auth-alert-title {
    color: #1e40af;
}

.auth-alert-box.warning .auth-alert-title {
    color: #92400e;
}

.auth-alert-box.danger .auth-alert-title {
    color: #991b1b;
}

