:root{--bg:#f5f7fb;--card:#ffffff;--muted:#6b7280;--accent:#0f62fe;--accent-2:#0b57d0}
*{box-sizing:border-box}
body{font-family:Inter,system-ui,Segoe UI,Roboto,Arial;background:var(--bg);color:#111;margin:0;padding:24px}
main{max-width:920px;margin:0 auto}
.site-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.brand{font-weight:700;font-size:1.25rem}
.card{background:var(--card);border-radius:10px;padding:18px;box-shadow:0 6px 18px rgba(15,23,42,0.06);margin-bottom:16px}
.layout{display:grid;grid-template-columns:1fr 320px;gap:16px}
label{display:block;color:var(--muted);font-size:0.9rem;margin-bottom:6px}
input,select,button{width:100%;padding:10px;border-radius:8px;border:1px solid #e6e9ef;margin:6px 0}
button{background:linear-gradient(180deg,var(--accent),var(--accent-2));color:white;border:none;cursor:pointer}
button.secondary{background:#eef2ff;color:var(--accent);border:1px solid #dbeafe}
#register .row{display:flex;gap:8px}
#register .row > *{flex:1}
#players ol, #players ul, ol,ul{list-style-position:outside;padding-left:40px;margin:0}
#players li, #reserves li{display:flex;align-items:center;gap:12px;padding:10px;border-radius:8px;background:#fafafa;border:1px solid #eee;margin-bottom:8px}
.meta{color:var(--muted);font-size:0.9rem;margin-top:8px}
.spots{font-weight:600;color:var(--accent);margin-top:6px}
#adminPlayers li, #adminReserves li{padding:10px;border-radius:8px;border:1px solid #e6e9ef;margin:6px 0;cursor:move;background:white;display:grid;grid-template-columns:40px 1fr 64px 84px;align-items:center;gap:12px}

/* Ensure consistent font size and control sizing */
#players li, #reserves li, #adminPlayers li, #adminReserves li{font-size:1rem}

/* Place checkboxes on the right and size them reasonably */
/* checkboxes in lists */
#players li input[type="checkbox"], #reserves li input[type="checkbox"], #adminPlayers li input[type="checkbox"], #adminReserves li input[type="checkbox"]{
	order:2;
	margin-left:0;
	flex:0 0 auto;
	width:18px;height:18px;transform:scale(1);} 

/* specific control: session lock checkbox should not expand to full width */
#sessionLock{ width:auto; align-self:flex-start; margin-left:0; height:18px; width:18px }

#players li span, #reserves li span, #adminPlayers li span, #adminReserves li span{order:1;flex:1}

/* Make the delete button fixed and small so name takes most space */
#adminPlayers li button, #adminReserves li button{
	order:3;
	flex:0 0 72px;
	width:72px;
	padding:6px 8px;
	margin-left:0;
	font-size:0.85rem;
	background:#ef4444; /* red-500 */
	color:#fff;
	border:none;
	border-radius:6px;
	cursor:pointer;
}

/* index badge */
.list-index{
	display:inline-flex;align-items:center;justify-content:center;
	width:32px;height:32px;border-radius:6px;background:#f1f5f9;color:#0f172a;font-weight:600;
}

/* confirm modal */
.modal-overlay{ position:fixed; inset:0; background:rgba(0,0,0,0.45); display:flex; align-items:center; justify-content:center; z-index:60 }
.modal{ background:#fff; padding:16px; border-radius:8px; width:320px; box-shadow:0 8px 24px rgba(0,0,0,0.2) }
.modal-body{ margin-bottom:12px; }
.modal-actions{ display:flex; gap:8px; justify-content:flex-end }

.admin-list-header{display:grid;grid-template-columns:40px 1fr 64px 84px;gap:12px;padding:8px 10px;border-bottom:1px solid #e6e9ef;color:#475569;font-weight:600}
.admin-list-header > div{text-align:left}

#adminPlayers li button:hover, #adminReserves li button:hover{
	background:#dc2626; /* red-600 */
}

#adminPlayers li button:focus, #adminReserves li button:focus{
	outline:3px solid rgba(220,38,38,0.15);
}

/* Align header labels with list content (account for marker width) */
.list-header{display:flex;gap:12px;font-weight:600;color:var(--muted);padding:6px 18px;padding-left:40px;align-items:center;justify-content:space-between}
.list-header > div:first-child{flex:1}
.list-header > div:last-child{flex:0 0 28px;width:28px;text-align:center}
.handle{width:18px;height:18px;background:#e6eefc;border-radius:4px;display:inline-block}
@media(max-width:880px){.layout{grid-template-columns:1fr} .site-header{flex-direction:column;align-items:flex-start}}

/* disabled form controls look muted */
input[disabled], button[disabled]{opacity:0.5;cursor:not-allowed}

