/* Bolão Copa 2026 — visual sóbrio e responsivo */
:root {
  --c-bg: #f5f6f8;
  --c-card: #ffffff;
  --c-border: #e0e3e8;
  --c-text: #1a1d24;
  --c-muted: #6b7280;
  --c-primary: #0f7a3a;       /* verde Brasil */
  --c-primary-hover: #0b5a2b;
  --c-accent: #ffd54a;        /* amarelo Brasil */
  --c-danger: #c0392b;
  --c-warn: #d97706;
  --c-success: #2e7d32;
  --c-info: #1e6091;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--c-bg); color: var(--c-text); }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- HEADER ----- */
.topbar {
  background: var(--c-primary); color: white; padding: .8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow);
}
.topbar h1 { font-size: 1.15rem; margin: 0; font-weight: 600; }
.topbar nav { display: flex; gap: 1.2rem; align-items: center; }
.topbar nav a {
  color: white; opacity: .92; font-size: .95rem;
}
.topbar nav a:hover { opacity: 1; text-decoration: underline; }
.topbar .user-info { font-size: .85rem; opacity: .85; }

/* ----- CONTAINERS ----- */
.container { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; }
.card {
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.card h2 { margin: 0 0 .8rem; font-size: 1.15rem; }
.card h3 { margin-top: 0; font-size: 1rem; color: var(--c-muted); }

/* ----- TABLE ----- */
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td {
  padding: .55rem .75rem; text-align: left;
  border-bottom: 1px solid var(--c-border);
}
table.t th { background: #f8f9fb; font-weight: 600; color: var(--c-muted); }
table.t tr:hover td { background: #fafbfc; }

/* ----- FORMS ----- */
form .row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
form label { display: block; font-size: .85rem; color: var(--c-muted);
    margin-bottom: .2rem; }
form input, form select, form textarea {
  width: 100%; padding: .55rem .65rem;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  font-size: .95rem; font-family: inherit; background: white;
}
form input:focus, form select:focus, form textarea:focus {
  outline: 2px solid var(--c-primary); outline-offset: -1px;
  border-color: var(--c-primary);
}
form .field { margin-bottom: .9rem; }

/* ----- BUTTONS ----- */
.btn {
  display: inline-block; padding: .55rem 1rem; border-radius: var(--radius);
  border: none; cursor: pointer; font-size: .95rem; font-weight: 500;
  background: var(--c-primary); color: white;
  transition: background .15s;
}
.btn:hover { background: var(--c-primary-hover); }
.btn:disabled { background: #c8cdd3; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--c-primary);
    border: 1px solid var(--c-primary); }
.btn.ghost:hover { background: rgba(15,122,58,.08); }
.btn.danger { background: var(--c-danger); }
.btn.warn { background: var(--c-warn); }
.btn.sm { padding: .3rem .65rem; font-size: .85rem; }

/* ----- BADGES ----- */
.badge {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  background: #eef0f2; color: var(--c-muted);
}
.badge.open { background: #def7e6; color: var(--c-success); }
.badge.locked { background: #f7d5d2; color: var(--c-danger); }
.badge.fase { background: #e7eef9; color: var(--c-info); }

/* ----- ALERTS ----- */
.alert { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem;
    border-left: 4px solid var(--c-info); background: #eff5fb; }
.alert.danger { border-color: var(--c-danger); background: #fcecea; color: #7b1a1a; }
.alert.warn   { border-color: var(--c-warn);   background: #fff5e0; color: #6b3d00; }
.alert.success{ border-color: var(--c-success);background: #eafaee; color: #1f4f23; }

/* ----- GAME CARDS (palpites) ----- */
.jogo {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: .9rem 1rem; margin-bottom: .9rem; background: #fff;
  display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 1rem;
  align-items: center;
}
.jogo .times { font-weight: 600; }
.jogo .placar input {
  width: 3rem; text-align: center; font-size: 1.1rem; padding: .3rem;
}
.jogo .meta { font-size: .8rem; color: var(--c-muted); margin-top: .25rem; }
.jogo .countdown { font-family: monospace; color: var(--c-warn); font-weight: 600; }
.jogo.locked { background: #fafafa; opacity: .85; }

/* ----- LOGIN ----- */
.login-wrap {
  max-width: 380px; margin: 5rem auto; padding: 0 1rem;
}
.login-wrap h1 { text-align: center; color: var(--c-primary);
    margin-bottom: 1.5rem; }

/* ----- ADMIN ----- */
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem;
    border-bottom: 1px solid var(--c-border); }
.tab {
  padding: .55rem 1rem; cursor: pointer; border: 0; background: none;
  font-size: .95rem; color: var(--c-muted); border-bottom: 2px solid transparent;
}
.tab.active { color: var(--c-primary); border-color: var(--c-primary);
    font-weight: 600; }

/* ----- UTILS ----- */
.muted { color: var(--c-muted); }
.right { text-align: right; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap { gap: .75rem; }
.between { justify-content: space-between; align-items: center; }
.small { font-size: .85rem; }
.hidden { display: none; }

@media (max-width: 700px) {
  .topbar nav { display: none; }
  .jogo { grid-template-columns: 1fr; gap: .5rem; text-align: center; }
}
