:root {
  --orange: #ee6825;
  --orange-dark: #c64c0e;
  --ink: #1d2935;
  --muted: #697784;
  --line: #e3e8ec;
  --surface: #fff;
  --canvas: #f4f6f8;
  --nav: #17212c;
  --green: #247450;
  --radius: 14px;
  --shadow: 0 3px 12px #17212c04;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #d7dfe5;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  line-height: 1.45;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input[type="file"] {
  padding: 9px;
  font-size: 13px;
  overflow: hidden;
}
input[type="file"]::file-selector-button {
  border: 0;
  background: #edf1f4;
  border-radius: 5px;
  padding: 5px 9px;
  margin-right: 10px;
  color: var(--ink);
  cursor: pointer;
}
input[readonly] {
  background: #f2f4f6;
  color: var(--muted);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--orange);
  margin: 2px 0;
}
textarea {
  resize: vertical;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #42515e;
}
label input,
label select {
  margin-top: 7px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
h1 {
  font-size: 21px;
}
h2 {
  font-size: 28px;
}
h3 {
  font-size: 17px;
}
h4 {
  font-size: 15px;
}
p {
  overflow-wrap: anywhere;
}
p + p {
  margin-top: 10px;
}
h3 + p,
h4 + p {
  margin-top: 7px;
}
small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
strong {
  font-weight: 650;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  background: #f8fafb;
  white-space: nowrap;
}
th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td {
  overflow-wrap: anywhere;
}
tr:last-child td {
  border-bottom: 0;
}
td small {
  margin-top: 3px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.7 ui-monospace,
    SFMono-Regular,
    monospace;
}
summary {
  cursor: pointer;
  font-weight: 600;
  line-height: 1.5;
}
progress {
  display: block;
  width: 100%;
  height: 9px;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  background: #eceff2;
  accent-color: var(--orange);
}
progress::-webkit-progress-bar {
  background: #eceff2;
}
progress::-webkit-progress-value {
  background: var(--orange);
  border-radius: 9px;
}
progress::-moz-progress-bar {
  background: var(--orange);
}
:focus-visible {
  outline: 3px solid #f39b66;
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px #ee682516;
}
[hidden] {
  display: none !important;
}
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin-bottom: 9px;
}
.wide {
  width: 100%;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.4;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition:
    background 0.15s,
    box-shadow 0.15s;
  white-space: normal;
}
.button.primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 2px 3px #e2631620;
}
.button.primary:hover:not(:disabled) {
  background: var(--orange-dark);
}
.button.secondary {
  background: #fff;
  border-color: #dce3e8;
  color: #455463;
}
.button.secondary:hover:not(:disabled) {
  background: #f4f6f8;
}
.button .icon {
  width: 17px;
  height: 17px;
}
.small-button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}
.text-button:hover {
  text-decoration: underline;
}
.icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #5c6a76;
}
.icon-button:hover {
  background: #f5f7f8;
}
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #f0f3f6;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 650;
  color: #677583;
  white-space: nowrap;
}
.tag.success,
.connected {
  background: #e9f5ee;
  color: var(--green);
}
.tag.warning {
  background: #fff2e3;
  color: #a46318;
}
.tag.error {
  background: #fbecec;
  color: #b34040;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5dab89;
  flex: none;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid #efd6ae;
  border-radius: 9px;
  background: #fff7e9;
  color: #86591e;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.notice.neutral {
  background: #f3f6f9;
  border-color: #e2e8ee;
  color: #61707f;
}
.notice.error {
  background: #fff0ef;
  border-color: #f0c8c5;
  color: #a43b35;
}
.notice p {
  margin: 0;
}
.notice .text-button {
  flex: none;
  margin-left: auto;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  max-width: min(480px, calc(100vw - 32px));
  padding: 14px 20px;
  background: var(--nav);
  border: 1px solid #374553;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 10px 35px #17212c30;
  font-size: 13px;
}
.toast.error {
  background: #a43b35;
}
.form-error {
  padding: 10px 12px;
  background: #fff0ef;
  color: #a43b35;
  border-radius: 7px;
  margin: 12px 0;
  font-size: 13px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.check-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  line-height: 1.6;
}
.check-label span {
  padding-top: 0;
}
.form-grid label {
  min-width: 0;
}
.detail-list {
  margin: 12px 0 0;
}
.detail-list > div {
  display: grid;
  grid-template-columns: minmax(100px, 0.9fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
dt {
  color: var(--muted);
  font-size: 12px;
}
dd {
  margin: 0;
  font-weight: 600;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.detail-list > div:last-child {
  border: 0;
}
.table-scroll {
  max-width: 100%;
  overflow: auto;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.card-heading p {
  font-size: 12px;
  margin-top: 6px;
}
.compact-card {
  padding: 22px;
}
.compact-card .card-heading {
  padding: 0 0 15px;
  border: 0;
  align-items: center;
}
.compact-card > p {
  margin: 12px 0;
}
.settings-card {
  padding: 24px;
}
.settings-card > p {
  margin: 8px 0 18px;
}
.settings-card > label {
  margin: 18px 0 9px;
}
.settings-card > .button {
  margin-top: 14px;
}
.settings-card .notice {
  margin-top: 18px;
  margin-bottom: 0;
}
.settings-card form > .button {
  margin-top: 18px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 26px;
}
.stack-form h4 {
  margin-bottom: 10px;
}
.stack-form label:not(:first-child) {
  margin-top: 5px;
}
.stack-form .button {
  align-self: flex-start;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
}
.brand span {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.brand strong {
  display: block;
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0.02em;
  color: #aeb9c5;
  margin-top: 4px;
}
.brand img {
  flex: none;
}
.app-shell {
  min-height: 100dvh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  display: flex;
  flex-direction: column;
  background: var(--nav);
  color: #aab6c2;
  padding: 29px 18px 18px;
  z-index: 40;
  overflow-y: auto;
}
.sidebar .brand {
  margin: 0 9px 30px;
}
.workspace-label {
  font-size: 9px;
  letter-spacing: 0.13em;
  font-weight: 650;
  color: #718191;
  margin: 20px 14px 10px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b9c4cf;
  font-weight: 500;
  font-size: 12px;
  text-align: left;
  width: 100%;
  min-height: 44px;
}
.nav-link .icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.65;
}
.nav-link:hover {
  color: #fff;
  background: #ffffff08;
}
.nav-link[aria-current="page"] {
  background: #ed6a25;
  color: #fff;
  box-shadow: 0 4px 12px #00000014;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 45px;
}
.sidebar-system {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  border-top: 1px solid #ffffff0d;
  font-size: 11px;
  color: #d0d8df;
}
.sidebar-system small {
  color: #788a9b;
  font-size: 10px;
  margin-top: 2px;
}
.sidebar-bottom .nav-link {
  font-size: 11px;
  color: #93a4b4;
}
.main-shell {
  margin-left: 238px;
  min-width: 0;
}
.topbar {
  height: 91px;
  padding: 0 34px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar-start,
.topbar-end {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.topbar-start {
  gap: 12px;
}
.breadcrumb {
  font-size: 10px;
  color: #8d99a4;
  margin-bottom: 5px;
}
.breadcrumb span {
  margin: 0 4px;
}
.breadcrumb span:last-child {
  color: #677582;
}
.top-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #778692;
}
.account-link {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
}
.avatar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff0e5;
  color: #bb5a1d;
  font-weight: 650;
  font-size: 12px;
}
.main-content {
  padding: 31px 34px 0;
  outline: none;
  min-width: 0;
}
.page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-intro p {
  margin-top: 9px;
  font-size: 12px;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.metric-card {
  background: #fff;
  padding: 20px 21px;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  box-shadow: var(--shadow);
}
a.metric-card:hover {
  border-color: #edb894;
}
.metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #687582;
  font-weight: 550;
}
.metric-label .icon {
  color: #a6b2be;
  width: 17px;
  height: 17px;
}
.metric-card > strong {
  display: block;
  font-size: 34px;
  letter-spacing: -0.055em;
  line-height: 1.2;
  margin: 14px 0 9px;
  font-weight: 650;
}
.metric-note {
  display: inline-block;
  font-size: 10px;
  color: #8a97a3;
}
.metric-note.connected {
  background: transparent;
  color: var(--green);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 315px;
  gap: 24px;
  align-items: start;
}
.activity-list {
  padding: 4px 24px;
}
.activity-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid #edf0f2;
  min-width: 0;
}
.activity-row:last-child {
  border: 0;
}
.activity-icon,
.quick-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff0e6;
  color: #d56629;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.activity-icon .icon {
  width: 17px;
  height: 17px;
}
.activity-row[data-kind="lenovo"] .activity-icon {
  background: #eaf4ef;
  color: #4d8a6c;
}
.activity-row[data-kind="users"] .activity-icon,
.activity-row[data-kind="settings"] .activity-icon {
  background: #ecf0f5;
  color: #64778b;
}
.activity-info {
  flex: 1;
  min-width: 0;
}
.activity-info strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-info small {
  font-size: 10px;
  margin-top: 3px;
}
.activity-row > .tag {
  margin-left: auto;
}
.activity-link {
  background: none;
  border: 0;
  text-align: left;
  width: 100%;
  color: inherit;
}
.activity-link:hover .activity-info strong {
  color: var(--orange);
}
.assistant-card {
  padding: 25px;
  background: linear-gradient(135deg, #fff0e4, #fff6ee);
  border: 1px solid #f1dece;
  border-radius: var(--radius);
}
.assistant-mark {
  width: 33px;
  height: 33px;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.assistant-mark .icon {
  width: 18px;
  height: 18px;
}
.assistant-card .assistant-mark {
  margin-bottom: 18px;
}
.assistant-card .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
}
.assistant-card h3 {
  font-size: 24px;
  line-height: 1.25;
}
.assistant-card p {
  font-size: 12px;
  color: #8f7866;
  margin: 11px 0 20px;
}
.assistant-card .button {
  font-size: 11px;
  width: 100%;
  padding: 11px 9px;
}
.assistant-card > .text-button {
  margin-top: 14px;
  font-size: 10px;
}
.connection-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 11px;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.quick-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 21px 24px;
}
.quick-card > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.quick-card strong {
  font-size: 12px;
}
.quick-card small {
  font-size: 10px;
  margin-top: 3px;
}
.quick-card > .icon {
  width: 17px;
  height: 17px;
  color: #a1aeba;
}
.quick-card:hover {
  border-color: #edb894;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 0 20px;
  color: #9aa5ae;
  font-size: 10px;
}
.empty-state {
  padding: 55px 24px;
  text-align: center;
  color: #8c99a4;
  font-size: 12px;
}
.empty-state h3 {
  font-size: 15px;
  color: #647585;
}
.empty-state p {
  max-width: 300px;
  margin: 10px auto 0;
}
.empty-icon {
  display: flex;
  justify-content: center;
  color: #bac6cf;
  margin-bottom: 18px;
}
.empty-icon .icon {
  width: 38px;
  height: 38px;
  stroke-width: 1.2;
}
.section-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
}
.section-toolbar > .muted {
  font-size: 11px;
  padding-bottom: 12px;
}
.filter-group {
  display: flex;
  gap: 14px;
  min-width: 0;
  align-items: end;
  flex-wrap: wrap;
}
.search-label {
  width: 310px;
  max-width: 100%;
}
.card-toolbar {
  padding: 20px 24px;
  margin: 0;
}
.users-table {
  min-width: 530px;
}
.users-table .form-actions {
  margin: 0;
  gap: 8px;
}
.users-table th:last-child {
  width: 210px;
}
.user-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-identity .avatar {
  width: 30px;
  height: 30px;
}
.user-identity > span:last-child {
  font-size: 12px;
}
.current-user {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.invoice-upload-card {
  padding: 21px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.invoice-upload-card p {
  font-size: 11px;
}
.invoice-upload-card > p {
  grid-column: 1/-1;
}
.upload-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.upload-controls input {
  width: 270px;
  background: #f8fafb;
}
.invoice-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
}
.invoice-list table {
  min-width: 365px;
  table-layout: fixed;
}
.invoice-list th:first-child {
  width: 56%;
}
.invoice-list th:nth-child(2) {
  width: 32%;
}
.invoice-list th:last-child {
  width: 12%;
}
.invoice-list td {
  padding: 15px 14px;
  font-size: 12px;
}
.invoice-list td strong {
  display: block;
  font-size: 12px;
}
.invoice-list td small {
  font-size: 10px;
}
.invoice-list tr.selected {
  background: #fff6ee;
}
.invoice-list .tag {
  margin-top: 6px;
}
.invoice-list .text-button {
  font-size: 11px;
}
.invoice-detail {
  padding: 24px;
}
.invoice-grid.review-open { display: block; }
.is-reviewing > .page-intro, .is-reviewing > .invoice-upload-card, .is-reviewing > .invoice-toolbar { display: none; }
.invoice-workspace { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 24px; align-items: start; }
.invoice-document { min-width: 0; position: sticky; top: 18px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.invoice-document-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px; background: #f7f9fb; border-bottom: 1px solid var(--line); }
.invoice-document-tools > strong { margin-right: auto; font-size: 12px; }
.invoice-document-preview { background: #e9edf2; min-height: 450px; max-height: calc(100dvh - 270px); overflow: auto; padding: 12px; }
.invoice-document-preview img { display: block; width: 100%; background: white; box-shadow: 0 2px 9px #0002; }
.invoice-document-preview.zoomed img { width: 1400px; max-width: none; }
.invoice-document-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; background: white; font-size: 11px; }
.invoice-editor { min-width: 0; }
.invoice-assistant { padding: 14px; background: #eef5fc; border: 1px solid #d9e8f5; border-radius: 10px; margin-bottom: 16px; }
.invoice-assistant p { font-size: 12px; margin: 8px 0 12px; }
.invoice-checks { display: grid; gap: 6px; margin-bottom: 16px; }
.invoice-check { border-radius: 7px; padding: 9px 11px; font-size: 11px; background: #eef6f0; color: #276340; }
.invoice-check.blocker { background: #fff0ed; color: #a03d2e; }
.invoice-check.warning { background: #fff6e7; color: #8a6121; }
.invoice-field-evidence { display: block; margin-top: 5px; font-size: 10px; color: #61768a; font-weight: 400; overflow-wrap: anywhere; }
.invoice-field-conflict { border-left: 3px solid #ed8c25; padding-left: 8px; }
.invoice-line-details { margin-top: 20px; font-size: 12px; }
.invoice-booking-heading { margin-top: 25px; }
.invoice-booking-lines { display: grid; gap: 12px; margin-top: 12px; }
.invoice-booking-line { border: 1px solid var(--line); border-radius: 9px; padding: 13px; }
.invoice-booking-line .form-grid { margin-top: 8px; }
.invoice-booking-line h4 { margin-bottom: 8px; }
.invoice-review-footer { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 4px; }
.record-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
@media (min-width: 1001px) {
  .review-open .invoice-workspace { height: calc(100dvh - 335px); min-height: 400px; overflow: hidden; }
  .review-open .invoice-editor { height: 100%; overflow-y: auto; padding-right: 10px; }
  .review-open .invoice-document { height: 100%; position: static; display: flex; flex-direction: column; }
  .review-open .invoice-document-preview { flex: 1; max-height: none; min-height: 0; }
  .review-open .invoice-detail .card-heading { margin-bottom: 14px; }
}
@media (max-width: 1000px) {
  .invoice-workspace { grid-template-columns: minmax(0,1fr); }
  .invoice-document { position: static; }
  .invoice-document-preview { min-height: 260px; max-height: 65dvh; }
}
.invoice-detail .card-heading {
  padding: 0 0 17px;
  margin-bottom: 16px;
}
.invoice-detail h3 {
  overflow-wrap: anywhere;
  max-width: 100%;
  font-size: 15px;
}
.invoice-warnings {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 18px 0;
}
.invoice-warning {
  font-size: 11px;
  padding: 9px 11px;
  border-radius: 6px;
  background: #fff6e8;
  color: #946523;
}
.invoice-detail .form-grid {
  margin-top: 19px;
}
.invoice-detail .form-grid input {
  font-size: 12px;
  padding: 9px 10px;
}
.invoice-detail .form-grid label {
  font-size: 11px;
}
.invoice-detail .check-label {
  margin-top: 23px;
  font-size: 11px;
}
.invoice-detail .table-scroll {
  margin-top: 18px;
}
.invoice-detail th,
.invoice-detail td {
  padding: 10px;
  font-size: 11px;
}
.extracted-text {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.extracted-text summary {
  font-size: 11px;
  color: #7b8996;
}
.extracted-text pre {
  margin-top: 13px;
  padding: 12px;
  background: #f5f7f9;
  border-radius: 6px;
  max-height: 260px;
  overflow: auto;
}
.chat-shell {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  height: calc(100dvh - 265px);
}
.chat-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 23px;
  border-bottom: 1px solid var(--line);
}
.chat-heading strong {
  font-size: 12px;
}
.chat-heading small {
  font-size: 10px;
  margin-top: 2px;
}
.chat-heading > .tag {
  margin-left: auto;
  max-width: 45%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.button-row > .button {
  flex: 1 1 160px;
}
.chat-messages {
  flex: 1;
  min-height: 200px;
  overflow: auto;
  padding: 23px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.chat-message {
  max-width: 86%;
  width: fit-content;
  padding: 14px 18px;
  border-radius: 11px;
  margin-bottom: 17px;
  background: #f3f6f9;
  border: 1px solid #eaf0f4;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.chat-author {
  display: block;
  font-size: 10px;
  margin-bottom: 4px;
  color: #6d7e8e;
}
.chat-message p {
  white-space: pre-line;
}
.chat-user {
  margin-left: auto;
  background: #fff0e5;
  border-color: #f7decc;
}
.chat-user .chat-author {
  color: #bb6f3c;
}
.chat-waiting {
  opacity: 0.65;
}
.chat-data-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 8px;
  margin: 12px 0;
}
.chat-data-card h3 {
  font-size: 13px;
}
.chat-data-card dl {
  margin: 10px 0 0;
}
.chat-data-card dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  margin: 7px 0;
}
.chat-data-card dd {
  font-weight: 450;
}
.chat-source {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 13px;
}
.chat-source a {
  text-decoration: underline;
}
.chat-source small {
  font-size: 10px;
}
.chat-action {
  margin-top: 13px;
}
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 11px 23px 15px;
}
.chat-suggestion {
  background: #fff;
  border: 1px solid var(--line);
  color: #667684;
  font-size: 10px;
  padding: 7px 11px;
  border-radius: 7px;
  text-align: left;
}
.chat-suggestion:hover {
  border-color: #e9b692;
  color: var(--orange-dark);
}
.chat-form {
  display: flex;
  gap: 11px;
  padding: 16px 23px 0;
  border-top: 1px solid var(--line);
  align-items: stretch;
}
.chat-form textarea {
  min-height: 55px;
  max-height: 140px;
  font-size: 12px;
  background: #f9fafb;
}
.chat-form .button {
  align-self: stretch;
  min-width: 110px;
}
.chat-footnote {
  font-size: 9px;
  color: #9ba7b1;
  padding: 8px 23px 13px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 18px;
}
.section-heading h2 {
  font-size: 22px;
}
.section-heading p {
  font-size: 12px;
  margin-top: 7px;
}
.step-pill,
.completed-pill,
.tiny-pill {
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 650;
  color: #9a6840;
  background: #fff0e5;
  border-radius: 5px;
  padding: 5px 9px;
  white-space: nowrap;
}
.completed-pill {
  color: var(--green);
  background: #e9f5ee;
}
.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 24px;
  align-items: start;
}
.upload-card {
  padding: 24px;
}
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
  border: 1.5px dashed #cfd9e0;
  background: #fafbfc;
  border-radius: 10px;
  padding: 35px 20px;
  cursor: pointer;
}
.dropzone:hover,
.dropzone.dragging {
  border-color: var(--orange);
  background: #fff8f2;
}
.dropzone:focus-within {
  outline: 3px solid #f39b66;
  outline-offset: 3px;
}
.upload-icon {
  font-size: 30px;
  color: var(--orange);
  line-height: 1;
}
.dropzone strong {
  font-size: 14px;
}
.dropzone > span:not(.upload-icon) {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.dropzone small {
  font-size: 10px;
  font-weight: 400;
}
.file-selected {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 13px;
  border-radius: 8px;
  margin-top: 15px;
}
.file-selected > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.file-selected strong {
  font-size: 12px;
}
.file-selected small {
  font-size: 10px;
  margin-top: 4px;
}
.excel-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 33px;
  height: 37px;
  border-radius: 6px;
  background: #eaf5ee;
  color: #38795a;
  font-size: 16px;
  font-weight: 650;
  flex: none;
}
.what-card {
  padding: 24px;
}
.what-card h3 {
  font-size: 24px;
  margin: 16px 0 20px;
}
.what-card ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.what-card li {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.what-card li > span {
  font-size: 10px;
  width: 22px;
  height: 22px;
  background: #fff0e5;
  color: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.what-card li strong {
  font-size: 11px;
}
.what-card li p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.preserve-note {
  font-size: 11px;
  color: var(--green);
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.settings {
  margin: 18px 0;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.settings summary {
  font-size: 12px;
}
.settings summary span {
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
  margin-left: 9px;
}
.base-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}
.base-upload .button {
  align-self: flex-start;
}
.uplift-section {
  margin-top: 26px;
}
.uplift-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
}
.pricing-step {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.pricing-step h4 {
  font-size: 13px;
  margin-bottom: 12px;
}
.pricing-step > label {
  max-width: 420px;
  font-size: 12px;
}
.pricing-step > p {
  margin-top: 9px;
  font-size: 11px;
}
.uplift-scroll {
  overflow: auto;
  max-width: 100%;
  margin: 14px 0;
}
.uplift-table {
  min-width: 490px;
}
.uplift-table th,
.uplift-table td {
  padding: 12px 10px;
  font-size: 11px;
}
.uplift-table td small {
  font-size: 9px;
  margin-top: 5px;
}
.uplift-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}
.uplift-input-wrap input {
  width: 85px;
  padding: 8px;
}
.mixed-uplift {
  color: #a07435;
}
.pricing-preview {
  margin-top: 22px;
  padding: 18px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pricing-preview h4 {
  margin-bottom: 12px;
}
.pricing-preview > p {
  font-size: 11px;
  margin-top: 12px;
}
.pricing-preview table {
  min-width: 680px;
  font-size: 10px;
}
.pricing-preview th,
.pricing-preview td {
  font-size: 10px;
  padding: 10px;
}
.uplift-confirm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  margin: 22px 0 13px;
  font-weight: 500;
}
.uplift-section > .small {
  margin: 12px 0;
}
.processing-card {
  display: flex;
  gap: 20px;
  padding: 26px;
  margin: 20px 0;
  align-items: center;
}
.processing-card > div {
  flex: 1;
  min-width: 0;
}
.processing-card h2 {
  font-size: 18px;
}
.processing-card progress {
  margin: 17px 0;
}
.processing-card p {
  font-size: 12px;
}
.processing-orbit {
  display: flex;
  width: 45px;
  height: 45px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff0e5;
  color: var(--orange);
  font-weight: 650;
  font-size: 22px;
}
.processing-card > span:last-child {
  font-weight: 600;
  color: var(--orange);
  font-size: 13px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.stat strong {
  display: block;
  font-size: 26px;
}
.stat span {
  font-size: 10px;
  color: var(--muted);
}
.stat.attention {
  border-color: #f1dbbd;
  background: #fff9ef;
}
.download-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  margin-bottom: 18px;
}
.download-card h3 {
  font-size: 15px;
}
.download-card p {
  font-size: 11px;
  color: var(--muted);
}
.download-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.details-card,
.review-panel {
  padding: 20px 24px;
  margin-bottom: 17px;
}
.details-card summary,
.review-panel summary {
  font-size: 13px;
}
.details-card summary span,
.review-panel summary span {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.details-card .table-scroll {
  margin-top: 18px;
}
.review-panel > p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.review-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.review-row h4 {
  font-size: 13px;
}
.review-row p {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 15px;
}
.review-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.review-fields label {
  font-size: 11px;
}
.review-panel > .button {
  margin-top: 18px;
}
.result-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.history-section {
  margin-top: 32px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 22px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  text-align: left;
  color: inherit;
}
.history-row:last-child {
  border: 0;
}
.history-row:hover {
  background: #fafbfc;
}
.history-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.history-row strong {
  font-size: 12px;
}
.history-row small {
  font-size: 10px;
  margin-top: 3px;
}
.history-arrow {
  color: #a5b2bc;
}
.history-list > .muted {
  padding: 28px;
  font-size: 12px;
}
.package-list {
  padding: 0 24px;
}
.package-row {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.package-row:last-child {
  border: 0;
}
.package-row > div {
  min-width: 0;
  flex: 1;
}
.package-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.package-row small {
  margin-top: 6px;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.package-row .tag {
  margin-left: 9px;
}
.package-hash {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 9px !important;
  color: #95a3ae;
}
.package-list > .empty-state {
  padding: 35px 0;
}
.auth-view {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}
.auth-card {
  max-width: 470px;
  width: 100%;
  justify-self: center;
  align-self: center;
  padding: 40px;
}
.auth-brand {
  color: var(--ink);
  margin-bottom: 56px;
}
.auth-brand strong {
  color: var(--muted);
}
.auth-card h1 {
  font-size: 30px;
  margin-bottom: 12px;
}
.auth-card > p {
  font-size: 13px;
}
.auth-card form {
  margin-top: 30px;
}
.auth-card form > label {
  margin: 17px 0 7px;
}
.auth-card .button.wide {
  margin-top: 25px;
}
.password-wrap {
  display: flex;
  position: relative;
  align-items: center;
}
.password-wrap input {
  padding-right: 65px;
}
.password-wrap button {
  position: absolute;
  right: 14px;
  font-size: 11px;
}
.auth-footer {
  font-size: 10px !important;
  color: #9aa7b2;
  margin-top: 35px;
}
.auth-story {
  background: var(--nav);
  color: #fff;
  padding: 80px 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-story .eyebrow {
  color: #f29962;
  font-size: 10px;
}
.auth-story h2 {
  font-size: 42px;
  letter-spacing: -0.045em;
  line-height: 1.17;
  margin: 12px 0 23px;
}
.auth-story > p {
  color: #aab8c6;
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 35px;
}
.story-line {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 11px;
  color: #b5c1cd;
  margin: 12px 0;
}
.story-line span {
  font-size: 9px;
  color: #fa9f69;
  border: 1px solid #ffffff20;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.maintenance-card {
  max-width: 570px;
  text-align: center;
  grid-column: 1/-1;
}
.maintenance-card > img {
  margin-bottom: 25px;
}
.maintenance-card h1 {
  font-size: 26px;
}
.maintenance-card progress {
  margin: 26px 0 18px;
}
.maintenance-card .button {
  margin-top: 26px;
}
.mobile-only {
  display: none;
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: #111b2980;
  z-index: 35;
  backdrop-filter: blur(2px);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  max-width: min(530px, calc(100vw - 30px));
  width: 530px;
  color: var(--ink);
  box-shadow: 0 30px 100px #17212c30;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
dialog::backdrop {
  background: #17212c75;
  backdrop-filter: blur(3px);
}
dialog label {
  margin: 14px 0 6px;
}
dialog h2 {
  font-size: 23px;
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-heading .eyebrow {
  font-size: 9px;
}
.dialog-heading .icon-button {
  border: 0;
  background: transparent;
}
.dialog-heading + .notice {
  margin-top: 12px;
}
dialog .form-actions {
  justify-content: flex-end;
  margin-top: 25px;
}
dialog .check-label {
  margin-top: 20px;
}
dialog .small {
  font-size: 11px;
  margin-top: 7px;
}
#installSummary {
  font-size: 13px;
  color: var(--muted);
}
#installDetails {
  margin-bottom: 20px;
}
#lastUpdateResult {
  margin-top: 22px;
}
@media (min-width: 1600px) {
  .main-content {
    padding: 38px 44px 0;
  }
  .topbar {
    padding: 0 44px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .metric-card {
    padding: 25px;
  }
  .metric-card > strong {
    font-size: 39px;
  }
  .card-heading {
    padding: 25px 28px;
  }
  .activity-list {
    padding: 6px 28px;
  }
  .activity-row {
    padding: 19px 0;
  }
  .assistant-card {
    padding: 29px;
  }
}
@media (max-width: 1250px) {
  .topbar {
    padding: 0 25px;
  }
  .main-content {
    padding: 27px 25px 0;
  }
  .dashboard-stats {
    gap: 12px;
  }
  .metric-card {
    padding: 18px 16px;
  }
  .metric-label {
    font-size: 10px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
  }
  .quick-grid {
    gap: 18px;
  }
  .invoice-upload-card {
    grid-template-columns: 1fr;
  }
  .upload-controls input {
    width: 100%;
    flex: 1;
  }
  .invoice-grid {
    grid-template-columns: 1fr;
  }
  .invoice-list table {
    min-width: 365px;
  }
  .invoice-list th:first-child {
    width: 62%;
  }
  .upload-grid {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 18px;
  }
  .what-card {
    padding: 20px;
  }
  .what-card h3 {
    font-size: 21px;
  }
  .chat-message {
    max-width: 94%;
  }
}
@media (max-width: 1000px) {
  .sidebar {
    width: 250px;
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.18s,
      visibility 0.18s;
  }
  .sidebar[data-open] {
    transform: translateX(0);
    visibility: visible;
  }
  .sidebar .brand {
    margin-top: 3px;
  }
  .sidebar #closeMenu {
    position: absolute;
    right: 12px;
    top: 27px;
    border: 0;
    background: #ffffff08;
    color: #fff;
    width: 28px;
    height: 28px;
  }
  .sidebar #closeMenu .icon {
    width: 16px;
    height: 16px;
  }
  .main-shell {
    margin-left: 0;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    height: 82px;
    padding: 0 24px;
  }
  .main-content {
    padding: 27px 24px 0;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .upload-grid {
    grid-template-columns: minmax(0, 1fr) 265px;
  }
  .chat-shell {
    height: calc(100dvh - 250px);
  }
  .auth-story {
    padding: 70px 12%;
  }
  .auth-story h2 {
    font-size: 34px;
  }
}
@media (max-width: 760px) {
  .topbar {
    padding: 0 18px;
    height: 76px;
  }
  .topbar-end {
    gap: 12px;
  }
  .top-status {
    display: none;
  }
  .main-content {
    padding: 24px 18px 0;
  }
  .page-intro {
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 22px;
  }
  .page-intro h2 {
    font-size: 24px;
  }
  .page-intro p {
    font-size: 11px;
    max-width: 360px;
  }
  .page-intro > .button {
    font-size: 11px;
    padding: 9px 12px;
    min-height: 38px;
    flex: none;
  }
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
  }
  .metric-card {
    padding: 18px;
  }
  .metric-card > strong {
    font-size: 30px;
    margin: 11px 0 8px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .dashboard-grid > .stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .assistant-card {
    padding: 22px;
  }
  .assistant-card h3 {
    font-size: 21px;
  }
  .assistant-card p {
    font-size: 11px;
  }
  .compact-card {
    padding: 20px;
  }
  .quick-grid {
    gap: 14px;
    margin-top: 18px;
  }
  .quick-card {
    padding: 17px;
    gap: 10px;
  }
  .quick-card > .icon {
    display: none;
  }
  .quick-card small {
    font-size: 9px;
  }
  .quick-icon {
    width: 30px;
    height: 30px;
  }
  .quick-icon .icon {
    width: 17px;
    height: 17px;
  }
  .card-heading {
    padding: 20px;
  }
  .activity-list {
    padding: 0 20px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .settings-card {
    padding: 22px;
  }
  .upload-grid {
    grid-template-columns: 1fr;
  }
  .what-card {
    display: none;
  }
  .upload-card {
    padding: 21px;
  }
  .upload-section .section-heading h2 {
    font-size: 20px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .download-card {
    flex-direction: column;
    align-items: stretch;
  }
  .download-actions .button {
    flex: 1;
    font-size: 11px;
  }
  .review-fields {
    grid-template-columns: 1fr;
  }
  .chat-shell {
    height: calc(100dvh - 245px);
    min-height: 560px;
  }
  .chat-messages {
    padding: 18px;
  }
  .chat-suggestions {
    padding: 10px 18px 14px;
  }
  .chat-message {
    font-size: 12px;
    padding: 12px 14px;
    max-width: 95%;
  }
  .chat-heading {
    padding: 16px 18px;
  }
  .chat-form {
    padding: 14px 18px 0;
  }
  .chat-footnote {
    padding-left: 18px;
    font-size: 8px;
  }
  .chat-data-card dl > div {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
  }
  .chat-form .button {
    min-width: 90px;
    font-size: 11px;
  }
  .section-toolbar {
    align-items: stretch;
  }
  .section-toolbar > .muted {
    padding-bottom: 0;
  }
  .filter-group {
    width: 100%;
  }
  .filter-group > .search-label {
    flex: 1;
    min-width: 180px;
  }
  .invoice-detail {
    padding: 20px;
  }
  .invoice-upload-card {
    padding: 20px;
  }
  .upload-controls {
    flex-wrap: wrap;
  }
  .upload-controls input {
    width: 100%;
    flex: 1 1 220px;
  }
  .upload-controls .button {
    flex: 1 1 170px;
    font-size: 12px;
  }
  .invoice-detail .card-heading {
    padding: 0 0 16px;
  }
  .auth-view {
    grid-template-columns: 1fr;
  }
  .auth-story {
    display: none;
  }
  .auth-card {
    padding: 40px 28px;
  }
  .auth-brand {
    margin-bottom: 45px;
  }
  .auth-card > h1 {
    font-size: 28px;
  }
  .package-list {
    padding: 0 20px;
  }
  .package-row {
    gap: 12px;
    align-items: flex-start;
  }
  .package-row .button {
    font-size: 11px;
    padding: 8px 10px;
  }
  .package-row .tag {
    margin: 6px 0 0;
  }
  .package-row strong {
    font-size: 12px;
  }
  .package-row small {
    font-size: 9px;
  }
  .section-heading {
    gap: 10px;
  }
  .history-row {
    padding: 16px 18px;
  }
  .history-row small {
    font-size: 9px;
  }
  .history-row > .history-arrow {
    display: none;
  }
  .settings summary span {
    display: block;
    margin: 5px 0 0;
  }
  .app-footer {
    font-size: 9px;
    padding-top: 24px;
  }
}
@media (max-width: 480px) {
  .topbar {
    padding: 0 14px;
    gap: 10px;
  }
  .topbar-end {
    gap: 8px;
  }
  .topbar-end .account-link > span:last-child {
    display: none;
  }
  .topbar-end .icon-button {
    width: 34px;
    height: 34px;
  }
  .topbar-start {
    gap: 10px;
  }
  .topbar-start > .icon-button {
    width: 33px;
    height: 34px;
  }
  .topbar h1 {
    font-size: 18px;
  }
  .breadcrumb {
    font-size: 9px;
  }
  .main-content {
    padding: 23px 14px 0;
  }
  .page-intro {
    flex-wrap: wrap;
    margin-bottom: 22px;
    gap: 15px;
  }
  .page-intro .eyebrow {
    font-size: 9px;
  }
  .page-intro h2 {
    font-size: 23px;
  }
  .page-intro > .button {
    font-size: 11px;
    min-height: 38px;
  }
  .page-intro p {
    font-size: 11px;
  }
  .dashboard-stats {
    gap: 10px;
  }
  .metric-card {
    padding: 16px 13px;
  }
  .metric-label {
    font-size: 10px;
    line-height: 1.5;
    align-items: flex-start;
  }
  .metric-label .icon {
    width: 14px;
    height: 14px;
  }
  .metric-note {
    font-size: 9px;
  }
  .metric-card > strong {
    font-size: 30px;
  }
  .dashboard-grid > .stack {
    grid-template-columns: 1fr;
  }
  .assistant-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
    padding: 21px;
  }
  .assistant-card .assistant-mark {
    grid-row: 1/4;
    margin: 0;
  }
  .assistant-card .eyebrow {
    grid-column: 2;
    font-size: 8px;
  }
  .assistant-card h3 {
    grid-column: 2;
    font-size: 20px;
  }
  .assistant-card h3 br {
    display: none;
  }
  .assistant-card p {
    grid-column: 2;
    margin: 8px 0 14px;
  }
  .assistant-card > .button,
  .assistant-card > .text-button {
    grid-column: 1/-1;
  }
  .assistant-card > .text-button {
    justify-content: center;
    margin-top: 10px;
  }
  .quick-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .quick-card {
    padding: 17px 20px;
  }
  .quick-card > .icon {
    display: block;
    margin-left: auto;
  }
  .quick-card strong {
    font-size: 12px;
  }
  .quick-card small {
    font-size: 10px;
  }
  .activity-list {
    padding: 0 17px;
  }
  .activity-row {
    gap: 10px;
    padding: 15px 0;
  }
  .activity-info strong {
    font-size: 11px;
  }
  .activity-info small {
    font-size: 9px;
  }
  .activity-row > .tag {
    font-size: 8px;
    padding: 4px 6px;
  }
  .activity-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .card-heading {
    padding: 18px;
  }
  .card-heading h3 {
    font-size: 15px;
  }
  .card-heading p {
    font-size: 11px;
  }
  .invoice-upload-card h3 {
    font-size: 15px;
  }
  .filter-group {
    gap: 11px;
  }
  .filter-group .search-label {
    flex-basis: 100%;
  }
  .filter-group label:last-child {
    width: 100%;
  }
  .invoice-detail .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 13px 10px;
  }
  .invoice-detail .form-grid label {
    font-size: 10px;
  }
  .invoice-detail .form-grid input {
    font-size: 11px;
  }
  .invoice-detail .form-grid label:first-child {
    grid-column: 1/-1;
  }
  .invoice-detail .form-actions > .button {
    width: 100%;
  }
  .chat-heading small {
    font-size: 8px;
  }
  .chat-heading > .tag {
    font-size: 8px;
  }
  .chat-heading {
    gap: 10px;
  }
  .chat-shell {
    height: calc(100dvh - 260px);
    min-height: 550px;
  }
  .chat-suggestions {
    gap: 6px;
    padding: 8px 13px 12px;
  }
  .chat-suggestion {
    font-size: 9px;
    padding: 6px 8px;
  }
  .chat-messages {
    padding: 16px 13px;
  }
  .chat-form {
    padding: 12px 13px 0;
    gap: 8px;
  }
  .chat-form textarea {
    font-size: 11px;
    padding: 10px;
    min-height: 68px;
  }
  .chat-form .button {
    min-width: 70px;
    max-width: 80px;
    padding: 8px;
    font-size: 10px;
  }
  .chat-message {
    font-size: 11px;
    padding: 12px;
    max-width: 100%;
  }
  .chat-data-card {
    padding: 10px;
  }
  .chat-data-card dl > div {
    grid-template-columns: 80px minmax(0, 1fr);
    font-size: 10px;
    gap: 8px;
  }
  .chat-data-card dt,
  .chat-data-card dd {
    font-size: 10px;
  }
  .upload-card {
    padding: 17px;
  }
  .upload-section .section-heading {
    align-items: flex-start;
  }
  .upload-section .section-heading p {
    font-size: 11px;
  }
  .upload-section .section-heading h2 {
    font-size: 19px;
  }
  .step-pill {
    font-size: 8px;
    padding: 5px 6px;
  }
  .dropzone {
    padding: 30px 14px;
  }
  .dropzone strong {
    font-size: 12px;
  }
  .dropzone small {
    font-size: 9px;
  }
  .dropzone > span:not(.upload-icon) {
    font-size: 11px;
  }
  .pricing-step h4 {
    font-size: 12px;
  }
  .processing-card {
    padding: 19px;
    gap: 12px;
  }
  .processing-orbit {
    display: none;
  }
  .processing-card h2 {
    font-size: 15px;
  }
  .processing-card p {
    font-size: 11px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 25px;
  }
  .stat span {
    font-size: 9px;
  }
  .completed-pill {
    font-size: 8px;
  }
  .download-actions {
    flex-direction: column;
  }
  .details-card,
  .review-panel {
    padding: 18px;
  }
  .history-row {
    gap: 10px;
    padding: 15px;
  }
  .history-row strong {
    font-size: 11px;
  }
  .history-row > .tag {
    font-size: 9px;
  }
  .history-row .excel-icon {
    width: 28px;
    height: 33px;
  }
  .form-actions .button {
    font-size: 12px;
  }
  .settings-card {
    padding: 20px;
  }
  .detail-list > div {
    grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1fr);
    gap: 10px;
  }
  .detail-list dt,
  .detail-list dd {
    font-size: 11px;
  }
  .package-row {
    flex-direction: column;
    gap: 12px;
  }
  .package-row .button {
    width: 100%;
  }
  .package-row strong {
    font-size: 12px;
  }
  .package-row small {
    font-size: 9px;
  }
  .package-hash {
    font-size: 8px !important;
  }
  .notice {
    padding: 12px 13px;
    font-size: 11px;
    flex-wrap: wrap;
  }
  .notice .text-button {
    margin-left: 0;
  }
  .card-toolbar {
    padding: 18px;
  }
  .card-toolbar label {
    width: 100%;
  }
  dialog {
    padding: 24px 20px;
  }
  dialog h2 {
    font-size: 20px;
  }
  .toast {
    right: 14px;
    bottom: 14px;
    font-size: 12px;
  }
  .app-footer {
    font-size: 8px;
    gap: 10px;
  }
  .form-grid input {
    min-height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.menu-open {
  overflow: hidden;
}
.dashboard-primary {
  min-width: 0;
}
.visually-hidden {
  top: 0;
  left: 0;
  clip-path: inset(50%);
}
.invoice-open {
  width: 30px;
  height: 32px;
  border: 0;
  background: transparent;
}
.invoice-open .icon {
  width: 17px;
  height: 17px;
}
.invoice-list td:last-child {
  padding-left: 6px;
  padding-right: 8px;
}
.invoice-list th:last-child {
  width: 50px;
}
@media (max-width: 480px) {
  .invoice-list table {
    min-width: 0;
    table-layout: auto;
  }
  .invoice-list thead {
    display: none;
  }
  .invoice-list tbody {
    display: block;
  }
  .invoice-list tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    gap: 0 8px;
  }
  .invoice-list tr:last-child {
    border: 0;
  }
  .invoice-list td {
    border: 0;
    padding: 0;
  }
  .invoice-list td:first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .invoice-list td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
  }
  .invoice-list td:nth-child(2) strong {
    font-size: 11px;
    font-weight: 550;
    color: var(--muted);
  }
  .invoice-list td .tag {
    margin: 0;
  }
  .invoice-list td:last-child {
    grid-column: 2;
    grid-row: 1/3;
    padding: 0;
    align-self: center;
  }
  .invoice-list td[colspan] {
    grid-column: 1/-1;
    grid-row: auto;
  }
}

.invoice-masterdata { padding:16px; border:1px solid var(--line,#dce3eb); border-radius:12px; margin:12px 0 20px; }
.invoice-masterdata h4 { margin:0 0 8px; }
.invoice-masterdata input { width:100%; }
.invoice-masterdata .button { margin-top:10px; }
.supplier-choice { white-space:normal; text-align:left; width:100%; overflow-wrap:anywhere; }
.recognized-line { padding:14px; margin:12px 0; border:1px solid var(--line,#dce3eb); border-radius:10px; overflow-wrap:anywhere; }
.recognized-line h4 { margin:0 0 10px; }
.recognized-line .detail-list { margin:0; }
.recognized-line details { margin-top:12px; }
.recognized-serials { font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
#exactReadDatasets { margin:18px 0; gap:6px; }
#exactReadDatasets p { margin:0; }
#exactReadSyncForm fieldset { border:1px solid var(--line,#dce3eb); border-radius:10px; padding:12px; min-width:0; }
#exactReadSyncForm .check-label { margin:8px 0; }

.chat-language-label { font-size:13px; min-width:130px; margin-left:auto; }
.chat-language-label select { margin:4px 0 0; }
@media(max-width:540px){.chat-language-label{width:100%;margin-left:0}.page-intro{flex-wrap:wrap;}}

.invoice-check-summary{border:1px solid #dcebe4;border-radius:9px;background:#f0f7f3;padding:12px;font-size:13px;margin:8px 0}.invoice-check-summary summary{cursor:pointer;color:#326754}.invoice-check-summary p{margin:8px 0 0}

/* Invoice workbench: full-height document and a single booking form. */
.invoice-focus{overflow:hidden;background:#fff}
.invoice-focus .topbar,.invoice-focus .app-footer,.invoice-focus .is-reviewing>.section-toolbar{display:none}
.invoice-focus .main-content{padding:0;max-width:none}
.invoice-focus .review-open,.invoice-focus #page-invoice{margin:0;padding:0}
.invoice-focus .review-open .invoice-detail{padding:0;border:0;border-radius:0;box-shadow:none;overflow:hidden}
.invoice-focus #invoiceReviewForm{height:100dvh;display:grid;grid-template-rows:44px minmax(0,1fr) auto;margin:0;background:#fff}
.invoice-review-heading{display:flex;align-items:center;gap:12px;padding:0 16px;border-bottom:1px solid var(--line);min-width:0;background:#fff}
.invoice-review-heading h3{font-size:12px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;flex:1;min-width:0}
.invoice-back,.invoice-toolbar-button{display:inline-flex;align-items:center;justify-content:center;border:0;background:none;padding:7px 8px;color:#526273;font-size:11px;line-height:1.25;border-radius:3px;width:auto;white-space:nowrap}
.invoice-back{gap:7px;padding-left:0}
.invoice-back:hover,.invoice-toolbar-button:hover{background:#f0f3f5;color:var(--ink)}
.invoice-review-heading .tag{font-size:9px;padding:3px 7px;white-space:nowrap}
#invoiceChecksButton{color:#aa5724}
.invoice-focus .review-open .invoice-workspace{display:grid;grid-template-columns:minmax(0,1fr) clamp(380px,32vw,520px);gap:0;align-items:stretch;height:100%;min-height:0;overflow:hidden}
.invoice-focus .review-open .invoice-document{position:static;display:flex;flex-direction:column;height:100%;min-height:0;border:0;border-right:1px solid #dce1e5;border-radius:0;overflow:hidden;background:#f1f2f3}
.invoice-focus .invoice-document-tools{padding:4px 16px;gap:5px;min-height:38px;background:#f7f8f9;flex-wrap:nowrap;border-bottom:1px solid #e1e5e8}
.invoice-document-caption{font-size:10px;color:#7b838a;margin-right:auto}
.invoice-document-tools .icon-button{width:27px;height:27px;min-height:27px;border:0;background:none;font-size:12px;padding:0}
.invoice-document-tools .invoice-toolbar-button{font-size:10px}
.invoice-focus .review-open .invoice-document-preview{flex:1;max-height:none;min-height:0;padding:16px 22px 40px;background:#f1f2f3;overflow:auto}
.invoice-focus .invoice-document-preview img{width:100%;background:#fff;border:1px solid #dce0e3;box-shadow:0 2px 5px #15232f0a}
.invoice-focus .invoice-document-preview.zoomed img{width:1400px;max-width:none}
.invoice-focus .review-open .invoice-editor{height:100%;overflow:auto;padding:16px 18px 30px;min-width:0;background:#fff}
.invoice-supplier-card{margin:0 0 16px;border:1px solid #d8dfe4;border-radius:2px}
.invoice-supplier-card>button{display:flex;gap:10px;align-items:center;width:100%;text-align:left;border:0;background:#fff;padding:9px 11px;color:var(--ink)}
.invoice-supplier-card>button:hover{background:#f9fafb}
.invoice-supplier-identity{display:grid;grid-template-columns:auto 1fr;gap:1px 7px;flex:1;min-width:0}
.invoice-supplier-identity strong{font-size:12px;line-height:1.4;grid-column:2;grid-row:1;overflow-wrap:anywhere;font-weight:600}
#invoiceSupplierSelected{font-size:11px;grid-row:1;grid-column:1;color:#5e6a73;align-self:start}
#invoiceSupplierIban{grid-column:1/-1;font-size:10px;color:#6b7881;letter-spacing:.1px}
#invoiceSupplierIban:empty{display:none}
.invoice-supplier-icon{color:#7d8f9d;font-size:22px;line-height:1}
.invoice-detail .invoice-primary-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px;margin:0}
.invoice-detail .form-grid label{display:block;min-width:0;font-size:10px;font-weight:550;color:#53606a;line-height:1.4;margin:0}
.invoice-detail .form-grid label:first-child{grid-column:auto}
.invoice-detail .form-grid input,.invoice-detail .form-grid select{height:32px;min-height:32px;margin:4px 0 0;padding:5px 7px;font-size:11px;border-radius:2px;line-height:1.3;background:#fff}
.invoice-primary-fields [data-invoice-field=description]{grid-column:1/-1}
.invoice-primary-fields [data-invoice-field=gross] input{font-variant-numeric:tabular-nums}
.invoice-credit-label{display:flex;align-items:center;gap:6px;margin:12px 0 17px;font-size:10px;color:#53606a}
.invoice-credit-label input{width:12px;height:12px;margin:0}
.invoice-field-error,.invoice-inline-error{color:#b04429;font-size:10px;line-height:1.4;font-weight:450;display:block;margin:4px 0 0}
.invoice-inline-error{padding:0 10px 8px}
.invoice-inline-error span{display:block}
.invoice-detail input[aria-invalid=true]{border-color:#d58b61}
.invoice-field-conflict{background:none;padding:0;border:0;border-radius:0}
.invoice-field-conflict>.text-button{font-size:9px;line-height:1.4;text-align:left;margin-top:4px}
.invoice-focus .invoice-booking-section{margin:0;padding:0;border-top:1px solid var(--line);background:#fff}
.invoice-booking-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;padding:14px 0 10px}
.invoice-booking-heading h3{font-size:9px;letter-spacing:.5px;text-transform:uppercase;color:#7d8890;font-weight:600;margin:0}
.invoice-booking-heading .text-button{font-size:10px;font-weight:500}
.invoice-focus .invoice-booking-lines{display:grid;gap:12px;margin:0}
.invoice-focus .invoice-booking-line{position:relative;display:block;border:1px solid #dce2e6;border-left:2px solid #e97438;border-radius:1px;padding:10px 12px 13px;background:#fff}
.invoice-booking-row-heading{display:flex;align-items:center;gap:10px;margin:0 0 8px}
.invoice-booking-number{font-size:10px;color:#7b8791;margin-right:auto}
.invoice-booking-options-button{font-size:9px;font-weight:450}
.invoice-remove-booking{background:none;border:0;color:#a05035;width:20px;padding:0;font-size:17px;line-height:1}
.invoice-booking-main{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px}
.booking-cell{min-width:0;display:block;font-size:10px;font-weight:550;color:#53606a;line-height:1.4}
.booking-cell input{width:100%;height:32px;min-height:32px;margin:4px 0 0;padding:5px 7px;border-radius:2px;font-size:11px;background:#fff}
.booking-cell-description,.booking-cell-ledger{grid-column:1/-1}
.booking-cell-net input,.booking-cell-tax input{font-variant-numeric:tabular-nums}
.booking-code-deviation{border-color:#d19b54!important;background:#fffaf1!important}
.invoice-booking-deviations{font-size:10px;line-height:1.4;padding:8px 9px;margin:0 0 10px;color:#925c21;background:#fffbf3;border-left:2px solid #d2a15b}
.invoice-booking-deviations strong{font-weight:550}
.invoice-booking-deviations p{margin:3px 0 0}
#invoiceIbanConfirmation{font-size:10px;margin:12px 0 0;color:#9a4e28}
.invoice-review-footer{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:9px 16px;border-top:1px solid #dce2e6;background:#fff;z-index:5;min-height:64px;position:relative;box-shadow:0 -2px 5px #13273505}
.invoice-footer-actions{display:flex;align-items:center;gap:18px;flex:1;min-width:0;flex-wrap:wrap}
.invoice-footer-actions .check-label{font-size:10px;font-weight:400;margin:0;gap:6px;white-space:nowrap}
.invoice-footer-actions .check-label input{width:12px;height:12px;margin:0}
.invoice-footer-actions .form-actions{margin:0 0 0 auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.invoice-footer-actions .button{height:32px;min-height:32px;padding:7px 13px;font-size:11px;border-radius:3px;white-space:nowrap}
.invoice-totals{display:flex;gap:22px;align-items:center;border-left:1px solid #e5eaee;padding-left:18px;margin-left:0;flex:none}
.invoice-totals>div{display:grid;gap:1px;min-width:62px;text-align:right}
.invoice-totals span{font-size:9px;color:#7b858d;line-height:1.6;white-space:nowrap}
.invoice-totals strong{font-size:14px;font-weight:550;font-variant-numeric:tabular-nums;white-space:nowrap}
.invoice-totals .invoice-tax-totals{font-size:9px;line-height:1.7;gap:0}
.invoice-tax-totals b{font-weight:450;display:inline-block;margin-left:7px;min-width:45px;color:#66737e}
#invoiceBalanceTotal.is-balanced{color:#486658}
#invoiceBalanceTotal.is-mismatch{color:#b04429}
.invoice-review-footer .form-error{flex-basis:100%;font-size:11px;margin:0;padding:5px 0;color:#b04429}
.invoice-mobile-tabs{display:none}
.invoice-dialog{width:min(680px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:85dvh;padding:20px 24px 24px;border:1px solid #dce2e6;border-radius:5px;color:var(--ink);background:#fff;box-shadow:0 16px 60px #162b3c30;overflow:auto}
.invoice-dialog::backdrop{background:#15253555}
.invoice-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px}
.invoice-dialog-heading h3{margin:0;font-size:16px}
.invoice-dialog-heading .icon-button{width:28px;height:28px;font-size:20px}
.invoice-dialog h4{font-size:12px;margin:20px 0 10px}
.invoice-dialog .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.invoice-dialog p{font-size:11px}
.invoice-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px;background:#f6f8f9;padding:12px}
.invoice-dialog .supplier-choice{font-size:12px;font-weight:450;padding:10px 12px;text-align:left}
.invoice-supplier-search{display:flex;gap:8px;margin:12px 0}
.invoice-supplier-search input{font-size:12px;padding:7px 10px;min-width:0}
.invoice-supplier-search .button{font-size:11px;white-space:nowrap}
.invoice-tools-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:16px;flex-wrap:wrap}
.invoice-tools-tabs button{background:none;border:0;border-bottom:2px solid transparent;border-radius:0;padding:8px 10px;font-size:11px;color:#667681}
.invoice-tools-tabs button[aria-pressed=true]{border-color:var(--orange);color:var(--ink)}
.invoice-dialog .recognized-line{padding:12px;border-radius:3px;font-size:11px}
.invoice-dialog .recognized-line h4{margin:0 0 10px}
.invoice-dialog .recognized-serials{font-size:11px}
.invoice-dialog .invoice-check-summary{border-radius:3px;font-size:11px}
.invoice-dialog .invoice-check{font-size:11px;border-radius:3px}
.invoice-booking-extra .form-grid{padding:0;margin:0}
@media(min-width:1001px){
 .invoice-focus .sidebar{width:68px;padding:18px 10px 12px}
 .invoice-focus .main-shell{margin-left:68px}
 .invoice-focus .sidebar .brand{margin:0 4px 24px;justify-content:center}
 .invoice-focus .sidebar .brand img{width:32px;height:32px}
 .invoice-focus .sidebar .brand>span,.invoice-focus .sidebar .workspace-label,.invoice-focus .sidebar-system{display:none}
 .invoice-focus .sidebar .nav-link{position:relative;justify-content:center;padding:12px 0;border-radius:4px}
 .invoice-focus .sidebar .nav-link>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 .invoice-focus .sidebar-bottom{padding-top:24px}
}
@media(max-width:1000px){
 .invoice-focus .topbar{display:flex;height:54px;padding:0 16px}
 .invoice-focus .topbar h1{font-size:15px}
 .invoice-focus .topbar .breadcrumb{display:none}
 .invoice-focus #invoiceReviewForm{height:calc(100dvh - 54px)}
 .invoice-focus .review-open .invoice-workspace{grid-template-columns:minmax(0,1fr) minmax(340px,44%)}
 .invoice-focus .review-open .invoice-editor{padding:14px 12px 24px}
 .invoice-focus .review-open .invoice-document-preview{padding:12px}
 .invoice-footer-actions{gap:8px}
 .invoice-footer-actions .check-label{font-size:9px}
 .invoice-review-footer{gap:10px;padding:8px 12px}
 .invoice-totals{gap:12px;padding-left:12px}
 .invoice-totals strong{font-size:12px}
}
@media(max-width:760px){
 .invoice-focus #invoiceReviewForm{grid-template-rows:40px 36px minmax(0,1fr) auto}
 .invoice-review-heading{padding:0 10px;gap:5px}
 .invoice-review-heading h3{font-size:10px}
 .invoice-review-heading .tag{display:none}
 .invoice-back,.invoice-review-heading .invoice-toolbar-button{font-size:10px;padding:6px}
 .invoice-focus .review-open .invoice-workspace{display:block;overflow:hidden}
 .invoice-mobile-tabs{display:flex;justify-content:center;align-items:stretch;border-bottom:1px solid var(--line);background:#f7f8f9;gap:20px}
 .invoice-mobile-tabs button{border:0;border-bottom:2px solid transparent;background:none;padding:7px 12px;font-size:11px;color:#72808a;min-width:70px}
 .invoice-mobile-tabs button[aria-pressed=true]{border-bottom-color:var(--orange);color:var(--ink)}
 .invoice-grid[data-mobile-panel=entry] .invoice-document{display:none}
 .invoice-grid[data-mobile-panel=document] .invoice-editor{display:none}
 .invoice-focus .review-open .invoice-document{height:100%;border:0;min-height:0}
 .invoice-focus .review-open .invoice-editor{height:100%;padding:14px 14px 24px;overflow:auto}
 .invoice-detail .invoice-primary-fields{gap:12px 8px}
 .invoice-detail .form-grid label{font-size:9px}
 .invoice-detail .form-grid input,.invoice-detail .form-grid select{font-size:11px;padding:5px}
 .invoice-supplier-card{margin-bottom:14px}
 .invoice-supplier-identity strong{font-size:12px}
 .invoice-review-footer{display:grid;grid-template-columns:1fr;gap:7px;padding:8px 12px}
 .invoice-footer-actions{gap:8px;display:grid;grid-template-columns:1fr 1fr auto}
 .invoice-footer-actions .check-label{font-size:9px;white-space:normal}
 .invoice-footer-actions .form-actions{gap:3px;margin:0}
 .invoice-footer-actions .button{font-size:10px;padding:6px 9px;height:30px;min-height:30px}
 .invoice-footer-actions .invoice-toolbar-button{font-size:9px;padding:6px 3px}
 .invoice-footer-actions #invoiceExport{grid-column:1/-1}
 .invoice-totals{justify-content:space-between;border:0;border-top:1px solid #eef0f2;padding:5px 0 0;gap:14px;flex:none}
 .invoice-totals>div{min-width:0}
 .invoice-totals strong{font-size:13px}
 .invoice-totals span{font-size:8px}
 .invoice-tax-totals b{min-width:0;margin-left:4px}
 .invoice-dialog{max-height:88dvh;padding:16px}
 .invoice-dialog .form-grid{grid-template-columns:1fr 1fr}
 .invoice-tools-tabs{gap:0}
 .invoice-tools-tabs button{font-size:10px;padding:8px 7px}
}
@media(max-width:360px){
 .invoice-detail .invoice-primary-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .invoice-primary-fields [data-invoice-field=description]{grid-column:1/-1}
 .invoice-booking-main{gap:10px 6px}
 .invoice-footer-actions{grid-template-columns:1fr auto}
 .invoice-footer-actions>label:nth-child(2){display:none}
 .invoice-booking-line{padding:9px}
}

.invoice-focus .invoice-detail input,.invoice-focus .invoice-detail select{font-weight:400}
.invoice-focus .invoice-primary-fields input,.invoice-focus .booking-cell input{font-size:12px}
#invoiceSupplierSelected:empty{display:none}
#invoiceSupplierSelected:empty+*{grid-column:1/-1}
@media(max-width:760px){.invoice-focus .invoice-primary-fields input,.invoice-focus .booking-cell input{font-size:11px}}
/* Shared compact navigation, expanding over content without moving the page. */
@media(min-width:1001px){
 .sidebar,.invoice-focus .sidebar{width:68px;padding:18px 10px 12px;transition:width .18s ease;overflow-x:hidden}
 .main-shell,.invoice-focus .main-shell{margin-left:68px}
 .sidebar .brand,.invoice-focus .sidebar .brand{margin:0 4px 24px;justify-content:flex-start;min-height:38px;gap:13px;white-space:nowrap}
 .sidebar .brand img,.invoice-focus .sidebar .brand img{width:32px;height:32px;flex:none}
 .sidebar .brand>span,.invoice-focus .sidebar .brand>span{display:block;opacity:0;transition:opacity .12s;pointer-events:none;white-space:nowrap}
 .sidebar .workspace-label,.invoice-focus .sidebar .workspace-label{display:block;height:20px;line-height:20px;margin:12px 12px 5px;opacity:0;white-space:nowrap;overflow:hidden;transition:opacity .12s}
 .sidebar nav{width:100%;gap:5px}
 .sidebar .nav-link,.invoice-focus .sidebar .nav-link{position:relative;justify-content:flex-start;padding:12px 14px;border-radius:4px;gap:14px;white-space:nowrap;overflow:hidden}
 .sidebar .nav-link .icon{flex:none;width:18px;height:18px}
 .sidebar .nav-link>span,.invoice-focus .sidebar .nav-link>span{position:static;display:block;width:auto;height:auto;margin:0;padding:0;clip:auto;overflow:visible;opacity:0;transition:opacity .12s;white-space:nowrap}
 .sidebar-system,.invoice-focus .sidebar-system{display:flex;height:66px;padding:16px 12px;white-space:nowrap;overflow:hidden}
 .sidebar-system>span:not(.status-dot){opacity:0;transition:opacity .12s}
 .sidebar-bottom,.invoice-focus .sidebar-bottom{padding-top:24px}
 .sidebar:hover,.sidebar:has(:focus-visible),.invoice-focus .sidebar:hover,.invoice-focus .sidebar:has(:focus-visible){width:238px;box-shadow:10px 0 30px #14253620}
 .sidebar:hover .brand>span,.sidebar:has(:focus-visible) .brand>span,.sidebar:hover .workspace-label,.sidebar:has(:focus-visible) .workspace-label,.sidebar:hover .nav-link>span,.sidebar:has(:focus-visible) .nav-link>span,.sidebar:hover .sidebar-system>span,.sidebar:has(:focus-visible) .sidebar-system>span{opacity:1;pointer-events:auto}
}
@media(prefers-reduced-motion:reduce){.sidebar,.sidebar *{transition:none!important}}
.supplier-manager .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.supplier-manager label{font-size:11px;color:#53606a;font-weight:500;min-width:0}
.supplier-manager input,.supplier-manager select{font-size:12px;margin-top:4px;padding:7px 9px;border-radius:3px;font-weight:400}
.supplier-manager .check-label{font-size:11px;margin-top:16px;align-items:flex-start}
.supplier-manager .check-label input{width:14px;height:14px;margin:2px 0 0;flex:none}
.supplier-manager .form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.supplier-manager .table-scroll{max-height:42dvh;overflow:auto}
.supplier-manager table{font-size:11px;table-layout:fixed;width:100%}
.supplier-manager td{white-space:normal;overflow-wrap:anywhere}
#invoiceSupplierManage{margin:14px 0}
#invoiceSupplierManage .button,#invoiceSupplierManage .text-button{font-size:11px}
@media(max-width:480px){.supplier-manager .form-grid{grid-template-columns:1fr}.supplier-manager .form-actions .button{font-size:11px}}

/* Dense inbox: readable document details, inline amount and status. */
.invoice-grid:not(.review-open){display:block}
.invoice-grid:not(.review-open) .invoice-detail{display:none}
.invoice-list th{padding-top:10px;padding-bottom:10px;font-size:10px}
.invoice-list th:first-child{width:52%}
.invoice-list th:nth-child(2){width:auto}
.invoice-list td{padding:8px 14px;line-height:1.35;vertical-align:middle}
.invoice-list td strong{font-size:12px;line-height:1.4}
.invoice-list td small{display:block;font-size:10px;line-height:1.35;margin-top:2px;overflow-wrap:anywhere}
.invoice-list-value{display:flex;align-items:center;gap:6px 12px;flex-wrap:wrap}
.invoice-list-value>strong{white-space:nowrap}
.invoice-list-value .tag{margin:0;padding:3px 7px;font-size:10px;line-height:1.35;white-space:nowrap}
.invoice-list .invoice-open{height:30px;min-height:30px}
@media(max-width:480px){
 .invoice-list tr{padding:9px 12px}
 .invoice-list td{padding:0}
 .invoice-list td:nth-child(2){margin-top:5px;display:block}
 .invoice-list-value{gap:6px 10px}
 .invoice-list .invoice-open{height:36px;min-height:36px}
}

/* Sam host, still loading/fallback image and independent thought indicator. */
.sam-character{display:inline-block;position:relative;flex:none;width:96px;aspect-ratio:2/3;min-height:0;padding:0;border:0;border-radius:12px;background:transparent;color:inherit;cursor:pointer;overflow:hidden;vertical-align:middle;isolation:isolate}
.sam-character:focus-visible{outline:3px solid var(--orange);outline-offset:4px}
.sam-sprite{display:block;width:100%;height:100%;background:url(sam-atlas.png) 0 0/300% 200% no-repeat}
.sam-thoughts{position:absolute;display:none;right:2%;top:3%;gap:3px;padding:5px 6px;background:#ffffffec;border:1px solid #dce3eb;border-radius:10px;box-shadow:0 2px 8px #14253612}
.sam-thoughts i{display:block;width:3px;height:3px;background:#d7192b;border-radius:50%;animation:sam-dot 1.2s ease-in-out infinite;animation-play-state:paused}
.sam-thoughts i:nth-child(2){animation-delay:.16s}.sam-thoughts i:nth-child(3){animation-delay:.32s}
.sam-character[data-state=thinking] .sam-thoughts{display:flex}
.sam-character[data-visible=true] .sam-thoughts i{animation-play-state:running}
.sam-page-hidden .sam-thoughts i{animation-play-state:paused!important}
body[data-sam-motion=off] .sam-thoughts i{animation:none!important}
@media(prefers-reduced-motion:reduce){body:not([data-sam-motion=on]) .sam-thoughts i{animation:none!important}}
@keyframes sam-dot{0%,70%,100%{opacity:.35;transform:translateY(0)}35%{opacity:1;transform:translateY(-2px)}}
.assistant-card{display:grid;grid-template-columns:minmax(0,1fr) 96px;column-gap:8px;align-items:center;background:linear-gradient(135deg,#fafbfc,#f3f5f7);border-color:#e0e5e9}
.assistant-card>.sam-dashboard{grid-column:2;grid-row:1/4;align-self:center}
.assistant-card>.eyebrow,.assistant-card>h3,.assistant-card>p{grid-column:1}
.assistant-card>.eyebrow{color:#a82330}
.assistant-card>p{color:#72808c}
.assistant-card>h3{font-size:22px;line-height:1.25}
.assistant-card>.button,.assistant-card>.text-button{grid-column:1/-1}
.chat-heading .sam-chat{width:48px;height:72px;aspect-ratio:auto;margin:-8px 0;align-self:center}
#welcomeHero{display:flex;align-items:center;gap:14px}
#welcomeHero .sam-lenovo{width:50px;height:75px;aspect-ratio:auto}
#welcomeHero p{flex:1;min-width:0}
.sam-login-introduction{display:flex;align-items:center;gap:16px}
.sam-login{width:118px;max-width:38%;align-self:flex-end}
.sam-login-introduction>div{flex:1;min-width:0}
.sam-login-introduction .story-line{gap:8px;line-height:1.5}
.sam-login-introduction .story-line>span{flex:none}
.sam-motion-setting{display:block;margin:18px 0 24px;font-size:12px}
.sam-motion-setting select{margin-top:7px}
@media(max-width:480px){.assistant-card{grid-template-columns:minmax(0,1fr) 84px}.sam-dashboard{width:84px}.chat-heading .sam-chat{width:40px;height:60px;margin:-4px 0}.chat-heading{gap:10px}}

/* Sam remains recognisable on wide screens instead of shrinking to an icon. */
.chat-workspace{display:grid;grid-template-columns:240px minmax(0,1fr);gap:22px;align-items:start}
.chat-workspace>.chat-shell{min-width:0}
.sam-companion{position:sticky;top:20px;display:flex;flex-direction:column;align-items:center;padding:20px 16px 24px;background:radial-gradient(ellipse at 50% 42%,#edf0f3 0%,#fafbfc 65%,#fff 100%)}
.sam-companion>.sam-chat{width:192px;height:288px;aspect-ratio:auto;margin:0;max-width:100%;align-self:center}
.sam-companion-caption{text-align:center;margin-top:9px}
.sam-companion-caption strong{display:block;font-size:23px;line-height:1.3}
.sam-companion-caption span{display:block;font-size:12px;color:var(--muted);margin-top:4px}
.sam-sprite{clip-path:inset(1% 3% 2% 3%)}
.sam-character[data-state=thinking] .sam-sprite{clip-path:inset(1% 8% 2% 9%)}
.sam-companion .sam-thoughts{right:8px;top:12px;gap:4px;padding:7px 8px}
.sam-companion .sam-thoughts i{width:4px;height:4px}
.assistant-card{grid-template-columns:minmax(0,1fr);justify-items:start}
.assistant-card>.sam-dashboard{width:150px;height:225px;aspect-ratio:auto;grid-column:1;grid-row:1;justify-self:center;margin:-8px 0 12px}
.assistant-card>.eyebrow,.assistant-card>h3,.assistant-card>p,.assistant-card>.button,.assistant-card>.text-button{grid-column:1;grid-row:auto}
.assistant-card>h3{font-size:23px}
.sam-login{width:160px;max-width:44%}
#welcomeHero .sam-lenovo{width:90px;height:135px}
@media(max-width:1020px){
 .chat-workspace{grid-template-columns:minmax(0,1fr);gap:14px}
 .sam-companion{position:static;flex-direction:row;justify-content:flex-start;gap:22px;padding:8px 22px;background:linear-gradient(110deg,#f0f3f5,#fff)}
 .sam-companion>.sam-chat{width:100px;height:150px}
 .sam-companion-caption{text-align:left;margin:0}
 .sam-companion-caption strong{font-size:24px}
 .sam-companion .sam-thoughts{right:0;top:5px}
}
@media(max-width:360px){
 .sam-companion{padding:8px 14px;gap:16px}
 .sam-companion>.sam-chat{width:90px;height:135px}
 .sam-companion-caption strong{font-size:22px}
 .sam-companion-caption span{font-size:11px}
 #welcomeHero .sam-lenovo{width:76px;height:114px}
}

/* Sam 3D: the articulated mesh replaces the atlas as soon as a frame is ready. */
.sam-character .sam-sprite{animation:none!important;transform:none!important;background-position:0 0!important;clip-path:inset(1% 3% 2% 3%)!important}
.sam-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none}
.sam-character[data-renderer="3d"] .sam-sprite{visibility:hidden}
.sam-character:not([data-renderer="3d"]) .sam-canvas{visibility:hidden}
.sam-thoughts{z-index:2}
