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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #0a1a3a 0%, #1a2a6c 50%, #0a1a3a 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
}

/* رسومات خفيفة في الخلفية */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(212, 175, 55, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* أيقونات معمل خفيفة */
body::after {
    content: "🔬 🧪 💉 🩺";
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 30px;
    opacity: 0.15;
    letter-spacing: 15px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 2px #d4af37;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease;
}

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

.header {
    background: linear-gradient(135deg, #0a1a3a 0%, #1a2a6c 100%);
    color: #fff;
    padding: 25px 20px;
    text-align: center;
    border-bottom: 4px solid #d4af37;
    position: relative;
}

.header img.logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    margin-bottom: 10px;
    border-radius: 10px;
}

.header h1 {
    font-size: 22px;
    margin-bottom: 8px;
    color: #d4af37;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header p {
    font-size: 14px;
    opacity: 0.9;
    color: #e0e0e0;
}

form {
    padding: 30px 25px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0a1a3a;
    font-size: 15px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 13px 15px;
    border: 2px solid #c0c8d4;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    background: #f8f9fb;
    transition: all 0.3s;
    color: #0a1a3a;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #7a8699;
}

.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1a2a6c 0%, #0a1a3a 100%);
    color: #d4af37;
    border: 2px solid #d4af37;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(26, 42, 108, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(26, 42, 108, 0.6);
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #0a1a3a;
}

.btn-gold {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #0a1a3a;
    border: 2px solid #0a1a3a;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #1a2a6c 0%, #0a1a3a 100%);
    color: #d4af37;
}

.btn-red {
    background: linear-gradient(135deg, #c0392b 0%, #8b1f15 100%);
    color: #fff;
    border: 2px solid #8b1f15;
}

.btn-green {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: #fff;
    border: 2px solid #1e8449;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 13px;
    width: auto;
    display: inline-block;
    margin: 2px;
}

.alert {
    margin: 20px 25px 0;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    font-size: 15px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #17a2b8;
}

.alert.warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.footer {
    background: #0a1a3a;
    color: #d4af37;
    text-align: center;
    padding: 15px;
    font-size: 13px;
    line-height: 1.6;
}

.footer a {
    color: #d4af37;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* صفحة عرض النتايج */
.result-container {
    max-width: 700px;
}

.result-item {
    background: #f8f9fb;
    border: 2px solid #e0e5ec;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.result-item:hover {
    border-color: #d4af37;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.result-item .info {
    flex: 1;
}

.result-item .info strong {
    display: block;
    color: #0a1a3a;
    font-size: 16px;
    margin-bottom: 4px;
}

.result-item .info small {
    color: #7a8699;
    font-size: 12px;
}

/* جدول الإدارة */
.table-wrap {
    overflow-x: auto;
    padding: 0 15px 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e0e5ec;
    font-size: 14px;
}

th {
    background: #0a1a3a;
    color: #d4af37;
    font-weight: 700;
}

tr:hover {
    background: #f8f9fb;
}

/* إحصائيات */
.stats {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    flex-wrap: wrap;
}

.stat-box {
    flex: 1;
    min-width: 120px;
    background: linear-gradient(135deg, #0a1a3a 0%, #1a2a6c 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #d4af37;
}

.stat-box .number {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
    display: block;
}

.stat-box .label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 5px;
}

/* موبايل */
@media (max-width: 500px) {
    .header h1 { font-size: 18px; }
    .header img.logo { max-height: 80px; }
    .container { border-radius: 15px; }
    .stat-box .number { font-size: 24px; }
    th, td { padding: 8px; font-size: 12px; }
}

/* الطباعة */
@media print {
    body { background: #fff; padding: 0; }
    .container { box-shadow: none; }
    .btn, .footer { display: none; }
}
