@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

/* الأساسيات */
body {
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

/* الخلفيات والألوان */
.gradient-bg {
    background: linear-gradient(135deg, #35445D 0%, #DAA54F 50%, #35445D 100%);
}

.card-shadow {
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
}

/* الماسح الضوئي */
.scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 300px;
    margin: 0 auto;
    border: 2px dashed #35445D;
    border-radius: 12px;
    overflow: hidden;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* بطاقات الأصول */
.asset-card {
    transition: all 0.3s ease;
}

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

/* حالات الأصول */
.status-active { background: linear-gradient(45deg, #10b981, #34d399); }
.status-maintenance { background: linear-gradient(45deg, #f59e0b, #fbbf24); }
.status-inactive { background: linear-gradient(45deg, #ef4444, #f87171); }

/* الزر العائم */
.floating-add-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

@media (min-width: 768px) {
    .floating-add-btn {
        bottom: 30px;
        left: 30px;
    }
}

/* النوافذ المنبثقة (Modals) */
.modal-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* الطباعة والباركود */
.barcode-label {
    width: 2.5in;
    height: 1in;
    border: 1px solid #ccc;
    padding: 8px;
    background: white;
    font-family: Arial, sans-serif;
    font-size: 8pt;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.barcode-label svg {
    max-width: 100%;
    height: auto;
}

@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area { position: absolute; left: 0; top: 0; width: 100%; }
    .barcode-label { border: none; margin: 0; padding: 4px; page-break-after: always; }
}

/* إخفاء العناصر بناء على الصلاحيات */
.hidden-permission {
    display: none !important;
}