:root {
    --saffron: #FF9933;
    --gold: #FFD700;
    --dark-maroon: #800000;
}

/* --- BODY: Strictly Locked Viewport --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: 
        linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
        url('https://images.unsplash.com/photo-1589308078059-be1415eab4c3?auto=format&fit=crop&w=1600&q=80')
        no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* No scroll allowed */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- WRAPPER: Ensures Space at Top and Bottom --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    /* 5vh guarantees a 5% gap at the top and bottom of the screen */
    padding: 5vh 15px; 
    box-sizing: border-box;
}

/* --- CARD: Symmetrical & Auto-Adjusting --- */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    /* padding: top/bottom right/left */
    padding: clamp(1.5rem, 4vh, 2.5rem) 1.8rem; 
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    text-align: center;
    width: 100%;
    max-width: 360px; /* Symmetrical professional width */
    border-top: 5px solid var(--saffron);
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Limits card to 90% of screen height to preserve the 5% gaps */
    max-height: 90vh; 
    margin: auto;
}

/* --- TEXT & ICON SCALING --- */
.auth-card h2 {
    color: var(--dark-maroon);
    font-weight: 600;
    font-size: clamp(1.2rem, 3vh, 1.6rem);
    margin: 0 0 5px 0;
    width: 100%;
}

.auth-card p {
    font-size: clamp(0.75rem, 1.5vh, 0.85rem);
    color: #666;
    margin-bottom: 1.5vh;
    width: 100%;
}

/* --- FORM & INPUTS: Mobile Optimized --- */
form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.input-group {
    width: 100%;
    /* Gaps between inputs shrink on smaller screens */
    margin-bottom: clamp(8px, 1.2vh, 12px);
}

input {
    width: 100%;
    padding: clamp(8px, 1.2vh, 12px) 15px; 
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    outline: none;
    /* 16px is critical for mobile; stops auto-zoom scroll */
    font-size: 16px; 
    transition: 0.3s;
}

input:focus {
    border-color: var(--saffron);
    box-shadow: 0 0 5px rgba(255,153,51,0.3);
}

/* --- BUTTON: Aligned with Inputs --- */
button {
    width: 100%;
    padding: clamp(10px, 1.5vh, 12px);
    background-color: var(--saffron);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5vh;
}

button:hover {
    background-color: #e68a00;
}

/* --- MESSAGES --- */
.message-box {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.error-box { background: #ffe5e5; color: #b30000; }
.success-box { background: #e6ffe6; color: #0f7a0f; }

/* --- FOOTER: Auto-spaced --- */
.footer-text {
    width: 100%;
    margin-top: auto; /* Pushes to bottom of card */
    padding-top: 10px;
    font-size: 0.75rem;
    color: #888;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Extra small screen adjustment for ultra-short devices */
@media (max-height: 600px) {
    .auth-card { padding: 1.5rem 1.5rem; }
    .auth-card h2 { font-size: 1.3rem; }
    .auth-card p { margin-bottom: 0.8rem; }
    .footer-text { margin-top: 0.8rem; padding-top: 0.5rem; }
    .input-group { margin-bottom: 0.6rem; }
}