:root {
  --workspace-navy: #081a33;
  --workspace-text: #21324a;
  --workspace-muted: #718096;
  --workspace-line: #dfe5ec;
  --workspace-page: #ffffff;
  --workspace-surface: #ffffff;
  --workspace-primary: #0c59ae;
  --workspace-primary-hover: #084b95;
  --workspace-primary-soft: #eaf2fb;
  --workspace-orange: #f7941d;
  --workspace-danger: #c53d48;
  --workspace-shadow: 0 14px 34px rgba(8, 26, 51, .12);
}

* { box-sizing: border-box; }

html,
body { width: 100%; height: 100%; margin: 0; overflow: hidden; }

body.workspace-page {
  color: var(--workspace-text);
  background: var(--workspace-page);
  font: 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button { font: inherit; }

.workspace-layout { width: 100%; height: 100dvh; display: flex; overflow: hidden; }

.workspace-mobile-bar { display: none; }

.workspace-sidebar {
  z-index: 30;
  width: 260px;
  min-width: 260px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--workspace-surface);
  border-right: 1px solid var(--workspace-line);
  transition: width .2s ease, min-width .2s ease, transform .2s ease;
}

.workspace-sidebar.is-collapsed { width: 72px; min-width: 72px; }

.workspace-brand { height: 66px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #edf0f4; }
.workspace-brand img { width: 176px; max-height: 46px; object-fit: contain; object-position: left center; }
.workspace-collapse { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #728096; cursor: pointer; }
.workspace-collapse:hover { background: #f0f3f7; color: var(--workspace-navy); }

.workspace-nav { flex: 1; min-height: 0; padding: 10px 8px; overflow: auto; }
.workspace-nav-group { margin: 11px 10px 5px; color: #98a3b2; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.workspace-nav-item {
  width: 100%; min-height: 39px; display: flex; align-items: center; gap: 10px; margin: 2px 0; padding: 7px 11px;
  border: 0; border-radius: 9px; color: #35465c; background: transparent; cursor: pointer; text-align: left;
}
.workspace-nav-item:hover { color: var(--workspace-navy); background: #f3f6f8; }
.workspace-nav-item.is-active { color: var(--workspace-primary); background: var(--workspace-primary-soft); font-weight: 500; }
.workspace-nav-item .dx-icon { width: 18px; min-width: 18px; font-size: 17px; text-align: center; }
.workspace-nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-nav-item > * { pointer-events: none; }
.workspace-external-mark { margin-left: auto; color: #8b98a9; font-size: 13px; }

.workspace-profile-wrap { position: relative; flex: 0 0 auto; padding: 8px; border-bottom: 1px solid #edf0f4; }
.workspace-profile-control { display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; gap: 4px; padding: 5px; border: 1px solid #e7edf5; border-radius: 10px; background: #f7f9fc; }
.workspace-profile { width: 100%; min-height: 34px; display: flex; align-items: center; padding: 5px 7px; border: 0; border-radius: 8px; color: var(--workspace-text); background: transparent; cursor: pointer; text-align: left; }
.workspace-profile:hover { background: #f3f6f8; }
.workspace-profile-copy { flex: 1; min-width: 0; }
.workspace-profile-avatar { flex: 0 0 32px; height: 32px; display: grid; place-items: center; margin-right: 9px; border-radius: 9px; background: #e6effb; color: #2363a9; font-size: 14px; font-weight: 600; }
.workspace-profile-caption { display: block; margin-top: 2px; color: #8896a9; font-size: 10px; line-height: 14px; }
.workspace-profile-chevron { flex: 0 0 18px; width: 18px; height: 18px; margin-left: 6px; color: #607996; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.workspace-profile[aria-expanded="true"] .workspace-profile-chevron { transform: rotate(180deg); }
.workspace-profile:focus-visible, .workspace-profile-logout:focus-visible { outline: 2px solid #9bbde8; outline-offset: 2px; }
@media (min-width: 769px) {
  .workspace-sidebar.is-collapsed .workspace-profile-chevron { display: none !important; }
  .workspace-sidebar.is-collapsed .workspace-profile-avatar { margin-right: 0; }
  .workspace-sidebar.is-collapsed .workspace-profile { padding: 3px 0; }
  .workspace-sidebar.is-collapsed .workspace-profile-control { padding: 3px; }
}
.workspace-profile-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-profile-copy strong { color: var(--workspace-navy); font-size: 12px; font-weight: 500; }
.workspace-local-user-name { display: block; margin-top: 2px; color: #334155; font-size: 11px; font-weight: 600; line-height: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-local-user-name[hidden] { display: none; }
.workspace-profile-logout { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; color: #607996; background: transparent; box-shadow: none; cursor: pointer; transition: color .15s ease; }
.workspace-profile-logout:hover { color: #c94651; background: transparent; }
.workspace-profile-logout svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.workspace-profile-menu { position: absolute; left: 8px; right: 8px; top: calc(100% + 4px); bottom: auto; z-index: 80; padding: 5px; border: 1px solid var(--workspace-line); border-radius: 10px; background: #fff; box-shadow: var(--workspace-shadow); }
.workspace-profile-menu[hidden] { display: none; }
.workspace-profile-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 0; border-radius: 7px; color: var(--workspace-text); background: transparent; cursor: pointer; text-align: left; }
.workspace-profile-menu button:hover { background: #f3f6f8; }
.workspace-profile-menu button.is-danger { color: var(--workspace-danger); }

.workspace-help-wrap { flex: 0 0 auto; display: flex; gap: 6px; padding: 8px; border-top: 1px solid #edf0f4; }
.workspace-help { position: relative; flex: 1 1 auto; min-width: 0; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 0; border-radius: 7px; color: #263449; background: #ffd39b; cursor: pointer; font-weight: 500; box-shadow: none; }
.workspace-help:hover { background: #f7c181; }
.workspace-help-history { flex: 0 0 auto; width: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; color: #263449; background: #ffd39b; cursor: pointer; }
.workspace-help-history:hover { background: #f7c181; }
.workspace-sidebar.is-collapsed .workspace-help-wrap { flex-direction: column; }
.workspace-sidebar.is-collapsed .workspace-help-history { width: 100%; }
.workspace-help-badge { min-width: 20px; height: 20px; padding: 1px 5px; border: 2px solid #fff; border-radius: 10px; color: #fff; background: #263449; font-size: 10px; line-height: 14px; text-align: center; }

.workspace-sidebar.is-collapsed .workspace-brand img,
.workspace-sidebar.is-collapsed .workspace-nav-group,
.workspace-sidebar.is-collapsed .workspace-nav-label,
.workspace-sidebar.is-collapsed .workspace-external-mark { display: none; }
.workspace-sidebar.is-collapsed .workspace-collapse { margin: auto; }
.workspace-sidebar.is-collapsed .workspace-nav-item,
.workspace-sidebar.is-collapsed .workspace-profile { justify-content: center; }
.workspace-sidebar.is-collapsed .workspace-profile-control { display: flex; flex-direction: column; gap: 2px; }
.workspace-sidebar.is-collapsed .workspace-profile-copy { display: block; max-width: 100%; text-align: center; }
.workspace-sidebar.is-collapsed .workspace-profile-logout { width: 100%; height: 28px; }
.workspace-sidebar.is-collapsed .workspace-help-label { display: none; }

.workspace-main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; }
.workspace-tabs-shell { height: 43px; flex: 0 0 43px; display: flex; align-items: stretch; border-bottom: 1px solid var(--workspace-line); background: #fff; }
.workspace-tabs { min-width: 0; flex: 1; display: flex; align-items: flex-end; gap: 0; padding: 4px 4px 0; overflow-x: hidden; overflow-y: hidden; }
.workspace-tab { height: 36px; max-width: 230px; flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 0 8px; border: 0; border-right: 1px solid var(--workspace-line); border-radius: 0; color: #536277; background: transparent; box-shadow: none; cursor: pointer; font-size: 13px; white-space: nowrap; }
.workspace-tab[hidden] { display: none; }
.workspace-tab:hover { color: var(--workspace-navy); background: #f5f8fc; }
.workspace-tab.is-active { color: var(--workspace-primary); background: #fff; box-shadow: inset 0 -2px var(--workspace-primary); }
.workspace-tab-title { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.workspace-tab-close { width: 18px; height: 18px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; color: #98a3b2; background: transparent; cursor: pointer; font-size: 12px; }
.workspace-tab-close:hover { color: var(--workspace-navy); background: #e4e9ef; }
.workspace-tab-overflow-wrap { position: relative; width: 38px; flex: 0 0 38px; display: flex; align-items: center; justify-content: center; }
.workspace-tab-overflow-wrap[hidden] { display: none; }
.workspace-tab-overflow-button { width: 30px; height: 30px; padding: 0 0 5px; border: 0; border-radius: 5px; color: #66758a; background: transparent; cursor: pointer; font-size: 17px; letter-spacing: 1px; line-height: 1; }
.workspace-tab-overflow-button:hover,
.workspace-tab-overflow-button[aria-expanded="true"] { color: var(--workspace-primary); background: var(--workspace-primary-soft); }
.workspace-tab-overflow-menu { position: absolute; top: calc(100% + 3px); right: 4px; z-index: 120; width: min(280px, calc(100vw - 20px)); max-height: min(420px, calc(100vh - 90px)); padding: 4px; overflow-y: auto; border: 1px solid var(--workspace-line); border-radius: 7px; background: #fff; box-shadow: var(--workspace-shadow); }
.workspace-tab-overflow-menu[hidden] { display: none; }
.workspace-nav,
.workspace-tab-overflow-menu {
  scrollbar-color: #bac7d6 transparent;
  scrollbar-width: thin;
}
:is(.workspace-nav, .workspace-tab-overflow-menu)::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
:is(.workspace-nav, .workspace-tab-overflow-menu)::-webkit-scrollbar-track { background: transparent; }
:is(.workspace-nav, .workspace-tab-overflow-menu)::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #bac7d6;
}
:is(.workspace-nav, .workspace-tab-overflow-menu)::-webkit-scrollbar-thumb:hover { background: #8fa1b5; }
.workspace-tab-overflow-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.workspace-tab-overflow-item { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 0; border-radius: 5px; color: var(--workspace-text); background: transparent; cursor: pointer; text-align: left; }
.workspace-tab-overflow-item:hover,
.workspace-tab-overflow-item.is-active { color: var(--workspace-primary); background: var(--workspace-primary-soft); }
.workspace-tab-overflow-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tab-overflow-close { width: 28px; height: 28px; flex: 0 0 28px; padding: 0; border: 0; border-radius: 5px; color: #8a96a7; background: transparent; cursor: pointer; }
.workspace-tab-overflow-close:hover { color: var(--workspace-navy); background: #e4e9ef; }
.workspace-tab-actions { display: flex; align-items: center; gap: 3px; padding: 8px; border-left: 1px solid #edf0f4; }
.workspace-icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--workspace-line); border-radius: 9px; color: #526176; background: #fff; cursor: pointer; }
.workspace-icon-button:hover { color: var(--workspace-primary); border-color: #b9d4f0; background: var(--workspace-primary-soft); }
#workspaceCloseAll { border: 0; background: transparent; box-shadow: none; color: #718096; }
#workspaceCloseAll:hover { background: #f3f6f8; color: #35465c; }
#workspaceCloseAll:focus-visible { outline: 2px solid #81afe3; outline-offset: 2px; }

.workspace-panels { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.workspace-panel { position: absolute; inset: 0; display: block; visibility: hidden; pointer-events: none; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.workspace-panel.is-active { visibility: visible; pointer-events: auto; }
.workspace-frame { width: 100%; height: 100%; display: block; border: 0; background: #fff; }
.workspace-load-state { position: absolute; inset: 0; z-index: 2; display: grid; align-content: center; justify-items: center; gap: 10px; color: var(--workspace-muted); background: var(--workspace-page); }
.workspace-load-state.is-error { color: var(--workspace-danger); }
.workspace-load-state[hidden] { display: none; }
.workspace-load-state p { margin: 0; }
.workspace-load-state-actions { display: flex; gap: 8px; }
.workspace-load-state button { padding: 8px 13px; border: 1px solid var(--workspace-line); border-radius: 8px; background: #fff; cursor: pointer; }
.workspace-spinner { width: 26px; height: 26px; border: 3px solid #dce5eb; border-top-color: var(--workspace-primary); border-radius: 50%; animation: workspace-spin .75s linear infinite; }
@keyframes workspace-spin { to { transform: rotate(360deg); } }

.workspace-context-menu { position: fixed; z-index: 110; width: 250px; padding: 5px; border: 1px solid var(--workspace-line); border-radius: 10px; background: #fff; box-shadow: var(--workspace-shadow); }
.workspace-context-menu[hidden] { display: none; }
.workspace-context-menu button { width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; color: var(--workspace-text); background: transparent; cursor: pointer; text-align: left; }
.workspace-context-menu button:hover { background: #f3f6f8; }
.workspace-context-menu button[hidden] { display: none; }

.workspace-dialog-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: rgba(8, 26, 51, .42); }
.workspace-dialog-backdrop[hidden] { display: none; }
.workspace-dialog { width: min(430px, 100%); padding: 22px; border-radius: 14px; background: #fff; box-shadow: 0 26px 70px rgba(8, 26, 51, .26); }
.workspace-dialog h2 { margin: 0 0 8px; color: var(--workspace-navy); font-size: 20px; font-weight: 500; }
.workspace-dialog p { margin: 0; color: var(--workspace-muted); }
.workspace-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.workspace-dialog-actions button { padding: 9px 14px; border: 1px solid var(--workspace-line); border-radius: 8px; background: #fff; cursor: pointer; }
.workspace-dialog-actions button.is-primary { color: #fff; border-color: var(--workspace-primary); background: var(--workspace-primary); }

.workspace-backdrop { display: none; }

button:focus-visible { outline: 3px solid rgba(12, 89, 174, .22); outline-offset: 2px; }

@media (max-width: 768px) {
  .workspace-layout { padding-top: 52px; }
  .workspace-mobile-bar { position: fixed; inset: 0 0 auto; z-index: 50; height: 52px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--workspace-line); background: #fff; }
  .workspace-mobile-bar img { min-width: 0; width: 150px; max-height: 36px; margin: auto; object-fit: contain; }
  .workspace-sidebar,
  .workspace-sidebar.is-collapsed { position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; width: min(310px, calc(100vw - 48px)); min-width: 0; transform: translateX(-105%); box-shadow: 18px 0 42px rgba(8, 26, 51, .2); }
  .workspace-sidebar.is-open { transform: translateX(0); }
  .workspace-sidebar.is-collapsed .workspace-brand img,
  .workspace-sidebar.is-collapsed .workspace-nav-group,
  .workspace-sidebar.is-collapsed .workspace-nav-label,
  .workspace-sidebar.is-collapsed .workspace-help-label,
  .workspace-sidebar.is-collapsed .workspace-external-mark { display: initial; }
  .workspace-sidebar.is-collapsed .workspace-nav-item,
  .workspace-sidebar.is-collapsed .workspace-profile { justify-content: flex-start; }
  .workspace-sidebar.is-collapsed .workspace-profile-control { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 4px; }
  .workspace-sidebar.is-collapsed .workspace-profile-logout { width: 30px; height: 30px; }
  .workspace-backdrop { position: fixed; inset: 0; z-index: 60; display: block; background: rgba(8, 26, 51, .42); }
  .workspace-backdrop[hidden] { display: none; }
  .workspace-main { width: 100%; }
  .workspace-tabs-shell { height: 51px; flex-basis: 51px; }
  .workspace-tabs { padding-top: 5px; }
  .workspace-tab { height: 38px; max-width: 190px; }
  .workspace-tab-actions { padding: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.workspace-invoices-badge {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: #fff0f0;
  color: #d32f2f;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.workspace-orders-badge {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: #fff3e6;
  color: #c86a00;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.dx-icon-workspace-dashboard, .dx-icon-workspace-receipt, .dx-icon-workspace-monitor, .dx-icon-workspace-calculator {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--workspace-custom-icon) center / contain no-repeat;
  mask: var(--workspace-custom-icon) center / contain no-repeat;
}
.dx-icon-workspace-dashboard { --workspace-custom-icon: url("icons/dashboard.svg"); }
.dx-icon-workspace-receipt { --workspace-custom-icon: url("icons/receipt.svg"); }
.dx-icon-workspace-monitor { --workspace-custom-icon: url("icons/monitor.svg"); }
.dx-icon-workspace-calculator { --workspace-custom-icon: url("icons/calculator.svg"); }
.dx-icon-workspace-dashboard::before, .dx-icon-workspace-receipt::before, .dx-icon-workspace-monitor::before, .dx-icon-workspace-calculator::before { content: none; }
.workspace-nav-item[data-route-id="cashscreen"] .workspace-nav-label {
  font-weight: 700;
}
.workspace-nav-split { display:flex; align-items:center; min-width:0; }
.workspace-nav-split > .workspace-nav-item { flex:1; min-width:0; width:auto; }
.workspace-nav-internal { display:inline-flex; align-items:center; justify-content:center; flex:0 0 28px; width:28px; height:28px; margin:0 4px 0 0; padding:0; border:0; border-radius:8px; background:transparent; color:#7890a8; cursor:pointer; transition:background-color .15s,color .15s; }
.workspace-nav-internal svg { display:block; pointer-events:none; }
.workspace-nav-internal:hover { background:#eaf2fb; color:#0c59ae; }
.workspace-nav-internal:active { background:#dce9f8; }
.workspace-nav-internal:focus-visible { outline:2px solid #a9c5e8; outline-offset:2px; }

/* Full-workspace modal used for receipt lists opened from the cashier workplace. */
.workspace-frame-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.workspace-frame-modal[hidden] { display: none; }
.workspace-frame-modal-backdrop { position: absolute; inset: 0; background: #0f1f2e80; }
.workspace-frame-modal-dialog { position: relative; display: flex; flex-direction: column; width: min(1360px, 100%); height: min(920px, 100%); background: #fff; border-radius: 12px; box-shadow: 0 24px 60px #0f1f2e40; overflow: hidden; }
.workspace-frame-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #e3ebf4; background: #f8fbfe; }
.workspace-frame-modal-header h2 { margin: 0; font-size: 15px; font-weight: 600; color: #203951; }
.workspace-frame-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #607891; cursor: pointer; }
.workspace-frame-modal-close:hover { background: #eaf2fb; color: #0c59ae; }
.workspace-frame-modal-close:focus-visible { outline: 2px solid #a9c5e8; outline-offset: 2px; }
.workspace-frame-modal-dialog iframe { flex: 1; width: 100%; min-height: 0; border: 0; background: #fff; }
@media (max-width: 900px) {
  .workspace-frame-modal { padding: 0; }
  .workspace-frame-modal-dialog { width: 100%; height: 100%; border-radius: 0; }
}
