/* ===============================
   General
================================ */
body {
    font-family: "Segoe UI", Tahoma, Arial;
    direction: rtl;
    background: #f1f3f6;
    margin: 0;
    color: #333;
    margin-top: 80px;
}

a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
}

a:hover {
    opacity: 0.85;
}

/* ===============================
   Layout
================================ */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
    padding: 20px;
    margin-bottom: 20px;
}

/* ===============================
   Navbar
================================ */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 60px;
    background: #445b66;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.navbar a {
    color: #fff;
    margin: 0 8px;
    font-size: 14px;
}

.nav-center {
    display: flex;
    gap: 15px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.counter {
    background: rgba(255,255,255,0.15);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.logout {
    background: #a94442;
    padding: 6px 10px;
    border-radius: 5px;
    color: #fff;
}

/* ===============================
   Buttons
================================ */
.btn {
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #fff;
    display: inline-block;
}

.btn-soft {
    background: #6c7a86;
}

.btn-danger {
    background: #dc2626;
}

.btn-dark {
    background: #374151;
}

.btn-primary {
    background: #2563eb;
}

.btn-warning {
    background: #d97706;
}

/* ===============================
   Tables
================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    background: #f8f9fa;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* ===============================
   Section Boxes (الأقسام مربعات)
================================ */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.section-card {
    background: linear-gradient(135deg,#f6f8fc,#eef3fb);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #dbe3f1;
    color: #333;
    font-weight: 600;
    transition: 0.2s;
}

.section-card:hover {
    background: #e3ebfa;
    transform: translateY(-3px);
}

.section-card small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* ===============================
   Attachments
================================ */
.attach-wrapper {
    display: flex;
    gap: 6px;
    align-items: center;
}

.attach-count {
    background: #007bff;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.thumb {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
}

.pdf-icon {
    font-size: 18px;
}

/* ===============================
   Back Button
================================ */
.btn-back {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 6px;
    background: #e9eef7;
    color: #333;
    margin-bottom: 15px;
}

.btn-back:hover {
    background: #dbe6f5;
}

/* ===============================
   Mobile
================================ */
@media (max-width: 768px) {
    .nav-center {
        display: none;
    }
}

/* ===============================
   Print (يطبع السجل فقط، بدون الناف بار أو أي عنصر إداري)
================================ */
@media print {
    .navbar,
    .no-print {
        display: none !important;
    }
    body {
        margin-top: 0 !important;
        background: white !important;
    }
    .container {
        margin: 0 !important;
        max-width: 100% !important;
    }
    .card {
        box-shadow: none !important;
    }
}

