/* BNL Tournament - dark blue / charcoal / white. Edit the variables to re-theme. */
:root {
  --navy: #0a1f44; --navy-2: #0d2a5c; --black: #0b0d12;
  --bg: #15181e; --panel: #1d222b; --panel-2: #252b36; --line: #2e3643;
  --text: #f3f6fb; --muted: #9aa7ba;
  --accent: #5aa9ff; --accent-2: #8cc4ff; --accent-ink: #04122b; --accent-rgb: 90,169,255;
  --hdr-1: var(--navy); --hdr-2: #081633; --hdr-line: #16336b; --hero-glow: #1b4a99; --hero-2: #07142e;
  --summer: #ff9a2e; --winter: #7fd0ff;
  --good: #3ecf8e; --warn: #ffc247; --bad: #ff6b6b;
  --radius: 12px; --shadow: 0 6px 22px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-2); text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.container { width: min(1180px, 100% - 32px); margin: 0 auto; }
main.container { flex: 1; padding: 26px 0 50px; }

/* header */
.site-header { background: linear-gradient(180deg, var(--hdr-1) 0%, var(--hdr-2) 100%); border-bottom: 1px solid var(--hdr-line); position: sticky; top: 0; z-index: 30; }
.bar { display: flex; align-items: center; gap: 18px; min-height: 62px; flex-wrap: wrap; padding: 6px 0; }
.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; color: #fff; }
.logo .mark { min-width: 36px; height: 28px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .68rem; font-weight: 900; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: #d6e4ff; padding: 7px 8px; border-radius: 8px; font-weight: 600; font-size: .9rem; }
.nav a:hover, .nav a.on { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.userbox { display: flex; gap: 8px; align-items: center; }
.userbox form { margin: 0; }
.badge-count { background: var(--bad); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 700; margin-left: 4px; }

/* season toggle */
.seasonbar { background: var(--black); border-bottom: 1px solid var(--line); }
.seasonbar .container { display: flex; align-items: center; gap: 14px; padding: 8px 0; flex-wrap: wrap; }
.toggle { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.toggle a { padding: 6px 18px; border-radius: 999px; font-weight: 700; color: var(--muted); font-size: .92rem; }
.toggle a:hover { text-decoration: none; color: #fff; }
.toggle a.on.summer { background: var(--summer); color: #231200; }
.toggle a.on.winter { background: var(--winter); color: #04202f; }
.seasonbar .info { color: var(--muted); font-size: .88rem; }
.seasonbar select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }

/* buttons & forms */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; text-align: center; }
.btn:hover { background: var(--accent-2); text-decoration: none; color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); } .btn.ghost:hover { background: rgba(var(--accent-rgb),.12); color: var(--accent-2); }
.btn.danger { background: var(--bad); color: #2a0707; } .btn.good { background: var(--good); color: #04281a; }
.btn.small { padding: 6px 12px; font-size: .86rem; border-radius: 8px; } .btn.big { padding: 14px 28px; font-size: 1.1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 4px; color: #dfe7f5; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; background: #10141b; color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type=file] { color: var(--muted); width: 100%; }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 14px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; } .check input { margin-top: 5px; }
.hint { color: var(--muted); font-size: .84rem; margin-top: 4px; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead h1 { margin: 0; }

.hero { background: radial-gradient(1200px 300px at 80% -20%, var(--hero-glow) 0%, transparent 60%), linear-gradient(135deg, var(--hdr-1) 0%, var(--hero-2) 100%); border: 1px solid var(--hdr-line); border-radius: 16px; padding: 28px; margin-bottom: 22px; display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.hero h1 { font-size: 2.1rem; margin-bottom: .25em; } .hero p { color: #c3d4f0; margin: 0; max-width: 56ch; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.stat { background: rgba(255,255,255,.07); border-radius: 10px; padding: 8px 14px; min-width: 96px; }
.stat b { display: block; font-size: 1.35rem; } .stat span { color: #b6c8e8; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
tbody tr:hover { background: rgba(255,255,255,.03); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }
.rank { font-weight: 800; width: 44px; color: var(--accent-2); }
.rank.r1 { color: #ffd166; font-size: 1.15rem; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--navy-2); display: inline-grid; place-items: center; font-weight: 800; font-size: .8rem; color: #cfe3ff; flex: none; overflow: hidden; }
.avatar.xl { width: 128px; height: 128px; font-size: 2.4rem; border: 3px solid var(--accent); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pill.good { color: var(--good); border-color: var(--good); } .pill.warn { color: var(--warn); border-color: var(--warn); } .pill.bad { color: var(--bad); border-color: var(--bad); }
.pill.summer { color: var(--summer); border-color: var(--summer); } .pill.winter { color: var(--winter); border-color: var(--winter); }
.champ { color: #ffd166; font-weight: 800; }

/* gallery tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile { position: relative; display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .12s, border-color .12s; }
.tile:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; color: var(--text); }
.tile img.ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #0e1218; }
.tile .meta { padding: 10px 12px 12px; }
.tile .meta .sp { font-weight: 800; } .tile .meta .by { color: var(--muted); font-size: .86rem; }
.tile .meta .wt { float: right; font-weight: 800; color: var(--accent-2); }
.corner { position: absolute; top: 0; left: 0; width: 56px; height: 56px; z-index: 2; overflow: hidden; pointer-events: none; }
.corner span { position: absolute; top: 8px; left: -22px; width: 84px; transform: rotate(-45deg); text-align: center; font-weight: 900; font-size: .78rem; padding: 2px 0; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.corner.summer span { background: var(--summer); color: #231200; } .corner.winter span { background: var(--winter); color: #04202f; }
.tile .status { position: absolute; top: 8px; right: 8px; z-index: 2; }
.seasonbadge { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: .74rem; font-weight: 800; }
.seasonbadge.summer { background: var(--summer); color: #231200; } .seasonbadge.winter { background: var(--winter); color: #04202f; }

/* ribbons: stacked like merit ribbons */
.ribbons { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.ribbon { width: 44px; height: 54px; position: relative; border-radius: 3px 3px 0 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); display: grid; place-items: center; font-size: .66rem; font-weight: 900; color: #111; text-align: center; line-height: 1.05; padding-bottom: 8px; }
.ribbon.winner { background: linear-gradient(90deg,#d4a017 0 20%,#ffe27a 20% 80%,#d4a017 80%); }
.ribbon.runner_up { background: linear-gradient(90deg,#8d97a6 0 20%,#e6ebf2 20% 80%,#8d97a6 80%); }
.ribbon.biggest_fish { background: linear-gradient(90deg,#1b5fd6 0 20%,#7fb3ff 20% 80%,#1b5fd6 80%); }
.ribbon.most_species { background: linear-gradient(90deg,#1f9d63 0 20%,#7be0b0 20% 80%,#1f9d63 80%); }
.ribbon.category_champion { background: linear-gradient(90deg,#9a3ad6 0 20%,#d7a6f5 20% 80%,#9a3ad6 80%); }
.ribbonrow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ribbonrow:last-child { border-bottom: 0; }
.ribbonrow .yr { font-weight: 800; min-width: 110px; }
.ribbonlegend { display: flex; gap: 6px; align-items: center; font-size: .78rem; color: var(--muted); }

/* profile */
.profile { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile .info { flex: 1; min-width: 240px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.kpi { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; } .kpi b { font-size: 1.4rem; display: block; } .kpi span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

/* flash + errors */
.flash { border-radius: 10px; padding: 12px 16px; margin: 0 0 14px; border: 1px solid; }
.flash.success { background: rgba(62,207,142,.1); border-color: var(--good); } .flash.error { background: rgba(255,107,107,.1); border-color: var(--bad); }
.flash.info { background: rgba(var(--accent-rgb),.1); border-color: var(--accent); }
.errors { background: rgba(255,107,107,.1); border: 1px solid var(--bad); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; } .errors ul { margin: 0; padding-left: 20px; }
.errtxt { color: var(--bad); font-size: .86rem; margin: 4px 0 0; }

/* submit */
.fishcard { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--panel); margin-bottom: 16px; }
.fishcard.haserr { border-color: var(--bad); }
.fishcard h3 { display: flex; justify-content: space-between; align-items: center; }
.removefish { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 3px 10px; cursor: pointer; font: inherit; font-size: .8rem; }
.removefish:hover { color: var(--bad); border-color: var(--bad); }
.preview { margin-top: 8px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); }
.fab { position: fixed; right: 24px; bottom: 24px; width: 62px; height: 62px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 2.2rem; font-weight: 700; line-height: 1; border: 0; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 40; display: grid; place-items: center; }
.fab:hover { background: var(--accent-2); transform: scale(1.06); }
.fab[disabled] { opacity: .4; }
.modebox { display: flex; gap: 12px; flex-wrap: wrap; }
.mode { flex: 1; min-width: 240px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--panel); }
.mode.on { border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.mode input { margin-right: 6px; }

/* admin queue */
.qitem { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.qitem img { width: 220px; border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; }
.flaglist { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.flaglist li { font-size: .86rem; padding: 4px 10px; border-radius: 6px; border-left: 3px solid; background: var(--panel-2); }
.flaglist li.high { border-color: var(--bad); } .flaglist li.warn { border-color: var(--warn); } .flaglist li.info { border-color: var(--accent); }
.qactions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.qactions form { display: flex; gap: 8px; align-items: center; margin: 0; }
.qactions input[type=text] { width: 230px; padding: 6px 10px; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; } .tabs a { padding: 7px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 600; } .tabs a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } .tabs a:hover { text-decoration: none; }

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 22px; align-items: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } .chip { padding: 5px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: .88rem; font-weight: 600; } .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } .chip:hover { text-decoration: none; border-color: var(--accent); }
.rules li { margin-bottom: 8px; } .rules { padding-left: 22px; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; } .catbox { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; } .catbox h3 { margin-bottom: 4px; }
.prize { white-space: pre-wrap; background: rgba(var(--accent-rgb),.07); border: 1px dashed var(--accent); border-radius: 10px; padding: 14px 16px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.demo-banner { background: #3a2a00; color: #ffd98a; text-align: center; font-size: .8rem; padding: 4px 10px; }

footer.site-footer { border-top: 1px solid var(--line); background: var(--black); color: var(--muted); padding: 20px 0; font-size: .86rem; }
footer .container { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .split, .g3, .g4 { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; }
  .qitem { grid-template-columns: 1fr; } .qitem img { width: 100%; }
  .hero h1 { font-size: 1.6rem; }
  .nav { order: 3; flex-basis: 100%; }
  .hide-sm { display: none; }
}

/* keep weights/points on one line in tables */
td, th { font-variant-numeric: tabular-nums; }
.board td:not(:nth-child(2)), .board th { white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* collapsible card (e.g. License vault "Add a document") */
details.collapse > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse > summary h2 { margin: 0; }
details.collapse > summary .chev { width: 10px; height: 10px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
details.collapse[open] > summary { margin-bottom: 14px; }
details.collapse[open] > summary .chev { transform: rotate(-135deg); }
details.collapse > summary:hover h2 { color: var(--accent); }

/* profile card: settings cog in the top-right corner */
.profilecard { position: relative; }
.cogbtn { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted, #9fb0c8); border: 1px solid var(--line); background: transparent; transition: color .15s, border-color .15s, transform .3s; }
.cogbtn:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; transform: rotate(60deg); }
.profilecard > .cogbtn ~ .profile { padding-right: 44px; }

/* card heading with a control on the right (profile Catches filter) */
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cardhead h2 { margin: 0; }
.catchfilter select { padding: 6px 10px; font-size: .9rem; }

/* Season themes: Summer = orange accents, Winter = the original blue (set on <body> from the selected season) */
body.theme-summer {
  --accent: #ff9a2e; --accent-2: #ffb766; --accent-ink: #231200; --accent-rgb: 255,154,46;
  --hdr-1: #3a1f08; --hdr-2: #1f1004; --hdr-line: #5c3210; --hero-glow: #8a4510; --hero-2: #1a0e05;
}

/* admin: contestants */
.contestfilter { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.contestfilter .field { margin: 0; }
.contesttable td { vertical-align: top; }
details.manage > summary { list-style: none; cursor: pointer; display: inline-block; }
details.manage > summary::-webkit-details-marker { display: none; }
details.manage[open] > summary { background: rgba(var(--accent-rgb),.12); }
.managebox { margin-top: 8px; display: grid; gap: 10px; min-width: 260px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.managebox input[type=text] { width: 100%; padding: 6px 9px; }
.managebtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.managebox .deleterow { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.managebox .deleterow input { flex: 1; min-width: 0; }
.adminfishgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.adminfish { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.adminfish img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.adminfish .body { padding: 10px 12px; }
.contestbtns { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.recentlist { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.recentrow { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; color: inherit; text-decoration: none; font-size: .86rem; line-height: 1.35; }
.recentrow:hover { background: var(--panel-2); }
.recentrow img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.recentrow .rr { min-width: 0; }
.recentrow .pts { color: var(--accent, #7cc4ff); font-weight: 700; font-size: .8rem; }
