/* portal.css: hereda colores/tipografías/botones/cards de ../styles.css.
   Acá solo definimos layout del portal + tablas + utilitarios específicos. */

.portal{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  padding: 18px 0 34px;
}

@media (max-width: 980px){
  .portal{ grid-template-columns: 1fr; }
}

.portal__side{
  display:flex;
  flex-direction:column;
  gap: 16px;
}

.portal__content{
  display:flex;
  flex-direction:column;
  gap: 16px;
}

.portal__card{
  /* usa .card del landing; esto solo normaliza paddings en el portal */
  padding: 18px;
}

.header{
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}

.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 0;
}

.header__actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
}

/* Brand (compacto) */
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
  color: inherit;
}

.brand__mark{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  font-weight: 900;
  letter-spacing: .2px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 85%, white), color-mix(in srgb, var(--featured) 85%, white));
  color: var(--bg);
}

.brand__text{ display:flex; flex-direction:column; line-height:1.1; }
.brand__name{ font-weight: 900; }
.brand__sub{ font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Inputs */
.label{ display:block; margin: 10px 0 6px; color: var(--muted); font-size: 13px; }
.input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  background: color-mix(in srgb, var(--bg) 82%, white);
  color: var(--text);
  outline: none;
}
.input:focus{
  border-color: color-mix(in srgb, var(--primary) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.row{ display:flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sep{ border: none; border-top: 1px solid color-mix(in srgb, var(--muted) 18%, transparent); margin: 14px 0; }

.hint{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 84%, white);
  border: 1px dashed color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--muted);
  line-height: 1.5;
}
.hint code{
  color: color-mix(in srgb, var(--primary) 75%, white);
  font-weight: 700;
}

.mini__title{ font-weight: 900; margin-bottom: 8px; }
.link{ color: color-mix(in srgb, var(--primary) 75%, white); text-decoration: none; font-weight: 800; }
.link:hover{ text-decoration: underline; }

/* NAV más clara (sidebar) */
.nav{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.nav__item{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;

  padding: 12px 14px;
  border-radius: 14px;

  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
  background: color-mix(in srgb, var(--bg) 86%, white);

  text-decoration:none;
  color: var(--text);
  font-weight: 900;

  transition: transform .12s ease, filter .12s ease, border-color .12s ease, background .12s ease;
}

/* Hover más evidente */
.nav__item:hover{
  filter: brightness(1.06);
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 28%, transparent);
}

/* Activo: resalta dónde estás */
.nav__item.is-active{
  background: color-mix(in srgb, var(--primary) 14%, var(--bg));
  border-color: color-mix(in srgb, var(--primary) 38%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

/* “Indicador” a la derecha */
.nav__item::after{
  content: "→";
  opacity: .55;
  font-weight: 900;
}

.nav__item.is-active::after{
  opacity: 1;
}

/* Hero */
.portalHero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 14px;
}
@media (max-width: 720px){
  .portalHero{ flex-direction:column; }
}

.pill{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  color: color-mix(in srgb, var(--primary) 85%, white);
  font-size: 13px;
  margin-bottom: 10px;
  font-weight: 800;
}

.h1{ margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.sectionTitle{ margin: 0 0 10px; font-size: 18px; font-weight: 900; }
.muted{ color: var(--muted); }

.portalHero__meta{ display:flex; gap: 12px; flex-wrap: wrap; }
.meta{
  min-width: 170px;
  border-radius: 14px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bg) 86%, white);
  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
}
.meta__k{ font-size: 12px; color: var(--muted); }
.meta__v{ margin-top: 2px; font-weight: 900; }

/* KPI grid */
.kpis{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}
@media (max-width: 980px){
  .kpis{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi{
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--bg) 86%, white);
  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
}
.kpi__k{ font-size: 12px; color: var(--muted); }
.kpi__v{ margin-top: 4px; font-weight: 900; font-size: 18px; }
.kpi__s{ margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.3; }

/* Two columns */
.two{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 900px){
  .two{ grid-template-columns: 1fr; }
}
.box{
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--bg) 86%, white);
  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
}
.box__title{ font-weight: 900; margin-bottom: 8px; }

.list{ margin: 0; padding-left: 18px; }
.list li{ margin: 6px 0; }

/* Tables */
.tableWrap{
  overflow:auto;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
}
.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: color-mix(in srgb, var(--bg) 88%, white);
}
.table th, .table td{
  padding: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 16%, transparent);
  font-size: 13px;
  vertical-align: top;
}
.table th{
  text-align: left;
  color: var(--muted);
  font-weight: 900;
}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
  background: color-mix(in srgb, var(--bg) 86%, white);
  font-weight: 900;
  font-size: 12px;
}
.badge--pub{ border-color: color-mix(in srgb, var(--featured) 35%, transparent); color: color-mix(in srgb, var(--featured) 85%, white); }
.badge--sch{ border-color: color-mix(in srgb, #fbbf24 35%, transparent); color: color-mix(in srgb, #fbbf24 85%, white); }
.badge--draft{ border-color: color-mix(in srgb, #ef4444 35%, transparent); color: color-mix(in srgb, #ef4444 85%, white); }

/* Deliverables */
.deliverables{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 980px){
  .deliverables{ grid-template-columns: 1fr; }
}
.tile{
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--bg) 86%, white);
  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
}
.tile__t{ font-weight: 900; }
.tile__d{ margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.tile__a{ display:inline-block; margin-top: 10px; font-weight: 900; color: color-mix(in srgb, var(--primary) 75%, white); text-decoration: none; }
.tile__a:hover{ text-decoration: underline; }

.portalFooter{
  padding: 4px 2px 2px;
}

.tile__a--disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none;
}
