/* إعادة تعيين التنسيقات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* الخطوط */
body {
    font-family: 'Tajawal', Arial, sans-serif;
    background: linear-gradient(135deg, #006B6B 0%, #005757 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

/* القائمة الرئيسية */
.main-nav {
    background: linear-gradient(135deg, #006B6B 0%, #005757 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #005757;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    padding: 10px 0;
    margin-top: 5px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    padding: 10px 20px;
}

.dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* الحاوية الرئيسية */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* العناوين */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 700;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 26px;
}

h3 {
    font-size: 22px;
}

/* البطاقات */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* الأزرار */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #ffffff;
    color: #006B6B;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: #008B8B;
    color: #ffffff;
}

.btn-primary:hover {
    background: #006B6B;
}

.btn-danger {
    background: #dc3545;
    color: #ffffff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: #ffffff;
}

.btn-success:hover {
    background: #218838;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* الجداول */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background: rgba(255, 255, 255, 0.15);
}

table th {
    padding: 15px;
    text-align: right;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

table tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* النماذج */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

select.form-control option {
    background: #005757;
    color: #ffffff;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* الرسائل */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.3);
    border: 1px solid #28a745;
    color: #ffffff;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.3);
    border: 1px solid #dc3545;
    color: #ffffff;
}

.alert-info {
    background: rgba(23, 162, 184, 0.3);
    border: 1px solid #17a2b8;
    color: #ffffff;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.3);
    border: 1px solid #ffc107;
    color: #ffffff;
}

/* صفحة تسجيل الدخول */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 100%;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* الشبكة */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.grid-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.grid-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* التذييل */
.main-footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
    color: #ffffff;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* طباعة */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* الاستجابة */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}

/* أيقونات الإجراءات */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* مربعات المنتجات */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.product-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.product-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.product-card.selected {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.product-card h4 {
    margin-bottom: 10px;
}

.product-card p {
    margin: 5px 0;
    font-size: 14px;
    opacity: 0.9;
}

/* العداد */
.badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    background: rgba(40, 167, 69, 0.5);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.5);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.5);
}

/* تحميل */
.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

