:root {
  --navy: #142b43;
  --navy2: #203e5d;
  --ink: #172e46;
  --muted: #627487;
  --line: #dce3eb;
  --bg: #f3f6fa;
  --white: #fff;
  --accent: #e38b48;
  --blue: #2861a4;
  --danger: #ae313d;
  --green: #277559;
  --shadow: 0 8px 30px #1b355c0c;
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}
/* The daily workflow uses the same visual language as the task register. */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.project-progress {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.project-progress progress {
  width: 100%;
  height: 10px;
  accent-color: var(--blue);
}
.source-quote {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0;
  padding: 14px 18px;
  background: #f0f5fa;
  border-left: 3px solid var(--blue);
  line-height: 1.55;
}
.source-preview,
.source-block pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.6;
  max-height: 280px;
  overflow: auto;
  padding: 14px;
  background: #f3f6fa;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.source-block {
  padding-top: 20px;
}
.draft-card .section-head {
  align-items: flex-start;
}
.draft-card .checkbox {
  align-items: flex-start;
}
@media (max-width: 850px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}
[hidden] {
  display: none !important;
}
.sidebar {
  overflow-y: auto;
}
.sidebar .nav button {
  padding-top: 9px;
  padding-bottom: 9px;
}
.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 1.2px;
  color: var(--blue);
  margin-bottom: 8px;
}
.rhythm-strip {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 22px;
}
.rhythm-strip strong {
  font-weight: 600;
  font-size: 1.12rem;
}
.three-queues {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}
.queue-tile {
  border: 1px solid var(--line);
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 20px;
  border-radius: 8px;
}
.queue-tile small {
  color: #c6d5e5;
}
.queue-tile strong {
  display: block;
  font-size: 1.75rem;
  margin: 12px 0;
  font-weight: 550;
}
.queue-tile strong span {
  font-size: 0.8rem;
  color: #c6d5e5;
}
.queue-tile p {
  font-size: 0.9rem;
}
.work-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.work-row:last-child {
  border-bottom: 0;
}
.work-row-main {
  flex: 1;
  min-width: 0;
}
.work-row .task-link {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.work-row .task-link:hover {
  color: var(--blue);
}
.work-row .meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 8px;
  line-height: 1.5;
}
.work-row .next-line {
  margin: 10px 0 6px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.work-row .reason {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 8px;
}
.work-row-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}
.time-slot {
  width: 66px;
  flex-shrink: 0;
}
.time-slot strong {
  color: var(--blue);
  font-size: 0.95rem;
}
.time-slot small {
  display: block;
  margin-top: 5px;
}
.triage-source {
  padding: 18px;
  background: #f3f6fa;
  border-radius: 6px;
}
.triage-source h3 {
  line-height: 1.55;
}
.method-status {
  padding: 14px 16px;
  background: #edf3fa;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-bottom: 15px;
}
.method-status small {
  flex: 1;
}
.detail-actions {
  margin-bottom: 18px;
}
.method-sheet {
  max-width: 850px;
}
.method-sheet ol {
  padding-left: 23px;
  line-height: 1.7;
}
.method-sheet li {
  margin: 14px 0;
}
@media (max-width: 850px) {
  .rhythm-strip {
    align-items: flex-start;
    flex-direction: column;
  }
  .three-queues {
    gap: 10px;
  }
  .queue-tile {
    padding: 14px;
  }
  .work-row-actions {
    max-width: 135px;
  }
}
@media (max-width: 600px) {
  .three-queues {
    grid-template-columns: 1fr;
  }
  .queue-tile strong {
    display: inline;
    margin-right: 12px;
  }
  .queue-tile small {
    display: block;
    margin-bottom: 12px;
  }
  .queue-tile p {
    display: inline;
  }
  .work-row {
    flex-wrap: wrap;
    padding: 16px;
  }
  .work-row-actions {
    flex-direction: row;
    max-width: none;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
  }
  .method-status {
    display: grid;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #70a9ef;
  outline-offset: 3px;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 1.9rem;
  letter-spacing: -0.6px;
  font-weight: 650;
}
h2 {
  font-size: 1.12rem;
  font-weight: 650;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.55;
}
small {
  font-size: 0.8rem;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.boot {
  padding: 10vh;
  text-align: center;
}
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 30px 18px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 12px 28px;
}
.brand img {
  width: 36px;
  height: 36px;
}
.brand strong {
  font-size: 1.15rem;
}
.brand span {
  display: block;
  color: #b3c5d5;
  font-size: 0.8rem;
  margin-top: 5px;
  letter-spacing: 1.2px;
}
.nav-label {
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 0.75rem;
  color: #9bb2c8;
  padding: 18px 14px 10px;
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  border: 0;
  background: none;
  color: #c6d5e5;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border-radius: 7px;
  padding: 12px 14px;
  font-size: 0.93rem;
}
.nav button:hover {
  background: #ffffff0a;
  color: #fff;
}
.nav button.active {
  background: #ffffff12;
  color: #fff;
  box-shadow: inset 3px 0 var(--accent);
}
.nav .nicon {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav .count {
  margin-left: auto;
  font-size: 0.75rem;
  background: #36516c;
  border-radius: 5px;
  padding: 2px 6px;
}
.side-bottom {
  margin-top: auto;
  padding: 20px 12px 0;
  border-top: 1px solid #ffffff15;
}
.side-bottom .name {
  font-size: 0.9rem;
  color: #fff;
  overflow-wrap: anywhere;
}
.side-bottom small {
  color: #b3c5d5;
  display: block;
  margin: 6px 0 12px;
}
.side-bottom button {
  font-size: 0.85rem;
  background: transparent;
  border: 0;
  color: #b3c5d5;
  padding: 0;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 74px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.topbar .context {
  font-size: 0.9rem;
  color: var(--muted);
}
.topbar strong {
  color: var(--ink);
  font-weight: 600;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-actions span {
  font-size: 0.8rem;
  color: var(--muted);
}
.content {
  padding: 32px 36px 46px;
  max-width: 1600px;
  margin: auto;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.pagehead p {
  color: var(--muted);
  font-size: 0.93rem;
  margin-top: 7px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 15px;
  font-size: 0.88rem;
  font-weight: 550;
  text-decoration: none;
  line-height: 1.3;
}
.btn:hover {
  border-color: #9cacbf;
  background: #f7f9fc;
}
.btn.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn.primary:hover {
  background: var(--navy2);
}
.btn.danger {
  color: var(--danger);
  border-color: #e2b5ba;
}
.btn.small {
  padding: 7px 10px;
  font-size: 0.8rem;
}
.btn.ghost {
  background: none;
  border-color: transparent;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.stat {
  padding: 19px 20px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  text-align: left;
  box-shadow: var(--shadow);
}
.stat span {
  font-size: 0.87rem;
  color: var(--muted);
  display: block;
}
.stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  margin-top: 9px;
}
.stat small {
  display: block;
  margin-top: 7px;
}
.stat.urgent strong {
  color: var(--danger);
}
.stat:hover {
  border-color: #9bb1ca;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}
.section-head p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 5px;
}
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.focus-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  min-height: 168px;
  text-align: left;
  position: relative;
  box-shadow: var(--shadow);
}
.focus-card .number {
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 13px;
  display: block;
}
.focus-card h3 {
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.focus-card .foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.focus-card.empty-focus {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}
.empty-focus h3 {
  color: var(--muted);
  font-weight: 400;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-body {
  padding: 20px;
}
.task-line {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  padding: 17px 20px;
  background: #fff;
  color: var(--ink);
}
.task-line:last-child {
  border-bottom: 0;
}
.task-line:hover {
  background: #f8faff;
}
.task-line .tl-top {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.task-line strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 550;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.task-line .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 9px;
  font-size: 0.8rem;
  color: var(--muted);
}
.task-line .reason {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--danger);
}
.tag {
  display: inline-block;
  white-space: nowrap;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 0.76rem;
  line-height: 1.25;
  font-weight: 550;
  background: #eef2f7;
  color: #536980;
}
.tag.inbox {
  background: #eaf1fc;
  color: #376495;
}
.tag.ready {
  background: #e9f1f4;
  color: #346c79;
}
.tag.working {
  background: #eaf0fb;
  color: #446b9e;
}
.tag.waiting {
  background: #fff2df;
  color: #865f26;
}
.tag.review {
  background: #f2ebfc;
  color: #73549a;
}
.tag.done {
  background: #e7f4ed;
  color: #287453;
}
.tag.archived {
  background: #eee;
  color: #6d7680;
}
.tag.high,
.tag.critical {
  background: #fcebee;
  color: #a82f40;
}
.empty {
  padding: 30px 20px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
.empty strong {
  color: var(--ink);
  display: block;
  font-weight: 550;
  margin-bottom: 6px;
}
.notice {
  padding: 13px 16px;
  border: 1px solid #d4e3f4;
  background: #f0f6fd;
  color: #355b84;
  border-radius: 6px;
  font-size: 0.87rem;
  line-height: 1.5;
  margin-bottom: 18px;
}
.notice.warning {
  background: #fff7e9;
  border-color: #ecd6ae;
  color: #7d5e29;
}
.notice.error {
  background: #fff0f1;
  border-color: #e9bec4;
  color: var(--danger);
}
.notice.success {
  background: #edf7f1;
  color: var(--green);
  border-color: #c9e3d4;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters input {
  flex: 1;
  min-width: 220px;
}
.filters select {
  min-width: 150px;
}
input,
select,
textarea {
  border: 1px solid #cdd7e2;
  border-radius: 5px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  min-height: 41px;
  max-width: 100%;
  font-size: 0.92rem;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f1f4f7;
  color: #607184;
}
textarea {
  resize: vertical;
  line-height: 1.5;
  min-height: 90px;
}
label {
  font-size: 0.85rem;
  font-weight: 550;
  display: grid;
  gap: 7px;
  align-content: start;
}
label small {
  font-weight: 400;
}
input[type="checkbox"] {
  min-height: 18px;
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 400;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.field-group {
  margin: 22px 0;
  border: 0;
  padding: 0;
}
.field-group legend {
  font-weight: 650;
  font-size: 1rem;
  margin-bottom: 15px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}
th {
  text-align: left;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 15px 16px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
td.titlecell {
  min-width: 270px;
  max-width: 500px;
}
td .task-link {
  padding: 0;
  border: 0;
  color: var(--ink);
  background: none;
  text-align: left;
  font-weight: 550;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
td .task-link:hover {
  color: var(--blue);
}
td small {
  display: block;
  margin-top: 6px;
}
td.nowrap {
  white-space: nowrap;
}
.overdue {
  color: var(--danger);
}
.table-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pills button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.87rem;
  color: var(--muted);
}
.pills .selected {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
dialog {
  border: 0;
  padding: 0;
  width: min(920px, calc(100% - 32px));
  max-height: 94vh;
  border-radius: 10px;
  box-shadow: 0 22px 100px #051c3d40;
  color: var(--ink);
}
dialog::backdrop {
  background: #132b4680;
  backdrop-filter: blur(2px);
}
/* Keep dialog actions visible while its content scrolls independently. */
html {
  scrollbar-gutter: stable;
}
html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}
#modal[open] {
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 24px);
  max-height: calc(var(--modal-viewport-height, 100dvh) - 24px);
  overflow: hidden;
  overscroll-behavior: contain;
}
#modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-height: inherit;
  overflow: hidden;
}
#modal-content > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#modal .modal-head,
#modal .modal-footer,
#modal-content > .tabs {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  z-index: 2;
}
#modal .modal-head > :first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
#modal .modal-head > button {
  flex-shrink: 0;
}
#modal-content > .modal-body,
#modal-content > form > .modal-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-block: 16px;
}
#modal .modal-body :is(label, fieldset, .form-grid, .form-grid > *, .stack, .notice, .section-head > *) {
  min-width: 0;
  max-width: 100%;
}
#modal .modal-body :is(p, li, h2, h3, small, label, a, strong, .text-block, .form-error, .notice) {
  overflow-wrap: anywhere;
}
#modal :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
#modal .modal-footer {
  align-items: center;
  flex-wrap: wrap;
}
#modal .modal-footer > small {
  flex: 1 1 220px;
  min-width: 0;
  overflow-wrap: anywhere;
}
#modal .modal-footer :is(.btn, button) {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
#modal .modal-footer > .actions {
  min-width: 0;
  max-width: 100%;
}
#modal .table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: auto;
}
#modal .table-wrap > table {
  min-width: 520px;
}
#modal td {
  overflow-wrap: anywhere;
}
#modal pre {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#modal .tabs {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
#modal .form-error:focus {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}
.modal-head {
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.modal-head h2 {
  font-size: 1.2rem;
}
.modal-head small {
  display: block;
  margin-top: 6px;
}
.modal-body {
  padding: 22px 26px;
}
.modal-footer {
  padding: 16px 26px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.form-error {
  color: var(--danger);
  background: #fff2f3;
  padding: 12px;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}
.form-error:empty {
  display: none;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
}
.login-aside {
  background: var(--navy);
  color: #fff;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-aside .brand {
  padding: 0;
}
.login-aside h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  max-width: 420px;
  font-weight: 550;
  margin-bottom: 25px;
}
.login-aside p {
  color: #b9cbdc;
  max-width: 380px;
  line-height: 1.8;
}
.login-aside .edition {
  font-size: 0.8rem;
  color: #91aac2;
  margin-top: 35px;
}
.login-main {
  padding: 50px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  width: 100%;
  max-width: 480px;
}
.login-box h2 {
  font-size: 1.55rem;
  margin-bottom: 10px;
}
.login-box > p {
  color: var(--muted);
  margin-bottom: 27px;
}
.login-box label {
  margin-bottom: 17px;
}
.login-box .btn.primary {
  width: 100%;
  padding: 13px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 25px #0003;
  z-index: 20;
  max-width: min(600px, 90vw);
  font-size: 0.91rem;
  line-height: 1.5;
}
.toast.error {
  background: #922e3d;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--line);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.calendar .weekday {
  background: #f5f7fb;
  padding: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
.day {
  background: #fff;
  min-height: 135px;
  padding: 10px;
}
.day.outside {
  background: #f7f9fc;
}
.day.today {
  box-shadow: inset 0 3px var(--accent);
}
.day .date-num {
  font-size: 0.87rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.cal-task {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.75rem;
  border: 0;
  background: #ecf2fa;
  color: var(--navy);
  padding: 7px;
  border-radius: 3px;
  margin: 5px 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.cal-task.control {
  background: #fff2df;
}
.review-steps {
  counter-reset: steps;
}
.review-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.review-row .step {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.review-row p {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 4px;
}
.checklist {
  padding-left: 22px;
  line-height: 1.8;
  color: var(--muted);
}
.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.comment p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  margin-top: 6px;
}
.audit-detail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 700px;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
}
.tabs button {
  background: transparent;
  border: 0;
  padding: 15px 13px;
  font-size: 0.86rem;
  color: var(--muted);
}
.tabs .active {
  box-shadow: inset 0 -2px var(--navy);
  color: var(--navy);
  font-weight: 600;
}
.spacer {
  margin-top: 22px;
}
.stack {
  display: grid;
  gap: 14px;
}
.file-list {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}
.file-list a {
  font-size: 0.9rem;
}
.mobile-title {
  display: none;
}
.inline-link {
  border: 0;
  background: none;
  color: var(--blue);
  padding: 0;
  font-size: 0.85rem;
}
.print-only {
  display: none;
}
.nowrap {
  white-space: nowrap;
}
.mt {
  margin-top: 18px;
}
.text-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tight {
  margin-bottom: 0;
}
.badge-num {
  padding: 3px 7px;
  font-size: 0.8rem;
  border-radius: 4px;
  background: #eef2f7;
  color: var(--muted);
}
@media (min-width: 1600px) {
  .content {
    padding-top: 40px;
  }
  .stats {
    gap: 20px;
  }
  .focus-grid {
    gap: 20px;
  }
  .two-col {
    gap: 24px;
  }
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .content {
    padding: 25px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .focus-card {
    padding: 16px;
  }
  .focus-grid {
    gap: 10px;
  }
  .calendar {
    grid-template-columns: repeat(7, minmax(130px, 1fr));
  }
  .calendar-scroll {
    overflow: auto;
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }
  .brand {
    padding: 0 0 16px;
  }
  .brand span {
    font-size: 0.7rem;
  }
  .nav-label,
  .side-bottom {
    display: none;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding: 3px;
  }
  .nav button {
    width: auto;
    white-space: nowrap;
    padding: 10px;
  }
  .nav .nicon {
    display: none;
  }
  .sidebar .nav-label.secondary {
    display: none;
  }
  .topbar {
    padding: 10px 16px;
    height: auto;
    min-height: 60px;
  }
  .topbar .context {
    font-size: 0.75rem;
  }
  .top-actions > span {
    display: none;
  }
  .content {
    padding: 24px 16px;
  }
  .pagehead {
    align-items: flex-start;
  }
  .pagehead h1 {
    font-size: 1.55rem;
  }
  .pagehead p {
    font-size: 0.85rem;
  }
  .pagehead .btn {
    font-size: 0.8rem;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .focus-grid {
    grid-template-columns: 1fr;
  }
  .focus-card {
    min-height: 120px;
  }
  .focus-card h3 {
    margin-bottom: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .two-col {
    gap: 0;
  }
  .login-page {
    display: block;
  }
  .login-aside {
    padding: 28px;
  }
  .login-aside h1 {
    font-size: 1.6rem;
    margin-top: 20px;
    margin-bottom: 12px;
  }
  .login-aside p,
  .login-aside .edition {
    display: none;
  }
  .login-main {
    padding: 30px 22px;
  }
  .modal-head,
  .modal-body,
  .modal-footer {
    padding: 18px;
  }
  .modal-footer {
    flex-wrap: wrap;
  }
  #modal[open] {
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(var(--modal-viewport-height, 100dvh) - 16px);
    border-radius: 8px;
  }
  #modal .modal-head,
  #modal .modal-body,
  #modal .modal-footer {
    padding: 14px;
  }
  #modal .modal-head h2 {
    font-size: 1.05rem;
  }
  #modal .modal-footer > .actions {
    flex: 1 1 auto;
  }
  #modal .modal-footer .btn {
    min-height: 40px;
  }
  .review-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }
  .review-row .btn {
    grid-column: 2;
    justify-self: start;
  }
  .tabs {
    padding: 0 12px;
    overflow: auto;
  }
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .filters input {
    grid-column: 1/-1;
    min-width: 0;
  }
  .filters select {
    min-width: 0;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions .btn {
    font-size: 0.78rem;
  }
}
@media (max-height: 520px) {
  #modal .modal-head,
  #modal .modal-footer {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  #modal .modal-head h2 {
    font-size: 1rem;
  }
  #modal .modal-head small {
    margin-top: 3px;
  }
  #modal .modal-footer > small {
    display: none;
  }
}
@media print {
  .sidebar,
  .topbar,
  .pagehead .actions,
  .filters,
  .btn,
  .pills,
  .toast,
  dialog {
    display: none !important;
  }
  .layout {
    display: block;
  }
  .content {
    padding: 0;
    max-width: none;
  }
  .panel,
  .stat,
  .focus-card {
    break-inside: avoid;
    box-shadow: none;
  }
  .print-only {
    display: block;
  }
  .two-col {
    display: block;
  }
  body {
    background: #fff;
  }
  .pagehead {
    margin-top: 0;
  }
  .task-line {
    break-inside: avoid;
  }
}

