:root {
  --dom-primario: #005a9c;
  --dom-secundario: #e8f0f7;
  --dom-fondo: #f4f6f8;
  --dom-texto: #333;
  --dom-borde: #dee2e6;
  --dom-sombra: 0 4px 14px rgba(0, 0, 0, 0.08);
  --dom-radio: 8px;
}

* {
  box-sizing: border-box;
}

body.dom-page {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dom-texto);
  background: var(--dom-fondo);
}

.dom-header img {
  display: block;
  width: 100%;
  max-width: 1186px;
  height: auto;
  margin: 0 auto;
}

.dom-main {
  max-width: 1200px;
  margin: 24px auto 48px;
  padding: 0 16px;
}

.dom-volver {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 10px 18px;
  border-radius: var(--dom-radio);
  background: var(--dom-secundario);
  color: var(--dom-primario);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--dom-borde);
  transition: background 0.2s, transform 0.15s;
}

.dom-volver:hover {
  background: #fff;
  transform: translateY(-1px);
}

.dom-card {
  background: #fff;
  border: 1px solid var(--dom-borde);
  border-radius: var(--dom-radio);
  box-shadow: var(--dom-sombra);
  padding: 28px 24px 32px;
}

.dom-card h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dom-primario);
  text-align: center;
  border-bottom: 2px solid var(--dom-secundario);
  padding-bottom: 14px;
}

.dom-subtitulo {
  margin: 0 0 24px;
  text-align: center;
  color: #5c6670;
  font-size: 0.95rem;
}

.dom-years-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
  max-width: 820px;
  margin: 0 auto;
}

.dom-year {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 10px 8px;
  border-radius: var(--dom-radio);
  border: 1px solid var(--dom-borde);
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
}

.dom-year-num {
  font-size: 1rem;
  line-height: 1.2;
}

.dom-year-gloss {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

a.dom-year {
  text-decoration: none;
  cursor: pointer;
}

.dom-year-ok {
  background: #e8f5e9;
  border-color: #43a047;
  color: #2e7d32;
}

a.dom-year-ok:hover {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.28);
}

.dom-year-empty {
  background: #fff3e0;
  border-color: #fb8c00;
  color: #e65100;
  cursor: default;
  user-select: none;
}

.dom-year-empty .dom-year-gloss {
  color: #ef6c00;
}

.dom-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--dom-borde);
  font-size: 0.85rem;
  color: #5c6670;
}

.dom-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dom-legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.dom-legend-ok {
  background: #e8f5e9;
  border-color: #43a047;
}

.dom-legend-empty {
  background: #fff3e0;
  border-color: #fb8c00;
}

.dom-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid var(--dom-borde);
  border-radius: var(--dom-radio);
}

.dom-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.dom-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--dom-primario);
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.25;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.dom-table tbody td {
  padding: 8px;
  border-bottom: 1px solid var(--dom-borde);
  border-right: 1px solid #eef1f4;
  text-align: center;
  vertical-align: middle;
}

.dom-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.dom-table tbody tr:hover {
  background: #f0f6fb;
}

.dom-table .col-num {
  font-weight: 600;
  white-space: nowrap;
}

.dom-table .col-fecha {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dom-table .col-desc {
  text-align: left;
  max-width: 220px;
  word-break: break-word;
}

.dom-ver-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--dom-secundario);
  border: 1px solid #c5d9ea;
  color: var(--dom-primario);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.dom-ver-link:hover {
  background: var(--dom-primario);
  color: #fff;
  border-color: var(--dom-primario);
}

.dom-ver-link .dom-eye {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dom-hist-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #666;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.dom-empty {
  padding: 28px 16px;
  text-align: center;
  color: #6c757d;
  font-size: 0.95rem;
}

.dom-footer {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 20px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #6c757d;
  border-top: 1px solid var(--dom-borde);
}

.dom-footer a {
  color: var(--dom-primario);
  text-decoration: none;
}

.dom-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .dom-card {
    padding: 20px 14px 24px;
  }

  .dom-card h1 {
    font-size: 1.2rem;
  }

  .dom-years-grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
  }

  .dom-year-gloss {
    font-size: 0.58rem;
  }
}
