/* Bowling Events UK - shared stylesheet for the public pages and the admin. */
:root {
  --navy: #0a1d38; --navy-mid: #0e2b52; --navy-deep: #04101f; --ink: #0a1d38; --ink-soft: #4a5b6e;
  --paper: #f4f6f8; --white: #fff; --lime: #c3d600; --blue: #2196f3; --red: #c62828; --amber: #d98a00;
  --green: #2e7d32; --line: #d9dee5; --radius: 10px;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif; --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --display: "Anton", "Haettenschweiler", Impact, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); line-height: 1.45; }
a { color: var(--navy-mid); }
h1, h2, h3 { font-family: var(--cond); font-weight: 700; letter-spacing: .01em; margin: 0 0 .4em; line-height: 1.1; }
h1 { font-size: 2rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.15rem; }
h1.display { font-family: var(--display); font-weight: 400; font-size: 2.6rem; text-transform: uppercase; letter-spacing: .02em; }
p { margin: 0 0 .9em; }
small, .muted { color: var(--ink-soft); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }

/* ---- public chrome ---- */
.pub-top { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.2rem; flex-wrap: wrap; gap: .5rem; }
.pub-top .brand { font-family: var(--display); font-size: 1.35rem; letter-spacing: .04em; color: #fff; text-decoration: none; }
.pub-top nav a { color: #fff; text-decoration: none; font-family: var(--cond); font-weight: 600; font-size: 1.05rem;
  margin-left: 1.1rem; opacity: .9; }
.pub-top nav a:hover { color: var(--lime); opacity: 1; }
.pub-main { max-width: 900px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.pub-main.narrow, main.narrow { max-width: 640px; margin: 0 auto; padding: 2rem 1rem; }
.pub-foot { text-align: center; color: var(--ink-soft); font-size: .9rem; padding: 1.5rem 1rem 2.5rem; }
.hero { background: var(--navy-mid); color: #fff; border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1.4rem; }
.hero h1 { color: #fff; margin-bottom: .2em; }
.hero p { margin: 0; opacity: .92; }
.hero .lime { color: var(--lime); }

/* ---- cards, grids ---- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; }
.card h2 { margin-top: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-2 { display: grid; gap: .8rem 1.2rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.tile .num { font-family: var(--cond); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--navy); }
.tile .lbl { color: var(--ink-soft); font-size: .9rem; margin-top: .2rem; }
/* tiles are links to the list behind them: no underline, and they keep their
   shape however long the label is */
.tile { display: block; height: 100%; overflow-wrap: anywhere; }
a.tile, a.tile:hover { text-decoration: none; color: inherit; }
a.tile { transition: border-color .12s, box-shadow .12s; }
a.tile:hover { border-color: var(--navy-mid); box-shadow: 0 2px 8px rgba(10, 29, 56, .10); }
a.tile:hover .lbl { color: var(--navy-mid); }
a.tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.grid { align-items: stretch; }
.tile.warn .num { color: var(--amber); } .tile.bad .num { color: var(--red); } .tile.good .num { color: var(--green); }

/* ---- forms ---- */
label { display: block; font-weight: 600; font-size: .92rem; margin: .7rem 0 .25rem; }
label .opt { font-weight: 400; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password],
input[type=search], select, textarea { width: 100%; padding: .55rem .65rem; border: 1px solid #b8c0cc; border-radius: 6px;
  font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
textarea { min-height: 80px; }
.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 500; margin: .5rem 0; }
.check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; }
.field-error { color: var(--red); font-size: .88rem; margin-top: .2rem; }
.has-error input, .has-error select { border-color: var(--red); }
.form-errors { background: #fdecea; border: 1px solid #f5c2c0; color: #7a1c14; border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
.hint { font-size: .88rem; color: var(--ink-soft); margin-top: .2rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1.1rem 1rem; margin: 0 0 1.1rem; background: #fff; }
legend { font-family: var(--cond); font-weight: 700; font-size: 1.15rem; padding: 0 .4rem; }
.inline { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; }
.inline > * { flex: 1 1 160px; }
.inline > .fixed { flex: 0 0 auto; }
.hp { position: absolute; left: -9999px; top: -9999px; }

/* ---- buttons ---- */
.btn, button.btn { display: inline-block; background: var(--navy); color: #fff; border: 0; border-radius: 6px; padding: .6rem 1.1rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--navy-mid); }
.btn.lime { background: var(--lime); color: var(--navy-deep); }
.btn.lime:hover { background: #d3e51a; }
.btn.light { background: #e4e9ef; color: var(--ink); }
.btn.danger { background: var(--red); }
.btn.small { padding: .35rem .7rem; font-size: .88rem; }
.btn.big { font-size: 1.15rem; padding: .8rem 1.5rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
form.inline-form { display: inline; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
table.list th, table.list td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: #eef1f5; font-family: var(--cond); font-size: 1rem; font-weight: 700; white-space: nowrap; }
table.list tr:hover td { background: #f7f9fb; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
table.kv td { padding: .3rem .5rem; vertical-align: top; }
table.kv td:first-child { color: var(--ink-soft); white-space: nowrap; width: 38%; }

/* ---- badges ---- */
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-green { background: #dcefdd; color: #1b5e20; } .badge-amber { background: #fdefd3; color: #7a4d00; }
.badge-red { background: #fdecea; color: #8e1c14; } .badge-blue { background: #dfeefc; color: #0b4f8a; }
.badge-grey { background: #e6e9ee; color: #3c4653; }

/* ---- admin chrome ---- */
.adm-top { background: var(--navy); color: #fff; padding: .55rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.adm-top .brand { font-family: var(--display); letter-spacing: .04em; color: #fff; text-decoration: none; font-size: 1.15rem; }
.adm-top nav { display: flex; flex-wrap: wrap; gap: .1rem .2rem; }
.adm-top nav a { color: #fff; text-decoration: none; padding: .35rem .6rem; border-radius: 6px; font-weight: 500; font-size: .95rem; }
.adm-top nav a.active, .adm-top nav a:hover { background: rgba(255,255,255,.14); }
.adm-top .who { margin-left: auto; font-size: .9rem; opacity: .9; }
.adm-top .who form { display: inline; }
.adm-top .who button { background: none; border: 0; color: var(--lime); cursor: pointer; font: inherit; }
.adm-main { max-width: 1240px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.flash { background: #e6f4ea; border: 1px solid #b7dfc2; color: #1b5e20; padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filters label { margin: 0 0 .2rem; font-size: .82rem; }
.filters > div { flex: 1 1 140px; }
.filters input, .filters select { padding: .4rem .5rem; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.ok { color: var(--green); font-weight: 600; } .bad { color: var(--red); font-weight: 600; }
.setting-key { font-size: .78rem; color: var(--ink-soft); font-family: ui-monospace, Consolas, monospace; }
.login-box { max-width: 380px; margin: 4rem auto; }
.fees-box { background: #f0f4f8; border-radius: 8px; padding: .8rem 1rem; margin-top: .8rem; }
.fees-box .total { font-family: var(--cond); font-size: 1.4rem; font-weight: 700; }
.lookup-result { margin-top: .5rem; font-size: .92rem; }
.lookup-result.good { color: var(--green); } .lookup-result.warn { color: var(--amber); } .lookup-result.bad { color: var(--red); }
.progress { font-size: .9rem; color: var(--ink-soft); }
pre.mail { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }

/* a quiet marker on links only the office can see before entries open */
.pub-top .preview-dot { font-size: .7rem; background: var(--lime); color: var(--navy-deep); border-radius: 999px;
  padding: .05rem .4rem; vertical-align: middle; font-family: var(--body); font-weight: 600; }

.tile .tile-extra { font-size: .8rem; margin-top: .35rem; line-height: 1.3; }
