.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
}

.modal-content h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.modal-content textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.modal-actions .cancel-btn {
  background: #e0e0e0;
  color: #333;
}

.modal-actions .send-btn {
  background: #9333ea;
  color: white;
}

.modal-actions .send-btn:hover {
  background: #be123c;
}

.admin-modal-content {
  background: white;
  border-radius: 12px;
  width: 500px;
  max-width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #ddd;
}

.admin-modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.admin-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  color: #666;
}

.admin-close-btn:hover {
  color: #333;
}

.admin-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.admin-modal-body h3 {
  margin: 0 0 1rem 0;
  font-size: 16px;
  color: #9333ea;
}

.admin-section-divider {
  margin: 2rem 0;
  border-top: 1px solid #ddd;
}

body.dark-mode .admin-section-divider {
  border-top-color: #38383a;
}

.admin-pending-item {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-pending-phone {
  font-weight: 500;
}

.admin-pending-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

.admin-btn-approve {
  background: #10b981;
  color: white;
}

.admin-btn-reject {
  background: #9333ea;
  color: white;
}

.admin-empty {
  text-align: center;
  padding: 2rem;
  color: #999;
}

body.dark-mode .admin-modal-content {
  background: #2c2c2e;
}

body.dark-mode .admin-modal-header {
  border-bottom-color: #38383a;
}

body.dark-mode .admin-close-btn {
  color: #8e8e93;
}

body.dark-mode .admin-close-btn:hover {
  color: #fff;
}

body.dark-mode .admin-modal-body h3 {
  color: #9333ea;
}

body.dark-mode .admin-pending-item {
  background: #1c1c1e;
}

body.dark-mode .admin-empty {
  color: #8e8e93;
}

.edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.edit-modal-content {
  background: #2c2c2e;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #3a3a3c;
}

.edit-modal-header h3 {
  margin: 0;
  color: #9333ea;
}

.close-modal {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.edit-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-modal-body h4 {
  margin: 16px 0 8px 0;
  color: #9333ea;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #3a3a3c;
  padding-bottom: 6px;
}

.edit-modal-body h4:first-child {
  margin-top: 0;
}

.edit-modal-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #e0e0e0;
  font-size: 13px;
}

.edit-modal-body input[type="number"],
.edit-modal-body input[type="text"],
.edit-modal-body input[type="email"],
.edit-modal-body input[type="tel"],
.edit-modal-body input[type="date"],
.edit-modal-body input[type="time"],
.edit-modal-body select,
.edit-modal-body textarea {
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

.edit-modal-body input[type="date"],
.edit-modal-body input[type="time"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  padding-right: 40px;
}

.edit-modal-body input[type="date"]::-webkit-calendar-picker-indicator,
.edit-modal-body input[type="time"]::-webkit-calendar-picker-indicator {
  background: transparent;
  bottom: 0;
  color: transparent;
  cursor: pointer;
  height: auto;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: auto;
  filter: invert(1);
}

.edit-modal-body select {
  cursor: pointer;
}

.edit-modal-body textarea {
  resize: vertical;
  font-family: inherit;
}

.edit-modal-body input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.edit-modal-body label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}

.edit-modal-footer {
  padding: 20px;
  border-top: 1px solid #3a3a3c;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cancel-btn, .save-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.cancel-btn {
  background: #3a3a3c;
  color: #fff;
}

.save-btn {
  background: #9333ea;
  color: #fff;
}

.save-btn:hover {
  background: #7c2dc7;
}

body.dark-mode .modal-content {
  background: #2c2c2e;
  color: #fff;
}

body.dark-mode .modal-content input,
body.dark-mode .modal-content textarea {
  background: #1c1c1e;
  border-color: #38383a;
  color: #fff;
}

@media (max-width: 768px) {
  .admin-modal-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .admin-pending-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-pending-actions {
    width: 100%;
  }

  .admin-btn {
    flex: 1;
  }
}
