/* نظام صيانة الأجهزة - التنسيقات العامة */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');
@import url('navbar.css');

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f0f0f0;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 5px;
}

*::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

body {
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', 'Segoe UI Tahoma', Tahoma, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    overflow-y: auto;
}

.page-title {
    color: #1e3a5f;
    font-weight: 600;
}

.fw-600 { font-weight: 600; }

.menu-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.menu-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.menu-card h5 {
    color: #333;
    font-weight: 600;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 8px;
}

.btn-primary:hover {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
}

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: #1e3a5f;
    color: white;
    font-weight: 600;
    border: none;
}

.warranty-expired { background-color: #ffebee !important; color: #c62828; }
.warranty-active { background-color: #e8f5e9 !important; color: #2e7d32; }

.modal-content { border-radius: 15px; }
.modal-header { border-radius: 15px 15px 0 0; }

.form-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-section h6 {
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cursor-pointer { cursor: pointer; }

/* Footer */
.app-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.footer-text {
    font-size: 0.85rem;
    color: #64748b;
}

/* زر العودة للأعلى */
.btn-back-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.btn-back-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-back-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* تحسين البطاقات */
.card-pro {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* تحسين الجداول */
.table-pro thead th {
    background: #f8fafc !important;
    color: #475569;
}

@media print {
    .navbar, .btn, .main-content .btn, nav, .btn-back-top, .app-footer { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    .warranty-expired { background-color: #ffebee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .warranty-active { background-color: #e8f5e9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
