
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #333;
}

.main-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    max-width: 900px;
    height: auto;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    display: flex;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


.auth-image {
    flex: 1;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.auth-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}


.auth-form-container {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}


.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

h2.form-title {
    font-size: 28px;
    font-weight: 800;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}


.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group i {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #999;
    transition: 0.3s;
}

.form-group input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.form-group input:focus {
    border-color: #764ba2;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(118, 75, 162, 0.1);
}

.form-group input:focus + i {
    color: #764ba2;
}


.input-code {
    text-align: center !important;
    letter-spacing: 5px !important;
    font-size: 18px !important;
    font-weight: bold !important;
}


.otp-timer {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #764ba2;
    background: rgba(118, 75, 162, 0.08);
    border: 1px solid rgba(118, 75, 162, 0.2);
    border-radius: 10px;
    padding: 10px;
}

.otp-timer.expired {
    color: #d63031;
    background: #ffeaea;
    border-color: #fab1a0;
}


.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    margin-left: 10px;
    cursor: pointer;
    accent-color: #764ba2;
}


.checkbox-terms {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.checkbox-terms input {
    width: 18px;
    height: 18px;
    margin-left: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #764ba2;
    flex-shrink: 0;
}


.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.4);
}


.btn-resend {
    width: 100%;
    padding: 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-resend:hover {
    background: #5a6268;
}


.form-footer-links {
    text-align: center;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.form-footer-links a {
    color: #764ba2;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.form-footer-links a:hover {
    text-decoration: underline;
    color: #667eea;
}

.back-home {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.back-home i {
    font-size: 12px;
}


.alert-danger {
    background-color: #ffeaea;
    color: #d63031;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid #fab1a0;
    text-align: center;
}

.alert-danger ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


.auth-page-alerts {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    padding: 0 20px;
    z-index: 999;
}

.auth-page-alerts .alert-message {
    margin-bottom: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.alert-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.8;
    border: 1px solid transparent;
    animation: alertFadeIn 0.3s ease-in-out;
}

@keyframes alertFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-message-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    color: #fff;
    line-height: 1;
    margin-top: 3px;
}

.alert-message-text {
    flex: 1;
    word-break: break-word;
}

.alert-message-success {
    background: #e8f7ee;
    border-color: #c6ecd3;
    color: #1e7e34;
}

.alert-message-success .alert-message-icon {
    background: #28a745;
}

.alert-message-danger {
    background: #ffeaea;
    border-color: #fab1a0;
    color: #d63031;
}

.alert-message-danger .alert-message-icon {
    background: #d63031;
}

.alert-message-warning {
    background: #fff8e1;
    border-color: #ffe0a3;
    color: #b8860b;
}

.alert-message-warning .alert-message-icon {
    background: #f39c12;
}

.alert-message-info {
    background: #e3f2fd;
    border-color: #b3d9f7;
    color: #1976d2;
}

.alert-message-info .alert-message-icon {
    background: #1976d2;
}


@media (max-width: 768px) {
    .auth-card {
        flex-direction: column;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .auth-image {
        display: none;
    }

    .auth-form-container {
        padding: 30px 20px;
        justify-content: center;
        width: 100%;
        overflow-y: auto;
    }


    .auth-form-container.scroll-on-mobile {
        justify-content: flex-start;
    }

    .logo-container img {
        max-width: 140px;
    }

    h2.form-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
}
