:root {
  --bg: #f3f4f6;
  --surface: #fff;
  --text: #23262d;
  --muted: #737985;
  --line: #e6e8ed;
  --accent: #ec2038;
  --accent-hover: #d4162d;
  --navy: #102039;
  --sidebar: #191a1e;
  --mark: #ffebbb;
  --error: #b42334;
  --radius: 12px;
  --shadow-field: 2px 3px 0 rgb(35 42 55 / 24%), 0 1px 2px rgb(35 42 55 / 5%);
  --shadow-button: 0 2px 0 rgb(35 42 55 / 15%), 0 3px 5px rgb(35 42 55 / 6%);
  --shadow-panel: 1px 3px 0 rgb(35 42 55 / 9%), 0 5px 16px rgb(35 42 55 / 4%);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button,
a {
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #ec203866;
  outline-offset: 3px;
}
input:focus,
select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow:
    var(--shadow-field),
    0 0 0 3px #ec20381c;
}
[hidden] {
  display: none !important;
}
.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 650;
}
h1 {
  letter-spacing: -1.2px;
  line-height: 1.2;
  font-size: 30px;
}
h2 {
  font-size: 14px;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 19px;
  letter-spacing: -0.5px;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.muted {
  color: var(--muted);
}
.error {
  color: var(--error);
  font-size: 12px;
}
.error:empty {
  display: none;
}
.overline,
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.65px;
  font-weight: 650;
  display: block;
}
.overline {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 60;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 12px;
  background: #fff;
  border-radius: 5px;
}
.skip-link:focus {
  transform: none;
}
.primary,
.secondary,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  min-height: 38px;
  font-weight: 600;
  border: 1px solid transparent;
  padding: 9px 14px;
}
.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-button);
}
.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow:
    0 3px 0 rgb(147 17 37 / 23%),
    0 5px 10px rgb(35 42 55 / 10%);
}
.secondary {
  background: #fff;
  border-color: #dfe2e8;
  color: #525966;
  box-shadow: var(--shadow-button);
}
.secondary:hover {
  background: #f5f6f8;
  border-color: #c5cbd4;
}
.primary:active:not(:disabled),
.secondary:active:not(:disabled) {
  box-shadow: 0 1px 0 rgb(35 42 55 / 15%);
}
.text-button {
  background: transparent;
  color: var(--muted);
  padding: 4px 0;
  min-height: 28px;
  font-size: 12px;
}
.text-button:hover {
  color: var(--accent);
}
.icon-button {
  background: transparent;
  color: var(--muted);
  padding: 8px;
  min-height: 34px;
}
.icon-button:hover {
  background: #eef0f3;
  color: var(--text);
}
.compact {
  font-size: 12px;
  min-height: 33px;
  padding: 7px 10px;
}
.compact .icon {
  width: 15px;
  height: 15px;
}
/* Date picker: a native-popover calendar above the scrolling filter panel. */
.date-control {
  display: block;
  position: relative;
  margin-top: 5px;
}
.date-control input[type="date"] {
  margin-top: 0;
  padding-right: 42px;
}
.date-control input::-webkit-calendar-picker-indicator {
  display: none;
}
.date-control-button {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 5px;
  background: #edf0f5;
  color: #41536d;
  display: grid;
  place-items: center;
  padding: 0;
}
.date-control-button .icon {
  width: 16px;
  height: 16px;
}
.date-control-button:hover,
.date-control-button[aria-expanded="true"] {
  background: #18191c;
  color: #fff;
}
.date-control-button:active:not(:disabled) {
  transform: translateY(-50%);
}
.date-picker {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 0;
  width: 310px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid #cbd2dd;
  border-radius: 12px;
  background: #fff;
  color: #25354c;
  box-shadow: 0 10px 32px rgb(16 24 39 / 24%);
  font-variant-numeric: tabular-nums;
}
.date-picker::backdrop {
  background: transparent;
}
.date-picker-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 73px 30px;
  gap: 6px;
  align-items: center;
  padding: 13px 11px;
  background: #18191c;
  color: #fff;
}
.date-picker-head select {
  background: #303239;
  color: #fff;
  border: 1px solid #494d57;
  box-shadow: none;
  border-radius: 5px;
  height: 34px;
  padding: 4px 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.date-picker-nav {
  display: grid;
  place-items: center;
  width: 30px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #e6e9ef;
  padding: 0;
}
.date-picker-nav:hover {
  background: #41454e;
  color: #fff;
}
.date-picker-nav .icon {
  width: 16px;
  height: 16px;
}
.previous-month .icon {
  transform: rotate(180deg);
}
.date-picker-weekdays,
.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  padding: 0 12px;
}
.date-picker-weekdays {
  padding-top: 13px;
  padding-bottom: 8px;
  color: #788398;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
}
.date-picker-days {
  padding-bottom: 12px;
}
.date-picker-day {
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: #2e3e56;
  font-size: 12px;
  font-weight: 500;
}
.date-picker-day.is-outside {
  color: #929bad;
}
.date-picker-day:hover:not(:disabled) {
  background: #edf0f5;
  color: #102039;
}
.date-picker-day[aria-current="date"] {
  border-color: #d91d35;
  color: #b92339;
  font-weight: 700;
}
.date-picker-day[aria-pressed="true"],
.date-picker-day[aria-pressed="true"]:hover {
  background: #d91d35;
  border-color: #d91d35;
  color: #fff;
  font-weight: 700;
}
.date-picker-day:focus-visible {
  outline: 2px solid #304f77;
  outline-offset: 1px;
}
.date-picker-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 13px;
  border-top: 1px solid #e2e7ef;
  background: #f5f6f9;
}
.date-picker-foot button {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}
.date-picker-clear {
  background: #fff;
  border: 1px solid #d4dae4;
  color: #526078;
}
.date-picker-clear:hover {
  background: #e8ecf3;
}
.date-picker-today {
  border: 1px solid #18191c;
  background: #18191c;
  color: #fff;
}
.date-picker-today:hover {
  background: #30343d;
}
@supports (appearance: base-select) {
  .date-picker-head select,
  .date-picker-head select::picker(select) {
    appearance: base-select;
  }
  .date-picker-head select::picker(select) {
    max-height: 230px;
    overflow-y: auto;
    margin-top: 5px;
    padding: 5px;
    background: #18191c;
    border: 1px solid #494d57;
    border-radius: 7px;
    color: #fff;
  }
  .date-picker-head option {
    padding: 7px 9px;
    border-radius: 4px;
    font-size: 12px;
  }
  .date-picker-head option:checked {
    background: #d91d35;
    color: #fff;
  }
  .date-picker-head option:hover {
    background: #41454e;
  }
}
/* The application shell */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 222px;
  background: var(--sidebar);
  color: #a5a7b0;
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow-y: auto;
  scrollbar-width: thin;
  border-right: 1px solid #26272c;
}
.brand {
  height: 99px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 25px 12px;
  border-bottom: 1px solid #ffffff0b;
  margin-bottom: 27px;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 103px;
  height: 55px;
  object-fit: contain;
  margin-left: -10px;
}
.brand span {
  font-size: 8px;
  letter-spacing: 2px;
  color: #a7a8b0;
  font-weight: 650;
  margin-top: -3px;
}
.sidebar-section-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #7c7e89;
  font-weight: 650;
  padding: 0 24px;
  margin-bottom: 11px;
}
.main-nav,
.library-nav {
  padding: 0 12px;
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  background: none;
  border: 0;
  border-radius: 7px;
  color: #b0b2bb;
  font-size: 12px;
  min-height: 41px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-item .icon {
  width: 17px;
  height: 17px;
  color: #9699a4;
}
.nav-item:hover {
  background: #ffffff09;
  color: #fff;
}
.nav-item.active {
  color: white;
  background: var(--accent);
  box-shadow: 0 4px 12px #00000012;
}
.nav-item.active .icon {
  color: #fff;
}
.nav-tail {
  margin-left: auto;
  width: 14px !important;
  height: 14px !important;
  opacity: 0.7;
}
.nav-count {
  margin-left: auto;
  font-size: 11px;
  background: #2c2d33;
  padding: 1px 6px;
  border-radius: 4px;
  color: #b5b7c0;
}
.active .nav-count {
  background: #ffffff26;
  color: #fff;
}
.library-label {
  margin-top: 35px;
}
.file-ext {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 0.3px;
  color: #777a84;
  border: 1px solid #3c3d44;
  border-radius: 3px;
  padding: 1px 4px;
}
.active .file-ext {
  color: #fff;
  border-color: #ffffff55;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
}
.workspace-note {
  margin: 0 19px 22px;
  padding: 15px 0 0;
  border-top: 1px solid #ffffff10;
  color: #c5c6cd;
  font-size: 11px;
}
.workspace-note p {
  font-size: 11px;
  color: #80838f;
  margin-top: 6px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c9c8b;
  vertical-align: middle;
  margin-right: 5px;
}
.workspace-note .status-dot {
  background: #ed344a;
  width: 5px;
  height: 5px;
}
.sidebar-bottom > .nav-item {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
}
.user-profile {
  border-top: 1px solid #ffffff10;
  padding: 20px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 33px;
  height: 33px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #303138;
  color: #e6e7eb;
  font-size: 12px;
  font-weight: 650;
}
.user-profile > div {
  min-width: 0;
  flex: 1;
}
.user-profile strong {
  font-size: 12px;
  color: #e6e7eb;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.user-profile > div > span {
  display: block;
  font-size: 11px;
  color: #80838c;
  margin-top: 3px;
}
.user-profile .icon-button {
  padding: 5px;
  color: #8a8d98;
}
.user-profile .icon-button:hover {
  background: #ffffff0a;
  color: #fff;
}
.user-profile .icon {
  width: 15px;
}
.app-main {
  margin-left: 222px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.topbar {
  height: 65px;
  background: #fff;
  border-bottom: 1px solid #e0e3e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 12px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 12px;
  color: #9296a0;
}
.breadcrumb strong {
  color: #3c414a;
  font-weight: 600;
}
.breadcrumb-slash {
  color: #c9ccd3;
}
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}
.internal-label {
  color: #858a94;
}
.date-display {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #616773;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.date-display .icon {
  width: 15px;
  height: 15px;
}
.page-content {
  max-width: 1680px;
  margin: 0 auto;
  padding: 29px 32px 0;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading .overline {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #9296a0;
  margin-bottom: 7px;
}
.page-heading p {
  color: #7b808a;
  font-size: 12px;
  margin-top: 9px;
}
.refresh-button {
  font-size: 12px;
  min-height: 33px;
  background: transparent;
  padding: 7px 10px;
  align-self: flex-end;
  margin-bottom: 2px;
}
.refresh-button .icon {
  width: 14px;
  height: 14px;
}
/* Live document counts */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.metric {
  background: var(--navy);
  color: white;
  border: 1px solid #22334c;
  border-radius: 11px;
  padding: 18px 20px 17px;
  min-height: 130px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.metric:first-child {
  background: #142640;
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c5cddc;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  min-height: 18px;
  padding-right: 48px;
}
.metric-kpi-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 52px;
  height: 52px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 2px rgb(4 12 25 / 30%));
}
.metric strong {
  display: block;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.metric-note {
  display: block;
  font-size: 11px;
  color: #a3b0c4;
  margin-top: 5px;
}
.metrics + .error {
  margin: -10px 0 15px;
}
/* Search workspace */
.workspace-grid {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}
.workspace-grid > .ask-panel {
  grid-column: 1 / -1;
  width: 100%;
}
.workspace-grid > .ask-panel .ask {
  flex-wrap: nowrap;
}
.workspace-grid > .ask-panel .ask input {
  flex: 1 1 auto;
  width: 0;
}
.workspace-grid > .ask-panel .ask .primary {
  width: auto;
}
.filters form,
.results-panel,
.history-panel {
  border: 1px solid #e1e4e9;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.filters {
  position: sticky;
  top: 22px;
}
.filters form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 44px);
}
.panel-heading {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  min-height: 66px;
}
.panel-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel-heading h2 > .icon {
  width: 16px;
  height: 16px;
  color: #7b818c;
}
.panel-heading .text-button {
  color: #9196a1;
  font-size: 12px;
  font-weight: 500;
}
.panel-heading .text-button:hover {
  color: var(--accent);
}
.filters .panel-heading,
.upload-panel > .panel-heading {
  background: #18191c;
  color: #fff;
  border-bottom-color: #18191c;
}
.filters .panel-heading h2 > .icon,
.upload-panel > .panel-heading h2 > .icon {
  color: #c8cbd2;
}
.filters .panel-heading .text-button,
.upload-panel > .panel-heading .text-button {
  color: #d5d8df;
}
.filters .panel-heading .text-button:hover,
.upload-panel > .panel-heading .text-button:hover {
  color: #ff9aaa;
}
.filters #advanced-filters {
  border: 0;
}
.filters #advanced-filters > summary {
  background: #18191c;
  color: #fff;
  padding: 13px 12px;
  border-radius: 6px;
  font-weight: 600;
}
.filters #advanced-filters > summary .icon {
  color: #d5d8df;
}
.filters #advanced-filters > summary:hover {
  background: #27292e;
}
.filters #advanced-filters .advanced-fields {
  padding-top: 16px;
}
.filter-fields {
  padding: 17px 20px 18px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}
