:root {
  --navy: #0f1b2e; --midnight: #02111e; --gold: #e3b341; --deep-gold: #b88628;
  --slate: #5b6677; --mist: #f3f5f9; --line: #dce1ea; --red: #c0392b; --green: #1e8e5a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: var(--navy); background: var(--mist);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--deep-gold); }
.topbar { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: var(--midnight); color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; }
.brand span { color: var(--gold); text-transform: uppercase; font-size: 12px; letter-spacing: .12em; }
#nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
#nav a { color: #dce1ea; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
#nav a.active, #nav a:hover { background: rgba(227,179,65,.16); color: var(--gold); }
#account { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #dce1ea; }
main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
h1 { font-size: 28px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--slate); }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-top: 20px; }
.stat { font-size: 32px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--slate); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
button, .button { font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
button.primary { background: var(--gold); border-color: var(--gold); color: var(--midnight); }
button.danger { color: var(--red); }
button.link { border: 0; background: none; padding: 2px 4px; color: var(--deep-gold); font-weight: 500; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; width: 100%; background: #fff; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
label.check input { width: auto; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--mist); color: var(--slate); margin: 1px 2px 1px 0; }
.badge.gold { background: rgba(227,179,65,.2); color: #7a5a12; }
.badge.red { background: rgba(192,57,43,.12); color: var(--red); }
.badge.green { background: rgba(30,142,90,.12); color: var(--green); }
dialog { border: 0; border-radius: 18px; padding: 24px; width: min(520px, 92vw); box-shadow: 0 20px 60px rgba(2,17,30,.3); }
dialog::backdrop { background: rgba(2,17,30,.45); }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.signin { max-width: 400px; margin: 48px auto; }
.signin .card { padding: 28px; }
.or { text-align: center; color: var(--slate); font-size: 13px; margin: 16px 0; }
.apple { width: 100%; background: #000; color: #fff; border-color: #000; padding: 11px; }
.error { color: var(--red); font-size: 14px; margin-top: 10px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--midnight); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.toolbar input, .toolbar select { width: auto; min-width: 200px; }
