:root {
  --green: #10312A; --green2: #1C4A3E; --green3: #3C5E54;
  --cream: #F5F3EC; --card: #FDFCF9; --line: #E4E1D8; --line2: #D9D5CA;
  --lime: #C8F031; --lime-soft: #E3EEDB; --lime-mid: #DDF59A;
  --coral: #C24A2E; --coral-dark: #A63E25; --coral-soft: #FBE3DC;
  --text: #10312A; --muted: #4F5D57; --muted2: #6B7A73; --soft: #BFD3CB;
  --r: 16px; --r-lg: 24px;
  --shadow: 0 12px 32px rgba(16, 49, 42, .10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--text); font: 16px/1.5 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 .8em; }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); margin: 0 0 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* Header */
.top { background: var(--green); color: var(--cream); position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1000px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top-in.wide { max-width: 1240px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand b { display: block; font-size: 18px; font-weight: 800; line-height: 1.1; }
.brand small { display: block; font-size: 12px; color: var(--soft); }
.mark { width: 34px; height: 34px; border-radius: 10px; background: var(--lime); color: var(--green); display: grid; place-items: center; }
.mark .ic { width: 18px; height: 18px; fill: var(--green); }
.nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; max-width: 100%; }
.nav a, .nav .link { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--soft); font-size: 15px; font-weight: 600; white-space: nowrap; position: relative; }
.nav a:hover, .nav .link:hover { color: var(--cream); }
.nav a.on { background: var(--green2); color: var(--cream); }
.nav a .ic { width: 18px; height: 18px; }
.badge { background: var(--lime); color: var(--green); font-size: 12px; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.logout { margin: 0; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; }

main { max-width: 1000px; margin: 0 auto; padding: 28px 16px 48px; }
main.wide { max-width: 1240px; }
.foot { text-align: center; color: var(--muted2); font-size: 13px; padding: 0 16px 32px; }
.foot a { color: var(--muted2); }

/* Blocks */
.head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head p { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.card + .card { margin-top: 16px; }
.card.dark { background: var(--green); color: var(--cream); border-color: var(--green); }
.card.dark .muted { color: var(--soft); }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.section { margin-top: 32px; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .ic { width: 36px; height: 36px; color: var(--muted2); margin-bottom: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 15px; line-height: 1.2; font-family: inherit; cursor: pointer; text-decoration: none; background: var(--lime); color: var(--green); }
.btn:hover { filter: brightness(.96); }
.btn.dark { background: var(--green); color: var(--cream); }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--text); }
.card.dark .btn.ghost, .proposal .btn.ghost { border-color: var(--green3); color: var(--cream); }
.btn.danger { background: transparent; border-color: var(--coral-soft); color: var(--coral-dark); }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.inline { display: inline; margin: 0; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; background: var(--lime-soft); color: var(--green); white-space: nowrap; }
.pill.lime { background: var(--lime); }
.pill.coral { background: var(--coral-soft); color: var(--coral-dark); }
.pill.dark { background: var(--green); color: var(--lime); }
.pill.grey { background: var(--line); color: var(--muted); }

/* Forms */
label.f { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
label.f span.h { display: block; font-weight: 400; color: var(--muted2); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border: 1px solid var(--line2); border-radius: 12px; background: #fff; font-size: 16px; font-family: inherit; color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip input:focus-visible + span { outline: 3px solid var(--lime-mid); outline-offset: 1px; border-color: var(--green); }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted2); margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 16px; border: 1px solid var(--line2); border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); background: #fff; user-select: none; }
.chip input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--green); }
.chip.dk input:checked + span { background: var(--green); border-color: var(--green); color: var(--cream); }
.avail { width: 100%; border-collapse: separate; border-spacing: 6px; }
.avail th { font-size: 13px; color: var(--muted2); font-weight: 600; text-align: center; }
.avail th.rowh { text-align: left; }
.avail td { text-align: center; }
.avail .chip span { width: 100%; min-width: 40px; padding: 8px 4px; text-align: center; }
.avail .chip span .ic { opacity: 0; width: 16px; height: 16px; vertical-align: -3px; }
.avail .chip input:checked + span .ic { opacity: 1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 14px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); }
.err-text { color: var(--coral-dark); font-weight: 600; }

/* Flash */
.flash { border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }
.flash.ok { background: var(--lime-soft); }
.flash.err { background: var(--coral-soft); color: var(--coral-dark); }

/* Avatars */
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.av0 { background: var(--lime); color: var(--green); }
.av1 { background: var(--green); color: var(--lime); }
.av2 { background: var(--coral-soft); color: var(--coral-dark); }
.av3 { background: var(--line); color: var(--green); }
.av.lg { width: 72px; height: 72px; font-size: 24px; }

