/* TopDarts website: landing page, profile, settings, admin, board settings */
:root {
  --bg: #0a0c0f; --bg2: #0e1115; --panel: #13171c; --panel2: #1b2027; --line: #262c35; --line2: #343c47;
  --text: #f2f4f7; --muted: #8a93a2; --accent: #2fbf71; --accent2: #25a35f; --bad: #e5484d; --warn: #f0b429; --blue: #4aa3ff;
  --r: 16px; --maxw: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 850; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 750; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
main.page { max-width: var(--maxw); margin: 0 auto; padding: 32px 20px 64px; }
main.narrow { max-width: 640px; margin: 0 auto; padding: 64px 16px; }

/* ---------- brand + navigation */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; font-size: 20px; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; }
.brand span { color: var(--accent); }
.brand b { font-weight: inherit; }  /* same weight as the game screen's wordmark */
.brand.big { font-size: 30px; margin-bottom: 28px; } .brand.big img { width: 46px; height: 46px; }
.nav { position: sticky; top: 0; z-index: 20; background: rgba(10, 12, 15, .78); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); }
/* the header is the same on every page and in the game screen: full width, 60 px, logo left, avatar right */
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 60px; max-width: none; padding: 0 24px; }
.nav .links { display: flex; gap: 4px; margin-left: 12px; }
.nav .links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav .links a:hover, .nav .links a.on { color: var(--text); background: var(--panel); }
.nav .grow { flex: 1; }
.menu { position: relative; }
.menu > button { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; color: var(--text);
  font: inherit; font-weight: 650; padding: 3px; border-radius: 999px; cursor: pointer; }
.menu .who { display: none; }
.menu .drop .me { display: flex; flex-direction: column; padding: 8px 12px 6px; }
.menu .drop .me span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.menu > button:hover { border-color: var(--line); background: var(--panel); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center;
  font-weight: 800; color: var(--accent); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu .drop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.5); display: none; }
.menu.open .drop { display: block; }
.menu .drop a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; font-weight: 600; }
.menu .drop a:hover { background: var(--panel2); }
.menu .drop hr { border: 0; border-top: 1px solid var(--line); margin: 6px; }
@media (max-width: 760px) {
  .nav .links { display: none; }
  .nav .wrap { padding: 0 16px; }
}

/* ---------- buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:hover { border-color: var(--line2); }
.btn.go { background: var(--accent); border-color: var(--accent); color: #06130b; }
.btn.go:hover { background: #38cc7c; }
.btn.big { font-size: 17px; padding: 15px 26px; border-radius: 14px; }
.btn.bad { color: var(--bad); }
.btn.sm { font-size: 14px; padding: 7px 12px; border-radius: 10px; }
.btn.google { background: #fff; color: #1f1f1f; border-color: #fff; }
.btn.google:hover { background: #eef1f4; }
.btn[disabled] { opacity: .5; cursor: default; }
input, select { font: inherit; font-size: 16px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); min-width: 0; }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { font: inherit; font-weight: 650; border: 0; background: none; color: var(--muted); padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--text); color: var(--bg); }
.err { color: var(--bad); min-height: 1.3em; margin-top: 8px; font-size: 15px; }
.ok { color: var(--accent); }

/* ---------- cards, grids, stats, tables */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.card h2 { font-size: 19px; margin-bottom: 14px; }
.card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card .head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .grid3, .grid2 { grid-template-columns: minmax(0, 1fr); } .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--panel2); border-radius: 14px; padding: 16px; }
.kpi b { display: block; font-size: 30px; font-weight: 850; letter-spacing: -.02em; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--panel2); color: var(--muted); }
.pill.ok { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pill.bad { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.dot.ok { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }
.empty { color: var(--muted); padding: 18px 0; }

/* ---------- profile header */
.phead { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.phead .avatar { width: 84px; height: 84px; font-size: 34px; }
.phead h1 { margin: 0; }
.phead .grow { flex: 1; }

/* ---------- footer */
.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot .wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-top: 26px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); text-decoration: none; } .foot a:hover { color: var(--text); }
.foot .grow { flex: 1; }

/* ---------- modal dialog (Site.dialog) */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(4, 6, 8, .66); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 16px; animation: mdfade .12s ease-out; }
.modal-box { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; padding: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: mdpop .14s ease-out; }
.modal-box h2 { font-size: 20px; margin: 0 0 8px; }
.modal-box p { margin: 0; }
.modal-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: #ef5b60; }
@keyframes mdfade { from { opacity: 0; } }
@keyframes mdpop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