/* Directory fields: search and selection are separate, stable controls. */
.reference-field { display:flex; flex-direction:column; gap:7px; min-width:0; }
.reference-field > label { margin:0; }
.reference-field > input[type=search] { min-width:0; width:100%; font-size:13px; padding:8px 10px; }
.reference-field > select { width:100%; min-width:0; }
.reference-note { min-height:1em; line-height:1.45; color:var(--muted,#667085); }
.reference-manual { font-size:12px; font-weight:400; }
.reference-tools { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line,#e4e7ec); }
.reference-tools small { width:100%; }
.reference-checklist { max-height:220px; overflow:auto; border:1px solid var(--line,#e4e7ec); border-radius:8px; padding:8px 10px; background:#fff; }
.reference-checklist label { padding:6px 0; font-size:13px; font-weight:400; }
.reference-checklist input { flex:0 0 auto; }
.reference-checklist span { overflow-wrap:anywhere; }
.reference-field [hidden] { display:none!important; }

#legacy-csv-fields {border:1px solid var(--line);padding:16px;border-radius:8px;}
.focus-section{margin:22px 0}.focus-card .inline-link{text-align:left;white-space:normal;overflow-wrap:anywhere}.focus-complete{border-color:#6ea68c;background:#f0f8f3}.focus-check{display:flex;align-items:center;gap:8px;margin-top:12px}.focus-check input{width:18px;height:18px}.focus-card{overflow-wrap:anywhere}.focus-card .foot{flex-wrap:wrap;gap:8px}.field-group details{margin-top:10px}.field-group summary{cursor:pointer;color:#426479}

.triage-deadline-reason{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}.triage-deadline-reason .triage-commit{margin:0}@media(max-width:600px){.triage-deadline-reason{grid-template-columns:1fr}}
