/* MS 2026 Tipovačka - styly */
* { box-sizing: border-box; }
html { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
body {
    margin: 0; padding: 0;
    background: #f4f6f9; color: #222;
    line-height: 1.5;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.topbar { background: #102a43; color: #fff; padding: 12px 0; box-shadow: 0 2px 4px rgba(0,0,0,.1); }
.topbar .container { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar .logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15em; }
.topbar nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.topbar nav a { color: #d9e2ec; text-decoration: none; font-size: .95em; }
.topbar nav a:hover { color: #fff; }
.topbar nav a.admin { color: #ffc857; font-weight: 600; }
.topbar nav .user { color: #ffc857; font-size: .9em; }

main { padding: 20px 0 40px; min-height: calc(100vh - 130px); }

h1 { margin-top: 0; color: #102a43; }
h2 { color: #102a43; margin-top: 28px; }

.flash { padding: 10px 14px; margin-bottom: 16px; border-radius: 6px; }
.flash-ok { background: #c8f7d6; color: #0a4d20; border: 1px solid #6bd292; }
.flash-err { background: #ffd5d5; color: #7a0c0c; border: 1px solid #f08383; }
.flash-info { background: #d4ecff; color: #0a3a6b; border: 1px solid #7eb9f0; }

table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); border-radius: 8px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef2f7; }
th { background: #f0f4f8; color: #486581; font-weight: 600; font-size: .85em; text-transform: uppercase; }
tbody tr:hover { background: #f8fafc; }
tr.locked { background: #faf5e8; }
tr.locked:hover { background: #f6efd9; }
tr.evaluated td.points { font-weight: 700; }

.score { font-family: "Courier New", monospace; font-size: 1.1em; font-weight: 600; }
.tip-input { width: 50px; padding: 4px 6px; font-size: 1em; text-align: center; border: 1px solid #bcccdc; border-radius: 4px; }
.tip-input:focus { outline: 2px solid #486581; border-color: #486581; }

.btn { display: inline-block; padding: 8px 18px; background: #102a43; color: #fff; border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; font-size: .95em; }
.btn:hover { background: #243b53; }
.btn-primary { background: #d6730a; }
.btn-primary:hover { background: #b85d00; }
.btn-sm { padding: 4px 10px; font-size: .85em; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .8em; font-weight: 600; }
.badge-locked { background: #fde68a; color: #7a4a00; }
.badge-open { background: #c8f7d6; color: #0a4d20; }
.badge-final { background: #dbeafe; color: #1e3a8a; }
.badge-3pt { background: #6bd292; color: #fff; }
.badge-1pt { background: #f0c453; color: #fff; }
.badge-0pt { background: #d9e2ec; color: #486581; }

.points-3 { color: #0a8038; font-weight: 700; }
.points-1 { color: #b85d00; font-weight: 600; }
.points-0 { color: #999; }

.leaderboard td.rank { width: 50px; text-align: center; font-weight: 700; font-size: 1.1em; color: #486581; }
.leaderboard tr.rank-1 td.rank { color: #ffc857; }
.leaderboard tr.rank-1 td.rank::before { content: "🥇 "; }
.leaderboard tr.rank-2 td.rank::before { content: "🥈 "; }
.leaderboard tr.rank-3 td.rank::before { content: "🥉 "; }
.leaderboard td.points { text-align: right; font-weight: 700; font-size: 1.05em; }

.match-row .stage { display: inline-block; width: 24px; height: 24px; border-radius: 50%; background: #486581; color: #fff; text-align: center; line-height: 24px; font-weight: 700; font-size: .8em; }
.match-row .stage.A { background: #d6730a; }
.match-row .stage.B { background: #486581; }
.match-row .stage.Č,
.match-row .stage.S,
.match-row .stage.\31 ,
.match-row .stage.\33  { background: #102a43; }

.login-form { max-width: 360px; margin: 60px auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.login-form input { display: block; width: 100%; padding: 10px; margin-bottom: 12px; border: 1px solid #bcccdc; border-radius: 4px; font-size: 1em; }
.login-form .btn { width: 100%; padding: 12px; font-size: 1em; }

.footer { background: #102a43; color: #d9e2ec; padding: 14px 0; text-align: center; font-size: .85em; }

@media (max-width: 700px) {
    .topbar .container { gap: 12px; }
    .topbar nav { gap: 12px; font-size: .9em; }
    table { font-size: .9em; }
    th, td { padding: 6px 4px; }
    .tip-input { width: 40px; }
}

/* Tabulka všech tipů */
.all-tips-table { font-size: .85em; }
.all-tips-table th { writing-mode: vertical-rl; transform: rotate(180deg); padding: 8px 4px; height: 100px; }
.all-tips-table td { text-align: center; padding: 6px 4px; }
.all-tips-table td.match-info { text-align: left; white-space: nowrap; }
