/**
 * ملف التصميم الرئيسي
 * Main Stylesheet
 */
/* Tajawal font loaded via local tajawal.css in HTML */

:root {
    --primary-color: #1a1a2e;
    --primary-light: #16213e;
    --primary-dark: #0f0f23;
    --accent-color: #e9c46a;
    --accent-hover: #f4d58d;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;
    --dark-color: #1e293b;
    --light-color: #f8f9ff;
    --border-color: #e2e8f0;
    --text-primary: #1a1a2e;
    --text-secondary: #475569;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --card-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --sidebar-width: 260px;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--light-color);
    color: var(--text-primary);
}

 .mobile-bottom-nav {
     display: none;
 }

/* تحسينات البطاقات */
.card {
    border-radius: 16px;
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--card-shadow);
}

.card:hover {
    transform: none;
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0f3460);
    color: white;
    border-radius: 16px 16px 0 0 !important;
    padding: 1.25rem;
    font-weight: 700;
}

/* بطاقات الإحصائيات */
.stat-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.04);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(26, 26, 46, 0.12);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.invoice-stats .stat-card .card-body {
    padding: 1.1rem;
}

.dashboard-stats .stat-card .card-body {
    padding: 0.9rem !important;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.invoice-stats .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
}

.dashboard-stats .stat-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.25rem !important;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.invoice-stats .stat-value {
    font-size: 1.35rem;
    margin: 0.25rem 0;
}

.dashboard-stats .stat-value {
    font-size: 1.2rem !important;
    margin: 0.2rem 0 !important;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
}

/* الأزرار */
.btn {
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: all 0.25s;
    font-family: 'Tajawal', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0f3460);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0f3460, var(--primary-color));
    transform: none;
    box-shadow: 0 6px 20px rgba(15, 52, 96, 0.3);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
}

/* الجداول */
.table {
    background: white;
    border-radius: 14px;
    overflow: hidden;
}

.table thead th {
    background: #f8f9ff;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    color: var(--text-primary);
    padding: 1rem;
    font-size: 0.88rem;
}

.table tbody tr {
    transition: background-color 0.2s;
}

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

.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

 .chat-thread {
     background: #f8f9fa;
 }

 .chat-messages {
     max-height: 60vh;
     overflow-y: auto;
     padding: 8px 6px;
 }

 .chat-row {
     display: flex;
     margin-bottom: 10px;
 }

 .chat-row.me {
     justify-content: flex-end;
 }

 .chat-row.other {
     justify-content: flex-start;
 }

 .chat-bubble {
     max-width: min(70%, 560px);
     border-radius: 14px;
     padding: 8px 10px;
     line-height: 1.55;
     font-size: 0.92rem;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
 }

 .chat-bubble.me {
     background: linear-gradient(135deg, #1a1a2e, #0f3460);
     color: #fff;
     border-top-right-radius: 6px;
 }

 .chat-bubble.other {
     background: #ffffff;
     color: #212529;
     border: 1px solid var(--border-color);
     border-top-left-radius: 6px;
 }

 .chat-meta {
     display: flex;
     justify-content: space-between;
     align-items: center;
     gap: 10px;
     margin-bottom: 6px;
     font-size: 0.78rem;
     opacity: 0.9;
 }

 .chat-day {
     display: flex;
     justify-content: center;
     margin: 10px 0 14px;
 }

 .chat-day span {
     background: rgba(0, 0, 0, 0.06);
     color: #334155;
     font-size: 0.78rem;
     padding: 4px 10px;
     border-radius: 999px;
 }

 .chat-meta .chat-name {
     font-weight: 700;
     font-size: 0.82rem;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
 }

 .chat-body {
     white-space: pre-wrap;
 }

/* النماذج */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    padding: 0.625rem 1rem;
    transition: all 0.25s;
    font-family: 'Tajawal', sans-serif;
}

