/* CSS para el Dashboard de Administración */

:root {
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --secondary: #6366f1;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --success: #10b981;
  --success-hover: #059669;
  --error: #ef4444;
  --error-hover: #dc2626;
  --warning: #f59e0b;
  --font-family-title: 'Outfit', sans-serif;
  --font-family-body: 'Inter', sans-serif;
}

/* Tema Claro (Día) */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-border: rgba(15, 23, 42, 0.08);
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --secondary: #4f46e5;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --success: #059669;
  --success-hover: #047857;
  --error: #dc2626;
  --error-hover: #b91c1c;
  --warning: #d97706;
}

[data-theme="light"] .dash-header {
  background-color: rgba(248, 250, 252, 0.95);
}

[data-theme="light"] .mod-item {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .mod-item-pois-summary {
  background-color: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .highlight-metric {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.05) 0%, rgba(79, 70, 229, 0.05) 100%);
  border-color: rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .metric-value {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .highlight-metric .metric-value {
  background: linear-gradient(135deg, #0f172a 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .empty-state {
  background-color: rgba(0, 0, 0, 0.01);
}

/* Reset y Estilos Generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family-body);
  line-height: 1.6;
}

.dash-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-family-title);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #0f172a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.btn-success {
  background-color: var(--success);
  color: #0f172a;
}

.btn-success:hover {
  background-color: var(--success-hover);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background-color: var(--error-hover);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.font-sm {
  font-size: 0.85rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-family-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.logo .highlight {
  color: var(--primary);
}

.badge-role {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Header */
.dash-header {
  height: 80px;
  background-color: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
}

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

.user-meta-control {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Main content padding */
.main-content-dash {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Metrics Grid Counters */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-box {
  padding: 1.5rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.highlight-metric {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  border-color: rgba(56, 189, 248, 0.2);
}

.metric-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.metric-value {
  font-family: var(--font-family-title);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.highlight-metric .metric-value {
  background: linear-gradient(135deg, #ffffff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-footnote {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Metrics Sub counters styling */
.metrics-sub-counters {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 0.25rem;
}

.metrics-sub-counters div {
  text-align: center;
}

.metrics-sub-counters strong {
  display: block;
  font-family: var(--font-family-title);
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.metrics-sub-counters span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
}

.metrics-sub-counters .divider {
  width: 1px;
  height: 40px;
  background-color: var(--bg-card-border);
}

/* Split Layout */
.admin-split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
}

@media (max-width: 992px) {
  .admin-split-layout {
    grid-template-columns: 1fr;
  }
}

.mod-queue-container h3, .chart-card h3, .log-card h3 {
  font-family: var(--font-family-title);
  font-size: 1.3rem;
}

/* Moderation Queue list style */
.mod-queue {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mod-item {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--bg-card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: border-color 0.3s;
}

.mod-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.mod-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.mod-item-title {
  font-family: var(--font-family-title);
  font-size: 1.15rem;
  font-weight: 700;
}

.mod-item-guide {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  display: block;
  margin-top: 0.1rem;
}

.badge-type {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.badge-type.pago {
  background-color: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.badge-type.gratuito {
  background-color: rgba(56, 189, 248, 0.2);
  color: #93c5fd;
}

.mod-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* POIs list details inside mod queue item */
.mod-item-pois-summary {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.mod-item-pois-summary h5 {
  font-family: var(--font-family-title);
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--bg-card-border);
  padding-bottom: 0.25rem;
}

.mod-pois-list {
  list-style: none;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mod-poi-li {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.mod-poi-li span.poi-type {
  color: var(--primary);
  font-size: 0.75rem;
}

.mod-item-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Chart */
.chart-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Log / Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.dash-table th, .dash-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.dash-table th {
  font-family: var(--font-family-title);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

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

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.empty-state {
  padding: 3rem 2rem;
  text-align: center;
  border: 2px dashed var(--bg-card-border);
  border-radius: 0.75rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  opacity: 0.7;
}
