:root {
  --bg: #f5f7f7;
  --surface: #ffffff;
  --surface-soft: #f8fafa;
  --ink: #172224;
  --muted: #687577;
  --line: #d8e0e1;
  --line-strong: #bcc8ca;
  --teal: #007f82;
  --teal-dark: #00686b;
  --teal-soft: #e5f4f3;
  --red: #d72f3f;
  --red-soft: #fcebed;
  --amber: #d97706;
  --amber-soft: #fff3df;
  --blue: #226bc5;
  --blue-soft: #eaf2fc;
  --green: #22845a;
  --green-soft: #e9f6ef;
  --shadow: 0 8px 30px rgba(24, 42, 44, 0.1);
  --radius: 6px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(0, 127, 130, 0.23);
  outline-offset: 1px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fbfcfc;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.brand {
  height: 72px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--teal);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  border-radius: 4px;
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0;
}

.brand-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.nav {
  padding: 16px 10px;
  display: grid;
  gap: 4px;
}

.nav-button {
  border: 0;
  background: transparent;
  color: #344143;
  min-height: 42px;
  border-radius: 5px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  font-size: 13px;
}

.nav-button:hover {
  background: #edf2f2;
}

.nav-button.active {
  color: #fff;
  background: var(--teal);
  font-weight: 650;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  flex: 0 0 auto;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.system-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.state-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--green-soft);
}

.main {
  min-width: 0;
}

.topbar {
  height: 72px;
  padding: 0 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 15;
}

.page-heading {
  min-width: 130px;
}

.page-heading h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.top-actions,
.toolbar,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-badge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.logout-button {
  border-color: #cfd8da;
}

.trial-select {
  min-width: 300px;
}

.control,
.search,
select,
input,
textarea {
  height: 38px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 5px;
  padding: 0 10px;
}

textarea {
  height: auto;
  min-height: 84px;
  padding-top: 9px;
  resize: vertical;
}

.button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 650;
  font-size: 12px;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.button.primary {
  color: white;
  border-color: var(--teal);
  background: var(--teal);
}

.button.primary:hover {
  color: white;
  background: var(--teal-dark);
}

.button.danger {
  color: var(--red);
  border-color: #efb5bb;
  background: var(--red-soft);
}

.button.icon-only {
  width: 38px;
  padding: 0;
  font-size: 18px;
}

.language-switch {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  overflow: hidden;
}

