@font-face {
  font-family: Archivo;
  src: url("/assets/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Bodoni;
  src: url("/assets/bodoni.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
:root {
  --velvet: #1a0a33;
  --regalia: #2a1152;
  --royal: #4f23a0;
  --lilac: #cbb4f8;
  --frost: #f6f3fb;
  --paper: #fff;
  --ink: #17131d;
  --muted: #6d6875;
  --line: #ded8e7;
  --success: #2d7651;
  --danger: #a12d42;
  --focus: #7b50cf;
  --shadow: 0 16px 45px rgba(38, 20, 62, 0.09);
  --r: 12px;
  --side: 256px;
  --header: 76px;
  --space: clamp(24px, 4vw, 56px);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--frost);
}
* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--frost);
  font-size: 16px;
  line-height: 1.5;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--royal);
  text-underline-offset: 3px;
}
img {
  max-width: 100%;
  display: block;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip {
  position: fixed;
  z-index: 99;
  left: 16px;
  top: -80px;
  background: var(--paper);
  padding: 12px 16px;
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 16px;
  justify-items: center;
  color: var(--muted);
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--royal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}
.sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.loading-inline {
  min-height: 50vh;
}
.error.notice-top {
  margin-top: 24px;
}
.sidebar .signout {
  color: #fff;
}
.section-title--flush {
  margin-top: 0;
}
.thumb-table {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 7px;
}
.thumb-card {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.login {
  min-height: 100vh;
  min-height: 100svh;
  padding: max(28px, calc((100svh - 520px) / 2)) 24px
    max(28px, env(safe-area-inset-bottom));
  background: var(--frost);
}
.login__panel {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.login__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.login__brand img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}
.wordmark {
  font-family: Bodoni, Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 21px;
}
.login__form {
  background: var(--regalia);
  color: #fff;
  border: 1px solid var(--regalia);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 12px 32px rgba(26, 10, 51, 0.12);
}
.login .actions {
  display: grid;
  gap: 8px;
}
.login .actions .btn {
  width: 100%;
  background: var(--lilac);
  color: var(--velvet);
}
.login .actions .btn:hover {
  background: #ded0fa;
}
.login .field label,
.login .field small,
.login .lede {
  color: #ded3ed;
}
.login .field label {
  font-size: 13px;
}
.login .link-button {
  color: #ded3ed;
}
.login :focus-visible {
  outline-color: var(--lilac);
}
.login .link-button {
  justify-self: center;
  font-size: 14px;
}
.login #login-message:not(:empty) {
  margin-top: 18px;
}
.login #login-message > * {
  margin-bottom: 0;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--royal);
  font-weight: 700;
  font-size: 12px;
}
.login h1 {
  font:
    650 14px/1.5 Archivo,
    Arial,
    sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 28px;
}
.lede {
  color: var(--muted);
  margin: 0 0 32px;
}
.field {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}
.field label {
  font-weight: 650;
}
.field small {
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 11px 13px;
  color: var(--ink);
}
textarea {
  min-height: 180px;
  resize: vertical;
}
input:hover,
textarea:hover,
select:hover {
  border-color: #aaa0b9;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(123, 80, 207, 0.13);
  outline: 0;
}
.error {
  padding: 13px 15px;
  border-left: 4px solid var(--danger);
  background: #fbeff2;
  color: #721d30;
  margin: 0 0 20px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  padding: 11px 18px;
  background: var(--royal);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: #3f1a82;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn--quiet {
  background: transparent;
  color: var(--royal);
  border: 1px solid var(--line);
}
.btn--quiet:hover {
  background: #f1ecf8;
}
.btn--danger {
  background: var(--danger);
}
.btn--icon {
  padding: 0;
  width: 46px;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.link-button {
  border: 0;
  background: none;
  padding: 10px 0;
  color: var(--royal);
  text-decoration: underline;
  cursor: pointer;
  min-height: 44px;
}
.shell {
  min-height: 100vh;
  padding-left: var(--side);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  background: var(--velvet);
  color: #fff;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sidebar .wordmark {
  font-size: 17px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.sidebar__brand {
  padding: 7px 12px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.nav {
  display: grid;
  gap: 6px;
  padding: 26px 0;
}
.nav a {
  min-height: 48px;
  border-radius: 9px;
  padding: 12px;
  color: #ddd3ec;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 600;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.nav a[aria-current="page"] {
  background: #fff;
  color: var(--velvet);
}
.sidebar__account {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 22px 12px 0;
}
.sidebar__account small {
  display: block;
  color: #bcb0ca;
  overflow-wrap: anywhere;
}
.mobile-header {
  display: none;
}
.main {
  min-height: 100vh;
}
.topbar {
  height: var(--header);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--space);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.content {
  padding: clamp(28px, 4vw, 48px) var(--space) 64px;
  max-width: 1480px;
  margin: 0 auto;
}
.content:focus {
  outline: none;
}
.page-head {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 30px;
}
.page-head h1 {
  font:
    650 clamp(26px, 3vw, 32px) / 1.2 Archivo,
    Arial,
    sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-head p {
  max-width: 700px;
  color: var(--muted);
  margin: 13px 0 0;
}
.page-head__actions {
  flex: none;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  min-height: 44px;
  margin-bottom: 16px;
  text-decoration: none;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 200px));
  gap: 20px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.card:hover {
  border-color: var(--royal);
  box-shadow: var(--shadow);
}
.card__icon {
  color: var(--royal);
  margin-bottom: 18px;
}
.card__icon .icon {
  width: 36px;
  height: 36px;
  stroke-width: 1.5;
}
.card h2 {
  font-size: 15px;
  font-weight: 650;
  margin: 0 0 12px;
}
.card .metric {
  margin: auto 0 0;
  padding: 3px 12px;
  border-radius: 20px;
  background: var(--frost);
  color: var(--regalia);
  font:
    600 13px/1.5 Archivo,
    Arial,
    sans-serif;
}
.pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eee7f9;
  color: var(--regalia);
  font-size: 13px;
  font-weight: 700;
}
.pill--new {
  background: #efe6fb;
  color: #53218e;
}
.pill--in_progress {
  background: #fff1cf;
  color: #795713;
}
.pill--replied {
  background: #dff2e8;
  color: #205f40;
}
.pill--closed {
  background: #ebe9ee;
  color: #5c5763;
}
.toolbar {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 22px;
}
.toolbar .field {
  margin: 0;
  min-width: 190px;
}
.toolbar .search {
  flex: 1;
  max-width: 460px;
}
.table-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.text-table {
  table-layout: fixed;
}
.text-table th:first-child {
  width: 28%;
}
.text-table th:nth-child(3) {
  width: 88px;
}
.text-table th:last-child {
  width: 128px;
}
.table .row-link {
  overflow-wrap: anywhere;
}
.table th,
.table td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid #ebe6f0;
  vertical-align: middle;
}
.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: #fcfbfd;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover {
  background: #fbf9fd;
}
.table a.row-link {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.table a.row-link:hover {
  color: var(--royal);
}
.table .preview {
  max-width: 560px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-list {
  display: none;
}
.record-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  text-decoration: none;
  color: inherit;
}
.record-card h2 {
  overflow-wrap: anywhere;
  min-width: 0;
  font-size: 18px;
  margin: 0;
}
.record-card p {
  margin: 8px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.record-card__top {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  color: var(--muted);
}
.empty {
  background: var(--paper);
  border: 1px dashed #bcb2c8;
  border-radius: var(--r);
  padding: 52px 24px;
  text-align: center;
  color: var(--muted);
}
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(22px, 4vw, 42px);
  max-width: 920px;
}
.form-card--wide {
  max-width: 1100px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 28px;
}
.meta > div {
  background: var(--paper);
  padding: 18px;
}
.meta dt {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.meta dd {
  margin: 6px 0 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.image-preview {
  background: #eeeaf3;
  border-radius: var(--r);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  margin-bottom: 28px;
}
.image-preview img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
}
.submission-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 30px;
}
.submission-fields > div {
  background: var(--paper);
  padding: 18px;
}
.submission-fields dt {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.submission-fields dd {
  margin: 7px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.submission-fields .long {
  grid-column: 1/-1;
}
.section-title {
  font:
    650 20px/1.3 Archivo,
    Arial,
    sans-serif;
  margin: 44px 0 18px;
}
.reply {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 28px;
}
.reply-item {
  border-left: 3px solid var(--lilac);
  padding: 4px 0 4px 18px;
  margin: 22px 0;
}
.reply-item p {
  white-space: pre-wrap;
}
.hint {
  font-size: 14px;
  color: var(--muted);
}
.success {
  padding: 13px 15px;
  border-left: 4px solid var(--success);
  background: #edf8f2;
  color: #205f40;
  margin: 0 0 20px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  background: var(--velvet);
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 80;
}
.menu-backdrop {
  display: none;
}
@media (max-width: 1050px) {
  :root {
    --side: 224px;
  }

  .table th:nth-child(3),
  .table td:nth-child(3) {
    display: none;
  }
}
@media (max-width: 900px) {
  .login {
    padding-left: 20px;
    padding-right: 20px;
  }
  .login__brand img {
    width: 88px;
    height: 88px;
  }
  .login__brand {
    margin-bottom: 20px;
  }
  .login__form {
    padding: 28px 24px;
  }
  .main {
    min-height: calc(100svh - 64px);
  }
  .shell {
    padding-left: 0;
    padding-top: 64px;
  }
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    width: min(84vw, 300px);
  }
  .shell.menu-open .sidebar {
    transform: none;
  }
  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 8, 24, 0.44);
    z-index: 19;
  }
  .shell.menu-open .menu-backdrop {
    display: block;
  }
  .mobile-header {
    display: flex;
    position: fixed;
    inset: 0 0 auto;
    height: 64px;
    background: var(--velvet);
    color: #fff;
    z-index: 18;
    align-items: center;
    gap: 16px;
    padding: 8px 14px;
  }
  .mobile-header .wordmark {
    font-size: 16px;
  }
  .topbar {
    display: none;
  }
  .content {
    padding: 28px 20px 48px;
  }
  .page-head {
    display: block;
    margin-bottom: 30px;
  }
  .page-head__actions {
    margin-top: 20px;
  }
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .card {
    padding: 22px 8px;
  }
  .card h2 {
    font-size: 13px;
  }
  .card__icon {
    margin-bottom: 14px;
  }
  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .toolbar .field {
    min-width: 0;
  }
  .toolbar .search {
    grid-column: 1/-1;
    max-width: none;
  }
  .desktop-table {
    display: none;
  }
  .mobile-list {
    display: grid;
    gap: 12px;
  }
  .form-grid {
    display: block;
  }
  .meta,
  .submission-fields {
    grid-template-columns: 1fr;
  }
  .submission-fields .long {
    grid-column: auto;
  }
  .page-head h1 {
    font-size: 28px;
  }
  .form-card {
    padding: 22px 18px;
  }
  .pagination {
    align-items: stretch;
  }
  .pagination .btn {
    padding: 10px 12px;
  }
  .toast {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }
  .image-preview {
    padding: 12px;
  }
}
@media (max-width: 380px) {
  .toolbar {
    grid-template-columns: 1fr;
  }
  .login__form {
    padding: 24px 20px;
  }
  .toolbar .search {
    grid-column: auto;
  }
  .actions > .btn {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
