
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@700&family=Inter:wght@400;500;600;700;800&display=swap');
:root{--green:#0b4f35;--green2:#126b49;--line:#d5dfda;--bg:#f3f6f4;--ink:#1b2822;--muted:#6f7e76}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}
.topbar{background:var(--green);color:#fff;padding:12px 4%;display:flex;justify-content:space-between;align-items:center;gap:16px}.brand{display:flex;align-items:center;gap:12px}.logo-img{width:64px;height:64px;object-fit:contain;background:#fff;border-radius:10px;padding:4px}.brand strong{display:block;font-family:"Libre Baskerville";font-size:17px}.brand small{font-size:9px;color:#d8eadf}.topbar nav{display:flex;gap:7px}.nav{border:1px solid rgba(255,255,255,.3);background:transparent;color:#fff;padding:9px 12px;border-radius:8px;font-weight:800}.nav.active{background:#fff;color:var(--green)}
.hero{padding:26px 4%;background:linear-gradient(120deg,var(--green),var(--green2));color:#fff}.hero span{font-size:9px;letter-spacing:.13em;font-weight:800;color:#d4e9dc}.hero h1{margin:5px 0;font:700 40px "Libre Baskerville"}.hero p{margin:0;color:#dcece3}
.sportbar{background:#fff;border-bottom:1px solid var(--line);padding:10px 4%;display:flex;gap:10px;align-items:center}.sportbar>span{font-size:9px;font-weight:800;color:var(--muted)}#sportButtons{display:flex;gap:6px;overflow-x:auto}#sportButtons button{white-space:nowrap;border:1px solid var(--line);background:#f5f8f6;padding:7px 10px;border-radius:999px;font-size:10px;font-weight:700;color:#315142}#sportButtons button.active{background:var(--green);color:#fff;border-color:var(--green)}
main{padding:18px 4% 30px}.hidden{display:none!important}.layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px}aside,.card{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:0 8px 24px rgba(11,79,53,.05)}aside{padding:13px;height:max-content}.side-title small{font-size:8px;color:var(--muted)}.side-title strong{display:block;font:700 19px "Libre Baskerville";color:var(--green);margin-top:2px}aside input{width:100%;padding:9px;margin:11px 0;border:1px solid var(--line);border-radius:7px}#teamButtons{display:grid;gap:5px}#teamButtons button{border:0;background:#f0f5f2;text-align:left;padding:9px;border-radius:7px;font-weight:700;color:#365247}#teamButtons button.active{background:var(--green);color:#fff}.legend{margin-top:14px;padding-top:11px;border-top:1px solid var(--line);display:grid;gap:6px;font-size:9px}.legend b{color:var(--green)}.legend em{font-style:normal;background:#edf7f2;padding:8px;border-radius:7px;color:#48665a}
.card{padding:15px;min-width:0}.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.section-head small{font-size:8px;font-weight:800;color:#698078;letter-spacing:.1em}.section-head h2{margin:3px 0;font:700 28px "Libre Baskerville";color:var(--green)}.section-head span{font-size:10px;color:var(--muted)}.section-actions{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}.section-actions>button,.primary{border:0;background:var(--green);color:#fff;border-radius:7px;padding:9px 11px;font-weight:800;font-size:10px}
#stats,#busStats,#scStats{display:flex;gap:5px;flex-wrap:wrap}.stat{min-width:58px;padding:5px 7px;border:1px solid var(--line);border-top:3px solid #4c8c6b;border-radius:7px;text-align:center;color:var(--muted);font-size:7px}.stat b{display:block;color:var(--ink);font-size:15px}.stat.percent{min-width:105px;background:#edf7f2;border-top-color:var(--green)}.stat.percent b{color:var(--green)}
.table-wrap{overflow:auto;margin-top:13px;border:1px solid var(--line);border-radius:8px}table{border-collapse:separate;border-spacing:0;min-width:1150px;width:100%}th,td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px;text-align:center;font-size:10px}th{position:sticky;top:0;z-index:3;background:#e8f1ec;color:#355748}th.player,td.player{position:sticky;left:0;z-index:2;background:#fff;min-width:235px;text-align:left}th.player{z-index:4;background:#e8f1ec}.player-row{display:grid;grid-template-columns:9px minmax(0,1fr) 28px;gap:6px;align-items:center;min-height:38px;border-radius:6px}.dot{width:9px;height:9px;border-radius:50%;background:#2d9568}.player-row.pending{background:#fff0c7}.player-row.pending .dot{background:#d88b00}.player-row.injured{background:#fde1df}.player-row.injured .dot{background:#c43131}.player-row.low{background:#fff3c9}.player-row.low .dot{background:#d49a00}.player-name{min-width:0;width:100%;border:1px solid transparent;background:transparent;padding:6px 4px;border-radius:5px;font-weight:600}.player-name:focus{background:#fff;border-color:#b6c5bd;outline:none}.note{width:27px;height:27px;border:1px solid #c5d0ca;background:#fff;color:var(--green);border-radius:6px;font-weight:800}.pct{min-width:54px;display:inline-block;padding:6px;border-radius:999px;background:#e7f3ec;color:var(--green);font-weight:800}.attendance-select{min-width:38px;border:0;border-radius:6px;padding:6px;font-weight:800}.q{background:#e5e9ed}.p{background:#d5eadf;color:#155c3d}.a{background:#f2d7d5;color:#8d2e28}.e{background:#f5e7c9;color:#765417}.s{background:#dce8f5;color:#285784}.sc{background:#e7def1;color:#684788}.hint{font-size:9px;color:var(--muted)}
.bus-fields{display:grid;grid-template-columns:.9fr 1fr 1.1fr 1.4fr .8fr 1fr;gap:8px;margin:15px 0}.bus-fields label{font-size:8px;font-weight:800;color:#4d6258}.bus-fields input,.bus-fields select{width:100%;padding:9px;border:1px solid var(--line);border-radius:7px;margin-top:4px}.bus-actions{display:flex;gap:7px;margin:8px 0 12px}.bus-actions button{border:1px solid #afbeb6;background:#fff;color:var(--green);padding:8px 10px;border-radius:7px;font-weight:800}.bus-actions .primary{background:var(--green);color:#fff}.message{padding:9px;background:#edf7f2;color:#285b47;border-radius:7px;font-size:10px;font-weight:700;margin-bottom:10px}.passengers{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.passenger{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--line);padding:9px;border-radius:8px}.passenger.selected{background:#edf7f1}.passenger b{font-size:10px}.passenger small{display:block;font-size:8px;color:var(--muted)}.passenger input{width:18px;height:18px;accent-color:var(--green)}
.history-head{margin-top:18px;padding-top:14px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:12px}.history-head h3{margin:3px 0;font:700 18px "Libre Baskerville";color:var(--green)}.history-tools{display:grid;gap:7px;min-width:380px}.history-tools>div{display:flex;gap:6px;justify-content:flex-end}.history-tools button{border:1px solid var(--line);background:#fff;color:var(--green);padding:7px 9px;border-radius:7px;font-weight:800}.history-tools button.active{background:var(--green);color:#fff}.history-tools input{padding:9px;border:1px solid var(--line);border-radius:7px}.history-item{border:1px solid var(--line);border-radius:8px;margin-top:7px;overflow:hidden}.history-main{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;padding:10px}.history-main .vehicle{border:0;background:transparent;text-align:left;color:var(--green);font-weight:800}.history-main small{display:block;color:var(--muted);font-size:8px}.history-main .count{font-size:10px;font-weight:800}.remove,.recover{border-radius:6px;padding:7px 9px;font-size:9px;font-weight:800}.remove{border:1px solid #c97b72;background:#fff5f3;color:#9a3f35}.recover{border:1px solid #6a9f86;background:#eef8f3;color:#246147}.history-detail{display:grid;grid-template-columns:1fr 1fr .8fr;gap:10px;padding:12px;border-top:1px solid var(--line);background:#f7faf8}.history-detail h4{margin:0 0 6px;color:var(--green)}
.sc-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}.sc-card{border:1px solid var(--line);border-left:7px solid #d88b00;border-radius:9px;padding:12px}.sc-card.injured{border-left-color:#c43131;background:#fff8f7}.sc-card.low{border-left-color:#d49a00;background:#fffdf3}.sc-card-head{display:flex;justify-content:space-between;gap:10px}.sc-card h3{margin:0;color:var(--green)}.pill{padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800}.sc-card p{font-size:10px;color:#5d6e65}.sc-actions{display:flex;gap:6px;flex-wrap:wrap}.sc-actions button{border:1px solid #cbd5d0;background:#fff;padding:7px 9px;border-radius:7px;font-weight:800;font-size:9px}
.modal{position:fixed;inset:0;z-index:50;background:rgba(4,26,17,.55);display:grid;place-items:center;padding:16px}.modal-box{width:min(760px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:13px}.modal-head{display:flex;justify-content:space-between;padding:17px;border-bottom:1px solid var(--line);background:#faf9f5}.modal-head h2{margin:3px 0;color:var(--green);font-family:"Libre Baskerville"}.modal-head button{width:34px;height:34px;border:0;border-radius:50%}.modal-body{padding:17px;display:grid;gap:13px}.modal-body label{font-size:9px;font-weight:800;color:#4b6258}.modal-body textarea{display:block;width:100%;min-height:95px;margin-top:5px;padding:10px;border:1px solid var(--line);border-radius:8px}.status-box{display:grid;gap:4px}.status-box b{font-size:9px;color:#4b6258}.status-box span{padding:10px;border-radius:7px;background:#e7f6ef;color:#1f8b5c;font-weight:800}.status-box small{font-size:8px;color:var(--muted)}.readonly{margin-top:5px;padding:10px;background:#f5f7f6;border:1px solid var(--line);border-radius:7px;min-height:42px}.modal-actions{display:flex;justify-content:flex-end;gap:7px;padding:0 17px 17px}.modal-actions button{padding:9px 11px;border-radius:7px;border:1px solid var(--line);font-weight:800}
footer{background:var(--green);color:#fff;padding:14px 4%;text-align:center;font-size:9px}
@media(max-width:900px){.layout{grid-template-columns:1fr}.bus-fields{grid-template-columns:1fr 1fr}.passengers,.sc-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.topbar{flex-direction:column;align-items:flex-start}.topbar nav{width:100%}.nav{flex:1}.hero h1{font-size:31px}.bus-fields,.passengers,.sc-grid{grid-template-columns:1fr}.history-head{flex-direction:column}.history-tools{min-width:0;width:100%}.history-detail{grid-template-columns:1fr}th.player,td.player{min-width:205px}}