.filter-actions {
  flex-shrink: 0;
  padding: 16px 20px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.filter-actions .search-submit {
  justify-content: center;
}
.filter-actions .button-shortcut {
  margin-left: auto;
}
.filter-intro {
  font-size: 12px;
  color: #737b88;
  margin-bottom: 14px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #565c68;
  margin-bottom: 12px;
}
input,
select {
  width: 100%;
  height: 38px;
  border: 1px solid #d5d9e1;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  min-width: 0;
  box-shadow: var(--shadow-field);
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
input:hover:not(:focus),
select:hover:not(:focus) {
  border-color: #b9c0cd;
}
/* Keep native selection, keyboard controls, and form behavior while styling
   the browser's top-layer picker so it is not clipped by the filter panel. */
@supports (appearance: base-select) {
  #search-form select[name="kind"],
  #search-form select[name="kind"]::picker(select) {
    appearance: base-select;
  }
  #search-form select[name="kind"] {
    display: flex;
    align-items: center;
    gap: 9px;
    height: auto;
    min-height: 42px;
    padding: 9px 11px;
    cursor: pointer;
  }
  #search-form select[name="kind"]::picker-icon {
    color: #526078;
    margin-left: auto;
    transition: transform 0.18s;
  }
  #search-form select[name="kind"]:open::picker-icon {
    transform: rotate(180deg);
  }
  #search-form select[name="kind"]::picker(select) {
    margin-top: 7px;
    padding: 6px;
    border: 1px solid #414650;
    border-radius: 10px;
    background: #18191c;
    color: #f3f4f7;
    box-shadow: 0 8px 24px rgb(16 24 39 / 24%);
  }
  #search-form select[name="kind"] option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 43px;
    padding: 9px 11px;
    border-radius: 6px;
    color: #e1e5ed;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
  }
  #search-form select[name="kind"] option::before {
    content: "";
    display: block;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    background: url("icons/documents-indexed.svg") center / contain no-repeat;
  }
  #search-form select[name="kind"] option[value="pdf"]::before {
    background-image: url("icons/file-pdf.svg");
  }
  #search-form select[name="kind"] option[value="email"]::before {
    background-image: url("icons/file-email.svg");
  }
  #search-form select[name="kind"] option[value="docx"]::before {
    background-image: url("icons/file-word.svg");
  }
  #search-form select[name="kind"] option[value="xlsx"]::before {
    background-image: url("icons/file-spreadsheet.svg");
  }
  #search-form select[name="kind"] option:hover,
  #search-form select[name="kind"] option:focus-visible {
    background: #30343d;
    color: #fff;
    outline: none;
  }
  #search-form select[name="kind"] option:checked {
    background: #d91d35;
    color: #fff;
  }
  #search-form select[name="kind"] option::checkmark {
    order: 1;
    margin-left: auto;
    color: #fff;
  }
}
input::placeholder {
  color: #737b88;
  font-weight: 400;
  font-size: 12px;
}
label input,
label select {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 400;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
  min-width: 0;
}
legend {
  padding: 0;
  font-weight: 600;
  font-size: 12px;
  color: #565c68;
  margin-bottom: 7px;
  width: 100%;
}
.label-hint {
  float: right;
  color: #a0a5af;
  font-size: 10px;
  font-weight: 500;
}
.range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.range span {
  font-size: 12px;
  color: #a5aab3;
}
.range input {
  font-size: 12px;
  padding: 8px;
}
details {
  margin: 3px 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: #6f7581;
  padding: 14px 0;
}
summary::-webkit-details-marker {
  display: none;
}
summary .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.2s;
}
details[open] summary .icon {
  transform: rotate(180deg);
}
.advanced-fields {
  padding-top: 5px;
}
.search-submit {
  width: 100%;
  font-size: 12px;
  gap: 9px;
  min-height: 39px;
  justify-content: flex-start;
  padding: 10px 12px;
}
.search-submit .icon {
  width: 15px;
  height: 15px;
}
.button-shortcut {
  margin-left: auto;
  color: #ffffffb3;
  font-size: 14px;
}
.filter-tip {
  text-align: center;
  color: #737b88;
  font-size: 10px;
  margin-top: 10px;
}
#filter-error {
  margin-bottom: 12px;
}
.results-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 18px;
}
.results-pane > .results-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.results-pane > .answer {
  flex-shrink: 0;
}
.ask-panel {
  background: var(--navy);
  padding: 21px 22px 20px;
  border-radius: var(--radius);
  color: white;
  position: relative;
  overflow: hidden;
  border: 1px solid #263751;
  box-shadow: var(--shadow-panel);
}
.ask-panel:after {
  content: "";
  position: absolute;
  right: -40px;
  top: -140px;
  border: 1px solid #ffffff06;
  border-radius: 50%;
  width: 320px;
  height: 320px;
  pointer-events: none;
}
.ask-heading {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 17px;
}
.ai-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
}
.ai-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 3px 2px rgb(4 12 25 / 30%));
}
.ask-heading h2 {
  font-size: 14px;
  font-weight: 600;
  color: #f7f8fa;
}
.ask-heading p {
  font-size: 11px;
  color: #9eacc1;
  margin-top: 3px;
}
.ai-label {
  font-size: 8px;
  letter-spacing: 1.1px;
  margin-left: auto;
  color: #b8c3d4;
  border: 1px solid #ffffff23;
  padding: 4px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.ask {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.ask input {
  background: #fff;
  height: 40px;
  padding: 10px 13px;
  border: 1px solid #d5d9e1;
  font-size: 12px;
}
.ask input::placeholder {
  font-size: 12px;
  color: #737b88;
}
.ask .primary {
  font-size: 12px;
  padding: 10px 14px;
  white-space: nowrap;
  min-height: 40px;
}
.ask .primary .icon {
  width: 15px;
  height: 15px;
}
.answer {
  border: 1px solid #f2cbd0;
  border-left: 3px solid var(--accent);
  padding: 19px 22px;
  border-radius: 8px;
  background: #fff;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.8;
}
.answer:before {
  content: "AI RESPONSE";
  display: block;
  color: var(--accent);
  letter-spacing: 1.2px;
  font-size: 10px;
  font-weight: 650;
  margin-bottom: 8px;
}
.applied {
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 10px;
  color: var(--muted);
  white-space: normal;
  font-size: 11px;
}
.results-heading {
  padding: 18px 22px;
  min-height: 76px;
}
.results-heading h2 {
  font-size: 13px;
}
.results-heading > div > span {
  display: block;
  font-size: 11px;
  color: #737b88;
  margin-top: 3px;
}
.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  border-radius: 5px;
  color: #868c98;
  background: #f0f2f5;
  font-size: 11px;
  font-weight: 600;
  padding: 0 5px;
}
.results-heading .secondary {
  background: white;
  font-size: 11px;
  border-color: #e5e7ec;
  color: #6f7580;
}
.status {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 22px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
}
.status:empty {
  display: none;
}
.status.is-error {
  color: var(--error);
  background: #fff4f5;
}
.empty-state {
  flex: 1;
  text-align: center;
  padding: 29px 20px 30px;
  min-height: 355px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.empty-state > .overline {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #9a9eaa;
  margin: 4px 0 10px;
}
.empty-state h3 {
  font-size: 20px;
  letter-spacing: -0.6px;
  font-weight: 600;
}
.empty-state > p {
  font-size: 12px;
  line-height: 1.85;
  color: #737b88;
  margin-top: 10px;
  max-width: 430px;
}
.empty-art {
  width: 180px;
  height: 126px;
  margin: 0 auto 18px;
}
.empty-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.suggestion-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgb(35 42 55 / 12%));
}
.search-suggestions {
  margin-top: 27px;
  max-width: 100%;
}
.search-suggestions > span {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: #737b88;
  font-weight: 600;
}
.search-suggestions > div {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 11px;
}
.search-suggestions button {
  background: #18191c;
  border: 1px solid #18191c;
  color: #f3f4f7;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 11px;
}
.search-suggestions button .icon {
  width: 13px;
  height: 13px;
  color: #c8cbd2;
}
.search-suggestions button .icon:last-child {
  margin-left: 3px;
  width: 12px;
  height: 12px;
}
.search-suggestions button:hover {
  border-color: #ec2038;
  background: #27292e;
  color: #fff;
}
#empty-reset {
  margin-top: 22px;
  font-size: 12px;
}
.results-note {
  margin-top: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-top: 1px solid #303239;
  padding: 13px 20px;
  color: #d5d8df;
  font-size: 10px;
  background: #18191c;
}
.results-note .icon {
  width: 13px;
  height: 13px;
  color: #d5d8df;
}
.workspace-hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #737b88;
  padding: 0 3px;
}
.workspace-hint > .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}
.workspace-hint p {
  font-size: 11px;
  line-height: 1.7;
}
.workspace-hint strong {
  color: #6d7480;
  font-weight: 600;
}
.workspace-hint .text-button {
  white-space: nowrap;
  margin-left: auto;
  min-height: 20px;
  padding: 0;
  font-size: 11px;
}
.workspace-hint .text-button .icon {
  width: 13px;
  height: 13px;
}
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #a3a6af;
  background: var(--sidebar);
  border-top: 1px solid var(--accent);
  padding: 28px 32px;
  margin-top: 30px;
  min-height: 140px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}
