/* نظام روكيت كارجو - الأنماط الرئيسية */

:root {
    --primary-color: #D22630;
    --secondary-color: #343A40;
    --blue-color: #0d6efd;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
    --header-height: 50px;
    --rocket-red: #C42033;
    --customer-icon-color: #FFC107;
    --company-icon-color: #28a745;
    --shipment-icon-color: #0d6efd;
}

/* تخصيص أساسيات */
body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: #333;
    direction: rtl;
    text-align: right;
}

/* تصميم الهيدر */
.main-header {
    width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--rocket-red);
    padding: 0 15px;
    height: var(--header-height);
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-left: 10px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.notifications {
    margin-right: 20px;
}

.notification-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.user-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.user-panel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.user-panel-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.dark-mode-btn {
    order: 1;
}

.header-actions {
    order: 2;
    display: flex;
}

.header-actions .btn {
    color: white;
    margin: 0 5px;
    font-size: 14px;
}

.logo-area {
    order: 3;
    margin-right: auto;
}

.logo-link {
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-link i {
    margin-left: 5px;
    font-size: 20px;
}

.btn-circle {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
}

/* تصميم القائمة الجانبية */
.app-container {
    position: relative;
    display: table;
    width: 100%;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    border-collapse: collapse;
}

.side-nav {
    width: 100%;
    background-color: white;
    overflow-y: auto;
    height: calc(100vh - var(--header-height));
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: var(--header-height);
}

.control-panel-title {
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.logo-box {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 50%;
}

.logo-icon {
    width: 60px;
    height: 60px;
}

.panel-title {
    margin: 0;
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    border-bottom: 1px solid #f5f5f5;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link i {
    margin-left: 10px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-link.active {
    background-color: var(--rocket-red);
    color: white;
}

.nav-link:hover:not(.active) {
    background-color: #f8f9fa;
}

/* المحتوى الرئيسي */
.content-wrapper {
    padding: 20px;
    min-height: calc(100vh - var(--header-height));
}

.main-content main {
    display: block;
    padding: 0 !important; 
    margin: 0 !important;
    width: 100%;
    border: none;
}

/* الإجراءات السفلية */
.footer-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: white;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1020;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.2s;
}

.action-btn i {
    margin-left: 8px;
    font-size: 18px;
}

.location-btn {
    background-color: var(--rocket-red);
    color: white;
}

.fast-actions-btn {
    background-color: var(--rocket-red);
    color: white;
}

/* تصميم البطاقات على الصفحة الرئيسية */
.dashboard-card {
    text-align: center;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.dashboard-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
}

.customer-icon {
    background-color: #ffc107;
    color: white;
}

.company-icon {
    background-color: #28a745;
    color: white;
}

.shipment-icon {
    background-color: #0d6efd;
    color: white;
}

.card-title {
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.card-text {
    color: #666;
    margin-bottom: 20px;
}

.card-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.card-btn:hover {
    background-color: #e9ecef;
}

/* بطاقة المعلومات */
.info-card {
    background-color: #e3f2fd;
    border-right: 4px solid var(--blue-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: var(--blue-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-left: 10px;
}

.info-text {
    display: inline-block;
    color: #0d6efd;
    font-weight: 500;
}

/* تصميم الجداول */
.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 500;
    padding: 12px 15px;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
    color: #555;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* النافذة المنبثقة */
.modal-content {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
}

.modal-title {
    font-weight: bold;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
}

/* أزرار العمليات */
.action-buttons .btn {
    margin-right: 5px;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
}

.btn-view {
    background-color: var(--info-color);
    color: white;
}

.btn-edit {
    background-color: var(--warning-color);
    color: white;
}

.btn-delete {
    background-color: var(--danger-color);
    color: white;
}

/* الوضع الداكن */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .top-bar {
    background-color: #1a1a1a;
}

body.dark-mode .side-nav {
    background-color: #1a1a1a;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

body.dark-mode .control-panel-title {
    border-bottom-color: #333;
}

body.dark-mode .logo-box {
    background-color: #252525;
}

body.dark-mode .panel-title {
    color: #ccc;
}

body.dark-mode .nav-item {
    border-bottom-color: #222;
}

body.dark-mode .nav-link {
    color: #ccc;
}

body.dark-mode .nav-link:hover:not(.active) {
    background-color: #252525;
}

body.dark-mode .footer-actions {
    background-color: #1a1a1a;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

body.dark-mode .action-btn:not(.location-btn):not(.fast-actions-btn) {
    color: #ccc;
}

body.dark-mode .dashboard-card {
    background-color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .card-title {
    color: #e0e0e0;
}

body.dark-mode .card-text {
    color: #aaa;
}

body.dark-mode .card-btn {
    background-color: #252525;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-mode .card-btn:hover {
    background-color: #333;
}

body.dark-mode .info-card {
    background-color: rgba(13, 110, 253, 0.1);
    border-right-color: var(--blue-color);
}

body.dark-mode .info-text {
    color: #73b0ff;
}

body.dark-mode .table-container {
    background-color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .table th {
    background-color: #252525;
    color: #e0e0e0;
}

body.dark-mode .table td {
    color: #ccc;
}

body.dark-mode .table tbody tr:hover {
    background-color: #222;
}

/* تصميم الشاشة الرئيسية الجديد */
.dashboard-container {
    padding: 20px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-title {
    font-size: 24px;
    margin: 0;
    color: #333;
}

.dashboard-title i {
    margin-left: 10px;
    color: var(--rocket-red);
}

.service-cards {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
}

.service-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 15px;
    font-size: 24px;
}

.customer-color {
    background-color: var(--customer-icon-color);
    color: white;
}

.company-color {
    background-color: var(--company-icon-color);
    color: white;
}

.shipment-color {
    background-color: var(--shipment-icon-color);
    color: white;
}

.service-card-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.service-card-desc {
    color: #666;
    margin-bottom: 15px;
}

.service-card-link {
    color: var(--blue-color);
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
}

.service-card-link i {
    margin-left: 5px;
}

.control-panel-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

/* تصميم استجابي */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 60px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link i {
        margin: 0;
        font-size: 20px;
    }
    
    .control-panel-title {
        padding: 10px 0;
    }
    
    .control-panel-logo {
        width: 30px;
        height: 30px;
    }
    
    .panel-title {
        display: none;
    }
    
    .service-cards {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .info-card {
        padding: 10px;
    }
    
    .service-card-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .dashboard-title {
        font-size: 20px;
    }
}

/* إصلاح مشكلة ألوان الجداول - التأكد من أن النص مرئي في الـ header */
.table thead.bg-light,
.table thead.table-light {
    color: #212529 !important;
    font-weight: 600 !important;
}

.table thead.bg-light th,
.table thead.table-light th {
    color: #212529 !important;
    font-weight: 600 !important;
}

/* التأكد من أن جميع عناوين الجداول مرئية */
thead th {
    color: #212529 !important;
}