body {
  background: var(--canvas);
  color: var(--text);
  font-size: 14px;
}
.shell {
  display: block;
  min-height: 100dvh;
}
.main {
  margin: 0 264px 0 0;
  max-width: none;
  width: auto;
  padding: 28px 32px 40px;
  min-width: 0;
}
.s2-sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  width: 264px;
  border-left: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
  z-index: 60;
  padding: 0 12px;
  height: 100dvh;
  overflow: hidden;
}
.s2-sidebar-brand,
.s2-user-card,
.sidebar-group {
  flex-shrink: 0;
}
.s2-sidebar[hidden],
.s2-mobile-bar[hidden],
.s2-backdrop[hidden] {
  display: none;
}
.s2-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 10px 12px;
}
.s2-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}
.s2-brand strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 17px;
}
.s2-brand small {
  display: block;
  font-size: 11px;
  color: #87918a;
}
.s2-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 2px;
  scrollbar-width: thin;
}
.sidebar-group {
  margin: 8px 0;
}
.sidebar-group[hidden] {
  display: none;
}
.sidebar-group h2 {
  font-family: var(--font);
  font-size: 11px;
  color: #929a94;
  margin: 6px 12px;
  font-weight: 600;
}
.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  height: 44px;
  min-height: 44px;
  border: 0;
  padding: 8px 12px;
  border-radius: 10px;
  color: #424c45;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
}
.sidebar-nav a[hidden] {
  display: none;
}
.sidebar-nav a[aria-current='page'] {
  background: #e7f2e2;
  color: #14522f;
  font-weight: 700;
  border: 0;
}
.sidebar-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 3px;
  background: var(--brand);
}
.s2-icon {
  width: 19px;
  height: 19px;
  display: block;
  flex-shrink: 0;
}
.s2-nav-badge {
  margin-inline-start: auto;
  min-width: 30px;
  padding: 0 8px;
  border-radius: 12px;
  background: #e8f0ff;
  color: var(--info);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.s2-attention-dot {
  margin-inline-start: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e45142;
}
.s2-nav-badge[hidden],
.s2-attention-dot[hidden] {
  display: none;
}
.s2-user-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 8px;
  background: var(--canvas);
  border-radius: 12px;
}
.s2-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.s2-user-card strong {
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s2-user-card small {
  display: block;
  font-size: 11px;
  color: #87918a;
}
.s2-user-card button,
#sidebarClose,
#sidebarToggle {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  border-radius: 10px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
#sidebarClose,
.s2-mobile-bar {
  display: none;
}
.counter-environment,
.counter-mock {
  margin-right: 264px;
  max-width: none;
  padding-inline: 32px;
}
.shell--restricted .main {
  margin: 0;
  width: min(488px, 100%);
}
.shell--restricted {
  display: grid;
}
.shell--restricted .s2-sidebar,
.shell--restricted .s2-mobile-bar {
  display: none;
}
.card,
.counter-orders {
  border-radius: 16px;
  overflow: hidden;
}
.card.table-wrap {
  overflow-x: auto;
}
.manual-refund-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.btn,
input,
select,
textarea,
.modal__card,
.chip {
  border-radius: 10px;
}
.page-head h1,
.counter-heading h1 {
  font-size: 24px;
}
.page-head p,
.counter-heading p {
  color: var(--text-muted);
  font-size: 13px;
}
.s2-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  margin: -20px -24px 18px;
}
.s2-panel-head h2 {
  font-size: 16px;
  margin: 0;
  flex: 1;
}
.s2-panel-head > a {
  margin-inline-start: auto;
  font-weight: 700;
  font-size: 13px;
}
.table-wrap > .s2-panel-head {
  margin: 0;
}
.card > .card__head.s2-panel-head {
  margin: -20px -24px 18px;
  padding: 16px 20px;
}
.s2-chip {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e7f2e2;
  color: #246239;
  flex-shrink: 0;
}
.s2-chip--orders {
  background: var(--info-surface);
  color: var(--info);
}
.s2-chip--card,
.s2-chip--paid {
  background: var(--warning-surface);
  color: #895500;
}
.s2-chip--products {
  background: #f0e5fa;
  color: #79379c;
}
.s2-chip--fib {
  background: #ddf3ec;
  color: #108568;
}
.s2-chip--sales,
.s2-chip--reports {
  background: #e7f2e2;
  color: #246239;
}
.tag,
.counter-pill {
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}
.tag--green::before,
.tag--red::before,
.tag--grey::before,
.tag--sun::before,
.s2-state::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-inline-end: 6px;
  vertical-align: middle;
}
[data-order-status='paid'] {
  background: var(--success-surface);
  color: var(--success);
}
[data-order-status='pending'],
[data-order-status='cancel_pending'],
[data-order-status='refund_requested'],
[data-order-status='refund_pending'] {
  background: var(--warning-surface);
  color: var(--warning);
}
[data-order-status='failed'],
[data-order-status='refund_failed'],
[data-order-status='refunded'],
[data-order-status='refunded_manual'] {
  background: var(--danger-surface);
  color: var(--danger);
}
[data-order-status='partially_refunded'] {
  background: var(--info-surface);
  color: var(--info);
}
[data-order-status='cancelled'],
[data-order-status='voided'] {
  background: var(--neutral-surface);
  color: var(--neutral);
}
[data-order-status='expired'] {
  background: var(--expired-surface);
  color: var(--expired);
}
[data-order-status='reconciliation_required'] {
  background: var(--review-surface);
  color: var(--review);
}
.payment-method {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  white-space: nowrap;
}
.payment-method .s2-icon {
  width: 16px;
  height: 16px;
}
.payment-method--fib {
  color: #108568;
}
.payment-method--card {
  color: #7543d4;
}
.s2-thumbnails {
  display: inline-flex;
  flex-shrink: 0;
}
.s2-thumbnails .s2-image,
.s2-thumb-placeholder {
  display: inline-block;
  width: 30px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 9px;
  object-fit: cover;
  background: #e5e7e5;
}
.s2-image {
  display: inline-block;
  overflow: hidden;
  background: #e5e7e5;
  flex-shrink: 0;
}
.s2-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.s2-image img[hidden] {
  display: none;
}
.backup-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid;
  border-radius: 14px;
  margin-block: 20px;
}
.backup-reminder p {
  margin-block: 8px;
}
.backup-reminder--success {
  background: #edf6ef;
  border-color: #a4c9af;
  color: #205437;
}
.backup-reminder--warning {
  background: #fff6dc;
  border-color: #d8be68;
  color: #634b11;
}
.backup-reminder--danger {
  background: #fff0ed;
  border-color: #dca79f;
  color: #853b30;
}
.backup-panel {
  padding: 24px;
}
.backup-panel form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}
.backup-panel .table-wrap {
  margin-top: 24px;
}
.backup-filename {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .backup-reminder {
    flex-direction: column;
    align-items: stretch;
  }
}
.s2-thumbnails > :nth-child(2) {
  margin-inline-start: -10px;
}
.s2-thumb-placeholder--1 {
  background: #e4d4ed;
}
.s2-order-items {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.s2-order-items .order-items-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
th {
  background: var(--canvas);
  font-weight: 500;
}
td {
  padding-block: 13px;
}
.counter-alert {
  border-color: var(--alert-border);
  background: var(--alert-surface);
  border-radius: 16px;
}
.counter-alert > .s2-chip {
  background: #ffddc5;
  color: #9d4d00;
}
.counter-strip.s2-kpis {
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  overflow: visible;
}
.s2-kpis .counter-cell {
  position: relative;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  overflow: hidden;
}
.s2-kpis .counter-cell::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #2e9b5a;
}
.s2-kpis .counter-cell:nth-child(2)::before {
  background: #f2c94c;
}
.s2-kpis .counter-cell:nth-child(3)::before {
  background: #1a9a6c;
}
.s2-kpis .counter-cell:nth-child(4)::before {
  background: #7c55d6;
}
.s2-kpi-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.s2-kpi-label .s2-chip {
  order: -1;
  margin-inline-start: 0;
}
.s2-kpis .counter-cell:nth-child(4) .s2-chip {
  background: #efe6fb;
  color: #6844b5;
}
.sales-chart-bar {
  background: linear-gradient(0deg, #1e5b38, #6bb77b);
  border-radius: 6px 6px 0 0;
}
.sales-chart-bar.is-highest {
  background: #f2c94c;
}
.s2-kpis .counter-cell-value {
  font-size: 28px;
  line-height: 1.5;
  margin: 8px 0 2px;
}
.s2-kpis .counter-cell-detail {
  font-size: 12px;
}
.s2-overview-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.s2-overview-columns > div {
  min-width: 0;
}
.s2-overview-columns .counter-orders-head {
  padding: 16px 20px;
  margin: 0;
}
.s2-overview-columns .counter-orders-head h2 {
  font-size: 16px;
}
.s2-overview-columns .counter-orders-head p {
  display: none;
}
.s2-overview-columns .counter-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}
.s2-overview-columns .counter-table td,
.s2-overview-columns .counter-table th {
  padding: 13px 8px;
  white-space: nowrap;
}
.s2-overview-columns .counter-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.s2-overview-columns .counter-table th:nth-child(3) {
  width: 31%;
}
.s2-overview-columns .counter-table th:nth-child(6) {
  width: 23%;
}
.s2-overview-columns .counter-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.s2-chart {
  padding: 20px 24px;
}
.s2-bars {
  display: flex;
  align-items: stretch;
  gap: 12px;
  height: 220px;
  padding-top: 12px;
}
.s2-bar-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.s2-bar {
  max-width: 44px;
  width: 100%;
  border-radius: 12px 12px 2px 2px;
  background: linear-gradient(#47996b, #1e5b38);
}
.s2-bar--highest {
  background: linear-gradient(#f7d871, #eab827);
}
.s2-bar--negative {
  background: linear-gradient(#e49a82, var(--danger));
}
.s2-health-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #f0f9f3;
}
.s2-health-row--danger {
  background: #fff0ee;
}
.s2-health-row p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}
.s2-health-row .s2-chip {
  width: 38px;
  height: 42px;
}
.s2-health-row > div {
  flex: 1;
}
.s2-top-product {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.s2-top-product > div {
  flex: 1;
  min-width: 0;
}
.s2-top-product p {
  margin: 0;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.s2-product-meter {
  height: 5px;
  background: #efede5;
  border-radius: 4px;
  margin-top: 5px;
}
.s2-product-meter span {
  display: block;
  height: 5px;
  border-radius: 4px;
  background: var(--brand);
}
.s2-order-status {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
}
.s2-order-status p {
  margin: 0;
  font-size: 13px;
}
.s2-order-status button {
  margin-inline-start: auto;
}
.s2-filters {
  padding: 16px 20px;
}
.s2-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 145px 180px auto;
  gap: 10px;
  align-items: end;
}
.s2-filter-row label {
  font-size: 12px;
}
.s2-advanced {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
}
.s2-advanced[hidden] {
  display: none;
}
.s2-filters .period-presets {
  display: none;
}
.s2-filters .status-chips button {
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.s2-filters .status-chips [aria-pressed='true'] {
  background: var(--brand);
  color: #fff;
}
.s2-order-review {
  background: #fff8eb;
}
#ordersTable .order-status-cell .tag {
  height: auto;
  min-height: 26px;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}
.system-grid {
  align-items: stretch;
}
.system-grid > .system-card {
  margin-bottom: 0;
}
.system-grid > .system-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
@media (min-width: 861px) {
  #ordersTable {
    table-layout: auto;
  }
  #ordersTable .order-status-cell {
    white-space: nowrap;
  }
  #ordersTable .order-status-cell .tag {
    width: max-content;
    flex-shrink: 0;
  }
}
[data-page='system'] > [role='alert'] {
  margin-bottom: 20px;
}
@media (min-width: 1024px) {
  #ordersTable {
    table-layout: auto;
  }
  #ordersTable th,
  #ordersTable td {
    font-size: 12px;
    padding-inline: 6px;
  }
  #ordersTable .order-col-number {
    width: 32px;
  }
  #ordersTable .order-col-date,
  #ordersTable .order-col-paid {
    width: 86px;
  }
  #ordersTable .order-col-device {
    width: 84px;
  }
  #ordersTable .order-col-method {
    width: 54px;
  }
  #ordersTable .order-col-amount {
    width: 96px;
  }
  #ordersTable .order-col-status {
    width: 1%;
  }
  #ordersTable .order-col-reference {
    width: 52px;
  }
  #ordersTable .order-col-actions {
    width: 128px;
  }
  #ordersTable .order-status-cell {
    white-space: nowrap;
  }
  #ordersTable .order-items,
  #ordersTable .order-device {
    max-width: 0;
  }
  #ordersTable .order-items {
    min-width: 100px;
  }
  #ordersTable .technical-reference {
    display: block;
    max-width: 52px;
  }
}
@media (max-width: 1200px) {
  .s2-overview-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .s2-kpis .counter-cell {
    padding: 16px 12px;
  }
  .s2-kpis .counter-cell-value {
    font-size: 23px;
  }
}
@media (max-width: 1023px) {
  .main {
    margin: 0;
    padding: 20px 16px 36px;
  }
  .s2-mobile-bar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 40;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    min-height: 64px;
  }
  .s2-mobile-bar .s2-brand small {
    display: none;
  }
  .s2-sidebar {
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.15s;
  }
  .s2-sidebar.is-expanded {
    transform: translateX(0);
    visibility: visible;
  }
  #sidebarClose {
    display: grid;
    margin-inline-start: auto;
  }
  .s2-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 0;
    border-radius: 0;
    background: rgb(24 34 28 / 35%);
    width: 100%;
    height: 100%;
  }
  .counter-environment,
  .counter-mock {
    margin-right: 0;
    padding-inline: 16px;
  }
  .s2-filter-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .s2-filter-row > label:first-child {
    grid-column: 1/-1;
  }
  .s2-advanced {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .s2-overview-columns .counter-table th:nth-child(3),
  .s2-overview-columns .counter-table th:nth-child(6) {
    width: auto;
  }
}
@media (max-width: 600px) {
  #ordersTable .order-status-cell .tag {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .counter-strip.s2-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .s2-kpis .counter-cell-value {
    font-size: 22px;
  }
  .s2-kpi-label {
    font-size: 12px;
  }
  .s2-kpi-label .s2-chip {
    width: 28px;
    height: 28px;
  }
  .s2-panel-head,
  .card > .card__head.s2-panel-head {
    margin: -16px -16px 16px;
    padding: 14px 16px;
  }
  .table-wrap > .s2-panel-head {
    margin: 0;
  }
  .s2-overview-columns .counter-orders-head {
    margin: 0;
  }
  .s2-bars {
    gap: 7px;
  }
  .s2-bar-column {
    font-size: 10px;
  }
  .s2-advanced {
    grid-template-columns: minmax(0, 1fr);
  }
  .s2-overview-columns .counter-table tbody tr {
    grid-template-columns: minmax(0, 1fr);
  }
  .s2-overview-columns .counter-table td {
    white-space: normal;
  }
  .s2-overview-columns .counter-pill {
    white-space: nowrap;
  }
  .s2-overview-columns .counter-table .counter-number::before {
    display: inline;
  }
}

.form-grid > .s2-panel-head {
  grid-column: 1/-1;
}
.device-create > .s2-panel-head {
  flex-basis: 100%;
}
.s2-panel-head .s2-chip--alert {
  background: #ffddc5;
  color: #9d4d00;
}
.counter-heading > button,
.page-head > a.btn,
.s2-order-status button,
.s2-filter-row > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
