/* Members area + admin — shares tokens with styles.css */

/* ---------- Pick cards (also used on the landing page) ---------- */
.pick-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.pick-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.pick-card.t-prop::before { background: #7c3aed; }
.pick-card.t-total::before { background: #0891b2; }
.pick-card.t-moneyline::before { background: #16a34a; }
.pick-card.t-parlay::before { background: linear-gradient(to bottom, #f59e0b, #ef4444); }
.pick-card.t-teaser::before, .pick-card.t-futures::before { background: #db2777; }
.pick-card.is-draft { opacity: .6; border-style: dashed; }
.pc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-ctx { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--fg-3); }
.pc-league { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; font-weight: 700; color: var(--fg-2); }
.pc-crests { display: inline-flex; }
.pc-crests .crest + .crest { margin-left: -6px; }
.pc-match { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-time { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-4); white-space: nowrap; }
.type-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.type-badge.t-prop { background: rgba(124,58,237,.12); color: #6d28d9; }
.type-badge.t-total { background: rgba(8,145,178,.12); color: #0e7490; }
.type-badge.t-moneyline { background: var(--green-soft); color: var(--green); }
.type-badge.t-parlay { background: rgba(245,158,11,.16); color: #b45309; }
.type-badge.t-teaser, .type-badge.t-futures { background: rgba(219,39,119,.12); color: #be185d; }
.pc-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pc-sel { font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.pc-sel small { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--fg-3); margin-left: 6px; white-space: nowrap; }
.pc-sel.blur { filter: blur(6px); user-select: none; color: var(--fg-2); }
.pc-main .units { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; background: var(--blue-soft); color: var(--blue); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pc-legs { margin: -2px 0 0; padding-left: 18px; list-style: decimal; font-size: 14px; color: var(--fg-2); display: flex; flex-direction: column; gap: 3px; }
.pc-write { font-size: 14px; color: var(--fg-2); line-height: 1.5; }
.pc-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; background: var(--bg-2); color: var(--fg-3); }
.status-chip.s-win { background: var(--green-soft); color: var(--green); }
.status-chip.s-loss { background: var(--red-soft); color: var(--red); }
.status-chip.s-push { background: var(--bg-3); color: var(--fg-2); }
.free-chip { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 4px 9px; }
.pc-actions { margin-left: auto; display: inline-flex; gap: 4px; flex-wrap: wrap; }
.mini { height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-2); background: #fff; font-size: 12px; font-weight: 600; color: var(--fg-2); }
.mini:hover { border-color: var(--fg-4); color: var(--fg); }
.mini.on { background: var(--fg); color: #fff; border-color: var(--fg); }
.mini.danger { color: var(--red); }
.mini.danger:hover { border-color: var(--red); }

/* ---------- App shell ---------- */
.app { min-height: 100vh; background: var(--bg-2); }
.app-bar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.app-bar .container { display: flex; align-items: center; gap: 18px; height: 60px; }
.app-tabs { display: flex; gap: 2px; margin-left: 8px; }
.app-tabs button { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--fg-2); }
.app-tabs button:hover { color: var(--fg); background: var(--bg-2); }
.app-tabs button.active { background: var(--fg); color: #fff; }
.app-right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-3); }
.app-right .who { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-main { padding: 28px 0 80px; }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.app-head h1 { font-size: 30px; letter-spacing: -.03em; }
.app-head p { color: var(--fg-3); font-size: 14px; margin-top: 4px; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.mode-pill.live { background: var(--green-soft); color: var(--green); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.panel-body { padding: 16px 18px; }
.group-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); margin: 18px 0 10px; }
.empty { padding: 36px 20px; text-align: center; color: var(--fg-3); font-size: 14px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 14px; background: #fff; border: 1px solid rgba(10,124,255,.3); box-shadow: 0 10px 30px rgba(10,124,255,.10); margin-bottom: 18px; }
.banner.warn { border-color: rgba(217,119,6,.35); box-shadow: 0 10px 30px rgba(217,119,6,.10); }
.banner b { font-weight: 600; }
.banner p { font-size: 14px; color: var(--fg-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--fg); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px rgba(0,0,0,.25); z-index: 200; animation: pop .25s var(--ease); }

/* ---------- Auth ---------- */
.auth { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 26px; letter-spacing: -.03em; margin-top: 6px; }
.auth-card p.sub { color: var(--fg-3); font-size: 14px; margin-top: 6px; }
.auth-card form { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; }
.auth-note { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); font-size: 13px; line-height: 1.45; }
.auth-note code { font-family: var(--font-mono); font-size: 12px; }
.err { color: var(--red); font-size: 13px; margin-top: 6px; }

/* ---------- Stats ---------- */
.stat-row.compact { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.stat-row.compact .stat-value { font-size: 26px; }

/* ---------- Admin board ---------- */
.aboard { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.aboard-games { display: flex; flex-direction: column; }
.agame { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ag-time, .ag-time small { white-space: nowrap; }
.agame:last-child { border-bottom: 0; }
.agame:hover { background: #fafafb; }
.agame.has-pick { background: linear-gradient(90deg, rgba(10,124,255,.05), transparent 60%); }
.ag-time { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--fg); }
.ag-time small { display: block; font-weight: 500; color: var(--fg-4); font-size: 11px; }
.ag-teams { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ag-team { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
.ag-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-team i { font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--fg-4); font-weight: 500; }
.ag-team em { font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); font-weight: 500; margin-left: auto; padding-left: 8px; }
.ag-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ag-actions .mini { height: 28px; }
.ag-actions .mini.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.ag-count { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 2px 7px; }
.sticky { position: sticky; top: 76px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--fg-2); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.form input, .form select, .form textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; height: 42px; font: inherit; font-size: 14px; color: var(--fg); background: #fff; outline: none; }
.form textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.form .check { flex-direction: row; align-items: center; gap: 10px; }
.form .check input { width: 18px; height: 18px; accent-color: var(--blue); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; }
.type-select { display: flex; gap: 6px; flex-wrap: wrap; }
.type-select button { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--fg-2); background: #fff; }
.type-select button.on { background: var(--fg); color: #fff; border-color: var(--fg); }
.date-nav { display: inline-flex; align-items: center; gap: 6px; }
.date-nav input { height: 36px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; font: inherit; font-size: 13px; }
.date-nav button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-size: 16px; }

/* ---------- Members table ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; padding: 10px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; background: var(--bg-2); color: var(--fg-3); }
.pill.active { background: var(--green-soft); color: var(--green); }
.pill.admin { background: var(--blue-soft); color: var(--blue); }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) { .aboard { grid-template-columns: 1fr; } .sticky { position: static; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .app-bar .container { gap: 10px; }
  .app-bar .logo-word { display: none; }
  .app-tabs { margin-left: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .app-tabs button { padding: 0 10px; font-size: 13px; white-space: nowrap; }
  .app-right .who { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-row.compact { grid-template-columns: 1fr 1fr; }
  .agame { grid-template-columns: 84px minmax(0, 1fr); }
  .ag-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .form .row, .form .row-3 { grid-template-columns: 1fr; }
  .table th:nth-child(4), .table td:nth-child(4) { display: none; }
  .pc-time { display: none; }
}

/* ---------- Drawer (admin pick form) ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15,15,18,.4); backdrop-filter: blur(3px); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: #fff; box-shadow: -20px 0 60px rgba(0,0,0,.2); overflow-y: auto; animation: slide .3s var(--ease); display: flex; flex-direction: column; }
.drawer-panel .panel-head { position: sticky; top: 0; background: #fff; z-index: 1; }
.drawer-panel .form { padding: 18px; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
