/* Poya Mundial Colombia 2026 — v3.0 · XSoftia */

#poya-app, .poya-login-wrap {
  --col-yellow: #FCD116;
  --col-blue: #003087;
  --col-blue-dark: #001a54;
  --col-red: #CE1126;
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  max-width: 880px;
  margin: 0 auto;
  color: #1a1a2e !important;
  box-sizing: border-box;
}
#poya-app *, .poya-login-wrap * { box-sizing: border-box; }

/* ── LOGIN ──────────────────────────────────────────── */
.poya-login-wrap { display: flex; justify-content: center; padding: 3rem 1rem; }
.poya-login-card {
  background: #fff; border: 1px solid #e8e8ee; border-radius: var(--r-lg);
  padding: 2.5rem 2rem; text-align: center; max-width: 380px; width: 100%;
}
.poya-login-card h3 { font-size: 21px; font-weight: 700; margin: 1rem 0 .5rem; color: #1a1a2e; }
.poya-login-card p { color: #6b7280; font-size: 14px; margin-bottom: 1.5rem; line-height: 1.5; }

/* ── FLAG ───────────────────────────────────────────── */
.poya-flag { display: flex; gap: 3px; justify-content: center; }
.poya-flag span { display: block; width: 11px; height: 30px; border-radius: 2px; }
.poya-flag span:nth-child(1) { background: var(--col-yellow); width: 15px; }
.poya-flag span:nth-child(2) { background: var(--col-blue); }
.poya-flag span:nth-child(3) { background: var(--col-red); }

/* ── HEADER ─────────────────────────────────────────── */
.poya-header {
  background: linear-gradient(135deg, var(--col-blue), var(--col-blue-dark));
  border-radius: var(--r-lg); padding: 1.15rem 1.5rem; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.poya-header-left { display: flex; align-items: center; gap: 14px; }
.poya-header .poya-flag span { height: 26px; }
.poya-title { color: #fff; font-size: 17px; font-weight: 700; }
.poya-subtitle { color: rgba(255,255,255,.6); font-size: 12px; }
.poya-header-right { display: flex; align-items: center; gap: 10px; }
.poya-username { color: #fff; font-size: 13px; font-weight: 600; }
.poya-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--col-yellow);
  color: var(--col-blue); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.poya-points-badge {
  display: inline-block; background: var(--col-yellow); color: var(--col-blue);
  border-radius: 20px; padding: 2px 11px; font-size: 11px; font-weight: 700; margin-top: 2px;
}

/* ── TABS ───────────────────────────────────────────── */
.poya-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 1rem; }
.poya-tab {
  padding: 8px 18px; border-radius: var(--r-sm); font-size: 13px; cursor: pointer;
  border: 1px solid #d8d8e0; background: #fff; color: #6b7280;
  font-family: inherit; transition: .15s; font-weight: 500;
}
.poya-tab:hover:not(.active) { background: #f6f6f9; }
.poya-tab.active { background: var(--col-blue); color: #fff; border-color: var(--col-blue); }
.poya-tab-admin.active { background: #7c3aed; border-color: #7c3aed; }

/* ── PANELS ─────────────────────────────────────────── */
.poya-panel { display: none; }
.poya-panel.active { display: block; }

/* ── CARD ───────────────────────────────────────────── */
.poya-card {
  background: #fff; border: 1px solid #e8e8ee; border-radius: var(--r-lg);
  padding: 1.4rem; margin-bottom: 1rem;
}
.poya-card-title { font-size: 15px; font-weight: 700; color: #1a1a2e; margin: 0 0 1.1rem; }
.poya-card-desc { font-size: 13px; color: #6b7280; margin: -.5rem 0 1rem; line-height: 1.5; }

/* ── STATS ──────────────────────────────────────────── */
.poya-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1rem; }
.poya-stat {
  background: #fff; border: 1px solid #e8e8ee; border-radius: var(--r-md);
  padding: 1rem; text-align: center;
}
.poya-stat-num { display: block; font-size: 28px; font-weight: 800; color: var(--col-blue); line-height: 1; }
.poya-stat-label { font-size: 11px; color: #9ca3af; margin-top: 4px; }

/* ── MATCH ──────────────────────────────────────────── */
.poya-match {
  background: #fff; border: 1px solid #e8e8ee; border-radius: var(--r-md);
  padding: 1.1rem; margin-bottom: .8rem;
}
.poya-match-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .9rem; flex-wrap: wrap; gap: 6px;
}
.poya-match-date { font-size: 11px; color: #9ca3af; }
.poya-match-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.poya-phase {
  font-size: 10px; padding: 3px 9px; border-radius: 12px; font-weight: 700;
  background: #eef2ff; color: var(--col-blue);
}
.poya-chip { font-size: 10px; padding: 3px 9px; border-radius: 12px; font-weight: 700; }
.chip-exact { background: #d1fae5; color: #065f46; }
.chip-winner { background: #fef3c7; color: #92400e; }
.chip-miss { background: #fee2e2; color: #991b1b; }

.poya-match-body { display: flex; align-items: center; justify-content: center; gap: 14px; }
.poya-team {
  font-size: 14px; font-weight: 700; min-width: 92px; display: flex; align-items: center; gap: 6px; color: #1a1a2e;
}
.poya-team-home { justify-content: flex-end; text-align: right; }
.poya-team-away { justify-content: flex-start; }

.poya-score { display: flex; align-items: center; gap: 7px; }
.poya-score-input {
  width: 48px; height: 42px; border: 1.5px solid #d8d8e0; border-radius: var(--r-sm);
  text-align: center; font-size: 20px; font-weight: 800; color: #1a1a2e;
  background: #f9f9fc; font-family: inherit; -moz-appearance: textfield;
}
.poya-score-input::-webkit-outer-spin-button, .poya-score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.poya-score-input:focus { outline: none; border-color: var(--col-blue); background: #fff; }
.poya-score-input:disabled { opacity: .55; cursor: not-allowed; }
.poya-score-dash { font-size: 20px; color: #c0c0cc; font-weight: 700; }

.poya-match-real { text-align: center; font-size: 12px; color: #9ca3af; margin-top: .6rem; }
.poya-save-btn {
  display: block; width: 100%; margin-top: .9rem; padding: 9px;
  background: var(--col-blue); color: #fff; border: none; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .15s;
}
.poya-save-btn:hover { background: var(--col-blue-dark); }
.poya-save-btn.saved { background: #059669; }
.poya-save-btn:disabled { opacity: .6; cursor: default; }

.poya-hint { font-size: 12px; color: #9ca3af; padding: 0 .3rem; line-height: 1.5; }
.poya-hint strong { color: var(--col-blue); }

/* ── DEADLINE BAR ───────────────────────────────────── */
.poya-deadline-bar {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: linear-gradient(135deg, var(--col-yellow), #e8b800);
  color: var(--col-blue); border-radius: var(--r-md);
  padding: 10px 16px; margin-bottom: 1rem; font-size: 13px; font-weight: 700;
  text-align: center;
}
.poya-deadline-bar strong { color: var(--col-red); }
.poya-deadline-bar.closed { background: #fee2e2; color: #991b1b; }
.poya-deadline-bar.closed strong { color: #991b1b; }
.poya-deadline-icon { font-size: 16px; }

/* ── PRIZE HIGHLIGHT ────────────────────────────────── */
.poya-prize-highlight {
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(135deg, var(--col-blue), var(--col-blue-dark));
  color: #fff; border-radius: var(--r-md); padding: 1.2rem 1.4rem; margin: 1.2rem 0;
}
.poya-prize-highlight-icon { font-size: 32px; line-height: 1; flex-shrink: 0; }
.poya-prize-highlight-title { font-size: 15px; font-weight: 800; margin-bottom: 5px; color: var(--col-yellow); }
.poya-prize-highlight-text { font-size: 13px; line-height: 1.5; opacity: .95; }
.poya-prize-highlight-text strong { color: var(--col-yellow); }
.poya-prize-sub strong { color: var(--col-blue); font-weight: 800; }

/* ── REGISTRO ────────────────────────────────────────── */
.poya-register-card {
  background: #fff; border: 1px solid #e8e8ee; border-radius: var(--r-lg);
  padding: 0; overflow: hidden; max-width: 480px; margin: 0 auto;
}
.poya-register-hero {
  background: linear-gradient(135deg, var(--col-blue), var(--col-blue-dark));
  color: #fff; padding: 2rem 1.8rem 1.6rem; text-align: center;
}
.poya-register-icon { font-size: 56px; line-height: 1; margin-bottom: .6rem; }
.poya-register-hero h2 { font-size: 21px; font-weight: 800; margin: 0 0 .6rem; color: var(--col-yellow); }
.poya-register-hero p { font-size: 13px; line-height: 1.55; opacity: .95; margin: 0; }
.poya-register-hero strong { color: var(--col-yellow); }
.poya-register-form { padding: 1.6rem 1.8rem 1.8rem; }
.poya-field-hint { display: block; font-size: 11px; color: #9ca3af; margin-top: 4px; }
.poya-btn-block { width: 100%; display: block; padding: 12px; font-size: 15px; margin-top: .5rem; }
.poya-register-return { text-align: center; font-size: 13px; color: #6b7280; margin-top: 1.2rem; }
.poya-register-return a { color: var(--col-blue); font-weight: 600; text-decoration: none; }
.poya-register-return a:hover { text-decoration: underline; }

.poya-return-card {
  background: #fff; border: 1px solid #e8e8ee; border-radius: var(--r-lg);
  padding: 1.6rem 1.8rem; max-width: 480px; margin: 1rem auto 0; text-align: center;
}
.poya-return-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 .4rem; color: #1a1a2e; }
.poya-return-card p { font-size: 13px; color: #6b7280; margin: 0 0 1rem; }
.poya-link-back { display: inline-block; margin-top: 1rem; font-size: 13px; color: #6b7280; text-decoration: none; }
.poya-link-back:hover { color: var(--col-blue); }

.poya-logout {
  background: transparent; border: none; color: rgba(255,255,255,.7);
  font-size: 11px; cursor: pointer; padding: 2px 0; font-family: inherit; text-decoration: underline;
}
.poya-logout:hover { color: #fff; }

.poya-save-all-wrap { margin: 1.2rem 0; }
.poya-winner-row { font-size: 12px; color: #374151; padding: 5px 0; border-bottom: 1px solid #f0f0f4; }
.poya-winner-row:last-child { border-bottom: none; }

/* ── LEADERBOARD ────────────────────────────────────── */
.poya-rank { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-bottom: 1px solid #f0f0f4; }
.poya-rank:last-child { border-bottom: none; }
.poya-rank-me { background: #eef2ff; border-radius: var(--r-sm); }
.poya-rank-pos {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.pos-1 { background: var(--col-yellow); color: var(--col-blue); }
.pos-2 { background: #d4d4dd; color: #374151; }
.pos-3 { background: #fbbf24; color: #92400e; }
.pos-n { background: #f0f0f4; color: #9ca3af; }
.poya-rank-name { flex: 1; font-size: 14px; color: #1a1a2e; }
.poya-rank-meta { text-align: right; }
.poya-rank-pts { font-size: 14px; font-weight: 700; color: var(--col-blue); }
.poya-rank-detail { font-size: 11px; color: #9ca3af; }
.poya-trophy { font-size: 18px; }

/* ── PRIZE ──────────────────────────────────────────── */
.poya-prize-hero { text-align: center; padding: 1.5rem 0 1rem; }
.poya-prize-icon { font-size: 72px; line-height: 1; }
.poya-prize-name { font-size: 20px; font-weight: 800; color: #1a1a2e; margin: .7rem 0 .25rem; }
.poya-prize-sub { font-size: 13px; color: #9ca3af; }
.poya-progress { margin: 1.2rem 0; }
.poya-progress-head { display: flex; justify-content: space-between; font-size: 12px; color: #6b7280; margin-bottom: 5px; }
.poya-progress-track { height: 9px; background: #f0f0f4; border-radius: 5px; overflow: hidden; }
.poya-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--col-blue), #2563eb); border-radius: 5px; transition: width .5s; }
.poya-progress-nums { text-align: center; font-size: 12px; color: #9ca3af; margin-top: 5px; }
.poya-rules { margin-top: 1.3rem; display: flex; flex-direction: column; gap: .6rem; }
.poya-rule { display: flex; align-items: center; gap: 13px; font-size: 13px; color: #374151; background: #f9f9fc; border-radius: var(--r-sm); padding: .7rem 1rem; }
.poya-rule-pts { font-size: 15px; font-weight: 800; color: var(--col-blue); min-width: 32px; text-align: center; }

/* ── ADMIN ──────────────────────────────────────────── */
.poya-field { margin-bottom: .85rem; }
.poya-field label { display: block; font-size: 12px; font-weight: 600; color: #6b7280; margin-bottom: 5px; }
.poya-field input, .poya-field select {
  width: 100%; padding: 9px 11px; border: 1px solid #d8d8e0; border-radius: var(--r-sm);
  font-size: 14px; color: #1a1a2e; background: #f9f9fc; font-family: inherit;
}
.poya-field input:focus, .poya-field select:focus { outline: none; border-color: var(--col-blue); background: #fff; }
.poya-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.poya-result-form { max-width: 520px; }
.poya-result-scores { display: flex; align-items: flex-end; gap: .6rem; }
.poya-result-scores .poya-field { flex: 1; }
.poya-vs { padding-bottom: 11px; font-size: 20px; color: #c0c0cc; font-weight: 700; }

.poya-btn-primary {
  padding: 10px 20px; background: var(--col-blue); color: #fff; border: none;
  border-radius: var(--r-sm); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .15s;
}
.poya-btn-primary:hover { background: var(--col-blue-dark); }
.poya-btn-primary:disabled { opacity: .6; cursor: default; }
.poya-btn-secondary {
  padding: 9px 18px; background: transparent; color: var(--col-blue); border: 1px solid var(--col-blue);
  border-radius: var(--r-sm); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .15s;
}
.poya-btn-secondary:hover { background: #eef2ff; }

.poya-table-wrap { overflow-x: auto; }
.poya-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.poya-table th { text-align: left; padding: 9px 11px; font-size: 11px; font-weight: 700; color: #9ca3af; border-bottom: 1px solid #f0f0f4; white-space: nowrap; }
.poya-table td { padding: 9px 11px; border-bottom: 1px solid #f0f0f4; color: #374151; }
.poya-table tr:last-child td { border-bottom: none; }
.poya-table-pred { font-size: 17px; font-weight: 800; color: var(--col-blue); }
.poya-table-date { color: #9ca3af; font-size: 11px; }

/* ── DRAW ───────────────────────────────────────────── */
.poya-draw-card {
  background: linear-gradient(135deg, var(--col-blue), var(--col-blue-dark));
  border-radius: var(--r-lg); padding: 2rem; text-align: center; color: #fff; margin-bottom: 1rem;
}
.poya-draw-icon { font-size: 48px; line-height: 1; margin-bottom: .7rem; }
.poya-draw-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 .5rem; }
.poya-draw-card > p { font-size: 13px; opacity: .7; margin: 0 0 1.2rem; }
.poya-draw-empty { color: rgba(255,255,255,.6); font-size: 13px; }
.poya-draw-label { color: rgba(255,255,255,.85); font-size: 13px; margin-bottom: .5rem; }
.poya-draw-chip { display: inline-block; background: rgba(255,255,255,.15); color: #fff; border-radius: 20px; padding: 4px 13px; font-size: 12px; margin: 3px; }
#poya-winners-list { margin-bottom: 1.2rem; }
.poya-draw-btn {
  background: var(--col-yellow); color: var(--col-blue); border: none; border-radius: var(--r-sm);
  padding: 12px 30px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit; transition: .15s;
}
.poya-draw-btn:hover { transform: scale(1.04); }
.poya-draw-result { font-size: 22px; font-weight: 800; color: var(--col-yellow); margin-top: 1rem; min-height: 30px; }
.poya-draw-controls { margin-bottom: 1rem; }
.poya-draw-select {
  width: 100%; max-width: 400px; padding: 10px 12px; border-radius: var(--r-sm);
  border: none; font-size: 14px; font-family: inherit; color: #1a1a2e; background: #fff;
}
.poya-draw-select:focus { outline: 2px solid var(--col-yellow); }

/* ── MSG ────────────────────────────────────────────── */
.poya-msg { margin-top: .85rem; padding: 10px 14px; border-radius: var(--r-sm); font-size: 13px; display: none; }
.poya-msg.ok { background: #d1fae5; color: #065f46; }
.poya-msg.err { background: #fee2e2; color: #991b1b; }

/* ── LOADING / EMPTY ────────────────────────────────── */
.poya-loading, .poya-empty { color: #9ca3af; font-size: 14px; text-align: center; padding: 2rem; }

/* ── MODAL ──────────────────────────────────────────── */
.poya-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 999999; padding: 1rem;
}
.poya-modal { background: #fff; border-radius: var(--r-lg); padding: 1.8rem; max-width: 420px; width: 100%; }
.poya-modal h3 { font-size: 18px; font-weight: 700; margin: 0 0 1rem; color: #1a1a2e; }
.poya-modal-parts { font-size: 13px; color: #6b7280; margin-bottom: 1rem; line-height: 1.5; }
.poya-modal-winner { background: #f9f9fc; border-radius: var(--r-md); padding: 1.3rem; text-align: center; margin-bottom: 1rem; }
.poya-modal-prize { font-size: 12px; color: #9ca3af; margin-bottom: 5px; }
.poya-modal-name { font-size: 24px; font-weight: 800; color: var(--col-blue); }
.poya-modal-note { font-size: 11px; color: #9ca3af; margin-top: 5px; }
.poya-btn-primary, .poya-btn-secondary { font-family: inherit; }

@media (max-width: 560px) {
  .poya-config-grid { grid-template-columns: 1fr; }
  .poya-match-body { flex-direction: column; gap: 8px; }
  .poya-team-home, .poya-team-away { justify-content: center; text-align: center; }
}
