:root { --navy: #0f1a2e; --navy-2: #16243d; --navy-3: #1d2e4c; --line: #2c3b57; --gold: #d4a845; --gold-2: #f0cf7a; --black: #0b0b0d; --ink: #eef1f6; --muted: #9aa6ba; --bad: #e07a6a; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% 0%, var(--navy-2), var(--black) 70%) fixed; color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button { font: inherit; padding: 10px 14px; border: 0; border-radius: 10px; background: linear-gradient(var(--gold-2), var(--gold)); color: var(--black); font-weight: 700; cursor: pointer; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
button.danger { color: var(--bad); border-color: rgba(224,122,106,.5); }
button.small { padding: 6px 10px; font-size: 14px; }
button:disabled { opacity: .6; cursor: default; }
input, select { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--black); color: var(--ink); }
input:focus, select:focus { outline: 2px solid var(--gold); border-color: transparent; }
input[type=checkbox] { width: auto; accent-color: var(--gold); }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; padding: 40px; } .bad { color: var(--bad); }
.hidden { display: none !important; }

/* sign-in */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login { width: 100%; max-width: 420px; background: rgba(15, 26, 46, .85); border: 1px solid rgba(212, 168, 69, .35); border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.login .mark { width: 64px; height: 64px; margin: 0 auto 12px; font-size: 16px; }
.login h1 { margin: 0; text-align: center; font-size: 20px; letter-spacing: .08em; text-transform: uppercase; }
.login .tag { margin: 4px 0 24px; text-align: center; color: var(--gold); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.login label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.login button { width: 100%; margin-top: 14px; font-size: 16px; }
.msg { margin-top: 16px; font-size: 15px; text-align: center; }
.msg.bad { color: var(--bad); }
.mark { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: .04em; flex: none; }

/* app */
.top { position: sticky; top: 0; z-index: 5; display: flex; gap: 16px; align-items: center; padding: 10px 20px; background: rgba(11, 11, 13, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: center; } .brand b { display: block; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; } .brand small { color: var(--gold); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tab { background: transparent; color: var(--muted); font-weight: 500; padding: 8px 12px; }
.tab.on { color: var(--black); background: linear-gradient(var(--gold-2), var(--gold)); font-weight: 700; }
#view { max-width: 1200px; margin: 0 auto; padding: 20px; }
.head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.head h2 { margin: 0; font-size: 22px; } .head p { margin: 0; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; } .tools input { width: 220px; } .tools select { width: auto; }
.note { background: rgba(212,168,69,.1); border: 1px solid rgba(212,168,69,.35); border-radius: 10px; padding: 8px 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.club { text-align: left; display: flex; flex-direction: column; gap: 2px; background: var(--navy); color: var(--ink); border: 1px solid var(--line); font-weight: 400; padding: 14px; }
.club:hover, .card:hover { border-color: var(--gold); }
.club-top { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; } .code { margin-left: auto; color: var(--gold); font-weight: 700; letter-spacing: .08em; }
.kit { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); border: 1px solid rgba(255,255,255,.3); display: inline-block; }
.kit.empty { background: var(--navy-3); }
.chip { display: inline-block; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.chip.gold { color: var(--gold); border-color: rgba(212,168,69,.5); }
table.list { width: 100%; border-collapse: collapse; } .list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.list td { padding: 8px; border-bottom: 1px solid rgba(44,59,87,.5); } .list .num { text-align: right; font-variant-numeric: tabular-nums; }
.list.click tbody tr { cursor: pointer; } .list.click tbody tr:hover { background: var(--navy-2); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.card { text-align: left; padding: 0; overflow: hidden; background: var(--navy); color: var(--ink); border: 1px solid var(--line); font-weight: 400; display: flex; flex-direction: column; }
.ph { aspect-ratio: 5 / 7; background: var(--black); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.ph img { width: 100%; height: 100%; object-fit: contain; }
.ph.big { width: 220px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.cbody { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; } .cbody .small { display: flex; justify-content: space-between; }
.rating { color: var(--gold); font-weight: 700; }
.empty { text-align: center; padding: 48px 16px; border: 1px dashed var(--line); border-radius: 14px; }
.panel { background: var(--navy); border: 1px solid var(--line); border-radius: 14px; padding: 18px; max-width: 720px; }
.plan { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--navy); color: var(--ink); padding: 0; width: min(760px, 94vw); max-height: 90vh; }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dlg { padding: 20px; } .dlg h3 { margin: 0 0 12px; } .dlg h4 { margin: 18px 0 6px; color: var(--muted); font-weight: 500; }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.f { display: block; margin-bottom: 10px; } .f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; } .checks label { display: flex; gap: 6px; align-items: center; }
.cardedit { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; } .grow { flex: 1; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 80px); opacity: 0; background: var(--navy-3); border: 1px solid var(--gold); padding: 10px 16px; border-radius: 10px; transition: transform .25s, opacity .25s; z-index: 50; max-width: 90vw; }
#toast.show { transform: translate(-50%, 0); opacity: 1; } #toast.bad { border-color: var(--bad); }
@media (max-width: 640px) {
  .form2, .cardedit { grid-template-columns: 1fr; } .ph.big { width: 100%; max-width: 260px; } .tools input { width: 100%; }
  .top { padding: 8px 12px; gap: 8px; } .brand { flex: 1; } .brand b { font-size: 13px; }
  nav { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } nav::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; padding: 7px 11px; }
  #view { padding: 14px 12px; } .cards { grid-template-columns: repeat(2, 1fr); gap: 8px; } .grid { grid-template-columns: 1fr; }
  .list th:nth-child(3), .list td:nth-child(3), .list th:nth-child(4), .list td:nth-child(4) { display: none; }
}
