/* Buscador Zito - Estilos de Administración (Dark Theme Inktomi Style) */

:root {
  --admin-bg: #0f172a;
  --panel-bg: #1e293b;
  --card-bg: #1e293b;
  --card-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #334155;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background-color: var(--admin-bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.admin-header {
  background: var(--panel-bg);
  padding: 16px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.admin-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.admin-header h1 span {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-left: 10px;
  background: rgba(37, 99, 235, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.user-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Container */
.admin-container {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 20px;
  width: 100%;
}

/* Alertas */
.alert {
  padding: 14px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid var(--success);
  color: #4ade80;
}

/* Grid de Métricas (Inktomi Style) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-card.accent {
  border-color: var(--accent);
  background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 100%);
}

.metric-card.green {
  border-color: var(--success);
}

.metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cards de Secciones */
.card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Tablas */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.table th {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges de Estado */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-success { background: rgba(22, 163, 74, 0.2); color: #4ade80; border: 1px solid var(--success); }
.badge-danger { background: rgba(220, 38, 38, 0.2); color: #f87171; border: 1px solid var(--danger); }
.badge-warning { background: rgba(217, 119, 6, 0.2); color: #fbbf24; border: 1px solid var(--warning); }
.badge-accent { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border: 1px solid var(--accent); }

/* Form Controls & Botones */
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
}

.btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn-accent {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #15803d; }

/* Login Page */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--admin-bg);
}

.login-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
