/* =========================================================
   TAB MI MES · contenedores generales
   Inspirado en costes-detail-*
   ========================================================= */

.costes-mimes-body{
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.costes-mimes-block{
  border-radius: 18px;
  border: 1px solid rgba(130, 155, 178, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0.008) 100%),
    #0d1318;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  overflow: hidden;
  min-height: 0;
}

.costes-mimes-blockbody{
  padding: 10px;
  min-height: 0;
}

.costes-mimes-matrix-host{
  min-height: 0;
  width: 100%;
}


/* =========================================================
   MI MES · estructura interna
   ========================================================= */

.mimes-content-wrap{
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.mimes-month-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.mimes-month-title{
  font-size: 16px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  letter-spacing: .2px;
}

.mimes-month-badges{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mimes-month-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(55,242,166,.24);
  background: rgba(55,242,166,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}


/* =========================================================
   MI MES · panel del grid con look tipo costes-detail
   ========================================================= */

.mimes-grid-panel{
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(130, 155, 178, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.015) 0%, rgba(255,255,255,0.008) 100%),
    #101820;
  box-shadow: none;
}

.mimes-grid-header-row{
  display: flex;
  width: 100%;
  border-bottom: 1px solid rgba(130, 155, 178, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.022) 0%, rgba(255,255,255,0.01) 100%),
    #15202a;
}

.mimes-grid-corner{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.022) 0%, rgba(255,255,255,0.01) 100%),
    #15202a;
  border-right: 1px solid rgba(130, 155, 178, 0.18);
}

.mimes-grid-header-track{
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.022) 0%, rgba(255,255,255,0.01) 100%),
    #15202a;
}

.mimes-grid-daymark{
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
}

.mimes-grid-mainplane{
  display: flex;
  width: 100%;
  align-items: flex-start;
}

.mimes-grid-leftaxis{
  position: relative;
  flex: 0 0 auto;
  border-right: 1px solid rgba(130, 155, 178, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0.008)),
    #101820;
  overflow: hidden;
}

.mimes-grid-hourlabel{
  backdrop-filter: blur(6px);
  color: #c9ffe3;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.mimes-grid-canvas{
  position: relative;
  flex: 1 1 auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.005)),
    linear-gradient(90deg, rgba(55,242,166,0.012), rgba(255,255,255,0.00) 24%, rgba(255,255,255,0.00) 76%, rgba(55,242,166,0.012)),
    #101820;
  overflow: hidden;
}

.mimes-grid-dayline{
  width: 1px;
  background: rgba(255,255,255,.055);
  pointer-events: none;
}

.mimes-grid-hourline{
  height: 1px;
  background: rgba(130,155,178,.14);
  pointer-events: none;
}

.mimes-grid-cardslot{
  overflow: visible;
}


/* =========================================================
   MI MES · bloque fuera de rango
   ========================================================= */

.mimes-outside-block{
  border-radius: 12px;
  border: 1px solid rgba(130, 155, 178, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.012), rgba(255,255,255,0.006)),
    #101820;
  padding: 10px;
}

.mimes-outside-title{
  color: #f6c26e;
  font-weight: 800;
  font-size: 13px;
  margin: 0 0 8px 0;
}

.mimes-outside-cards{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


/* =========================================================
   MI MES · TARJETAS PARTIDOS / EVENTOS
   ========================================================= */

.mimes-tl-wrap{
  position: relative;
  overflow: visible;
}

.mimes-tl-card{
  position: relative;
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  height: 34px;
  padding: 3px 4px 3px 4px;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  overflow: visible;
  box-sizing: border-box;
  box-shadow:
    0 4px 10px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.03);
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease;
}

.mimes-tl-card:hover{
  transform: translateY(-1px) scale(1.03);
}

.mimes-tl-card.is-match{
  background: linear-gradient(180deg, rgba(22,28,32,.96), rgba(14,18,22,.98));
}

.mimes-tl-card.is-event{
  background: linear-gradient(180deg, rgba(19,25,31,.96), rgba(12,16,20,.98));
}

.mimes-tl-card.is-km{
  border: 2px solid #39FF14;
  box-shadow:
    0 0 8px rgba(57,255,20,.18),
    0 4px 10px rgba(0,0,0,.26);
}

.mimes-tl-card.is-nokm{
  border: 2px solid #8f98a3;
  box-shadow:
    0 0 6px rgba(143,152,163,.14),
    0 4px 10px rgba(0,0,0,.26);
}

.mimes-tl-shields-row{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 100%;
  margin-top: 0;
}

.mimes-tl-shield{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #2f3438;
  border: 1.4px solid rgba(233,255,247,.92);
  box-shadow: 0 1px 2px rgba(0,0,0,.32);
  flex: 0 0 auto;
}

.mimes-tl-event-icon-wrap{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.mimes-tl-event-icon{
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}


/* =========================================================
   MI MES · TARJETAS TICKETS + HOVER
   ========================================================= */

.mimes-tk-card{
  position: relative;
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  height: 34px;
  padding: 2px 4px;
  border-radius: 10px;
  cursor: pointer;
  overflow: visible;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid rgba(240,173,78,0.95);
  background: linear-gradient(180deg, rgba(48,34,16,.96), rgba(24,16,8,.98));
  box-shadow:
    0 0 8px rgba(240,173,78,.16),
    0 4px 10px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.03);

  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease;
}

.mimes-tk-card:hover{
  transform: translateY(-1px) scale(1.03);
}

.mimes-tk-amount{
  font-size: 9.5px;
  line-height: 1;
  font-weight: 900;
  color: #fff4dd;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

.mimes-tk-hovercard{
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .16s ease;

  min-width: 250px;
  max-width: 280px;
  z-index: 99999;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(700px 120px at 20% 0%, rgba(255,255,255,0.05), transparent 60%),
    rgba(10, 12, 16, 0.96);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.52),
    0 0 0 1px rgba(255,255,255,0.03) inset;
  backdrop-filter: blur(10px);

  padding: 10px;
}

.mimes-tk-card:hover .mimes-tk-hovercard{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mimes-tk-hover-toprow{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mimes-tk-hover-thumb{
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mimes-tk-hover-thumb-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mimes-tk-hover-top{
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mimes-tk-hover-title{
  color: rgba(255,255,255,0.94);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  word-break: break-word;
}

.mimes-tk-hover-sub{
  color: rgba(255,255,255,0.64);
  font-size: 11px;
  line-height: 1.15;
}

.mimes-tk-hover-money{
  color: #ffd38a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  margin-left: 4px;
}

.mimes-tk-hover-meta{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mimes-tk-hover-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  color: rgba(255,255,255,0.84);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  white-space: nowrap;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 860px){
  .mimes-tl-card,
  .mimes-tk-card{
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    height: 32px;
    padding: 3px;
  }

  .mimes-tl-shield{
    width: 17px;
    height: 17px;
  }

  .mimes-tl-event-icon{
    width: 18px;
    height: 18px;
  }

  .mimes-tk-amount{
    font-size: 9px;
  }

  .mimes-tk-hovercard{
    min-width: 220px;
    max-width: 240px;
  }
}