/* Common Admin Styles - Modern Redesign */

/* Buttons - Enhanced with Gradients */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn::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;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn i {
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: scale(1.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
  color: #ffffff;
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: #ffffff;
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
  color: #ffffff;
}

.btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
  color: #ffffff;
}

.btn-warning:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4);
}

.btn-info {
  background: linear-gradient(135deg, var(--info-color), var(--info-light));
  color: #ffffff;
}

.btn-info:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: none;
}

.btn-outline:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 14px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Form Elements - Modern Style */
.form-group {
  margin-bottom: 24px;
  animation: fadeIn 0.5s ease-out;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.3px;
}

.form-label.required::after {
  content: '*';
  color: var(--danger-color);
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 8px 20px rgba(99, 102, 241, 0.15);
  background: #ffffff;
  transform: translateY(-2px);
}

.form-control::placeholder {
  color: var(--gray-400);
  font-weight: 500;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  cursor: pointer;
  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='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-control:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Checkbox & Radio - Modern Style */
.form-check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.form-check-input {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background: rgba(255, 255, 255, 0.9);
  position: relative;
}

.form-check-input:checked {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.form-check-input:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input[type="radio"]:checked::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
}

.form-check-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
}

/* Cards - Enhanced */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  animation: fadeIn 0.6s ease-out;
}

.card:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.1);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-body {
  padding: 0;
}

/* Tables - Modern Style */
.table-container {
  overflow-x: auto;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
}

.table thead {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
}

.table thead th {
  padding: 16px 20px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.table thead th:first-child {
  border-top-left-radius: 16px;
}

.table thead th:last-child {
  border-top-right-radius: 16px;
}

.table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.table tbody tr:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table tbody td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 500;
}

/* Badges - Enhanced */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.badge-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #ffffff;
}

.badge-success {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: #ffffff;
}

.badge-danger {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
  color: #ffffff;
}

.badge-warning {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
  color: #ffffff;
}

.badge-info {
  background: linear-gradient(135deg, var(--info-color), var(--info-light));
  color: #ffffff;
}

.badge-secondary {
  background: linear-gradient(135deg, var(--gray-500), var(--gray-600));
  color: #ffffff;
}

/* Alerts - Modern Style */
.alert {
  padding: 16px 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease-out;
  border: 2px solid transparent;
}

.alert i {
  font-size: 20px;
}

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
  color: var(--success-color);
  border-color: rgba(16, 185, 129, 0.3);
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.1));
  color: var(--danger-color);
  border-color: rgba(239, 68, 68, 0.3);
}

.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
  color: var(--warning-color);
  border-color: rgba(245, 158, 11, 0.3);
}

.alert-info {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(34, 211, 238, 0.1));
  color: var(--info-color);
  border-color: rgba(6, 182, 212, 0.3);
}

/* Modal - Enhanced */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 28px 32px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--danger-color);
  color: #ffffff;
  transform: rotate(90deg) scale(1.1);
}

.modal-body {
  padding: 32px;
}

.modal-footer {
  padding: 20px 32px;
  border-top: 2px solid rgba(99, 102, 241, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Pagination - Modern Style */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.pagination-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.pagination-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
