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

:root {
  /* Brand colors */
  --primary:       #0983d6;
  --primary-hover: #008bbd;
  --bg-dark:       #0D0D0D;
  --bg-card:       #0D0D0D;
  --bg-input:      #111111;
  --bg-hover:      #1A1A1A;
  --text-light:    #FFFFFF;
  --text-gray:     #A0A0A0;

  /* Aliases internos */
  --primary-dark: var(--primary-hover);
  --bg:           var(--bg-dark);
  --surface:      var(--bg-card);
  --border:       #333333;
  --text:         var(--text-light);
  --muted:        var(--text-gray);
  --danger:       #f87171;
}

body {
  font-family: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(2deg, var(--bg-dark), #0983d6);
  background-attachment: fixed;
  color: var(--text-light);
  min-height: 100vh;
  font-size: 16px;
}

/* ── PAGE LOADER ── */
#page-loader {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(9, 131, 214, .8);
  z-index: 9999;
  opacity: 0;
  transition: width .4s ease, opacity .3s ease;
}
#page-loader.loading {
  opacity: 1;
  width: 78%;
  transition: width 2.5s cubic-bezier(.1, .6, .2, 1), opacity .2s ease;
}
#page-loader.done {
  width: 100%;
  opacity: 0;
  transition: width .25s ease, opacity .4s ease .2s;
}
@media (prefers-reduced-motion: reduce) {
  #page-loader, #page-loader.loading, #page-loader.done { transition: opacity .2s ease; }
}

/* ── HEADER ── */
header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem 1.25rem;
  height: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 84px auto;
  align-items: center;
  column-gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}
.logo {
  display: flex;
  align-items: center;
  gap: .9rem;
  grid-column: 1;
  grid-row: 1;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  grid-column: 3;
  grid-row: 1;
  margin-left: 0;
  flex-shrink: 0;
}
.tabs {
  position: relative;
  display: flex;
  gap: .3rem;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  max-width: 1200px;
  justify-self: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .4rem;
  margin-bottom: 0;
}

/* Pastilla azul que se desliza detrás del tab activo. */
.tab-indicator {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0;
  border-radius: 8px;
  background: var(--primary);
  box-shadow: 0 1px 8px rgba(9, 131, 214, .35);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), width .28s cubic-bezier(.4, 0, .2, 1);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}
.tab-indicator.ready { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .tab-indicator { transition: none; }
}
.logo-img  { height: 56px; width: auto; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 1.2rem; font-weight: 700; color: var(--text-light); letter-spacing: .04em; }
.logo-sub  { font-size: .82rem; color: var(--text-gray); }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 1.75rem 1.75rem 2.5rem; }

/* ── SECTIONS ── */
.section        { display: none; }
.section.active { display: block; animation: sectionIn .25s ease-out both; }

@keyframes sectionIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .section.active { animation: none; }
}

.section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--text-light); }
.section-sub   { font-size: .9rem; color: var(--text-gray); margin-top: .2rem; }
