/* Tasks list inside ACF modal */
.tasks-list { display: flex; flex-direction: column; gap: 10px; }
.task-item { padding: 10px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; }
.tasks-block { display: flex; flex-direction: column; gap: 12px; }
.tasks-controls { display: flex; justify-content: flex-start; }
.tasks-controls .task-add-btn { padding: 8px 12px; border-radius: var(--radius-md); border: 1px solid transparent; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.tasks-controls .task-add-btn i { font-size: 14px; }
.task-add-form { padding: 12px; border: 1px dashed #cbd5e1; background: #f8fafc; border-radius: 10px; }
.task-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.task-form-grid .field { display: flex; flex-direction: column; gap: 6px; }
.task-form-grid .field.full { grid-column: 1 / -1; }
.task-form-grid label { font-size: 12px; color: #374151; }
.task-form-grid input, .task-form-grid textarea, .task-form-grid select { font: inherit; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: var(--radius-md); background: #fff; color: #111827; }
.task-form-grid select.admin-users-select { 
    cursor: pointer; 
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-left: 30px;
}
.task-form-grid select.admin-users-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.task-form-actions { display: flex; gap: 8px; justify-content: flex-start; margin-top: 6px; }
.task-form-actions .btn { padding: 8px 12px; border-radius: var(--radius-md); border: 1px solid #e5e7eb; background: #fff; color: #111827; cursor: pointer; }
.empty-tasks { color: #6b7280; font-size: 13px; background: #f3f4f6; border: 1px dashed #e5e7eb; border-radius: 10px; padding: 10px; text-align: center; }
.task-row-1 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.task-name { font-weight: 700; }
.task-type.tag { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.task-row-2 { display: flex; flex-wrap: wrap; gap: 10px; color: #475569; font-size: 13px; }
.task-row-2 .task-meta i { margin-inline-end: 6px; color: #64748b; }
.task-note { margin-top: 6px; font-size: 12px; color: #6b7280; }
/* Client Profile Modal base styles */
.client-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: stretch;
  justify-content: center;
  z-index: 9999;
  padding: 0;
}

.client-modal.show { display: flex; }

.client-modal-content {
  position: absolute;
  width: 92vw;
  height: 88vh;
  max-width: 1400px;
  max-height: 92vh;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.client-modal-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1f2937 55%, #0f172a 100%);
  color: #ffffff;
  cursor: grab;
  user-select: none;
}

.client-modal-header:active {
  cursor: grabbing;
}

/* ===== التصميم الجديد للشريط العلوي ===== */
.client-header-redesigned {
  display: flex;
  align-items: center;
  gap: 20px;
  pointer-events: none;
}

.client-header-redesigned > * {
  pointer-events: auto;
}

/* صورة العميل */
.client-header-redesigned .client-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  flex-shrink: 0;
}

.client-header-redesigned .client-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(148,163,184,0.05) 100%);
  opacity: 0.75;
}

.client-header-redesigned .client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.client-header-redesigned .client-avatar img[hidden] {
  display: none;
}

.client-header-redesigned .client-avatar-initials {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  color: #f8fafc;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* اسم العميل */
.client-name-section {
  flex: 0 0 auto;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.client-name-section .client-modal-title {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.client-file-number {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.85);
  font-weight: 500;
  position: relative;
}

.client-file-number i {
  color: #93c5fd;
  font-size: 14px;
}

.client-file-number strong {
  color: #dbeafe;
  font-weight: 700;
  font-size: 14px;
}

/* File Number Editing */
.client-file-number .file-number-display {
  transition: all 0.3s ease;
}

.client-file-number .file-number-input {
  padding: 4px 8px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
  min-width: 100px;
  transition: all 0.3s ease;
  outline: none;
}

.client-file-number .file-number-input:focus {
  border-color: #667eea;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edit-file-number-btn,
.save-file-number-btn,
.cancel-file-number-btn {
  padding: 4px 8px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  color: #93c5fd;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
}

.edit-file-number-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  color: #667eea;
}

.save-file-number-btn {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.save-file-number-btn:hover {
  background: rgba(34, 197, 94, 0.3);
  border-color: #22c55e;
  color: #22c55e;
}

.cancel-file-number-btn {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.cancel-file-number-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ef4444;
}

/* نسبة الإكمال */
.client-completion-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.client-completion-section .client-completion-big {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: #f8fafc;
  line-height: 1;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
  min-width: 85px;
  text-align: center;
}

.client-completion-section .client-completion-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-completion-section .client-completion-indicator .progress-ring {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: conic-gradient(#22c55e 0deg, rgba(148, 163, 184, 0.4) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.client-completion-section .client-completion-indicator .progress-ring::after {
  content: '';
  position: absolute;
  inset: 6px;
  background: rgba(17, 24, 39, 0.9);
  border-radius: 50%;
  z-index: 0;
}

.client-completion-section .client-completion-indicator .progress-ring-value {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
}

.client-completion-section .client-completion-indicator .progress-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-completion-section .client-completion-indicator .progress-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

.client-completion-section .client-completion-indicator .progress-details {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.85);
}

/* المساهمون */
.client-contributors-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.12) 0%, rgba(79, 70, 229, 0.1) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex: 1 1 auto;
  min-width: 0;
}

.client-contributors-section .contributors-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
}

.client-contributors-section .contributors-label i {
  color: #fbbf24;
  font-size: 14px;
}

.client-contributors-section .contributors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.client-contributors-section .contributor-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: all 0.2s ease;
  cursor: pointer;
}

.client-contributors-section .contributor-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 1);
}

.client-contributors-section .contributor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.client-contributors-section .contributor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-contributors-section .contributor-initials {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.client-contributors-section .contributor-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.client-contributors-section .contributor-name {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-contributors-section .contributor-percent {
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
}

.client-contributors-section .contributor-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.client-contributors-section .contributors-empty {
  display: none;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.6);
  text-align: center;
}

.client-contributors-section.is-empty .contributors-empty {
  display: block;
}

.client-contributors-section.is-empty .contributors-list {
  display: none;
}

/* أزرار التعديل والحفظ */
.client-actions-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-right: auto;
}

.client-actions-section .client-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.client-actions-section .client-header-btn.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
  border-color: rgba(255, 255, 255, 0.15);
}

.client-actions-section .client-header-btn.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.client-actions-section .client-header-btn:hover:not([disabled]) {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.client-actions-section .client-header-btn.btn-primary:hover:not([disabled]) {
  background: linear-gradient(135deg, #1d4ed8 0%, #3730a3 100%);
}

.client-actions-section .client-header-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.client-actions-section .client-header-btn i {
  font-size: 13px;
}

.client-actions-section .client-modal-btn.close {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.client-actions-section .client-modal-btn.close:hover {
  background: rgba(248, 113, 113, 0.25);
  color: #fee2e2;
  transform: translateY(-2px);
}

.client-actions-section .client-modal-btn.close i {
  font-size: 16px;
}

/* Responsive Design للشريط العلوي الجديد */
@media (max-width: 1200px) {
  .client-header-redesigned {
    gap: 14px;
  }

  .client-completion-section {
    padding: 8px 14px;
    gap: 12px;
  }

  .client-completion-section .client-completion-big {
    font-size: clamp(28px, 3.5vw, 40px);
    min-width: 70px;
  }
}

@media (max-width: 900px) {
  .client-header-redesigned {
    flex-wrap: wrap;
    gap: 12px;
  }

  .client-name-section {
    flex: 1 1 auto;
    min-width: 140px;
  }

  .client-completion-section {
    order: 3;
    flex: 1 1 100%;
  }

  .client-contributors-section {
    order: 4;
    flex: 1 1 100%;
  }

  .client-actions-section {
    order: 5;
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  .client-modal-header {
    padding: 16px;
  }

  .client-header-redesigned {
    gap: 10px;
  }

  .client-header-redesigned .client-avatar {
    width: 52px;
    height: 52px;
  }

  .client-name-section .client-modal-title {
    font-size: 18px;
  }

  .client-completion-section .client-completion-big {
    font-size: 28px;
  }

  .client-actions-section {
    flex-wrap: wrap;
  }

  .client-actions-section .client-header-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.client-modal-title {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.05;
}

.client-header-main {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(220px, 1.05fr) minmax(0, 1.5fr);
  align-items: stretch;
  gap: 20px;
  pointer-events: none;
}

.client-header-main > * {
  min-width: 0;
  pointer-events: auto;
}

.client-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.client-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  flex-shrink: 0;
}

.client-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(148,163,184,0.05) 100%);
  opacity: 0.75;
}

.client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.client-avatar img[hidden] {
  display: none;
}

.client-avatar-initials {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: #f8fafc;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


.client-name-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.client-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.client-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.client-file-badge i {
  color: #93c5fd;
  font-size: 14px;
}

.client-file-badge strong {
  color: #ffffff;
  font-weight: 700;
}

.client-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.client-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 12px;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.4;
}

.client-meta-chip i {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

.client-meta-chip .label {
  color: rgba(203, 213, 225, 0.85);
}

.client-meta-chip strong {
  font-size: 12px;
  color: #f8fafc;
  font-weight: 700;
}

.client-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.35);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  line-height: 1.4;
}

.client-meta-item i {
  color: rgba(148, 163, 184, 0.9);
}

.client-meta-item strong {
  color: #f8fafc;
  font-weight: 700;
  font-size: 13px;
}

.client-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(15, 23, 42, 0.35);
  border-radius: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.client-header-center .client-completion-indicator {
  flex: 0 0 auto;
}

.client-header-center .completion-texts {
  align-items: flex-start;
}

.client-completion-text {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.85);
}

.client-completion-big {
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 800;
  color: #f8fafc;
  line-height: 1;
  letter-spacing: 0.6px;
  text-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

.completion-texts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  min-width: 120px;
}

.client-header-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.client-header-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-custody-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.client-custody-status i {
  font-size: 13px;
}

.client-custody-status.is-available {
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.4);
}

.client-custody-status.is-owned {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
}

.client-custody-status.is-mine {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.45);
}

