/* Import a professional Persian Font */
/* @import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css'); */
/* import from file path */
/* @import url('../fonts/Vazirmatn/Vazirmatn-font-face.css'); */

/* Auth Layout Base */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    /* Minimal, clean off-white */
    padding: 20px;
    font-family: 'Vazirmatn', sans-serif;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03), 0 4px 10px rgba(0, 0, 0, 0.02);
    border: 2px solid #dfe7f0;
}

/* Header & Icon */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-icon {
    width: 64px;
    height: 64px;
    background-color: #f1f5f9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem auto;
    border: 1px solid #e2e8f0;
}

.brand-icon i {
    font-size: 1.8rem;
    color: #0f172a;
    /* Sleek dark slate */
}

.login-header h2 {
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Form & Inputs */
.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 1rem;
    color: #94a3b8;
    font-size: 1.1rem;
}

.custom-input {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 2.8rem 0.75rem 1rem;
    /* Right padding adjusted for RTL icon */
    font-size: 0.95rem;
    color: #334155;
    transition: all 0.2s ease;
    box-shadow: none;
}

.custom-input:focus {
    background-color: #ffffff;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
    outline: none;
}

.custom-input::placeholder {
    color: #cbd5e1;
    font-size: 0.85rem;
}

/* Custom Alert */
.custom-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 10px;
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Button */
.btn-primary-custom {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-custom:hover {
    background-color: #1e293b;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.form-check-label {
    font-size: 0.85rem;
}

/* --- Register Page Specifics --- */

.login-wrapper.register-mode,
form[action="/auth/register"] {
    max-width: 500px;
}

.auth-link {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #3b82f6;
    /* Subtle blue on hover to indicate clickability */
    text-decoration: underline;
}

/* Responsive */

/* Fix mobile padding for the two-column row */
@media (max-width: 576px) {
    .login-wrapper {
        max-width: 100%;
    }

    .row .col-md-6 {
        margin-bottom: 0 !important;
        /* Let the wrapper handle spacing */
    }

    .row .col-md-6:first-child {
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 576px) {

    /* --- Login Page Mobile Adjustments --- */
    .login-wrapper {
        padding: 0 10px;
    }

    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 12px;
        /* Slightly tighter radius for mobile */
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    }

    .brand-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 1rem;
    }

    .brand-icon i {
        font-size: 1.5rem;
    }

    .login-header h2 {
        font-size: 1.25rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    /* --- Layout/Dashboard Mobile Adjustments --- */
    .topnav {
        flex-direction: column;
        align-items: stretch;
        /* Better alignment for full-width mobile items */
        gap: 1rem;
        padding: 1rem;
    }

    .topnav-left h2 {
        font-size: 1.25rem;
        text-align: center;
        /* Center the page title on mobile */
    }

    .topnav-right {
        width: 100%;
    }

    .user-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        background-color: #f8fafc;
        /* Gives a nice boxed look to the user info on mobile */
        padding: 1rem;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
    }

    .user-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.25rem;
        font-size: 0.9rem;
    }

    /* Make buttons touch-friendly on mobile */
    .btn-group .btn,
    .user-menu .btn {
        width: 100%;
        padding: 0.6rem 0.5rem;
        font-size: 0.9rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}