/* publics/css/custom-login.css */

/* ریست استایل‌ها */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* استایل‌های عمومی */
body {
    font-family: 'BTitr', Tahoma, sans-serif;
    background: url('/publics/images/image01.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px);
    z-index: -1;
}

/* کانتینر لاگین */
.login-container {
    width: 100%;
    max-width: 28rem; /* معادل max-w-md */
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem; /* rounded-xl */
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
    padding: 2rem; /* p-8 */
}

/* هدر */
.text-center {
    text-align: center;
    margin-bottom: 2rem; /* mb-8 */
}

.logo-circle {
    width: 5rem; /* w-20 */
    height: 5rem; /* h-20 */
    background-color: rgba(219, 234, 254, 0.8); /* bg-blue-100/80 */
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem; /* mx-auto mb-4 */
}

.logo-icon {
    color: #2563eb; /* text-blue-600 */
    font-size: 1.875rem; /* text-3xl */
}

h1 {
    font-size: 1.5rem; /* text-2xl */
    font-weight: bold;
    color: #1f2937; /* text-gray-800 */
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #4b5563; /* text-gray-600 */
    margin-top: 0.5rem;
}

/* فرم */
.form-space {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* space-y-5 */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* space-y-2 */
}

label {
    display: block;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    color: #374151; /* text-gray-700 */
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0.75rem; /* inset-y-0 left-0 */
    right: auto;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.input-icon i {
    color: #9ca3af; /* text-gray-400 */
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.5rem; /* py-2.5 pr-3 pl-10 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6; /* border-blue-500 */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); /* focus:ring-2 */
}

.toggle-password {
    position: absolute;
    left: 0.75rem; /* left-3 */
    top: 0.75rem; /* top-3 */
    background: none;
    border: none;
    color: #9ca3af; /* text-gray-400 */
    cursor: pointer;
    padding: 0;
}

/* چک‌باکس و لینک */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.25rem 0;
}

.remember-wrapper {
    display: flex;
    align-items: center;
}

.remember-wrapper input {
    margin-left: 0.5rem;
}

.forgot-link {
    font-size: 0.875rem; /* text-sm */
    color: #2563eb; /* text-blue-600 */
    text-decoration: none;
}

.forgot-link:hover {
    color: #1e40af; /* text-blue-800 */
}

/* دکمه */
.submit-btn {
    width: 100%;
    background-color: #2563eb; /* bg-blue-600 */
    color: white;
    padding: 0.625rem 1rem; /* py-2.5 px-4 */
    border: none;
    border-radius: 0.5rem; /* rounded-lg */
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* shadow-md */
}

.submit-btn:hover {
    background-color: #1d4ed8; /* bg-blue-700 */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); /* shadow-lg */
}

.submit-btn i {
    margin-right: 0.5rem; /* ml-2 */
}

/* فوتر */
.footer {
    margin-top: 1.5rem; /* mt-6 */
    padding-top: 1.5rem; /* pt-6 */
    border-top: 1px solid rgba(229, 231, 235, 0.5); /* border-gray-200/50 */
    text-align: center;
}

.access-text {
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* text-gray-600 */
    margin-bottom: 0.75rem; /* mb-3 */
}

.access-link {
    color: #2563eb; /* text-blue-600 */
    font-weight: 500; /* font-medium */
    text-decoration: none;
}

.access-link:hover {
    color: #1e40af; /* text-blue-800 */
}

.portal-links {
    display: flex;
    justify-content: center;
    gap: 1rem; /* space-x-4 */
    flex-wrap: wrap;
    margin-top: 1rem; /* mt-4 */
}

.portal-link {
    font-size: 0.75rem; /* text-xs */
    background-color: #f0fdf4; /* bg-green-100 */
    color: #16a34a; /* text-green-600 */
    padding: 0.25rem 0.75rem; /* px-3 py-1 */
    border-radius: 9999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.portal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.portal-link.purple {
    background-color: #f3e8ff; /* bg-purple-100 */
    color: #9333ea; /* text-purple-600 */
}

.portal-link i {
    margin-left: 0.25rem; /* mr-1 */
}

/* انیمیشن */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ریسپانسیو */
@media (max-width: 640px) {
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .portal-link {
        font-size: 0.7rem;
        padding: 0.375rem 0.625rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}