/* Market Cross Darts League — shared site styles
   Colour palette matches the captain results portal so the whole system feels
   like one product. */
:root{
  --ink:#1c1f26; --sub:#5c6270; --line:#e3e5ea; --bg:#f6f7f9; --card:#ffffff;
  --brand:#8b2f2f; --brand-dark:#6e2424; --brand-ink:#ffffff;
  --ok:#2f7a4f; --ok-bg:#e9f6ee; --gold:#a9781f; --gold-bg:#fbf1dd;
  --radius:14px; --maxw:960px;
}
*{box-sizing:border-box;}
html,body{margin:0; padding:0;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--ink); line-height:1.45;
}
a{color:var(--brand); text-decoration:none;}
a:hover{text-decoration:underline;}
img{max-width:100%;}

/* ---------- layout ---------- */
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 16px 56px;}
header.site{background:var(--brand); color:var(--brand-ink); margin-bottom:20px;}
header.site .inner{max-width:var(--maxw); margin:0 auto; padding:18px 16px;}
header.site h1{margin:0; font-size:20px; font-weight:700;}
header.site h1 a{color:inherit; text-decoration:none;}
header.site .tagline{font-size:12.5px; opacity:.85; margin-top:2px;}
nav.site{display:flex; flex-wrap:wrap; gap:4px; margin-top:14px;}
nav.site a{
  color:var(--brand-ink); font-size:13.5px; font-weight:600; padding:7px 12px;
  border-radius:20px; background:rgba(255,255,255,.12);
}
nav.site a:hover{background:rgba(255,255,255,.22); text-decoration:none;}
nav.site a.current{background:#fff; color:var(--brand);}

main{display:block;}
h2.section-title{font-size:17px; margin:32px 0 12px;}
h2.section-title:first-child{margin-top:0;}
.page-title{font-size:24px; margin:0 0 4px;}
.page-sub{color:var(--sub); font-size:14px; margin:0 0 20px;}

/* ---------- cards / grid ---------- */
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px 20px; margin-bottom:16px;}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:16px;}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:16px;}
@media (max-width:700px){ .grid-2, .grid-3{grid-template-columns:1fr;} }

/* ---------- loading / empty states ---------- */
.loading, .empty{color:var(--sub); font-size:13.5px; padding:10px 0;}
.err-banner{background:#fdecec; border:1px solid #f2b8b8; color:#8a2323; font-size:13px; padding:10px 12px; border-radius:10px; margin-bottom:16px; display:none;}

/* ---------- tables ---------- */
table.data{width:100%; border-collapse:collapse; font-size:13.5px;}
table.data th, table.data td{text-align:left; padding:9px 8px; border-bottom:1px solid var(--line); white-space:nowrap;}
table.data th{color:var(--sub); font-size:11.5px; text-transform:uppercase; letter-spacing:.02em; font-weight:700;}
table.data tbody tr:hover{background:#faf6f6;}
table.data td.num, table.data th.num{text-align:right;}
.table-scroll{overflow-x:auto;}
tr.leader td{font-weight:700;}
tr.leader td:first-child{color:var(--brand);}

/* ---------- news ---------- */
.news-item{border-bottom:1px dashed var(--line); padding:12px 0;}
.news-item:last-child{border-bottom:none;}
.news-item .date{font-size:11.5px; color:var(--sub); text-transform:uppercase; font-weight:700; letter-spacing:.02em;}
.news-item h3{margin:2px 0 4px; font-size:15px;}
.news-item p{margin:0; font-size:13.5px; color:var(--ink);}

/* ---------- fixtures ---------- */
.fixture-row{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 0; border-bottom:1px solid var(--line);}
.fixture-row:last-child{border-bottom:none;}
.fixture-row .teams{font-weight:600; font-size:14px;}
.fixture-row .date{font-size:12px; color:var(--sub);}
.fixture-row .result{font-weight:700; font-size:14.5px; min-width:52px; text-align:right;}
.status-tag{display:inline-block; font-size:10.5px; font-weight:700; padding:2px 9px; border-radius:20px;}
.status-tag.upcoming{background:#eef0f3; color:var(--sub);}
.status-tag.progress{background:#fff3d6; color:#8a6a12;}
.status-tag.submitted{background:var(--ok-bg); color:var(--ok);}
.filter-row{display:flex; gap:8px; align-items:center; margin-bottom:16px; flex-wrap:wrap;}
.filter-row label{font-size:12.5px; font-weight:600; color:var(--sub);}
.filter-row select{padding:9px 10px; border:1px solid var(--line); border-radius:10px; font-size:14px; background:#fff;}

/* ---------- stat tiles ---------- */
.stat-tile{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px; text-align:center;}
.stat-tile .rank{font-size:11px; font-weight:700; color:var(--sub); text-transform:uppercase; letter-spacing:.03em;}
.stat-tile .name{font-size:16px; font-weight:700; margin:6px 0 2px;}
.stat-tile .team{font-size:12px; color:var(--sub); margin-bottom:8px;}
.stat-tile .value{font-size:26px; font-weight:800; color:var(--brand);}
.stat-tile .value .unit{font-size:12px; font-weight:600; color:var(--sub); margin-left:3px;}

/* ---------- badges / chips ---------- */
.chip{display:inline-block; font-size:11px; padding:3px 9px; border-radius:20px; font-weight:700; margin:2px 3px 0 0;}
.chip.gold{background:var(--gold-bg); color:var(--gold);}
.chip.brand{background:#fbf1f1; color:var(--brand);}

/* ---------- buttons ---------- */
.btn{font-family:inherit; font-size:14px; font-weight:600; border-radius:10px; border:none; cursor:pointer; padding:10px 16px; display:inline-block;}
.btn-primary{background:var(--brand); color:#fff;}
.btn-primary:hover{background:var(--brand-dark);}
.btn-secondary{background:#eef0f3; color:var(--ink);}
.backline{display:inline-block; margin-bottom:14px; font-size:13px; color:var(--sub);}

/* ---------- quick links (home page: portal / admin) ---------- */
.quicklinks{display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:28px;}
@media (max-width:600px){ .quicklinks{grid-template-columns:1fr;} }
.quicklink-card{
  display:flex; gap:14px; align-items:flex-start; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); padding:16px 18px; color:var(--ink); text-decoration:none;
}
.quicklink-card:hover{border-color:var(--brand); text-decoration:none; background:#fbf6f6;}
.quicklink-card .icon{
  flex-shrink:0; width:40px; height:40px; border-radius:10px; background:var(--brand); color:#fff;
  display:flex; align-items:center; justify-content:center;
}
.quicklink-card .icon svg{width:22px; height:22px;}
.quicklink-card .title{font-weight:700; font-size:15px; margin-bottom:2px;}
.quicklink-card .desc{font-size:13px; color:var(--sub);}

footer.site{max-width:var(--maxw); margin:32px auto 0; padding:16px; color:var(--sub); font-size:12px; text-align:center;}
