:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #222b3e;
  background: #f6f7f9;
  font-synthesis: none;
  --ink: #15161d;
  --muted: #737b8c;
  --line: #e6e9ef;
  --purple: #d6075f;
  --soft: #fde8f1;
  --green: #19553f;
  --surface: #fff;
  --blue: #0b6fe8;
  --pink: #f00a6e;
  --shadow: 0 3px 12px #15161d08;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4c5568;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 550;
  transition: background 0.15s;
}
button:hover {
  background: #fbf1f5;
}
button.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
button.primary:hover {
  background: #2b2c36;
}
button.danger {
  color: #af3748;
  background: #fff7f8;
  border-color: #f3d4da;
}
button.ghost {
  border-color: transparent;
  background: transparent;
}
button.small {
  min-height: 31px;
  padding: 5px 9px;
  font-size: 11px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.wide {
  width: 100%;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f36ba6;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe3eb;
  border-radius: 7px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  font-size: 13px;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--purple);
}
textarea {
  resize: vertical;
  min-height: 85px;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 550;
  color: #697184;
}
label input,
label select,
label textarea {
  margin-top: 6px;
}
input::placeholder,
textarea::placeholder {
  color: #959baa;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  font-weight: 720;
  letter-spacing: -1.15px;
  line-height: 1.25;
}
h2 {
  font-size: 15px;
  letter-spacing: -0.25px;
  font-weight: 650;
}
h3 {
  font-size: 13px;
}
a {
  color: var(--purple);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
svg.icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.eyebrow {
  color: #9298a6;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.mono {
  font-variant-numeric: tabular-nums;
}
.boot {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-mark {
  width: 39px;
  height: 41px;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 750;
}
.brand-name {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 2px;
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-size: 8px;
  letter-spacing: 2.5px;
  margin-top: 7px;
  font-weight: 600;
  color: #8c94a6;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 15px;
  z-index: 100;
  background: #fff;
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 244px;
  background: #111218;
  color: #bbc1cf;
  display: flex;
  flex-direction: column;
  padding: 26px 16px;
  z-index: 20;
  border-right: 1px solid #25262e;
}
.sidebar .brand {
  padding: 0 10px 25px;
}
.sidebar .brand-mark {
  background: #ff3d8f;
  color: #111218;
}
.sidebar .brand-name {
  color: white;
  font-size: 19px;
}
.sidebar .brand-name small {
  color: #8f98ae;
}
.side-company {
  border: 1px solid #31323c;
  background: #1c1d25;
  color: #eef0f6;
  border-radius: 9px;
  padding: 12px;
  font-size: 12px;
  margin-bottom: 27px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar nav button {
  background: transparent;
  border: 0;
  color: #a4adbf;
  justify-content: flex-start;
  text-align: left;
  padding: 12px 14px;
  min-height: 43px;
  font-size: 12px;
}
.sidebar nav button:hover {
  background: #22232c;
  color: #fff;
}
.sidebar nav button.active {
  background: #ff3d8f1f;
  color: #ff8fbd;
}
.sidebar .eyebrow {
  font-size: 8px;
  padding: 0 14px;
  color: #626d84;
}
.nav-divider {
  height: 1px;
  background: #282932;
  margin: 19px 8px;
}
.sidebar-foot {
  margin-top: auto;
  padding: 25px 10px 0;
  color: #818ba1;
  font-size: 10px;
}
.profile {
  display: flex;
  gap: 9px;
  align-items: center;
}
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbe6ef;
  color: #c3065a;
  font-size: 12px;
  font-weight: 650;
  flex-shrink: 0;
}
.profile strong {
  display: block;
  font-size: 11px;
  color: #e8ebf3;
}
.sidebar-foot .logout {
  margin-top: 13px;
  justify-content: flex-start;
  color: #929cb1;
  padding-left: 0;
  font-size: 11px;
}
.workspace {
  margin-left: 244px;
  min-height: 100vh;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  background: #ffffffeb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 15;
  backdrop-filter: blur(12px);
}
.breadcrumb {
  font-size: 11px;
  color: #929aaa;
  display: flex;
  gap: 10px;
  align-items: center;
}
.breadcrumb strong {
  font-weight: 500;
  color: #4d576c;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.company-select {
  max-width: 245px;
  font-size: 12px;
  padding: 9px;
  background: #fff;
}
.topbar .brand {
  display: none;
}
.connection {
  width: 6px;
  height: 6px;
  background: #5b9a7b;
  border-radius: 50%;
}
.workspace main {
  max-width: 1480px;
  padding: 29px 30px 36px;
  margin: auto;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}
.page-head .sub {
  margin-top: 7px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 21px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.stats {
  margin-bottom: 24px;
}
.stat .stat-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 9px;
  align-items: center;
}
.stat .stat-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--soft);
  color: var(--purple);
  border-radius: 9px;
}
.stat-value {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  margin: 13px 0 4px;
}
.stat .sub {
  font-size: 10px;
}
.hero {
  background: #15161d;
  color: white;
  border-radius: 12px;
  padding: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 23px;
}
.hero h2 {
  font-size: 19px;
}
.hero p {
  color: #a9b3ca;
  font-size: 12px;
  margin-top: 7px;
}
.hero button {
  background: #f497c0;
  color: #1b2237;
  border-color: transparent;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.search {
  flex: 1;
  min-width: 160px;
  position: relative;
}
.search input {
  padding-left: 36px;
}
.search .icon {
  position: absolute;
  left: 11px;
  top: 12px;
  color: #9298a6;
}
.toolbar select {
  width: auto;
  max-width: 220px;
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tabs button {
  border: 0;
  background: transparent;
  font-size: 11px;
  padding: 8px 12px;
  min-height: 34px;
}
.tabs button.active {
  color: var(--purple);
  background: var(--soft);
}
.tabs .count {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 5px;
  background: #e7e8ed;
  color: #6e7585;
}
.tablewrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 15px 9px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: middle;
}
th {
  font-size: 10px;
  font-weight: 550;
  color: #8a91a0;
  white-space: nowrap;
}
td:last-child,
th:last-child {
  text-align: right;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.document-number {
  font-size: 12px;
  font-weight: 650;
  color: #253148;
  display: block;
  margin-bottom: 3px;
}
.document-client {
  font-size: 11px;
  color: #788194;
}
.cell-sub {
  font-size: 10px;
  color: #9299a7;
  display: block;
  margin-top: 4px;
}
.numeric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #f0f1f5;
  color: #788194;
  font-size: 10px;
  white-space: nowrap;
  border-radius: 5px;
}
.badge:before {
  content: "";
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.badge.issued {
  background: #fbe9f1;
  color: #c3065a;
}
.badge.unpaid,
.badge.partial {
  background: #fff4e5;
  color: #a87426;
}
.badge.paid {
  background: #e8f4ed;
  color: #3b8661;
}
.badge.overdue {
  background: #fbecef;
  color: #b34b60;
}
.row-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.row-actions button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 10px;
}
.empty {
  text-align: center;
  padding: 50px 20px;
}
.empty .empty-icon {
  width: 58px;
  height: 58px;
  background: #fcf0f5;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: #ef6aa4;
  margin: 0 auto 17px;
}
.empty .empty-icon svg {
  width: 25px;
  height: 25px;
}
.empty h2 {
  font-size: 17px;
  margin-bottom: 8px;
}
.empty .sub {
  max-width: 360px;
  margin: auto;
}
.empty .actions {
  justify-content: center;
  margin-top: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .span2 {
  grid-column: 1/-1;
}
.form-section {
  margin-top: 22px;
}
.field-note {
  font-size: 10px;
  color: #959baa;
  margin-top: 5px;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}
.summary-panel {
  position: sticky;
  top: 98px;
}
.section-number {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  background: var(--soft);
  color: var(--purple);
  font-size: 11px;
  margin-right: 7px;
  border-radius: 6px;
}
.line-header,
.line-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 65px 90px 85px 31px;
  gap: 8px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #eff0f5;
}
.line-header {
  font-size: 10px;
  color: #9299a7;
  padding-top: 0;
}
.line-row input {
  font-size: 12px;
  padding: 8px 7px;
}
.line-row .sku {
  margin-top: 5px;
  font-size: 10px;
  color: #8c94a6;
  padding: 5px 7px;
  border-color: transparent;
  background: #f8f9fb;
}
.line-row .line-total {
  font-size: 12px;
  text-align: right;
}
.line-row button {
  padding: 4px;
  min-height: 30px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  font-size: 12px;
  color: #727c8f;
}
.summary-row strong {
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.total-value {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -1.2px;
  margin: 6px 0 17px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 19px 0;
}
.hint {
  font-size: 10px;
  color: #929aaa;
  line-height: 1.65;
  margin-top: 12px;
}
.catalog-picker {
  background: #fdf6f9;
  border: 1px solid #f9dce8;
  border-radius: 9px;
  padding: 13px;
  margin-bottom: 16px;
}
.catalog-results {
  max-height: 260px;
  overflow: auto;
}
.catalog-row {
  padding: 11px 2px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f5e6ec;
}
.catalog-row strong {
  font-size: 12px;
  font-weight: 550;
}
.catalog-row small {
  display: block;
  color: #9296a4;
  font-size: 10px;
  margin-top: 3px;
}
.chip {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f4f5f8;
  color: #7a8292;
}
.inline-button {
  color: var(--purple);
  font-size: 11px;
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 25px;
}
.section-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.alert {
  padding: 13px 15px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.65;
  background: #fff5e8;
  border: 1px solid #f0dfc2;
  color: #91692c;
  margin-bottom: 18px;
}
.alert.error {
  background: #fff1f3;
  border-color: #f2d1d7;
  color: #aa4053;
}
.alert.info {
  background: #fbeef4;
  color: #b9195f;
  border-color: #fadfeb;
}
.alert a {
  color: inherit;
  text-decoration: underline;
}
.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}
.detail-facts span {
  display: block;
  font-size: 10px;
  color: #929aab;
  margin-bottom: 6px;
}
.detail-facts strong {
  font-size: 12px;
  font-weight: 550;
}
.payment-list .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.item strong {
  font-size: 12px;
}
.item .sub {
  font-size: 10px;
}
.doc-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.activity {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.activity .activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59bc2;
  margin-top: 5px;
  flex-shrink: 0;
}
.activity p {
  font-size: 12px;
}
.activity small {
  font-size: 10px;
  color: #9299a6;
}
.entity-card .card-initial {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 14px;
}
.entity-card h2 {
  margin-bottom: 6px;
}
.entity-card .card-foot {
  display: flex;
  gap: 7px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 600px);
  background: #15161d;
  color: #fff;
  border: 1px solid #3c465e;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 12px 40px #18203525;
  z-index: 110;
}
.toast[hidden] {
  display: none;
}
.toast.error {
  background: #7e2738;
}
.modal {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 27px;
  width: min(580px, calc(100% - 28px));
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 20px 100px #18203535;
  color: var(--ink);
}
.modal::backdrop {
  background: #121a2b75;
  backdrop-filter: blur(3px);
}
.modal .modal-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
.modal h2 {
  font-size: 20px;
  letter-spacing: -0.6px;
}
.modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}
.modal .sub {
  margin-bottom: 15px;
}
.invite-link {
  word-break: break-all;
  font-size: 12px;
  line-height: 1.7;
  background: #fcf4f8;
  border: 1px solid #f9dce8;
  padding: 12px;
  border-radius: 8px;
}
.auth {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100dvh;
  background: #fff;
}
.auth-hero {
  background: #15161d;
  position: relative;
  overflow: hidden;
  color: white;
  padding: 55px 9%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
}
.auth-hero:after {
  content: "";
  position: absolute;
  width: 450px;
  height: 450px;
  border: 1px solid #ffffff0a;
  border-radius: 50%;
  right: -160px;
  bottom: -80px;
  box-shadow:
    0 0 0 70px #ffffff03,
    0 0 0 140px #ffffff02;
  pointer-events: none;
}
.auth-hero .brand-mark {
  background: #ff3d8f;
  color: #15161d;
}
.auth-hero .brand-name {
  font-size: 22px;
}
.auth-hero h1 {
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: -1.8px;
  font-weight: 650;
  max-width: 430px;
}
.auth-hero h1 span {
  color: #ff4f9a;
}
.auth-hero .hero-description {
  color: #a1abc1;
  line-height: 1.9;
  font-size: 14px;
  margin-top: 22px;
  max-width: 350px;
}
.auth-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 35px;
}
.auth-features div {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #bdc5d7;
  font-size: 11px;
}
.auth-hero footer {
  font-size: 10px;
  color: #7c89a4;
}
.auth-form {
  padding: 60px 14%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form h2 {
  font-size: 27px;
  letter-spacing: -1px;
  margin: 13px 0 10px;
}
.auth-form .sub {
  margin-bottom: 28px;
}
.auth-form label {
  margin-bottom: 17px;
}
.auth-form input {
  min-height: 46px;
}
.auth-form .primary {
  min-height: 46px;
  font-size: 13px;
}
.auth-form .auth-foot {
  margin-top: 22px;
  font-size: 11px;
  line-height: 1.8;
  color: #969dad;
}
.auth-back {
  margin-top: 17px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 70px;
}
.password-wrap button {
  position: absolute;
  right: 5px;
  top: 10px;
  font-size: 10px;
  padding: 5px;
  min-height: 29px;
  background: transparent;
  border: 0;
}
.mobile-nav {
  display: none;
}
.desktop-only {
  display: initial;
}
th.desktop-only,
td.desktop-only {
  display: table-cell;
}
th.numeric,
td.numeric {
  text-align: right;
}
.currency-selector {
  max-width: 95px;
  font-size: 12px;
}
.loading {
  padding: 60px;
  text-align: center;
  color: #9199aa;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
}
.checkline input {
  margin: 0;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.install-card {
  background: #fcf1f6;
  border: 1px solid #f9dde9;
  border-radius: 9px;
  padding: 18px;
}
.install-card h2 {
  margin-bottom: 9px;
}
.install-card .sub {
  font-size: 11px;
}
.report-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.report-row strong {
  font-size: 13px;
}
.report-row .sub {
  font-size: 11px;
}
.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
}
.bar-track {
  height: 6px;
  border-radius: 5px;
  background: #f8eef2;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: #e0186f;
  border-radius: 5px;
}
.table-footer {
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #9299a7;
}
.note-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #9199aa;
  margin-top: 19px;
}
.version {
  font-size: 9px;
  letter-spacing: 0.8px;
  color: #9fa6b2;
}
.offline {
  background: #fff1da;
  color: #8e672d;
  padding: 8px 20px;
  font-size: 11px;
  text-align: center;
}
.hidden,
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  .editor-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .workspace main {
    padding-top: 35px;
  }
  .auth-form {
    padding: 60px 17%;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 190px;
    padding: 25px 12px;
  }
  .workspace {
    margin-left: 190px;
  }
  .workspace main {
    padding: 24px;
  }
  .topbar {
    padding: 15px 24px;
  }
  .editor-grid {
    grid-template-columns: minmax(0, 1fr) 228px;
  }
  .line-header,
  .line-row {
    grid-template-columns: minmax(95px, 1fr) 53px 75px 28px;
  }
  .line-total {
    display: none;
  }
  .line-row button {
    grid-column: 4;
  }
  .form-grid {
    gap: 12px;
  }
  .stat-value {
    font-size: 25px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 170px;
    padding: 23px 9px;
  }
  .workspace {
    margin-left: 170px;
  }
  .sidebar .brand-name {
    font-size: 16px;
  }
  .sidebar .brand {
    gap: 7px;
    padding-left: 6px;
  }
  .brand-mark {
    width: 34px;
    height: 37px;
  }
  .editor-grid {
    grid-template-columns: 1fr;
  }
  .summary-panel {
    position: static;
  }
  .doc-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .topbar .breadcrumb {
    display: none;
  }
  .stat-value {
    font-size: 23px;
  }
  .desktop-only,
  th.desktop-only,
  td.desktop-only {
    display: none;
  }
  .auth-hero {
    padding: 45px 9%;
  }
  .auth-hero h1 {
    font-size: 35px;
  }
  .auth-form {
    padding: 40px 10%;
  }
  .grid3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  h1 {
    font-size: 25px;
  }
  .sidebar {
    display: none;
  }
  .workspace {
    margin-left: 0;
    padding-bottom: 90px;
  }
  .topbar {
    height: auto;
    min-height: 72px;
    padding: 13px 17px;
    flex-wrap: wrap;
    position: static;
  }
  .topbar .brand {
    display: flex;
  }
  .topbar .brand-name {
    font-size: 17px;
  }
  .topbar .brand-name small {
    font-size: 7px;
  }
  .company-select {
    max-width: 185px;
    font-size: 11px;
  }
  .topbar .avatar {
    display: none;
  }
  .top-actions {
    gap: 6px;
  }
  .workspace main {
    padding: 23px 16px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border-top: 1px solid #e3e6ed;
    padding: 8px 5px max(9px, env(safe-area-inset-bottom));
    justify-content: space-around;
    gap: 2px;
  }
  .mobile-nav button {
    flex-direction: column;
    font-size: 9px;
    min-width: 44px;
    min-height: 48px;
    border: 0;
    background: transparent;
    padding: 6px;
    color: #9b9fad;
    gap: 4px;
  }
  .mobile-nav button.active {
    color: var(--purple);
    background: var(--soft);
    border-radius: 10px;
  }
  .page-head {
    gap: 15px;
    margin-bottom: 21px;
  }
  .page-head .actions {
    gap: 6px;
  }
  .panel {
    padding: 17px;
    border-radius: 11px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .grid3 {
    grid-template-columns: 1fr 1fr;
  }
  .stats {
    gap: 9px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stat {
    padding: 13px 10px;
  }
  .stat .stat-icon {
    display: none;
  }
  .stat .stat-label {
    font-size: 10px;
  }
  .stat-value {
    font-size: 20px;
    letter-spacing: -0.7px;
    margin: 11px 0 3px;
  }
  .stat .sub {
    font-size: 9px;
  }
  .hero {
    padding: 20px;
    flex-wrap: wrap;
  }
  .hero h2 {
    font-size: 17px;
  }
  .hero p {
    font-size: 11px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar select {
    max-width: 100%;
    flex: 1;
    font-size: 11px;
  }
  .search {
    flex-basis: 100%;
  }
  .tabs {
    gap: 1px;
  }
  .tabs button {
    font-size: 10px;
    padding: 8px 10px;
  }
  .form-grid {
    gap: 14px;
  }
  .line-header,
  .line-row {
    grid-template-columns: minmax(90px, 1fr) 51px 68px 27px;
    gap: 6px;
  }
  .line-row input {
    padding: 8px 5px;
    font-size: 12px;
  }
  .line-row .sku {
    font-size: 10px;
  }
  .line-row button {
    padding: 3px;
  }
  .line-header {
    font-size: 9px;
  }
  .detail-facts {
    grid-template-columns: 1fr 1fr;
    gap: 17px;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
  .auth-form {
    min-height: 100dvh;
    padding: 45px 25px;
    max-width: 470px;
    width: 100%;
    margin: auto;
  }
  .auth-form .auth-mobile-brand {
    display: block;
    margin-bottom: 27px;
  }
  .toast {
    bottom: 92px;
    width: max-content;
    max-width: calc(100vw - 30px);
  }
  td,
  th {
    padding: 13px 6px;
  }
  td {
    font-size: 11px;
  }
  .row-actions button {
    font-size: 10px;
  }
  .modal {
    padding: 21px;
  }
  .modal .form-grid {
    grid-template-columns: 1fr;
  }
  .modal .span2 {
    grid-column: auto;
  }
  .version {
    display: none;
  }
}
@media (max-width: 360px) {
  .company-select {
    max-width: 150px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
  }
  .stat-value {
    margin: 0;
  }
  .stat .sub {
    display: none;
  }
  .grid3 {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span2 {
    grid-column: auto;
  }
  .page-head .actions {
    width: 100%;
  }
}
@media print {
  @page {
    size: A4;
    margin: 13mm;
  }
  body {
    background: white;
  }
  .skip-link,
  .sidebar,
  .topbar,
  .mobile-nav,
  .page-head,
  .toast,
  dialog,
  .no-print,
  .offline {
    display: none !important;
  }
  .workspace {
    margin: 0;
    padding: 0;
  }
  .workspace main {
    padding: 0;
    max-width: none;
  }
  .print-document tr,
  .inv-totals,
  .inv-notes,
  .inv-section {
    break-inside: avoid;
  }
  .print-document * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
@media (max-width: 680px) {
  .documents-table {
    overflow: visible;
  }
  .documents-table table,
  .documents-table tbody {
    display: block;
  }
  .documents-table thead {
    display: none;
  }
  .documents-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 10px;
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
  }
  .documents-table tr:last-child {
    border: 0;
  }
  .documents-table td {
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .documents-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .documents-table td.numeric {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .documents-table td:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
  }
  .documents-table td:last-child {
    grid-column: 2;
    grid-row: 2;
  }
  .documents-table .document-number {
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .documents-table .row-actions button {
    min-height: 34px;
  }
  .documents-table .row-actions {
    flex-wrap: nowrap;
  }
}
.logo-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 5px 0 22px;
  flex-wrap: wrap;
}
.logo-upload img {
  max-width: 100px;
  max-height: 70px;
  object-fit: contain;
}
.logo-upload label {
  flex: 1;
  min-width: 160px;
}
.logo-upload input {
  font-size: 11px;
}
.logo-upload .field-note {
  display: block;
  margin-top: 6px;
}
.invoice-logo {
  display: block;
  max-width: 180px;
  max-height: 110px;
  object-fit: contain;
}
@media(max-width:680px){.topbar{backdrop-filter:none}}
@media print{html,body{background:#fff!important}.workspace{min-height:0}}

/* ATLAS E-Facture brand */
.auth-mobile-brand {
  display: none;
}
.brand-mark {
  background: none !important;
  width: 40px;
  height: 37px;
  border-radius: 0;
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-name {
  letter-spacing: 0.5px;
  font-weight: 850;
  font-size: 19px;
  white-space: nowrap;
}
.brand-name em {
  font-style: normal;
  color: var(--pink);
  margin-left: 5px;
  letter-spacing: 0;
}
.brand-name small {
  margin-top: 5px;
}
.boot .brand-mark {
  width: 64px;
  height: 60px;
  animation: brand-pulse 1.4s ease-in-out infinite;
}
@keyframes brand-pulse {
  50% { transform: scale(0.92); opacity: 0.75; }
}
.auth-hero {
  background:
    radial-gradient(circle at 85% 105%, #f00a6e33, transparent 45%),
    radial-gradient(circle at 105% 20%, #0b6fe826, transparent 40%),
    #111218;
}
.auth-hero h1 span {
  background: linear-gradient(90deg, #ff3d8f, #ff7ab4 60%, #4c9bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-features svg.icon {
  color: #ff5c9f;
}
.sidebar nav button.active {
  box-shadow: inset 3px 0 0 var(--pink);
}
button.primary {
  background: linear-gradient(135deg, #ef0a6c, #c8075a);
  border-color: #d6075f;
}
button.primary:hover {
  background: linear-gradient(135deg, #d6075f, #ad044d);
}
a.button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
  color: #fff;
  background: linear-gradient(135deg, #ef0a6c, #c8075a);
}
a.button-link:hover {
  text-decoration: none;
  background: linear-gradient(135deg, #d6075f, #ad044d);
}
/* Dashboard additions */
.chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: end;
  height: 190px;
  margin-top: 18px;
}
.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
  font-size: 10px;
  color: var(--muted);
}
.month-bars {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 150px;
  width: 100%;
  justify-content: center;
}
.month-bars span {
  width: 42%;
  max-width: 22px;
  border-radius: 5px 5px 2px 2px;
}
.month-bars .billed { background: var(--pink); }
.month-bars .collected { background: var(--blue); }
.legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.aging-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  padding: 9px 0;
}
.aging-track {
  height: 8px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}
.aging-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--pink));
  border-radius: 6px;
}
/* Printed document additions */
/* Sidebar brand fit */
.sidebar .brand {
  padding: 0 6px 25px;
  min-width: 0;
}
.sidebar .brand-name {
  font-size: 16px;
}
.sidebar .brand-name em {
  margin-left: 4px;
}
.sidebar .brand-name small {
  font-size: 6.5px;
  letter-spacing: 1.6px;
  white-space: nowrap;
}
.sidebar .brand-mark {
  width: 34px;
  height: 32px;
}
.side-company {
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.35;
}
/* Live sync indicators */
.connection {
  background: #c0c6d2;
  transition: background 0.3s;
}
.connection.live {
  background: #12b76a;
  box-shadow: 0 0 0 3px #12b76a26;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  min-height: 39px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0c6d2;
}
.live-pill.on {
  color: #067647;
  border-color: #abefc6;
  background: #ecfdf3;
}
.live-pill.on i {
  background: #12b76a;
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  50% { box-shadow: 0 0 0 5px #12b76a2e; }
}
/* Connections hub */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.platform-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 3px solid var(--platform);
}
.platform-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.platform-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--platform);
  flex-shrink: 0;
}
.platform-head h2 {
  margin-bottom: 4px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 20px;
  background: #f2f4f7;
  color: #667085;
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.on {
  background: #ecfdf3;
  color: #067647;
}
.status-pill.paused {
  background: #fffaeb;
  color: #b54708;
}
.flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.flow-tags span {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--platform) 9%, white);
  color: color-mix(in srgb, var(--platform) 80%, black);
}
.platform-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.platform-stats div {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.platform-stats div + div {
  border-left: 1px solid var(--line);
}
.platform-stats strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.platform-stats span {
  font-size: 10px;
  color: var(--muted);
}
.key-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f8f9fb;
  font-size: 12px;
}
.key-row .cell-sub {
  display: block;
}
.key-row .warn {
  color: #b42318;
}
.platform-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}
.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.source-chip {
  font-size: 9.5px;
  font-weight: 650;
  padding: 3px 7px;
  border-radius: 20px;
  color: var(--chip);
  background: color-mix(in srgb, var(--chip) 10%, white);
  border: 1px solid color-mix(in srgb, var(--chip) 25%, white);
}
.code-block {
  margin: 14px 0;
  padding: 14px;
  border-radius: 9px;
  background: #111218;
  color: #e4e7ec;
  font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: auto;
  white-space: pre;
}
.api-list {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 12px;
  line-height: 2;
  color: var(--muted);
}
code {
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
}
.secret-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.secret-row code {
  flex: 1;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 7px;
  background: #f8f9fb;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}

/* Analytics */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.kpi-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 550;
}
.kpi-value {
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.kpi-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 10.5px;
  color: var(--muted);
}
.delta {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
}
.delta.up {
  color: #067647;
  background: #ecfdf3;
}
.delta.down {
  color: #b42318;
  background: #fef3f2;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  color: var(--ink);
}
.toggle input {
  margin: 0;
}
.page-head .actions select,
.page-head .actions input[type="date"] {
  width: auto;
  min-height: 39px;
}
.month-bars .previous {
  background: #c7cdd8;
}
.analytics-grid {
  margin-bottom: 18px;
}
.share {
  display: inline-block;
  width: 46px;
  height: 5px;
  border-radius: 4px;
  background: var(--line);
  margin-right: 8px;
  vertical-align: middle;
  overflow: hidden;
}
.share i {
  display: block;
  height: 100%;
  background: var(--pink);
}
.summary-row.total {
  border-top: 1px solid var(--line);
  font-weight: 700;
}
@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .kpi-value {
    font-size: 18px;
  }
}
/* Narrow sidebar: stack the brand on two lines so it never overflows */
.sidebar .brand {
  flex-shrink: 0;
  min-width: 0;
}
@media (max-width: 1150px) {
  .sidebar .brand-name {
    font-size: 15px;
    line-height: 1.15;
    white-space: normal;
  }
  .sidebar .brand-name em {
    display: block;
    margin-left: 0;
  }
  .sidebar .brand-name small {
    display: none;
  }
}
.doc-pay {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.doc-pay svg {
  width: 112px;
  height: 112px;
}
.doc-pay a {
  font-size: 9px;
  color: #475467;
  overflow-wrap: anywhere;
}
/* Client portal */
.portal-body {
  background: #f6f7f9;
}
.portal-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 18px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.portal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.portal-company {
  display: flex;
  align-items: center;
  gap: 12px;
}
.portal-company img {
  max-height: 44px;
  max-width: 140px;
  object-fit: contain;
}
.portal-company strong {
  display: block;
  font-size: 16px;
}
.portal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.portal-actions h1 {
  font-size: 22px;
  margin-bottom: 6px;
}
.portal-balance {
  display: flex;
  gap: 24px;
  margin: 6px 0 14px;
}
.portal-balance strong {
  display: block;
  font-size: 22px;
}
.portal-accept {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.portal-accept .consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--ink);
}
.portal-accept .consent input {
  margin: 2px 0 0;
  width: auto;
}
.portal-accept button[type="submit"] {
  align-self: flex-start;
}
.portal-foot {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
}
@media print {
  .portal-shell {
    padding: 0;
  }
  .portal-top {
    display: none;
  }
}
.badge.accepted,
.badge.credited {
  color: #067647;
  background: #ecfdf3;
}
.badge.credit {
  color: #5925dc;
  background: #f4f3ff;
}
.reminders-panel {
  margin-bottom: 18px;
  border-left: 3px solid var(--pink);
}
.reminders-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Team permissions */
.member-list {
  margin-top: 12px;
}
.member-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.member-id {
  display: flex;
  gap: 10px;
  align-items: center;
}
.member-access .cell-sub {
  display: block;
  margin-top: 6px;
  line-height: 1.5;
}
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}
.perm {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}
.perm input {
  width: auto;
  margin: 1px 0 0;
  flex-shrink: 0;
}
.perm:has(input:checked) {
  border-color: color-mix(in srgb, var(--pink) 45%, white);
  background: #fdf6f9;
}
@media (max-width: 680px) {
  .member-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
/* Sign-in: minimal, animated, multilingual */
.login {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 72px 16px 56px;
  overflow: hidden;
  background: #0b0c12;
  color: #f2f3f7;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif;
}
.login-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-aurora i {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.38;
  animation: aurora 22s ease-in-out infinite alternate;
}
.login-aurora i:nth-child(1) {
  background: #f00a6e;
  top: -18vmax;
  left: -12vmax;
}
.login-aurora i:nth-child(2) {
  background: #0b6fe8;
  bottom: -20vmax;
  right: -14vmax;
  animation-duration: 26s;
  animation-delay: -6s;
}
.login-aurora i:nth-child(3) {
  background: #7c3aed;
  top: 40%;
  left: 55%;
  width: 28vmax;
  height: 28vmax;
  opacity: 0.22;
  animation-duration: 30s;
  animation-delay: -12s;
}
@keyframes aurora {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.12); }
  100% { transform: translate(-4vmax, 7vmax) scale(0.94); }
}
.login-lang {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 2;
  animation: login-rise 0.8s 0.6s both;
}
.login-lang button {
  min-height: 30px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b8bdcb;
  font-size: 12px;
  font-weight: 600;
}
.login-lang button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.login-lang button.active {
  background: #fff;
  color: #0b0c12;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.login-mark {
  position: relative;
  width: 104px;
  height: 96px;
  margin-bottom: 18px;
  animation: mark-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both, mark-float 7s 1.1s ease-in-out infinite;
}
.login-mark::before {
  content: "";
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 10, 110, 0.35), rgba(11, 111, 232, 0.12) 55%, transparent 70%);
  animation: mark-glow 4.5s ease-in-out infinite;
  z-index: -1;
}
.login-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(240, 10, 110, 0.35));
}
@keyframes mark-in {
  0% { opacity: 0; transform: scale(0.55) rotate(-28deg); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes mark-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-7px) rotate(3deg); }
}
@keyframes mark-glow {
  0%, 100% { opacity: 0.7; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes login-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-word {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
  animation: login-rise 0.8s 0.35s both;
}
.login-word em {
  font-style: normal;
  background: linear-gradient(90deg, #ff3d8f, #ff7ab4 60%, #5aa2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-tagline {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8f96a8;
  animation: login-rise 0.8s 0.45s both;
}
.login[dir="rtl"] .login-tagline,
.login-tagline:lang(zh) {
  letter-spacing: 0.5px;
}
.login-title {
  margin: 34px 0 18px;
  font-size: 17px;
  font-weight: 650;
  color: #e7e9f0;
  animation: login-rise 0.8s 0.55s both;
}
.login-card form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: start;
}
.login-field {
  color: #a3a9b8;
  font-size: 11.5px;
  font-weight: 550;
  animation: login-rise 0.7s both;
}
.login-field:nth-of-type(1) { animation-delay: 0.62s; }
.login-field:nth-of-type(2) { animation-delay: 0.7s; }
.login-field:nth-of-type(3) { animation-delay: 0.78s; }
.login-field:nth-of-type(4) { animation-delay: 0.86s; }
.login-field input {
  margin-top: 7px;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.login-field input:focus {
  outline: none;
  border-color: #ff3d8f;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(240, 10, 110, 0.18);
}
.login-field small {
  display: block;
  margin-top: 6px;
  color: #7d8496;
  font-size: 10.5px;
}
.login .password-wrap input {
  padding-inline-end: 84px;
}
.login .password-wrap button {
  top: 15px;
  right: auto;
  inset-inline-end: 8px;
  color: #c9cdd8;
  min-height: 30px;
}
.login-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(240, 68, 56, 0.14);
  border: 1px solid rgba(240, 68, 56, 0.35);
  color: #ffb4ab;
  font-size: 12px;
  animation: login-shake 0.4s;
}
@keyframes login-shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}
.login-submit {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #f00a6e, #c8075a);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 12px 30px rgba(240, 10, 110, 0.32);
  animation: login-rise 0.7s 0.95s both;
  transition: transform 0.15s, box-shadow 0.2s;
}
.login-submit:hover {
  background: linear-gradient(135deg, #ff1f7d, #d6075f);
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(240, 10, 110, 0.42);
}
.login-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s;
}
.login-submit:hover::after {
  transform: translateX(120%);
}
.login-submit:disabled {
  cursor: progress;
  color: transparent;
  opacity: 1;
}
.login-submit:disabled::before {
  content: "";
  position: absolute;
  top: calc(50% - 10px);
  left: calc(50% - 10px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: login-spin 0.7s linear infinite;
}
@keyframes login-spin {
  to { transform: rotate(360deg); }
}
.login-back {
  margin-top: 16px;
  border: 0;
  background: transparent;
  color: #a3a9b8;
}
.login-back:hover {
  background: transparent;
  color: #fff;
}
.login-foot {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: #6f7689;
  font-size: 11px;
  animation: login-rise 0.8s 1.1s both;
}
.login-foot svg.icon {
  width: 13px;
  height: 13px;
}
@media (max-width: 480px) {
  .login {
    padding-top: 84px;
  }
  .login-lang {
    inset-inline: 12px;
    justify-content: center;
  }
  .login-lang button {
    padding: 4px 10px;
  }
  .login-mark {
    width: 86px;
    height: 80px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .login *,
  .login *::before,
  .login *::after {
    animation: none !important;
    transition: none !important;
  }
}
/* Sidebar · « Carnet d'atelier » */
.sidebar.notebook {
  --paper: #f4efe6;
  --ink: #1f1a17;
  --ink-soft: #6b6159;
  --rule: #e3d9c9;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(90deg, transparent 0 calc(100% - 1px), var(--rule) calc(100% - 1px));
  color: var(--ink);
  border-right: 0;
  box-shadow: 1px 0 0 var(--rule), 6px 0 18px -14px rgba(60, 40, 20, 0.35);
  padding: 22px 14px 18px;
  overflow-y: auto;
}
.notebook .nb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px dashed var(--rule);
}
.notebook .nb-mark {
  width: 34px;
  height: 32px;
  flex-shrink: 0;
  transform: rotate(-6deg);
}
.notebook .nb-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.notebook .nb-name {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1;
}
.notebook .nb-name strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--ink);
}
.notebook .nb-name em {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: #c8075a;
}
.notebook .nb-company {
  margin: 16px 6px 6px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 3px 10px 4px 9px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  font-size: 12.5px;
}
.notebook .nb-company-label {
  display: block;
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.notebook .nb-company strong {
  font-weight: 650;
  line-height: 1.35;
}
.notebook .nb-company select {
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  font-size: 12.5px;
}
.notebook .nb-section {
  margin: 20px 10px 6px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}
.notebook nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.notebook nav button {
  justify-content: flex-start;
  gap: 11px;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: start;
}
.notebook nav button svg.icon {
  width: 16px;
  height: 16px;
  color: var(--ink-soft);
  stroke-width: 1.6;
}
.notebook nav button:hover {
  background: rgba(120, 90, 60, 0.07);
  color: var(--ink);
}
.notebook nav button.active {
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  box-shadow: none;
}
.notebook nav button.active svg.icon {
  color: #c8075a;
}
.notebook .nb-label {
  position: relative;
  padding-bottom: 3px;
}
.notebook nav button.active .nb-label {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5c14-3.2 27 1.6 41-.6 13-2 23-3.4 37-.4 12 2.6 25 .8 38-1.8' fill='none' stroke='%23f00a6e' stroke-width='2.6' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E") bottom / 100% 7px no-repeat;
}
.notebook .nb-count {
  margin-inline-start: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #fbe3ec;
  color: #b8064f;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  transform: rotate(-3deg);
}
.notebook .nb-foot {
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px dashed var(--rule);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nb-lang,
.top-lang {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nb-lang svg.icon,
.top-lang svg.icon {
  width: 15px;
  height: 15px;
  color: var(--ink-soft, #6b6159);
  margin-inline-end: 4px;
}
.nb-lang button,
.top-lang button {
  min-height: 26px;
  min-width: 28px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft, #6b6159);
  font-size: 11.5px;
  font-weight: 650;
}
.nb-lang button:hover {
  border-color: var(--rule);
  background: rgba(255, 255, 255, 0.5);
}
.nb-lang button.active,
.top-lang button.active {
  border-color: var(--ink, #1f1a17);
  color: var(--ink, #1f1a17);
  background: rgba(255, 255, 255, 0.7);
}
.top-lang {
  display: none;
}
.notebook .nb-signature {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notebook .nb-sign {
  font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Apple Chancery", cursive;
  font-size: 19px;
  line-height: 1.2;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.notebook .nb-role {
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.notebook .nb-logout {
  justify-content: flex-start;
  min-height: 30px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
}
.notebook .nb-logout:hover {
  background: transparent;
  color: #c8075a;
  text-decoration: underline wavy #f39ac0;
}
@media (max-width: 680px) {
  .top-lang {
    display: flex;
  }
  .top-lang svg.icon {
    display: none;
  }
}
/* Right-to-left (Arabic) */
[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  box-shadow: -1px 0 0 var(--rule, #e3d9c9), -6px 0 18px -14px rgba(60, 40, 20, 0.35);
}
[dir="rtl"] .sidebar.notebook {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
[dir="rtl"] .workspace {
  margin-left: 0;
  margin-right: 244px;
}
@media (max-width: 1150px) {
  [dir="rtl"] .workspace {
    margin-right: 190px;
  }
}
@media (max-width: 900px) {
  [dir="rtl"] .workspace {
    margin-right: 170px;
  }
}
@media (max-width: 680px) {
  [dir="rtl"] .workspace {
    margin-right: 0;
  }
}
[dir="rtl"] th,
[dir="rtl"] td {
  text-align: right;
}
[dir="rtl"] th.numeric,
[dir="rtl"] td.numeric {
  text-align: left;
}
[dir="rtl"] .breadcrumb svg.icon,
[dir="rtl"] button svg.icon[data-flip],
[dir="rtl"] .icon-arrow {
  transform: scaleX(-1);
}
[dir="rtl"] .search svg.icon {
  left: auto;
  right: 12px;
}
[dir="rtl"] .search input {
  padding-left: 12px;
  padding-right: 38px;
}
[dir="rtl"] .modal-head,
[dir="rtl"] .page-head,
[dir="rtl"] .panel-head {
  text-align: right;
}
[dir="rtl"] .notebook .nb-mark {
  transform: rotate(6deg);
}
[dir="rtl"] .toast {
  direction: rtl;
}

.settings-grid.account-only {
  grid-template-columns: minmax(0, 560px);
}
/* Sidebar · ATLAS colours. The notebook layout stays; the page turns into the logo's night
   sky, with the pink, blue and magenta of the mark drifting slowly behind the pages. */
.sidebar.notebook {
  --paper: #0e1128;
  --ink: #f5f3fa;
  --ink-soft: #a9abc6;
  --rule: rgba(255, 255, 255, 0.12);
  --atlas-pink: #f00a6e;
  --atlas-blue: #0b6fe8;
  --atlas-magenta: #b4129c;
  --atlas-flow: linear-gradient(90deg, var(--atlas-pink), var(--atlas-magenta), var(--atlas-blue), var(--atlas-pink));
  position: fixed;
  isolation: isolate;
  background: #0e1128;
  box-shadow: none;
}
.sidebar.notebook > * {
  position: relative;
  z-index: 1;
}
.sidebar.notebook::before {
  /* the edge of the page: a thin ribbon in the logo colours */
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 3px;
  z-index: 2;
  background: var(--atlas-flow);
  background-size: 100% 300%;
  animation: nb-ribbon 9s linear infinite;
  animation-delay: var(--nb-phase, 0s);
}
.notebook .nb-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.notebook .nb-aurora::before,
.notebook .nb-aurora::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.55;
  animation: nb-drift 36s ease-in-out infinite;
  animation-delay: var(--nb-phase, 0s);
}
.notebook .nb-aurora::before {
  top: -90px;
  left: -80px;
  background: radial-gradient(circle, var(--atlas-pink), transparent 68%);
}
.notebook .nb-aurora::after {
  bottom: -110px;
  right: -110px;
  background: radial-gradient(circle, var(--atlas-blue), var(--atlas-magenta) 45%, transparent 70%);
  animation-direction: reverse;
}
@keyframes nb-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(70px, 160px) scale(1.15);
  }
  66% {
    transform: translate(-20px, 320px) scale(0.9);
  }
}
@keyframes nb-ribbon {
  to {
    background-position: 0 300%;
  }
}
@keyframes nb-flow {
  to {
    background-position: 300% 0;
  }
}
.notebook .nb-head {
  border-bottom-color: var(--rule);
}
.notebook .nb-mark {
  filter: drop-shadow(0 4px 14px rgba(240, 10, 110, 0.45));
}
.notebook .nb-name em {
  background: var(--atlas-flow);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: nb-flow 12s linear infinite;
  animation-delay: var(--nb-phase, 0s);
}
.notebook .nb-company {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--rule);
  backdrop-filter: blur(6px);
}
.notebook .nb-company select option {
  color: #15161d;
}
.notebook nav button {
  transition:
    background 0.2s,
    color 0.2s;
}
.notebook nav button:hover {
  background: rgba(255, 255, 255, 0.07);
}
.notebook nav button.active {
  background: linear-gradient(90deg, rgba(240, 10, 110, 0.2), rgba(11, 111, 232, 0.08) 80%, transparent);
}
.notebook nav button.active svg.icon {
  color: #ff5aa0;
}
.notebook nav button.active .nb-label {
  background: none;
}
.notebook nav button.active .nb-label::after {
  /* the hand-drawn underline, now painted in the logo colours */
  content: "";
  position: absolute;
  inset: auto 0 -2px;
  height: 7px;
  background: var(--atlas-flow);
  background-size: 300% 100%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5c14-3.2 27 1.6 41-.6 13-2 23-3.4 37-.4 12 2.6 25 .8 38-1.8' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5c14-3.2 27 1.6 41-.6 13-2 23-3.4 37-.4 12 2.6 25 .8 38-1.8' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  animation:
    nb-flow 6s linear infinite,
    nb-draw 0.5s ease-out;
}
@keyframes nb-draw {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
.notebook .nb-count {
  background: var(--atlas-pink);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(240, 10, 110, 0.18);
}
.notebook .nb-foot {
  border-top-color: var(--rule);
}
.nb-lang button:hover {
  background: rgba(255, 255, 255, 0.08);
}
.nb-lang button.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--atlas-pink), var(--atlas-blue));
}
.notebook .nb-logout:hover {
  color: #ff5aa0;
  text-decoration-color: #ff5aa0;
}
[dir="rtl"] .sidebar.notebook {
  background-image: none;
  box-shadow: none;
}
[dir="rtl"] .sidebar.notebook::before {
  inset: 0 auto 0 0;
}
[dir="rtl"] .notebook nav button.active {
  background: linear-gradient(270deg, rgba(240, 10, 110, 0.2), rgba(11, 111, 232, 0.08) 80%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .sidebar.notebook::before,
  .notebook .nb-aurora::before,
  .notebook .nb-aurora::after,
  .notebook .nb-name em,
  .notebook nav button.active .nb-label::after {
    animation: none;
  }
}
/* Printed document · A4 sheets: brand title, tinted parties box, filled table header,
   filled total, notes and a full-width footer band in the company colour. */
.print-document.inv {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 840px;
  margin: 0 auto;
  color: #1d2433;
  font: 11.5px/1.55 Inter, "Helvetica Neue", Arial, sans-serif;
  --document-color: #19553f;
  --document-tint: color-mix(in srgb, var(--document-color) 10%, white);
}
.inv .pre {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.inv-page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 1188px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 8px 30px #15161d0f;
  overflow: hidden;
}
.inv-body {
  flex: 1;
  padding: 56px 60px 36px;
}
.inv-watermark {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-28deg);
  font-size: 120px;
  font-weight: 800;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--document-color) 7%, transparent);
  pointer-events: none;
  white-space: nowrap;
}
.inv-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 40px;
}
.inv-logo {
  display: block;
  max-width: 190px;
  max-height: 150px;
  object-fit: contain;
  margin-bottom: 12px;
}
.inv-issuer {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--document-color);
  margin-bottom: 10px;
}
.inv-head h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--document-color);
}
.inv-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 36px;
  margin: 0;
  text-align: right;
}
.inv-meta dt {
  color: #667085;
}
.inv-meta dd {
  margin: 0;
  font-weight: 700;
  color: #1d2433;
}
.inv-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 20px 22px;
  margin-bottom: 30px;
  border-radius: 10px;
  background: var(--document-tint);
}
.inv-parties > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.inv-parties strong {
  font-size: 13.5px;
  margin-bottom: 4px;
}
.inv-label,
.inv-section h3,
.inv .doc-label {
  display: block;
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--document-color);
}
.inv-table {
  width: 100%;
  border-collapse: collapse;
}
.inv-table th {
  padding: 9px 14px;
  background: var(--document-color);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-align: left;
}
.inv-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #dde3e0;
  vertical-align: top;
}
.inv .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.inv-sku {
  display: block;
  color: #667085;
  font-size: 10px;
}
.inv-totals {
  width: min(100%, 330px);
  margin: 18px 0 0 auto;
}
.inv-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 14px;
  font-variant-numeric: tabular-nums;
}
.inv-totals > div span:first-child {
  color: #667085;
}
.inv-totals .inv-grand {
  margin: 14px 0 6px;
  padding: 10px 14px;
  background: var(--document-color);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.inv-totals .inv-grand span:first-child {
  color: #fff;
}
.inv-totals .inv-balance {
  margin-top: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--document-color);
  font-weight: 700;
}
.inv-totals .inv-balance span:first-child {
  color: var(--document-color);
}
.inv-notes {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-top: 34px;
}
.inv-notes p {
  margin: 0;
}
.inv-words {
  margin-top: 10px !important;
  color: #475467;
  font-style: italic;
}
.inv-page-title {
  margin: 0 0 18px;
  font-size: 21px;
  font-weight: 700;
  color: var(--document-color);
}
.inv-section {
  margin-top: 26px;
}
.inv-page-title + .inv-section {
  margin-top: 0;
}
.inv-pay-box {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 22px;
  border-radius: 10px;
  background: var(--document-tint);
}
.inv-pay-box dl {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) 1.2fr;
  gap: 4px 24px;
  margin: 0;
  flex: 1;
}
.inv-pay-box dt {
  color: #667085;
}
.inv-pay-box dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.inv-muted {
  margin: 10px 0 0;
  color: #667085;
}
.inv-codes {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 12px;
}
.inv-codes table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.inv-codes th {
  padding: 4px 6px;
  background: var(--document-color);
  color: #fff;
  font-weight: 700;
  text-align: left;
}
.inv-codes td {
  padding: 2px 6px;
}
.inv-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px 40px;
  background: var(--document-color);
  color: #fff;
  text-align: center;
  font-size: 10.5px;
}
.inv-footer strong {
  font-size: 12.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.inv-footer span {
  opacity: 0.88;
}
[dir="rtl"] .inv {
  direction: ltr;
}
@media (max-width: 680px) {
  .inv-body {
    padding: 26px 18px;
  }
  .inv-page {
    min-height: 0;
  }
  .inv-head,
  .inv-notes,
  .inv-pay-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .inv-meta {
    text-align: left;
  }
  .inv-parties,
  .inv-codes {
    grid-template-columns: 1fr;
  }
  .inv-head h1 {
    font-size: 30px;
  }
  .inv-table th,
  .inv-table td {
    padding: 8px 6px;
  }
  .inv-watermark {
    font-size: 64px;
  }
}
@media print {
  @page {
    size: A4;
    margin: 0;
  }
  .print-document.inv {
    gap: 0;
    max-width: none;
    font-size: 10.5px;
  }
  .inv-page {
    min-height: 296mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
  }
  .inv-page:last-child {
    break-after: auto;
  }
  .inv-body {
    padding: 14mm 15mm 10mm;
  }
}
/* The ATLAS mark sits on a white tile so its colours read on the dark sidebar. */
.notebook .nb-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 5px;
  border-radius: 12px;
  background: #fff;
  transform: rotate(-4deg);
  filter: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6),
    0 0 18px rgba(255, 255, 255, 0.35),
    0 6px 18px rgba(240, 10, 110, 0.35);
}
[dir="rtl"] .notebook .nb-mark {
  transform: rotate(4deg);
}
/* REST API screen */
.api-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.api-grid .panel,
.api-grid + .panel,
.panel + .api-grid {
  min-width: 0;
}
.api-facts {
  display: grid;
  gap: 10px;
}
.api-facts div {
  display: grid;
  gap: 4px;
}
.api-facts span {
  font-size: 11px;
  color: var(--muted);
}
.api-facts code,
.api-table code {
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.api-code {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #0e1128;
  color: #e9e7f5;
  font: 11.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: auto;
  white-space: pre;
}
.api-table td {
  padding: 10px 9px;
}
.method {
  display: inline-block;
  min-width: 44px;
  padding: 2px 6px;
  border-radius: 5px;
  font: 700 10px/1.6 ui-monospace, Menlo, monospace;
  text-align: center;
  color: #fff;
}
.method.get {
  background: var(--blue);
}
.method.post {
  background: var(--pink);
}
.method.put {
  background: #b4129c;
}
@media (max-width: 900px) {
  .api-grid {
    grid-template-columns: 1fr;
  }
}
/* Official ATLAS E-Facture wordmark on a white plate with a soft white glow. */
.notebook .nb-head {
  padding: 0 2px 16px;
}
.notebook .nb-logo {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7),
    0 0 22px rgba(255, 255, 255, 0.28),
    0 8px 22px rgba(240, 10, 110, 0.32);
  overflow: hidden;
}
.notebook .nb-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.notebook .nb-logo::after {
  /* a slow light sweep across the plate */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: nb-shine 7s ease-in-out infinite;
  animation-delay: var(--nb-phase, 0s);
}
@keyframes nb-shine {
  0%,
  70% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .notebook .nb-logo::after {
    animation: none;
    display: none;
  }
}
.login-note {
  margin: 4px 0 6px;
  color: #c9cdd8;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.login-switch {
  margin: 4px 0 0;
  color: #8a90a2;
  font-size: 13px;
  text-align: center;
}
.login-switch .login-back {
  margin-top: 0;
  padding: 4px 6px;
  color: #ff5aa0;
  font-weight: 650;
}
/* "Importer Excel": a file input dressed as a small button */
.file-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4c5568;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s;
}
.file-button:hover {
  background: #fbf1f5;
}
.file-button:focus-within {
  outline: 3px solid #f36ba6;
  outline-offset: 3px;
}
