/* The report uses the workbench palette and its own table and form sizing. */
.registration-history {
  --ink:#132f50; --text:#284861; --muted:#516980; --blue:#1b5ead; --blue-dark:#144a8b;
  --blue-soft:#eaf3ff; --line:#d8e4f0; --rose:#8a3a25; --rose-soft:#fff0e7;
  --green:#216346; --green-soft:#e5f3ea; --gold:#795511; --gold-soft:#fff4d7;
  --neutral-soft:#edf1f5; --radius:16px; color:var(--ink); container-type:inline-size;
}
.registration-history input[aria-invalid="true"] { border-color:#a33024; }
.registration-history h1, .registration-history h2, .registration-history h3, .registration-history p, .registration-history dl, .registration-history dd, .registration-history figure { margin:0 }
.registration-history [hidden] { display:none!important }
.registration-history button, .registration-history input, .registration-history select { font:inherit; color:inherit }
.registration-history button { cursor:pointer }
.registration-history button:disabled { cursor:default }
.registration-history :focus-visible { outline:2px solid var(--blue); outline-offset:3px }
.registration-history time, .registration-history .numbers { font-variant-numeric:tabular-nums }
.registration-history .activity { display:flex; justify-content:space-between; gap:16px; align-items:center; border:1px solid #c9dff5; border-radius:var(--radius); padding:15px 20px; background:linear-gradient(108deg,#e6f1ff,#f4f8ff 75%) }
.registration-history .activity-left { display:flex; gap:12px; align-items:center; min-width:0 }
.registration-history .activity h2 { font-size:17px }
.registration-history .activity p { color:var(--muted); font-size:12px; margin-top:3px }
.registration-history .calendar { width:42px; height:42px; flex:none; display:grid; place-items:center; border-radius:12px; color:var(--blue); background:#d6e8fc }
.registration-history .calendar i { position:relative; width:19px; height:17px; border:1.6px solid currentColor; border-radius:4px }
.registration-history .calendar i::before { content:""; position:absolute; width:9px; height:6px; top:-5px; left:3px; border-inline:1.6px solid currentColor }
.registration-history .calendar i::after { content:""; position:absolute; left:0; right:0; top:4px; border-top:1.6px solid currentColor }
.registration-history .activity-tag { color:#295785; border:1px solid #c3daef; background:#f4faff; border-radius:7px; padding:3px 8px; font-size:12px; white-space:nowrap }
.registration-row-actions { display:inline-flex; align-items:center; gap:8px; }
.registration-history .metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:15px 0 20px; padding:0; border:0; background:transparent }
.registration-history .metric { border:1px solid var(--line); background:white; border-radius:13px; padding:13px 15px; min-width:0 }
.registration-history .metric dt { font-size:12px; color:var(--muted) }
.registration-history .metric dd { font-size:clamp(23px,3vw,29px); font-weight:750; line-height:1.18; margin-top:3px; text-align:left }
.registration-history .metric dd small { margin-left:3px; font-size:12px; font-weight:500; color:var(--muted) }
.registration-history .metric.formal dd { color:var(--blue-dark) }
.registration-history .metric.cancel dd { color:var(--rose) }
.registration-history .surface { border:1px solid var(--line); background:white; border-radius:var(--radius); box-shadow:0 7px 24px #17365608 }
.registration-history .view-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 17px; border-bottom:1px solid var(--line) }
.registration-history .segmented { display:inline-flex; align-items:center; gap:3px; background:#edf4fb; border-radius:11px; padding:3px }
.registration-history .segmented button { min-height:44px; padding:5px 14px; background:transparent; border:1px solid transparent; border-radius:8px; font-weight:650; color:var(--muted); white-space:nowrap }
.registration-history .segmented button[aria-pressed="true"] { background:white; border-color:#d1e0ef; color:var(--blue-dark); box-shadow:0 1px 3px #193a6114 }
.registration-history .zone { font-size:12px; color:var(--muted); white-space:nowrap }
.registration-history .filters { padding:14px 17px; border-bottom:1px solid var(--line); background:#fbfdff }
.registration-history .filter-fields { display:grid; grid-template-columns:minmax(135px,1.05fr) minmax(118px,.72fr) repeat(2,minmax(162px,1fr)) auto; gap:12px; align-items:end }
.registration-history .field { min-width:0 }
.registration-history .field label { display:block; font-size:12px; font-weight:700; margin-bottom:5px }
.registration-history .field input, .registration-history .field select { display:block; width:100%; min-width:0; min-height:44px; border:1px solid #c5d7e8; border-radius:9px; background:white; padding:8px 9px; font-size:13px }
.registration-history .actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px }
.registration-history .button { min-height:44px; border:1px solid var(--line); border-radius:9px; padding:6px 11px; background:white; color:var(--blue-dark); font-weight:650; white-space:nowrap; transition:background-color .16s,border-color .16s }
.registration-history .button:hover:not(:disabled) { background:var(--blue-soft); border-color:#9dbbdb }
.registration-history .button.primary { border-color:var(--blue); background:var(--blue); color:white }
.registration-history .button.primary:hover { background:var(--blue-dark) }
.registration-history .button:disabled { opacity:.48 }
.registration-history .subfilters { display:flex; align-items:center; flex-wrap:wrap; gap:5px 12px; margin-top:3px; font-size:12px; color:var(--muted) }
.registration-history .field-error { color:#9c2d20; margin-top:7px; font-size:13px }
.registration-history .result-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 17px }
.registration-history .result-head h2, .registration-history .chart-heading h2 { font-size:16px }
.registration-history .result-head p, .registration-history .chart-heading p { color:var(--muted); font-size:12px; margin-top:2px }
.registration-history .grid-table { width:100%; border-collapse:collapse; text-align:left }
.registration-history .grid-table th { background:#edf4fa; color:#355370; font-size:12px; font-weight:650; white-space:nowrap }
.registration-history .grid-table th, .registration-history .grid-table td { padding:10px 14px }
.registration-history .grid-table :is(th,td):first-child { padding-left:17px }
.registration-history .grid-table :is(th,td):last-child { padding-right:17px }
.registration-history .grid-table td { border-bottom:1px solid #e8eff5; vertical-align:middle; color:var(--text); font-size:13px }
.registration-history .grid-table td small { display:block; margin-top:1px; color:var(--muted); font-size:11px }
.registration-history .grid-table tr:hover td { background:#f8fbfe }
.registration-history .grid-table .person { color:var(--ink); font-size:14px }
.registration-history .grid-table time { white-space:nowrap }
.registration-history .grid-table .table-action { font-size:12px; padding-inline:9px }
.registration-history .label { display:inline-flex; align-items:center; border-radius:7px; padding:3px 7px; font-size:12px; white-space:nowrap; font-weight:650; background:var(--neutral-soft); color:#42586d }
.registration-history .label.formal { background:var(--green-soft); color:var(--green) }
.registration-history .label.waitlist, .registration-history .label.offered, .registration-history .label.pay { background:var(--gold-soft); color:var(--gold) }
.registration-history .label.cancelled, .registration-history .label.cancel { background:var(--rose-soft); color:var(--rose) }
.registration-history .label.apply { background:var(--blue-soft); color:var(--blue-dark) }
.registration-history .pagination { padding:11px 17px; display:flex; align-items:center; justify-content:flex-end; gap:7px; font-size:12px; color:var(--muted) }
.registration-history .pagination .button { font-size:12px }
.registration-history .empty { padding:31px 15px; color:var(--muted); text-align:center }
.registration-history .stats { padding:17px }
.registration-history .chart-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:9px; flex-wrap:wrap }
.registration-history .chart-totals { display:flex; flex-wrap:wrap; gap:10px 18px; color:var(--text); margin:14px 0 10px; font-size:13px }
.registration-history .chart-totals strong { color:var(--ink); font-variant-numeric:tabular-nums }
.registration-history .legend-item { display:flex; align-items:center; gap:6px }
.registration-history .legend-mark { display:inline-block; flex:none; width:11px; height:11px; border-radius:3px; background:#3880ce }
.registration-history .legend-mark.cancel, .registration-history .bar.cancel { background:repeating-linear-gradient(135deg,#e7a16d 0 3px,#f5c79f 3px 6px) }
.registration-history .chart { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(88px,1fr); gap:7px; overflow:auto; padding:5px; border-radius:10px; background:#f6f9fd }
.registration-history .bucket { display:grid; grid-template-rows:128px auto; min-height:175px; min-width:0; text-align:center; border:1px solid transparent; padding:7px 5px; border-radius:8px; background:transparent; color:var(--text); font-size:12px }
.registration-history .bucket:hover, .registration-history .bucket[aria-pressed="true"] { background:white; border-color:#b7cee8 }
.registration-history .plot { display:flex; align-items:end; justify-content:center; gap:6px; height:100%; border-bottom:1px solid #cfdfed; background:repeating-linear-gradient(to top,transparent 0 30px,#e4edf7 30px 31px) }
.registration-history .bar-slot { display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:2px; height:100%; width:min(34%,34px); color:var(--blue-dark); font-size:11px; font-weight:700; font-variant-numeric:tabular-nums }
.registration-history .bar-slot.cancel { color:var(--rose) }
.registration-history .bar { width:100%; height:var(--height); flex:none; background:#3880ce; border-radius:5px 5px 0 0 }
.registration-history .bucket-caption { padding-top:6px; line-height:1.35 }
.registration-history .bucket-caption span { display:block; color:var(--muted) }
.registration-history .bucket-events { margin-top:15px; border:1px solid var(--line); border-radius:12px }
.registration-history .bucket-events .result-head { border-bottom:1px solid var(--line) }
.registration-history .bucket-events .grid-table tr:last-child td { border-bottom:0 }
.registration-history .bucket-events .grid-table td:first-child { white-space:nowrap }
.registration-history .drawer { position:fixed; inset:0 0 0 auto; margin:0; width:min(100%,500px); height:100dvh; max-width:none; max-height:none; border:0; border-left:1px solid var(--line); padding:0; color:var(--ink); background:white; box-shadow:-12px 0 48px #1736592a }
.registration-history .drawer::backdrop { background:#122a4c6b }
.registration-history .drawer-head { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; padding:13px 19px; border-bottom:1px solid var(--line); background:white }
.registration-history .drawer-head h2 { font-size:17px }
.registration-history .close { width:44px; padding:0; font-size:21px; font-weight:400; line-height:1 }
.registration-history .drawer-body { padding:17px 19px 27px }
.registration-history .detail-card { background:#f4f8fe; border:1px solid var(--line); border-radius:12px; padding:14px }
.registration-history .detail-person { display:flex; align-items:center; gap:9px 12px; flex-wrap:wrap; justify-content:space-between }
.registration-history .detail-person h3 { font-size:20px }
.registration-history .detail-card p { margin-top:4px; color:var(--muted); font-size:13px }
.registration-history .timeline-title { margin-top:21px; font-size:16px }
.registration-history .timeline { padding:0 0 0 10px; list-style:none; margin:13px 0 0; color:var(--text) }
.registration-history .timeline li { position:relative; padding:0 0 16px 19px; border-left:1px solid #cfdfed }
.registration-history .timeline li:last-child { padding-bottom:0; border-left-color:transparent }
.registration-history .timeline li::before { content:""; position:absolute; left:-5px; top:7px; width:9px; height:9px; border-radius:50%; background:#3d83cb; box-shadow:0 0 0 3px #e6f0fa }
.registration-history .timeline li[data-kind="cancel"]::before { background:#bb633b; box-shadow:0 0 0 3px var(--rose-soft) }
.registration-history .event-head { display:flex; justify-content:space-between; align-items:baseline; gap:4px 9px; flex-wrap:wrap; font-weight:700 }
.registration-history .event-head :is(time,small) { color:var(--muted); font-size:12px; font-weight:500 }
.registration-history .timeline p { font-size:12px; color:var(--muted); margin-top:3px }
.registration-history .grid-table th,.registration-history .grid-table td { white-space:normal; }
.registration-history .activity h2 { overflow-wrap:anywhere; }
.registration-history .drawer { z-index:20; }
@container (max-width:940px) {
  .registration-history .filter-fields { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .registration-history .filter-fields .actions { grid-column:1/-1; justify-content:flex-end; }
  .registration-history .grid-table th,.registration-history .grid-table td { padding-inline:8px; }
}
@container (max-width:650px) {
  .registration-history .topbar-inner, .registration-history main { padding-inline:13px }
  .registration-history .activity { padding:12px; gap:7px }
  .registration-history .activity-tag { display:none }
  .registration-history .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-block:12px 15px }
  .registration-history .metric { padding:10px 11px }
  .registration-history .view-head, .registration-history .filters, .registration-history .result-head, .registration-history .stats { padding:10px 11px }
  .registration-history .segmented button { padding-inline:8px }
  .registration-history .filter-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px }
  .registration-history .subfilters { gap:0 9px }
  .registration-history .grid-table, .registration-history .grid-table tbody, .registration-history .grid-table tr, .registration-history .grid-table td { display:block }
  .registration-history .grid-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%) }
  .registration-history .grid-table tbody { padding:0 10px }
  .registration-history .grid-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 8px; border-top:1px solid var(--line); padding:8px 3px }
  .registration-history .grid-table td, .registration-history .grid-table :is(th,td):first-child, .registration-history .grid-table :is(th,td):last-child { padding:0; border:0; min-width:0; overflow-wrap:anywhere }
  .registration-history .grid-table td[data-label]::before { content:attr(data-label); display:block; color:var(--muted); font-size:11px }
  .registration-history .grid-table .table-action { width:100% }
  .registration-history .grid-table time, .registration-history .bucket-events .grid-table td:first-child { white-space:normal }
  .registration-history .bucket-events tr:first-child { border-top:0 }
  .registration-history .drawer-body, .registration-history .drawer-head { padding-inline:13px }
}
@media (prefers-reduced-motion:reduce) {
  .registration-history button { transition:none; }
}
