:root {
  --fm-bg: #f7f8f8;
  --fm-surface: #fffefc;
  --fm-surface-soft: #f3f5f6;
  --fm-primary: #1f5f69;
  --fm-primary-soft: #e4f1f3;
  --fm-accent: #c96836;
  --fm-text: #1c2833;
  --fm-muted: #5c6b76;
  --fm-border: #d8e0e6;
  --fm-danger: #a82929;
  --fm-focus: #1f5f69;
  --fm-radius: 12px;
  --fm-space-sm: .5rem;
  --fm-space-md: .9rem;
  --fm-space-lg: 1.2rem;
  --fm-hit: 44px;
  --bg: var(--fm-bg);
  --surface: var(--fm-surface);
  --text: var(--fm-text);
  --muted: var(--fm-muted);
  --primary: var(--fm-primary);
  --primary-contrast: #ffffff;
  --accent: var(--fm-accent);
  --danger: var(--fm-danger);
  --focus: var(--fm-focus);
  --radius: var(--fm-radius);
  --space-xs: .35rem;
  --space-sm: .5rem;
  --space-md: .9rem;
  --space-lg: 1.2rem;
  --space-xl: 1.6rem;
}

body.fm-app {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, #eceff0 0, transparent 42%),
    radial-gradient(circle at 100% 100%, #eef4f4 0, transparent 44%),
    var(--fm-bg);
  color: var(--fm-text);
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
}

body.fm-action-sell_product {
  background: #f6f8fa;
}

.fm-shell {
  max-width: 1680px;
}

.fm-nav-card .card-header,
.fm-stats-card .card-header {
  background: #f3f6f8;
  color: #445762;
  border: 0;
  font-weight: 700;
  letter-spacing: .02em;
  font-size: .9rem;
}

.fm-content-card,
.fm-nav-card,
.fm-stats-card {
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  overflow: hidden;
  background: var(--fm-surface);
}

.fm-content-card {
  border-color: #cddbe2;
  box-shadow: 0 14px 30px rgba(27, 41, 51, 0.08) !important;
}

.fm-nav-card,
.fm-stats-card {
  box-shadow: 0 4px 14px rgba(27, 41, 51, 0.04) !important;
}

.fm-content-card .card-body {
  min-height: 72vh;
}

.fm-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.fm-cashier-toggle {
  border: 1px solid #b6c6cf;
  background: #fff;
  color: #33505e;
  border-radius: 999px;
  padding: .26rem .62rem;
  min-height: 32px;
  height: 32px;
  line-height: 1;
  font-size: .75rem;
  font-weight: 700;
}

.fm-cashier-toggle[aria-pressed="true"] {
  background: #e4f1f3;
  border-color: #8eb0bc;
  color: #1f5f69;
}

.fm-cashier-toggle-floating {
  display: none;
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 1200;
  box-shadow: 0 8px 18px rgba(20, 34, 44, 0.22);
}

.fm-section {
  background: #eaf0f3;
  border: 0;
  border-radius: 8px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #496272;
  font-weight: 800;
  margin: 0 0 .38rem;
  padding: .35rem .55rem;
}

.fm-section-toggle {
  width: 100%;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.fm-section-toggle::after {
  content: '▾';
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .78rem;
  color: #4f6877;
}

.fm-section-toggle[aria-expanded="false"]::after {
  content: '▸';
}

.fm-nav-collapsible[hidden] {
  display: none !important;
}

.fm-action-cell {
  text-align: right;
  white-space: nowrap;
}

.fm-action-cell .fm-action-wrap {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.fm-icon-action {
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.fm-nav-list {
  gap: .35rem;
  padding: .35rem;
}

.fm-nav-block {
  background: #fbfcfd;
  border: 1px solid #e3ebf0;
  border-radius: 10px;
  padding: .42rem;
}

.fm-nav-list .list-group-item-action {
  border: 0;
  color: #2f4653;
  font-weight: 600;
  border-radius: 8px;
  margin: 0 0 .3rem;
  padding: .5rem .6rem;
  background: #fff;
  border: 1px solid #e6edf2;
}

.fm-nav-list .list-group-item-action:last-child {
  margin-bottom: 0;
}

.fm-nav-list .list-group-item-action:hover {
  background: #f7f1e8;
  color: var(--fm-primary);
  border-color: #e5d2b8;
}

.fm-nav-list .list-group-item-action.active {
  background: var(--fm-primary-soft);
  color: var(--fm-primary);
  font-weight: 700;
  border-color: #a7c2cb;
  box-shadow: inset 3px 0 0 #1f5f69;
}

.fm-session-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  background: #f8fbfc;
  border-bottom: 1px solid var(--fm-border);
}

.fm-session-user {
  font-size: .82rem;
  font-weight: 700;
  color: #2d4a58;
  text-transform: uppercase;
}

.fm-logout-link {
  font-size: .82rem;
  font-weight: 600;
}

.fm-stat-item {
  padding: .95rem 0;
  border-bottom: 0;
}

.fm-stat-label {
  color: #4d616d;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: .15rem;
}

.fm-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #243643;
}

.fm-stat-item--highlight .fm-stat-label {
  color: #2f4453;
}

.fm-stat-item--highlight .fm-stat-value {
  font-size: 1.85rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--fm-accent);
}

.fm-legal-links {
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid #dce6ec;
  display: flex;
  gap: .45rem;
  align-items: center;
  justify-content: flex-start;
  font-size: .84rem;
}

.fm-legal-links span {
  color: #7b8d98;
}

.content,
.content_l,
.tiny,
.preis,
.table_headline,
.table_headline_underline,
.table_summe,
.table_header,
.row_0,
.row_1 {
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  color: var(--fm-text);
}

.content,
.content_l,
.tiny,
.preis,
.table_headline,
.table_headline_underline,
.table_summe,
.table_header,
.row_0,
.row_1,
td,
th {
  font-size: .94rem;
}

.content_red {
  color: var(--fm-danger);
  font-weight: 600;
}

.fm-ui-note {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #bfd9df;
  border-radius: 10px;
  background: #f2fbfd;
  color: #1f5f69;
  font-weight: 700;
}

.fm-ui-warning {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #e7b8b8;
  border-radius: 10px;
  background: #fff3f3;
  color: #8d1f1f;
  font-weight: 700;
}

.table_headline {
  font-weight: 700;
}

.table_headline_underline {
  font-weight: 700;
  border-bottom: 2px solid var(--fm-border);
}

.table_summe {
  font-weight: 700;
  border-top: 2px solid var(--fm-border);
}

.table_header {
  font-weight: 700;
  border-bottom: 1px solid #d5e2e8;
  color: #31505f;
  background: #f3f8fa;
  padding-top: .58rem;
  padding-bottom: .58rem;
}

.row_0 {
  background-color: #ffffff;
}

.row_1 {
  background-color: #f7fbfd;
}

tr.row_0 td,
tr.row_1 td {
  border-bottom: 1px solid #e4edf2;
  padding-top: .62rem;
  padding-bottom: .62rem;
}

tr.row_0:hover td,
tr.row_1:hover td {
  background: #edf5f8;
}

.table-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
  letter-spacing: .01em;
}

