/* ===================================================================
   SEMWELD - Admin Panel & Programmatic SEO Studio Styles
   =================================================================== */

.admin-body {
  background-color: #05080b;
  color: #e2e8f0;
  font-family: var(--font-sans);
  min-height: 100vh;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: #090e13;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-nav {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: #94a3b8;
  transition: all 0.2s;
  text-decoration: none;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.admin-nav-item.active {
  background: rgba(1, 69, 79, 0.5);
  border: 1px solid rgba(1, 69, 79, 0.9);
  color: #38bdf8;
}

.admin-nav-item.active-flame {
  background: rgba(255, 117, 31, 0.15);
  border: 1px solid rgba(255, 117, 31, 0.4);
  color: var(--color-flame);
}

/* Main Content Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.admin-topbar {
  height: 64px;
  background: rgba(9, 14, 19, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.admin-workspace {
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.813rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: #0d151c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.938rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-flame);
  box-shadow: 0 0 0 3px rgba(255, 117, 31, 0.15);
}

.form-textarea {
  min-height: 180px;
  line-height: 1.6;
  resize: vertical;
}

/* TOGGLE AGENTE IA (Interactive Switch) */
.ai-toggle-box {
  background: linear-gradient(135deg, rgba(1, 69, 79, 0.4) 0%, rgba(12, 20, 26, 0.9) 100%);
  border: 1px solid rgba(1, 69, 79, 0.7);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.ai-toggle-box.active {
  border-color: rgba(255, 117, 31, 0.6);
  box-shadow: 0 0 25px rgba(255, 117, 31, 0.12);
}

.ai-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
  flex-shrink: 0;
}

.ai-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ai-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #1e293b;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: #94a3b8;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

.ai-switch input:checked + .ai-slider {
  background-color: var(--color-flame);
  border-color: #ff8c3b;
  box-shadow: 0 0 15px rgba(255, 117, 31, 0.5);
}

.ai-switch input:checked + .ai-slider:before {
  transform: translateX(28px);
  background-color: #ffffff;
}

/* Badge Chips para Keywords */
.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.813rem;
  font-weight: 600;
  margin: 0.25rem;
}

.kw-chip-focus {
  background: rgba(255, 117, 31, 0.2);
  border: 1px solid var(--color-flame);
  color: #ff9b57;
}

.kw-chip-secondary {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
}

.kw-chip-semantic {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid #a855f7;
  color: #d8b4fe;
}

/* Tabla de Contenidos */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #090e13;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
}

.admin-table th {
  background: #0e151d;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  color: #e2e8f0;
}

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

/* Gauge Score Meter */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.score-high {
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid #22c55e;
  color: #4ade80;
}

.score-med {
  background: rgba(234, 179, 8, 0.15);
  border: 2px solid #eab308;
  color: #fde047;
}

.score-low {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid #ef4444;
  color: #f87171;
}
