/* COP Admin - shared styles */
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

.sidebar-gradient {
  background: linear-gradient(180deg, #1e40af 0%, #374151 100%);
}

.nav-item {
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}
.nav-item:hover {
  background: rgba(255,255,255,0.1);
  transform: translateX(4px);
}
.nav-item.nav-active {
  background: #1e40af;
  color: white !important;
  box-shadow: 0 4px 12px rgba(30,64,175,0.4);
}

.notif-badge {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.user-menu, .notif-panel {
  animation: dropIn 0.2s ease-out;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.fade-in-up { animation: fadeInUp 0.5s ease-out; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}
.spinner {
  border: 3px solid rgba(30,64,175,0.2);
  border-top: 3px solid #1e40af;
  border-radius: 50%;
  width: 36px; height: 36px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.stat-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border-left: 4px solid #1e40af;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.btn {
  padding: 0.55rem 1.1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.btn-primary { background: #1e40af; color: white; }
.btn-primary:hover { background: #3b82f6; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,64,175,0.3); }
.btn-secondary { background: #6b7280; color: white; }
.btn-secondary:hover { background: #4b5563; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #16a34a; color: white; }
.btn-success:hover { background: #15803d; }
.btn-ghost { background: transparent; color: #374151; border: 1px solid #d1d5db; }
.btn-ghost:hover { background: #f3f4f6; }

.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}

.input, .select, .textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background: white;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #d1fae5; color: #047857; }
.badge-orange { background: #fed7aa; color: #c2410c; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-grey { background: #e5e7eb; color: #374151; }
.badge-indigo { background: #e0e7ff; color: #4338ca; }
.badge-teal { background: #ccfbf1; color: #0f766e; }
.badge-violet { background: #ede9fe; color: #7c3aed; }
.badge-rose { background: #ffe4e6; color: #be123c; }
.badge-amber { background: #fef3c7; color: #b45309; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
}
table.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  font-weight: 600;
}
table.data-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: #374151;
}
table.data-table tr:hover td { background: #f9fafb; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  animation: fadeIn 0.2s ease-out;
}
.modal-card {
  background: white;
  border-radius: 0.75rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.5rem;
  color: white;
  font-size: 0.875rem;
  z-index: 100;
  animation: slideInRight 0.3s ease-out;
}
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-info { background: #1e40af; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #1e40af, #6b7280);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 1rem 2rem;
}
.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; }
.timeline-dot {
  position: absolute;
  top: 1.5rem;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #1e40af;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #1e40af;
}
.timeline-item.left .timeline-dot { right: -8px; }
.timeline-item.right .timeline-dot { left: -8px; }

.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #1e40af, #3b82f6);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

.gradient-bg {
  background: linear-gradient(135deg, #1e40af 0%, #6b7280 100%);
}
.gradient-text {
  background: linear-gradient(135deg, #1e40af 0%, #6b7280 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

.tab-btn {
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.tab-btn.tab-active {
  border-bottom-color: #1e40af;
  color: #1e40af !important;
}

/* Toggle switch */
.toggle-track { position: relative; }
.module-toggle:checked ~ .toggle-track { background: #16a34a; }
.module-toggle:checked ~ .toggle-knob { transform: translateX(20px); }
