/* Turnuva sistemi bileşenleri: canlı rozetler, puan tablosu, maç merkezi, eleme ağacı, kura ekranı, maç masası */

/* ---------- Genel */
.live-badge { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.live-dot {
    display: inline-block; width: .7rem; height: .7rem; border-radius: 50%;
    background: #dc3545; margin-right: .35rem; animation: pulse 1.4s infinite;
}
.sticky-tabs { position: sticky; top: 72px; z-index: 1010; }
.nav-underline .nav-link.active { border-bottom-color: var(--brand-yellow); }
.stat-tile { background: #fff; border-radius: .5rem; padding: 1rem .5rem; box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); }
.stat-tile .value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.stat-tile .label { font-size: .8rem; color: #6c757d; text-transform: uppercase; }
.rank-circle {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px;
    width: 28px; height: 28px; border-radius: 50%; background: #212529; color: #fff; font-weight: 700; font-size: .85rem;
}
.jersey {
    display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px;
    border-radius: .375rem; background: #212529; color: #fff; font-weight: 700; font-size: .85rem;
}
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* ---------- Puan tablosu */
.standings-table tbody tr:first-child td:first-child { background: transparent; color: inherit; }
.standings-table tr.qualify td:first-child { box-shadow: inset 4px 0 0 #198754; }
.legend-qualify { display: inline-block; width: 4px; height: 12px; background: #198754; margin-right: 4px; vertical-align: middle; }
.form-dot {
    display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
    border-radius: 3px; font-size: .65rem; font-weight: 700; color: #fff; margin-right: 2px;
}
.form-G { background: #198754; }
.form-B { background: #6c757d; }
.form-M { background: #dc3545; }

/* ---------- Maç satırı */
.match-link:hover { background: rgba(255,183,0,.08); }
.match-row .score.live { background: #dc3545; animation: pulse 2s infinite; }
.match-row .score .pen { font-size: .65rem; font-weight: 400; opacity: .8; }

/* ---------- Maç merkezi */
.match-hero { background: linear-gradient(110deg, var(--home-color) 0%, #212529 38%, #212529 62%, var(--away-color) 100%); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; text-align: center; }
.sb-logo { width: 84px; height: 84px; object-fit: contain; background: #fff; border-radius: 50%; padding: 6px; }
.sb-name { font-weight: 700; font-size: 1.15rem; margin-top: .5rem; }
.sb-score { font-size: 3.5rem; font-weight: 900; line-height: 1; letter-spacing: 2px; }
.sb-pen { font-size: .85rem; opacity: .85; min-height: 1.2em; }
@media (max-width: 575.98px) {
    .sb-logo { width: 56px; height: 56px; }
    .sb-name { font-size: .9rem; }
    .sb-score { font-size: 2.4rem; }
}
.timeline { position: relative; padding: .5rem 0; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #dee2e6; }
.tl-item { position: relative; display: flex; align-items: center; gap: .5rem; width: 50%; padding: .5rem 1rem; }
.tl-home { flex-direction: row-reverse; text-align: right; }
.tl-away { margin-left: 50%; }
.tl-min {
    position: absolute; top: 50%; transform: translateY(-50%); background: #212529; color: #fff;
    font-size: .75rem; font-weight: 700; border-radius: 1rem; padding: .1rem .45rem; z-index: 1;
}
.tl-home .tl-min { right: -1.3rem; }
.tl-away .tl-min { left: -1.3rem; }
.tl-icon { font-size: 1.25rem; margin-left: 1.2rem; }
.tl-home .tl-icon { margin-left: 0; margin-right: 1.2rem; }

/* ---------- Takım kartları */
.team-card { border-top: 4px solid var(--team-color) !important; transition: transform .15s; }
.team-card:hover { transform: translateY(-3px); }
.team-card-logo { width: 72px; height: 72px; object-fit: contain; }

/* ---------- Eleme ağacı */
.bracket { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; }
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; gap: 1rem; min-width: 260px; flex: 1; }
.bracket-title { font-size: .8rem; text-transform: uppercase; font-weight: 700; color: #6c757d; text-align: center; margin-bottom: 0; }
.bracket-match .match-row { font-size: .85rem; }

/* ---------- Kura ekranı */
.draw-screen { background: radial-gradient(circle at top, #343a40, #111); min-height: 80vh; }
.draw-group { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: .75rem; padding: .75rem; height: 100%; }
.draw-group h3 { color: var(--brand-yellow); font-size: 1.1rem; font-weight: 800; text-align: center; margin-bottom: .75rem; }
.draw-empty { color: rgba(255,255,255,.3); text-align: center; }
.draw-team {
    display: flex; align-items: center; gap: .5rem; background: #fff; border-left: 5px solid var(--team-color);
    border-radius: .5rem; padding: .35rem .6rem; margin-bottom: .4rem; font-weight: 600; font-size: .9rem;
}
.draw-team img { width: 26px; height: 26px; object-fit: contain; }
.draw-team .pot { margin-left: auto; color: #6c757d; font-weight: 400; }
.draw-team.in-pool { background: rgba(255,255,255,.85); margin: 0; font-size: .8rem; }
.draw-team.just-drawn { animation: drawIn 1.2s ease-out; box-shadow: 0 0 0 3px var(--brand-yellow); }
@keyframes drawIn { 0% { transform: scale(1.6); opacity: 0; } 60% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1); } }
.draw-announce { display: inline-flex; align-items: center; gap: 1rem; color: #fff; opacity: 0; transform: translateY(-10px); transition: all .6s; }
.draw-announce.show { opacity: 1; transform: none; }
.draw-announce .draw-team.big { font-size: 1.4rem; padding: .6rem 1rem; margin: 0; }
.draw-announce .draw-team.big img { width: 44px; height: 44px; }
.draw-announce .group-name { font-size: 1.8rem; font-weight: 900; color: var(--brand-yellow); }
.draw-announce .arrow { font-size: 1.5rem; }
@media (max-width: 575.98px) {
    .draw-announce { flex-direction: column; gap: .25rem; }
    .draw-announce .arrow { transform: rotate(90deg); }
}

/* ---------- Portal / KVKK */
.kvkk-box { background: #fff8e1; border: 1px solid #ffe08a; border-radius: .5rem; padding: 1rem; }
.kvkk-text { max-height: 220px; overflow-y: auto; white-space: pre-line; font-size: .8rem; background: #fff; border: 1px solid #eee; padding: .75rem; border-radius: .375rem; }

/* ---------- Admin: pano ve maç masası */
.step-dot {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px;
    border-radius: 50%; border: 2px solid #ced4da; color: #6c757d; font-weight: 700;
}
.step-dot.done { background: #198754; border-color: #198754; color: #fff; }
.console-board {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; color: #fff; border-radius: .75rem;
    padding: 1rem; background: linear-gradient(110deg, var(--home-color) 0%, #212529 35%, #212529 65%, var(--away-color) 100%);
}
.cb-team { display: flex; align-items: center; gap: .75rem; font-weight: 700; font-size: 1.2rem; }
.cb-team.away { flex-direction: row-reverse; text-align: right; }
.cb-team img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; }
.cb-center { text-align: center; }
.cb-score { font-size: 3rem; font-weight: 900; line-height: 1; }
.cb-clock { font-family: monospace; font-size: 1.6rem; font-weight: 700; color: var(--brand-yellow); min-height: 1.6rem; }
@media (max-width: 575.98px) {
    .cb-team span { display: none; }
    .cb-score { font-size: 2.2rem; }
}
.event-card-header { background: var(--team-color); }
.type-buttons .btn { flex: 1 0 auto; font-size: .85rem; padding: .5rem .4rem; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .4rem; max-height: 300px; overflow-y: auto; }
.player-grid .btn { text-align: left; font-size: .85rem; padding: .45rem .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-grid .btn .num { display: inline-block; min-width: 22px; font-weight: 800; }
.player-grid .btn.sent-off { text-decoration: line-through; opacity: .6; }
.admin-sidebar { min-height: calc(100vh - 56px); }

/* ---------- Bedel ve konaklama */
.room-code { display: inline-block; min-width: 42px; text-align: center; font-weight: 800; font-size: .8rem; background: #212529; color: #fff; border-radius: .3rem; padding: .1rem .35rem; }
.room-table td { border-color: rgba(0, 0, 0, .08); }
.room-request[hidden] { display: none !important; }

/* ---------- Sosyal medya stüdyosu */
.studio-stage { position: sticky; top: 76px; display: flex; justify-content: center; background: repeating-conic-gradient(#e9ecef 0 25%, #f8f9fa 0 50%) 0 0 / 24px 24px; border-radius: 1rem; padding: 1rem; }
.studio-stage canvas { height: min(78vh, 900px); width: auto; max-width: 100%; border-radius: .5rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); background: #ffb700; }
.studio [data-for][hidden] { display: none !important; }

/* Belgeler (yönetmelik, KVKK vb.) */
.navbar .dropdown-item { text-transform: none; font-weight: 600; }
.doc-body { font-size: 1rem; line-height: 1.65; }
.doc-body h2 { font-size: 1.2rem; font-weight: 800; margin: 1.75rem 0 .75rem; padding-bottom: .35rem; border-bottom: 3px solid #ffb700; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: 1.02rem; font-weight: 800; margin: 1.25rem 0 .5rem; }
.doc-body ul, .doc-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.doc-body ol li::marker { font-weight: 800; }
.doc-body li { margin-bottom: .35rem; }
.doc-body .doc-note { background: #fff8e1; border-left: 4px solid #ffb700; border-radius: .375rem; padding: .75rem 1rem; margin: 1rem 0; }
.doc-side .list-group-item.active { background: #212529; border-color: #212529; }
.footer-docs { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .75rem; }
@media (min-width: 768px) { .footer-docs { justify-content: flex-end; } }
.admin-doc-body { font-family: SFMono-Regular, Consolas, monospace; font-size: .85rem; line-height: 1.5; }

/* Bütçe ve kârlılık (Panel > Bütçe) */
.budget-chip { display: inline-flex; gap: .35rem; align-items: baseline; background: #f1f3f5; border-radius: 2rem; padding: .3rem .8rem; font-size: .85rem; }
.budget-chip.strong { background: #212529; color: #ffb700; }
.budget-items input, .budget-items select { min-width: 60px; }
.budget-items td:first-child input { min-width: 220px; }
.budget-kpi { border-radius: .5rem; padding: .6rem .8rem; background: #f8f9fa; border: 1px solid #e9ecef; height: 100%; }
.budget-kpi.pos { background: #e8f6ec; border-color: #b7e0c2; color: #146c2e; }
.budget-kpi.neg { background: #fdecea; border-color: #f5c2c0; color: #a51d24; }
.budget-summary th, .budget-summary td { padding: .4rem 1rem; }
.budget-summary .budget-section th { background: #212529; color: #ffb700; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
@media (min-width: 1400px) { .budget-sticky { position: sticky; top: 76px; } }
@media print {
    .admin-body > nav, .admin-body aside, .admin-body .budget-sticky .btn, .admin-body .alert, [data-action], .admin-body footer { display: none !important; }
    .admin-body main, .admin-body .col-lg-10 { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
    .budget .col-xxl-7, .budget .col-xxl-5 { width: 100% !important; flex: 0 0 100% !important; }
    .budget .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
    .budget-summary .budget-section th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Ziyaretçi istatistikleri (Panel) */
.an-kpi .fs-3 { line-height: 1.2; }
.an-live { background: #161616 !important; color: #fff; }
.an-live .text-muted { color: #bbb !important; }
.an-live .fs-3 { color: #ffb700; }
.an-chart { width: 100%; height: 220px; display: block; }
.an-chart .an-v { fill: #ffe08a; }
.an-chart .an-u { fill: #161616; }
.an-chart .an-axis { stroke: #ccc; stroke-width: 1; }
.an-key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; }
.an-key-v { background: #ffe08a; } .an-key-u { background: #161616; }
.an-bar { margin-bottom: .6rem; }
.an-hours { display: flex; align-items: flex-end; gap: 3px; height: 160px; }
.an-hour { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.an-hour-bar { width: 100%; background: #ffb700; border-radius: 3px 3px 0 0; }
.an-hour span { font-size: .7rem; color: #888; height: 1rem; }
.an-activity { display: flex; flex-direction: column; background: #f8f9fa; border-radius: .5rem; padding: .6rem .8rem; text-decoration: none; color: #161616; height: 100%; }
.an-activity i { color: #b07d00; }
.an-activity strong { font-size: 1.5rem; line-height: 1.1; }
.an-activity span { font-size: .8rem; color: #666; }