.customerlist-tools {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: .2rem 0 .7rem;
}

.customerlist-filter-label {
  font-size: .9rem;
  color: #3a5564;
  font-weight: 700;
  margin: 0;
}

.customerlist-filter-input {
  max-width: 360px;
  width: 100%;
}

.customerlist-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #dce6ea;
  border-radius: 10px;
}

#customerlist-table {
  min-width: 980px;
}

.customerlist-row--settled td:first-child {
  box-shadow: inset 4px 0 #3b9072;
}

.customerlist-row--open td:first-child {
  box-shadow: inset 4px 0 #d58a3a;
}

.customerlist-row--empty td:first-child {
  box-shadow: inset 4px 0 #b6c5ca;
}

.customerlist-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  min-height: 32px;
  padding: .35rem .7rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.customerlist-status::before {
  content: "";
  flex: none;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: currentColor;
}

.customerlist-status--settled {
  color: #176748;
  background: #e9f6ee;
  border-color: #b9ddc7;
}

.customerlist-status--open {
  color: #8a4b16;
  background: #fff2df;
  border-color: #ebcb9e;
}

.customerlist-status--empty {
  color: #5c6e79;
  background: #f0f4f6;
  border-color: #d5e0e5;
}

.customerlist-status--compact {
  display: none;
}

@media (max-width: 760px) {
  .customerlist-status--compact {
    display: flex;
    width: max-content;
    min-height: 26px;
    margin-top: .32rem;
    padding: .24rem .5rem;
    font-size: .7rem;
  }
}

