/* OTP login page */
.otp-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /* background: #0F187F; */
    padding: 20px;
}

.otp-login-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 100%;
    padding: 40px;
}

.otp-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.otp-login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.otp-login-header p {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

/* فرم‌ها */
.otp-form {
    transition: opacity 0.3s ease;
}

.otp-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* این input رو وسط می‌کنه */
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-group label .required {
    color: #e74c3c;
    margin-right: 3px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    direction: ltr;
    text-align: center;
    max-width: 400px;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="text"].valid {
    border-color: #27ae60;
}

.form-group input[type="text"].invalid {
    border-color: #e74c3c;
}

.field-hint {
    display: block;
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
}

/* دکمه‌ها */
.btn {
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-loader {
    display: none;
}

.btn.loading .btn-text {
    visibility: hidden;
}

.btn.loading .btn-loader {
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.btn-link:disabled {
    color: #95a5a6;
    cursor: not-allowed;
}

/* اکشن‌های OTP */
.otp-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

#resend-timer {
    font-size: 12px;
    color: #95a5a6;
    margin-right: 5px;
}

/* پیام‌ها */
.otp-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.otp-message.show {
    display: block;
}

.otp-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.otp-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.otp-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* فوتر */
.otp-login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.otp-login-footer p {
    font-size: 14px;
    color: #7f8c8d;
    margin: 8px 0;
}

.otp-login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.otp-login-footer a:hover {
    text-decoration: underline;
}

/* ریسپانسیو */
@media (max-width: 480px) {
    .otp-login-container {
        padding: 30px 20px;
    }

    .otp-login-header h1 {
        font-size: 24px;
    }

    .otp-actions {
        flex-direction: column;
        gap: 10px;
    }
}