.client-header-topline .client-modal-btn.close {
  position: relative;
  inset: auto;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
  padding: 6px;
  border-radius: 10px;
  transition: all 0.25s ease;
}

.client-header-topline .client-modal-btn.close:hover {
  background: rgba(248, 113, 113, 0.22);
  color: #fee2e2;
}

.client-top-contributors {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.12) 0%, rgba(79, 70, 229, 0.1) 100%);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
}

.client-top-contributors .contributors-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.2px;
}

.client-top-contributors .contributors-label i {
  color: #fbbf24;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.35));
}

.client-top-contributors .contributors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.client-top-contributors .contributor-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.client-top-contributors .contributor-chip i {
  color: #6366f1;
}

.client-top-contributors .contributors-empty {
  display: none;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.75);
}

.client-top-contributors.is-empty .contributors-empty {
  display: block;
}

.client-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.client-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.client-header-btn.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
  border-color: rgba(255, 255, 255, 0.15);
}

.client-header-btn.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.client-header-btn:hover:not([disabled]) {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.client-header-btn.btn-primary:hover:not([disabled]) {
  background: linear-gradient(135deg, #1d4ed8 0%, #3730a3 100%);
}

.client-header-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.client-modal-header button {
  pointer-events: auto;
}

.client-modal-header button i {
  font-size: 14px;
}

.client-header-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-subtab-row {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.client-subtab-row:has(.client-modal-tabs:empty) {
  display: none;
}

.client-modal-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  direction: rtl;
}

.client-modal-tabs::-webkit-scrollbar { 
  height: 4px;
}

.client-modal-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.client-modal-tabs::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.client-modal-tabs::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.client-modal-tabs:empty {
  display: none;
}

@media (max-width: 1400px) {
  .client-header-main {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
  }

  .client-header-right {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    flex-direction: row;
    align-items: stretch;
  }

  .client-top-contributors {
    flex: 1;
  }

  .client-header-actions {
    flex: 0 0 auto;
    justify-content: flex-start;
    align-items: flex-start;
  }
}

@media (max-width: 1080px) {
  .client-header-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .client-header-progress {
    justify-content: flex-start;
  }

  .client-header-right {
    flex-direction: column;
  }

  .client-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .client-modal-header {
    padding: 16px 16px 12px;
  }

  .client-header-main {
    gap: 16px;
  }

  .client-avatar {
    width: 56px;
    height: 56px;
  }

  .client-header-center {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
  }

  .client-header-progress {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .completion-texts {
    align-items: flex-start;
  }

  .client-header-topline {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .client-custody-status {
    justify-content: center;
  }

  .client-header-topline .client-modal-btn.close {
    align-self: flex-end;
  }

  .client-top-contributors {
    padding: 12px;
  }

  .client-header-actions {
    gap: 8px;
  }

  .client-header-btn {
    width: 100%;
    justify-content: center;
  }
}

.client-completion-indicator {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.35);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, background 0.3s ease;
  min-width: 180px;
}

.client-completion-indicator .progress-ring {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(#22c55e 0deg, rgba(148, 163, 184, 0.4) 0deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  overflow: hidden;
}

.client-completion-indicator .progress-ring::after {
  content: '';
  position: absolute;
  inset: 7px;
  background: rgba(17, 24, 39, 0.9);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 0;
}

.client-completion-indicator .progress-ring-value {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.client-completion-indicator .progress-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.client-completion-indicator .progress-label {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.85);
}

.client-completion-indicator .progress-details {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.95);
}

.client-completion-indicator.is-loading .progress-ring-value {
  font-style: italic;
  color: rgba(248, 250, 252, 0.75);
}

.client-completion-indicator.is-loading .progress-details {
  color: rgba(148, 163, 184, 0.7);
}

.client-completion-indicator.is-empty .progress-ring-value {
  color: rgba(248, 250, 252, 0.75);
}

.client-modal.show .client-completion-indicator:hover {
  transform: translateY(-2px);
  background: rgba(15, 23, 42, 0.45);
}

/* ==== Field header/label with icons inside client modal ==== */
.acf-field .field-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acf-field .field-label { font-weight: 600; color: var(--text-primary, #1f2937); display: inline-flex; align-items: center; gap: 8px; }
.acf-field .field-label > i { color: var(--text-secondary, #6b7280); font-size: 0.95em; }
.acf-field .badge-readonly { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; padding: 2px 6px; border-radius: 6px; font-size: 11px; }

.client-completion-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.35);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, background 0.3s ease;
  min-width: 150px;
}

.client-completion-indicator .progress-ring {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(#22c55e 0deg, rgba(148, 163, 184, 0.4) 0deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  overflow: hidden;
}

/* Compact indicator for tighter spaces */
.client-completion-indicator.compact {
  gap: 8px;
  padding: 4px 8px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.client-completion-indicator.compact .progress-ring { width: 38px; height: 38px; }
.client-completion-indicator.compact .progress-ring::after { inset: 6px; }
.client-completion-indicator.compact .progress-label { display: none; }
.client-completion-indicator.compact .progress-details { display: none; }

/* Buttons in header */
.client-modal-btn {
  background: transparent;
  border: none;
  color: #e5e7eb;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}
.client-modal-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.client-modal-btn.close { color: #fca5a5; }
.client-modal-btn.close:hover { background: rgba(252,165,165,0.15); color: #fecaca; }

.client-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 65%);
  display: flex;
  flex-direction: column;
}

/* Appeals table (الطعون) inside ACF fields */
.appeals-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 8px;
}
.appeals-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e5e7eb;
}
.appeals-table th,
.appeals-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: right;
  font-size: 13px;
}
.appeals-table thead th {
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
}
.appeals-table tbody tr:nth-child(even) {
  background: #fafafa;
}
.empty-appeals {
  color: #6b7280;
}

.client-modal-action {
  background: #e5e7eb;
  color: #111827;
  border: 1px solid #d1d5db;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.client-modal-action.btn-primary { background: #2563eb; border-color: #1d4ed8; color: #fff; }
.client-modal-action.btn-primary:hover { background: #1d4ed8; }
.client-modal-action.btn-danger { background: #dc2626; border-color: #b91c1c; color: #fff; }
.client-modal-action.btn-danger:hover { background: #b91c1c; }

/* زر الدردشة الذكية - نمط WhatsApp */
.client-modal-action.btn-chat {
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
  border-color: #128C7E;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.client-modal-action.btn-chat::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.client-modal-action.btn-chat:hover {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  box-shadow: 0 4px 12px rgba(18, 140, 126, 0.4);
  transform: translateY(-2px);
}

.client-modal-action.btn-chat:hover::before {
  width: 300px;
  height: 300px;
}

.client-modal-action.btn-chat:active {
  transform: translateY(0);
}

.client-modal-action.btn-chat i {
  margin-left: 6px;
  font-size: 16px;
}

/* ===== حقل الكتابة السريع للمساعد الذكي في Footer ===== */
.ai-chat-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 400px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: 24px;
  padding: 0 16px;
  margin-right: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.ai-chat-input-wrapper:hover {
  border-color: #4ade80;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.ai-chat-input-wrapper:focus-within {
  border-color: #22c55e;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}

.ai-chat-icon {
  color: #16a34a;
  font-size: 18px;
  margin-left: 8px;
  transition: all 0.3s ease;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.ai-chat-input-wrapper:focus-within .ai-chat-icon {
  color: #15803d;
  animation: none;
  transform: scale(1.15);
}

.ai-chat-quick-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px;
  font-size: 14px;
  color: #1f2937;
  outline: none;
  font-family: inherit;
}

.ai-chat-quick-input::placeholder {
  color: #16a34a;
  opacity: 0.6;
  font-style: italic;
}

.ai-chat-quick-input:focus::placeholder {
  opacity: 0.4;
}

.ai-chat-send-icon {
  color: #16a34a;
  font-size: 16px;
  margin-right: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 6px;
  border-radius: 50%;
}

.ai-chat-send-icon:hover {
  color: #15803d;
  background: rgba(22, 163, 74, 0.1);
  transform: scale(1.15);
}

.ai-chat-send-icon:active {
  transform: scale(0.95);
}

/* تأثير عند وجود نص في الحقل */
.ai-chat-input-wrapper.has-text {
  border-color: #22c55e;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.ai-chat-input-wrapper.has-text .ai-chat-send-icon {
  color: #15803d;
  background: rgba(22, 163, 74, 0.15);
}


/* States */
.client-modal-content.maximized {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh; /* dynamic viewport to avoid mobile URL bar issues */
  max-width: 100vw;
  max-height: 100dvh;
  top: 0;
  left: 0;
  transform: none;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.client-modal-content.minimized {
  width: 340px;
  height: auto;
  top: auto;
  left: auto;
  right: 16px;
  bottom: 16px;
  transform: none;
  border-radius: 12px;
}

/* Loading state */
.client-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #6b7280;
}
.client-modal-loading .spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: clientModalSpin 1s linear infinite;
}
@keyframes clientModalSpin { to { transform: rotate(360deg); } }

/* ---------- Docs: PDF badge + loading shimmer ---------- */
.doc-thumb { position: relative; overflow: hidden; }
.doc-thumb.is-pdf .pdf-placeholder { 
  display: flex; align-items: center; justify-content: center; gap: 6px; 
  width: 100%; height: 100%; color: #9ca3af; background: #f3f4f6; 
  font-size: 12px; border-radius: var(--radius-md); 
}
.doc-thumb.is-pdf .pdf-placeholder i { color: #ef4444; }
.doc-thumb .pdf-badge { 
  position: absolute; top: 6px; left: 6px; 
  background: rgba(239, 68, 68, 0.92); color: #fff; 
  padding: 2px 6px; font-size: 11px; border-radius: 6px; 
  box-shadow: 0 1px 2px rgba(0,0,0,0.15); letter-spacing: .3px; 
}
.doc-thumb .pdf-shimmer::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-md);
  background: linear-gradient(100deg, rgba(255,255,255,0.0) 20%, rgba(255,255,255,0.35) 40%, rgba(255,255,255,0.0) 60%);
  transform: translateX(-100%);
  animation: pdfShimmer 1.2s ease-in-out infinite;
}
@keyframes pdfShimmer { to { transform: translateX(100%); } }

/* Expired styling (ensure stays above) */
.doc-card.is-expired { 
  border: 1px solid #fecaca; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(239,68,68,.08); 
}
.doc-card.is-expired .doc-thumb { filter: grayscale(.25) brightness(.92); }
.doc-expired-note { 
  display: flex; align-items: center; gap: 6px; 
  margin-top: 6px; padding: 6px 8px; font-size: 12px; color: #991b1b; 
  background: #fff1f2; border: 1px solid #fecaca; border-radius: var(--radius-md); 
}
.doc-expired-note i { color: #ef4444; }
/* Dark mode adjustments */
html.dark .doc-card.is-expired { border-color: rgba(239,68,68,0.45); box-shadow: inset 0 0 0 2px rgba(239,68,68,.12); }
html.dark .doc-card.is-expired .doc-thumb { filter: grayscale(.3) brightness(.85); }
html.dark .doc-expired-note { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.35); color: #fecaca; }

/* Name cell small icon */
.client-name-with-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.client-name-core {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.client-modal-tabs .acf-tab-nav--header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  flex-wrap: nowrap;
  direction: rtl;
  width: auto;
  min-width: max-content;
}

.client-modal-tabs .acf-tab-nav--header .acf-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
  text-align: center;
  line-height: 1.3;
  flex: 0 0 auto;
  min-width: auto;
}

.client-modal-tabs .acf-tab-nav--header .acf-tab-btn i {
  font-size: 12px;
  color: #1e40af;
}

.client-modal-tabs .acf-tab-nav--header .acf-tab-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
  transform: translateY(-1px) scale(1.02);
}

.client-modal-tabs .acf-tab-nav--header .acf-tab-btn:hover i {
  color: #1e3a8a;
}

.client-modal-tabs .acf-tab-nav--header .acf-tab-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.client-modal-tabs .acf-tab-nav--header .acf-tab-btn.active i {
  color: #ffffff;
}

/* Client subtabs (beside title) */
.client-subtabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.client-subtab-btn {
  flex: 0 0 auto;
  min-width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(226, 232, 240, 0.92);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.client-subtab-btn i { font-size: 13px; }
.client-subtab-btn:hover { background: rgba(255, 255, 255, 0.22); color: #ffffff; transform: translateY(-1px); }
.client-subtab-btn.is-active { background: #f8fafc; color: #0f172a; border-color: transparent; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.32); }

/* Dark mode for client subtabs */
body.dark-mode .client-subtab-btn {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.92);
}
body.dark-mode .client-subtab-btn:hover { background: rgba(148, 163, 184, 0.22); color: #ffffff; }
body.dark-mode .client-subtab-btn.is-active { background: #e2e8f0; color: #0f172a; }

body.dark-mode .client-subtab-row {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.78) 100%);
  border-bottom-color: rgba(148, 163, 184, 0.25);
}

body.dark-mode .client-modal-tabs {
  scrollbar-width: thin;
}

body.dark-mode .client-modal-tabs::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.85);
}

body.dark-mode .client-modal-tabs::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
}

body.dark-mode .client-modal-tabs .acf-tab-nav--header .acf-tab-btn {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.85);
  color: rgba(226, 232, 240, 0.92);
}

body.dark-mode .client-modal-tabs .acf-tab-nav--header .acf-tab-btn i {
  color: rgba(129, 161, 255, 0.9);
}

body.dark-mode .client-modal-tabs .acf-tab-nav--header .acf-tab-btn:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(37, 99, 235, 0.45);
  color: #dbeafe;
}

body.dark-mode .client-modal-tabs .acf-tab-nav--header .acf-tab-btn:hover i {
  color: #dbeafe;
}

body.dark-mode .client-modal-tabs .acf-tab-nav--header .acf-tab-btn.active {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.55);
}

body.dark-mode .client-modal-tabs .acf-tab-nav--header .acf-tab-btn.active i {
  color: #ffffff;
}

/* Dark mode tweaks complementing dark-mode.css */
body.dark-mode .client-modal-footer { background: var(--dm-bg-elev-2); border-top-color: var(--dm-border); }
body.dark-mode .client-modal-action { background: var(--dm-bg-elev-3); color: var(--dm-text); border-color: var(--dm-border); }
body.dark-mode .client-modal-action.btn-primary { background: #1d4ed8; border-color: #1e40af; }
body.dark-mode .client-modal-action.btn-danger { background: #b91c1c; border-color: #991b1b; }
body.dark-mode .client-modal-action.btn-chat {
  background: linear-gradient(135deg, #0a5c52 0%, #053f3a 100%);
  border-color: #0a5c52;
}
body.dark-mode .client-modal-action.btn-chat:hover {
  background: linear-gradient(135deg, #053f3a 0%, #0a5c52 100%);
  box-shadow: 0 4px 12px rgba(10, 92, 82, 0.5);
}
body.dark-mode .client-modal-body { background: var(--dm-bg-elev-2); }
body.dark-mode .client-completion-indicator {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}
body.dark-mode .client-completion-indicator .progress-ring::after {
  background: rgba(17, 24, 39, 0.85);
}
body.dark-mode .client-completion-indicator .progress-details {
  color: rgba(186, 199, 216, 0.85);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .client-modal-content {
    width: 95%;
    height: 82vh;
  }
  .client-modal-heading { grid-template-columns: 1fr; grid-template-areas: 'title' 'right'; }
  .client-modal-heading .header-right-wrap { align-items: flex-start; }
  .client-modal-tabs {
    padding: 8px 12px;
  }
  .client-modal-tabs .acf-tab-nav--header {
    justify-content: flex-start;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .client-modal-content {
    width: 98%;
    height: 85vh;
  }
  .client-modal-tabs {
    padding: 8px 10px;
  }
}

/* ===== Documents cards grid inside Docs subtab ===== */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.doc-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc-card.is-expired { border-color: #fca5a5; box-shadow: 0 0 0 2px rgba(252,165,165,0.25) inset; }
.doc-card .doc-badge-top { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; }
.doc-card { position: relative; overflow: hidden; }
.doc-thumb { display: block; width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-md); overflow: hidden; background: #f1f5f9; border: 1px solid #e2e8f0; position: relative; }
.doc-card.is-expired .doc-thumb { filter: grayscale(0.2) brightness(0.95); }
.doc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.doc-thumb.is-pdf { background: #f8fafc; }
.doc-thumb.is-pdf .pdf-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #334155; font-weight: 700; }
.doc-thumb.is-pdf .pdf-placeholder i { color: #ef4444; }
.doc-thumb.pdf-render-failed { background: #fef2f2; }
.doc-thumb.placeholder { display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 36px; }
.doc-card-body { display: flex; flex-direction: column; gap: 8px; }
.doc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.doc-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #0f172a; }
.doc-title i { color: #64748b; }
.doc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; color: #475569; font-size: 13px; }
.doc-expired-note { display: inline-flex; align-items: center; gap: 8px; color: #991b1b; background: #fee2e2; border: 1px solid #fecaca; border-radius: var(--radius-md); padding: 4px 8px; font-size: 12px; width: fit-content; }
.doc-expired-note i { color: #ef4444; }
.doc-meta .doc-type, .doc-meta .doc-expiry, .doc-meta .doc-issue, .doc-meta .doc-file { display: inline-flex; align-items: center; gap: 6px; }
.doc-meta i { color: #64748b; }
.doc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid transparent; }
.doc-status-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.doc-status-warn { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.doc-status-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.doc-status-neutral { background: #e5e7eb; color: #111827; border-color: #d1d5db; }
.doc-actions { display: flex; justify-content: flex-end; }
.doc-open-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius-md); border: 1px solid #e5e7eb; color: #111827; background: #f8fafc; text-decoration: none; font-size: 12px; }
.doc-open-link:hover { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.docs-note { margin-top: 8px; font-size: 12px; color: #64748b; text-align: left; }
.docs-group { display: block; margin: 10px 0 16px; }
.docs-group-title { margin: 0 0 8px 0; font-size: 14px; font-weight: 800; color: #334155; display: inline-flex; align-items: center; gap: 8px; }

/* Special accent for tax card (document_type = بطاقة ضريبية) */
.doc-card.tax-card { border-color: #c7d2fe; box-shadow: 0 0 0 2px rgba(199,210,254,0.35) inset; }
.doc-card.tax-card .doc-title i { color: #3730a3; }
.doc-card.tax-card .doc-open-link:hover { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }

@media (max-width: 1100px) { .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .docs-grid { grid-template-columns: 1fr; } }

/* Dark mode for docs cards */
body.dark-mode .doc-card { background: var(--dm-bg-elev-1, #0b1220); border-color: var(--dm-border, #273247); }
body.dark-mode .doc-title { color: var(--dm-text, #e2e8f0); }
body.dark-mode .doc-title i { color: #94a3b8; }
body.dark-mode .doc-meta { color: var(--dm-text-muted, #b6c2d4); }
body.dark-mode .doc-open-link { background: var(--dm-bg-elev-2, #0e1627); color: var(--dm-text, #e2e8f0); border-color: var(--dm-border, #273247); }
body.dark-mode .doc-open-link:hover { background: rgba(148,163,184,0.15); border-color: rgba(148,163,184,0.3); color: #fff; }
body.dark-mode .doc-card.tax-card { border-color: rgba(199,210,254,0.35); box-shadow: 0 0 0 2px rgba(199,210,254,0.15) inset; }
body.dark-mode .doc-card.tax-card .doc-title i { color: #c7d2fe; }
body.dark-mode .doc-card.is-expired { border-color: rgba(252,165,165,0.6); box-shadow: 0 0 0 2px rgba(252,165,165,0.2) inset; }
.body.dark-mode .doc-card.is-expired .doc-thumb { filter: grayscale(0.25) brightness(0.9); }
.doc-thumb canvas { display: block; max-width: none; max-height: none; }
.doc-thumb.is-pdf .pdf-placeholder { color: #cbd5e1; }
.docs-group-title i { color: #64748b; }
body.dark-mode .docs-group-title { color: var(--dm-text, #e2e8f0); }
body.dark-mode .docs-group-title i { color: #94a3b8; }

/* ---- Global Documents tab: chips, group controls, title status pill ---- */
#Documents .doc-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
#Documents .chip { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:999px; font-size:12px; border:1px solid #e5e7eb; background:#f8fafc; color:#111827; }
#Documents .chip i { color:#64748b; }
#Documents .chip-client { background:#eef2ff; border-color:#e0e7ff; color:#3730a3; }
#Documents .chip-type { background:#ecfeff; border-color:#a5f3fc; color:#0e7490; }
#Documents .chip-status { background:#f1f5f9; border-color:#e2e8f0; color:#334155; }
#Documents .chip-success { background:#dcfce7; border-color:#bbf7d0; color:#166534; }
#Documents .chip-warn { background:#fef3c7; border-color:#fde68a; color:#92400e; }
#Documents .chip-danger { background:#fee2e2; border-color:#fecaca; color:#991b1b; }

#Documents .docs-group-title { cursor:pointer; user-select:none; }
#Documents .docs-group-title .group-count { font-weight:700; color:#64748b; }
#Documents .docs-group .group-more { display:flex; justify-content:center; margin:8px 0 2px; }
#Documents .docs-group .group-more .btn.load-more { padding:8px 12px; border-radius:8px; border:1px solid #e5e7eb; background:#ffffff; color:#111827; cursor:pointer; }
#Documents .docs-group .group-more .btn.load-more:hover { background:#f8fafc; }

/* Title status pill inside .doc-title */
#Documents .doc-title { gap:10px; flex-wrap:wrap; }
#Documents .title-status-pill { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:999px; font-size:11px; border:1px solid transparent; }
#Documents .title-status-pill.valid { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
#Documents .title-status-pill.soon { background:#fef3c7; color:#92400e; border-color:#fde68a; }
#Documents .title-status-pill.expired { background:#fee2e2; color:#991b1b; border-color:#fecaca; }

/* Generic title status pill (used in client modal too) */
.doc-title .title-status-pill { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:999px; font-size:11px; border:1px solid transparent; }
.doc-title .title-status-pill.valid { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.doc-title .title-status-pill.soon { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.doc-title .title-status-pill.expired { background:#fee2e2; color:#991b1b; border-color:#fecaca; }

/* Lightbox */
#docs-lightbox { position:fixed; inset:0; background:rgba(2,6,23,0.75); display:none; align-items:center; justify-content:center; z-index:99999; }
#docs-lightbox.show { display:flex; }
#docs-lightbox .dlb-content { position:relative; width:92vw; height:92vh; max-width:1200px; max-height:92vh; background:#0b1220; border:1px solid #273247; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,0.4); display:flex; align-items:center; justify-content:center; overflow:hidden; }
#docs-lightbox .dlb-close { position:absolute; top:8px; inset-inline-end:8px; background:rgba(255,255,255,0.1); color:#fff; border:none; width:36px; height:36px; border-radius:8px; cursor:pointer; font-size:20px; }
#docs-lightbox .dlb-frame { width:100%; height:100%; border:none; background:#111827; }
#docs-lightbox .dlb-img { max-width:100%; max-height:100%; object-fit:contain; }
html.dark #docs-lightbox .dlb-content { background:#0b1220; border-color:#273247; }
/* Lightbox footer */
#docs-lightbox .dlb-footer .dlb-open:hover { background:#111827; border-color:#334155; }
#docs-lightbox .dlb-footer .dlb-open i { opacity:.9; }

/* Statistics modal grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  min-height: 260px; /* ensure consistent vertical space */
  display: flex;
  flex-direction: column;
}
.stat-card h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #334155;
}
.stat-card canvas {
  flex: 0 0 auto; /* do not stretch with flex */
  height: 200px !important; /* fixed, consistent height per chart */
  max-height: 200px;
}

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* Statistics toolbar styles */
.stats-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.stats-toolbar .kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stats-toolbar .kpi-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
}
.stats-toolbar .kpi-label { font-size: 12px; color: #6b7280; }
.stats-toolbar .kpi-value { font-size: 22px; font-weight: 800; color: #0f172a; }
.stats-toolbar .kpi-delta { font-size: 12px; color: #64748b; }

.stats-toolbar .toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.stats-toolbar .active-filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.stats-toolbar .filter-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stats-toolbar .filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
}
.stats-toolbar .filter-chip .remove-chip {
  background: transparent; border: none; color: #64748b; cursor: pointer; padding: 0 2px;
}
.stats-toolbar .filter-chip .chip-count{
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 18px;
}
.stats-toolbar .compare-controls,
.stats-toolbar .export-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.stats-toolbar label { font-size: 12px; color: #334155; display: inline-flex; align-items: center; gap: 6px; }
.stats-toolbar select { padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: var(--radius-md); background: #fff; color: #111827; }
.stats-toolbar .checkbox-inline input { margin-left: 6px; }

@media (max-width: 900px) {
  .stats-toolbar .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .stats-toolbar .kpis { grid-template-columns: 1fr; }
}

/* Modal footer layout and actions */
.client-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}
.client-modal-footer .footer-left-actions,
.client-modal-footer .footer-right-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Hide delete by default; allow enabling via data-allow-delete="true" on modal */
.client-modal .client-modal-action.btn-danger.is-hidden-by-default { display: none !important; }
.client-modal[data-allow-delete="true"] .client-modal-action.btn-danger.is-hidden-by-default { display: inline-flex !important; }

/* Summary bar styling */
.client-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin: 4px 0 16px 0;
}
.client-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 80%);
  border: 1px solid #eef2f7;
  border-radius: 10px;
}
.client-summary-item .item-icon { color: #64748b; font-size: 16px; width: 22px; text-align: center; }
.client-summary-item .item-texts { display: flex; flex-direction: column; gap: 4px; }
.client-summary-item .item-label { font-size: 12px; color: #6b7280; }
.client-summary-item .item-value { font-size: 14px; color: #111827; font-weight: 600; }

@media (max-width: 1024px) {
  .client-summary-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .client-summary-bar { grid-template-columns: 1fr; }
}

/* ===== Prominent toolbar buttons (Stats Modal) ===== */
.stats-toolbar .active-filters-row button,
.stats-toolbar .toolbar-actions button,
.stats-toolbar .client-modal-action {
  --btn-bg: #0ea5e9; /* default cyan */
  --btn-bg-end: #0284c7;
  --btn-text: #ffffff;
  --btn-ring: rgba(14,165,233,0.45);
  appearance: none;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  color: var(--btn-text);
  background: linear-gradient(135deg, var(--btn-bg), var(--btn-bg-end));
  border-radius: 12px;
  box-shadow:
    0 10px 15px -3px rgba(2, 132, 199, 0.25),
    0 4px 6px -2px rgba(2, 132, 199, 0.15);
  transition: transform 120ms ease, box-shadow 200ms ease, filter 120ms ease;
}

.stats-toolbar .active-filters-row button:hover,
.stats-toolbar .toolbar-actions button:hover,
.stats-toolbar .client-modal-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 15px 25px -5px rgba(2, 132, 199, 0.35),
    0 10px 10px -5px rgba(2, 132, 199, 0.2);
}

.stats-toolbar .active-filters-row button:active,
.stats-toolbar .toolbar-actions button:active,
.stats-toolbar .client-modal-action:active {
  transform: translateY(0);
  box-shadow:
    0 8px 12px -5px rgba(2, 132, 199, 0.25),
    0 4px 6px -4px rgba(2, 132, 199, 0.18);
}

.stats-toolbar .active-filters-row button:focus-visible,
.stats-toolbar .toolbar-actions button:focus-visible,
.stats-toolbar .client-modal-action:focus-visible {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px var(--btn-ring),
    0 15px 25px -5px rgba(2, 132, 199, 0.35),
    0 10px 10px -5px rgba(2, 132, 199, 0.2);
}

.stats-toolbar .active-filters-row button:disabled,
.stats-toolbar .toolbar-actions button:disabled,
.stats-toolbar .client-modal-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

/* Themed buttons by id */
/* Reset filters: amber/orange */
#resetFiltersBtn {
  --btn-bg: #f59e0b;
  --btn-bg-end: #d97706;
  --btn-ring: rgba(245, 158, 11, 0.45);
}

/* Export PNG: blue */
#exportChartsPng {
  --btn-bg: #2563eb;
  --btn-bg-end: #1d4ed8;
  --btn-ring: rgba(37, 99, 235, 0.45);
}

/* Export PDF: red */
#exportChartsPdf {
  --btn-bg: #dc2626;
  --btn-bg-end: #b91c1c;
  --btn-ring: rgba(220, 38, 38, 0.45);
}

/* ===== Stats toolbar icon enhancements ===== */
.stats-toolbar .toolbar-actions button,
.stats-toolbar .active-filters-row button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Size and behavior for different icon types */
.stats-toolbar .toolbar-actions button > svg,
.stats-toolbar .active-filters-row button > svg { width: 22px; height: 22px; flex-shrink: 0; transition: transform 120ms ease, filter 150ms ease; }
.stats-toolbar .toolbar-actions button > i,
.stats-toolbar .active-filters-row button > i { font-size: 18px; line-height: 1; transition: transform 120ms ease, filter 150ms ease; }
.stats-toolbar .toolbar-actions button > img,
.stats-toolbar .active-filters-row button > img { height: 20px; width: auto; flex-shrink: 0; transition: transform 120ms ease, filter 150ms ease; }

/* Make inline SVGs inherit the button text color (currentColor) */
.stats-toolbar .toolbar-actions button svg path,
.stats-toolbar .toolbar-actions button svg circle,
.stats-toolbar .toolbar-actions button svg rect,
.stats-toolbar .toolbar-actions button svg polygon,
.stats-toolbar .toolbar-actions button svg line,
.stats-toolbar .toolbar-actions button svg polyline,
.stats-toolbar .active-filters-row button svg path,
.stats-toolbar .active-filters-row button svg circle,
.stats-toolbar .active-filters-row button svg rect,
.stats-toolbar .active-filters-row button svg polygon,
.stats-toolbar .active-filters-row button svg line,
.stats-toolbar .active-filters-row button svg polyline { fill: currentColor !important; stroke: currentColor !important; }

/* Hover/active visual effects for icons */
.stats-toolbar .toolbar-actions button:hover > svg,
.stats-toolbar .active-filters-row button:hover > svg,
.stats-toolbar .toolbar-actions button:hover > i,
.stats-toolbar .active-filters-row button:hover > i,
.stats-toolbar .toolbar-actions button:hover > img,
.stats-toolbar .active-filters-row button:hover > img { transform: translateY(-1px) scale(1.05); filter: drop-shadow(0 2px 6px rgba(255,255,255,0.25)); }

.stats-toolbar .toolbar-actions button:active > svg,
.stats-toolbar .active-filters-row button:active > svg,
.stats-toolbar .toolbar-actions button:active > i,
.stats-toolbar .active-filters-row button:active > i,
.stats-toolbar .toolbar-actions button:active > img,
.stats-toolbar .active-filters-row button:active > img { transform: none; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.15)); }

@media (prefers-reduced-motion: reduce) {
  .stats-toolbar .toolbar-actions button > svg,
  .stats-toolbar .active-filters-row button > svg,
  .stats-toolbar .toolbar-actions button > i,
  .stats-toolbar .active-filters-row button > i,
  .stats-toolbar .toolbar-actions button > img,
  .stats-toolbar .active-filters-row button > img { transition: none; }
}

/* ============================================
   Client Modal Tabs System
   ============================================ */

/* Tabs Wrapper */
.client-tabs-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Main Tab Navigation - All tabs in one row */
.client-tab-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.client-tab-nav::-webkit-scrollbar {
  height: 4px;
}

.client-tab-nav::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.client-tab-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.client-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
  position: relative;
  border-radius: var(--radius-md) 8px 0 0;
}

.client-tab-btn i {
  font-size: 17px;
  transition: transform 0.3s ease;
}

.client-tab-btn:hover {
  color: #334155;
  background: rgba(148, 163, 184, 0.08);
}

.client-tab-btn:hover i {
  transform: scale(1.1);
}

.client-tab-btn.active {
  color: #0f172a;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.client-tab-btn.active i {
  color: #3b82f6;
}

/* AI Tabs Styling (within same row) */
.client-tab-btn.client-ai-tab {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-bottom: 3px solid transparent;
}

.client-tab-btn.client-ai-tab i {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.client-tab-btn.client-ai-tab:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border-color: rgba(102, 126, 234, 0.4);
  color: #5a67d8;
}

.client-tab-btn.client-ai-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-color: #764ba2;
  border-bottom-color: #764ba2;
}

.client-tab-btn.client-ai-tab.active i {
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
}

/* Hide old AI sub-nav (deprecated) */
.client-ai-tab-nav {
  display: none !important;
}

/* Tab Content Area */
.client-tab-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  position: relative;
}

.client-tab-panel {
  display: none;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.client-tab-panel.active {
  display: block;
}

/* AI Tab Content Area */
.client-ai-tab-content {
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  min-height: 200px;
}

.client-ai-tab-panel {
  display: none;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.client-ai-tab-panel.active {
  display: block;
}

/* Tab Placeholder Content */
.tab-content-placeholder,
.ai-content-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
  color: #64748b;
}

.tab-content-placeholder i,
.ai-content-placeholder i {
  font-size: 64px;
  color: #cbd5e1;
  margin-bottom: 20px;
}

.ai-content-placeholder i.ai-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tab-content-placeholder h3,
.ai-content-placeholder h3 {
  font-size: 24px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 12px;
}

.tab-content-placeholder p,
.ai-content-placeholder p {
  font-size: 15px;
  color: #64748b;
  margin: 0;
  max-width: 500px;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode Support */
body.dark-mode .client-tab-nav {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-bottom-color: #334155;
}

body.dark-mode .client-tab-btn {
  color: #94a3b8;
}

body.dark-mode .client-tab-btn:hover {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
}

body.dark-mode .client-tab-btn.active {
  color: #e2e8f0;
  background: rgba(59, 130, 246, 0.15);
}

body.dark-mode .client-ai-tab-content {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-top-color: #334155;
}

body.dark-mode .tab-content-placeholder,
body.dark-mode .ai-content-placeholder {
  color: #94a3b8;
}

body.dark-mode .tab-content-placeholder i,
body.dark-mode .ai-content-placeholder i {
  color: #475569;
}

body.dark-mode .tab-content-placeholder h3,
body.dark-mode .ai-content-placeholder h3 {
  color: #cbd5e1;
}

body.dark-mode .tab-content-placeholder p,
body.dark-mode .ai-content-placeholder p {
  color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .client-tab-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .client-tab-btn i {
    font-size: 16px;
  }
  
  .client-ai-tab-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .client-ai-tab-btn i {
    font-size: 14px;
  }
  
  .tab-content-placeholder i,
  .ai-content-placeholder i {
    font-size: 48px;
  }
  
  .tab-content-placeholder h3,
  .ai-content-placeholder h3 {
    font-size: 20px;
  }
}

/* ===== Dark Mode Support for Task Forms ===== */
body.dark-mode .task-add-form {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .task-form-grid input,
body.dark-mode .task-form-grid textarea,
body.dark-mode .task-form-grid select {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .task-form-grid select.admin-users-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

body.dark-mode .task-form-grid label {
  color: #cbd5e1;
}

body.dark-mode .task-form-grid input:focus,
body.dark-mode .task-form-grid textarea:focus,
body.dark-mode .task-form-grid select:focus {
  border-color: #3b82f6;
  background: #0f172a;
}

body.dark-mode .task-item {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .empty-tasks {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

/* ========== Post List (Documents) Styling ========== */
.post-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.post-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
}

.post-list-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.post-list-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.post-list-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border-radius: 8px;
  color: #3b82f6;
  font-size: 24px;
}

.post-list-content {
  flex: 1;
  min-width: 0;
}

.post-list-title {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.post-list-title a {
  color: #111827;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-list-title a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.post-list-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.post-list-date i {
  font-size: 12px;
  color: #9ca3af;
}

.post-list-excerpt {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dark Mode Support */
body.dark-mode .post-list-empty {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .post-list-empty p {
  color: #64748b;
}

body.dark-mode .post-list-item {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .post-list-item:hover {
  border-color: #3b82f6;
  background: #0f172a;
}

body.dark-mode .post-list-icon {
  background: #1e3a5f;
  color: #60a5fa;
}

body.dark-mode .post-list-title a {
  color: #f1f5f9;
}

body.dark-mode .post-list-title a:hover {
  color: #60a5fa;
}

body.dark-mode .post-list-date,
body.dark-mode .post-list-excerpt {
  color: #94a3b8;
}

body.dark-mode .post-list-date i {
  color: #64748b;
}



/* ==================== Post List Styles (Documents) ==================== */
.post-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.post-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
}

.post-list-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.post-list-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.post-list-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #eef2ff;
  border-radius: 6px;
  color: #3b82f6;
  font-size: 20px;
  flex-shrink: 0;
}

.post-list-content {
  flex: 1;
  min-width: 0;
}

.post-list-title {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.post-list-title a {
  color: #111827;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-list-title a:hover {
  color: #3b82f6;
}

.post-list-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.post-list-date i {
  font-size: 11px;
}

.post-list-excerpt {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-top: 6px;
}

/* Dark Mode Support */
body.dark-mode .post-list-container {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .post-list-empty {
  background: #1e293b;
  border-color: #475569;
  color: #94a3b8;
}

body.dark-mode .post-list-item {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .post-list-item:hover {
  border-color: #3b82f6;
  background: #1e293b;
}

body.dark-mode .post-list-icon {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

body.dark-mode .post-list-title a {
  color: #f1f5f9;
}

body.dark-mode .post-list-title a:hover {
  color: #60a5fa;
}

body.dark-mode .post-list-date,
body.dark-mode .post-list-excerpt {
  color: #94a3b8;
}

/* WYSIWYG Editor Styles */
.wysiwyg-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wysiwyg-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  flex-wrap: wrap;
}

.wysiwyg-btn {
  padding: 6px 10px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  color: #374151;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.wysiwyg-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

.wysiwyg-btn:active {
  background: #e5e7eb;
  transform: scale(0.95);
}

.wysiwyg-btn i {
  font-size: 14px;
}

.wysiwyg-separator {
  width: 1px;
  height: 24px;
  background: #d1d5db;
  margin: 0 4px;
}

.wysiwyg-editor {
  outline: none;
}

.wysiwyg-editor:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Dark mode support */
body.dark-mode .wysiwyg-toolbar {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .wysiwyg-btn {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .wysiwyg-btn:hover {
  background: #334155;
  border-color: #475569;
  color: #f1f5f9;
}

body.dark-mode .wysiwyg-btn:active {
  background: #475569;
}

body.dark-mode .wysiwyg-separator {
  background: #475569;
}

body.dark-mode .wysiwyg-editor {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0;
}

body.dark-mode .wysiwyg-editor:focus {
  border-color: #3b82f6 !important;
}

/* WYSIWYG Display Value Styles */
.wysiwyg-value {
  font-family: inherit;
  font-size: 14px;
}

.wysiwyg-value p {
  margin: 0 0 10px 0;
}

.wysiwyg-value p:last-child {
  margin-bottom: 0;
}

.wysiwyg-value ul,
.wysiwyg-value ol {
  margin: 10px 0;
  padding-right: 20px;
}

.wysiwyg-value li {
  margin: 5px 0;
}

.wysiwyg-value strong,
.wysiwyg-value b {
  font-weight: 700;
  color: #111827;
}

.wysiwyg-value em,
.wysiwyg-value i {
  font-style: italic;
}

.wysiwyg-value u {
  text-decoration: underline;
}

.wysiwyg-value h1,
.wysiwyg-value h2,
.wysiwyg-value h3,
.wysiwyg-value h4,
.wysiwyg-value h5,
.wysiwyg-value h6 {
  margin: 15px 0 10px 0;
  font-weight: 700;
  color: #1f2937;
}

.wysiwyg-value h1 { font-size: 1.5em; }
.wysiwyg-value h2 { font-size: 1.3em; }
.wysiwyg-value h3 { font-size: 1.1em; }

/* Dark mode support for display value */
body.dark-mode .wysiwyg-value {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0;
}

body.dark-mode .wysiwyg-value strong,
body.dark-mode .wysiwyg-value b {
  color: #f1f5f9;
}

body.dark-mode .wysiwyg-value h1,
body.dark-mode .wysiwyg-value h2,
body.dark-mode .wysiwyg-value h3,
body.dark-mode .wysiwyg-value h4,
body.dark-mode .wysiwyg-value h5,
body.dark-mode .wysiwyg-value h6 {
  color: #f9fafb;
}

/* ===== زر الدردشة مع النظام في تبويب نظرة عامة ===== */
.chat-access-section {
    width: 100%;
    max-width: 600px;
    margin: 25px auto 0;
}

.chat-access-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3),
                0 2px 8px rgba(118, 75, 162, 0.2);
    position: relative;
    overflow: hidden;
}

.chat-access-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4),
                0 4px 16px rgba(118, 75, 162, 0.3);
}

.chat-access-btn:hover::before {
    opacity: 1;
}

.chat-access-btn:active {
    transform: translateY(0);
}

.chat-btn-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-btn-icon i {
    color: white;
    font-size: 24px;
}

.chat-btn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.chat-btn-title {
    color: white;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.chat-btn-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    line-height: 1.4;
}

.chat-btn-arrow {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.chat-btn-arrow i {
    color: white;
    font-size: 14px;
}

.chat-access-btn:hover .chat-btn-arrow {
    transform: translateX(-4px);
}

/* تأثير النبض للفت الانتباه */
@keyframes chatButtonPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3),
                    0 2px 8px rgba(118, 75, 162, 0.2);
    }
    50% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5),
                    0 4px 12px rgba(118, 75, 162, 0.3);
    }
}

.chat-access-btn.pulse {
    animation: chatButtonPulse 2s ease-in-out infinite;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .chat-access-section {
        max-width: 100%;
    }
    
    .chat-access-btn {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .chat-btn-icon {
        width: 40px;
        height: 40px;
    }
    
    .chat-btn-icon i {
        font-size: 20px;
    }
    
    .chat-btn-title {
        font-size: 15px;
    }
    
    .chat-btn-subtitle {
        font-size: 12px;
    }
    
    .chat-btn-arrow {
        width: 28px;
        height: 28px;
    }
}

/* Dark Mode */
body.dark-mode .chat-access-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4),
                0 2px 8px rgba(168, 85, 247, 0.3);
}

body.dark-mode .chat-access-btn:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.5),
                0 4px 16px rgba(168, 85, 247, 0.4);
}


/* ========================================
   Inspection Status Tab Styles
   ======================================== */

.inspection-status-container {
    padding: 20px;
}

.inspection-status-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(148, 163, 184, 0.1);
}

.inspection-status-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
}

.inspection-subtitle {
    margin: 0;
    font-size: 14px;
    color: rgba(226, 232, 240, 0.7);
}

.inspection-content-area {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    min-height: 400px;
}

.inspection-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: rgba(15, 23, 42, 0.2);
    border-radius: 8px;
}

.inspection-placeholder i {
    font-size: 64px;
    color: rgba(148, 163, 184, 0.3);
    margin-bottom: 16px;
}

.inspection-placeholder h4 {
    color: #cbd5e0;
    margin: 0 0 8px 0;
    font-size: 18px;
}

.inspection-placeholder p {
    color: rgba(226, 232, 240, 0.6);
    margin: 0;
    font-size: 14px;
}

/* Dark Mode Support */
body.dark-mode .inspection-status-container {
    background: transparent;
}

body.dark-mode .inspection-status-header {
    border-bottom-color: rgba(148, 163, 184, 0.15);
}

body.dark-mode .inspection-content-area {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(148, 163, 184, 0.15);
}

/* ========================================
   File Number Editing Animations
   ======================================== */

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* File number notification styles */
.file-number-notification {
    animation: slideIn 0.3s ease;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 600;
    font-size: 14px;
}

.file-number-notification.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.file-number-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Button loading state */
.save-file-number-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.save-file-number-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Input focus effect */
.file-number-input:focus {
    animation: pulse 0.5s ease;
}

/* ========================================
   Inspection Status Tab Enhancements
   ======================================== */

.inspection-status-container {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.inspection-placeholder i {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Timeline styles for future use */
.inspection-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    right: 19px;
    top: 40px;
    bottom: 0;
    width: 2px;
    background: rgba(148, 163, 184, 0.2);
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(148, 163, 184, 0.1);
    border: 2px solid rgba(148, 163, 184, 0.2);
    color: rgba(148, 163, 184, 0.6);
    transition: all 0.3s ease;
}

.timeline-item.completed .timeline-icon {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.timeline-item.active .timeline-icon {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
    animation: pulse 2s ease infinite;
}

.timeline-item.pending .timeline-icon {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
    color: rgba(148, 163, 184, 0.4);
}

.timeline-content {
    flex: 1;
}

.timeline-content h5 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

.timeline-date {
    margin: 0;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.6);
}

/* Detail cards */
.inspection-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    padding: 20px;
}

.detail-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.detail-card h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.detail-card table {
    width: 100%;
    border-collapse: collapse;
}

.detail-card table tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.05);
}

.detail-card table tr:last-child {
    border-bottom: none;
}

.detail-card table th,
.detail-card table td {
    padding: 10px 8px;
    text-align: right;
}

.detail-card table th {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.8);
    font-size: 13px;
    width: 30%;
}

.detail-card table td {
    color: #f8fafc;
    font-size: 14px;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-info {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}
