:root { --red: #e60005; --red-dark: #c81106; --navy: #002d55; --blue: #1d71cc; --ink: #334155; --mute: #64748b; --line: #dfdfdf; --bg: #eff2f5; --accent: #fff2eb; --radius: 10px; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
.top { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; min-height: 4rem; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 1.5rem; }
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.1rem; letter-spacing: -.01em; }
.brand img { height: 2rem; width: auto; display: block; }
.brand span { border-left: 1px solid var(--line); padding-left: .75rem; }
nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
nav a { color: var(--ink); text-decoration: none; padding: .35rem .7rem; border-radius: 8px; font-weight: 500; }
nav a:hover { background: var(--accent); color: var(--navy); }
.admin-tabs { margin-bottom: 1.5rem; }
.admin-tabs a[aria-current=page] { background: var(--navy); color: #fff; }
.role-picker { min-width: 12rem; }
.role-picker summary { cursor: pointer; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.role-picker summary:focus-visible { outline: 3px solid rgba(75, 141, 215, .5); outline-offset: 1px; }
.role-picker fieldset { margin: .25rem 0 0; padding: .4rem .7rem; }
.role-picker label { display: flex; align-items: center; gap: .4rem; }
.logout { display: flex; gap: .6rem; align-items: center; margin: 0; }
.who { color: var(--mute); font-size: .9rem; }
main { max-width: 1180px; margin: 1.5rem auto; padding: 0 1rem 3rem; }
footer { text-align: center; color: var(--mute); font-size: .85rem; padding: 1rem; }
h1 { font-size: 1.75rem; letter-spacing: -.02em; color: var(--navy); } h2 { margin-top: 2rem; font-size: 1.2rem; color: var(--navy); }
a { color: var(--blue); }
input, select, textarea, button { font: inherit; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(75, 141, 215, .5); outline-offset: 1px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; }
label { display: block; margin: .4rem 0; font-size: .9rem; color: var(--ink); font-weight: 500; }
label.check { display: inline-flex; gap: .4rem; align-items: center; margin-right: 1rem; }
label.check input { width: auto; }
button, .btn { background: var(--red); color: #fff; border: 0; padding: .55rem 1.1rem; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; font-weight: 600; }
button:hover, .btn:hover { background: var(--red-dark); }
button.secondary, .btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--line); }
button.secondary:hover, .btn.secondary:hover { background: var(--accent); }
button.danger { background: #fff; color: #b80000; border: 1px solid #b80000; }
button.danger:hover { background: #fff2eb; }
button.link { background: none; color: var(--blue); padding: 0; font-weight: 400; text-decoration: underline; }
button.link:hover { background: none; }
button.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: .5rem; vertical-align: middle; }
.action-icon { display: block; width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.internal-course { min-width: 0; }
.internal-course-details { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.internal-course-details > label { flex: 1 1 140px; min-width: 0; margin-bottom: 0; }
.internal-course-actions { display: flex; gap: .3rem; padding-bottom: 1px; }
fieldset { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0; padding: .6rem 1.25rem 1.1rem; }
legend { font-weight: 700; padding: 0 .4rem; color: var(--navy); }
.row { display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: end; } .row > * { flex: 1 1 200px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { padding: .5rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
th { background: var(--bg); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--mute); } .num { text-align: right; white-space: nowrap; }
td .actions, td.actions { white-space: nowrap; } td.actions button { margin-right: .3rem; }
.badge { padding: .1rem .55rem; border-radius: 99px; font-size: .8rem; background: #eee; }
.badge.pending { background: #fef3c6; } .badge.approved { background: #d6f6d1; } .badge.denied { background: #ffe4e6; } .badge.cancelled { background: #e2e8f0; }
.badge.confirmed { background: #d6f6d1; color: #005900; font-weight: 600; }
.badge.unconfirmed { background: #fef3c6; color: #953d00; font-weight: 500; }
.badge.clickable { white-space: nowrap; cursor: pointer; transition: opacity 0.2s, transform 0.1s; }
.badge.clickable:hover { opacity: 0.8; transform: scale(1.02); }
.badge.clickable:active { transform: scale(0.98); }

/* Badge-form: forms that look like badges for clickable confirmation toggles */
.badge-form { margin: 0; }
.badge-form button.badge { text-align: left; }
.badge-form button.badge:hover { opacity: 0.8; }
.invoice-cost-summary { font-size: .85rem; margin-top: .25rem; }
.invoice-form { margin-top: .5rem; padding: .75rem; background: var(--bg); border-radius: var(--radius); }
.invoice-form-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-bottom: .5rem; }
.invoice-form-field { flex: 1 1 180px; }
.invoice-form-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.alert { background: #ffe4e6; border: 1px solid #ffa2ae; padding: .6rem 1rem; border-radius: var(--radius); }
.info { background: #e6f0fb; border: 1px solid #b6d3f3; padding: .6rem 1rem; border-radius: var(--radius); }
.prewrap { white-space: pre-line; margin: .2rem 0 .6rem; }
.sr { position: absolute; left: -9999px; }
.wf { display: flex; align-items: center; gap: .5rem; overflow-x: auto; padding: .5rem 0; }
.wf-stage { display: flex; flex-direction: column; gap: .4rem; }
.wf-box { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; padding: .4rem .7rem; background: #fff; min-width: 9rem; }
.wf-box small { display: block; color: #555; }
.wf-start{ background: #e6f0fb;}
.wf-end { border-left-color: #2e9e5b; }
.wf-info, .wf-confirm { border-left-color: #999; border-style: dashed; }
.wf-deliver { border-left-color: #2e9e5b; }
.wf-arrow { font-size: 1.4rem; color: #888; }
textarea.qual { background: #e8ecfb; min-height: 6rem; }
.neg, .neg strong { color: #b80000; } .muted, small { color: var(--mute); }
.warn, .muted.warn, .alert, [role=alert] { color: #b80000; }
.users-table th:nth-child(2) { width: 30%; }
[data-request-row] { cursor: pointer; }
[data-request-row] > td:first-child > a { color: inherit; text-decoration: none; }
[data-request-row]:hover, [data-request-row]:focus-within { background: var(--accent); }
.users-table td:nth-child(2) input { min-width: 12rem; }
.table-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.table-toolbar > [role=status] { margin: 0 auto 0 0; }
.toggle { display: inline-flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer; }
.toggle input { appearance: none; width: 2.5rem; height: 1.4rem; border-radius: 1rem; background: #64748b; padding: 2px; margin: 0; cursor: pointer; }
.toggle input::before { content: ''; display: block; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--red); }
.toggle input:checked::before { transform: translateX(1rem); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.cards .card { margin: 0; } .cards strong { display: block; font-size: 1.4rem; }
.budget-total-form { margin: 0; }
.budget-total-display { display: block; padding: 0; background: transparent; color: inherit; text-align: left; }
.budget-total-display:hover { background: transparent; text-decoration: underline; }
.budget-total-display strong { font-weight: 700; }
.budget-total-form input[type=number] { font-size: 1.4rem; font-weight: 700; }
progress { width: 100%; height: 1rem; accent-color: var(--red); }
.legal { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem 1rem; font-size: .88rem; }
.sigbox canvas { border: 1px dashed #94a3b8; border-radius: 8px; background: #fff; width: 100%; max-width: 600px; touch-action: none; display: block; }
.summary { display: grid; grid-template-columns: 11rem 1fr; gap: .3rem 1rem; background: #fff; border: 1px solid var(--line); padding: 1rem; border-radius: var(--radius); }
.summary dt { color: var(--mute); } .summary dd { margin: 0; }
.timeline { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1rem 2.4rem; }
.timeline li.approved, .timeline li.done, .timeline li.informed { color: #005900; } .timeline li.denied { color: #970000; }
.timeline li.skipped, .timeline li.waiting { color: var(--mute); } blockquote { margin: .2rem 0 .2rem 1rem; color: var(--ink); }
.filters { display: flex; gap: .5rem; margin-bottom: 1rem; } .filters select { width: auto; }
form.inline { display: flex; gap: .6rem; align-items: end; margin: 1rem 0; } form.inline label { margin: 0; }

/* course source chooser */
.choice { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.choice label.check { margin: 0; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.choice label.check:has(input:checked) { border-color: var(--red); background: var(--accent); color: var(--navy); }
.lookup { align-items: end; } .lookup > div { flex: 0 0 auto; }
.status { min-height: 1.4em; margin: .2rem 0 0; font-weight: 500; }
.status.ok { color: #005900; } .status.bad, .status.warn { color: #b80000; }
[hidden] { display: none !important; }
