/* ======================================================
   ADMIN THEME - Variables y ajustes (Backoffice)

   Propósito:
   - Variables y reglas base pensadas exclusivamente para la
     interfaz administrativa (backoffice). Separadas del
     frontend público para evitar dependencias.

   Uso:
   - Cargar estos estilos SOLO en las vistas bajo `src/views/admin/`
     (ej: admin panels, CRUDs). No modificar tokens del frontend
     aquí si se espera que afecten las vistas públicas.

   Nota:
   - Mantén coherencia de variables pero evita reutilizar estas
     clases en plantillas públicas.
====================================================== */
:root {
  --bg: #0f1724;
  --surface: rgba(15, 23, 36, 0.88);
  --surface-strong: rgba(26, 32, 44, 0.96);
  --card-bg: rgba(15, 23, 36, 0.96);
  --card-border: rgba(148, 163, 184, 0.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #f472b6;
  --accent-soft: rgba(244, 114, 182, 0.14);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f97316;
  --shadow-light: 0 18px 50px rgba(15, 23, 42, 0.24);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===================================
   GLOBAL
=================================== */
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at top left, rgba(244, 114, 182, 0.12), transparent 30%),
              radial-gradient(circle at 80% 15%, rgba(59, 130, 246, 0.12), transparent 22%),
              linear-gradient(180deg, #08101f 0%, #0b1631 100%);
  color: var(--text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(244, 114, 182, 0.28);
  color: #fff;
}

.container {
  max-width: 1180px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  margin-top: 0;
}

p, label, small {
  color: var(--muted);
}

/* ===================================
   NAVBAR
=================================== */
.navbar {
  background: rgba(15, 23, 36, 0.92) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.20);
}

.navbar-brand {
  color: #fff !important;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.navbar .nav-link {
  color: rgba(226, 232, 240, 0.8) !important;
  transition: color 0.2s ease;
}

.navbar .nav-link:hover {
  color: #f472b6 !important;
}

/* ===================================
   CARDS & PANELS
=================================== */
.card,
.card-body,
.bg-light,
.table-responsive,
.form-control,
.form-select,
textarea {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: inset 0 0 0 1px transparent, 0 18px 42px rgba(15, 23, 42, 0.14);
  border-radius: var(--radius-lg) !important;
}

.card {
  overflow: hidden;
}

.card-header,
.card-footer {
  background: rgba(15, 23, 36, 0.72) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08) !important;
}

.card-header {
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08) !important;
}

.card-body {
  padding: 1.6rem;
}

.card h1,
.card h2,
.card h3,
.card h4 {
  color: var(--text);
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.section-title::before {
  content: '';
  width: 40px;
  height: 2px;
  display: block;
  background: linear-gradient(90deg, rgba(244, 114, 182, 1), rgba(168, 85, 247, 0.95));
}

/* ===================================
   BUTTONS
=================================== */
.btn {
  border-radius: 999px !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-color: transparent;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f472b6, #a855f7);
}

.btn-secondary {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #e2e8f0;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.12) !important;
}

.btn-danger {
  background: #fb7185 !important;
  color: #fff !important;
}

.btn-warning {
  background: #fbbf24 !important;
  color: #0f1724 !important;
}

.btn-info {
  background: #38bdf8 !important;
  color: #0f1724 !important;
}

.btn-outline-secondary {
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #e2e8f0 !important;
}

/* ===================================
   FORMS
=================================== */
.form-control,
.form-select,
textarea {
  border-radius: var(--radius-md) !important;
  background: rgba(15, 23, 36, 0.72) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(244, 114, 182, 0.95) !important;
  box-shadow: 0 0 0 0.25rem rgba(244, 114, 182, 0.18);
}

.form-label {
  color: #cbd5e1;
  font-weight: 600;
}

input[type="file"] {
  background: rgba(255,255,255,0.06);
}

.form-text {
  color: var(--muted) !important;
}

/* ===================================
   TABLES
=================================== */
.table {
  color: #e2e8f0;
}

.table thead th {
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  text-transform: uppercase;
  background: transparent;
}

.table tbody tr {
  background: rgba(255,255,255,0.03);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(244, 114, 182, 0.12);
}

.table tbody td {
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  padding: 1rem 1rem;
  vertical-align: middle;
}

.table-responsive {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: 2rem;
}

.table .btn {
  min-width: 110px;
}

/* ===================================
   CARD THUMBNAILS
=================================== */
.product-thumb,
.no-image {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.no-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.65);
}

/* ===================================
   METADATA LABELS
=================================== */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: rgba(244, 114, 182, 0.16);
  color: #f8fafc;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tag .tag-close {
  color: rgba(248, 250, 252, 0.75);
}

.tag .tag-close:hover {
  color: #fff;
}

/* ===================================
   FOOTER
=================================== */
footer.bg-dark {
  background: transparent !important;
  color: rgba(226, 232, 240, 0.75) !important;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
}

footer .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===================================
   UTILITIES
=================================== */
.shadow-soft {
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.text-muted {
  color: var(--muted) !important;
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-group .btn {
  border-radius: 999px !important;
}

@media (max-width: 900px) {
  .container {
    width: auto;
    padding: 0 1rem;
  }

  .navbar {
    padding: 0.9rem 1rem;
  }
}

@media (max-width: 640px) {
  .card {
    border-radius: var(--radius-md) !important;
  }

  .product-thumb,
  .no-image {
    width: 64px;
    height: 64px;
  }
}

/* ===================================
   ANNUNCEMENTS FIX
=================================== */
.card-title {
  color: #ffffff !important;
}

.card-text {
  color: #cbd5e1 !important;
}

footer {
  background: transparent !important;
  color: rgba(226, 232, 240, 0.75) !important;
}

/* ===================================
   MODAL DARK THEME
=================================== */
.modal-content {
  background: rgba(15, 23, 36, 0.96) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.30) !important;
}

.modal-header {
  background: rgba(15, 23, 36, 0.72) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08) !important;
}

.modal-footer {
  background: rgba(15, 23, 36, 0.72) !important;
  border-top: 1px solid rgba(148, 163, 184, 0.08) !important;
}

.modal-body {
  padding: 2rem;
}

.modal-title {
  color: #ffffff !important;
}

.modal.show .modal-dialog {
  background: rgba(0, 0, 0, 0.4);
}
