/* ===== RESET BÁSICO ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f3f3;
  color: #222;
}

/* ===== NAVBAR ===== */
.topbar {
  background: #000;
  color: #fff;
  border-bottom: 1px solid #222;
}

.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  height: 56px;
}

.brand a {
  color: #4a7bdc;
  font-size: 30px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
}

.nav a.active,
.nav a:hover {
  background: #1d4fa3;
}

.nav-search {
  margin-left: 8px;
}

.nav-search select,
.nav-search input,
.nav-search button {
  height: 32px;
  font-size: 12px;
  border-radius: 4px;
}

.nav-search select,
.nav-search input {
  border: 1px solid #444;
  background: #fff;
  padding: 0 8px;
}

.nav-search select {
  width: 180px;
}

.nav-search input {
  width: 280px;
}

.nav-search button {
  background: #1d4fa3;
  color: #fff;
  border: none;
  padding: 0 12px;
  font-weight: 700;
}

/* ===== BOTÓN HAMBURGUESA ===== */
.menu-toggle {
  font-size: 22px;
  cursor: pointer;
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 0 6px;
}

/* ===== MENU LATERAL ===== */
.side-menu {
  position: fixed;
  top: 0;
  left: -320px;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  transition: left 0.25s ease;
}

.side-menu.open {
  left: 0;
}

.side-menu-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8f9fb;
}

.side-menu-title {
  font-weight: 700;
  color: #222;
}

.side-menu-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: #444;
}

.side-menu-body {
  padding: 14px;
  overflow-y: auto;
}

.side-search {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.side-search select,
.side-search input,
.side-search button {
  height: 38px;
  font-size: 13px;
}

.side-search select,
.side-search input {
  border: 1px solid #d7dce2;
  border-radius: 4px;
  padding: 0 10px;
}

.side-search button {
  border: 0;
  border-radius: 4px;
  background: #1d4fa3;
  color: #fff;
  font-weight: 700;
}

.side-links {
  display: flex;
  flex-direction: column;
}

.side-links a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid #ececec;
  color: #1d4fa3;
  font-weight: 600;
  text-decoration: none;
}

/* ===== OVERLAY ===== */
.side-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.side-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ===== CONTENIDO ===== */
.page-wrap {
  max-width: 1300px;
  margin: 24px auto;
  padding: 0 16px;
}

.narrow-wrap {
  max-width: 560px;
}

.content-grid {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 20px;
}

.box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
}

.box-title {
  background: #f4f6f8;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e7eb;
}

.box-body {
  padding: 14px;
}

.headline {
  font-size: 24px;
  color: #1d4fa3;
  margin: 0 0 10px 0;
}

.headline-sub {
  color: #666;
}

.hero-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.hero-table th,
.hero-table td {
  border: 1px solid #e3e7ec;
  padding: 8px;
  font-size: 12px;
  text-align: left;
}

.hero-table th {
  background: #f8f9fb;
}

.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.simple-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.links-list a {
  display: block;
  padding: 6px 0;
  color: #1d4fa3;
  text-decoration: none;
}

.positive { color: #16a34a; font-weight: 700; }
.negative { color: #dc2626; font-weight: 700; }

.btn-dark,
.btn-light {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.btn-dark { background: #1f2937; color: #fff; }
.btn-light { background: #fff; color: #555; border: 1px solid #ccc; }

.form-box input,
.form-box textarea,
.form-box button {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 10px;
}

.form-box button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
}

/* ===== ESCRITORIO ===== */
@media (min-width: 769px) {
  .side-menu,
  .side-menu-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .menu-toggle {
    display: none;
  }
}

/* ===== MÓVIL ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-block;
  }

  .nav {
    display: none !important;
  }

  .content-grid {
    display: block;
  }

  .left-col {
    display: none;
  }

  .right-col {
    margin-top: 15px;
  }
}