.customerlist-sales-toggle {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 34px;
  padding: .35rem .65rem;
  border: 1px solid #afc4cd;
  border-radius: 999px;
  background: #f5fafb;
  color: #244c54;
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.customerlist-sales-toggle::after {
  content: "+";
  width: 1.1rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

.customerlist-sales-toggle:hover,
.customerlist-sales-toggle:focus-visible,
.customerlist-sales-toggle.is-open {
  border-color: #547b82;
  background: #e4f0f2;
  color: #173d44;
}

.customerlist-sales-toggle.is-open::after {
  content: "−";
}

.customerlist-no-sales {
  color: #71858e;
  font-variant-numeric: tabular-nums;
}

.customerlist-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.customerlist-action-link,
.customerlist-settlement-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .28rem .58rem;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 750;
  white-space: nowrap;
}

.customerlist-action-link {
  border: 1px solid #c8d6dc;
  background: #fff;
}

.customerlist-settlement-link {
  border: 1px solid #326963;
  background: #326963;
  color: #fff;
}

.customerlist-settlement-link:hover,
.customerlist-settlement-link:focus-visible {
  background: #214f4a;
  color: #fff;
  text-decoration: none;
}

.customerlist-settlement-link.is-complete {
  border-color: #759287;
  background: #edf5f0;
  color: #315a4a;
}

.customerlist-sales-detail > td {
  padding: 0 !important;
  border-bottom: 1px solid #cedde3;
  background: #eef5f6;
}

.customerlist-sales-panel {
  padding: .8rem 1rem 1rem;
  overflow-x: auto;
}

.customerlist-sales-title {
  margin-bottom: .55rem;
  color: #294f57;
  font-size: .92rem;
  font-weight: 800;
}

.customerlist-sales-grid {
  display: grid;
  grid-template-columns: 90px 75px minmax(170px, 1.15fr) minmax(160px, 1.4fr) 70px 110px 85px;
  min-width: 850px;
  gap: .65rem;
  align-items: center;
  padding: .46rem .65rem;
  border-top: 1px solid #d7e4e8;
  background: #fff;
  font-size: .85rem;
}

.customerlist-sales-grid--head {
  border-top: 0;
  background: #dbe9ec;
  color: #365860;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.customerlist-sales-grid .amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.customerlist-sales-grid .time,
.customerlist-sales-grid .transaction {
  font-family: ui-monospace, "Cascadia Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

.customerlist-sales-grid.is-voided {
  color: #8b5555;
  background: #fff8f7;
}

.customerlist-sales-grid.is-voided .amount {
  text-decoration: line-through;
}

.table_cell_bg {
  background: transparent;
  border: 0;
}

a {
  color: #2f5d62;
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--fm-accent);
  text-decoration: underline;
}

input,
select,
textarea,
button {
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
}

input[type="text"],
input[type="file"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select,
.form-control,
.form-select {
  border: 1px solid #c6d2da;
  border-radius: var(--fm-radius) !important;
  padding: 0 .72rem;
  color: var(--fm-text);
  background: #fff;
  min-height: var(--fm-hit);
  height: var(--fm-hit);
  font-size: 1.02rem;
  line-height: 1.25;
}

input[type="submit"],
button,
.btn {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0 .95rem;
  background: var(--fm-accent);
  color: #fff;
  font-weight: 700;
  min-height: var(--fm-hit);
  font-size: 1rem;
  line-height: 1;
  height: var(--fm-hit);
  box-sizing: border-box;
}

input[type="submit"]:hover,
button:hover,
.btn:hover {
  background: #9f5938;
}

#info-box {
  border: 1px solid #d8c5af;
  border-radius: 12px;
  background: #fff7ef;
  padding: .8rem .9rem;
  width: 100%;
  max-width: 340px;
  margin-top: 1rem;
  position: static;
  height: auto;
}

input[type="text"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus,
button:focus,
.btn:focus,
.sale-action:focus,
a:focus-visible {
  outline: 3px solid rgba(31, 95, 105, 0.35);
  outline-offset: 1px;
  border-color: var(--fm-focus);
}

.item-cat-btn {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 .75rem !important;
  border: 1px solid #4d7f95 !important;
  background: #fff !important;
  color: #24566b !important;
  font-weight: 700 !important;
  box-sizing: border-box !important;
  white-space: nowrap;
  border-radius: 10px !important;
  transition: all .12s ease;
}

.item-cat-btn:hover,
.item-cat-btn:focus {
  background: #edf5f8 !important;
  border-color: #2f6e89 !important;
  color: #1d4d61 !important;
}

.item-cat-btn.is-active {
  background: #1f5f79 !important;
  color: #fff !important;
  border-color: #1f5f79 !important;
  outline: 2px solid #174b60;
  outline-offset: 0;
  box-shadow: 0 6px 14px rgba(31, 95, 121, 0.28);
  font-weight: 700 !important;
}

.item-size-btn {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 .65rem !important;
  font-size: .9rem !important;
  border: 1px solid #5c8da2 !important;
  background: #fff !important;
  color: #2a5f75 !important;
  box-sizing: border-box !important;
  white-space: nowrap;
  border-radius: 999px !important;
  transition: all .12s ease;
}

.item-size-btn:hover,
.item-size-btn:focus {
  background: #eef6fa !important;
  border-color: #39788f !important;
  color: #1f5267 !important;
}

.item-size-btn.is-active {
  background: #24708c !important;
  color: #fff !important;
  border-color: #24708c !important;
  outline: 2px solid #1a5d75;
  outline-offset: 0;
  box-shadow: 0 4px 10px rgba(36, 112, 140, 0.28);
  font-weight: 700 !important;
}

.seller-add-item-form {
  margin-top: 8px;
}

.seller-add-item-table td {
  vertical-align: top;
}

.seller-choice-wrap {
  margin-top: 2px;
  margin-bottom: 2px;
}

.seller-inline-input {
  width: 100%;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 .45rem !important;
  font-size: .9rem !important;
  border-radius: 8px !important;
}

.seller-inline-select {
  min-width: 120px;
}

.seller-inline-price {
  max-width: 98px;
  text-align: right;
}

.seller-items-table tr.row_0 td {
  background: #fbfdff;
}

.seller-items-table tr.row_1 td {
  background: #f5f9fc;
}

.seller-items-table tr:hover td {
  background: #eaf2f7 !important;
}

.fm-topbar {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  align-items: center;
  gap: 10px;
}

.fm-topbar-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fm-topbar-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.fm-topbar-state {
  font-weight: 700;
}

.fm-topbar-metrics {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fm-topbar-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d7e3ea;
}

.fm-topbar-link {
  justify-self: end;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d7e3ea;
  background: #ffffff;
  text-decoration: none;
  color: #244b5e;
}

.fm-topbar-link:hover,
.fm-topbar-link:focus {
  background: #eff6fa;
  border-color: #b8cfdb;
}

.fm-cdetail-wrap {
  display: grid;
  gap: 12px;
}

.fm-cdetail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.fm-cdetail-head h4 {
  margin: 0;
}

.fm-cdetail-head-badge {
  border: 1px solid #d6e1e8;
  border-radius: 999px;
  background: #f6fafc;
  padding: 6px 10px;
  font-weight: 700;
  color: #244a5c;
}

.fm-cdetail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fm-cdetail-card {
  border: 1px solid #dce5ea;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.fm-cdetail-card-title {
  font-weight: 800;
  color: #244657;
  margin-bottom: 8px;
}

.fm-cdetail-seller-name {
  font-weight: 800;
  color: #1e3e4d;
  margin-bottom: 4px;
}

.fm-cdetail-seller-line {
  color: #4a5f6b;
  font-size: .93rem;
}

.fm-cdetail-table td.table_header {
  background: #edf3f7;
  border-bottom: 1px solid #d2dee6;
  font-weight: 800;
  color: #2a4b5b;
}

.fm-cdetail-table td.row_0 {
  background: #fbfdff;
}

.fm-cdetail-table td.row_1 {
  background: #f5f9fc;
}

.fm-cdetail-table tr:hover td.row_0,
.fm-cdetail-table tr:hover td.row_1 {
  background: #e8f1f7;
}

.fm-cdetail-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fm-cdetail-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .9rem;
}

.fm-cdetail-muted {
  color: #5a6d78;
}

.fm-cdetail-summary {
  max-width: 760px;
}

.fm-cdetail-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #e9eff3;
}

.fm-cdetail-summary-row > span {
  color: #3c5461;
}

.fm-cdetail-summary-row > b {
  color: #1f3846;
  font-weight: 800;
}

.fm-cdetail-summary-row.is-deduction > b {
  color: #8a3f31;
}

.fm-cdetail-summary-row.is-final {
  margin-top: 2px;
  border-top: 2px solid #c8d8e2;
  border-bottom: 0;
  padding-top: 10px;
}

.fm-cdetail-summary-row.is-final > span {
  color: #173647;
  font-weight: 700;
}

.fm-cdetail-summary-row.is-final strong {
  color: #17465f;
  font-size: 1.22rem;
}

.fm-settlement-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.fm-settlement-submit {
  min-width: 260px;
  font-weight: 850;
}

.fm-settlement-complete {
  border-color: #8fb7a2;
  background: #edf7f1;
  color: #234f3b;
}

.fm-settlement-back {
  margin-top: 12px;
}

@media (max-width: 1024px) {
  .fm-topbar {
    grid-template-columns: 1fr;
  }
  .fm-topbar-link {
    justify-self: start;
  }
  .fm-cdetail-grid {
    grid-template-columns: 1fr;
  }
}

/* Legacy inline styles vereinheitlichen */
input[type="text"],
input[type="file"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select,
.form-control,
.form-select {
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif !important;
}

@media (max-width: 992px) {
  .fm-content-card .card-body {
    min-height: auto;
  }
}

.sale-card {
  margin-top: 1rem;
  border: 1px solid var(--fm-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 22px rgba(29, 42, 52, 0.07);
}

.sale-card-head,
.sale-row {
  display: grid;
  grid-template-columns: 120px 1fr 130px 120px;
  gap: .75rem;
  align-items: center;
  padding: .7rem .9rem;
}

.sale-card-head {
  background: var(--fm-primary-soft);
  color: #244753;
  font-weight: 700;
  border-bottom: 1px solid var(--fm-border);
}

.sale-row {
  border-bottom: 1px solid #e8edf0;
}

.sale-row-0 {
  background: #fcfdfd;
}

.sale-row-1 {
  background: #f7fafb;
}

.sale-row--pending {
  box-shadow: inset 5px 0 #d59b22;
  background: #fffaf0;
}

.sale-row--blocked {
  box-shadow: inset 5px 0 #b33a32;
  background: #fff2f0;
}

.sale-row--synced {
  box-shadow: inset 5px 0 #3f7c61;
  background: #f3faf6;
}

.sale-local-state {
  display: block;
  margin-top: .15rem;
  color: #7a5a17;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.sale-queue-more {
  padding: .85rem 1rem;
  border-top: 1px solid #dce5ea;
  background: #eef5f6;
  color: #36545b;
  font-weight: 700;
}

.sale-row--blocked .sale-local-state {
  color: #9b2f29;
}

.sale-row--synced .sale-local-state {
  color: #32694f;
}

.sale-row .price,
.sale-card-head .price,
.sale-total .price {
  text-align: right;
  font-weight: 700;
}

.sale-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .65rem;
  border-radius: 8px;
  border: 1px solid #d8c5af;
  background: #fff7ef;
  color: #8f3f2a;
  font-weight: 600;
  min-height: var(--fm-hit);
}

.sale-delete:hover {
  background: #f7e9da;
  color: #7e341f;
  text-decoration: none;
}

.sale-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .95rem .9rem;
  background: #edf4f6;
  color: #253742;
  font-size: 1.12rem;
  font-weight: 700;
}

.sale-input {
  border: 2px solid #bfd0da !important;
}

.sale-flow-intro {
  margin-bottom: .25rem;
}

.sale-flow-title {
  margin: 0 0 .3rem;
  font-size: 1.1rem;
  font-weight: 750;
  color: #1d3440;
}

.sale-flow-kasse {
  display: inline-block;
  margin-left: .45rem;
  font-size: .86em;
  font-weight: 700;
  color: #3f5563;
  letter-spacing: .02em;
}

.sale-network-status {
  display: inline-block;
  margin-right: .3rem;
  padding: .06rem .25rem;
  border-radius: 6px;
  background: transparent;
  color: #5c6f7d;
  font-size: .7rem;
  font-weight: 600;
  border: 1px solid #dbe6ec;
}

.sale-network-status.is-offline {
  background: #fff6f6;
  color: #8f2e2e;
  border-color: #ebc2c2;
}

.sale-queue-status {
  background: transparent;
  color: #637489;
}

.sale-shortcuts-hint {
  color: #6f808f;
  font-size: .7rem;
  font-weight: 500;
}

.sales-flow-page button.sale-queue-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 0;
  height: auto;
  padding: .06rem .25rem;
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid #dbe6ec;
  border-radius: 6px;
  background: transparent;
  color: #5c6f7d;
  box-shadow: none;
}

