body { font-family: 'Cairo', sans-serif; background: #f7f7f7; margin: 0; }
.sidebar { width: 220px; background: #222; color: #fff; position: fixed; height: 100vh; padding: 30px 10px; }
.sidebar h3 { color: #fff; text-align: center; margin-bottom: 30px; }
.sidebar a { display: block; color: #fff; text-decoration: none; margin: 16px 0; padding: 8px 16px; border-radius: 6px; transition: background 0.2s; }
.sidebar a:hover { background: #444; }
.main, .container-fluid, .container {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  padding-right: 16px !important;
  padding-left: 16px !important;
  box-sizing: border-box !important;
}
.card { 
  background: #fff; 
  padding: 30px; 
  border-radius: 12px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.07); 
  max-width: none !important; 
  margin: 0 auto !important; 
}
.card form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card label {
  width: 100%;
  text-align: right;
}
.form-select, select {
  width: 100% !important;
  max-width: 600px;
  margin: 0 auto 10px auto !important;
  display: block !important;
  direction: rtl;
}
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
table th, table td { border: 1px solid #ccc; padding: 8px 12px; text-align: center; }
table th { background: #eee; }
button, input[type=submit] { background: #28a745; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-size: 16px; }
button:hover, input[type=submit]:hover { background: #218838; }
input {
  padding: 8px; 
  margin-bottom: 10px; 
  border-radius: 4px; 
  border: 1px solid #ccc; 
  width: 100%; 
  box-sizing: border-box; 
}
label { 
  display: block; 
  margin-bottom: 6px; 
  color: #222; 
  font-weight: bold; 
}
.error { color: red; text-align: center; }
#suggestions {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
#suggestions li {
    cursor: pointer;
}

.success-message {
    background: #f0f6ff;
    color: #1976d2;
    border: 2px solid #1976d2;
    border-radius: 12px;
    padding: 16px 32px;
    margin: 20px auto 0 auto;
    font-size: 1.18rem;
    font-weight: 600;
    text-align: center;
    width: fit-content;
    min-width: 260px;
    max-width: 90vw;
    box-shadow: 0 2px 14px rgba(25,118,210,0.08);
    display: none;
    letter-spacing: 0.01em;
    transition: all 0.4s cubic-bezier(.4,2,.5,1);
    opacity: 0;
    transform: translateY(16px) scale(.98);
}
.success-message.update-success {
    background: #fff2f0;
    color: #c62828;
    border: 2px solid #c62828;
    animation: popInSuccess .6s cubic-bezier(.4,2,.5,1);
}
.success-message.show-success {
    display: block !important;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: popInSuccess .6s cubic-bezier(.4,2,.5,1);
}
@keyframes popInSuccess {
    0% { opacity: 0; transform: translateY(20px) scale(.96); }
    80% { opacity: 1; transform: translateY(-4px) scale(1.04); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.case-info-cards {
  display: flex;
  gap: 18px;
  flex-wrap: nowrap;
  margin: 0 0 22px 0;
  justify-content: center;
  overflow-x: auto;
}
.case-info-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px #1976d220;
  padding: 22px 38px 16px 38px;
  min-width: 170px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 21px;
  border: 2px solid #e3f2fd;
  margin-bottom: 0;
  transition: box-shadow 0.2s, border 0.2s;
}
.case-info-card .label {
  color: #1976d2;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 7px;
}
.case-info-card .value {
  color: #222;
  font-size: 28px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-info-card.bmi {
  background: #fff3e0;
  color: #f57c00;
  border: 2px solid #ffe0b2;
}
.case-info-card.bmi .value {
  color: #f57c00;
}
.case-info-card.bmi .bmi-status {
  font-size: 13px;
  color: #f57c00;
  font-weight: bold;
  margin-top: 0;
}

/* تخصيص نافذة المودال لتعديل الحالة */
.edit-case-modal {
  max-width: 540px !important;
}
.edit-case-modal .modal-content {
  border-radius: 14px !important;
  box-shadow: 0 4px 24px #1976d230 !important;
  min-width: 400px !important;
}
.edit-case-modal .modal-header {
  background: linear-gradient(90deg,#1976d2 70%,#64b5f6 100%) !important;
  border-radius: 13px 13px 0 0 !important;
}
.edit-case-modal .modal-title {
  font-size: 1.4rem !important;
  letter-spacing: 0.5px !important;
}
.edit-case-modal .modal-body {
  padding: 2.2rem 2.7rem 1.7rem 2.7rem !important;
  background: #f7faff !important;
  font-size: 1.18rem !important;
}
.edit-case-modal .form-label,
.edit-case-modal label {
  font-size: 1.15rem !important;
  font-weight: bold !important;
}
.edit-case-modal .form-control,
.edit-case-modal .form-select {
  font-size: 1.25rem !important;
  height: 54px !important;
  line-height: 1.6 !important;
  padding: 12px 18px !important;
  border-radius: 10px !important;
  margin-bottom: 22px !important;
  min-width: 220px !important;
}
.edit-case-modal .modal-footer {
  background: #f7faff !important;
  border-radius: 0 0 13px 13px !important;
}
.edit-case-modal .btn {
  font-size: 1.18rem !important;
  height: 48px !important;
  font-weight: bold !important;
}
.edit-case-modal .btn-secondary {
  font-size: 1.09rem !important;
  height: 44px !important;
}

/* مربع البحث في إدارة المستخدمين */
.admin-search-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  direction: rtl;
  margin-bottom: 1.2rem;
}
.admin-search-input {
  border-radius: 0 12px 12px 0;
  font-size: 1.15rem;
  height: 44px;
  text-align: right;
  direction: rtl;
  width: 320px;
  border: 1px solid #ccc;
}
.admin-search-btn {
  border-radius: 12px 0 0 12px;
  width: 100px;
  font-size: 1rem;
  height: 44px;
  background: #007bff;
  border: none;
  margin-right: -1px;
}

.card.mb-4 form.row.g-3 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: end;
    justify-content: center;
}
.card.mb-4 .col-md-3, .card.mb-4 .col-md-2 {
    min-width: 180px;
    margin-bottom: 0;
}
@media (max-width: 900px) {
    .card.mb-4 form.row.g-3 {
        flex-wrap: wrap;
    }
    .card.mb-4 .col-md-3, .card.mb-4 .col-md-2 {
        min-width: 100%;
    }
}