.form-control:focus, .form-select:focus {
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* الشريط الجانبي */
.sidebar {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f172a 100%);
    min-height: 100vh;
    padding: 0;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(233, 196, 106, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-brand {
    color: white;
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#closeSidebar {
    padding: 0.5rem;
    line-height: 1;
    text-decoration: none;
    transition: opacity 0.2s;
}

#closeSidebar:hover {
    opacity: 0.7;
}

.sidebar-nav {
    padding: 0.75rem 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.65);
    padding: 0.8rem 1.5rem;
    border-right: 3px solid transparent;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.92rem;
}

.nav-link:hover {
    color: #fff;
    background: rgba(233, 196, 106, 0.08);
    border-right-color: var(--accent-color);
}

.nav-link.active {
    color: var(--accent-color);
    background: rgba(233, 196, 106, 0.1);
    border-right-color: var(--accent-color);
    font-weight: 700;
}

.nav-link i {
    width: 22px;
    text-align: center;
    font-size: 0.95rem;
}

.nav-link .badge {
    margin-right: auto;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

/* فاصل القائمة */
.nav-divider {
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-divider small {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.5;
    color: var(--accent-color);
    font-size: 0.72rem;
}

/* الهيدر */
.main-header {
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    padding: 0.9rem 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

 .main-header .header-title {
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
 }

 .header-actions {
     display: inline-flex;
     align-items: center;
     gap: 0.4rem;
 }

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #0f3460);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    border: 2px solid rgba(233, 196, 106, 0.2);
}

/* الشارات */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

/* المحتوى الرئيسي */
.main-content {
    padding: 2rem;
}

/* الصور */
.course-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* البحث والفلترة */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 2.5rem;
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* التنبيهات */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* التحميل */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* الاستجابة للشاشات الصغيرة */
@media (max-width: 575.98px) {
    /* إصلاح السكرول الأفقي في dashboard */
    .dashboard-stats .stat-label {
        font-size: 0.65rem !important;
        line-height: 1.2;
    }
    
    .dashboard-stats .stat-value {
        font-size: 0.95rem !important;
        margin: 0 !important;
    }
    
    .dashboard-stats .stat-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
    }
    
    .dashboard-stats .stat-icon i {
        font-size: 0.85rem !important;
    }
    
    .dashboard-stats .card-body {
        padding: 0.4rem !important;
    }
    
    /* منع overflow */
    body {
        overflow-x: hidden;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    /* الشريط الجانبي للهواتف */
    .sidebar {
        position: fixed;
        right: -100%;
        top: 0;
        width: 280px;
        z-index: 1050;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        height: 100vh;
        overflow-y: auto;
    }
    
    .sidebar.show {
        right: 0;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
    }
    
    /* زر القائمة للهواتف - الآن في الهيدر */
    #mobileMenuToggle {
        padding: 0.5rem 0.75rem;
        font-size: 1.125rem;
        border-radius: 10px;
        background: linear-gradient(135deg, var(--primary-color), #0f3460) !important;
        border: none;
        color: #fff;
    }
    
    #mobileMenuToggle:hover {
        background: linear-gradient(135deg, #0f3460, var(--primary-color)) !important;
    }
    
    /* الخلفية المظللة */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* المحتوى الرئيسي */
    .main-content {
        padding: 1rem 0.75rem;
    }

    body {
        padding-bottom: 74px;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 64px;
        background: #ffffff;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        z-index: 1040;
        padding: 6px 8px;
        gap: 4px;
    }

    .mobile-bottom-nav__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-secondary);
        font-size: 0.72rem;
        border-radius: 12px;
        padding: 6px 4px;
        transition: all 0.2s;
        font-weight: 500;
    }

    .mobile-bottom-nav__item:active,
    .mobile-bottom-nav__item--active {
        background: rgba(15, 52, 96, 0.06);
        color: var(--primary-color);
        font-weight: 600;
    }

    .mobile-bottom-nav__icon {
        position: relative;
        font-size: 1rem;
        line-height: 1;
        margin-bottom: 3px;
    }

    .mobile-bottom-nav__badge {
        position: absolute;
        top: -8px;
        right: -12px;
        font-size: 0.65rem;
        padding: 0.2rem 0.35rem;
        min-width: 18px;
        text-align: center;
    }

    .mobile-bottom-nav__label {
        line-height: 1;
        white-space: nowrap;
    }
    
    /* الهيدر */
    .main-header {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
        position: sticky;
        top: 0;
        z-index: 1030;
    }
    
    .main-header .header-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .main-header .header-title {
        font-size: 1.05rem;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-header .header-right {
        flex: 0 0 auto;
        gap: 0.5rem;
    }

    .main-header .header-right {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .main-header .header-actions {
        width: auto;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        margin-top: 0;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .main-header .header-actions .btn {
        margin: 0 !important;
    }
    
    /* معلومات المستخدم */
    .user-info {
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }

    .main-header .user-avatar {
        display: none;
    }

    .main-header .user-meta {
        display: none;
    }

    .main-header .header-actions .btn {
        padding: 0.35rem 0.6rem;
    }

    .main-header .header-actions .btn i {
        font-size: 1rem;
    }
    
    /* بطاقات الإحصائيات */
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-card .card-body {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.813rem;
    }
    
    /* الجداول */
    .table-responsive {
        margin: 0 -0.75rem;
        border-radius: 0;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.813rem;
    }
    
    .table tbody td {
        padding: 0.625rem 0.5rem;
        font-size: 0.813rem;
    }
    
    /* النماذج */
    .form-control, .form-select {
        font-size: 0.938rem;
        padding: 0.5rem 0.75rem;
    }
    
    .form-label {
        font-size: 0.875rem;
    }
    
    /* الأزرار */
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .btn-sm {
        font-size: 0.813rem;
        padding: 0.35rem 0.65rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.625rem 1.25rem;
    }
    
    /* صور المنتجات */
    .course-image {
        width: 50px;
        height: 50px;
    }
    
    .product-image-wrapper {
        height: 180px;
    }
    
    /* البطاقات */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* العناوين */
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.125rem;
    }
}

/* شاشات صغيرة جداً (أقل من 576px) */
@media (max-width: 576px) {
    .main-content {
        padding: 0.75rem 0.5rem;
    }
    
    .stat-card .d-flex {
        flex-direction: column !important;
        text-align: center;
        gap: 0.75rem;
    }
    
    .stat-icon {
        margin: 0 auto;
    }

    .main-header .user-meta {
        display: none;
    }
    
    .table {
        font-size: 0.813rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
}

/* شاشات متوسطة (tablets) */
@media (min-width: 768px) and (max-width: 992px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
}

/* تحسينات إضافية */
.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.text-muted {
    color: #64748b !important;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 1.5rem 0;
}

/* حالات الطلبات */
.order-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
}

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

.order-status.confirmed {
    background: #dbeafe;
    color: #1e40af;
}

.order-status.ready {
    background: #e0e7ff;
    color: #3730a3;
}

.order-status.delivered {
    background: #d1fae5;
    color: #065f46;
}

.order-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* بطاقة المنتج */
.product-card {
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 200px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image {
    transform: none;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.875rem;
}

.stock-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* تحسينات إضافية للجداول على الهواتف */
@media (max-width: 768px) {
    /* جعل الجداول قابلة للتمرير */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* تحسين عرض أزرار العمليات */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* إخفاء بعض الأعمدة على الشاشات الصغيرة */
@media (max-width: 576px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    .table-sm td,
    .table-sm th {
        padding: 0.5rem 0.35rem;
        font-size: 0.75rem;
    }
}

/* تحسينات صفحة تسجيل الدخول للهواتف */
@media (max-width: 576px) {
    .login-card {
        margin: 1rem;
    }
    
    .login-card .card-body {
        padding: 2rem 1.5rem !important;
    }
}

/* الفوتر الداخلي */
.internal-footer {
    padding: 1rem 2rem;
    background: #fff;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 1rem;
}

.internal-footer i {
    color: var(--success-color);
}

/* تنسيقات عامة إضافية */
.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), #0f3460) !important;
}

.badge.bg-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.badge.bg-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.badge.bg-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.badge.bg-info {
    background: #dbeafe !important;
    color: #1e40af !important;
}

/* تحسين الـ alert */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-weight: 500;
}

/* ============================================
   Mobile Responsive Table Cards System
   نظام الكروت المتجاوب للجداول
   ============================================ */

/* Mobile Card - Alternative to tables */
.mobile-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s;
}