.language-switch button {
  height: 36px;
  min-width: 42px;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.language-switch button.active {
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 750;
}

.content {
  padding: 20px 22px 30px;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 46px;
  padding: 58px 24px 70px;
  background: #2f8f5d;
}

.login-panel {
  background: var(--surface);
  width: min(620px, 100%);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 18px 48px rgba(18, 52, 37, 0.18);
  padding: 54px 70px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-product {
  color: #fff;
  font-size: clamp(48px, 7vw, 72px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.login-copy h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0;
  text-align: center;
}

.login-copy p {
  margin: 22px 0 0;
  color: #111;
  font-size: 20px;
  line-height: 1.6;
  text-align: center;
}

.login-language {
  align-self: center;
  margin: 22px 0 0;
}

.login-form {
  margin-top: 30px;
  display: grid;
  gap: 24px;
}

.login-form .field label {
  display: none;
}

.login-form select,
.login-form input {
  height: 58px;
  border-color: #cfd6d8;
  border-radius: 5px;
  padding: 0 22px;
  font-size: 18px;
  color: #4d5a5d;
}

.login-form .button.primary {
  min-height: 62px;
  margin-top: 10px;
  border-radius: 5px;
  font-size: 22px;
  font-weight: 500;
  background: #21b4ad;
  border-color: #21b4ad;
}

.trial-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 14px;
}

.trial-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.trial-card.selected {
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

.trial-card strong {
  display: block;
  font-size: 13px;
}

.trial-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.trial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trial-meta span {
  margin: 0;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.admin-form {
  padding: 14px;
  display: grid;
  gap: 13px;
}

.notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 9px 11px;
  border: 1px solid #bed9e5;
  background: #eff8fb;
  color: #315c6d;
  border-radius: 5px;
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 14px;
}

.span-main {
  min-width: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel + .panel {
  margin-top: 14px;
}

.panel-header {
  min-height: 50px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  min-width: 0;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.kpi-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.kpi {
  padding: 15px 16px;
  min-height: 108px;
  border-right: 1px solid var(--line);
}

.kpi:last-child {
  border-right: 0;
}

.kpi-label {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #465355;
  font-size: 11px;
}

.kpi-icon {
  color: var(--teal);
  font-weight: 800;
}

.kpi-value {
  margin-top: 10px;
  font-size: 25px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.positive {
  color: var(--green);
}

.critical {
  color: var(--red);
}

.warning {
  color: var(--amber);
}

.info {
  color: var(--blue);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th {
  height: 36px;
  padding: 0 10px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  color: #566365;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

td {
  height: 49px;
  padding: 7px 10px;
  border-bottom: 1px solid #e8eded;
  color: #334143;
  vertical-align: middle;
}

tbody tr:hover {
  background: #f6fbfb;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.case-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 750;
  text-align: left;
}

.case-link:hover {
  text-decoration: underline;
}

.priority-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.priority-bar {
  width: 3px;
  height: 26px;
  border-radius: 2px;
}

.priority-bar.critical {
  background: var(--red);
}

.priority-bar.high {
  background: var(--amber);
}

.priority-bar.medium {
  background: #d2a900;
}

.priority-bar.low {
  background: #8f9b9d;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  background: #edf1f1;
  color: #4f5d5f;
}

.status.red {
  color: #9f2130;
  background: var(--red-soft);
}

.status.amber {
  color: #8f4e00;
  background: var(--amber-soft);
}

.status.green {
  color: #176e49;
  background: var(--green-soft);
}

.status.blue {
  color: #1a58a2;
  background: var(--blue-soft);
}

.table-footer {
  min-height: 42px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search {
  width: 220px;
}

.filter-select {
  min-width: 130px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(74px, 1fr));
}

.calendar-weekday,
.calendar-day {
  border-right: 1px solid #e7ecec;
  border-bottom: 1px solid #e7ecec;
}

.calendar-weekday:nth-child(7n),
.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-weekday {
  min-height: 31px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  background: var(--surface-soft);
}

.calendar-day {
  min-height: 72px;
  padding: 8px;
  position: relative;
}

.calendar-day.muted {
  color: #a4adae;
  background: #fafbfb;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--teal);
}

.day-number {
  font-size: 10px;
  font-weight: 700;
}

.calendar-events {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.event-dot {
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 9px;
  font-weight: 800;
}

.event-dot.red {
  background: var(--red);
}

.event-dot.amber {
  background: var(--amber);
}

.event-dot.blue {
  background: var(--blue);
}

.rail .panel {
  margin-top: 0;
}

.rail .panel + .panel {
  margin-top: 14px;
}

.rail-list {
  padding: 0 12px 12px;
}

.follow-up {
  padding: 11px 0 11px 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.follow-up:last-child {
  border-bottom: 0;
}

.follow-up::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 3px;
  background: var(--amber);
}

.follow-up.overdue::before {
  background: var(--red);
}

.follow-up strong {
  display: block;
  color: var(--teal-dark);
  font-size: 11px;
}

.follow-up p {
  margin: 5px 0;
  font-size: 11px;
}

.follow-up-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.ack-list {
  padding: 8px 14px 13px;
}

.ack-row {
  min-height: 32px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
}

.section-layout.wide {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.summary-list {
  padding: 2px 14px 14px;
}

.panel-actions {
  padding: 0 14px 14px;
}

.full-width {
  width: 100%;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid #e9eeee;
  font-size: 11px;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row span {
  color: var(--muted);
}

.audit-list {
  padding: 0 14px 14px;
}

.audit-item {
  display: grid;
  grid-template-columns: 120px 120px 1fr auto;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 11px;
}

.audit-item:last-child {
  border-bottom: 0;
}

.empty-state {
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 30px;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 7px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 26, 0.48);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
}

.modal {
  width: min(800px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--surface);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.modal.sae-modal {
  width: min(1120px, 100%);
}

.modal.small {
  width: min(560px, 100%);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 62px;
  padding: 13px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-body {
  padding: 18px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  padding: 12px 18px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-section {
  padding-bottom: 17px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.form-section h3 {
  margin: 0 0 12px;
  font-size: 12px;
}

.sae-form-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.sae-form-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.sae-form-summary strong {
  display: block;
  font-size: 18px;
}

.sae-form-summary span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.sae-section {
  scroll-margin-top: 76px;
}

.sae-section-header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sae-section-header h3 {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.checkbox-field {
  align-content: end;
  min-height: 56px;
}

.field label {
  color: #455254;
  font-size: 10px;
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.classification {
  border: 1px solid #b8d8d7;
  background: #f1f9f8;
  padding: 12px;
  border-radius: 5px;
}

.classification strong {
  display: block;
  font-size: 12px;
}

.classification p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.captured-sections {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.captured-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.captured-section h4 {
  margin: 0;
  padding: 9px 12px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.captured-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf1f1;
  font-size: 10px;
}

.captured-row:last-child {
  border-bottom: 0;
}

.captured-row span {
  color: var(--muted);
}

.detail-hero {
  padding: 16px 18px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.detail-hero h3 {
  margin: 0;
  font-size: 18px;
}

.detail-hero p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.detail-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.detail-cell:last-child {
  border-right: 0;
}

.detail-cell span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.detail-cell strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  background: #193638;
  color: white;
  padding: 12px 15px;
  border-radius: 5px;
  box-shadow: var(--shadow);
  font-size: 11px;
  z-index: 200;
  animation: toast-in 180ms ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand-copy,
  .nav-label,
  .sidebar-footer {
    display: none;
  }

  .nav-button {
    justify-content: center;
    padding: 0;
  }

  .kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi:nth-child(3) {
    border-right: 0;
  }

  .kpi:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .dashboard-grid,
  .section-layout,
  .section-layout.wide {
    grid-template-columns: 1fr;
  }

  .rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .rail .panel + .panel {
    margin-top: 0;
  }

  .trial-select {
    min-width: 200px;
    max-width: 240px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    height: 58px;
    inset: auto 0 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .brand,
  .sidebar-footer {
    display: none;
  }

  .nav {
    padding: 6px 8px;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
  }

  .nav-button {
    min-height: 44px;
  }

  .nav-button:nth-child(n + 6) {
    display: none;
  }

  .nav-icon {
    border: 0;
  }

  .topbar {
    height: auto;
    min-height: 68px;
    padding: 10px 13px;
    align-items: flex-start;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .page-heading p,
  .trial-select,
  .user-badge {
    display: none;
  }

  .content {
    padding: 13px 13px 78px;
  }

  .login-screen {
    display: flex;
    gap: 24px;
    padding: 36px 16px;
  }

  .login-panel {
    min-height: auto;
    padding: 34px 24px 38px;
    border-right: 0;
  }

  .login-product {
    font-size: 42px;
  }

  .login-copy h1 {
    font-size: 28px;
  }

  .login-copy p {
    font-size: 17px;
  }

  .login-form select,
  .login-form input {
    height: 52px;
    font-size: 16px;
  }

  .trial-grid {
    grid-template-columns: 1fr;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi,
  .kpi:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .kpi:nth-child(even) {
    border-right: 0;
  }

  .kpi:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .rail {
    display: block;
  }

  .rail .panel + .panel {
    margin-top: 14px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar,
  .filters {
    width: 100%;
  }

  .search,
  .filter-select {
    width: 100%;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
  }

  .calendar-day {
    min-height: 57px;
    padding: 5px;
  }

  .calendar-events {
    gap: 2px;
  }

  .event-dot {
    min-width: 15px;
    height: 15px;
    font-size: 7px;
  }

  .form-grid,
  .form-grid.three,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .audit-item {
    grid-template-columns: 1fr auto;
  }

  .audit-item > :nth-child(2),
  .audit-item > :nth-child(3) {
    grid-column: 1;
  }
}
