/* Admin-specific styles */

/* User Cards Grid */
.user-cards-grid {
  display: flex;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  flex-direction: column;
}

.user-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  width: -webkit-fill-available;
  max-width: 100%;
}

.user-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.user-card.inactive {
  opacity: 0.6;
  border-color: #fca5a5;
  background: #fef2f2;
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.2s ease;
  border-radius: 8px;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  margin-top: -0.75rem;
  cursor: pointer;
}

.user-card-header:hover {
  background: rgba(0, 0, 0, 0.02);
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-card.inactive .user-avatar {
  background: #9ca3af;
}

.user-card-info {
  flex: 1;
  min-width: 0;
}

.user-card-email {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.user-role-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.role-admin {
  background: #1e293b;
  color: white;
}

.role-user {
  background: #e5e7eb;
  color: #374151;
}

.user-card-details {
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

.user-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.detail-label {
  color: #6b7280;
  font-weight: 500;
}

.detail-value {
  color: #1e293b;
  font-weight: 600;
}

.user-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  transition: all 0.3s ease;
  overflow: hidden;
}

.user-card-actions .btn {
  flex: 1;
  min-width: fit-content;
}

/* Collapse Button */
.btn-collapse-user {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  color: #6b7280;
  min-width: 36px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-collapse-user:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #374151;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .user-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .user-card-actions {
    flex-direction: column;
  }
  
  .user-card-actions .btn {
    width: 100%;
  }
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px !important;
  font-weight: 600;
}

.status-active {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-inactive {
  background: #ffebee;
  color: #c62828;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 6px;
}

.btn-edit {
  background: #2196f3;
  color: white;
}

.btn-edit:hover {
  background: #1976d2;
}

.btn-warn {
  background: #ff9800;
  color: white;
}

.btn-warn:hover {
  background: #f57c00;
}

.btn-success {
  background: #4caf50;
  color: white;
}

.btn-success:hover {
  background: #388e3c;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #d32f2f;
}

/* Form select styling */
.form-input[type="select"],
select.form-input {
  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='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

/* Additional button styles */
.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

/* Dashboard grid responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Loading spinner for tables */
.table-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.table-loading::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

