/* Stil comun (aplicatie + pagina publica): aranjarea CueScore, culorile Bravia (negru + auriu) */
:root {
  --bg: #0a0a0b; --bg2: #111113; --panel: #17171a; --panel2: #1e1e22; --row: #141417; --row2: #1a1a1e; --line: #2b2b30;
  --text: #f3f0e8; --muted: #9a958a; --gold: #d1a756; --gold2: #f1d08a; --gold-d: #8a6a2c; --ink: #1a1406;
  --red: #e5484d; --green: #2fbf71; --live: #e53935;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Montserrat, "Segoe UI", system-ui, sans-serif; }
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: #000; border: 1px solid var(--line); border-radius: 4px; padding: 7px 10px; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { width: 100%; resize: vertical; }

/* butoane ca pe CueScore (albastru -> auriu) */
.btn { display: inline-flex; align-items: center; gap: 7px; background: var(--gold); color: var(--ink); border: 0; border-radius: 4px; padding: 7px 14px;
       font-weight: 800; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--gold2); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.outline { background: transparent; color: var(--gold2); border: 1px solid var(--gold); }
.btn.outline:hover { background: rgba(209,167,86,.12); }
.btn.ghost { background: transparent; color: var(--gold2); padding: 7px 8px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn.green { background: var(--green); color: #fff; }
.btn.round { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
.btn svg { width: 15px; height: 15px; }

/* bara de sus (pagina publica) */
.topbar { position: sticky; top: 0; z-index: 20; height: 54px; display: flex; align-items: center; gap: 22px; padding: 0 18px;
          background: linear-gradient(180deg, #151515, #0b0b0b); border-bottom: 2px solid var(--gold); }
.topbar .logo img { height: 34px; display: block; }
.topbar nav { flex: 1; display: flex; justify-content: center; gap: 26px; }
.topbar nav a { color: #e9e3d4; font-size: 15px; font-weight: 600; padding: 15px 2px; border-bottom: 3px solid transparent; }
.topbar nav a.on, .topbar nav a:hover { color: var(--gold2); border-bottom-color: var(--gold); text-decoration: none; }

/* pagina turneului */
.banner { position: relative; text-align: center; padding: 36px 16px 28px; overflow: hidden;
          background: radial-gradient(700px 260px at 50% 0, rgba(209,167,86,.35), transparent 70%), linear-gradient(110deg, #1a160d 0%, #0d0d0f 45%, #1d1708 100%);
          border-bottom: 1px solid var(--gold-d); }
.banner::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(209,167,86,.04) 60px 120px); pointer-events: none; }
.banner .date { color: #c9c2b2; font-size: 18px; }
.banner h1 { margin: 2px 0; font-size: clamp(22px, 3.4vw, 36px); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.banner .disc { color: #b9b1a0; font-size: 22px; font-weight: 800; }
.banner .borg { color: var(--gold2); font-size: 18px; font-weight: 700; margin-top: 10px; }
.banner .corner { position: absolute; top: 14px; display: flex; gap: 8px; z-index: 2; }
.banner .corner.l { left: 16px; } .banner .corner.r { right: 16px; }
.page { max-width: 784px; margin: 0 auto; padding: 14px 12px 60px; }
.page.wide { max-width: 1180px; }
.crumbs { text-align: center; font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--gold2); }
.sec-title { text-align: center; font-weight: 700; font-size: 14px; margin: 34px 0 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

.info { display: grid; grid-template-columns: 186px 1fr; gap: 1px 0; font-size: 14px; }
.info dt { color: var(--muted); } .info dd { margin: 0; }
.more { background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; white-space: pre-wrap; max-height: 84px; overflow: hidden; margin-top: 4px; }
.more.open { max-height: none; }

/* podium + rezultate */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; align-items: end; margin-top: 10px; }
.podium .pl { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.podium .pl a { font-size: 13px; line-height: 1.2; }
.podium .step { width: 100%; display: grid; place-items: center; background: var(--panel2); font-size: 40px; font-weight: 800; }
.podium .s1 { height: 82px; color: var(--gold2); } .podium .s2 { height: 62px; color: #e8e8e8; } .podium .s3 { height: 42px; color: #d39b6a; }
.podium > .pl:nth-child(1) .step { border-right: 2px solid var(--bg); } .podium > .pl:nth-child(2) .step { border-right: 2px solid var(--bg); }
.podium .pl.third { grid-column: span 2; }
.podium .pl.third .heads { display: flex; justify-content: space-around; width: 100%; }
.hex { width: 78px; height: 88px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center;
       background: linear-gradient(160deg, #2b2416, #0f0f10); color: var(--gold2); font-size: 24px; font-weight: 800; position: relative; }
.hex::before { content: ""; position: absolute; inset: 2px; clip-path: inherit; background: linear-gradient(160deg, #221d12, #111); z-index: 0; }
.hex span { position: relative; z-index: 1; }
.hex img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; clip-path: inherit; }
.hex.sm { width: 58px; height: 66px; font-size: 18px; }

table.cs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cs th { text-align: left; font-weight: 700; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.cs td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.cs td.num, table.cs th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { position: relative; height: 18px; background: #26221a; border-radius: 3px; min-width: 110px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold-d), var(--gold)); border-radius: 3px; }
.bar b { position: relative; font-size: 10px; padding-left: 6px; color: #fff; line-height: 18px; }
.showmore { display: block; width: 100%; background: var(--gold); color: var(--ink); text-align: center; font-weight: 800; font-size: 12px;
            letter-spacing: .6px; padding: 8px; border: 0; cursor: pointer; }

/* program (lista de meciuri pe runde) */
.sched-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch i { width: 32px; height: 18px; border-radius: 9px; background: #333; position: relative; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--gold); }
.switch input:checked + i::after { left: 16px; }
.round-h { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; font-weight: 700; cursor: pointer; }
.round-h small { font-weight: 500; color: var(--muted); }
.round-h .chev { color: var(--gold); transition: .2s; }
.round-h.closed .chev { transform: rotate(180deg); }
.mrows { border: 1px solid var(--line); }
.mrow { display: grid; grid-template-columns: 30px 1fr 34px 40px 34px 1fr 74px 64px; align-items: center; min-height: 29px; background: var(--row); font-size: 13px; }
.mrow:nth-child(even) { background: var(--row2); }
.mrow + .mrow { border-top: 1px solid #222; }
.mrow .no { align-self: stretch; display: grid; place-items: center; background: #2a2a2e; color: #cfcfcf; font-size: 11px; }
.mrow .pa, .mrow .pb { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .sc { text-align: center; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.mrow .sc.w { color: var(--gold2); }
.mrow .mid { display: grid; place-items: center; }
.mrow .mid span { width: 34px; height: 20px; display: grid; place-items: center; background: #2a2a2e; border-radius: 3px; color: var(--gold2); font-size: 10px; }
.mrow .tm, .mrow .tb { font-size: 12px; color: #ddd; white-space: nowrap; }
.mrow.click { cursor: pointer; }
.mrow.click:hover { background: #26231b; }
.mrow.live { box-shadow: inset 3px 0 0 var(--live); }
.mrow.live .mid span { background: var(--live); color: #fff; }
.mrow .wo { color: var(--muted); font-style: italic; }
.mrow .me { color: var(--gold); }
@media (max-width: 640px) {
  .mrow { grid-template-columns: 26px 1fr 26px 26px 1fr 50px; }
  .mrow .mid, .mrow .tm { display: none; }
  .mrow { min-height: 38px; font-size: 12.5px; }
  .mrow .pa, .mrow .pb { white-space: normal; line-height: 1.2; padding: 3px 6px; overflow-wrap: anywhere; }
  .info { grid-template-columns: 120px 1fr; }
}

/* participanti */
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 8px; margin-top: 18px; }
.parts .pp { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; font-size: 13px; }
.parts .pp .del { position: absolute; top: -4px; right: calc(50% - 46px); background: none; border: 0; color: var(--red); cursor: pointer; font-size: 15px; }
.plist { columns: 2; font-size: 13px; margin-top: 14px; }
.plist div { padding: 4px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }

/* tablou (flowchart) */
.flow-wrap { position: relative; overflow: auto; background: #0d0d0e; border: 1px solid var(--line); border-radius: 4px; max-height: 78vh; }
.flow { position: relative; }
.flow svg { position: absolute; inset: 0; pointer-events: none; }
.flow .ch { position: absolute; top: 4px; font-weight: 700; font-size: 14px; border-bottom: 1px solid #3a3a40; padding-bottom: 4px; white-space: nowrap; }
.fm { position: absolute; width: 208px; font-size: 12px; }
.fm .h { display: flex; justify-content: space-between; gap: 6px; padding: 1px 6px; background: #2c2c31; color: #ddd; font-size: 10px; border-radius: 3px 3px 0 0; }
.fm .h b { color: #fff; }
.fm .p { display: grid; grid-template-columns: 1fr 22px; align-items: center; height: 22px; padding-left: 7px; background: #1b1b1f; border-left: 3px solid #333; }
.fm .p + .p { border-top: 1px solid #2a2a2e; }
.fm .p span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #bdb8ad; }
.fm .p em { font-style: normal; text-align: center; font-weight: 800; color: #bdb8ad; }
.fm .p.w span, .fm .p.w em { color: var(--gold2); }
.fm .p.w { border-left-color: var(--gold); }
.fm .p.wo span { font-style: italic; color: #6f6b63; }
.fm .ft { font-size: 10px; color: var(--muted); padding: 1px 2px; }
.fm.live .h { background: var(--live); }
.fm.click { cursor: pointer; }
.fm.click:hover .p { background: #26231b; }
.zoom { position: sticky; left: 8px; bottom: 8px; display: inline-flex; flex-direction: column; gap: 6px; z-index: 3; margin: -80px 0 8px 8px; }

/* clasament (Rankings) */
.rk-wrap { overflow-x: auto; }
table.rk { border-collapse: collapse; font-size: 14px; min-width: 100%; }
table.rk th, table.rk td { padding: 8px 8px; border-bottom: 1px solid #22222a; white-space: nowrap; }
table.rk thead th { font-size: 11px; font-weight: 700; vertical-align: middle; text-align: center; }
table.rk .c-sum { background: #1b1912; text-align: center; }
table.rk .c-t { background: #121214; text-align: center; min-width: 84px; }
table.rk .c-t:nth-child(even) { background: #17171a; }
table.rk thead .c-t { white-space: normal; font-weight: 500; font-size: 12px; line-height: 1.25; }
table.rk thead .c-t small { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; }
table.rk td.name { min-width: 220px; }
table.rk td.name b { color: var(--gold2); margin-right: 8px; }
table.rk .top { color: var(--gold); font-weight: 800; }
.medal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 800; margin-right: 6px; color: #111; }
.medal.m1 { background: radial-gradient(circle at 35% 30%, #fff3c4, #d1a756 60%, #8a6a2c); }
.medal.m2 { background: radial-gradient(circle at 35% 30%, #ffffff, #b9bcc2 60%, #6d7077); }
.medal.m3 { background: radial-gradient(circle at 35% 30%, #ffd9b8, #b8743f 60%, #6b3f1d); }
.rk-logo { display: grid; place-items: center; }
.rk-logo .hex { width: 70px; height: 80px; }

/* lista de turnee (ca pe CueScore) */
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.tabs2 button { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 7px; font-weight: 700; font-size: 12px; cursor: pointer; border-radius: 3px; }
.tabs2 button.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px; }
.tcard { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; color: var(--text); cursor: pointer; }
.tcard:hover { border-color: var(--gold); text-decoration: none; }
.tcard .lg { flex: none; width: 48px; height: 54px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--gold-d); display: grid; place-items: center; }
.tcard .lg img { width: 46px; height: 52px; clip-path: inherit; object-fit: contain; background: #000; display: block; }
.tcard .tc-mid { min-width: 0; flex: 1; }
.tcard b { display: block; font-size: 15px; line-height: 1.25; color: var(--gold2); margin: 1px 0 2px; }
.tcard small { color: var(--muted); font-size: 12px; }
.tcard small.dt { display: block; color: #c9c2b2; }
.tcard small.org { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tcard small.org .tag { margin: 0; }
.tcard .tc-cnt { flex: none; display: flex; align-items: center; gap: 4px; color: #c9c2b2; font-size: 15px; font-weight: 600; }
.tcard .tc-cnt svg { width: 15px; height: 15px; fill: var(--muted); }
.tcard .tc-ok { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--ink); font-weight: 900; font-size: 18px; }
/* telefon: lista de turnee intr-un singur panou, randuri pe toata latimea (ca pe CueScore) */
@media (max-width: 640px) {
  .page { padding: 10px 10px 50px; }
  .tcards { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
  .tcard { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 12px 10px; }
  .tcard:last-child { border-bottom: 0; }
  .tcard:nth-child(even) { background: var(--panel2); }
  .tabs2 button { padding: 10px 6px; font-size: 13px; }
  .banner { padding: 22px 12px 18px; } .banner .date { font-size: 15px; } .banner h1 { font-size: 21px; } .banner .disc { font-size: 17px; } .banner .borg { font-size: 15px; margin-top: 6px; }
  .banner .corner { position: static; justify-content: center; margin-bottom: 10px; }
  table.rk td.name { min-width: 0; max-width: 150px; white-space: normal; line-height: 1.25; font-size: 13px; }
  table.rk td.name, table.rk th.rk-logo { position: sticky; left: 0; z-index: 2; background: var(--bg); box-shadow: 2px 0 0 #22222a; }
  table.rk th.rk-logo .hex { width: 54px; height: 62px; } table.rk th.rk-logo .hex img { width: 46px !important; }
  table.rk th, table.rk td { padding: 7px 6px; }
  .parts { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px 6px; }
  .podium .pl a { font-size: 12px; }
}
.tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; margin-right: 4px; background: #2d2a22; color: #e8dcc0; }
.tag.d { background: var(--gold); color: var(--ink); }
.tag.live { background: var(--live); color: #fff; }
.tag.up { background: #2b3a2b; color: #a6e3a6; }

.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-left: 6px; animation: pulse 1.4s infinite; vertical-align: middle; }
@keyframes pulse { 50% { opacity: .25; } }