.footer-logo {
  width: 80px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-copy h2 {
  color: #e2e4ea;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}
.footer-copy p {
  max-width: 440px;
  font-size: 12px;
  line-height: 1.8;
}
.footer-copyright {
  margin-left: auto;
  font-size: 11px;
  white-space: nowrap;
}
.footer-assistant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-shrink: 0;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #373940;
  background: transparent;
  color: #f3f4f7;
  font-size: 13px;
  font-weight: 600;
}
.footer-assistant:hover {
  border-color: #ed5268;
  background: #ffffff06;
  box-shadow: 0 3px 12px rgb(0 0 0 / 15%);
}
.footer-assistant img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
/* Search results and feedback */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #f1d9dd;
  border-radius: 5px;
  background: #fff5f6;
  color: #9d4652;
  font-size: 11px;
  padding: 5px 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.filter-chip:hover {
  background: #ffe7eb;
}
.filter-chip .icon {
  width: 12px;
  height: 12px;
}
.results {
  list-style: none;
  margin: 0;
  padding: 0;
}
.result {
  padding: 21px 22px;
  border-bottom: 1px solid var(--line);
  animation: appear 0.25s ease-out both;
}
.result:last-child {
  border-bottom: 0;
}
.result:hover {
  background: #fdfdfe;
}
.r-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.kind {
  font-size: 8px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #ad4a59;
  background: #fff0f2;
  border: 1px solid #f8dbe0;
  border-radius: 4px;
  padding: 4px 6px;
  flex-shrink: 0;
}
.kind[data-kind="email"] {
  color: #596b87;
  background: #eef2f9;
  border-color: #dde5f2;
}
.kind[data-kind="xlsx"] {
  color: #507b66;
  background: #eff7f2;
  border-color: #dfede4;
}
.r-title {
  font-size: 12px;
  font-weight: 650;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.link {
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  color: #2e3747;
}
.link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.value {
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #263348;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 17px;
  margin: 13px 0 10px;
  font-size: 11px;
}
.facts > div {
  display: flex;
  gap: 5px;
}
.facts dt {
  color: #737b88;
}
.facts dd {
  margin: 0;
  color: #596272;
  overflow-wrap: anywhere;
}
.snippet {
  font-size: 12px;
  line-height: 1.8;
  color: #7e8795;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
mark {
  background: var(--mark);
  color: #775a24;
  border-radius: 2px;
  padding: 0 2px;
}
.r-foot {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 13px;
  color: #737b88;
  font-size: 10px;
}
.source {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.open {
  color: #727b8c;
  white-space: nowrap;
}
.open:hover {
  color: var(--accent);
}
.open .icon {
  width: 11px;
  height: 11px;
  margin-left: 4px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  color: #828a98;
  font-size: 11px;
}
.pager > div {
  display: flex;
  gap: 7px;
}
.pager .secondary {
  font-size: 11px;
}
.loading-state {
  padding: 0 22px;
}
.skeleton-row {
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
.skeleton-row:last-child {
  border-bottom: 0;
}
.skeleton-row i {
  display: block;
  height: 12px;
  background: #f0f2f5;
  border-radius: 4px;
  width: 65%;
  margin-bottom: 14px;
  animation: pulse 1.2s ease-in-out infinite;
}
.skeleton-row i:nth-child(2) {
  width: 90%;
  height: 9px;
}
.skeleton-row i:nth-child(3) {
  width: 45%;
  height: 9px;
  margin: 0;
}
.history-panel {
  min-height: 360px;
}
.session-label {
  font-size: 8px;
  letter-spacing: 1px;
  background: #f2f3f6;
  padding: 4px 6px;
  border-radius: 4px;
  color: #8c929e;
}
.history-empty {
  text-align: center;
  padding: 65px 20px;
  color: var(--muted);
}
.history-empty > .icon {
  width: 36px;
  height: 36px;
  color: #a4acb9;
  margin-bottom: 18px;
}
.history-empty h3 {
  color: var(--text);
}
.history-empty p {
  font-size: 12px;
  margin: 10px 0 24px;
}
#history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.history-entry {
  display: flex;
  width: 100%;
  padding: 21px 24px;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--text);
}
.history-entry:hover {
  background: #fafbfc;
}
.history-entry > .icon {
  color: #9aa2af;
}
.history-entry > div {
  flex: 1;
  min-width: 0;
}
.history-entry strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.history-entry small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
/* Readable AI search and document result cards. */
.results-pane {
  container-type: inline-size;
}
.ask-panel .ask-heading h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
}
.ask-panel .ask-heading p {
  color: #b6c3d6;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 4px;
}
.ask-panel .ask input {
  height: 48px;
  padding: 12px 15px;
  font-size: 13px;
}
.ask-panel .ask .primary {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 13px;
}
.ask-examples {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ask-examples > span {
  color: #a7b6cd;
  font-size: 11px;
  margin-right: 2px;
}
.ask-examples button {
  border: 1px solid #14746f;
  background: #14746f;
  border-radius: 5px;
  padding: 5px 9px;
  color: #fff;
  font-size: 11px;
  text-align: left;
}
.ask-examples button:hover {
  background: #0d5c58;
  border-color: #0d5c58;
  color: white;
}
.ask-examples button:nth-of-type(2) {
  background: #305da8;
  border-color: #305da8;
}
.ask-examples button:nth-of-type(2):hover {
  background: #254b89;
  border-color: #254b89;
}
#search-workspace .workspace-panel-heading {
  --workspace-header-height: 80px;
  box-sizing: border-box;
  height: var(--workspace-header-height);
  min-height: var(--workspace-header-height);
  max-height: var(--workspace-header-height);
  flex: 0 0 var(--workspace-header-height);
  padding: 16px 20px;
  background: #18191c;
  color: #fff;
  border-bottom-color: #18191c;
}
.filters .panel-heading h2,
.results-panel .results-heading h2 {
  font-size: 15px;
  line-height: 22px;
  font-weight: 650;
}
.results-heading > div {
  min-width: 0;
}
.results-panel #results-subtitle {
  font-size: 12px;
  margin-top: 5px;
  color: #c8cbd2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.results-panel #results-subtitle:empty {
  display: none;
}
.results-panel .results-heading .secondary {
  background: #303239;
  border-color: #555963;
  color: #fff;
  box-shadow: none;
}
.results-panel .results-heading .secondary:hover:not(:disabled) {
  background: #41444d;
  border-color: #8c929e;
}
.results-panel .count-badge {
  background: #fff0f2;
  color: #bf2941;
  font-size: 12px;
  min-width: 26px;
  height: 23px;
}
.results-panel .active-filters {
  background: #fcfcfd;
}
.results-panel .filter-chip {
  font-size: 12px;
  padding: 6px 9px;
}
.results-panel .results {
  padding: 16px;
  background: #f5f6f8;
  display: grid;
  gap: 14px;
}
.results-panel .results:empty {
  padding: 0;
}
.results-panel .result {
  background: #fff;
  border: 1px solid #ccd5e1;
  border-radius: 10px;
  padding: 21px;
  box-shadow: none;
  overflow: hidden;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.results-panel .result:hover {
  border-color: #899db9;
  box-shadow: none;
}
.result .r-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -21px -21px 0;
  padding: 18px 21px;
  background: #102039;
  color: #fff;
}
.r-document-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  background: #263b56;
  border-radius: 8px;
}
.r-document-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.r-identity {
  min-width: 0;
}
.result .r-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  color: #fff;
}
.result .r-title:hover {
  color: #ffb1be;
}
.r-document-name {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  min-width: 0;
}
.result .kind {
  font-size: 9px;
  padding: 2px 5px;
  letter-spacing: 0.2px;
  background: #ec2038;
  border-color: #ec2038;
  color: #fff;
}
.r-filename {
  font-size: 11px;
  color: #c3cede;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.r-amount {
  text-align: right;
  padding-left: 10px;
}
.amount-label {
  display: block;
  font-size: 10px;
  color: #c3cede;
  margin-bottom: 4px;
}
.result .value {
  display: block;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.3px;
  color: #fff;
  margin: 0;
}
.result .is-unavailable .value {
  font-size: 12px;
  color: #c3cede;
  font-weight: 500;
}
.result .facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 12px;
  padding: 13px 14px;
  border-radius: 7px;
  background: #e6ebf2;
}
.result .facts > div {
  display: block;
  min-width: 0;
}
.result .facts dt {
  font-size: 11px;
  font-weight: 700;
  color: #102039;
  margin-bottom: 7px;
}
.result .facts dd {
  font-size: 12px;
  font-weight: 500;
  color: #25354c;
  line-height: 1.6;
}
.r-products {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #445570;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 11px;
}
.r-products .icon {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: #516885;
}
.result .result-excerpt {
  border: 0;
  margin: 0;
}
.result-excerpt > summary {
  display: inline-flex;
  gap: 7px;
  padding: 5px 0;
  color: #354f70;
  font-size: 11px;
  font-weight: 500;
}
.result-excerpt > summary:hover {
  color: var(--accent);
}
.result-excerpt > summary .icon {
  width: 14px;
  height: 14px;
}
.result .snippet {
  display: block;
  margin: 8px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #ec2038;
  background: #102039;
  border-radius: 0 5px 5px 0;
  color: #e2e9f3;
  font-size: 12px;
  line-height: 1.8;
}
.result .snippet mark {
  background: #ffd77a;
  color: #30220b;
}
.result .r-foot {
  border-top: 1px solid #dce2eb;
  padding-top: 13px;
  margin-top: 14px;
  align-items: center;
}
.r-source {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 70%;
}
.r-source > .icon {
  width: 13px;
  height: 13px;
  color: #8995a8;
}
.r-source .source {
  min-width: 0;
  max-width: none;
  font-size: 10px;
  color: #52627b;
}
.result .open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #102039;
  border-radius: 5px;
  padding: 8px 11px;
  text-decoration: none;
}
.result .open:hover {
  color: #fff;
  background: #d91d35;
}
@container (max-width: 620px) {
  .results-panel .result {
    padding: 17px;
  }
  .results-panel .results {
    padding: 12px;
    gap: 12px;
  }
  .result .r-head {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    margin: -17px -17px 0;
    padding: 16px 17px;
  }
  .r-document-icon {
    width: 40px;
    height: 44px;
  }
  .r-document-icon img {
    width: 38px;
    height: 38px;
  }
  .result .r-title {
    font-size: 15px;
  }
  .r-amount {
    grid-column: 2;
    text-align: left;
    padding-left: 0;
    margin-top: 3px;
  }
  .amount-label {
    display: inline;
    margin-right: 7px;
  }
  .result .value {
    display: inline;
    font-size: 15px;
  }
  .result .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }
  .result .r-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .r-source {
    max-width: 100%;
  }
  .ask-panel .ask-heading h2 {
    font-size: 16px;
  }
  .ask-panel .ask-heading p {
    font-size: 12px;
  }
}