.sales-flow-page button.sale-queue-toggle:hover,
.sales-flow-page button.sale-queue-toggle:focus {
  background: #f4f8fb;
  color: #4f6576;
  border-color: #cbd9e2;
  text-decoration: none;
}

.sales-flow-page button.sale-queue-toggle.is-connected {
  border-color: #78a78b;
  background: #edf8f1;
  color: #286143;
}

.sale-queue-drawer {
  margin-top: .5rem;
}

.sale-queue-head,
.sale-queue-row {
  grid-template-columns: 70px 180px 120px 1fr 120px 110px;
}

.sales-flow-page .sales-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  padding-top: .28rem;
  padding-bottom: .1rem;
  border-top: 1px solid #ecf2f6;
  opacity: 1;
}

.sales-flow-page .sales-status {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.sales-flow-page .sales-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
}

.sales-flow-page .sales-actions .sale-queue-toggle {
  min-height: 46px;
  padding: .65rem .9rem;
  border: 2px solid #aebfc9;
  border-radius: 9px;
  background: #fff;
  color: #294653;
  font-size: .92rem;
  font-weight: 750;
  line-height: 1.15;
  box-shadow: 0 2px 7px rgba(37, 55, 66, .12);
}

.sales-flow-page .sales-actions .sale-queue-toggle:hover,
.sales-flow-page .sales-actions .sale-queue-toggle:focus-visible {
  border-color: #4e778b;
  background: #eef6fa;
  color: #173f51;
}

.sales-flow-page .sales-actions .sale-register-close {
  border-color: #8bb99d;
  background: #dff4e6;
  color: #185c34;
}

.sales-flow-page .sales-actions #pos-sync-now {
  border-color: #78a9c1;
  background: #e6f3f9;
  color: #174f68;
}

.sale-register-close-status {
  margin-top: .5rem;
  padding: .55rem .7rem;
  border: 1px solid #d7e1e7;
  border-radius: 8px;
  background: #f6f9fb;
  color: #435965;
  font-size: .85rem;
  font-weight: 650;
}

.sale-register-close-status.is-checking {
  border-color: #dfc37a;
  background: #fff9e8;
  color: #72550d;
}

.sale-register-close-status.is-ready {
  border-color: #91c9a6;
  background: #edf9f1;
  color: #21683d;
}

.sale-register-close-status.is-blocked {
  border-color: #dfa4a4;
  background: #fff1f1;
  color: #8c1f1f;
}