.mobile-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-card-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.938rem;
    margin: 0;
}

.mobile-card-badge {
    font-size: 0.75rem;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-card-row:last-child {
    border-bottom: none;
}

.mobile-card-label {
    font-size: 0.813rem;
    color: #64748b;
    font-weight: 500;
}

.mobile-card-value {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 500;
    text-align: left;
}

.mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.mobile-card-actions .btn {
    flex: 1;
    font-size: 0.813rem;
}

/* Image in mobile card */
.mobile-card-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-left: 0.75rem;
}

.mobile-card-content {
    flex: 1;
}

/* Responsive utility classes */
.show-desktop {
    display: block !important;
}

.show-mobile {
    display: none !important;
}

@media (max-width: 991px) {
    .show-desktop {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .show-mobile-flex {
        display: flex !important;
    }
    
    .show-mobile-inline {
        display: inline !important;
    }
    
    .show-mobile-inline-block {
        display: inline-block !important;
    }
}

/* Mobile table alternative - stacked layout */
.mobile-table-card {
    display: none;
}

@media (max-width: 991px) {
    .mobile-table-card {
        display: block;
    }
    
    /* Hide regular table on mobile */
    .table-responsive.hide-mobile-table {
        display: none;
    }
}

/* Compact mobile header */
.mobile-compact-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mobile-compact-header img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

/* Mobile action buttons - full width */
@media (max-width: 991px) {
    .mobile-action-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-action-group .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile summary card */
.mobile-summary-card {
    background: linear-gradient(135deg, #f8f9ff, #eef2ff);
    border: 1px solid rgba(15, 52, 96, 0.08);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.mobile-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.mobile-summary-row:not(:last-child) {
    border-bottom: 1px dashed #cbd5e1;
}

.mobile-summary-label {
    font-size: 0.875rem;
    color: #475569;
}

.mobile-summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

/* Mobile filter section */
.mobile-filter-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.mobile-filter-section .form-label {
    font-size: 0.813rem;
    margin-bottom: 0.25rem;
}

.mobile-filter-section .form-control,
.mobile-filter-section .form-select {
    font-size: 0.875rem;
}

/* Mobile sticky footer actions */
.mobile-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1020;
    display: none;
}

@media (max-width: 991px) {
    .mobile-sticky-footer {
        display: block;
    }
    
    .mobile-sticky-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .mobile-sticky-footer .btn:last-child {
        margin-bottom: 0;
    }
}

/* Mobile accordion for details */
.mobile-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.mobile-accordion-header {
    background: #f8fafc;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.mobile-accordion-body {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    display: none;
}

.mobile-accordion-body.show {
    display: block;
}

/* Mobile pagination */
@media (max-width: 991px) {
    .pagination {
        font-size: 0.875rem;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
    }
    
    /* Hide page numbers except first, last, and current */
    .pagination .page-item:not(.active):not(:first-child):not(:last-child):not(.prev):not(.next) {
        display: none;
    }
}

/* Mobile grid improvements */
@media (max-width: 991px) {
    .row.mobile-single-col > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Mobile status indicators */
.mobile-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.mobile-status-dot.success {
    background: #10b981;
}

.mobile-status-dot.danger {
    background: #ef4444;
}

.mobile-status-dot.warning {
    background: #f59e0b;
}

.mobile-status-dot.info {
    background: #06b6d4;
}

/* Mobile search bar improvements */
@media (max-width: 991px) {
    .mobile-search-wrapper {
        position: sticky;
        top: 0;
        z-index: 1010;
        background: white;
        padding: 0.75rem;
        margin: -0.75rem -0.5rem 1rem;
        border-bottom: 1px solid #e2e8f0;
    }
}