/* Document viewer and search guide */
dialog {
  width: min(900px, calc(100vw - 36px));
  max-height: calc(100dvh - 60px);
  border: 1px solid #e2e5eb;
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: 0 28px 100px #0e172344;
}
dialog::backdrop {
  background: #10172488;
  backdrop-filter: blur(4px);
}
.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 23px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.doc-head .overline {
  font-size: 8px;
  margin-bottom: 6px;
}
.doc-head h2 {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.doc-head > div {
  min-width: 0;
}
#doc-body {
  padding: 24px 26px;
  overflow-wrap: anywhere;
}
#doc-body .facts {
  background: #f7f8fa;
  border-radius: 8px;
  padding: 18px;
  margin: 0 0 20px;
  gap: 12px 25px;
  font-size: 12px;
}
#doc-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#doc-body th,
#doc-body td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}
#doc-body th {
  font-size: 11px;
  color: #7d8592;
  font-weight: 600;
  background: #f7f8fa;
}
#doc-body .num {
  text-align: right;
}
#doc-body pre {
  white-space: pre-wrap;
  background: #f7f8fa;
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 8px;
  max-height: 45vh;
  overflow: auto;
  font-size: 12px;
  line-height: 1.9;
  color: #5d6879;
}
#doc-body > p {
  margin: 20px 0;
  font-size: 12px;
}
.table-scroll {
  overflow-x: auto;
}
.document-heading {
  font-size: 12px;
  color: #7d8592;
  margin: 20px 0 8px;
}
#help-dialog {
  max-width: 550px;
}
.guide-content {
  padding: 10px 26px 25px;
}
.guide-content article {
  display: flex;
  gap: 20px;
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
}
.guide-content article:last-child {
  border-bottom: 0;
}
.guide-content article > span {
  font-size: 12px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.guide-content h3 {
  font-size: 14px;
  letter-spacing: 0;
}
.guide-content p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 6px;
}
/* Sign in */
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: var(--sidebar);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 45px 10%;
  border-bottom: 5px solid var(--accent);
  position: relative;
  overflow: hidden;
}
.login-story:after {
  content: "";
  position: absolute;
  width: 550px;
  height: 550px;
  border: 1px solid #ffffff07;
  border-radius: 50%;
  left: 45%;
  top: 27%;
  pointer-events: none;
}
.login-logo {
  width: 155px;
  height: 100px;
  object-fit: contain;
  margin-left: -20px;
}
.login-story h1 {
  font-size: clamp(32px, 3.4vw, 54px);
  letter-spacing: -2px;
  line-height: 1.15;
  margin: 24px 0;
  color: #f7f8fb;
}
.eyebrow {
  color: #f26779;
  font-size: 10px;
}
.login-story p {
  max-width: 320px;
  color: #9ca2af;
  line-height: 1.9;
  font-size: 13px;
}
.login-copyright {
  font-size: 11px;
  color: #717784;
}
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
  background: #fafbfc;
}
.login-card {
  width: 100%;
  max-width: 350px;
}
.login-card h2 {
  font-size: 26px;
  letter-spacing: -0.9px;
  line-height: 1.25;
  margin: 12px 0;
}
.login-card > .muted {
  font-size: 12px;
  margin-bottom: 34px;
}
.login-card label {
  font-size: 12px;
  margin-bottom: 20px;
}
.login-card input {
  height: 45px;
  background: #fff;
}
.login-card .primary {
  width: 100%;
  justify-content: space-between;
  margin-top: 12px;
  height: 43px;
  font-size: 12px;
}
.login-note {
  display: flex;
  gap: 7px;
  color: #9298a4;
  font-size: 11px;
  margin-top: 24px;
  line-height: 1.7;
}
.login-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
.login-card .error {
  margin: 10px 0;
}
.mobile-only {
  display: none;
}
.sidebar-shade {
  position: fixed;
  inset: 0;
  background: #10172466;
  border: 0;
  z-index: 25;
  backdrop-filter: blur(2px);
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Upload documents */
.upload-body {
  padding: 22px 24px 8px;
}
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 38px 20px;
  border: 1.5px dashed #c9ced6;
  border-radius: var(--radius);
  background: #fafbfc;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s;
}
.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--accent);
  background: #fff6f7;
}
.dropzone:focus-within {
  outline: 3px solid #ec203866;
  outline-offset: 3px;
}
.dropzone.is-busy {
  cursor: progress;
  opacity: 0.7;
}
.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: inherit;
}
.dropzone > .upload-illustration {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 10px;
  pointer-events: none;
  filter: drop-shadow(0 3px 2px rgb(35 42 55 / 12%));
}
.dropzone strong {
  font-size: 14px;
}
.dropzone span {
  color: var(--muted);
  font-size: 12px;
}
.upload-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.upload-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: #eceef2;
  overflow: hidden;
}
.upload-progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s;
}
.upload-body .error {
  margin: 12px 0 0;
}
.upload-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 14px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.upload-note .icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: #2f8f5b;
}
.upload-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.upload-list-heading h3 {
  margin: 0;
  font-size: 13px;
}
.upload-empty {
  margin: 0;
  padding: 28px 24px;
  color: var(--muted);
  text-align: center;
}
.upload-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.upload-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  border-radius: 9px;
  background: #f1f4f8;
}
.upload-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 1px rgb(35 42 55 / 12%));
}
.upload-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.upload-info strong {
  overflow-wrap: anywhere;
}
.upload-info span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.upload-status {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #303239;
  color: #fff;
  white-space: nowrap;
}
.status-done .upload-status {
  background: #187442;
  color: #fff;
}
.status-queued .upload-status,
.status-processing .upload-status {
  background: #8a5a00;
  color: #fff;
}
.status-error .upload-status,
.status-rejected .upload-status {
  background: #b42334;
  color: #fff;
}

