:root {
  --nav: #123c46;
  --nav-hover: #205460;
  --accent: #087f8c;
  --accent-soft: #e7f5f4;
  --ink: #173744;
  --muted: #506b78;
  --line: #d9e5e8;
  --surface: #fff;
  --bg: #f3f7f8;
  --danger: #a32935;
  --warning: #86571b;
  --radius: 10px;
  --shadow: 0 1px 2px #17374408;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline: none; }
button:focus, a:focus { box-shadow: inset 0 0 0 1px var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
  outline: 1px solid transparent;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .65; }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 19px; margin: 0 0 var(--space-4); }
h3 { font-size: 16px; margin: 0 0 var(--space-3); }
p { line-height: 1.6; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
/* Hashes and source identifiers must wrap inside narrow inspection cards. */
code { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.print-only, .mobile-only { display: none; }

/* Today uses the same compact actions and spacing as other work queues. */
.today-summary { margin-bottom: var(--space-5); }
.today-attention { margin-top: var(--space-5); }

/* Application frame */
.app-layout { display: flex; min-height: 100dvh; }
.sidebar { width: 244px; flex-shrink: 0; background: var(--nav); color: #fff; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 50; }
.brand { display: flex; align-items: center; gap: var(--space-3); color: #fff; font-size: 22px; font-weight: 700; padding: 19px 22px 17px; }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 400; font-size: 11px; letter-spacing: .04em; margin-top: 5px; color: #b7d1d5; }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; display: inline-grid; place-items: center; background: #1b6c77; color: white; font-size: 18px; font-weight: 800; letter-spacing: -1px; flex: none; }
.sidebar nav { padding: 0 14px; overflow: auto; flex: 1; }
.sidebar .nav-group > a { display: flex; gap: var(--space-3); align-items: center; min-height: 35px; padding: 7px 12px; border-radius: 7px; color: #dcebed; font-size: 14px; font-weight: 550; margin: 1px 0; line-height: 1.35; }
.sidebar .nav-group > a > span { width: 20px; font-size: 18px; text-align: center; opacity: .8; }
.sidebar .nav-group > a:hover { background: var(--nav-hover); text-decoration: none; }
.sidebar .nav-group > a.active { background: #28606a; box-shadow: inset 3px 0 #57c8d0; color: white; }
.nav-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8fb1bb; margin: 24px 12px 9px; }
.sidebar-foot { padding: 16px 24px; border-top: 1px solid #ffffff15; font-size: 13px; }
.sidebar-foot a { color: #e5f3f5; }
.sidebar-foot small { display: block; color: #94b4bd; margin-top: 6px; overflow-wrap: anywhere; }
.sidebar-close { display: none; }
.main-area { margin-left: 244px; width: calc(100% - 244px); min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 54px; background: #ffffffed; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 10px 32px; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar-actions form { margin: 0; }
.lang { font-size: 12px; padding: 6px 7px; color: var(--muted); border-radius: 5px; }
.lang.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.icon-button { display: none; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); width: 36px; min-height: 36px; padding: 0; font-size: 20px; }
.global-search { display: flex; align-items: center; gap: 7px; max-width: 410px; flex: 1; min-width: 140px; margin: 0; }
.global-search input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 7px; min-height: 37px; padding: 7px 11px; font-size: 13px; color: var(--ink); background: #f8fbfc; }
.global-search button { font-size: 12px; min-height: 37px; }
.content { padding: 21px clamp(18px,2.2vw,38px) 32px; max-width: 1640px; width: 100%; margin: 0 auto; flex: 1; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 17px; }
.page-heading h1 { font-size: 29px; letter-spacing: -.7px; margin: 5px 0 0; }
.site-footer { display: flex; justify-content: space-between; gap: 14px; padding: 17px 32px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* Shared cards, form fields and action groups */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 19px; margin: 0 0 var(--space-4); box-shadow: var(--shadow); min-width: 0; }
.choice-list { max-height: 20rem; overflow: auto; padding: var(--space-2); border: 1px solid var(--line); border-radius: 7px; }
.choice-list .check { margin-bottom: var(--space-2); }
.card-row { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); display: flex; gap: var(--space-4); justify-content: space-between; align-items: center; flex-wrap: wrap; }
.card-row:last-child { border-bottom: 0; }
.card-row form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--space-3); }
.card-row .field { margin-bottom: 0; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.card-header h2 { margin-bottom: 0; }
.actions, .toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions { margin-top: 18px; }
.card > .actions:first-child { margin-top: 0; }
.toolbar { margin-bottom: var(--space-5); justify-content: space-between; }
.toolbar form, .filters { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; }
.content > .actions { margin: 0 0 var(--space-5); gap: var(--space-2); flex-wrap: wrap; padding-bottom: 0; }
.content > .actions > .button { flex: 0 1 auto; }
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 7px; padding: 9px 14px; min-height: 40px; font-size: 13px; line-height: 1.4; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; text-align: center; }
.button:hover { text-decoration: none; filter: brightness(.97); }
.button.primary { background: var(--accent); color: white; }
.button.secondary { background: white; border-color: var(--line); color: var(--ink); }
.button.quiet { background: transparent; color: var(--accent); border-color: transparent; }
.button.danger { background: #fff1f3; color: var(--danger); border-color: #edcbd1; }
.topbar .quiet { min-height: 35px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: var(--space-3); min-width: 0; }
.field > span { font-size: 12px; font-weight: 550; line-height: 1.4; }
.field input, .field select, .field textarea { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid #cbdde2; border-radius: 7px; color: var(--ink); background-color: white; font-size: 14px; }
.field textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
.field select, .journal select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2349626c' stroke-width='1.7'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 31px; }
.field input[type=file] { padding: 8px; }
.field input[readonly], .field textarea[readonly] { background-color: #f7fafb; }
.field-error { color: var(--danger); font-size: 13px; margin: 4px 0 14px; }
.filters .field, .toolbar .field, .table-wrap .field, .table-scroll .field { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-5); }
.form-grid .wide { grid-column: 1 / -1; }
.check, .checkbox { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 12px 0; line-height: 1.5; }
.check input, .checkbox input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.help { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 8px 0 18px; }
.context-back { display: inline-block; font-size: 13px; margin-bottom: 18px; }
.details { display: grid; grid-template-columns: 150px 1fr; gap: 12px 20px; font-size: 14px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
details > summary { cursor: pointer; font-size: 14px; line-height: 1.5; }
details[open] > summary { margin-bottom: 18px; }
.raw-data { max-height: 480px; overflow: auto; }

/* Lists, workspaces and status */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.grid > .card, .grid-2 > .card { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: var(--space-6); }
.stat { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 17px 20px; }
.stat strong { display: block; font-size: 27px; font-weight: 650; margin-top: 9px; letter-spacing: -.5px; }
.stat span { font-size: 12px; color: var(--muted); }
.notice { padding: 13px 16px; border: 1px solid #c9e3df; border-radius: 8px; background: #edf8f4; color: #285f50; margin-bottom: 18px; font-size: 14px; line-height: 1.5; }
.notice.error { background: #fff1f3; border-color: #f0ced4; color: var(--danger); }
.notice.warning { background: #fff9eb; border-color: #ecdfbf; color: var(--warning); }
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; font-size: 11px; line-height: 1.2; background: #edf2f4; color: #546e78; white-space: nowrap; vertical-align: middle; }
.badge.success, .badge.green { background: #e2f3eb; color: #286b4f; }
.badge.test, .badge.warning { background: #fff2d9; color: #90641c; }
.badge.error, .badge.red { background: #fbe6e9; color: #a32935; }
.badge.blue { background: #e5f1fa; color: #2c6b95; }
.badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; font-size: 14px; border-radius: 6px; color: var(--muted); }
.tabs a.active, .tabs a[aria-current=page] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.empty { padding: 36px 22px; text-align: center; color: var(--muted); background: #f8fbfc; border: 1px dashed #cedde2; border-radius: 10px; }
.empty h3 { color: var(--ink); font-size: 17px; }
.empty p { max-width: 530px; margin: 10px auto 20px; }
.group-card .time { font-size: 25px; font-weight: 650; letter-spacing: -.5px; }
.group-card h2 { margin: 12px 0 8px; }
.group-card .meta { color: var(--muted); font-size: 13px; line-height: 1.7; }
.group-card .actions { padding-top: 16px; border-top: 1px solid var(--line); margin-top: 18px; }
.progress { height: 5px; background: #e6eef1; border-radius: 9px; overflow: hidden; margin: 14px 0 8px; }
.progress > span { height: 100%; display: block; background: #36a6ad; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-results li { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.search-results li:last-child { border-bottom: 0; }
.search-results a { flex: 1; padding: 13px 3px; min-width: 0; }
.search-result-title { display: block; font-size: 15px; font-weight: 600; }
.search-result-detail { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 4px; overflow-wrap: anywhere; }

/* Tables and journal */
.table-wrap, .table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 9px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: white; }
th { font-size: 11px; letter-spacing: .025em; color: var(--muted); font-weight: 650; text-align: left; background: #f6f9fa; white-space: nowrap; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e6eef1; line-height: 1.4; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fbfc; }
td small { display: block; color: var(--muted); margin-top: 3px; }
.test-row { background: #fffcf5; }
.table-wrap .field select { min-width: 110px; }
.table-scroll input[type=text] { min-width: 110px; }
.table-scroll .checkbox { min-width: 150px; }
.table-scroll input[type=checkbox] { accent-color: var(--accent); }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.total { font-size: 28px; letter-spacing: -.4px; font-weight: 650; }
.journal th, .journal td { text-align: center; padding: 10px 7px; }
.journal th:first-child, .journal td:first-child { position: sticky; left: 0; background: white; z-index: 2; min-width: 190px; box-shadow: 1px 0 var(--line); text-align: left; padding: 12px 14px; }
.journal th:first-child { background: #f6f9fa; }
.journal select { width: 55px; min-width: 55px; min-height: 35px; border: 1px solid #c8d9df; border-radius: 5px; color: var(--ink); background-color: white; background-position: right 4px center; padding: 6px 17px 6px 4px; font-size: 12px; }
.journal.single select { width: 165px; min-width: 165px; }
.journal .cell-present { background: #dff2e9; }
.journal .cell-absent { background: #fce9eb; }
.pagination { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; font-size: 13px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.calendar-day { padding: 12px; background: white; border: 1px solid var(--line); border-radius: 8px; min-height: 130px; }
.calendar-day > strong { font-size: 13px; display: block; margin-bottom: 10px; }
.calendar-lesson { display: block; padding: 8px; margin: 6px 0; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 4px; font-size: 12px; line-height: 1.5; }

/* One native dialog component; server forms also work without enhancement. */
.flow-panel { position: relative; inset: auto; margin: 0 auto 24px; padding: 0; width: min(760px, 100%); max-width: 100%; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.flow-panel:modal { position: fixed; inset: 0; margin: auto; max-height: calc(100dvh - 48px); overflow-y: auto; box-shadow: 0 16px 80px #14343f33; }
.flow-panel::backdrop { background: #102e3b70; }
.flow-drawer:modal { margin: 0 0 0 auto; width: min(760px, 90vw); height: 100dvh; max-height: 100dvh; border-radius: 14px 0 0 14px; }
.flow-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; background: white; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.flow-header h2 { margin: 0; }
.flow-close { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 7px; font-size: 26px; line-height: 1; color: var(--muted); }
.flow-close:hover { background: var(--bg); text-decoration: none; }
.flow-body { padding: 24px; }
.flow-body > .card { padding: 0; border: 0; box-shadow: none; margin-bottom: 0; }
.flow-body .actions { padding-top: 16px; border-top: 1px solid var(--line); }

/* Authentication */
.login-layout { min-height: 100dvh; display: grid; place-items: center; padding: 28px; background: radial-gradient(ellipse at 20% 0%, #dceef0, transparent 65%), var(--bg); }
.login-card { max-width: 450px; width: 100%; background: #fff; border: 1px solid var(--line); padding: 36px; border-radius: 20px; box-shadow: 0 15px 70px #123c4610; }
.login-card .brand-mark { margin-bottom: 25px; }
.login-card h1 { font-size: 29px; letter-spacing: -.7px; line-height: 1.2; margin: 10px 0 16px; }
.login-card form { margin-top: 25px; }
.login-card button { width: 100%; }
.login-lang { position: absolute; right: 30px; top: 25px; }

@media (max-width: 1150px) {
  .sidebar { width: 220px; }
  .main-area { margin-left: 220px; width: calc(100% - 220px); }
  .content { padding: 24px; }
  .topbar { padding: 10px 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body.menu-open { overflow: hidden; }
  .sidebar { transform: translateX(-100%); width: 248px; transition: transform .15s; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 0 100vw #0005; }
  .sidebar-close { display: grid; place-items: center; position: absolute; top: 5px; right: 5px; padding: 0; width: 30px; min-height: 30px; font-size: 24px; background: transparent; color: #e5f3f5; }
  .main-area { margin-left: 0; width: 100%; }
  .icon-button { display: inline-flex; flex: none; }
  .topbar { padding: 8px 12px; min-height: 57px; position: sticky; top: 0; z-index: 30; gap: 8px; flex-wrap: wrap; }
  .topbar-actions { gap: 3px; margin-left: auto; }
  .global-search { order: 3; flex-basis: 100%; max-width: none; }
  .content { padding: 17px 12px; }
  .page-heading h1 { font-size: 25px; }
  .card { padding: 15px; border-radius: 9px; margin-bottom: 12px; }
  .grid, .grid-2, .form-grid { grid-template-columns: 1fr; gap: 0 16px; }
  .grid, .grid-2 { row-gap: 16px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 24px; }
  .filters, .toolbar form { width: 100%; }
  .filters .field, .toolbar .field { flex: 1; min-width: 130px; }
  .filters > .field:first-of-type { flex-basis: 100%; }
  .toolbar { align-items: stretch; }
  .toolbar > .actions { margin-top: 0; }
  .actions > .button { flex: 1; }
  .card-header > .actions { margin-top: 0; }
  .checkbox, .check { align-items: flex-start; }
  .details { grid-template-columns: 110px 1fr; gap: 12px; }
  .calendar-grid { display: block; }
  .calendar-day { min-height: 0; margin-bottom: 10px; }
  .site-footer { padding: 17px 16px; flex-direction: column; gap: 5px; }
  .login-card { padding: 27px; }
  th, td { padding: 8px 10px; }
  .table-wrap > table, .table-scroll > table { min-width: 560px; }
  .table-wrap > table.journal.single { min-width: 0; }
  .journal th:first-child, .journal td:first-child { min-width: 145px; max-width: 170px; }
  .journal.single th, .journal.single td { padding: 10px 8px; }
  .journal.single th:first-child, .journal.single td:first-child { min-width: 120px; max-width: 140px; width: 46%; white-space: normal; }
  .journal.single select { width: 100%; min-width: 130px; }
  .journal.single .field { margin-top: 10px; }
  .journal.single .desktop-only { display: none; }
  .pagination .button { font-size: 12px; }
  .mobile-only { display: block; }
  .desktop-only { display: none; }
  .flow-panel:modal, .flow-drawer:modal { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .flow-header { padding: 16px; }
  .flow-body { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}
@media (forced-colors: active) {
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; box-shadow: none; }
  .field select, .journal select { appearance: auto; background-image: none; }
}
/* RC33 workspace navigation and compact work surfaces */
.skip-link { position: fixed; left: 8px; top: -80px; z-index: 100; padding: 10px; background: white; }
.skip-link:focus { top: 8px; }
.nav-group { margin: 0; border-top: 1px solid #ffffff20; padding: 6px 0; }
.nav-group:first-child { border-top: 0; }
.nav-group summary, .nav-group .nav-label { margin: 0; padding: 7px 12px; color: #a9d0d2; font-weight: 650; font-size: 11px; letter-spacing: .045em; }
.nav-group summary { display: flex; align-items: center; justify-content: space-between; min-height: 34px; cursor: pointer; list-style: none; }
.nav-group summary::after { content: '+'; font-size: 16px; font-weight: 400; }
.nav-group[open] summary::after { content: '−'; }
.nav-group summary:hover { color: white; }
summary:focus-visible { outline: 2px solid #168b98; outline-offset: 2px; }
.nav-group summary:focus-visible { outline-color: #76d4d6; outline-offset: -2px; }
.breadcrumbs { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.breadcrumbs span { margin: 0 5px; color: #70878b; }
.mode-note { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #fff6df; border: 1px solid #eedaa8; border-radius: 6px; color: #714604; font-size: 12px; line-height: 1.4; }
.mode-note::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #ad710d; }
.login-brand { margin: 12px 0 3px; font-weight: 700; color: var(--accent); }
.finance-nav { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; margin: 0 0 15px; border-block-end: 1px solid var(--line); }
.finance-nav > a, .nav-menu summary { display: flex; align-items: center; min-height: 38px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.finance-nav > [aria-current], .finance-nav .selected summary { color: #076776; box-shadow: inset 0 -3px var(--accent); background: #e2f1f0; }
.nav-menu { position: relative; }
.nav-menu summary::after { content: '▾'; color: var(--muted); margin-left: 6px; }
.nav-menu[open] summary { background: var(--accent-soft); }
.nav-menu > div { position: absolute; left: 0; top: 100%; z-index: 15; padding: 5px; background: white; min-width: 190px; width: max-content; max-width: min(290px,90vw); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 18px #17374421; }
.nav-menu a { display: block; padding: 9px 11px; font-size: 13px; color: var(--ink); border-radius: 4px; }
.nav-menu a:hover, .nav-menu a[aria-current] { background: var(--accent-soft); color: #045b64; }
.export-menu summary { border: 1px solid var(--line); border-radius: 6px; }
.registry-filter > form > .form-grid { grid-template-columns: 2fr repeat(3,minmax(0,1fr)); }
.issuer-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(180px,100%),1fr)); gap: 8px; }
.issuer-list a { display: grid; align-content: start; gap: 10px; height: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #f7fafb; color: var(--ink); }
.issuer-list a:hover, .issuer-list a[aria-current] { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.issuer-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.advanced, .permission-panel fieldset { min-inline-size: 0; }
.advanced summary, .critical summary { cursor: pointer; font-weight: 650; }
.permission-panel { margin-bottom: 16px; border-block: 1px solid var(--line); }
.permission-panel summary { padding: 12px 0; }
.permission-panel fieldset { border: 1px solid var(--line); padding: 12px 12px 0; margin: 8px 0 12px; border-radius: 7px; }
.permission-panel legend { padding: 0 5px; font-weight: 600; }
.count { display: inline-block; min-width: 1.5em; padding: 1px 5px; text-align: center; color: var(--muted); background: #eaf1f2; border-radius: 4px; font-size: 12px; }
.critical { border-color: #e7cbd0; }
.critical summary { color: var(--danger); }
.critical[open] summary, .advanced.card[open] summary { margin-bottom: 15px; }
.day-bar, .day-select, .day-select form, .day-title, .day-lesson, .lesson-action { display: flex; align-items: center; gap: 9px; }
.day-bar { justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.day-title h2, .day-select .field { margin: 0; }
.day-title span, .lesson-time span, .lesson-info p, .lesson-counts span { color: var(--muted); font-size: 13px; }
.day-select form { align-items: end; }
.day-select .field > span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.day-step { display: grid; place-items: center; width: 36px; height: 38px; font-size: 22px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 6px; }
.day-lesson { padding: 12px 0; border-top: 1px solid var(--line); gap: clamp(12px,2vw,30px); }
.day-lesson:last-child { padding-bottom: 2px; }
.lesson-time, .lesson-counts { display: grid; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lesson-time strong { font-size: 20px; }
.lesson-info { flex: 1; min-width: 0; }
.lesson-info h3, .lesson-info p { margin: 0; overflow-wrap: anywhere; }
.lesson-info .badges { margin: 4px 0 0; }
.lesson-action { flex-wrap: wrap; }
.card .empty { padding: 16px; }
.card form > .actions, .card .actions { row-gap: 6px; }
.topbar .global-search { max-width: 460px; }
main .notice.error { border-inline-start: 3px solid var(--danger); }
main form { min-width: 0; }
[data-document-profile] > p { margin: 4px 0; }
@media (min-width: 901px) {
  .content > .card:has(> form:only-child):not(.registry-filter):not(:has(table)) { max-width: 1060px; }
  .day-list h2 { margin-bottom: 9px; }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: nowrap; gap: 6px; min-height: 48px; padding: 6px 10px; }
  .topbar .global-search { order: 0; flex: 1; min-width: 0; max-width: none; }
  .topbar-actions { gap: 1px; }
  .topbar-actions .quiet { padding: 6px; }
  .registry-filter > form > .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .day-lesson { flex-wrap: wrap; }
  .nav-group summary, .nav-group > a { min-height: 40px; }
  .nav-group summary { font-size: 13px; }
}
@media (max-width: 580px) {
  .finance-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; border: 0; }
  .finance-nav > a, .finance-nav summary { border: 1px solid var(--line); background-color: white; border-radius: 5px; padding: 6px 8px; justify-content: space-between; font-size: 12px; }
  .finance-nav > .nav-menu:nth-child(even) > div { left: auto; right: 0; }
  .registry-filter > form > .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .registry-filter > form > .form-grid > :first-child, .registry-filter > form > .form-grid > :nth-child(2) { grid-column: 1 / -1; }
  .day-select { width: 100%; gap: 6px; }
  .day-select form { flex: 1; }
  .day-select .field { flex: 1; }
  .day-lesson { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 12px; }
  .lesson-time { align-self: start; }
  .lesson-counts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 7px; font-size: 12px; }
  .lesson-action { grid-column: 1 / -1; margin-top: 4px; }
  .lesson-action .button { flex: 1; }
  .content > .today-summary { display: flex; }
  .today-summary .button { font-size: 12px; min-height: 34px; padding: 5px 8px; }
  .day-title span { margin-inline-start: auto; }
  .issuer-list { grid-template-columns: 1fr; }
  .issuer-list a { display: flex; align-items: center; justify-content: space-between; }
}
@media (max-width: 900px) and (scripting: none) {
  .app-layout { display: block; }
  .sidebar { position: static; transform: none; width: 100%; max-height: 42vh; }
  .sidebar .brand, .sidebar-foot, .sidebar-close, [data-menu] { display: none; }
}
@media print {
  .sidebar, .topbar, .site-footer, .no-print, .actions, .toolbar, .flow-close { display: none !important; }
  .main-area { margin: 0; width: 100%; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; margin-bottom: 20px; }
  .table-wrap, .table-scroll { overflow: visible; border: 0; }
  table { font-size: 10px; }
  th, td { padding: 6px 7px; }
  .print-only { display: block; }
  .journal th:first-child, .journal td:first-child { position: static; }
  .badge { border: 1px solid #aaa; }
  body { background: #fff; }
  .flow-panel:modal { position: static; box-shadow: none; width: 100%; height: auto; max-height: none; border: 0; }
}

/* RC19: preserve full reconciliation identifiers without expanding the page. */
.reconciliation-fields { min-inline-size: 0; max-inline-size: 100%; }
.reconciliation-fields legend, .reconciliation-fields .checkbox span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

.history-source { overflow-wrap: anywhere; }

/* RC32: readable long integration identifiers on narrow screens. */
.integration-uri{overflow-wrap:anywhere;word-break:break-word;}

.today-more { margin-top: 12px; }
.today-more summary { cursor: pointer; color: var(--accent); padding: 8px 0; }
.today-more .actions { margin-top: 8px; }

.edit-card { position: relative; max-width: 960px; }
.edit-card form > .form-grid:first-of-type { padding-inline-end: 35px; }
.edit-close { position: absolute; inset: 8px 8px auto auto; display: grid; place-items: center; width: 30px; height: 30px; font-size: 23px; border-radius: 5px; }
.edit-close:hover { background: var(--accent-soft); text-decoration: none; }
@media (max-width: 580px) { .edit-card form > .form-grid:first-of-type { padding-inline-end: 0; } .edit-card { padding-top: 40px; } }

.login-layout > .mode-note { position: absolute; left: clamp(12px, 3vw, 32px); top: 16px; margin: 0; max-width: calc(100% - 115px); }
.sidebar-foot a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.content fieldset { min-inline-size: 0; }
