:root {
  --PrimarioO: #00329e;
  --PrimarioC: #60a5fa;
  --SecundarioO: #02760a;
  --SecundarioC: #78b67c;
  --Claro1: #e4eff9;
  --Claro2: #eafdeb;
  --Blanco: #fff;
  --Negro: #000;
  --GrisC: #c2c2c2;
  --GrisO: #767676;
  --Hover: #ecfa1e;

  --sombra: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radioBase: 18px;
  --fuente: 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--fuente); }
body { background: var(--Claro1); color: var(--Negro); min-height: 100vh; display: flex; flex-direction: column; }

input[type=radio] { display: none; }

.tabbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  display: flex; justify-content: space-around;
  background: var(--Claro2); border-top: 2px solid var(--Negro);
  box-shadow: var(--sombra); z-index: 100;
}

.tabbar label {
  flex: 1; text-align: center; padding: 10px 0;
  font-size: 0.9rem; cursor: pointer;user-select: none;
}

[id^="tab"]:checked ~ .tabbar label[for^="tab"] {
  color: inherit;
  font-weight: normal;
}
#tab1:checked ~ .tabbar label[for="tab1"],
#tab2:checked ~ .tabbar label[for="tab2"],
#tab3:checked ~ .tabbar label[for="tab3"],
#tab4:checked ~ .tabbar label[for="tab4"],
#tab5:checked ~ .tabbar label[for="tab5"] {
  color: var(--PrimarioO);
  font-weight: 600;
}

.main {
  flex: 1;
  padding: 0;
  margin: 0;
  overflow: hidden;
  display: none;
  height: calc(100vh - 60px);
}

#tab1:checked ~ .tab1,
#tab2:checked ~ .tab2,
#tab3:checked ~ .tab3,
#tab4:checked ~ .tab4,
#tab5:checked ~ .tab5 { display: block; }

.etiBase,
.inpBase,
.etiChico,
.inpChico {
    border: 1px solid var(--Negro);
    width: 100%;
    padding: 2px;
}
.etiBase,
.inpBase {
    font-size: 1rem;
}
.etiChico,
.inpChico {
    font-size: 0.8rem;
}
.etiBase,
.etiChico {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}
.inpBase,
.inpChico {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    overflow: hidden;
}
.etiBase {
    background: linear-gradient(to right, var(--PrimarioC), var(--Claro1));
    color: var(--Negro);
}
.inpBase {
    background-color: var(--Claro1);
    color: var(--Negro);
}
.etiChico {
    background: linear-gradient(to right, var(--SecundarioC), var(--Claro2));
    color: var(--Negro);
}
.inpChico {
    background-color: var(--Claro2);
    color: var(--Negro);
}
button {
  width: 100%;
  background: var(--PrimarioO);
  color: var(--Blanco);
  border: none;
  border-radius: 8px;
  padding: 2px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
}
button:hover { background: var(--PrimarioC); }

.cardPrin {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--Blanco);
  border-radius: var(--radioBase);
  box-shadow: var(--sombra);
  overflow-y: auto;
  margin: 3px;
  -webkit-overflow-scrolling: touch;
}
.cardPrin-header {
  flex-shrink: 0;
  padding: 1rem;
  border-bottom: 1px solid var(--Claro2);
  background: var(--Claro1);
  position: sticky;
  top: 0;
  z-index: 10;
}
.cardPrin-body {
  flex: 1;
  padding: 1rem;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.cardSec {
  background: var(--Blanco);
  border: 1px solid var(--Claro2);
  border-radius: var(--radioBase);
  box-shadow: var(--sombraLigera);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cardSec:hover {
  transform: scale(1.03);
  box-shadow: var(--sombra);
}
.cardSec img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radioBase);
}
.encRow {
  display: flex;
  align-items: center; 
  gap: 10px;
}
.logo {
  width: auto;
  max-width: 50px;
  height: auto;
  max-height: 50px;
  object-fit: contain;
}
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

.tabBase {
    border-collapse: collapse;
    width: 100%;
}
.tabBase td,
.tabBase th {
    border: 1px solid var(--GrisO);
    text-align: left;
    line-height: 1;
    padding: 1px 1px;
    font-size: 14px;
}
.tabBase th {
    background: linear-gradient(to bottom right, var(--Blanco), var(--SecundarioC));
    color: var(--Negro);
    text-align: center; 
    vertical-align: top;    
}
.tabBase tr {
    height: auto;
}
.tabBase td {
    background-color: var(--Blanco);
}
.tabBase tr:nth-child(even) td {
    background-color: var(--Claro1);
}
.tabBase tr:hover td {
    background-color: var(--Hover);
}
