@import url("/assets/tokens.css");
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f7f8;
  color: #273c3c;
  font:
    14px/1.55 Arial,
    Helvetica,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 24px;
}
h2 {
  font-size: 23px;
  line-height: 1.25;
}
h3 {
  font-size: 17px;
}
p {
  color: #657874;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
input,
textarea,
select {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid #99beba;
  outline-offset: 3px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.7px;
  white-space: nowrap;
}
.logo-light {
  font-weight: 400;
}
.logo-dot {
  color: #b98667;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.primary {
  background: #244a49;
  color: white;
}
.outline {
  background: white;
  border-color: #dce5e2;
}
.full {
  width: 100%;
}
.button:hover {
  filter: brightness(0.96);
}
.panel {
  background: white;
  border: 1px solid #e4eae7;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
  min-width: 0;
}
.panel h2,
.panel h3 {
  margin-bottom: 16px;
}
.panel > p {
  margin-bottom: 18px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 14px 0;
}
.text-input {
  display: block;
  border: 1px solid #d7e0dc;
  background: white;
  border-radius: 10px;
  min-height: 44px;
  padding: 11px 13px;
  width: 100%;
  margin-top: 7px;
  font-weight: 400;
}
.form-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}
.form-columns > .button {
  margin-bottom: 14px;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
}
.check-row input {
  margin-top: 4px;
  accent-color: #244a49;
}
.form-error {
  color: #a43737;
  margin: 12px 0;
}
.form-error:empty {
  display: none;
}
.environment-banner {
  text-align: center;
  background: #e8efd9;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 16px;
}
.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100dvh;
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: white;
  border-right: 1px solid #e0e6e3;
  padding: 26px 20px;
  min-width: 0;
}
.admin-sidebar nav {
  display: grid;
  gap: 6px;
}
.admin-sidebar nav button {
  text-align: left;
  padding: 13px 16px;
  border-radius: 12px;
  color: #617571;
}
.admin-sidebar nav button:hover {
  background: #f3f6f4;
}
.admin-sidebar nav button.active {
  background: #eaf2ee;
  color: #21513f;
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-bottom .button {
  margin-top: 10px;
}
.admin-workspace {
  min-width: 0;
  width: 100%;
}
.admin-statusbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 10px;
  overflow: auto;
  background: #fffffff2;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e0e6e3;
  padding: 16px 28px;
}
.admin-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  padding: 10px 14px;
  background: #f3f6f4;
  border-radius: 11px;
  font-size: 12px;
}
.admin-counter strong {
  font-size: 22px;
  color: #245441;
}
.admin-counter span {
  text-transform: capitalize;
}
.admin-counter.urgent {
  background: #fce8e6;
  color: #912c2c;
}
.admin-content {
  padding: 32px;
  max-width: 1600px;
  margin: auto;
  min-width: 0;
}
.admin-content > p {
  margin: -8px 0 24px;
  max-width: 850px;
}
.agent-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(125deg, #f0f6ed, #fff);
}
.agent-welcome > div {
  max-width: 650px;
}
.agent-welcome .button {
  flex-shrink: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.section-heading h1 {
  margin-bottom: 8px;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
  overscroll-behavior-x: contain;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  white-space: nowrap;
  color: #63776f;
  background: #f5f8f6;
}
td,
th {
  padding: 13px 14px;
  border-bottom: 1px solid #eaf0ec;
  max-width: 360px;
  overflow-wrap: anywhere;
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafcfb;
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.integration-grid .panel {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.pill {
  display: inline-block;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 7px;
  background: #edf1ef;
  white-space: nowrap;
}
.mint {
  background: #e6f4eb;
  color: #286446;
}
.yellow {
  background: #fbf0d2;
  color: #80621c;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #e8eeeb;
}
.list-row:last-child {
  border-bottom: 0;
}
.row-button {
  width: 100%;
  text-align: left;
}
.row-button:hover {
  background: #f6f9f7;
}
.grow {
  flex: 1;
  min-width: 0;
}
.grow small {
  display: block;
  color: #70837a;
}
.translation-row strong,
.translation-row small {
  overflow-wrap: anywhere;
}
.empty-state {
  padding: 36px;
  text-align: center;
  color: #82938a;
}
.empty-state svg {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
}
.modal-open {
  overflow: hidden;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #18343166;
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.sheet {
  position: relative;
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 600px;
  max-height: calc(100dvh - 56px);
  overflow: auto;
  padding: 30px;
  overscroll-behavior: contain;
}
.sheet > h2 {
  padding-right: 44px;
  margin-bottom: 20px;
}
.sheet.dossier {
  max-width: 1120px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e4eae7;
  border-radius: 50%;
  background: white;
}
.close-modal {
  position: sticky;
  top: 0;
  float: right;
  z-index: 6;
  margin: -10px -10px 0 0;
}
.dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
}
.dossier-header h2 {
  overflow-wrap: anywhere;
}
.dossier-header > div:last-child strong {
  font-size: 28px;
  white-space: nowrap;
}
.dossier-header small {
  display: block;
}
.dossier-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.dossier-metrics > div {
  background: #f3f7f4;
  padding: 18px;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.dossier-metrics span {
  display: block;
  font-size: 11px;
  color: #688073;
  margin-bottom: 8px;
}
.dossier-metrics strong {
  font-size: 23px;
}
.dossier-section {
  border: 1px solid #e0e8e2;
  border-radius: 14px;
  padding: 20px;
  margin: 18px 0;
}
.dossier-section h3 {
  margin-bottom: 18px;
}
.dossier-section summary {
  font-weight: 600;
  cursor: pointer;
}
.dossier-section form + form {
  border-top: 1px solid #e0e8e2;
  margin-top: 24px;
  padding-top: 16px;
}
.quality-timeline {
  max-height: 340px;
  overflow: auto;
}
.quality-timeline article {
  display: grid;
  gap: 5px;
  border-left: 2px solid #c3d8c9;
  padding: 0 16px 20px;
  font-size: 12px;
}
.quality-timeline time {
  color: #82958a;
}
.quality-timeline pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f7f5;
  padding: 12px;
  max-height: 220px;
  overflow: auto;
}
.small-note {
  font-size: 12px;
  color: #7f9087;
  margin: 12px 0;
}
.risk-banner {
  background: #fff0e9;
  border: 1px solid #e8c7b7;
  padding: 14px;
  border-radius: 10px;
  color: #87472c;
  margin: 12px 0;
}
.case-counters {
  position: sticky;
  top: -30px;
  background: white;
  z-index: 4;
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 12px 0;
  border-bottom: 1px solid #e3e9e5;
}
.case-counters .admin-counter {
  font-size: 11px;
  padding: 8px 10px;
}
.case-decision {
  background: #f3f6f9;
  border: 1px solid #dae4e8;
  padding: 24px;
  border-radius: 16px;
}
.decision-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.danger {
  color: #a33737;
}
.chat-message {
  border-radius: 16px;
  background: #edf2f5;
  padding: 14px 18px;
  margin: 16px 0;
  max-width: 92%;
}
.chat-message p,
.ticket-reply,
.translation-preview p {
  white-space: pre-wrap;
}
.from-user {
  background: #e9f4ec;
  margin-left: auto;
}
.chat-message small {
  font-size: 11px;
  font-weight: 600;
}
.auth-card {
  max-width: 450px;
  margin: 10vh auto;
  padding: 36px;
}
.auth-card .logo {
  margin-bottom: 38px;
}
.auth-card h1 {
  font-size: 27px;
}
.auth-card .button {
  margin-top: 20px;
}
.boot {
  padding: 60px;
  text-align: center;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #244a49;
  color: white;
  border-radius: 12px;
  padding: 14px 22px;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 80;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
@media (max-width: 960px) {
  .admin-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-sidebar {
    position: static;
    height: auto;
    padding: 18px 20px;
    gap: 16px;
    border-right: 0;
    border-bottom: 1px solid #e0e6e3;
  }
  .admin-sidebar > .eyebrow {
    display: none;
  }
  .admin-sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .admin-sidebar nav button {
    white-space: nowrap;
    min-height: 44px;
  }
  .sidebar-bottom {
    position: absolute;
    top: 45px;
    right: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
  }
  .sidebar-bottom .button {
    margin: 0;
    padding: 7px 12px;
  }
  .admin-content {
    padding: 24px;
  }
  .admin-statusbar {
    padding: 12px 20px;
  }
  .dossier-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .admin-sidebar .logo {
    font-size: 17px;
  }
  .sidebar-bottom p {
    display: none;
  }
  .admin-content {
    padding: 20px 14px;
  }
  .panel {
    padding: 18px;
    border-radius: 15px;
  }
  .agent-welcome,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .agent-welcome .button {
    width: 100%;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .sheet {
    padding: 20px;
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }
  .dossier-header {
    display: block;
  }
  .dossier-header > div + div {
    margin-top: 16px;
  }
  .dossier-section,
  .case-decision {
    padding: 15px;
  }
  .case-counters {
    top: -20px;
  }
  .dossier-metrics > div {
    padding: 13px;
  }
  .dossier-metrics strong {
    font-size: 19px;
  }
  .auth-card {
    margin: 8vh 16px;
  }
  .form-columns {
    grid-template-columns: 1fr;
  }
  .decision-buttons > .button {
    width: 100%;
  }
}
