/* MLW League Office — admin styles (same system as the public site) */
:root {
  --bg: #faf9f7;
  --surface: #fff;
  --surface2: #f3f2ee;
  --line: #e0ded6;
  --line2: #e9e7e0;
  --navy: #0c1b45;
  --blue: #1b3fd1;
  --red: #c01327;
  --ink: #16181d;
  --dim: #565d6b;
  --dim2: #8a8f9b;
  --green: #1f7a4a;
  --disp: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .disp { font-family: var(--disp); font-weight: 600; line-height: 1.05; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.boot { padding: 60px 20px; text-align: center; color: var(--dim2); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }

/* masthead */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff; border-bottom: 3px solid var(--red); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.brand b { font-family: var(--disp); font-weight: 700; font-size: 19px; text-transform: uppercase; letter-spacing: 0.04em; display: block; line-height: 1; }
.brand small { display: block; font-size: 8.5px; font-weight: 600; letter-spacing: 0.28em; color: #93a2cf; text-transform: uppercase; }
nav.tabs { display: flex; gap: 2px; margin-left: auto; }
nav.tabs button {
  background: none; border: none; color: #a7b4dd;
  font-family: var(--disp); font-weight: 600; font-size: 15px; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 18px 11px 15px; border-bottom: 2px solid transparent;
}
nav.tabs button:hover { color: #fff; }
nav.tabs button.on { color: #fff; border-bottom-color: #fff; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-actions a, .top-actions button {
  background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; border-radius: 5px;
  font-size: 12.5px; font-weight: 600; padding: 6px 10px;
}
.top-actions a:hover, .top-actions button:hover { border-color: rgba(255,255,255,0.65); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; border-top: 4px solid var(--red); }
.login-card img { width: 52px; height: 52px; border-radius: 10px; margin-bottom: 12px; }
.login-card h1 { font-size: 30px; text-transform: uppercase; }
.login-card p { color: var(--dim2); font-size: 13px; margin: 6px 0 18px; }
.login-card input { width: 100%; }
.login-card .err { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* content */
main.wrap { padding-top: 26px; padding-bottom: 70px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); position: relative; }
.sec-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 52px; height: 2px; background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%); }
.sec-head h2 { font-size: 22px; text-transform: uppercase; letter-spacing: 0.05em; }
.sec-head .note { font-size: 12.5px; color: var(--dim2); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }

/* inputs */
input, select {
  font-family: var(--body); font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px;
}
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
input.num { width: 58px; text-align: right; font-variant-numeric: tabular-nums; }
input.tiny { width: 46px; text-align: center; }
input.wide { width: 100%; }
input[type="color"] { padding: 2px; width: 44px; height: 34px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim2); }

.btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--disp); font-weight: 600; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 15px; border-radius: 5px; border: 1px solid transparent; }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: #a90f21; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.blue:hover { background: #2b52ec; }
.btn.line { border-color: #c9c6bc; background: #fff; color: var(--ink); }
.btn.line:hover { border-color: var(--ink); }
.btn.saved { background: var(--green) !important; color: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.xbtn { background: none; border: none; color: var(--dim2); font-size: 15px; padding: 4px 7px; border-radius: 4px; }
.xbtn:hover { color: var(--red); background: #f7e9eb; }

/* scoreboard */
.day-card { margin-bottom: 12px; overflow: hidden; }
.day-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface2); }
.day-head b { font-family: var(--disp); font-weight: 600; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; }
.day-head span { color: var(--dim2); font-size: 12px; }
.game-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line2); }
.game-row:last-child { border-bottom: none; }
.game-row .team { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; width: 150px; }
.game-row .team.right { justify-content: flex-end; text-align: right; }
.game-row img.lg { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; object-fit: cover; }
.game-row .hl { flex: 1; min-width: 200px; }
.game-row .dash { color: var(--dim2); font-weight: 700; }
.badge-status { font-family: var(--disp); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--line); color: var(--dim); }
.badge-status.final { background: var(--red); border-color: var(--red); color: #fff; }

.addbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px; }

/* rosters */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }
.fchip { background: var(--surface); border: 1px solid var(--line); color: var(--dim); font-family: var(--disp); font-weight: 600; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; padding: 6px 12px; border-radius: 4px; display: inline-flex; align-items: center; gap: 7px; }
.fchip img { width: 18px; height: 18px; border-radius: 50%; }
.fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tbl-scroll { overflow-x: auto; }
table.adm { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.adm th { font-family: var(--disp); font-weight: 600; font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim2); text-align: center; padding: 9px 5px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.adm th.l { text-align: left; padding-left: 12px; }
table.adm td { padding: 7px 5px; border-bottom: 1px solid var(--line2); text-align: center; white-space: nowrap; }
table.adm td.l { text-align: left; padding-left: 12px; }
table.adm tr:last-child td { border-bottom: none; }
table.adm .rate { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--dim); width: 52px; }
table.adm input.pname { width: 150px; font-weight: 600; }

/* teams */
.teamgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tcard { padding: 16px; border-top: 4px solid var(--c1, var(--blue)); display: flex; flex-direction: column; gap: 10px; }
.tcard .row1 { display: flex; align-items: center; gap: 10px; }
.tcard img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); }
.tcard .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* settings */
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.panel-pad { padding: 16px; }
.hint { font-size: 12.5px; color: var(--dim2); line-height: 1.55; }

/* analytics */
.stat-card { display: flex; flex-direction: column; gap: 4px; }
.stat-card span { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim2); }
.stat-card b { font-family: var(--disp); font-weight: 700; font-size: 30px; line-height: 1; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.chart .bar { flex: 1; background: var(--blue); border-radius: 2px 2px 0 0; min-height: 2px; opacity: 0.85; }
.chart .bar:hover { opacity: 1; background: var(--red); }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim2); margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px); background: var(--ink); color: #fff; font-weight: 500; font-size: 13.5px; padding: 10px 16px; border-radius: 8px; z-index: 400; opacity: 0; pointer-events: none; transition: 0.2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }

@media (max-width: 760px) {
  nav.tabs { overflow-x: auto; }
  .game-row .team { width: 120px; }
}
