/* Mobile-First Spiritual Mandir Attendance Login Styling */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Rozha+One&family=Yatra+One&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*:focus {
    outline: none;
}

html, body {
    width: 100%;
    min-height: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    position: relative;
    overflow-x: hidden;
    padding: 16px;
}

/* Atmospheric Mandir Background with Depth */
.mandir-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/mandir_bg.jpg');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    filter: brightness(0.65) saturate(1.1);
    transform: scale(1.02);
}

.mandir-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.88) 85%),
                linear-gradient(180deg, rgba(180, 83, 9, 0.25) 0%, rgba(15, 23, 42, 0.75) 60%, rgba(15, 23, 42, 0.95) 100%);
    z-index: 1;
}

/* Golden Decorative Aura in Background */
.mandir-glow {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -20%);
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.08) 55%, transparent 70%);
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
}

/* Centered Login Viewport Wrapper */
.login-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    margin: 40px auto 20px;
}

/* Glassmorphism Mandir Card */
.mandir-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 34px 26px 26px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55),
                0 0 35px rgba(245, 158, 11, 0.25),
                inset 0 1px 1px rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    position: relative;
    animation: cardFadeIn 0.5s ease-out;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Temple Emblem Medallion */
.temple-emblem-wrap {
    position: absolute;
    top: -46px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #fff;
    padding: 5px;
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.4),
                0 0 0 4px rgba(255, 255, 255, 0.95),
                0 0 0 6px #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.temple-emblem-wrap:hover {
    transform: translateX(-50%) scale(1.05);
}

.temple-emblem-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Card Header Typography */
.card-header-mandir {
    text-align: center;
    margin-top: 36px;
    margin-bottom: 24px;
}

.devotional-mantra {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #b45309;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    background: #fef3c7;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid #fde68a;
}

.mandir-title-hi {
    font-size: 23px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.25;
    margin-bottom: 2px;
}

.mandir-title-en {
    font-size: 13px;
    font-weight: 700;
    color: #d97706;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mandir-tagline {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

/* Input Fields & Icons */
.form-group-custom {
    margin-bottom: 18px;
    position: relative;
}

.form-group-custom label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.mandir-input {
    width: 100% !important;
    height: 48px !important;
    padding: 10px 14px 10px 42px !important;
    font-size: 16px !important; /* 16px prevents iOS Safari auto-zoom */
    font-weight: 500 !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
}

.mandir-input:focus {
    background: #fff !important;
    border-color: #d97706 !important;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15) !important;
}

.mandir-input:focus + .input-icon-left,
.input-icon-wrap:focus-within .input-icon-left {
    color: #d97706;
}

/* Password Toggle Eye Button */
.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    padding: 8px 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
    z-index: 2;
}

.password-toggle-btn:hover {
    color: #0f172a;
    background: #e2e8f0;
}

/* Submit Button */
.btn-mandir-login {
    width: 100% !important;
    height: 50px !important;
    margin-top: 8px !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-mandir-login:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #ea580c 50%, #9a3412 100%) !important;
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.45) !important;
    transform: translateY(-1px);
}

.btn-mandir-login:active {
    transform: scale(0.98);
}

/* Error Text Alert */
.help-block-error {
    color: #dc2626 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    text-align: left !important;
}

/* Card Bottom Footer */
.mandir-card-footer {
    text-align: center;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
}

.footer-sacred-text {
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    letter-spacing: 0.5px;
}

.footer-subtitle-text {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
}

/* Outer Bottom Copyright / Info */
.outer-login-footer {
    text-align: center;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Responsive adjustments for very small phones (iPhone SE, 320-375px) */
@media (max-width: 380px) {
    .mandir-card {
        padding: 28px 18px 20px;
    }
    .mandir-title-hi {
        font-size: 20px;
    }
    .temple-emblem-wrap {
        width: 76px;
        height: 76px;
        top: -38px;
    }
    .card-header-mandir {
        margin-top: 28px;
    }
}
