/* SF Fantasy Manager - komponenty v barvach webu (Teko/Montserrat, sparta ruda) */
:root {
    --fm-red: #921010;
    --fm-red-dark: #720a0a;
    --fm-red-light: #b01818;
    --fm-blue: #2659a6;
    --fm-gold: #FFC312;
    --fm-dark: #0d0d0d;
}

.fm-wrap { font-family: "Montserrat", sans-serif; padding: 0 15px 30px 15px; }
.fm-wrap h2, .fm-wrap h3, .fm-wrap h4 {
    font-family: "Teko", sans-serif;
    text-transform: uppercase;
    color: var(--fm-dark);
    letter-spacing: 1px;
}

/* tlacitka */
.fm-btn {
    display: inline-block;
    font-family: "Teko", sans-serif;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--fm-red);
    color: #fff;
    border: none;
    padding: 6px 22px 4px 22px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.fm-btn:hover { background: var(--fm-red-light); color: #fff; text-decoration: none; }
.fm-btn:disabled { background: #999; cursor: not-allowed; }
.fm-btn.fm-btn-blue { background: var(--fm-blue); }
.fm-btn.fm-btn-sm { font-size: 1rem; padding: 3px 12px 2px 12px; }

/* zalozky sekce */
.fm-tabs { margin: 15px 0 5px 0; }
.fm-tabs a {
    font-family: "Teko", sans-serif;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: var(--fm-dark);
    margin-right: 25px;
    text-decoration: none;
    padding-bottom: 2px;
}
.fm-tabs a.active, .fm-tabs a:hover { color: var(--fm-red); border-bottom: 3px solid var(--fm-red); }

/* deadline box */
.fm-deadline {
    background: var(--fm-dark);
    color: #fff;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.fm-deadline .fm-deadline-label { font-family: "Teko", sans-serif; font-size: 1.3rem; text-transform: uppercase; }
.fm-deadline .fm-countdown { font-family: "Teko", sans-serif; font-size: 1.6rem; color: var(--fm-gold); letter-spacing: 2px; }
.fm-deadline.fm-locked .fm-countdown { color: var(--fm-red-light); }

/* rozpocet */
.fm-budget-bar { background: #e5e5e5; height: 26px; position: relative; margin: 8px 0 4px 0; }
.fm-budget-fill { background: var(--fm-blue); height: 100%; transition: width .2s; }
.fm-budget-fill.fm-over { background: var(--fm-red-light); }
.fm-budget-text {
    position: absolute; top: 0; left: 0; right: 0;
    text-align: center; line-height: 26px;
    font-family: "Teko", sans-serif; font-size: 1.15rem; color: #fff;
    text-shadow: 0 0 3px rgba(0,0,0,.6);
}

/* hriste */
.fm-pitch {
    background: linear-gradient(180deg, #2e7d32 0%, #388e3c 50%, #2e7d32 100%);
    border: 3px solid #fff;
    outline: 2px solid #2e7d32;
    padding: 18px 6px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 420px;
}
.fm-pitch-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* karta hrace */
.fm-player-card {
    width: 96px;
    background: rgba(255,255,255,.95);
    border-top: 4px solid var(--fm-red);
    text-align: center;
    padding: 6px 4px;
    position: relative;
    cursor: pointer;
    transition: transform .1s;
}
.fm-player-card:hover { transform: scale(1.05); }
.fm-player-card img { width: 52px; height: 52px; object-fit: cover; object-position: top; border-radius: 50%; background: #ddd; }
.fm-player-card .fm-pc-name {
    font-family: "Teko", sans-serif; font-size: .95rem; line-height: 1.1;
    text-transform: uppercase; margin-top: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fm-player-card .fm-pc-meta { font-size: .68rem; color: #444; }
.fm-player-card .fm-pc-badge {
    position: absolute; top: -8px; right: -6px;
    background: var(--fm-gold); color: var(--fm-dark);
    font-family: "Teko", sans-serif; font-size: .9rem;
    width: 22px; height: 22px; line-height: 23px; border-radius: 50%;
}
.fm-player-card .fm-pc-badge.fm-vc { background: #ccc; }
.fm-player-card .fm-pc-remove {
    position: absolute; top: -8px; left: -6px;
    background: var(--fm-red); color: #fff;
    width: 20px; height: 20px; line-height: 19px; border-radius: 50%;
    font-size: .8rem; display: none;
}
.fm-player-card:hover .fm-pc-remove { display: block; }
.fm-player-card.fm-empty {
    background: rgba(255,255,255,.35);
    border-top-color: rgba(255,255,255,.6);
    color: #fff; cursor: default;
    display: flex; align-items: center; justify-content: center;
    min-height: 100px;
    font-family: "Teko", sans-serif; text-transform: uppercase;
}

/* pool hracu v builderu */
.fm-pool { border: 1px solid #ddd; }
.fm-pool-tabs { display: flex; }
.fm-pool-tabs button {
    flex: 1; border: none; background: #eee;
    font-family: "Teko", sans-serif; font-size: 1.15rem; text-transform: uppercase;
    padding: 6px 0 4px 0; cursor: pointer;
}
.fm-pool-tabs button.active { background: var(--fm-red); color: #fff; }
.fm-pool-list { max-height: 520px; overflow-y: auto; }
.fm-pool-row {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px; border-bottom: 1px solid #eee; cursor: pointer;
}
.fm-pool-row:hover { background: #f7f0f0; }
.fm-pool-row.fm-picked { background: #ece4e4; opacity: .55; cursor: not-allowed; }
.fm-pool-row img { width: 36px; height: 36px; object-fit: cover; object-position: top; border-radius: 50%; background: #ddd; }
.fm-pool-row .fm-pr-name { flex: 1; font-size: .85rem; }
.fm-pool-row .fm-pr-pos { font-size: .7rem; color: #666; width: 34px; }
.fm-pool-row .fm-pr-price { font-family: "Teko", sans-serif; font-size: 1.1rem; color: var(--fm-blue); width: 44px; text-align: right; }
.fm-pool-row .fm-pr-pts { font-size: .7rem; color: #666; width: 50px; text-align: right; }

/* tabulky (zebricek, staty) */
.fm-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .9rem; }
.fm-table th {
    font-family: "Teko", sans-serif; font-size: 1.15rem; font-weight: 400;
    text-transform: uppercase; letter-spacing: 1px;
    background: var(--fm-dark); color: #fff;
    padding: 7px 10px; text-align: left;
}
.fm-table td { padding: 7px 10px; border-bottom: 1px solid #e2e2e2; }
.fm-table tr:hover td { background: #f7f2f2; }
.fm-table td.fm-num, .fm-table th.fm-num { text-align: right; }
.fm-table .fm-rank { font-family: "Teko", sans-serif; font-size: 1.2rem; color: var(--fm-red); width: 46px; }
.fm-table img.fm-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.fm-table tr.fm-me td { background: #fdf3d7; }

/* formulare */
.fm-form label { display: block; font-size: .8rem; text-transform: uppercase; color: #555; margin: 10px 0 2px 0; }
.fm-form input[type=text], .fm-form input[type=number], .fm-form input[type=datetime-local], .fm-form select {
    width: 100%; max-width: 420px; padding: 6px 10px; border: 1px solid #ccc; font-family: "Montserrat", sans-serif;
}
.fm-msg { padding: 10px 16px; margin: 12px 0; font-size: .9rem; }
.fm-msg.fm-ok { background: #e4f2e4; border-left: 4px solid #2e7d32; }
.fm-msg.fm-err { background: #f8e4e4; border-left: 4px solid var(--fm-red); }

/* stat boxy */
.fm-stats-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
.fm-stat-box { background: #fff; border: 1px solid #e2e2e2; border-top: 4px solid var(--fm-red); padding: 10px 20px; min-width: 130px; }
.fm-stat-box .fm-sb-value { font-family: "Teko", sans-serif; font-size: 2rem; color: var(--fm-dark); line-height: 1; }
.fm-stat-box .fm-sb-label { font-size: .7rem; text-transform: uppercase; color: #666; }

/* admin */
.fm-admin-nav { margin: 12px 0; }
.fm-admin-nav a { margin-right: 14px; }
.fm-table input[type=number] { width: 58px; padding: 3px 5px; border: 1px solid #ccc; }
.fm-table input[type=text] { padding: 3px 6px; border: 1px solid #ccc; }

@media (max-width: 767px) {
    .fm-builder-cols { flex-direction: column; }
    .fm-player-card { width: 84px; }
}
.fm-builder-cols { display: flex; gap: 20px; align-items: flex-start; }
.fm-builder-cols > .fm-col-pitch { flex: 1.4; min-width: 0; }
.fm-builder-cols > .fm-col-pool { flex: 1; min-width: 0; }
