@font-face {
    font-family: "DM Sans";
    src: url("dm-sans-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}
:root {
    color-scheme: light;
    --ink: #172e28;
    --muted: #58665e;
    --pine: #133f37;
    --pine-hover: #0c342d;
    --paper: #f5f4ed;
    --white: #fffefa;
    --border: #d5dbcf;
    --pale: #e3efe2;
    --gold: #f4dea5;
    --radius: 16px;
    font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; overflow-wrap: anywhere; }
h1 { font-weight: 650; letter-spacing: -.053em; }
h2 { font-weight: 650; font-size: 1.48rem; letter-spacing: -.032em; }
h3 { font-size: 1.13rem; letter-spacing: -.02em; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 3px solid #99630c; outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip:focus { position: absolute; top: 6px; left: 6px; z-index: 5; padding: .6rem 1rem; background: white; }
.topbar { border-bottom: 1px solid var(--border); background: var(--white); }
.nav-inner { max-width: 1216px; min-height: 70px; padding: .65rem clamp(1rem, 4vw, 2.75rem); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand, .nav-link, .text-link, .button { display: inline-flex; align-items: center; }
.brand { gap: .48rem; text-decoration: none; color: var(--pine); flex-shrink: 0; }
.brand strong { font-size: 1.73rem; letter-spacing: -.065em; line-height: 1; font-weight: 800; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 25px; margin-right: .1rem; }
.brand-mark i { display: block; width: 5px; height: 20px; background: var(--pine); clip-path: polygon(0 17%, 100% 0, 100% 100%, 0 100%); }
.brand-mark i:nth-child(2) { height: 25px; }
.brand-mark i:nth-child(3) { height: 18px; }
.brand-divider { width: 1px; height: 20px; background: #c6cfc3; margin: 0 .27rem; }
.brand-label, .nav-link { font-size: .88rem; font-weight: 550; }
.brand-label { color: var(--muted); }
.nav-inner nav { display: flex; gap: clamp(.25rem, 1.4vw, 1.1rem); align-items: center; }
.nav-link { min-height: 42px; justify-content: center; gap: .42rem; padding: .35rem .45rem; color: #3f5147; text-decoration: none; background: none; border: 0; border-radius: 7px; }
.nav-link .icon { height: 16px; width: 16px; }
.nav-link:hover { color: var(--pine); background: #eef1e8; }
.inline-form { margin: 0; }
.public-page { background-color: var(--paper); background-image: radial-gradient(#ccd4c6 .6px, transparent .8px); background-size: 12px 12px; }
.public-main { width: min(100% - 2.25rem, 620px); margin: clamp(2rem, 7.3vh, 5.5rem) auto 3rem; }
.ticket, .panel, .simple-card { border: 1px solid #d4d9cc; background: var(--white); border-radius: var(--radius); }
.ticket { overflow: hidden; box-shadow: 0 14px 40px -24px #283c2b45; }
.ticket-cover { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 166px; padding: 1.9rem 2.25rem; overflow: hidden; background: var(--pine); color: #fffdf0; }
.ticket-heading { min-width: 0; width: 76%; position: relative; z-index: 1; }
.ticket-cover h1 { max-width: 10.5em; font-size: clamp(1.95rem, 4vw, 2.65rem); text-wrap: balance; line-height: 1.04; }
.training-tag { width: fit-content; max-width: 100%; display: flex; align-items: center; gap: .45rem; color: #e0ebc8; font-size: .86rem; font-weight: 550; line-height: 1.35; margin-bottom: .72rem; overflow-wrap: anywhere; }
.training-tag .icon { width: 15px; height: 15px; }
.door-art { z-index: 0; position: absolute; bottom: -4px; right: -9px; width: 163px; height: auto; pointer-events: none; }
.ticket-body { padding: 1.85rem 2.25rem 1.65rem; }
.action-list { display: grid; gap: .72rem; margin: 1.18rem 0 1.3rem; }
.action-card { width: 100%; text-align: left; color: var(--ink); display: flex; align-items: center; gap: 1.05rem; padding: 1.05rem 1.15rem; border: 1px solid #ced6c9; border-radius: 12px; background: #fffefa; text-decoration: none; transition: border-color .15s, background-color .15s; }
.action-card:hover, .action-card:focus-visible { background: #f2f6ed; border-color: #819d86; }
.action-card:last-child:hover { background: #fbf7eb; border-color: #b59a62; }
.action-icon { display: grid; place-items: center; width: 49px; height: 49px; border-radius: 11px; flex: 0 0 auto; }
.action-icon .icon { width: 24px; height: 24px; }
.green { background: var(--pale); color: #20563d; }
.amber { background: #faebc5; color: #77541a; }
.action-copy { display: grid; gap: .1rem; flex: 1; }
.action-copy strong { font-size: 1.28rem; letter-spacing: -.025em; font-weight: 700; line-height: 1.22; }
.action-copy small, .muted, .field-hint, .optional { color: var(--muted); }
.action-copy small, .field-hint, .footnote { font-size: .875rem; }
.action-card > .icon { width: 18px; height: 18px; color: #606f61; }
.footnote { border-top: 1px dashed #cbd3c5; padding-top: 1rem; color: #566457; display: flex; align-items: flex-start; gap: .48rem; }
.footnote .icon { width: 16px; height: 16px; margin-top: 2px; }
.button { justify-content: center; min-height: 44px; text-decoration: none; gap: .52rem; padding: .63rem 1.06rem; border: 1px solid transparent; border-radius: 8px; font-size: .93rem; font-weight: 650; line-height: 1.3; text-align: center; }
.button .icon { width: 18px; height: 18px; }
.button.primary { color: white; background: var(--pine); }
.button.primary:hover { background: var(--pine-hover); }
.button.light { background: var(--white); border-color: #bdc9b9; color: var(--pine); }
.button.light:hover { background: #edf3e7; }
.full { width: 100%; min-height: 48px; }
.text-link { min-height: 32px; font-size: .91rem; font-weight: 650; color: #245342; text-underline-offset: .22em; }
.selected-action { display: flex; align-items: center; gap: .8rem; border-bottom: 1px dashed var(--border); margin-bottom: 1.25rem; padding-bottom: 1.13rem; }
.selected-action .text-link { margin-left: auto; }
.selected-action h2 { font-size: 1.26rem; margin-top: .08rem; }
.small-label, .metric-label { color: var(--muted); font-size: .82rem; font-weight: 550; }
.names-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; align-content: start; gap: .35rem; min-width: 0; }
.field label { font-size: .92rem; font-weight: 620; }
.field input, select, .search-box { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #acbbac; border-radius: 8px; padding: .58rem .72rem; color: var(--ink); background: white; }
select { padding-right: 1.6rem; text-overflow: ellipsis; }
.field input:focus, select:focus, .search-box:focus-within { outline: 2px solid var(--pine); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: #ad4536; }
.field-error { font-size: .84rem; color: #8b3025; }
.attendee-form > .field { margin-top: .85rem; }
.field-hint { margin: .45rem 0 1.18rem; }
.stack { display: grid; gap: 1rem; }
.notice { display: flex; align-items: flex-start; gap: .6rem; padding: .8rem .95rem; margin-bottom: 1.15rem; border: 1px solid; border-radius: 9px; font-size: .93rem; }
.notice .icon { width: 18px; height: 18px; margin-top: 2px; }
.notice-error { color: #742e24; background: #fbede5; border-color: #e5c4b7; }
.notice-ok { color: #204e38; background: #e9f4e5; border-color: #cadcc2; }
.success-mark, .empty-icon { width: 49px; height: 49px; display: inline-grid; place-items: center; background: var(--pale); color: #255c43; border-radius: 50%; }
.success-mark .icon { width: 27px; height: 27px; }
.receipt { text-align: center; }
.receipt h2 { margin: .75rem 0 .4rem; }
.receipt-time { display: block; font-size: 2.35rem; font-weight: 650; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.receipt .button { margin-top: 1.35rem; }
.ticket-body > h2 + .muted { margin: .75rem 0 .5rem; }
.login-ticket { max-width: 490px; margin: auto; }
.login-ticket .ticket-cover h1 { max-width: 8.7em; }
.login-ticket .door-art { width: 132px; }
.simple-card { max-width: 550px; margin: 3rem auto; padding: 1.6rem; }
.simple-card p, .simple-card .text-link { margin-top: 1rem; }
.dashboard { max-width: 1216px; margin: auto; padding: 2.55rem clamp(1rem, 4vw, 2.75rem) 3rem; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-heading h1 { font-size: clamp(2.05rem, 4vw, 3.25rem); }
.section-label { margin-bottom: .34rem; font-size: .73rem; font-weight: 700; letter-spacing: .095em; text-transform: uppercase; color: #526653; }
.training-picker { display: flex; align-items: flex-end; gap: .55rem; margin-bottom: 1.35rem; }
.training-picker .field { width: min(100%, 490px); }
.training-picker .button { min-height: 46px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .9rem; margin: 0 0 1.4rem; }
.metric { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .42rem; border-radius: 12px; padding: 1.05rem 1.25rem; border: 1px solid var(--border); background: var(--white); }
.metric.total { background: var(--pine); border-color: var(--pine); color: #fffdef; }
.metric.total .metric-label { color: #e6eedb; }
.metric.total .metric-icon { color: #efd694; }
.metric.present .metric-icon { color: #37704d; }
.metric.left .metric-icon { color: #88631f; }
.metric-icon { position: absolute; bottom: 1.25rem; right: 1.1rem; }
.metric strong { font-size: 2.5rem; font-weight: 650; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.roster { overflow: hidden; }
.roster-tools { display: flex; justify-content: space-between; align-items: center; gap: 1.1rem; padding: 1.3rem 1.35rem; }
.roster-tools .muted, .training-row .muted { font-size: .85rem; margin-top: .28rem; }
.search-form, .search-box { display: flex; align-items: center; gap: .5rem; }
.search-form { width: min(100%, 390px); }
.search-box { flex: 1; min-height: 44px; padding: 0 .65rem; }
.search-box .icon { width: 17px; height: 17px; color: var(--muted); }
.search-box input { border: 0; outline: none; min-width: 0; width: 100%; min-height: 41px; background: transparent; color: inherit; }
.search-box input::placeholder { color: #626f65; }
.filter-line { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; padding: .25rem 1.35rem .8rem; font-size: .9rem; overflow-wrap: anywhere; }
.table-wrap { width: 100%; overflow-x: auto; }
.attendance-table { width: 100%; border-collapse: collapse; font-size: .91rem; }
.attendance-table th, .attendance-table td { text-align: left; padding: .9rem .85rem; vertical-align: middle; overflow-wrap: anywhere; }
.attendance-table th:first-child, .attendance-table td:first-child { padding-left: 1.35rem; }
.attendance-table th:last-child, .attendance-table td:last-child { padding-right: 1.35rem; }
.attendance-table th { background: #f0f3e9; border-block: 1px solid var(--border); font-size: .8rem; color: #48594b; font-weight: 650; }
.attendance-table td { border-bottom: 1px solid #e3e7db; }
.attendance-table tr:last-child td { border-bottom: 0; }
.attendance-table .email-cell { max-width: 18rem; }
.attendance-table time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.attendance-table time span, .attendance-table time small { display: block; }
.attendance-table time small { color: var(--muted); font-size: .83rem; }
.status { display: inline-flex; align-items: center; gap: .34rem; white-space: nowrap; padding: .23rem .58rem; border-radius: 100px; font-size: .77rem; font-weight: 650; }
.status::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.status.here { background: #e3efe0; color: #2c573d; }
.status.departed { background: #f8eccb; color: #765619; }
.status.closed { background: #e9ece4; color: #526050; }
.empty { padding: 2rem 1rem 2.25rem; text-align: center; }
.empty h2, .empty h3 { margin: .75rem 0 .48rem; }
.empty p, .empty-inline { color: var(--muted); font-size: .94rem; }
.empty .button { margin-top: 1rem; }
.management-grid { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(280px, 1.25fr); gap: 1.1rem; align-items: start; }
.manage-card { padding: 1.35rem; }
.manage-card > h2 { margin-bottom: .9rem; }
.manage-card > .muted, .optional { font-size: .89rem; }
.optional { font-weight: 450; }
.check-label { display: flex; gap: .55rem; align-items: center; font-size: .94rem; }
.check-label input { width: 18px; height: 18px; accent-color: var(--pine); }
.empty-inline { margin-top: 1rem; }
.training-row { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.training-list { margin-top: 1rem; }
.training-row:last-child { padding-bottom: 0; }
.training-row h3 { margin-top: .45rem; }
.training-row .text-link { margin-top: .15rem; }
@media (max-width: 780px) {
    .roster-tools { align-items: stretch; flex-direction: column; }
    .management-grid { grid-template-columns: 1fr; }
    .metrics { gap: .55rem; }
    .metric { padding: .85rem; }
    .metric-icon { display: none; }
}
@media (max-width: 640px) {
    .nav-inner { min-height: 59px; }
    .public-main { width: calc(100% - 1.5rem); margin: 1.25rem auto 2rem; }
    .ticket-cover { min-height: 137px; padding: 1.4rem 1.25rem; }
    .ticket-cover h1 { font-size: clamp(1.82rem, 7.8vw, 2.5rem); }
    .ticket-heading { width: calc(100% - 74px); }
    .door-art { width: 118px; right: -27px; }
    .ticket-body { padding: 1.28rem 1.1rem; }
    .action-card { min-height: 78px; padding: .8rem .85rem; gap: .75rem; }
    .action-list { margin: 1rem 0; }
    .action-icon { width: 44px; height: 44px; }
    .names-grid { grid-template-columns: 1fr; gap: .85rem; }
    .dashboard { padding-top: 1.35rem; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 1.25rem; }
    .admin-page .brand-label, .admin-page .brand-divider { display: none; }
    .nav-link { padding-inline: .3rem; }
    .metrics { gap: .4rem; }
    .metric { padding: .7rem .5rem; border-radius: 9px; gap: .55rem; }
    .metric strong { font-size: 1.7rem; }
    .metric-label { font-size: .73rem; line-height: 1.2; min-height: 1.85rem; }
    .roster-tools, .manage-card { padding: 1rem; }
    .roster-tools { gap: .8rem; }
    .attendance-table, .attendance-table tbody, .attendance-table tr, .attendance-table td { display: block; }
    .attendance-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .attendance-table tr { padding: .65rem 1rem; border-top: 1px solid var(--border); }
    .attendance-table td, .attendance-table td:first-child, .attendance-table td:last-child { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: .45rem; padding: .22rem 0; border: none; justify-items: start; align-items: baseline; }
    .attendance-table td::before { content: attr(data-label); font-size: .78rem; color: var(--muted); }
    .attendance-table .email-cell { max-width: none; }
    .attendance-table time { white-space: normal; }
    .attendance-table time span, .attendance-table time small { display: inline; }
    .training-row { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width: 350px) {
    .brand-label, .brand-divider { display: none; }
    .training-tag { font-size: .77rem; }
    .button { padding-inline: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
