/* ---------- Brand Header ---------- */
.brand-header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: var(--s-3);
  padding-top: var(--s-5);
  padding-bottom: var(--s-4);
}
.brand-logo{ width: 86px; height:auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }
.brand-title{
  margin:0;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: var(--fw-bold);
  color: #fff;
  text-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.brand-subtitle{
  margin:0;
  color: rgba(255,255,255,.85);
  font-weight: var(--fw-medium);
}

/* ---------- Card ---------- */
.card{
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(255,255,255,.55);
  overflow:hidden;
}
.card__inner{ padding: var(--s-5); }
.card__title{
  margin:0 0 var(--s-4);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.divider{ height:1px; background: var(--divider); margin: var(--s-5) 0; }

/* ---------- Buttons ---------- */
.btn{
  height: var(--btn-h);
  padding: 0 var(--s-6);
  border-radius: var(--r-md);
  border: 0;
  font-family: var(--font);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: var(--s-2);
  box-shadow: var(--shadow-2);
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.btn--block{ width:100%; }
.btn--primary{
  color:#fff;
  background: linear-gradient(180deg, var(--primary-500), var(--primary-700));
}
.btn--primary:active{ transform: translateY(1px); }
.btn--success{
  color:#fff;
  background: linear-gradient(180deg, var(--success-500), var(--success-700));
}
.btn--success:active{ transform: translateY(1px); }

.btn--outline{
  color:#fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: none;
}
.btn[disabled], .btn.is-disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* ---------- Form ---------- */
.field{ display:flex; flex-direction:column; gap: var(--s-2); margin-bottom: var(--s-4); }
.label{
  font-weight: var(--fw-semibold);
  color: var(--text);
}

.input, .select{
  height: var(--input-h);
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--input-bg);
  padding: 0 var(--s-4);
  font-family: var(--font);
  font-size: var(--fs-base);
  outline: none;
}
.input::placeholder{ color: var(--muted); }

.input-group{
  display:flex;
  align-items:center;
  height: var(--input-h);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--input-bg);
  overflow:hidden;
}
.input-prefix{
  padding: 0 var(--s-4);
  font-weight: var(--fw-semibold);
  color: var(--text);
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  height: 100%;
  display:flex;
  align-items:center;
}
.input-group input{
  border:0;
  background: transparent;
  height:100%;
  flex:1;
  padding: 0 var(--s-4);
  font-family: var(--font);
  font-size: var(--fs-base);
  outline:none;
}
.helper{
  margin: var(--s-2) 0 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
}

/* ---------- OTP ---------- */
.otp{
  display:flex;
  gap: var(--s-2);
  justify-content:space-between;
}
.otp__cell{
  width: 44px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align:center;
  font-size: 18px;
  font-weight: var(--fw-semibold);
  outline:none;
}
@media (min-width:420px){
  .otp{ justify-content:flex-start; }
  .otp__cell{ width: 52px; height: 52px; }
}

/* ---------- Icon button ---------- */
.icon-btn{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.10);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.icon-btn img, .icon-btn svg{ width:20px; height:20px; }

/* =========================================================
   PRONÓSTICOS - GRID FIJO CON BANDERAS EN COLUMNA
   ========================================================= */

.match-card{
  border: 1px solid #d9dfea;
  border-radius: 24px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(22, 45, 90, 0.05);
}

.match-main-grid{
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 14px;
  align-items: center;
  padding: 18px 18px 14px;
}

.match-flag{
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.match-flag--left{
  grid-column: 1;
  grid-row: 1 / 3;
}

.match-flag--right{
  grid-column: 3;
  grid-row: 1 / 3;
}

.match-flag img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  display: block;
  border: 1px solid #d8e0ef;
  background: #fff;
}

.match-flag-fallback{
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3ff;
  color: #1b3f81;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #d8e0ef;
}

.match-title-block{
  grid-column: 2;
  grid-row: 1;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #173f84;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-score-block{
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.score__box{
  width: 70px;
  height: 54px;
  border: 1px solid #d5dce8;
  border-radius: 16px;
  background: #f7f8fc;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: #173f84;
  outline: none;
}

.score__box:focus{
  border-color: #6a8fd8;
  box-shadow: 0 0 0 3px rgba(64, 120, 255, 0.12);
}

.score__dash{
  font-size: 28px;
  font-weight: 700;
  color: #394b73;
  line-height: 1;
}

.match-foot{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid #e3e8f2;
  color: #56698f;
  font-size: 14px;
  font-weight: 600;
}

.match-foot > span:first-child{
  min-width: 0;
}

.badge--small{
  flex-shrink: 0;
}

/* Tablet */
@media (max-width: 1024px){
  .match-main-grid{
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    column-gap: 10px;
    row-gap: 12px;
  }

  .match-flag{
    width: 56px;
    height: 56px;
  }

  .match-title-block{
    font-size: 17px;
  }

  .score__box{
    width: 64px;
    height: 50px;
    font-size: 20px;
  }

  .score__dash{
    font-size: 24px;
  }
}

/* Mobile */
@media (max-width: 640px){
  .match-main-grid{
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    column-gap: 10px;
    row-gap: 12px;
    padding: 16px 14px 12px;
  }

  .match-flag{
    width: 48px;
    height: 48px;
  }

  .match-title-block{
    font-size: 16px;
  }

  .match-score-block{
    gap: 10px;
  }

  .score__box{
    width: 58px;
    height: 46px;
    font-size: 18px;
    border-radius: 14px;
  }

  .score__dash{
    font-size: 20px;
  }

  .match-foot{
    padding: 12px 14px;
    font-size: 13px;
    gap: 10px;
    flex-wrap: wrap;
  }
}

/* Mobile pequeño */
@media (max-width: 400px){
  .match-main-grid{
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    column-gap: 8px;
    row-gap: 10px;
  }

  .match-flag{
    width: 40px;
    height: 40px;
  }

  .match-title-block{
    font-size: 14px;
  }

  .score__box{
    width: 50px;
    height: 42px;
    font-size: 16px;
  }

  .score__dash{
    font-size: 18px;
  }
}