@media (min-width: 1600px) {
  .page-content {
    padding-top: 35px;
  }
  .page-heading {
    margin-bottom: 28px;
  }
  .metric {
    padding: 21px 24px;
    min-height: 145px;
  }
  .metrics {
    gap: 20px;
    margin-bottom: 29px;
  }
  .metric strong {
    font-size: 34px;
  }
  .workspace-grid {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 25px;
  }
  .filter-fields {
    padding: 20px 24px;
  }
  .ask-panel {
    padding: 25px;
  }
  .empty-state {
    min-height: 405px;
  }
  .empty-art {
    margin-bottom: 26px;
  }
  .empty-state h3 {
    font-size: 23px;
  }
  .search-suggestions {
    margin-top: 32px;
  }
  .results-heading {
    padding: 20px 25px;
  }
  .page-heading h1 {
    font-size: 33px;
  }
}
@media (max-width: 1190px) {
  .sidebar {
    width: 200px;
  }
  .app-main {
    margin-left: 200px;
  }
  .brand {
    padding-left: 24px;
  }
  .nav-item {
    font-size: 12px;
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .file-ext {
    font-size: 7px;
  }
  .page-content {
    padding: 25px 24px 0;
  }
  .topbar {
    padding: 0 24px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px 14px;
    min-height: 125px;
  }
  .metric-top {
    font-size: 11px;
  }
  .metric-note {
    font-size: 10px;
  }
  .metric-kpi-icon {
    width: 44px;
    height: 44px;
    right: 11px;
    top: 13px;
  }
  .workspace-grid {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 16px;
  }
  .filter-fields {
    padding: 17px;
  }
  .panel-heading {
    padding-left: 17px;
    padding-right: 17px;
  }
  .ask-panel {
    padding: 18px;
  }
  .ask-heading h2 {
    font-size: 12px;
  }
  .ask-heading p {
    font-size: 10px;
  }
  .ai-label {
    display: none;
  }
  .ask input::placeholder {
    font-size: 11px;
  }
  .ask .primary {
    padding: 9px 11px;
  }
  .empty-state h3 {
    font-size: 18px;
  }
  .search-suggestions button {
    font-size: 10px;
    padding: 7px;
  }
  .workspace-hint .text-button {
    display: none;
  }
  .r-head {
    flex-wrap: wrap;
  }
  .value {
    margin-left: auto;
  }
  .r-title {
    flex-basis: 65%;
  }
  .topbar-tools {
    gap: 14px;
  }
}
@media (max-width: 980px) {
  .page-footer {
    flex-wrap: wrap;
  }
  .footer-brand {
    flex-basis: 100%;
  }
  .footer-copyright {
    margin-left: 0;
  }
  .sidebar {
    width: 185px;
  }
  .app-main {
    margin-left: 185px;
  }
  .nav-item {
    font-size: 11px;
  }
  .main-nav,
  .library-nav {
    padding: 0 9px;
  }
  .nav-item .icon {
    width: 15px;
    height: 15px;
  }
  .file-ext {
    display: none;
  }
  .page-content {
    padding: 23px 20px 0;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .metric {
    min-height: 116px;
    padding: 15px 18px;
  }
  .metric strong {
    font-size: 27px;
    margin-top: 8px;
  }
  .metric-note {
    font-size: 11px;
  }
  .metric-top {
    font-size: 12px;
  }
  .workspace-grid {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 14px;
  }
  .empty-state h3 {
    max-width: 260px;
  }
  .empty-state > p br {
    display: none;
  }
  .ask {
    flex-wrap: wrap;
  }
  .ask input {
    flex-basis: 100%;
  }
  .ask .primary {
    width: 100%;
  }
  .ask-heading {
    margin-bottom: 12px;
  }
  .internal-label {
    display: none;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading p {
    max-width: 390px;
  }
  .refresh-button {
    align-self: center;
  }
  .search-suggestions > div {
    gap: 6px;
  }
  .search-suggestions button {
    font-size: 11px;
  }
  .results-heading > div > span {
    max-width: 170px;
  }
  .user-profile {
    padding: 15px 11px;
    gap: 8px;
  }
  .workspace-note {
    font-size: 10px;
  }
  .workspace-note p {
    font-size: 10px;
  }
  .avatar {
    width: 28px;
    height: 28px;
  }
  .user-profile strong {
    font-size: 11px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    width: 230px;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .sidebar.is-open {
    transform: none;
  }
  .sidebar .nav-item {
    font-size: 12px;
  }
  .sidebar .file-ext {
    display: block;
  }
  .app-main {
    margin-left: 0;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    height: 59px;
    padding: 0 18px;
  }
  .breadcrumb {
    gap: 9px;
    font-size: 12px;
  }
  .breadcrumb .icon-button {
    margin-left: -8px;
    padding: 7px;
  }
  .date-display {
    border: 0;
    padding: 0;
    font-size: 11px;
  }
  .topbar-tools {
    gap: 0;
  }
  .page-content {
    padding: 23px 18px 0;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .page-heading .overline {
    font-size: 8px;
  }
  .metrics {
    margin-bottom: 20px;
  }
  .metric {
    border-radius: 9px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .filters {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .filters form {
    max-height: none;
  }
  .filter-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    padding: 18px;
    overflow: visible;
    scrollbar-gutter: auto;
  }
  .filter-intro {
    grid-column: 1/-1;
    margin-bottom: 16px;
  }
  label,
  fieldset {
    margin-bottom: 16px;
  }
  details,
  .search-submit,
  .filter-tip,
  #filter-error {
    grid-column: 1/-1;
  }
  details {
    margin-bottom: 17px;
  }
  .advanced-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
  .search-submit {
    justify-content: center;
  }
  .button-shortcut {
    margin-left: 0;
  }
  .panel-heading {
    min-height: 60px;
  }
  .ask {
    flex-wrap: nowrap;
  }
  .ask input {
    flex-basis: auto;
  }
  .ask .primary {
    width: auto;
  }
  .ask-panel {
    padding: 20px;
  }
  .ask-heading h2 {
    font-size: 14px;
  }
  .ask-heading p {
    font-size: 11px;
  }
  .ai-label {
    display: block;
  }
  .empty-state {
    padding: 30px 20px;
    min-height: 355px;
  }
  .empty-state h3 {
    max-width: none;
    font-size: 21px;
  }
  .empty-state > p br {
    display: block;
  }
  .search-suggestions > div {
    gap: 9px;
  }
  .search-suggestions button {
    font-size: 11px;
  }
  .workspace-hint .text-button {
    display: inline-flex;
  }
  .results-heading > div > span {
    max-width: none;
  }
  .r-title {
    flex-basis: auto;
  }
  .value {
    font-size: 12px;
  }
  .results-heading {
    padding: 17px 20px;
  }
  .page-footer {
    padding: 24px 18px;
    row-gap: 18px;
  }
  .footer-logo {
    width: 64px;
    height: 45px;
  }
  .footer-brand {
    gap: 12px;
  }
  .footer-copy h2 {
    font-size: 13px;
  }
  .footer-copy p {
    font-size: 11px;
  }
  .footer-copyright {
    font-size: 10px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 270px;
    padding: 20px 35px 30px;
  }
  .login-logo {
    width: 100px;
    height: 60px;
  }
  .login-story h1 {
    font-size: 32px;
    letter-spacing: -1px;
    margin: 12px 0;
  }
  .login-story p {
    font-size: 12px;
    max-width: 400px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .login-copyright {
    display: none;
  }
  .login-form-wrap {
    padding: 38px 25px 45px;
  }
  .login-card h2 {
    font-size: 24px;
  }
  .login-card > .overline {
    font-size: 10px;
  }
  .user-profile strong {
    font-size: 12px;
  }
  .avatar {
    width: 33px;
    height: 33px;
  }
  .sidebar .workspace-note {
    font-size: 12px;
  }
  .sidebar .workspace-note p {
    font-size: 11px;
  }
  .doc-head {
    padding: 20px;
  }
  #doc-body {
    padding: 20px;
  }
  .doc-head h2 {
    font-size: 15px;
  }
}
@media (max-width: 420px) {
  .upload-body,
  .upload-row,
  .upload-list-heading {
    padding-left: 16px;
    padding-right: 16px;
  }
  .upload-row {
    flex-wrap: wrap;
  }
  .upload-info {
    flex-basis: calc(100% - 58px);
  }
  .page-heading {
    gap: 10px;
  }
  .page-heading h1 {
    font-size: 23px;
    letter-spacing: -0.8px;
  }
  .page-heading p {
    font-size: 11px;
    line-height: 1.8;
  }
  .refresh-button {
    font-size: 0;
    gap: 0;
    padding: 8px;
  }
  .refresh-button .icon {
    width: 15px;
    height: 15px;
  }
  .metrics {
    gap: 9px;
  }
  .metric {
    padding: 14px 12px;
    min-height: 118px;
  }
  .metric-top {
    font-size: 11px;
    gap: 5px;
  }
  .metric-top {
    padding-right: 30px;
  }
  .metric-kpi-icon {
    width: 36px;
    height: 36px;
    right: 8px;
    top: 12px;
  }
  .metric-note {
    font-size: 10px;
  }
  .metric strong {
    font-size: 27px;
  }
  .ai-label {
    display: none;
  }
  .ask-heading h2 {
    font-size: 13px;
  }
  .ask input {
    width: 0;
    flex: 1;
  }
  .ask input::placeholder {
    font-size: 11px;
  }
  .empty-state h3 {
    font-size: 18px;
  }
  .empty-state > p {
    font-size: 11px;
  }
  .empty-state > p br {
    display: none;
  }
  .search-suggestions button {
    font-size: 10px;
    gap: 4px;
  }
  .search-suggestions button .icon:last-child {
    display: none;
  }
  .search-suggestions > div {
    gap: 6px;
  }
  .filter-fields {
    gap: 0 12px;
  }
  .filter-fields label,
  .filter-fields legend {
    font-size: 11px;
  }
  .range {
    gap: 5px;
  }
  .range input {
    padding: 7px;
    font-size: 11px;
  }
  .range input::placeholder {
    font-size: 11px;
  }
  .r-head {
    align-items: flex-start;
  }
  .r-title {
    flex-basis: 75%;
    font-size: 12px;
  }
  .value {
    margin-left: 0;
    margin-top: 1px;
  }
  .r-foot {
    flex-direction: column;
    gap: 9px;
  }
  .source {
    max-width: 100%;
  }
  .workspace-hint .text-button {
    display: none;
  }
  .date-display .icon {
    display: none;
  }
  .pager {
    gap: 8px;
    padding: 13px 15px;
  }
  .pager .secondary {
    font-size: 10px;
  }
  .pager > div {
    gap: 5px;
  }
  .results-note {
    font-size: 8px;
  }
  .history-panel .panel-heading {
    flex-wrap: wrap;
  }
  .session-label {
    font-size: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
