/**
 * Firefly AI Studio - Estilos del Panel de Administración
 */

.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: #0b0c10;
}

/* Sidebar Admin */
.admin-sidebar {
  width: 250px;
  background-color: #121319;
  border-right: 1px solid #1f222e;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-brand {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1f222e;
}

.admin-brand-tag {
  background: rgba(138, 43, 226, 0.2);
  color: #c084fc;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.admin-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.admin-nav-item:hover {
  background-color: #1a1c25;
  color: #fff;
}

.admin-nav-item.active {
  background: linear-gradient(90deg, rgba(138, 43, 226, 0.2) 0%, rgba(138, 43, 226, 0.05) 100%);
  color: #fff;
  border-left: 3px solid #8a2be2;
}

/* Main Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.admin-topbar {
  height: 64px;
  background-color: #121319;
  border-bottom: 1px solid #1f222e;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Tarjetas de Métricas (Stats) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  background: #161822;
  border: 1px solid #232736;
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ff416c, #8a2be2);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-title {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

/* Tarjetas de Contenedores y Tablas */
.admin-card {
  background: #161822;
  border: 1px solid #232736;
  border-radius: 14px;
  overflow: hidden;
}

.admin-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid #232736;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background: #121319;
  padding: 12px 20px;
  color: #94a3b8;
  font-weight: 600;
  border-bottom: 1px solid #232736;
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #1f222e;
  color: #e2e8f0;
}

.data-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

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

.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-suspended { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-admin { background: rgba(138, 43, 226, 0.2); color: #c084fc; }
.badge-user { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

/* Botones */
.btn-primary {
  background: linear-gradient(135deg, #ff416c, #8a2be2);
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(138, 43, 226, 0.3);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #252836;
  color: #e2e8f0;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid #323647;
}

.btn-secondary:hover {
  background: #2f3445;
}

/* Formularios */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 24px;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.admin-input {
  background: #111218;
  border: 1px solid #272a39;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.admin-input:focus {
  border-color: #8a2be2;
}

/* Color Picker Input */
.color-picker-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-picker-box input[type="color"] {
  width: 44px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