/* Proposal cards (player) */
.proposal { background: var(--green); color: var(--cream); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.proposal + .proposal { margin-top: 16px; }
.proposal .when { font-size: 22px; font-weight: 800; margin: 6px 0 2px; }
.proposal .meta { color: var(--soft); margin: 0 0 14px; }
.proposal .players { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.proposal .players li { display: flex; align-items: center; gap: 10px; background: var(--green2); border-radius: 12px; padding: 8px 12px; }
.proposal .players .lv { margin-left: auto; font-weight: 700; }
.proposal .st { font-size: 13px; color: var(--soft); }
.proposal .actions { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.proposal details { margin-top: 10px; }
.proposal summary { cursor: pointer; color: var(--soft); font-weight: 600; }
.proposal .counter { background: var(--card); color: var(--text); border-radius: 14px; padding: 14px; margin-top: 10px; }
.why { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.why .pill { background: var(--green2); color: var(--lime-mid); font-weight: 600; }
.ai-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--green); background: var(--lime); border-radius: 999px; padding: 3px 10px; }
.ai-tag .ic { width: 14px; height: 14px; fill: var(--green); }

/* Level card */
.level { display: flex; align-items: center; gap: 16px; }
.level .num { width: 76px; height: 76px; border-radius: 50%; background: var(--lime); color: var(--green); display: grid; place-items: center; font-size: 26px; font-weight: 800; flex: none; }
.level .num.pending { background: var(--line); color: var(--muted); font-size: 14px; text-align: center; line-height: 1.1; padding: 6px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 700; }
.notif.unread .title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); margin-right: 8px; vertical-align: middle; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted2); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a { font-weight: 700; text-decoration: none; }
.tbl a:hover { text-decoration: underline; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat .k { font-size: 14px; color: var(--muted2); }
.stat .v { font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.stat .s { font-size: 13px; color: var(--muted2); }
.stat.hi { background: var(--green); border-color: var(--green); color: var(--cream); }
.stat.hi .k, .stat.hi .s { color: var(--soft); }
.stat.hi .v { color: var(--lime); }

/* Occupancy heat grid */
.heat { display: grid; gap: 4px; font-size: 13px; }
.heat .h { color: var(--muted2); text-align: center; font-weight: 600; }
.heat .d { color: var(--muted2); font-weight: 600; display: flex; align-items: center; }
.heat .c { height: 30px; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--green); }
.heat .c.l1 { background: #E7EFEA; border-color: #E7EFEA; }
.heat .c.l2 { background: #CFE0D9; border-color: #CFE0D9; }
.heat .c.l3 { background: #A9C6BA; border-color: #A9C6BA; }
.heat .c.app { box-shadow: inset 0 0 0 2px var(--lime); background: var(--lime-mid); border-color: var(--lime); }
.heat .c.off { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(194,74,46,.06) 4px 8px); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--line); }

/* Suggestions */
.sugg { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sugg:last-child { border-bottom: 0; }
.sugg .bub { width: 42px; height: 42px; border-radius: 50%; background: var(--lime); color: var(--green); display: grid; place-items: center; flex: none; }
.sugg .grow { flex: 1; }

/* Bookings grid */
.slots { border-collapse: separate; border-spacing: 6px; width: 100%; }
.slots th { font-size: 13px; color: var(--muted2); font-weight: 700; }
.slots td { padding: 0; }
.slot { width: 100%; min-width: 92px; min-height: 54px; border-radius: 10px; border: 1px dashed var(--line2); background: transparent; font-weight: 600; font-size: 13px; line-height: 1.25; font-family: inherit; color: var(--muted2); cursor: pointer; padding: 6px; }
.slot:hover { border-color: var(--green); color: var(--green); }
.slot.ext { background: #CFE0D9; border: 1px solid #CFE0D9; color: var(--green); }
.slot.app { background: var(--lime); border: 1px solid var(--lime); color: var(--green); }
.slot.prop { background: var(--lime-soft); border: 1px solid var(--lime-mid); color: var(--green); cursor: default; }

/* Skills */
.skill { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin-bottom: 8px; }
.dots { display: inline-flex; gap: 4px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line2); display: inline-block; }
.dot.on { background: var(--green); border-color: var(--green); }
.levelpick { display: flex; flex-wrap: wrap; gap: 6px; }
.levelpick .chip span { min-width: 54px; text-align: center; }

/* Auth (bare) pages */
body.bare { background: var(--green); }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth .side { color: var(--cream); padding: 56px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth .side::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: #2B5436; opacity: .55; right: -120px; top: -100px; }
.auth .side::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: #2B5436; opacity: .35; left: -80px; bottom: -80px; }
.auth .side::before, .auth .side::after { z-index: 0; }
.auth .side > * { position: relative; z-index: 1; }
.auth .side h1 { font-size: clamp(40px, 6vw, 64px); }
.auth .side p { color: var(--soft); font-size: 19px; max-width: 520px; }
.auth .side .eyebrow { color: var(--lime); }
.auth .form { background: var(--cream); padding: 56px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth .form > div { max-width: 420px; width: 100%; margin: 0 auto; }
.auth .steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.auth .steps li { display: flex; gap: 12px; align-items: center; color: var(--cream); font-weight: 600; }
.auth .steps b { width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--green); display: grid; place-items: center; font-size: 14px; flex: none; }
body.bare main { max-width: none; padding: 0; }
body.bare .flash { margin: 0 0 18px; }

@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth .side { padding: 40px 24px 32px; }
  .auth .form { padding: 32px 20px 48px; }
  .proposal .actions { grid-template-columns: 1fr 1fr; }
  .proposal .actions > :first-child { grid-column: 1 / -1; }
  .grid2 { grid-template-columns: 1fr !important; }
  .avail { border-spacing: 3px; }
  .avail .chip span { min-width: 0; padding: 7px 0; }
  .avail th.rowh { font-size: 12px; }
  .avail th.rowh .small { display: none; }
  .card { padding: 18px; }
  .hide-sm { display: none; }
  .tbl td, .tbl th { padding: 8px 6px; }
  .sugg { flex-wrap: wrap; }
  .sugg .grow { flex: 1 1 calc(100% - 60px); }
  .sugg > form, .sugg > a { margin-left: 56px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .v { font-size: 24px; }
  .stat { padding: 14px; }
  .top-in { padding: 8px 12px; }
  .nav a span { display: none; }
  .nav a { padding: 8px 10px; }
  main { padding-top: 20px; }
}
