/* Auth Pages CSS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2d3094;
    --primary-hover: #1e2066;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e2e8f0;
    --bg-auth: #ffffff;
    --input-bg: #f9fafb;
    --radius: 12px;
}

body.auth-page {
    background-color: #f8fafc;
    /* Fallback */
    background: linear-gradient(135deg, #f0fdf4 0%, #fef2f2 100%);
    /* Subtle gradient */
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    background: white;
    margin: auto;
    position: relative;
    z-index: 2;
}

@media (max-width: 640px) {
    .auth-container {
        width: 100%;
        min-height: 100vh;
        /* Ensure it fills at least the screen */
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center content vertically if space permits */
        padding: 1.5rem;
        border-radius: 0;
        box-shadow: none;
    }

    body.auth-page {
        align-items: stretch;
        background: white;
        padding: 0;
    }

    .brand-area {
        margin-bottom: 1.5rem;
    }

    .title {
        font-size: 1.5rem;
    }
}

@media (min-width: 640px) {
    .auth-container {
        border-radius: 24px;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    }
}

.brand-area {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-icon {
    width: 64px;
    height: 64px;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 1.5rem;
}

.title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.bismillah {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0.5rem 0 2rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.25rem;
}

.label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.input-field {
    width: 100%;
    padding: 12px 16px 12px 48px;
    /* space for icon */
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(45, 48, 148, 0.1);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: var(--text-main);
}

.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.bottom-text {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid #f3f4f6;
    padding-top: 1.5rem;
}

.bottom-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.bottom-text a:hover {
    text-decoration: underline;
}

/* Error/Success Messages */
.error-msg {
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
    background: #fef2f2;
    padding: 0.5rem;
    border-radius: 8px;
    display: none;
}