/* تنسيقات صفحة المستندات */

#documents {
  padding: 20px;
}

.documents-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.documents-filter select {
  padding: 8px 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  background-color: var(--white);
  font-size: 14px;
  min-width: 180px;
}

/* تنسيق بطاقات المستندات */
.document-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.document-card {
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.document-card:hover {
  
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.document-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--primary-color);
}

.document-icon {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.document-info {
  flex-grow: 1;
}

.document-info h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.document-info p {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.document-info small {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 5px;
}

.document-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.document-actions i {
  font-size: 16px;
  margin-right: 15px;
  cursor: pointer;
  transition: color 0.2s;
  color: var(--text-secondary);
}

.document-actions i:last-child {
  margin-right: 0;
}

.document-actions i.fa-download:hover {
  color: var(--primary-color);
}

.document-actions i.fa-trash:hover {
  color: var(--danger);
}

/* تنسيق حالة عدم وجود مستندات */
.no-documents {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.no-documents i {
  font-size: 60px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.no-documents p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.no-documents button {
  margin-top: 10px;
}

/* تنسيق مؤشر التحميل */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
}

.loading-indicator .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(142, 68, 173, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* تنسيق نموذج رفع المستندات */
.document-form {
  padding: 10px;
}

.document-form .form-group {
  margin-bottom: 20px;
}

.document-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

.document-form input[type="text"],
.document-form select {
  width: 100%;
  padding: 10px 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  font-size: 14px;
}

.document-form input[type="file"] {
  width: 100%;
  padding: 10px 0;
  font-size: 14px;
}

.file-info {
  margin-top: 10px;
  padding: 10px;
  background-color: var(--light-bg);
  border-radius: 5px;
  font-size: 14px;
}

.upload-progress {
  margin: 15px 0;
}

.progress-bar {
  height: 10px;
  background-color: var(--border-light);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 5px;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* تنسيقات للأجهزة المحمولة */
@media (max-width: 768px) {
  .documents-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .document-cards {
    grid-template-columns: 1fr;
  }
}