@media (max-width: 760px) {
  .sales-flow-page .sale-live-total-wrap {
    justify-content: flex-start;
    margin-top: .4rem;
  }

  .sales-flow-page .sale-live-total-card {
    position: static;
    max-width: 100%;
  }

  .sales-flow-page .sales-footer {
    flex-wrap: wrap;
  }

  .sales-flow-page .sales-actions {
    width: 100%;
    justify-content: stretch;
  }

  .sales-flow-page .sales-actions .sale-queue-toggle {
    flex: 1 1 calc(50% - .55rem);
    min-width: 145px;
  }
}

.sale-flow-hint {
  margin: 0;
  color: #4f6471;
  font-size: .92rem;
}

.sale-flow-table td {
  vertical-align: middle;
}

.sale-inline-error {
  margin-top: .35rem;
  display: inline-block;
  padding: .45rem .65rem;
  background: #fff1f1;
  border: 1px solid #e0a8a8;
  border-radius: 8px;
  color: #8c1f1f;
  font-size: .98rem;
  font-weight: 700;
}

.sale-label {
  color: #263846;
  font-weight: 700;
}

.sale-actions {
  display: flex;
  align-items: stretch;
  gap: .55rem;
  flex-wrap: wrap;
}

.sale-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--fm-hit);
  height: var(--fm-hit);
  padding: 0 .95rem;
  line-height: 1;
  border-radius: 10px;
  font-size: .96rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.sale-action--primary {
  border: 2px solid transparent;
  background: linear-gradient(135deg, #d1713f 0%, #bf622f 100%);
  color: #fff;
  box-shadow: 0 7px 16px rgba(191, 98, 47, 0.24);
}

.sale-action--primary:hover,
.sale-action--primary:focus {
  background: linear-gradient(135deg, #c96a38 0%, #b75a2a 100%);
  color: #fff;
}

.sale-action--secondary {
  border: 2px solid #8eb0bc;
  background: #fff;
  color: #1f5f69;
  box-shadow: none;
}

.sale-action--secondary:hover,
.sale-action--secondary:focus {
  background: #eef7f9;
  color: #1a4f57;
  text-decoration: none;
}

@media (max-width: 900px) {
  .sale-card-head,
  .sale-row {
    grid-template-columns: 90px 1fr 100px 90px;
    padding: .65rem .7rem;
    gap: .5rem;
  }

  .sale-action {
    flex: 1 1 100%;
    width: 100%;
  }
}

body.fm-cashier-mode {
  --fm-hit: 52px;
}

body.fm-cashier-mode .content,
body.fm-cashier-mode .content_l,
body.fm-cashier-mode td,
body.fm-cashier-mode th {
  font-size: 1.02rem;
}

body.fm-cashier-mode .sale-flow-title {
  font-size: 1.28rem;
}

body.fm-cashier-mode .sale-flow-hint {
  font-size: 1rem;
}

body.fm-cashier-mode .sale-label {
  font-size: 1.02rem;
}

body.fm-cashier-mode .sale-action {
  font-size: 1.03rem;
  letter-spacing: .01em;
}

body.fm-cashier-mode .sale-card-head,
body.fm-cashier-mode .sale-row {
  padding-top: .86rem;
  padding-bottom: .86rem;
}

body.fm-cashier-mode .fm-stat-label {
  font-size: .95rem;
}

body.fm-cashier-mode .fm-stat-value {
  font-size: 1.3rem;
}

body.fm-cashier-mode .fm-stat-item--highlight .fm-stat-value {
  font-size: 2.1rem;
}

body.fm-cashier-mode.fm-action-sell_product .fm-col-nav,
body.fm-cashier-mode.fm-action-sell_product .fm-col-stats {
  display: none !important;
}

body.fm-cashier-mode.fm-action-sell_product .fm-col-main {
  flex: 0 0 100%;
  max-width: 100%;
}

body.fm-cashier-mode.fm-action-sell_product .fm-content-card {
  border: 0;
  box-shadow: none !important;
  background: transparent;
}

body.fm-cashier-mode.fm-action-sell_product .fm-content-card .card-body {
  padding: 1rem .6rem 2rem;
}

body.fm-cashier-mode.fm-action-sell_product .fm-cashier-toggle-floating {
  display: inline-flex;
}

body.fm-cashier-mode.fm-action-sell_product .sale-flow-title {
  font-size: 1.5rem;
}

body.fm-cashier-mode.fm-action-sell_product .sale-flow-hint {
  font-size: 1.08rem;
}

body.fm-cashier-mode.fm-action-sell_product .sale-card {
  margin-top: 1.2rem;
  border-width: 2px;
}

body.fm-cashier-mode.fm-action-sell_product .sale-card-head,
body.fm-cashier-mode.fm-action-sell_product .sale-row {
  grid-template-columns: 140px 1fr 170px 140px;
  padding-top: .96rem;
  padding-bottom: .96rem;
}

body.fm-cashier-mode.fm-action-sell_product .sale-card-head {
  font-size: 1.04rem;
}

body.fm-cashier-mode.fm-action-sell_product .sale-row {
  font-size: 1.08rem;
}

body.fm-cashier-mode.fm-action-sell_product .sale-total {
  font-size: 1.45rem;
  padding: 1.2rem 1rem;
}

body.fm-cashier-mode.fm-action-sell_product #info-box {
  max-width: 100%;
  font-size: 1.22rem;
  padding: 1rem 1.1rem;
  border-width: 2px;
}

body.fm-action-customer_display .fm-col-nav,
body.fm-action-customer_display .fm-col-stats,
body.fm-action-customer_display .fm-cashier-toggle-floating {
  display: none !important;
}

body.fm-action-customer_display .fm-col-main {
  flex: 0 0 100%;
  max-width: 100%;
}

body.fm-action-customer_display .fm-content-card {
  border: 0;
  box-shadow: none !important;
  background: transparent;
}

body.fm-action-customer_display .fm-content-card .card-body {
  padding: .35rem !important;
}

.customer-display {
  background: linear-gradient(160deg, #f7fbff 0%, #e7f3fb 100%);
  border: 1px solid #d3e5f1;
  border-radius: 16px;
  padding: 1rem;
}

.customer-display-head {
  margin-bottom: .9rem;
}

.customer-display-title {
  color: #2f5362;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.customer-display-subtitle {
  color: #4b6775;
  font-size: 1rem;
  font-weight: 600;
}

.customer-display-table {
  border: 1px solid #cde0ec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.customer-display-row {
  display: grid;
  grid-template-columns: minmax(130px, 190px) 1fr minmax(140px, 190px);
  gap: .7rem;
  padding: .75rem .9rem;
  align-items: center;
  border-bottom: 1px solid #ebf2f7;
  font-size: 1.08rem;
  font-weight: 600;
  color: #2d4653;
}

.customer-display-row:last-child {
  border-bottom: 0;
}

.customer-display-row--head {
  background: #f1f8fc;
  color: #3a5a6a;
  font-size: .92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.customer-display-row .price {
  text-align: right;
  font-weight: 800;
}

.customer-display-row--empty {
  color: #68808d;
}

.customer-display-total {
  position: sticky;
  top: .35rem;
  z-index: 20;
  margin: 0 0 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #d1713f 0%, #bf622f 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(112, 55, 27, .28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
}

.customer-display-total span {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.customer-display-total strong {
  font-size: clamp(2.1rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
}

/* Scoped sales-flow optimization (does not leak to other masks) */
.sales-flow-page {
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.sales-flow-page .sale-flow-intro {
  margin-bottom: var(--space-sm);
}

.sales-flow-page .sale-flow-title {
  font-size: 1.2rem;
  margin-bottom: .2rem;
}

.sales-flow-page .sale-flow-kasse {
  color: #2d5865;
}

.sales-flow-page .sale-flow-hint {
  color: #3f5563;
}

.sales-flow-page .sale-flow-table {
  background: transparent;
}

.sales-flow-page .sale-live-total-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.sales-flow-page .sale-live-total-card {
  width: 100%;
  max-width: 320px;
  border: 1px solid #1b545d;
  background: linear-gradient(180deg, #246b75 0%, #1f5f69 100%);
  border-radius: 6px;
  padding: .9rem 1rem;
  position: sticky;
  top: 10px;
  box-shadow: 0 8px 18px rgba(31, 95, 105, 0.25);
}

.sales-flow-page .sale-live-total-label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .25rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.sales-flow-page .sale-live-total-value {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.sales-flow-page .sale-keypad {
  margin-top: .8rem;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
}

.sales-flow-page .sale-keypad.is-visible {
  display: grid;
}

.sales-flow-page .sale-keypad-btn {
  min-height: 52px;
  border: 1px solid #b8ccd7;
  border-radius: 10px;
  background: #fff;
  color: #254856;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.sales-flow-page .sale-keypad-btn:hover,
.sales-flow-page .sale-keypad-btn:focus {
  background: #f2f8fb;
  border-color: #9db8c6;
}

.sales-flow-page .sale-keypad-btn--muted {
  color: #516a79;
  font-size: 1.1rem;
}

.sales-flow-page .sale-keypad-btn--wide {
  grid-column: span 2;
}

.sales-flow-page .sale-keypad-btn--ok {
  background: linear-gradient(135deg, #d1713f 0%, #bf622f 100%);
  border-color: #ba5e2d;
  color: #fff;
}

.sales-flow-page .sale-keypad-btn--ok:hover,
.sales-flow-page .sale-keypad-btn--ok:focus {
  background: linear-gradient(135deg, #c96a38 0%, #b75a2a 100%);
  border-color: #a85328;
  color: #fff;
}

.sales-flow-page .sale-numpad-toggle {
  display: none;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .sales-flow-page .sale-numpad-toggle {
    display: inline-flex;
  }
}

.sales-flow-page .sale-label {
  font-size: 1rem;
  color: #223544;
}

.sales-flow-page .sale-label-inline {
  display: inline-block;
  margin-left: .4rem;
  margin-right: .3rem;
}

.sales-flow-page .sale-input {
  min-height: var(--fm-hit);
  height: var(--fm-hit);
  font-size: 1.08rem;
  font-weight: 600;
  border-color: #a9bfcc !important;
  border-radius: 6px !important;
}

.sales-flow-page .sale-price-entry {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.sales-flow-page .sale-price-separator {
  display: inline-flex;
  align-items: center;
  min-height: var(--fm-hit);
  color: #173f51;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.sales-flow-page .sale-price-currency {
  color: #294653;
  font-size: 1.05rem;
  font-weight: 800;
}

.sales-flow-page .sale-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.sales-flow-page .sale-mode-btn {
  min-height: 46px;
  border: 2px solid #8bb99d;
  border-radius: 6px;
  padding: .65rem .95rem;
  background: #dff4e6;
  color: #185c34;
  font-size: .98rem;
  font-weight: 750;
  line-height: 1.15;
  box-shadow: 0 2px 7px rgba(37, 55, 66, .12);
}

.sales-flow-page .sale-mode-btn:hover,
.sales-flow-page .sale-mode-btn:focus {
  background: #ccebd7;
  border-color: #4f9569;
}

.sales-flow-page .sale-mode-btn.is-active {
  background: #26734a;
  border-color: #205f3e;
  color: #fff;
}

.sales-flow-page .sale-barcode-row {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  flex-wrap: wrap;
}

.sales-flow-page .sale-barcode-row #item_barcode {
  flex: 1 1 240px;
}

.sales-flow-page .sale-scan-btn {
  min-width: 110px;
}

.sales-flow-page .sale-camera-btn {
  min-width: 110px;
}

.sales-flow-page .sale-barcode-hint {
  margin-top: .35rem;
  color: #5b6f7d;
  font-size: .86rem;
  font-weight: 600;
}

.sales-flow-page .sale-camera-wrap {
  margin-top: .55rem;
  border: 1px solid #c8d7e0;
  border-radius: 12px;
  background: #f7fbfd;
  padding: .65rem;
}

.sales-flow-page .sale-camera-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .55rem;
}

.sales-flow-page .sale-camera-actions {
  display: inline-flex;
  gap: .45rem;
}

.sales-flow-page .sale-camera-viewport {
  width: min(100%, 420px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #8ea8b7;
  background: #0f1b22;
}

.sales-flow-page .sale-camera-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  transition: transform .12s ease-out;
}

.sales-flow-page .sale-camera-zoom-row {
  margin-top: .45rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  color: #365668;
  font-size: .88rem;
  font-weight: 700;
}

.sales-flow-page .sale-camera-zoom-row input[type="range"] {
  width: 180px;
}

.sales-flow-page .sale-camera-status {
  margin-top: .45rem;
  color: #365668;
  font-size: .88rem;
  font-weight: 600;
}

.sales-flow-page .sale-manual-row {
  display: table-row;
}

.sales-flow-page .sale-input--error {
  border-color: #c64949 !important;
  box-shadow: 0 0 0 2px rgba(198, 73, 73, 0.16);
}

.sales-flow-page #article_description {
  background: #f8fbfd;
  font-weight: 500;
  color: #314350;
}

.sales-flow-page .sale-desc-toggle {
  min-height: var(--fm-hit);
  border: 1px dashed #9ab2bf;
  border-radius: 8px;
  background: #f8fcff;
  color: #446371;
  font-size: .95rem;
  font-weight: 700;
  padding: 0 .8rem;
}

.sales-flow-page .sale-desc-toggle:hover,
.sales-flow-page .sale-desc-toggle:focus {
  background: #f0f8fc;
  border-color: #7f9faf;
}

.sales-flow-page .sale-desc-wrap {
  margin-top: .45rem;
}

.sales-flow-page .sale-quick-amounts {
  margin-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.sales-flow-page .sale-quick-amount-btn {
  min-height: 46px;
  border: 2px solid #8bb99d;
  border-radius: 6px;
  padding: .65rem .9rem;
  background: #dff4e6;
  color: #185c34;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.15;
  box-shadow: 0 2px 7px rgba(37, 55, 66, .12);
}

.sales-flow-page .sale-quick-amount-btn:hover,
.sales-flow-page .sale-quick-amount-btn:focus {
  background: #ccebd7;
  border-color: #4f9569;
}

.sales-flow-page .sale-actions {
  margin-top: .1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: .7rem;
}

.sales-flow-page .sale-actions-main,
.sales-flow-page .sale-actions-aux {
  display: flex;
  align-items: stretch;
  gap: .55rem;
  flex-wrap: wrap;
}

.sales-flow-page .sale-actions-aux {
  justify-self: end;
}

.sales-flow-page .sale-action {
  min-height: var(--fm-hit);
  height: var(--fm-hit);
  padding: 0 1rem;
}

.sales-flow-page .sale-action--primary {
  background: var(--accent);
  box-shadow: 0 7px 14px rgba(191, 98, 47, 0.22);
}

.sales-flow-page .sale-action--primary:hover,
.sales-flow-page .sale-action--primary:focus {
  background: #b85d2f;
}

.sales-flow-page .sale-action--secondary {
  border-color: #90adba;
  background: #fff;
  color: #275d66;
}

.sales-flow-page .sale-action--secondary:hover,
.sales-flow-page .sale-action--secondary:focus {
  background: #eef6f8;
  color: #1f5059;
}

.sales-flow-page #sale-ikea-bag-btn {
  border-color: #1d5fa8;
  background: #246fbe;
  color: #fff;
  box-shadow: 0 7px 14px rgba(29, 95, 168, 0.22);
}

.sales-flow-page #sale-ikea-bag-btn:hover,
.sales-flow-page #sale-ikea-bag-btn:focus-visible {
  border-color: #154b86;
  background: #1b5d9f;
  color: #fff;
}

.sales-flow-page #sale-ikea-bag-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.sales-flow-page .sale-queue-toggle {
  min-height: var(--fm-hit);
  height: var(--fm-hit);
  padding: 0 .8rem;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 700;
}

.sales-flow-page .sale-error-modal[hidden] {
  display: none !important;
}

.sales-flow-page .sale-error-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sales-flow-page .sale-error-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 22, 28, 0.55);
}

.sales-flow-page .sale-error-modal__dialog {
  position: relative;
  width: min(480px, 100%);
  border-radius: 14px;
  background: #fff;
  border: 2px solid #d9a6a6;
  box-shadow: 0 18px 36px rgba(16, 26, 34, 0.3);
  padding: 1rem;
}

.sales-flow-page .sale-error-modal__title {
  color: #8c1f1f;
  font-size: 1.2rem;
  font-weight: 800;
}

.sales-flow-page .sale-error-modal__text {
  margin: .5rem 0 1rem;
  color: #344754;
  font-size: 1rem;
  line-height: 1.4;
}

.fm-live-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.fm-fullscreen-row {
  align-items: stretch;
}

.fm-col-main--full .fm-content-card {
  border-color: #c4d4df;
  box-shadow: 0 16px 34px rgba(20, 35, 46, 0.10) !important;
}

.fm-col-main--full .fm-content-card .card-body {
  min-height: auto;
  padding: 14px;
}

.fm-live-wrap {
  border: 1px solid #d5e1e8;
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 100% 0%, #f6fbff 0, transparent 45%),
    radial-gradient(circle at 0% 100%, #f4fbf8 0, transparent 40%),
    #fbfdff;
}

.fm-live-eyebrow {
  letter-spacing: .12em;
  font-size: .7rem;
  color: #5a7383;
  font-weight: 800;
  margin-bottom: 2px;
}

.fm-live-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.fm-live-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.fm-live-card {
  border: 1px solid #dce5ea;
  border-radius: 10px;
  background: #f7fbfd;
  padding: 10px;
}

.fm-live-card--warn {
  background: #fff8ef;
  border-color: #efd7b8;
}

.fm-live-card--ok {
  background: #eef8f1;
  border-color: #b7dec4;
}

.fm-live-card--down {
  background: #fff2f2;
  border-color: #efc0c0;
}

.fm-live-label {
  color: #526773;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.fm-live-state {
  color: #1d3440;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.fm-live-value {
  color: #1d3440;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.fm-live-kassen {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.fm-live-kasse-card {
  border: 1px solid #dce5ea;
  border-radius: 10px;
  background: #fafcfd;
  padding: 10px;
}

.fm-live-kasse-card.is-online {
  border-color: #b7dec4;
  background: #edf8f1;
}

.fm-live-kasse-card.is-idle {
  border-color: #e7d9c3;
  background: #fff8ef;
}

.fm-live-kasse-card.is-logged-out {
  opacity: .48;
  filter: grayscale(.25);
}

.fm-live-kasse-card.fm-live-kasse--1 {
  border-left: 6px solid #1f7a3d;
  background: linear-gradient(180deg, #f4fcf6 0%, #eef8f1 100%);
}

.fm-live-kasse-card.fm-live-kasse--2 {
  border-left: 6px solid #1f5f99;
  background: linear-gradient(180deg, #f4f8ff 0%, #edf3fc 100%);
}

.fm-live-kasse-card.fm-live-kasse--3 {
  border-left: 6px solid #a16007;
  background: linear-gradient(180deg, #fff9ef 0%, #fff3df 100%);
}

.fm-live-kasse-card.fm-live-kasse--4 {
  border-left: 6px solid #8a2e7a;
  background: linear-gradient(180deg, #fff4fb 0%, #faecf6 100%);
}

.fm-live-kasse-title {
  font-weight: 800;
  color: #25414e;
}

.fm-live-kasse-state {
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: 2px;
  color: #3c5968;
}

.fm-live-ping-chart-wrap {
  margin: 6px 0 4px;
}

.fm-live-ping-chart {
  width: 100%;
  height: 64px;
  border: 1px solid #dce5ea;
  border-radius: 8px;
  background: #f7fafc;
  display: block;
}

.fm-live-errors {
  margin-top: 10px;
  border: 1px solid #dce5ea;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.fm-live-errors-head {
  padding: 10px 10px 6px;
  font-weight: 800;
  color: #274555;
}

@media (max-width: 900px) {
  .fm-col-main--full .fm-content-card .card-body {
    padding: 10px;
  }
  .fm-live-wrap {
    padding: 9px;
    border-radius: 12px;
  }
  .fm-live-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .fm-live-head-actions .sale-action {
    min-height: 40px;
    height: 40px;
    padding: 0 .75rem;
    font-size: .85rem;
  }
  .fm-live-value {
    font-size: 1.35rem;
  }
  .fm-live-kassen {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) {
  .fm-live-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fm-live-kassen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sales-flow-page .sale-card {
  margin-top: var(--space-md);
}

.sales-flow-page .sale-card-head {
  background: #f4f8fa;
  border-bottom: 1px solid #dce5ea;
  color: #3a515e;
  font-weight: 650;
}

.sales-flow-page .sale-row {
  border-bottom-color: #e7edf1;
}

.sales-flow-page .sale-row .price {
  font-weight: 700;
}

.sales-flow-page .sale-delete {
  border: 1px solid #d8b2b2;
  background: #fff;
  color: #8f2f2f;
  min-height: var(--fm-hit);
  height: var(--fm-hit);
  font-weight: 600;
}

.sales-flow-page .sale-delete:hover,
.sales-flow-page .sale-delete:focus {
  background: #fff2f2;
  border-color: #c88f8f;
  color: #7f2626;
}

.sales-flow-page .sale-total {
  margin-top: .1rem;
  background: #1f5f69;
  color: #fff;
  padding: 1.1rem 1rem;
  font-size: 1.55rem;
  line-height: 1.15;
  border-top: 0;
}

.sales-flow-page .sale-total .price {
  color: #fff;
  font-size: 1.7rem;
}

.fm-plan-wrap {
  display: grid;
  gap: 12px;
}

.fm-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.fm-plan-head h4 {
  margin: 0 0 2px 0;
}

.fm-plan-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fm-plan-kpi {
  border: 1px solid #dce5ea;
  border-radius: 11px;
  background: #fbfdff;
  padding: 10px;
}

.fm-plan-kpi.is-ok {
  border-color: #b7dec4;
  background: #edf8f1;
}

.fm-plan-kpi.is-warn {
  border-color: #e7d2b0;
  background: #fff7ea;
}

.fm-plan-kpi-label {
  color: #506572;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.fm-plan-kpi-value {
  color: #203845;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.fm-plan-alert {
  border: 1px solid #e4c9a0;
  background: #fff4e1;
  border-radius: 10px;
  padding: 9px 11px;
  color: #6c4812;
  font-weight: 700;
}

.fm-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fm-plan-card {
  border: 1px solid #dce5ea;
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}

.fm-plan-card-head {
  background: #f4f8fa;
  border-bottom: 1px solid #dce5ea;
  color: #2a4655;
  padding: 8px 10px;
  font-weight: 800;
}

.fm-plan-table th,
.fm-plan-table td {
  padding: 7px 9px;
  border-bottom: 1px solid #edf2f5;
  font-size: .92rem;
}

.fm-plan-table th {
  color: #516873;
  font-weight: 700;
  background: #f9fcfd;
}

.fm-plan-table tr:last-child td {
  border-bottom: 0;
}

.fm-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 800;
  font-size: .85rem;
}

.fm-plan-badge.is-ok {
  background: #dcf2e2;
  color: #1f6b37;
}

.fm-plan-badge.is-warn {
  background: #ffe7e7;
  color: #a12d2d;
}

@media (max-width: 1100px) {
  .fm-plan-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fm-plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .fm-plan-kpis {
    grid-template-columns: 1fr;
  }
}

.sales-flow-page .sale-input:focus,
.sales-flow-page .sale-action:focus,
.sales-flow-page .sale-delete:focus,
.sales-flow-page a:focus-visible {
  outline: 3px solid rgba(31, 95, 105, 0.45);
  outline-offset: 1px;
}

@media (max-width: 900px) {
  .sales-flow-page .sale-actions {
    display: block;
  }

  .sales-flow-page .sale-actions-aux {
    margin-left: 0;
    margin-top: .45rem;
  }
}
