body { font-family: Calibri, Segoe UI, Arial, sans-serif; margin: 0; background: #f4f6f9; color: #222; }
header { background: #12355b; color: #fff; padding: 14px 24px; }
header h2 { margin: 0; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#who { font-size: 13px; color: #cfe0f5; display: flex; align-items: center; gap: 10px; }
#who button { background: none; border: 1px solid #cfe0f5; color: #fff; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
nav[hidden] { display: none; }
.auth-card { max-width: 380px; margin: 40px auto; }
.auth-card label { display: block; margin: 10px 0 2px; font-size: 13px; }
.auth-card input { width: 100%; box-sizing: border-box; padding: 8px; }
.auth-card .act { margin-top: 14px; }
td.login-col { font-size: 12px; white-space: nowrap; }
nav { background: #1c4a7d; }
nav button { background: none; border: 0; color: #cfe0f5; padding: 10px 16px; cursor: pointer; font-size: 15px; }
nav button.active { color: #fff; border-bottom: 3px solid #4da3ff; }
#status { max-width: 1250px; margin: 10px auto 0; padding: 0 16px; min-height: 0; }
#status.err { color: #b00; }
#status.ok { color: #1d7a3c; }
main { max-width: 1250px; margin: 20px auto; padding: 0 16px; }
.card { background: #fff; border-radius: 8px; padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 3px #0002; }
table.grid { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 14px; background: #fff; }
table.grid th, table.grid td { border: 1px solid #333; text-align: center; padding: 6px 2px; font-size: 13px; }
table.grid th.sec { background: #fbe0d3; font-size: 14px; padding: 10px; }
table.grid td.label { width: 14%; background: #f2f2f2; }
table.grid td.on { background: #d9f0d3; }
table.grid td.pad { background: #fafafa; }
table.grid input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
table.grid input[type=checkbox]:disabled { cursor: not-allowed; }
table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { text-align: left; padding: 8px; border-bottom: 1px solid #e3e7ec; }
table.plain th { background: #f0f3f7; }
input, select, button.act { padding: 7px; font-size: 14px; margin: 2px; }
button.act { background: #12355b; color: #fff; border: 0; border-radius: 4px; cursor: pointer; }
button.sec { background: #e3e7ec; color: #222; }
.lock { color: #a33; font-weight: bold; }
.open { color: #2a7; font-weight: bold; }
.hint { font-size: 12px; color: #666; }
.bar { background: #4da3ff; height: 10px; border-radius: 5px; }

/* Setup page: wide tables scroll instead of squashing, and buttons stay on one line. */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h3, .card-head h4 { margin: 0 0 6px; }
.table-wrap { overflow-x: auto; }
table.grads { min-width: 1140px; }
table.grads td, table.grads th, table.tasks td, table.tasks th { vertical-align: middle; }
table.grads input, table.tasks input { width: 100%; min-width: 0; margin: 0; box-sizing: border-box; }
table.grads td.actions, table.grads th.actions { width: 170px; white-space: nowrap; text-align: right; }
table.tasks td.actions, table.tasks th.actions { width: 92px; white-space: nowrap; text-align: right; }
.btn-group { display: inline-flex; gap: 6px; }
button.act.sm { padding: 5px 10px; font-size: 13px; margin: 0; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.form-grid input { width: 100%; margin: 0; box-sizing: border-box; }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.form-row input { margin: 0; }
.form-row input.wide { flex: 1 1 280px; }
details.add { margin-top: 10px; }
details.add summary { cursor: pointer; color: #12355b; font-weight: 600; font-size: 13px; }
.section-block { border-top: 1px solid #e3e7ec; padding-top: 10px; margin-top: 14px; }
.add-grad { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.add-grad input { margin: 0; flex: 1 1 320px; min-width: 0; }
.add-grad button.act { margin: 0; white-space: nowrap; }

table.grid td.num { padding: 4px 2px; }
table.grid input.count { width: 84%; max-width: 70px; padding: 4px 2px; font-size: 13px; text-align: center; margin: 0; box-sizing: border-box; }
table.grid input.count:disabled { background: #f0f0f0; cursor: not-allowed; }
table.tasks td.type-col, table.tasks th.type-col { width: 130px; }
table.tasks select { width: 100%; margin: 0; padding: 6px; box-sizing: border-box; }
table.tasks input.opts { margin-top: 4px; }
table.plain.picks td { vertical-align: top; }
table.plain.picks td:not(:first-child):not(:last-child) { font-size: 12px; }

/* Pick list months: a compact drop-down with a tick box per choice. */
table.grid td.pick { padding: 3px 2px; overflow: visible; }
details.pick { position: relative; }
details.pick summary { list-style: none; cursor: pointer; font-size: 11px; line-height: 1.25; padding: 4px 2px; border: 1px solid #aaa; border-radius: 4px; background: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.pick summary::-webkit-details-marker { display: none; }
details.pick summary.has { background: #d9f0d3; border-color: #7fbf6f; font-weight: 600; }
details.pick[open] summary { border-color: #12355b; }
details.pick .menu { position: absolute; z-index: 20; top: 100%; left: 0; min-width: 190px; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid #12355b; border-radius: 6px; box-shadow: 0 4px 14px #0004; padding: 6px 8px; text-align: left; }
details.pick .menu.right { left: auto; right: 0; }
details.pick .menu label { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; white-space: nowrap; cursor: pointer; }
details.pick .menu input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
td.nowrap { white-space: nowrap; }
