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

:root {
  --color-bg: #f3f4f6;
  --color-bg-soft: #e5e7eb;
  --color-surface: #ffffff;
  --color-primary: #2563eb;
  --color-primary-soft: #dbeafe;
  --color-primary-dark: #1d4ed8;
  --color-text-main: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --radius-md: 0.75rem;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 15px rgba(15, 23, 42, 0.12);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
}

/* Landing */

.landing-body {
  background: radial-gradient(circle at top left, #dbeafe, #f9fafb 40%, #e5e7eb);
}

.landing-hero {
  padding: 2rem;
}

.landing-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1.25rem;
  padding: 2rem 2.4rem;
  box-shadow: var(--shadow-md);
  max-width: 540px;
  text-align: center;
}

.hero-title {
  font-size: 1.9rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 600;
}

.hero-text-small {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Layout genérico */

main {
  padding: 1.5rem;
}

.centered {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.page-main {
  max-width: 1200px;
  margin: 1rem auto 2rem;
}

/* Texto */

h1, h2, h3 {
  margin-bottom: 0.75rem;
}

.muted-text {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.list-clean {
  list-style: none;
}

/* Botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease, filter 0.12s ease;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary {
  background: var(--color-primary);
}

.btn-secondary {
  background: #4b5563;
  box-shadow: none;
}

.btn-small {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

/* Topbar + navbar */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #020617;
  color: #f9fafb;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
}

.topbar-left h1 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.topbar-subtitle {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
}

.navbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  background: #e5e7eb;
  border-bottom: 1px solid #d1d5db;
}

.nav-btn {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: none;
  background: #d1d5db;
  cursor: pointer;
  font-size: 0.85rem;
  color: #111827;
  transition: background 0.12s ease, transform 0.05s ease, box-shadow 0.12s ease;
}

.nav-btn:hover {
  background: #9ca3af;
}

.nav-btn.active {
  background: #111827;
  color: #f9fafb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
  transform: translateY(-1px);
}

/* Secciones */

.section {
  display: none;
  margin-top: 1rem;
}

.section.active {
  display: block;
}

/* Tarjetas */

.cards-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Tablas */

.table-wrapper {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

.table th,
.table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.table th {
  background: #f3f4f6;
  text-align: left;
  font-weight: 600;
  color: #374151;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: #f9fafb;
}

/* Mensajes */

.message {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* User info */

.user-info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.user-role-pill {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #0f172a;
  border: 1px solid #1f2937;
}

/* Textos auxiliares */

.hint-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* Page main wrapper */
.page-main {
  max-width: 1200px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
}

/* Encabezados de sección */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.section-header h2 {
  margin-bottom: 0.1rem;
}

.section-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Cards con hover un poco más “vivas” */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  border-color: rgba(37, 99, 235, 0.25);
}

/* Card destacada del resumen */
.card-highlight {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

