/* 🎨 الإعدادات العامة */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 20px;
  background: #f0f4f7;
  font-family: 'Poppins', sans-serif;
  color: #333;
}

/* 🧱 الحاوية الأساسية */
.container {
  max-width: 900px;
  margin: auto;
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* 🏷️ العناوين */
h1 {
  text-align: center;
  font-size: 28px;
  color: #00796b;
  margin-bottom: 30px;
}

/* 🧾 النموذج */
form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 25px 0;
}

form input,
form button {
  flex: 1 1 200px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
  transition: all 0.3s ease;
}

/* ✨ تركيز جميل على الخانات */
form input:focus {
  border-color: #00a86b;
  box-shadow: 0 0 4px rgba(0,168,107,0.3);
  outline: none;
}

/* 🔘 الزر */
form button {
  background: linear-gradient(135deg, #00a86b, #00796b);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

form button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* ⚠️ الأخطاء */
.error {
  color: red;
  text-align: center;
  margin-bottom: 20px;
}

/* 👤 معلومات الطالب */
.student-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.student-info img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ccc;
}

.student-info div {
  flex: 1 1 250px;
  font-size: 16px;
}

/* 🧭 حالة المعالجة */
.status-section { text-align: center; }

.status-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  position: relative;
  margin: 40px 0;
}

.status-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 4px;
  background: #ddd;
  z-index: 1;
  transform: translateY(-50%);
}

.step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1 1 100px;
  min-width: 90px;
}

.step .circle {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  background: #ccc;
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  font-size: 13px;
  padding: 8px;
  white-space: normal;
}

.step.done .circle { background: #00c853; }
.step.active .circle {
  background: #00a86b;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,168,107,0.7); }
  70% { box-shadow: 0 0 15px 15px rgba(0,168,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,168,107,0); }
}

/* 📘 الأقسام الإضافية */
.current-status, .section {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 15px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-top: 25px;
  font-size: 16px;
}

.section textarea {
  width: 100%;
  height: 90px;
  font-size: 15px;
  padding: 12px;
  border-radius: 8px;
  background: #f8f8f8;
  border: none;
  resize: none;
  outline: none;
}

/* 📱 تجاوب الهاتف */
@media (max-width: 768px) {
  body { padding: 10px; }
  .container { padding: 20px; }
  form { flex-direction: column; align-items: center; gap: 8px; }
  form input, form button {
    width: 80%;
    max-width: 320px;
    padding: 8px 10px;
    font-size: 14px;
  }
  form button {
    border-radius: 10px;
    font-size: 15px;
    padding: 9px 12px;
  }
  .student-info { flex-direction: column; }
  .status-steps { flex-direction: column; align-items: center; }
  .status-steps::before {
    top: auto;
    left: 50%;
    width: 4px;
    height: 90%;
    transform: translateX(-50%);
  }
  .step { margin: 15px 0; }
  .circle {
    width: 80px !important;
    height: 80px !important;
    font-size: 12px !important;
  }
  h1 { font-size: 22px; }
  .section textarea { height: 110px; }
}

/* 📱 الهواتف الصغيرة جداً */
@media (max-width: 400px) {
  form input, form button {
    width: 85%;
    padding: 7px 9px;
    font-size: 13.5px;
  }
}

/* 🩺 إصلاح نهائي لحجم الحقول على الهاتف */
@media (max-width: 768px) {
  form input,
  form button {
    flex: none !important;  /* ✅ تعطيل التمدد التلقائي */
    height: 36px !important; /* ✅ ضبط الطول الحقيقي */
    padding: 6px 10px;
    font-size: 14px;
  }

  form button {
    height: 40px !important;
  }
}


/* 📂 شبكة الوثائق */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

/* بطاقة كل وثيقة */
.doc-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    padding: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

/* تأثير عند المرور */
.doc-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* عنوان الوثيقة */
.doc-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

/* صور الوثائق */
.doc-img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: transform 0.3s, filter 0.3s;
}

.doc-img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* PDF مدمج */
.doc-pdf {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 8px;
}

/* أزرار التحميل والحذف */
.download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #00a86b, #00796b);
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.download-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* زر الحذف */
.doc-item a.delete-btn {
    display: inline-block;
    background: #e53935;
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
    margin-left: 4px;
    transition: all 0.3s;
}

.doc-item a.delete-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* تجاوب الشبكة */
@media (max-width: 768px) {
    .docs-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .docs-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
}
/* ===== Grid layout ===== */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.grid div {
    flex: 1;
    min-width: 220px;
}
label {
    font-weight: 600;
    color: black;
    font-size: 0.9rem;
}
.value {
    color: black;
    font-weight: 500;
    font-size: 0.95rem;
}



.field {
  position: relative;
  width: 90%;
  max-width: 350px;
  margin: 10px auto;
}

.field input {
  width: 100%;
  padding: 12px 10px 12px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  background: #fff;
  transition: border-color 0.3s ease;
}

.field input:focus {
  border-color: #00a86b;
  box-shadow: 0 0 4px rgba(0,168,107,0.2);
}

.field label {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #888;
  font-size: 14px;
  pointer-events: none;
  transition: all 0.2s ease;
  background: #fff;
  padding: 0 4px;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: -8px;
  left: 10px;
  font-size: 12px;
  color: #00a86b;
}

@media (max-width: 480px) {
  .field input {
    padding: 10px;
    font-size: 14px;
  }
  .field label {
    font-size: 13px;
  }
}

.status-steps {
    display: flex;
    gap: 10px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-weight: bold;
    color: #fff;
}

/* تأثير الخط على المربع الملغى */
.cancelled .circle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 2px;
    background: #fff;
    transform: rotate(-45deg);
}