/* أنماط الواجهة الأمامية لإضافة إدارة الصالة الرياضية */

/* الأنماط العامة */
.gym-public-container {
    direction: rtl;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* لوحة العضو */
.gym-member-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gym-member-header {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.gym-member-photo {
    margin-left: 30px;
}

.gym-member-photo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0073aa;
}

.gym-member-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
}

.gym-member-info h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.gym-member-id,
.gym-join-date {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.gym-member-qr {
    text-align: center;
}

.gym-qr-code img {
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.gym-qr-code img:hover {
    transform: scale(1.05);
}

.gym-qr-code p {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #666;
}

/* حالة الاشتراك */
.gym-subscription-status {
    margin-bottom: 30px;
}

.gym-subscription-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-right: 5px solid #28a745;
    position: relative;
    overflow: hidden;
}

.gym-subscription-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
}

.gym-subscription-card.expired {
    border-right-color: #dc3545;
}

.gym-subscription-card.expired::before {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.gym-subscription-card h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.gym-subscription-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.gym-subscription-plan strong {
    display: block;
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.gym-subscription-price {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.gym-subscription-dates p {
    margin: 2px 0;
    font-size: 14px;
    color: #666;
}

.gym-days-remaining {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.gym-status-expired {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.gym-renewal-notice {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    margin-top: 15px;
}

.gym-renewal-notice p {
    margin: 0 0 10px 0;
    color: #856404;
    font-weight: 500;
}

/* الإحصائيات */
.gym-member-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.gym-stat-item {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gym-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa, #005a87);
}

.gym-stat-item:hover {
    transform: translateY(-5px);
}

.gym-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gym-stat-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* محتوى لوحة التحكم */
.gym-dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.gym-dashboard-section {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.gym-dashboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa, #005a87);
}

.gym-dashboard-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

/* بطاقات الحصص */
.gym-class-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fff, #f8f9fa);
}

.gym-class-card:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
    transform: translateY(-2px);
}

.gym-class-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.gym-class-trainer,
.gym-class-time {
    margin: 2px 0;
    font-size: 14px;
    color: #666;
}

/* سجل الحضور */
.gym-attendance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.gym-attendance-item:hover {
    background-color: rgba(0, 115, 170, 0.05);
    margin: 0 -15px;
    padding: 12px 15px;
    border-radius: 6px;
}

.gym-attendance-date {
    font-weight: bold;
    color: #333;
}

.gym-attendance-time {
    text-align: left;
    font-size: 14px;
}

.gym-checkin-time,
.gym-checkout-time {
    display: block;
    color: #666;
}

.gym-duration {
    color: #28a745;
    font-weight: bold;
    font-size: 12px;
}

.gym-active-session {
    color: #ffc107;
    font-weight: bold;
    font-size: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* الإجراءات السريعة */
.gym-quick-actions {
    display: grid;
    gap: 12px;
}

.gym-quick-action {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-weight: 500;
}

.gym-quick-action:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.gym-quick-action .dashicons {
    margin-left: 12px;
    font-size: 20px;
    color: #0073aa;
}

/* المدفوعات */
.gym-payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.gym-payment-item:hover {
    background-color: rgba(40, 167, 69, 0.05);
    margin: 0 -15px;
    padding: 12px 15px;
    border-radius: 6px;
}

.gym-payment-amount {
    font-weight: bold;
    color: #28a745;
    font-size: 16px;
}

.gym-payment-date {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 2px;
}

.gym-receipt-number {
    font-size: 12px;
    color: #666;
    font-family: monospace;
}

/* معلومات الاتصال */
.gym-contact-info p {
    margin: 12px 0;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.gym-contact-info p:last-child {
    border-bottom: none;
}

/* الأزرار */
.gym-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.gym-btn:hover {
    background: linear-gradient(135deg, #005a87, #004a73);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.gym-btn-primary {
    background: linear-gradient(135deg, #0073aa, #005a87);
}

.gym-btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
}

.gym-btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.gym-btn-danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.gym-btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

/* قائمة الحصص */
.gym-classes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.gym-class-item {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gym-class-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
}

.gym-class-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.gym-class-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.gym-class-meta {
    margin-bottom: 15px;
}

.gym-class-meta p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.gym-class-capacity {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    text-align: center;
}

.gym-class-capacity.full {
    background: #f8d7da;
    color: #721c24;
}

/* تسجيل الدخول */
.gym-member-login {
    max-width: 400px;
    margin: 40px auto;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.gym-form-group {
    margin-bottom: 20px;
}

.gym-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.gym-form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    direction: rtl;
    text-align: right;
    transition: border-color 0.3s ease;
}

.gym-form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.gym-login-links {
    text-align: center;
    margin-top: 15px;
}

.gym-login-links a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.gym-login-links a:hover {
    text-decoration: underline;
}

/* التصميم المتجاوب */
@media (max-width: 1200px) {
    .gym-dashboard-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .gym-member-header {
        flex-direction: column;
        text-align: center;
    }
    
    .gym-member-photo {
        margin: 0 0 20px 0;
    }
    
    .gym-subscription-details {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .gym-member-stats {
        grid-template-columns: 1fr;
    }
    
    .gym-class-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .gym-attendance-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .gym-attendance-time {
        text-align: right;
    }
    
    .gym-classes-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gym-member-dashboard {
        padding: 10px;
    }
    
    .gym-dashboard-section {
        padding: 15px;
    }
    
    .gym-stat-item {
        padding: 20px 15px;
    }
    
    .gym-stat-number {
        font-size: 24px;
    }
}

/* تحسينات إضافية */
.gym-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gym-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 12px;
    text-transform: uppercase;
}

.gym-badge.active {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.gym-badge.inactive {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.gym-badge.expired {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

/* تأثيرات بصرية */
.gym-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gym-slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* تحسين الطباعة */
@media print {
    .gym-dashboard-section,
    .gym-class-card,
    .gym-stat-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .gym-btn,
    .gym-quick-actions {
        display: none;
    }
    
    .gym-member-qr img {
        max-width: 100px;
    }
}