﻿/* ===============================
   PAATHSHALA AUTH – FINAL STYLE
    USED IN LOGIN PAGES
=============================== */

* {
    box-sizing: border-box;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, Segoe UI, 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);
}

/* 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;
}

.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;
            }
}

/* 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;
}

/* ===============================
   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;
}

