@font-face {
  font-family: BeVietnam;
  src: url("/assets/fonts/BeVietnamPro-Regular.ttf");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: BeVietnam;
  src: url("/assets/fonts/BeVietnamPro-Medium.ttf");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: BeVietnam;
  src: url("/assets/fonts/BeVietnamPro-SemiBold.ttf");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: BeVietnam;
  src: url("/assets/fonts/BeVietnamPro-Bold.ttf");
  font-weight: 700;
  font-display: swap;
}
:root {
  --red: #a32027;
  --red-dark: #811b21;
  --red-light: #f9edef;
  --gold: #d5ad48;
  --gold-light: #fff8e5;
  --ink: #202630;
  --muted: #505c6b;
  --border: #b7c0cc;
  --canvas: #f5f6f8;
  --white: #fff;
  --green: #13795c;
  --blue: #356aab;
  --radius: 12px;
  --sidebar: 252px;
  font-family: BeVietnam, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: var(--red);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c7903d;
  outline-offset: 3px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
p {
  line-height: 1.8;
}
small {
  font-size: 12px;
}
svg.icon {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
  vertical-align: middle;
  stroke: currentColor;
  stroke-width: 1.65;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  background: white;
  z-index: 200;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar);
  position: fixed;
  inset: 0 auto 0 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 22px 25px;
  border-bottom: 1px solid var(--border);
}
.brand img {
  width: 49px;
  height: 49px;
  object-fit: contain;
}
.brand span {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--muted);
  display: block;
  white-space: nowrap;
}
.brand strong {
  font-size: 15px;
  display: block;
  color: var(--red);
  margin-top: 3px;
  letter-spacing: 0.2px;
}
.brand small {
  font-size: 10px;
  display: block;
  margin-top: 2px;
  color: #6d727b;
}
.navigation {
  padding: 16px 14px;
  overflow-y: auto;
  flex: 1;
}
.nav-label {
  display: block;
  color: #969ca6;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 18px 12px 9px;
}
.nav-label:first-child {
  margin-top: 4px;
}
.nav-link {
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: 7px;
  color: #626b78;
  padding: 10px 12px;
  margin: 3px 0;
  font-size: 13px;
  font-weight: 500;
}
.nav-link:hover {
  background: #f6f6f8;
  text-decoration: none;
  color: var(--ink);
}
.nav-link.active {
  background: var(--red-light);
  color: var(--red);
  font-weight: 600;
}
.nav-link .icon {
  height: 18px;
  width: 18px;
}
.sidebar-foot {
  padding: 18px 23px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.sidebar-foot .small-brand {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #727a86;
}
.dot {
  height: 7px;
  width: 7px;
  display: inline-block;
  background: #228466;
  border-radius: 50%;
}
.workspace {
  margin-left: var(--sidebar);
  width: calc(100% - var(--sidebar));
  min-width: 0;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  gap: 16px;
}
.breadcrumbs {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
}
.breadcrumbs .icon {
  height: 15px;
  width: 15px;
}
.top-actions {
  display: flex;
  gap: 17px;
  align-items: center;
}
.year-chip {
  font-size: 11px;
  color: #59616d;
  padding: 6px 11px;
  background: #f6f7f9;
  border: 1px solid var(--border);
  border-radius: 5px;
  white-space: nowrap;
}
.icon-button {
  border: 0;
  background: transparent;
  padding: 7px;
  color: #626b78;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.icon-button:hover {
  background: var(--canvas);
}
.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  color: var(--ink);
}
.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #f3e7e4;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  flex-shrink: 0;
}
.account-button strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
}
.account-button small {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.mobile-menu {
  display: none;
}
.main {
  max-width: 1640px;
  margin: 0 auto;
  padding: 32px 34px 22px;
  min-height: calc(100vh - 76px);
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.page-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #858d98;
  margin-bottom: 7px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid var(--border);
  background: white;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
  background: #f8f9fb;
  border-color: #cbd0d8;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}
.btn-danger {
  color: var(--red);
  background: #fff;
}
.btn-small {
  font-size: 11px;
  min-height: 31px;
  padding: 5px 10px;
}
.btn-ghost {
  border: 0;
  background: transparent;
  color: var(--red);
  padding: 5px;
  min-height: 28px;
}
.btn-green {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.muted {
  color: var(--muted);
}
.text-small {
  font-size: 12px;
}
.text-red {
  color: var(--red);
}
.text-green {
  color: var(--green);
}
.text-right {
  text-align: right;
}
.strong {
  font-weight: 600;
}
.nowrap {
  white-space: nowrap;
}
.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.section-gap {
  margin-top: 22px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 23px;
}
.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 21px;
  position: relative;
}
.stat .stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
}
.stat-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f4f1ed;
  color: #a17e40;
}
.stat:nth-child(2) .stat-icon {
  background: #edf5f2;
  color: #39866d;
}
.stat:nth-child(3) .stat-icon {
  background: #eef2fa;
  color: #5881bb;
}
.stat:nth-child(4) .stat-icon {
  background: var(--red-light);
  color: var(--red);
}
.stat-value {
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -1.4px;
  line-height: 1.4;
}
.stat-sub {
  font-size: 10px;
  color: #9298a2;
  margin-top: 8px;
}
.stat-sub .icon {
  width: 12px;
  height: 12px;
  margin-right: 3px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-header {
  padding: 21px 23px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-header p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.panel-header h2 {
  font-size: 15px;
}
.panel-body {
  padding: 0 23px 23px;
}
.panel-pad {
  padding: 23px;
}
.panel-footer {
  padding: 13px 23px;
  background: #fcfcfd;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  padding: 0 23px;
  overflow: auto;
}
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  padding: 12px 0;
  font-size: 12px;
  white-space: nowrap;
}
.tab.active {
  border-color: var(--red);
  color: var(--red);
  font-weight: 600;
}
.tab-count {
  font-size: 10px;
  background: #f0f2f5;
  color: #717b87;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 23px;
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 11px;
  gap: 8px;
  background: #fff;
  min-width: 210px;
}
.search-box .icon {
  height: 16px;
  width: 16px;
  color: #8c949f;
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 0;
  width: 100%;
  font-size: 12px;
  min-width: 0;
}
.toolbar select {
  font-size: 12px;
  max-width: 220px;
}
.toolbar .search-box {
  flex: 1;
  max-width: 330px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
thead {
  background: #fafbfc;
  color: #7d8591;
  font-size: 10px;
}
th {
  font-weight: 500;
  padding: 12px 18px;
  white-space: nowrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 16px 18px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-left: 23px;
}
th:last-child,
td:last-child {
  padding-right: 23px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fdfcfc;
}
td strong {
  font-weight: 500;
  display: block;
}
td small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.table-link {
  color: var(--ink);
  font-weight: 500;
}
.table-link:hover {
  color: var(--red);
}
.badge {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-weight: 500;
  background: #f0f2f5;
  color: #6d7683;
  line-height: 1.5;
}
.badge::before {
  content: "";
  height: 4px;
  width: 4px;
  background: currentColor;
  border-radius: 50%;
}
.badge.green {
  color: #258465;
  background: #edf7f2;
}
.badge.gold {
  color: #a47724;
  background: #fff7e5;
}
.badge.blue {
  color: #467bad;
  background: #eff5fc;
}
.badge.red {
  color: #a93c43;
  background: #fbefef;
}
.badge.purple {
  color: #78609c;
  background: #f3eff9;
}
.badge.gray {
  color: #717985;
  background: #f0f2f5;
}
.empty {
  padding: 42px 24px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.empty-mark {
  margin: 0 auto 14px;
  width: 48px;
  height: 48px;
  border: 1px solid #eee6dc;
  background: #faf7f2;
  color: #b39b6a;
  border-radius: 13px;
  display: grid;
  place-items: center;
}
.empty h3 {
  font-size: 14px;
}
.empty p {
  color: var(--muted);
  font-size: 12px;
  margin: 9px 0 17px;
}
.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mini-list li {
  padding: 15px 0;
  border-bottom: 1px solid #f0f1f4;
}
.mini-list li:first-child {
  padding-top: 0;
}
.mini-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.list-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.list-icon {
  padding: 8px;
  background: #f7f3ef;
  color: #ac8650;
  display: inline-flex;
  border-radius: 7px;
}
.list-icon .icon {
  height: 16px;
  width: 16px;
}
.list-row h3 {
  font-size: 12px;
  line-height: 1.7;
  font-weight: 500;
}
.list-row p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.list-row .grow {
  flex: 1;
}
.list-row .icon-arrow {
  color: #b6bcc4;
}
.source-ready {
  background: #fbf8f2;
  border: 1px solid #eee7d9;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 22px 0;
}
.source-ready .icon {
  color: #b08b40;
  margin-top: 2px;
}
.source-ready h3 {
  font-size: 12px;
  color: #7f652e;
  margin-bottom: 4px;
}
.source-ready p {
  font-size: 11px;
  color: #8c7e63;
}
.source-ready .actions {
  margin-left: auto;
}
.distribution {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-top: 5px;
}
.donut {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
}
.donut circle {
  fill: none;
  stroke-width: 13;
}
.donut .track {
  stroke: #f1f2f5;
}
.donut .segment {
  stroke: var(--red);
  stroke-linecap: round;
}
.donut text {
  fill: var(--ink);
  font: 600 20px BeVietnam;
}
.legend {
  flex: 1;
}
.legend-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  padding: 6px 0;
}
.legend-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--red);
}
.legend-dot.gold {
  background: var(--gold);
}
.legend-dot.gray {
  background: #c4cad3;
}
.legend-dot.green {
  background: #258465;
}
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress-row progress {
  width: 85px;
  height: 5px;
}
.progress-row span {
  font-size: 10px;
  color: var(--muted);
}
progress {
  border: 0;
  appearance: none;
  background: #edf0f4;
  border-radius: 8px;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #edf0f4;
  border-radius: 8px;
}
progress::-webkit-progress-value {
  background: var(--red);
  border-radius: 8px;
}
progress::-moz-progress-bar {
  background: var(--red);
}
.page-footer {
  padding: 28px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: #969da7;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.resource-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 230px;
}
.resource-card .resource-type {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.resource-card h3 {
  line-height: 1.7;
  font-size: 14px;
}
.resource-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
  white-space: pre-line;
}
.resource-card .resource-bottom {
  margin-top: auto;
  padding-top: 17px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.resource-card .resource-bottom small {
  font-size: 10px;
  color: var(--muted);
}
.description {
  white-space: pre-line;
  color: var(--muted);
  font-size: 13px;
}
.detail-title {
  font-size: 23px;
}
.back-link {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 15px;
}
.detail-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.detail-meta .icon {
  width: 15px;
  height: 15px;
}
.metrics {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.metric {
  font-size: 11px;
  color: var(--muted);
}
.metric strong {
  display: block;
  font-size: 22px;
  color: var(--ink);
  font-weight: 600;
}
.report-form-table {
  margin-top: 16px;
}
.report-form-table .form-grid {
  padding-top: 16px;
}
.field-note {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  min-width: 0;
}
.form-field.full {
  grid-column: 1/-1;
}
.form-field input,
.form-field select,
.form-field textarea,
input.control,
select.control,
textarea.control {
  padding: 9px 11px;
  border: 1px solid #dce0e6;
  border-radius: 6px;
  min-height: 40px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  width: 100%;
  font-weight: 400;
}
.form-field textarea {
  min-height: 100px;
  resize: vertical;
}
.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled {
  background: #f6f7f9;
  color: #7f8791;
}
.required {
  color: var(--red);
}
.form-section {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.form-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.form-section-title {
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 400;
}
.check-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  margin: 10px 0;
}
.check-line input {
  accent-color: var(--red);
  margin-top: 4px;
}
.alert {
  padding: 12px 15px;
  border-radius: 7px;
  background: var(--gold-light);
  border: 1px solid #eee1bd;
  color: #8a682a;
  font-size: 12px;
  margin: 14px 0;
  line-height: 1.8;
}
.alert.error {
  background: #fcf0f0;
  border-color: #ecc8ca;
  color: #a22c34;
}
.alert.success {
  background: #eff8f3;
  border-color: #c8e6d7;
  color: #28764f;
}
.alert:empty {
  display: none;
}
.errors-list {
  margin: 0;
  padding-left: 18px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #16202a66;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  backdrop-filter: blur(3px);
}
.modal {
  background: white;
  border: 1px solid #e2e5ea;
  border-radius: 13px;
  box-shadow: 0 25px 100px #10172333;
  width: 620px;
  max-width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.modal.wide {
  width: 960px;
}
.modal-head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h2 {
  font-size: 18px;
}
.modal-content {
  padding: 23px 26px;
  overflow: auto;
  flex: 1;
}
.modal-content h3 {
  margin-bottom: 10px;
}
.modal-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal-content .form-actions {
  margin-bottom: 0;
}
.builder-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 16px;
  padding: 17px;
}
.builder-field {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 70px 70px 32px;
  gap: 9px;
  align-items: end;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.builder-field:last-child {
  border-bottom: 0;
}
.builder-field input,
.builder-field select {
  font-size: 11px;
  padding: 8px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 5px;
  height: 36px;
}
.builder-field label {
  font-size: 10px;
  color: var(--muted);
}
.builder-field input[type="checkbox"] {
  height: 16px;
  width: 16px;
}
.builder-field .icon-button {
  padding: 6px;
}
.unit-picker {
  border: 1px solid var(--border);
  border-radius: 7px;
  max-height: 250px;
  overflow: auto;
  padding: 12px;
}
.unit-picker label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  padding: 6px 4px;
}
.unit-picker input {
  accent-color: var(--red);
}
.unit-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.unit-filter input {
  flex: 1;
}
.picker-result {
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-top: 10px;
}
.picker-option {
  width: 100%;
  display: block;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: white;
  text-align: left;
  padding: 12px;
  font-size: 12px;
}
.picker-option:hover {
  background: var(--red-light);
}
.picker-option strong {
  display: block;
}
.picker-option small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.list-detail {
  padding: 20px 23px;
  border-top: 1px solid var(--border);
}
.list-detail h3 {
  margin-bottom: 10px;
}
.list-detail p {
  font-size: 12px;
  white-space: pre-line;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  padding: 0 0 20px 22px;
  border-left: 1px solid var(--border);
  position: relative;
}
.timeline li::before {
  content: "";
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: var(--gold);
  position: absolute;
  left: -4px;
  top: 6px;
}
.timeline li strong {
  font-weight: 500;
  font-size: 12px;
}
.timeline li p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 23px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.pagination .actions {
  gap: 6px;
}
.loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}
.initial-loader {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  color: var(--muted);
}
.initial-loader img {
  width: 70px;
}
.skeleton {
  height: 16px;
  width: 140px;
  background: #eceff3;
  border-radius: 4px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
#toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 100px);
  transform: translateX(-50%);
  background: #26372e;
  color: white;
  border-radius: 8px;
  padding: 12px 19px;
  font-size: 12px;
  box-shadow: 0 8px 25px #0002;
  z-index: 200;
  max-width: 90vw;
  display: none;
}
#toast.visible {
  display: block;
}
.public-page {
  min-height: 100vh;
  background: #f8f9fb;
}
.public-header {
  height: 92px;
  border-bottom: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5%, 24px);
  gap: 25px;
}
.public-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}
.public-brand img {
  width: 57px;
  height: 57px;
}
.public-brand small {
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
  display: block;
}
.public-brand strong {
  font-size: 17px;
  color: var(--red);
  display: block;
  margin-top: 3px;
}
.public-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 65px 28px;
}
.login-grid {
  display: grid;
  grid-template-columns: 1fr 435px;
  gap: 85px;
  align-items: center;
  min-height: 62vh;
}
.login-intro .eyebrow {
  color: #a28a51;
  margin-bottom: 20px;
}
.login-intro h1 {
  font-size: 39px;
  line-height: 1.5;
  max-width: 530px;
  font-weight: 600;
  letter-spacing: -1px;
}
.login-intro h1 span {
  color: var(--red);
}
.login-intro p {
  font-size: 13px;
  color: var(--muted);
  max-width: 470px;
  margin: 22px 0 30px;
}
.intro-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 12px;
  color: #626c79;
  max-width: 460px;
}
.intro-services div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.intro-services .icon {
  width: 17px;
  color: #b69248;
}
.login-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  box-shadow: 0 12px 45px #28304405;
}
.login-card h2 {
  font-size: 22px;
}
.login-card .form-field {
  margin-top: 19px;
}
.login-card .form-field input {
  min-height: 45px;
}
.login-card .btn-primary {
  width: 100%;
  margin-top: 24px;
  min-height: 44px;
}
.login-card p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.login-card .login-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  font-size: 11px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.public-footer {
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  padding: 22px;
  text-align: center;
  background: white;
}
.public-form {
  max-width: 680px;
  margin: 0 auto;
}
.public-form > .panel {
  margin-top: 25px;
}
.public-form .page-heading {
  text-align: center;
  display: block;
}
.public-form h1 {
  font-size: 28px;
}
.public-nav {
  display: flex;
  gap: 20px;
  font-size: 12px;
}
.public-nav a {
  color: var(--muted);
}
.result-score {
  text-align: center;
  padding: 25px;
  background: #f9f6f0;
  border-radius: 10px;
  margin: 20px 0;
}
.result-score strong {
  font-size: 45px;
  color: var(--red);
  display: block;
  font-weight: 600;
  line-height: 1.3;
}
.result-score p {
  margin: 6px 0;
  font-size: 12px;
}
.review-criterion {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.review-criterion h3 {
  font-size: 13px;
}
.review-criterion .radio-group {
  display: flex;
  gap: 22px;
  margin: 10px 0;
}
.review-criterion .radio-group label {
  font-size: 12px;
}
.review-criterion input {
  accent-color: var(--red);
}
.review-criterion textarea {
  min-height: 65px;
}
.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px 23px;
  gap: 20px;
  border-top: 1px solid var(--border);
}
.detail-summary small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.detail-summary strong {
  font-size: 12px;
  font-weight: 500;
}
.notification-item {
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}
.notification-item h3 {
  font-size: 13px;
}
.notification-item p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0;
}
.file-box {
  border: 1px dashed #cdd2d9;
  padding: 15px;
  border-radius: 8px;
  background: #fafbfc;
  margin: 12px 0;
  font-size: 12px;
}
.file-box input {
  font-size: 11px;
  max-width: 100%;
}
.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.wide-text {
  max-width: 380px;
}
.no-wrap-cell {
  white-space: nowrap;
}
.is-hidden {
  display: none !important;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.rule-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 30px;
  gap: 9px;
  margin: 10px 0;
}
.rule-row input,
.rule-row select {
  font: inherit;
  font-size: 11px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  width: 100%;
}
.type-icon {
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--red-light);
  color: var(--red);
}
.type-icon .icon {
  width: 17px;
  height: 17px;
}
.permission-list {
  font-size: 12px;
  color: var(--muted);
  padding-left: 18px;
  line-height: 2;
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.value-grid div {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.value-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.value-grid strong {
  display: block;
  font-weight: 500;
  font-size: 13px;
  margin-top: 4px;
}
.footer-status {
  display: flex;
  gap: 7px;
  align-items: center;
}
.capsule {
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--muted);
}
.check-table {
  font-size: 11px;
}
.check-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}
.local-badge {
  font-size: 9px;
  color: #8a733a;
  background: #fff8e8;
  border: 1px solid #eee2c2;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
@media (min-width: 1700px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 370px;
  }
  .main {
    padding-top: 38px;
  }
  .stat {
    padding: 23px;
  }
  .stat-value {
    font-size: 36px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 225px;
  }
  .brand {
    padding-left: 17px;
    gap: 9px;
  }
  .brand img {
    width: 42px;
    height: 42px;
  }
  .brand span {
    font-size: 8px;
  }
  .brand strong {
    font-size: 14px;
  }
  .main {
    padding: 27px 23px;
  }
  .topbar {
    padding: 0 23px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 17px;
  }
  .stats-grid {
    gap: 13px;
  }
  .stat {
    padding: 17px;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-button strong {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .login-grid {
    gap: 45px;
  }
  .login-intro h1 {
    font-size: 33px;
  }
}
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid > .stack:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .three-col {
    grid-template-columns: 1fr 1fr;
  }
  .year-chip {
    display: none;
  }
  .detail-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .builder-field {
    grid-template-columns: 1.5fr 1fr 1fr 55px 55px 30px;
    gap: 5px;
  }
  .login-grid {
    grid-template-columns: 1fr 400px;
    gap: 30px;
  }
  .login-intro h1 {
    font-size: 29px;
  }
  .public-brand strong {
    font-size: 15px;
  }
}
@media (max-width: 780px) {
  :root {
    --sidebar: 252px;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 80px #20252e44;
  }
  .workspace {
    width: 100%;
    margin-left: 0;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    height: 66px;
    padding: 0 18px;
  }
  .breadcrumbs {
    font-size: 11px;
  }
  .main {
    padding: 24px 18px;
  }
  .top-actions {
    gap: 10px;
  }
  .top-actions > .icon-button {
    display: none;
  }
  .account-button strong,
  .account-button small {
    display: none;
  }
  .account-button .avatar {
    width: 32px;
    height: 32px;
  }
  .page-heading {
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 22px;
  }
  h1 {
    font-size: 24px;
  }
  .page-heading > .actions {
    width: 100%;
    justify-content: flex-start;
  }
  .dashboard-grid > .stack:last-child {
    grid-template-columns: 1fr 1fr;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .login-intro {
    display: none;
  }
  .login-card {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
  }
  .public-main {
    padding: 40px 20px;
  }
  .public-header {
    height: 85px;
    padding: 0 20px;
  }
  .public-brand img {
    width: 48px;
    height: 48px;
  }
  .public-brand small {
    font-size: 8px;
  }
  .public-brand strong {
    font-size: 13px;
  }
  .public-nav {
    gap: 10px;
    font-size: 11px;
  }
  .public-nav a:not(:last-child) {
    display: none;
  }
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal-head {
    padding: 17px 19px;
  }
  .modal-content {
    padding: 20px 19px;
  }
  .builder-field {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .builder-field > .icon-button {
    justify-self: end;
  }
  .rule-row {
    grid-template-columns: 1fr 1fr;
  }
  .source-ready {
    flex-wrap: wrap;
  }
  .source-ready .actions {
    margin-left: 34px;
  }
  .page-footer {
    flex-wrap: wrap;
  }
  .toolbar {
    padding: 15px 18px;
  }
  .panel-header {
    padding: 19px 18px 15px;
  }
  .panel-body {
    padding: 0 18px 20px;
  }
  #toast {
    left: 50%;
  }
  .resource-card {
    padding: 19px;
  }
  .form-grid {
    gap: 15px;
  }
  .detail-title {
    font-size: 20px;
  }
}

.work-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0;
}
.work-stats > div {
  padding: 22px 26px;
  background: #fff;
  border: 1px solid var(--line, #e5e2dc);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.work-stats span {
  color: #6c6262;
  font-size: 13px;
}
.work-stats strong {
  font-size: 30px;
  color: #8e141b;
}
.work-filter {
  align-items: end;
  margin-bottom: 24px;
}
.work-filter .form-field:first-child {
  flex: 1;
  max-width: 520px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
  gap: 22px;
}
.work-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.work-card-top,
.work-card-meta,
.work-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.work-card h2 {
  font-size: 20px;
  line-height: 1.5;
}
.work-card h2 a {
  color: #352b2b;
}
.work-card p {
  font-size: 13px;
  color: #786f6b;
  line-height: 1.7;
}
.work-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.work-tags span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: #faf3e0;
  color: #705320;
  border: 1px solid #ebdfbf;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 12px;
}
.work-tags svg {
  width: 14px;
  height: 14px;
}
.progress-track {
  height: 6px;
  background: #f0ece7;
  border-radius: 6px;
  overflow: hidden;
  margin-top: auto;
}
.progress-track > span {
  display: block;
  height: 100%;
  background: #9f2029;
}
.work-card-meta,
.work-card-foot small {
  font-size: 12px;
  color: #766a68;
}
.work-card-foot {
  border-top: 1px solid #eee8df;
  padding-top: 16px;
}
.work-card-foot small {
  max-width: 60%;
  line-height: 1.6;
}
.work-task-options {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.work-review {
  flex-wrap: wrap;
  border-top: 1px solid #eee8df;
  border-bottom: 1px solid #eee8df;
}
.work-history > summary {
  padding: 20px;
  cursor: pointer;
  font-weight: 600;
}
.work-task-panel table {
  min-width: 960px;
}
.work-task-panel td:nth-child(2) {
  min-width: 220px;
}
.progress-track {
  width: 100%;
  appearance: none;
  border: 0;
}
.progress-track::-webkit-progress-bar {
  background: #f0ece7;
  border-radius: 6px;
}
.progress-track::-webkit-progress-value {
  background: #9f2029;
  border-radius: 6px;
}
#work-group {
  align-items: end;
}
.tabular-input table {
  min-width: 1800px;
}
.tabular-input input {
  width: 145px;
  min-width: 100px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: white;
}
.tabular-input input[readonly] {
  background: #f5f6f8;
  color: #5c6570;
}
.tabular-input input[data-row-field="book_title"] {
  width: 280px;
}
.main > .panel + .panel {
  margin-top: 20px;
}
.catalog-picker {
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.catalog-picker [data-catalog-book] {
  max-width: 430px;
}
.catalog-picker [data-catalog-search] {
  max-width: 270px;
}
.tabular-input th {
  min-width: 130px;
}
@media (max-width: 780px) {
  .work-stats {
    gap: 8px;
  }
  .work-stats > div {
    padding: 14px;
  }
  .work-stats strong {
    font-size: 24px;
  }
  .work-card {
    padding: 18px;
  }
  .work-review .actions {
    flex-wrap: wrap;
  }
  .work-filter {
    flex-wrap: wrap;
  }
  .work-task-options {
    gap: 12px;
  }
}
.quota-unit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 85px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}
.quota-unit-row label {
  min-width: 0;
}
.quota-unit-row input[type="number"] {
  min-height: 32px;
  padding: 5px 8px;
}
@media (max-width: 500px) {
  .dashboard-grid > .stack:last-child {
    display: flex;
  }
  .stats-grid {
    gap: 11px;
  }
  .stat {
    padding: 15px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-label {
    font-size: 11px;
  }
  .stat-icon {
    width: 27px;
    height: 27px;
  }
  .stat-icon .icon {
    width: 16px;
    height: 16px;
  }
  .stat-sub {
    font-size: 9px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-field.full {
    grid-column: 1;
  }
  .public-brand {
    gap: 9px;
  }
  .public-brand strong {
    max-width: 220px;
    font-size: 12px;
  }
  .public-brand small {
    font-size: 7px;
  }
  .public-nav .btn {
    font-size: 10px;
    padding: 7px 9px;
  }
  .main {
    padding: 20px 14px;
  }
  .panel-header h2 {
    font-size: 14px;
  }
  .topbar {
    padding: 0 14px;
  }
  .local-badge {
    display: none;
  }
  .login-card {
    padding: 25px;
  }
  .intro-services {
    grid-template-columns: 1fr;
  }
  .toolbar select {
    max-width: 100%;
  }
  .toolbar .search-box {
    max-width: none;
  }
  .toolbar > .actions {
    width: 100%;
  }
  .toolbar > .actions > * {
    flex: 1;
  }
  .panel-footer {
    font-size: 10px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }
  .detail-summary {
    gap: 15px;
  }
  .value-grid {
    grid-template-columns: 1fr;
  }
  .form-actions {
    justify-content: stretch;
  }
  .form-actions .btn {
    flex: 1;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .public-form h1 {
    font-size: 24px;
  }
  .panel-pad {
    padding: 19px;
  }
  .source-ready {
    padding: 15px;
  }
  .public-main {
    padding: 30px 15px;
  }
  .tabs {
    padding: 0 18px;
    gap: 18px;
  }
  .breadcrumbs > span:first-child {
    display: none;
  }
}
@media print {
  .sidebar,
  .topbar,
  .actions,
  .page-footer,
  .btn,
  .public-header,
  .public-footer {
    display: none !important;
  }
  .workspace {
    margin: 0;
    width: 100%;
  }
  .main {
    padding: 0;
  }
  .panel {
    border: 0;
  }
  .table-wrap {
    overflow: visible;
  }
  body {
    background: white;
  }
}

@media (max-width: 780px) {
  .sidebar {
    visibility: hidden;
    transition: none;
  }
  .sidebar.open {
    visibility: visible;
  }
}
/* Operational forms and work cards: readable surfaces and clear selection. */
.control,
.form-field input,
.form-field select,
.form-field textarea {
  border-color: #8593a4;
  color: var(--ink);
  background: #fff;
}
input::placeholder,
textarea::placeholder {
  color: #5c6674;
  opacity: 1;
}
.btn {
  border-color: #8995a4;
  color: #293647;
  font-weight: 600;
}
.btn-primary {
  color: #fff;
  border-color: var(--red-dark);
}
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #1e6091;
  outline-offset: 3px;
}
.form-hint,
.description,
.muted {
  color: var(--muted);
}
.form-hint {
  font-size: 13px;
}
.form-field > label,
.builder-field label {
  color: #3d4959;
  font-size: 12px;
}
.builder-field input,
.builder-field select {
  font-size: 13px;
  border-color: #8593a4;
}
.panel-header {
  background: #f5f7fa;
}
.table-wrap th,
thead th {
  color: #354356;
  background: #edf1f6;
}
.work-card {
  border: 2px solid #8d5961;
  border-top: 7px solid var(--red);
  background: linear-gradient(135deg, #fff 55%, #fff5ed);
  box-shadow: 0 5px 18px #4b273214;
}
.work-card[data-template="sgk-2027"] {
  border-color: #7b651f;
  border-top-color: #94700b;
  background: linear-gradient(135deg, #fff 55%, #fff8df);
}
.work-card[data-work-state="open"] {
  border-left: 6px solid #16634d;
}
.work-card[data-work-state="locked"] {
  border-left: 6px solid #3d526b;
}
.work-card h2 a {
  color: #751c26;
}
.work-card p,
.work-card-meta,
.work-card-foot small {
  color: #465061;
}
.work-card .work-tags span {
  color: #624818;
  border-color: #b59a59;
  background: #fff3d2;
  font-weight: 600;
}
.work-card-foot {
  border-top-color: #aab3c1;
}
.work-card-foot .btn {
  background: #fff;
  border: 2px solid #8b2630;
  color: #751c26;
}
.work-task-panel > .panel {
  border: 2px solid #8f6a70;
}
.work-task-panel .panel-header {
  background: #f8ecee;
  border-bottom-color: #ac7e85;
}
.modal.modal-work,
.modal.modal-builder {
  width: min(1540px, 96vw);
  max-height: 96dvh;
}
.modal-work .modal-head,
.modal-builder .modal-head {
  background: #f8ecee;
  border-bottom: 2px solid #a96c75;
  flex-shrink: 0;
}
.modal-work .modal-head h2,
.modal-builder .modal-head h2 {
  font-size: 22px;
  color: #751c26;
}
.modal-work .modal-content,
.modal-builder .modal-content {
  padding-bottom: 0;
}
.modal-work .form-actions,
.modal-builder .form-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 2;
  padding: 16px 0;
  border-top: 2px solid #aab3c1;
  box-shadow: 0 -8px 12px #fff;
}
.work-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
}
.work-editor-details {
  padding-right: 26px;
  border-right: 1px solid var(--border);
}
.work-editor-details .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.work-editor-details .form-field:first-child,
.work-editor-details .form-field:has(textarea) {
  grid-column: 1 / -1;
}
.work-editor-details .work-task-options {
  gap: 12px 18px;
}
.work-editor-details .form-section {
  margin-top: 20px;
  padding-top: 16px;
}
.work-editor-schools {
  min-width: 0;
}
.level-selectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.level-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  border: 2px solid #8593a4;
  border-radius: 8px;
  background: #f4f6fa;
  font-weight: 600;
  cursor: pointer;
}
.level-select small {
  display: block;
  font-size: 12px;
  color: #4a5667;
  font-weight: 400;
}
.level-select:has(input:checked),
.level-select:has(input:indeterminate) {
  border-color: #902531;
  background: #fbebee;
  color: #751c26;
}
.school-picker input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
  flex-shrink: 0;
}
.school-picker .unit-filter {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}
.school-picker #commune-filter {
  grid-column: 1 / -1;
}
.school-picker .control {
  width: 100%;
  min-width: 0;
}
.picker-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0;
  font-size: 12px;
}
.picker-toolbar .check-line {
  font-size: 12px;
  margin: 0;
}
.school-picker .unit-picker {
  padding: 0;
  max-height: 360px;
  border: 1px solid #8593a4;
  border-radius: 8px;
  background: #fff;
}
.school-picker .unit-picker label {
  padding: 12px;
  font-size: 13px;
  align-items: center;
  border-bottom: 1px solid #d0d7e1;
  cursor: pointer;
  gap: 10px;
}
.school-picker .unit-picker label:last-child {
  border-bottom: 0;
}
.school-picker .unit-picker label:hover {
  background: #f1f4f8;
}
.school-picker .unit-picker label:has(input:checked) {
  background: #fbedef;
  box-shadow: inset 4px 0 #9b2531;
}
.school-picker-name {
  flex: 1;
  min-width: 0;
}
.school-picker-name small {
  display: block;
  color: #4b5666;
  font-size: 12px;
}
.school-level {
  flex-shrink: 0;
  text-align: right;
  color: #354d68;
  font-size: 12px;
  max-width: 42%;
}
.school-level small {
  display: block;
  font-size: 11px;
  color: #793a13;
  font-weight: 600;
}
.picker-summary {
  padding: 11px 12px;
  background: #edf3f9;
  color: #233f60;
  border: 1px solid #90a6c0;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  margin-top: 10px;
}
.picker-empty {
  color: #4b5666;
  padding: 15px;
}
.excel-schema-hint {
  background: #edf3f9;
  color: #264766;
  border-left: 4px solid #356aab;
  padding: 12px 14px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1250px) {
  .modal-work .unit-picker {
    max-height: 44dvh;
  }
}
@media (max-width: 1000px) {
  .work-editor-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .work-editor-details {
    border-right: 0;
    padding-right: 0;
  }
  .work-editor-schools {
    padding-top: 18px;
    border-top: 2px solid var(--border);
  }
}
@media (max-width: 600px) {
  .modal-backdrop:has(.modal-work),
  .modal-backdrop:has(.modal-builder) {
    padding: 0;
  }
  .modal.modal-work,
  .modal.modal-builder {
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .modal-work .modal-head h2,
  .modal-builder .modal-head h2 {
    font-size: 18px;
  }
  .work-editor-details .form-grid {
    grid-template-columns: 1fr;
  }
  .level-select {
    padding: 10px 6px;
    font-size: 12px;
    gap: 5px;
  }
  .level-select small {
    font-size: 11px;
  }
  .school-picker .unit-picker label {
    padding: 10px 8px;
  }
  .school-level {
    max-width: 34%;
    font-size: 11px;
  }
  .work-card-foot {
    flex-wrap: wrap;
  }
  .work-card-foot small {
    max-width: 100%;
  }
}
.nav-label,
.eyebrow,
.page-footer {
  color: #505c6b;
}
.nav-label,
.eyebrow {
  font-size: 11px;
}
.page-footer {
  font-size: 11px;
}
.badge {
  font-size: 12px;
  color: #4d596b;
}
.badge.green {
  color: #136247;
}
.badge.gold {
  color: #765211;
}
.badge.blue {
  color: #245b91;
}
.badge.red {
  color: #8b2532;
}
.badge.purple {
  color: #624b83;
}
.badge.gray {
  color: #4d596b;
}
.btn-green {
  color: #fff;
  border-color: var(--green);
}
.btn-danger,
.btn-ghost {
  color: var(--red);
}
.work-demo-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  margin: 0 0 22px;
  background: #fff5d7;
  border: 2px solid #927021;
  border-left: 7px solid #927021;
  border-radius: 10px;
  color: #523c12;
}
.work-demo-notice h2 {
  font-size: 17px;
  color: #624715;
  margin-bottom: 6px;
}
.work-demo-notice p {
  max-width: 780px;
  font-size: 13px;
}
.work-demo-notice .btn {
  background: #fff;
  border: 1px solid #8c6c24;
  color: #624715;
}
.work-help details {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.work-help details:last-child {
  border-bottom: 0;
}
.work-help summary {
  color: #751c26;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 0;
}
.work-help li {
  margin: 10px 0;
  max-width: 1050px;
}

/* Readable work states, document preview and operational notices. */
:root {
  font-size: 16px;
}
.main .btn,
.main .control,
.main input,
.main select,
.main textarea {
  font-size: 15px;
}
.main p,
.main .description,
.main .panel-pad li,
.main .form-hint,
.main .table-wrap td {
  font-size: 15px;
  line-height: 1.7;
}
.main .table-wrap th,
.main .form-field,
.main .form-field > label {
  font-size: 14px;
}
.main .text-small,
.main .muted,
.detail-summary small,
.value-grid small,
.work-card-meta,
.work-card-foot small,
.work-tags span {
  font-size: 14px;
}
.main .panel-header h2,
.main .panel-header h3 {
  font-size: 18px;
}
.badge {
  font-size: 14px;
  font-weight: 600;
  padding: 5px 10px;
}
.nav-item {
  font-size: 14px;
}
.nav-label,
.page-footer,
.breadcrumbs {
  font-size: 12px;
}
.work-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
  white-space: nowrap;
}
.work-state-badge[data-state="open"] {
  background: #116047;
  color: #fff;
  border-color: #084d38;
}
.work-state-badge[data-state="draft"] {
  background: #fff0b5;
  color: #684300;
  border-color: #a47310;
}
.work-state-badge[data-state="locked"] {
  background: #334a69;
  color: #fff;
  border-color: #263a54;
}
.work-state-badge[data-state="deleted"] {
  background: #fae9ed;
  color: #8b1830;
  border-color: #a8495c;
}
.work-card-top {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.work-card h2 {
  font-size: 20px;
  line-height: 1.55;
}
.work-card p {
  font-size: 15px;
}
.work-card[data-work-state="open"] {
  border: 2px solid #287358;
  border-top: 7px solid #116047;
  background: linear-gradient(135deg, #fff 50%, #edf8f1);
}
.work-card[data-work-state="draft"] {
  border-top-color: #a47310;
}
.work-card-foot {
  display: block;
}
.work-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.work-card-actions .btn {
  min-height: 42px;
}
[data-action="work-delete"] {
  color: #8f1730;
  border: 1px solid #b76a79;
  background: #fff;
}
[data-action="work-delete"]:hover {
  color: #fff;
  border-color: #8f1730;
  background: #8f1730;
}
.work-status-help {
  border: 1px solid #a6b4c5;
  border-radius: 10px;
  background: #fff;
  margin: 18px 0;
  padding: 14px 18px;
}
.work-status-help summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #29456a;
}
.work-status-help p {
  margin-top: 10px;
}
.attention-note,
.test-area-note {
  border: 2px solid #aa791b;
  border-left-width: 6px;
  background: #fff5d8;
  color: #63450e;
  border-radius: 9px;
  padding: 14px 18px;
  margin: 16px 0;
}
.test-area-note {
  border-color: #356a9b;
  color: #214c74;
  background: #edf5fe;
}
.attention-note strong,
.test-area-note strong {
  font-size: 17px;
}
.alert {
  font-size: 15px;
  border-left-width: 5px;
}
.alert.error {
  border: 2px solid #aa2942;
  border-left-width: 6px;
  color: #83192d;
}
.document-list {
  display: grid;
  gap: 14px;
}
.document-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #a9b7c8;
  border-radius: 10px;
  padding: 16px 18px;
  background: #fff;
}
.document-card > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.document-card strong {
  font-size: 16px;
}
.document-card .actions {
  flex-shrink: 0;
}
.material-link-card {
  border-color: #b88932;
  background: #fffaf0;
}
.document-card > .material-link-info {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: flex-start;
}
.material-link-info > svg {
  flex-shrink: 0;
}
.material-link-info p {
  margin: 6px 0 0;
  line-height: 1.5;
  color: #3f5065;
}
.modal.modal-document {
  width: min(1300px, 96vw);
  max-height: 94vh;
}
.modal-document .modal-content {
  padding: 18px 22px;
}
.document-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.document-toolbar strong {
  overflow-wrap: anywhere;
}
.document-frame {
  display: block;
  width: 100%;
  height: 70vh;
  border: 1px solid #b4c0ce;
  background: #edf0f4;
}
.document-image {
  display: block;
  max-width: 100%;
  margin: auto;
}
.document-paper {
  background: #fff;
  border: 1px solid #c3cbd4;
  padding: 28px 34px;
  color: #162335;
}
.document-paper p {
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 14px;
}
.document-table {
  overflow-x: auto;
  margin: 14px 0 20px;
}
.preview-note {
  color: #46576c;
  font-size: 14px;
  padding: 12px 16px;
  background: #eef3f8;
  border-radius: 8px;
  margin-bottom: 14px;
}
@media (max-width: 700px) {
  .document-card {
    display: block;
    padding: 14px;
  }
  .document-card .actions {
    margin-top: 14px;
  }
  .document-paper {
    padding: 18px;
  }
  .document-frame {
    height: 67vh;
  }
  .modal-document .modal-content {
    padding: 14px;
  }
  .work-state-badge {
    font-size: 15px;
  }
  .main .btn {
    font-size: 14px;
  }
}
/* Compact, readable workspace and task navigation. */
:root {
  --sidebar: 244px;
  font-size: 16px;
}
.main {
  padding: 20px 22px 16px;
  max-width: 1760px;
}
.page-heading {
  gap: 14px;
  margin-bottom: 16px;
}
.page-heading h1 {
  font-size: 25px;
  letter-spacing: -0.4px;
}
.page-heading p,
.main p {
  line-height: 1.65;
}
.main small,
.main .text-small,
.main .field-note,
.main .form-hint,
.main .muted,
.main .capsule,
.main .tab,
.main .panel-footer {
  font-size: 14px;
}
.main .detail-summary small,
.main .value-grid small,
.main .table-wrap small {
  font-size: 14px;
  line-height: 1.5;
}
.main .detail-summary strong,
.main .value-grid strong {
  font-size: 15px;
}
.main .form-field,
.main input,
.main textarea,
.main select,
.main .control {
  font-size: 16px;
}
.main .btn {
  font-size: 15px;
  min-height: 40px;
  padding: 8px 12px;
}
.main .btn-small,
.main .btn-ghost {
  font-size: 14px;
}
.main .toolbar {
  padding: 12px 16px;
  gap: 10px;
}
.main .panel-pad,
.main .panel-body {
  padding: 16px;
}
.main .panel-header {
  padding: 14px 16px;
}
.main .section-gap {
  margin-top: 16px;
}
.main th {
  font-size: 14px;
  color: #33465d;
  background: #eef2f6;
  padding: 10px 12px;
  font-weight: 600;
}
.main td {
  font-size: 15px;
  line-height: 1.5;
  padding: 11px 12px;
}
.main th:first-child,
.main td:first-child {
  padding-left: 16px;
}
.main th:last-child,
.main td:last-child {
  padding-right: 16px;
}
.main td small {
  display: block;
  margin-top: 4px;
  color: #46586b;
}
.main .detail-summary {
  padding: 14px 16px;
  gap: 14px;
}
.main .empty {
  padding: 28px 20px;
}
.main .empty h3 {
  font-size: 18px;
}
.main .empty p {
  font-size: 15px;
}
.main .back-link {
  margin-bottom: 10px;
  font-size: 14px;
}
.brand {
  padding: 20px 14px;
  gap: 9px;
}
.brand span {
  font-size: 10px;
  letter-spacing: 0;
}
.brand small {
  font-size: 12px;
}
.navigation {
  padding: 12px 10px;
}
.nav-link {
  font-size: 14px;
  padding: 9px 10px;
}
.nav-label {
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-top: 14px;
}
.account-button strong {
  font-size: 14px;
}
.account-button small,
.year-chip,
.breadcrumbs,
.local-badge {
  font-size: 13px;
}
.sidebar-foot,
.page-footer {
  font-size: 12px;
}
.work-stats {
  gap: 12px;
  margin: 0 0 14px;
}
.work-stats > div {
  flex-direction: row;
  text-align: left;
  padding: 12px 16px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.work-stats strong {
  font-size: 25px;
  margin: 0;
}
.work-stats span {
  font-size: 14px;
}
.work-filter {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 220px auto;
  align-items: end;
  margin: 12px 0 16px;
  padding: 0 !important;
}
.work-filter .form-field {
  width: 100%;
}
.work-filter select {
  max-width: none;
}
.work-card {
  padding: 18px;
  gap: 0;
  min-height: 0;
}
.work-card h2 {
  font-size: 20px;
  margin: 12px 0 8px;
}
.work-card p {
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 12px;
}
.work-card .work-tags {
  margin: 0 0 12px;
}
.work-card-foot {
  margin-top: 12px;
}
.work-status-help {
  padding: 10px 14px;
  margin: 12px 0;
}
.work-overview-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  font-size: 15px;
  margin: 0 0 12px;
}
.work-overview-strip > a {
  margin-left: auto;
  font-weight: 600;
}
.work-overview-strip .work-state-badge {
  padding: 4px 10px;
  font-size: 15px;
}
.compact-note {
  padding: 9px 12px;
  margin: 10px 0;
  font-size: 14px;
}
.compact-note strong {
  font-size: 14px;
}
.work-task-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.work-task-tab {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #273f59;
  padding: 12px;
  border: 1px solid #aab8c8;
  border-radius: 9px;
  background: #fff;
}
.work-task-tab:hover {
  text-decoration: none;
  border-color: #a32027;
}
.work-task-tab.active {
  border: 2px solid #a32027;
  background: #fdf0f1;
  padding: 11px;
  color: #8c1922;
}
.work-task-tab strong {
  display: block;
  font-size: 16px;
}
.work-task-tab small {
  display: block;
  font-size: 14px;
  margin-top: 3px;
  color: #4d5e70;
}
.work-task-tab > .icon {
  margin-left: auto;
}
.task-number {
  border-radius: 50%;
  background: #e9eef3;
  color: #33465d;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
}
.work-task-tab.active .task-number {
  background: #a32027;
  color: white;
}
.active-task-panel {
  overflow: visible;
}
.active-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid #cad2dd;
}
.active-task-header h2 {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 20px;
}
.active-task-header p {
  font-size: 14px;
  color: #46586b;
  margin-top: 4px;
}
.work-group-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.work-group-compact .form-field {
  gap: 3px;
  min-width: 135px;
  margin: 0;
}
.task-instructions {
  padding: 12px 16px;
  border-bottom: 1px solid #d6dce4;
  background: #f8fafc;
  font-size: 15px;
}
.task-instructions summary,
.work-meta-details > summary,
.registration-details > summary {
  cursor: pointer;
  color: #2e4967;
  font-size: 15px;
  font-weight: 600;
}
.task-instructions ol,
.guide-steps {
  padding-left: 26px;
  line-height: 1.7;
}
.task-instructions li,
.guide-steps li {
  margin: 10px 0;
}
.task-filter {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 235px auto auto;
  gap: 12px;
  align-items: end;
  padding: 12px 16px;
}
.task-filter > span {
  padding-bottom: 9px;
  font-size: 14px;
  white-space: nowrap;
}
.compact-review {
  padding: 12px 16px;
  background: #fff9e9;
  border-top: 1px solid #ddc584;
  border-bottom: 1px solid #ddc584;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.compact-review .btn {
  font-size: 14px;
}
.task-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #d2dbe6;
  flex-wrap: wrap;
  font-size: 14px;
}
.active-task-panel > .table-wrap {
  max-height: 620px;
}
.active-task-panel thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.active-task-panel td:nth-child(2) {
  min-width: 220px;
}
.active-task-panel .badge {
  white-space: nowrap;
}
.active-task-panel td .btn {
  padding: 6px 10px;
  min-height: 35px;
  font-size: 14px;
}
.review-note {
  color: #8c2532 !important;
}
.school-task-card {
  padding: 18px;
}
.school-task-state {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  align-items: start;
}
.school-task-state small {
  display: block;
  margin-bottom: 6px;
  color: #46586b;
}
.school-task-state strong {
  display: block;
  font-size: 19px;
}
.next-action {
  padding: 12px 14px;
  margin: 12px 0;
  border-left: 4px solid #356a9b;
  background: #f0f6fc;
  color: #233e5e;
  font-size: 15px;
  line-height: 1.7;
}
.task-draft {
  padding: 20px;
}
.task-draft p {
  margin: 8px 0 14px;
}
.work-meta-details {
  background: #fff;
  border: 1px solid #b8c4d2;
  border-radius: 8px;
  margin-top: 12px;
  padding: 12px 16px;
}
.work-meta-details > p {
  margin-top: 12px;
}
.action-menu {
  position: relative;
}
.action-menu > summary {
  list-style: none;
}
.action-menu > summary::-webkit-details-marker {
  display: none;
}
.action-menu[open] > .actions {
  position: absolute;
  top: 46px;
  right: 0;
  width: 310px;
  padding: 12px;
  border: 1px solid #bac4d0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 25px #1f324326;
  z-index: 12;
}
.action-menu > .actions > .btn {
  width: 100%;
  justify-content: flex-start;
}
.task-work-context {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.task-work-context > a {
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.task-sibling-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #b9c6d5;
}
.task-sibling-nav .btn {
  font-size: 14px;
}
.list-search {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
}
.list-search .form-field {
  flex: 1;
  min-width: 180px;
  margin: 0;
}
.list-search > span {
  font-size: 14px;
  padding: 8px 0;
  color: #46586b;
}
.registration-details {
  border: 1px solid #b7c4d3;
  border-radius: 9px;
  background: #fff;
  padding: 12px 16px;
}
.registration-details > .panel {
  border: 0;
  margin-top: 12px;
}
.document-link-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.document-download {
  font-weight: 400;
  color: #43546b;
  background: #f8fafc;
}
.document-backdrop {
  z-index: 200;
}
.document-backdrop .modal-document {
  display: flex;
  flex-direction: column;
}
.document-backdrop .modal-content {
  overflow: auto;
}
.document-backdrop .icon-button {
  font-size: 30px;
}
.document-backdrop .modal-content p,
.document-backdrop td {
  font-size: 15px;
}
.document-backdrop .table-wrap {
  max-height: 65vh;
  overflow: auto;
}
.preview-loading {
  padding: 36px;
  text-align: center;
  font-size: 17px;
}
.work-document-layout {
  display: grid;
  gap: 16px;
}
@media (min-width: 1100px) {
  .work-task-tabs:has(a:nth-child(5)) {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 1000px) {
  .active-task-header > .actions {
    width: 100%;
  }
  .task-filter {
    grid-template-columns: 1fr 1fr;
  }
  .task-filter > span {
    align-self: center;
  }
}
@media (max-width: 700px) {
  .main {
    padding: 16px 12px;
  }
  .page-heading {
    display: block;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading > .actions {
    margin-top: 12px;
  }
  .main small,
  .main .form-hint,
  .main .text-small,
  .main td small {
    font-size: 14px;
  }
  .main .btn {
    font-size: 15px;
  }
  .work-task-tabs {
    display: flex;
    overflow-x: auto;
    padding: 2px 0 8px;
    gap: 8px;
  }
  .work-task-tab {
    flex: 0 0 195px;
  }
  .work-task-tab strong {
    font-size: 15px;
  }
  .work-stats {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .work-stats > div {
    padding: 8px 12px;
  }
  .work-stats strong {
    font-size: 22px;
  }
  .work-filter {
    grid-template-columns: 1fr auto;
  }
  .work-filter > .form-field:first-child {
    grid-column: 1/-1;
  }
  .work-overview-strip {
    gap: 10px;
    font-size: 14px;
  }
  .work-overview-strip > a {
    margin-left: 0;
    width: 100%;
  }
  .task-filter {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .task-filter > span {
    padding: 0;
  }
  .work-group-compact {
    width: 100%;
  }
  .work-group-compact .form-field {
    flex: 1;
  }
  .active-task-header {
    padding: 14px;
  }
  .school-task-card {
    padding: 14px;
  }
  .school-task-state {
    gap: 16px;
  }
  .school-task-state > div {
    flex: 1 1 130px;
  }
  .task-sibling-nav {
    flex-wrap: nowrap;
    overflow: auto;
  }
  .task-sibling-nav .btn {
    flex-shrink: 0;
  }
  .action-menu[open] > .actions {
    right: auto;
    left: 0;
    width: min(310px, 85vw);
  }
  .document-card {
    padding: 12px;
  }
  .document-backdrop .modal-document {
    width: 96vw;
  }
  .document-link-actions {
    max-width: 100%;
  }
}
.main .panel:has([data-action="ai-registration-edit"]) .value-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
@media (max-width: 700px) {
  .work-task-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .work-task-tab {
    padding: 10px;
    flex-basis: auto;
    align-items: flex-start;
  }
  .work-task-tab.active {
    padding: 9px;
  }
  .work-task-tab > .icon {
    display: none;
  }
  .work-task-tab .task-number {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
  .work-task-tab.documents-tab {
    align-items: center;
  }
  .work-task-tab.documents-tab strong {
    line-height: 1.5;
  }
  .work-task-tab small {
    line-height: 1.5;
  }
}

.work-filter .form-field:first-child {
  max-width: none;
}
.support-banner{position:sticky;top:76px;z-index:15;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 22px;background:#fff3d6;border-bottom:2px solid #a4202a;color:#442f12}
.support-banner>div{display:flex;align-items:flex-start;gap:12px;min-width:0}
.support-banner strong{font-size:17px;color:#861c25}
.support-banner p{margin:4px 0 0;font-size:14px;overflow-wrap:anywhere}
.support-banner .btn{flex-shrink:0;background:white;border-color:#a4202a}
#support-unit{min-height:210px;font-size:15px}
.support-changes{display:grid;gap:14px}.support-change{padding:14px;border:1px solid #ccd3de;border-radius:8px}.support-change pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}
.school-locality-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;max-height:260px;overflow:auto;padding:12px;border:1px solid #ccd3de;border-radius:8px}.school-locality-choices .check-line{margin:0;padding:6px}
.work-config-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:24px;align-items:start}
.work-config-nav{display:grid;gap:8px;position:sticky;top:0;padding:4px}
.work-config-nav button{display:flex;align-items:center;gap:10px;text-align:left;padding:14px 12px;border:1px solid #bdc8d5;background:#fff;border-radius:9px;color:#22384f;font-size:16px;font-weight:650;cursor:pointer}
.work-config-nav button.active{border:2px solid #a4202a;background:#fff0f1;color:#921922;padding:13px 11px}
.work-config-nav .icon{width:20px;height:20px;flex-shrink:0}
.work-config-main{min-width:0;border-left:1px solid #cbd2dd;padding:4px 0 4px 24px}
.work-config-main [hidden]{display:none}.work-config-main h3{font-size:19px;margin:0 0 14px}.work-config-main .form-grid{gap:16px}
.work-config-main .form-field,.config-save-section .form-field{font-size:16px}.work-config-main .form-hint{font-size:15px;line-height:1.65}
.work-config-main input:not([type=checkbox]),.work-config-main textarea,.config-save-section textarea{font-size:16px;min-height:44px}
.work-config-main .form-section{margin-top:22px;padding-top:20px;border-top:1px solid #ccd3de}
.config-work-title{font-size:18px;font-weight:650;color:#7e1d27;margin:0 0 20px}.config-editing-note{background:#eef3f8;padding:18px;border-radius:10px;margin-top:20px}.config-editing-note p{line-height:1.65}
.config-save-section{margin-top:24px;border-top:2px solid #c6cfdb;padding:20px 0 0}.config-notify{display:flex;gap:24px;flex-wrap:wrap;margin-top:12px}
.config-specs{padding:14px;border:1px solid #bdc8d5;border-radius:8px;margin-top:20px}.config-specs summary{font-weight:650;cursor:pointer}.config-specs ul{padding:8px 8px 0 24px}.config-specs li{margin:10px 0}.config-specs p{white-space:pre-wrap;margin:5px 0}
.task-custom-instructions{margin:16px 0;padding:16px 20px}.task-custom-instructions p{white-space:pre-wrap;margin:8px 0 0}.task-work-context>.btn{margin-left:auto}
@media(max-width:800px){.work-config-layout{grid-template-columns:1fr;gap:14px}.work-config-nav{display:flex;overflow:auto;position:static;padding:0 0 8px}.work-config-nav button{flex-shrink:0;padding:10px;font-size:15px}.work-config-nav button.active{padding:9px}.work-config-main{border-left:0;padding:0}.config-notify{gap:8px}.task-work-context{flex-wrap:wrap}.task-work-context>.btn{margin-left:0}}
@media(max-width:760px){.support-banner{position:static;align-items:flex-start;padding:12px;flex-direction:column}.top-actions>.btn{padding:8px;font-size:13px}}
