/* استایل‌های فرانت‌اند */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    line-height: 1.6;
    color: #1e293b;
}

/* فرم ثبت نام */
.rsm-register-container,
.rsm-login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.rsm-register-card,
.rsm-login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 800px;
    width: 100%;
    overflow: hidden;
}

.rsm-register-header,
.rsm-login-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.rsm-register-title,
.rsm-login-title {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.rsm-register-subtitle,
.rsm-login-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 1.1rem;
}

/* انتخاب نقش */
.rsm-role-selection {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.rsm-role-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.rsm-role-tab {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rsm-role-tab:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.rsm-role-tab.active {
    border-color: #3b82f6;
    background: #dbeafe;
}

.rsm-role-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.rsm-role-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.rsm-role-desc {
    font-size: 0.9rem;
    color: #64748b;
}

/* فرم */
.rsm-register-form,
.rsm-login-form {
    padding: 2rem;
}

.rsm-form-section {
    margin-bottom: 2rem;
}

.rsm-section-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.rsm-role-fields {
    display: none;
}

.rsm-role-fields.active {
    display: block;
}

.rsm-form-group {
    margin-bottom: 1.5rem;
}

.rsm-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.rsm-form-group input,
.rsm-form-group select,
.rsm-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.rsm-form-group input:focus,
.rsm-form-group select:focus,
.rsm-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rsm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ورودی با آیکون */
.rsm-input-with-icon {
    position: relative;
}

.rsm-input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #9ca3af;
}

.rsm-input-with-icon input {
    padding-right: 2.5rem;
}

/* گزینه‌های فرم */
.rsm-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.rsm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.rsm-forgot-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.rsm-forgot-link:hover {
    text-decoration: underline;
}

/* دکمه‌ها */
.rsm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.rsm-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.rsm-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.rsm-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.rsm-btn-secondary {
    background: #6b7280;
    color: white;
}

.rsm-btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

.rsm-btn-icon {
    font-size: 1.2rem;
}

/* عملیات فرم */
.rsm-form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.rsm-form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

.rsm-form-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.rsm-form-footer a:hover {
    text-decoration: underline;
}

/* ویژگی‌های ورود */
.rsm-login-features {
    padding: 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.rsm-login-features h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

.rsm-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.rsm-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.rsm-feature-icon {
    font-size: 1.5rem;
}

.rsm-feature-text {
    font-size: 0.9rem;
    color: #64748b;
}

/* پنل‌های کاربری */
.rsm-player-panel,
.rsm-club-panel,
.rsm-coach-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: #f8fafc;
    min-height: 100vh;
}

.rsm-panel-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.rsm-panel-header h1 {
    margin: 0 0 1rem 0;
    font-size: 3rem;
    font-weight: 700;
}

.rsm-panel-header p {
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

.rsm-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.rsm-panel-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.rsm-panel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.rsm-card-full {
    grid-column: 1 / -1;
}

.rsm-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rsm-card-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.rsm-card-body {
    padding: 2rem;
}

/* اطلاعات پروفایل */
.rsm-profile-info,
.rsm-club-info {
    display: grid;
    gap: 1rem;
}

.rsm-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.rsm-info-item:last-child {
    border-bottom: none;
}

.rsm-info-item label {
    font-weight: 600;
    color: #64748b;
}

.rsm-info-item span {
    color: #1e293b;
    font-weight: 500;
}

/* کیف پول */
.rsm-wallet-balance {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 16px;
    color: white;
}

.rsm-balance-amount {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.rsm-balance-currency {
    font-size: 1.2rem;
    opacity: 0.9;
}

.rsm-wallet-actions {
    margin-top: 1.5rem;
}

/* آمار روزانه */
.rsm-daily-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.rsm-stat-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.rsm-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    display: block;
    margin-bottom: 0.5rem;
}

.rsm-stat-label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* جداول */
.rsm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.rsm-table th,
.rsm-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.rsm-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.rsm-table tbody tr:hover {
    background: #f8fafc;
}

/* وضعیت */
.rsm-status {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.rsm-status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.rsm-status-pending {
    background: #fef3c7;
    color: #92400e;
}

/* Modal */
.rsm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.rsm-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
}

.rsm-modal-large {
    max-width: 900px;
}

.rsm-modal-header {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px 20px 0 0;
}

.rsm-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.rsm-modal-close {
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.rsm-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.rsm-modal-body {
    padding: 2rem;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .rsm-register-container,
    .rsm-login-container {
        padding: 1rem;
    }
    
    .rsm-role-tabs {
        grid-template-columns: 1fr;
    }
    
    .rsm-form-row {
        grid-template-columns: 1fr;
    }
    
    .rsm-panel-grid {
        grid-template-columns: 1fr;
    }
    
    .rsm-panel-header h1 {
        font-size: 2rem;
    }
    
    .rsm-daily-stats {
        grid-template-columns: 1fr;
    }
    
    .rsm-features-grid {
        grid-template-columns: 1fr;
    }
    
    .rsm-form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .rsm-register-card,
    .rsm-login-card {
        margin: 1rem;
    }
    
    .rsm-register-header,
    .rsm-login-header,
    .rsm-register-form,
    .rsm-login-form {
        padding: 1.5rem;
    }
    
    .rsm-role-selection {
        padding: 1.5rem;
    }
    
    .rsm-panel-header {
        padding: 2rem 1rem;
    }
    
    .rsm-card-body {
        padding: 1.5rem;
    }
}
