:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #172033;
  --muted: #65728a;
  --line: #d9e0ea;
  --primary: #181818;
  --primary-dark: #2e2e2e;
  --danger: #ff1100;
  --danger-bg: #fff1f0;
  --success: #000000;
  --success-bg: #edf8ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

.app-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-layout.sidebar-collapsed {
  grid-template-columns: 128px minmax(0, 1fr);
}
*** End of File

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 24px 18px;
  overflow: hidden;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 100px 36px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  min-width: 0;
  overflow: hidden;
}

.brand-text {
  display: grid;
  grid-column: 1 / -1;
  justify-items: center;
  min-width: 0;
  text-align: center;
  word-break: break-word;
}

.brand-text strong {
  max-width: 118px;
  line-height: 1.1;
}

.brand-text small {
  max-width: 118px;
  line-height: 1.1;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 100px;
  height: 100px;
  min-width: 100px;
  place-items: center;
  background: var(--primary);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  font-size: 17px;
}

.sidebar-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  margin-left: 0;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 0;
  line-height: 1;
}

.sidebar-toggle::before {
  content: "\f0c9";
  font-family: "Font Awesome 6 Free";
  font-size: 18px;
  font-weight: 900;
}

.sidebar-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sidebar-toggle {
  display: none;
}

.sidebar-menu {
  display: grid;
  gap: 14px;
}

.sidebar-menu-group {
  display: grid;
  gap: 5px;
}

.sidebar-menu-group-title {
  display: block;
  padding: 0 12px;
  color: #7b8496;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sidebar-menu-group-links {
  display: grid;
  gap: 4px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
  text-decoration: none;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: #e9e9e9;
  color: var(--primary);
}

.menu-icon {
  display: grid;
  width: 22px;
  min-width: 22px;
  place-items: center;
  color: currentColor;
  font-size: 0;
}

.menu-icon::before {
  font-family: "Font Awesome 6 Free";
  font-size: 14px;
  font-weight: 900;
}

.sidebar-menu .menu-proposals .menu-icon::before {
  content: "\f15c";
}

.sidebar-menu .menu-users .menu-icon::before {
  content: "\f0c0";
}

.sidebar-menu .menu-customers .menu-icon::before {
  content: "\f2bd";
}

.sidebar-menu .menu-products .menu-icon::before {
  content: "\f466";
}

.sidebar-menu .menu-stock .menu-icon::before {
  content: "\f468";
}

.sidebar-menu .menu-assets .menu-icon::before {
  content: "\f1ad";
}

.sidebar-menu .menu-reports .menu-icon::before {
  content: "\f080";
}

.sidebar-menu .menu-settings .menu-icon::before {
  content: "\f013";
}

.menu-text,
.brand-text {
  transition: opacity 160ms ease;
}

.sidebar-collapsed .sidebar {
  padding-left: 14px;
  padding-right: 14px;
}

.sidebar-collapsed .sidebar-brand {
  display: grid;
  grid-template-columns: 100px;
  width: 100%;
  justify-content: center;
  justify-items: center;
  gap: 10px;
  margin-bottom: 18px;
  overflow: hidden;
}

.sidebar-collapsed .menu-text {
  display: none;
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.sidebar-collapsed .sidebar-menu {
  gap: 10px;
}

.sidebar-collapsed .sidebar-menu-group {
  justify-items: center;
}

.sidebar-collapsed .sidebar-menu-group-title {
  display: none;
}

.sidebar-collapsed .brand-text {
  display: grid;
  opacity: 1;
  pointer-events: auto;
  position: static;
}

.sidebar-collapsed .brand-mark {
  width: 100px;
  min-width: 100px;
  height: 100px;
  background: #ffffff;
}

.sidebar-collapsed .brand-mark img {
  width: 100px;
  height: 100px;
}

.sidebar-collapsed .sidebar-toggle {
  position: static;
  margin-left: 0;
}

.sidebar-collapsed .sidebar-menu a {
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  /*background: linear-gradient(135deg, #ffffff 0%, #f3faf7 100%);*/
  padding: 18px 20px;
  /*box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);*/
}

.app-header h1 {
  font-size: 30px;
}

.app-header-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.language-switch span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.language-switch a {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
  text-decoration: none;
}

.language-switch a:hover,
.language-switch a.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.page-header,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-header {
  margin-bottom: 22px;
}

.app-header + .page-header h1,
.app-header + .page-header .eyebrow {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 20px;
}

.secondary-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.proposal-form,
.proposal-list {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
}

.proposal-modal .proposal-form {
  border: 0;
  padding: 0;
  box-shadow: none;
}

.proposal-list {
  margin-top: 24px;
}

.list-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.form-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
}

.form-section:last-of-type {
  border-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.grid.one {
  grid-template-columns: 1fr;
}

.grid .full-field {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  padding: 8px 10px;
}

textarea {
  resize: vertical;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.plain-textarea {
  min-height: 120px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(29, 111, 95, 0.14);
}

.items {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.55fr) minmax(0, 0.7fr) minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 1fr) 50px;
  column-gap: 0;
  row-gap: 8px;
  align-items: end;
  width: 100%;
}

.item-row > label {
  gap: 4px;
}

.item-row > label:not(:first-child) input {
  border-left-width: 0;
}

.item-row > label:not(:last-of-type) input {
}

.image-input {
  padding: 7px;
  color: transparent;
  font-size: 13px;
}

.image-input::file-selector-button {
  margin-right: 0;
  color: var(--text);
}

.image-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px 28px;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--line);
  overflow: hidden;
}

.image-field .image-input {
  border: 0;
  height: 34px;
}

.image-preview {
  display: block;
  width: 100%;
  height: 34px;
  border-left: 1px solid var(--line);
  background: #f7f9fc;
  object-fit: cover;
  opacity: 0;
}

.image-preview.is-visible {
  opacity: 1;
}

.item-row.edit-row {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.55fr) minmax(0, 0.7fr) minmax(0, 0.9fr) minmax(0, 0.8fr);
}

.button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  padding: 12px 16px;
}

.button::before,
.table-button::before,
.secondary-link::before {
  display: inline-block;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 7px;
}

.button.primary::before,
.button[data-open-proposal]::before {
  content: "\f067";
}

.button[type="submit"]::before {
  content: "\f0c7";
}

.button.ghost[data-add-item]::before {
  content: "\f067";
}

.button.remove::before {
  content: "\f1f8";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 6px;
}

.secondary-link::before {
  content: "\f1c0";
}

.button.primary {
  width: 100%;
  margin-top: 22px;
  background: var(--primary);
  color: #ffffff;
  font-size: 16px;
}

.button.header-button {
  width: auto;
  margin-top: 0;
  white-space: nowrap;
}

.button.primary:hover,
.button.ghost:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.button.ghost {
  border: 1px solid var(--primary);
  background: #ffffff;
  color: var(--primary);
}

.button.remove {
  background: var(--danger-bg);
  color: var(--danger);
  padding-left: 8px;
  padding-right: 8px;
}

.alert {
  margin-bottom: 16px;
  padding: 14px 16px;
}

.alert p {
  margin: 0 0 6px;
}

.alert p:last-child {
  margin-bottom: 0;
}

.alert.success {
  background: var(--success-bg);
  border: 1px solid #bfe8c7;
  color: var(--success);
}

.alert.error {
  background: var(--danger-bg);
  border: 1px solid #ffd0cc;
  color: var(--danger);
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.empty {
  color: var(--muted);
}

.proposal-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
}

.proposal-modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 24px;
}

.action-modal-panel {
  width: min(1240px, 100%);
}

.modal-loading {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 18px;
}

.detail-hero h3 {
  margin: 0 0 6px;
  font-size: 26px;
}

.detail-hero p {
  margin: 0;
  color: var(--muted);
}

.detail-total {
  color: var(--primary);
  font-size: 26px;
  font-weight: 800;
  white-space: nowrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-grid > div {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 12px;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.detail-grid strong {
  color: var(--text);
  font-size: 15px;
}

.detail-block {
  margin-top: 18px;
}

.detail-block h3,
.modal-edit-form h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.rich-output {
  min-height: 88px;
  border: 1px solid var(--line);
  padding: 14px;
}

.detail-thumb {
  width: 58px;
  height: 42px;
  object-fit: cover;
}

.totals-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.modal-edit-form {
  border: 0;
  padding: 0;
  box-shadow: none;
}

.modal-items {
  display: grid;
  gap: 8px;
}

.modal-item-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.7fr) minmax(0, 0.7fr) minmax(0, 0.9fr) minmax(0, 0.8fr);
  column-gap: 0;
  row-gap: 8px;
}

.modal-item-row > label:not(:first-of-type) input {
  border-left-width: 0;
}

.modal-item-row > label:not(:last-of-type) input {
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 0;
  line-height: 1;
}

.modal-close::before {
  content: "\f00d";
  font-family: "Font Awesome 6 Free";
  font-size: 18px;
  font-weight: 900;
}

.modal-close:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.row-actions form {
  margin: 0;
}

.table-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
  text-decoration: none;
}

.table-button.view::before {
  content: "\f06e";
}

.table-button.edit::before {
  content: "\f044";
}

.table-button.delete::before {
  content: "\f1f8";
}

.table-button.view {
  border-color: #b8d8ff;
  color: #006eff;
}

.table-button.edit {
  border-color: #bfe8c7;
  color: var(--success);
}

.table-button.delete {
  border-color: #ffd0cc;
  color: var(--danger);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.product-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: #ffffff;
  min-width: 0;
}

.product-card-media {
  display: grid;
  min-height: 54px;
  place-items: center;
  border-right: 1px solid var(--line);
  background: #f7f9fc;
}

.product-card-media img {
  width: 54px;
  height: 54px;
  object-fit: cover;
}

.product-card-media span {
  color: var(--muted);
  font-size: 18px;
}

.product-card-body {
  min-width: 0;
  padding: 6px;
}

.product-card-body p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card-body h3 {
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.15;
}

.product-card-body strong {
  color: var(--primary);
  font-size: 12px;
}

.product-image-field {
  max-width: 360px;
}

.product-view-image {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px solid var(--line);
  background: #f7f9fc;
  margin-top: 8px;
}

.product-view-image img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.product-view-image span {
  color: var(--muted);
  font-size: 34px;
}

@media (max-width: 820px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-layout.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }

  .sidebar-toggle {
    position: static;
  }

  .sidebar-collapsed .sidebar {
    padding: 16px;
  }

  .sidebar-collapsed .sidebar-brand {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .sidebar-collapsed .brand-text {
    opacity: 1;
    pointer-events: auto;
    position: static;
  }

  .sidebar-collapsed .sidebar-toggle {
    position: static;
    margin-left: auto;
  }

  .sidebar-collapsed .sidebar-menu {
    display: none;
  }

  .sidebar-brand {
    margin-bottom: 14px;
  }

  .sidebar-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .sidebar-menu a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .grid,
  .item-row {
    grid-template-columns: 1fr;
  }

  .item-row {
    row-gap: 8px;
  }

  .item-row > label input {
    border-left-width: 1px;
  }

  .page-header,
  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .button.header-button {
    width: 100%;
  }

  .proposal-modal {
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .detail-hero,
  .detail-grid,
  .totals-grid,
  .modal-item-row {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    display: grid;
  }

  .detail-total {
    white-space: normal;
  }

  .modal-item-row > label input {
    border-left-width: 1px;
  }

  h1 {
    font-size: 28px;
  }
}

/* Compact density */
body {
  font-size: 13px;
}

.sidebar {
  padding: 12px 9px;
}

.sidebar-brand {
  gap: 6px;
  margin-bottom: 14px;
}

.brand-mark {
  width: 100px;
  height: 100px;
  font-size: 15px;
}

.sidebar-brand strong {
  font-size: 13px;
}

.sidebar-brand small {
  font-size: 10px;
}

.sidebar-toggle {
  width: 28px;
  height: 28px;
}

.sidebar-menu {
  gap: 4px;
}

.sidebar-menu a {
  gap: 5px;
  min-height: 32px;
  padding: 5px 6px;
}

.shell {
  padding: 16px 0 24px;
}

.page-header,
.section-title-row {
  gap: 8px;
}

.page-header {
  margin-bottom: 11px;
}

.header-actions {
  gap: 7px;
}

.eyebrow {
  margin-bottom: 3px;
  font-size: 11px;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 15px;
}

.proposal-form,
.proposal-list {
  padding: 12px;
}

.proposal-list {
  margin-top: 12px;
}

.form-section {
  padding: 10px 0;
}

.grid {
  gap: 8px;
  margin-top: 8px;
}

label {
  gap: 3px;
  font-size: 12px;
}

input,
select,
textarea {
  padding: 4px 5px;
}

.items {
  gap: 4px;
  margin-top: 5px;
}

.item-row,
.modal-item-row {
  row-gap: 4px;
}

.image-input {
  padding: 4px;
  font-size: 11px;
}

.image-field .image-input,
.image-preview {
  height: 24px;
}

.button {
  padding: 6px 8px;
}

.button.primary {
  margin-top: 11px;
  font-size: 13px;
}

.button.remove {
  padding-left: 4px;
  padding-right: 4px;
}

.alert {
  margin-bottom: 8px;
  padding: 7px 8px;
}

.table-wrap {
  margin-top: 8px;
}

th,
td {
  padding: 7px 5px;
}

th {
  font-size: 11px;
}

.proposal-modal {
  padding: 14px;
}

.modal-panel {
  max-height: calc(100vh - 28px);
  padding: 12px;
}

.modal-header {
  gap: 8px;
  margin-bottom: 9px;
}

.modal-close {
  width: 28px;
  height: 28px;
}

.detail-hero {
  gap: 9px;
  padding: 9px;
}

.detail-hero h3,
.detail-total {
  font-size: 18px;
}

.detail-grid {
  gap: 5px;
  margin-top: 7px;
}

.detail-grid > div {
  padding: 6px;
}

.detail-grid span {
  font-size: 10px;
}

.detail-grid strong {
  font-size: 12px;
}

.detail-block {
  margin-top: 9px;
}

.detail-block h3,
.modal-edit-form h3 {
  margin-bottom: 6px;
  font-size: 14px;
}

.rich-output {
  min-height: 44px;
  padding: 7px;
}

.detail-thumb {
  width: 42px;
  height: 28px;
}

.modal-items,
.row-actions {
  gap: 4px;
}

.table-button {
  min-height: 24px;
  font-size: 11px;
  padding: 4px 5px;
}

.app-layout {
  grid-template-columns: 210px minmax(0, 1fr);
}

.app-layout.sidebar-collapsed {
  grid-template-columns: 128px minmax(0, 1fr);
}

.item-row .image-field,
.modal-item-row .image-field {
  height: 24px;
}

.item-row .image-field .image-input,
.item-row .image-preview,
.modal-item-row .image-field .image-input,
.modal-item-row .image-preview {
  height: 22px;
}

.item-row .button.remove,
.modal-item-row .button.remove {
  height: 24px;
  min-height: 24px;
  padding-top: 0;
  padding-bottom: 0;
}

.image-field {
  position: relative;
}

.image-field::before {
  content: "\f03e";
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 2;
  color: var(--text);
  font-family: "Font Awesome 6 Free";
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
  transform: translateY(-50%);
}

.image-input {
  cursor: pointer;
}

.image-input::file-selector-button {
  width: 28px;
  height: 18px;
  margin-right: 0;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 0;
}

.image-view-button {
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
  border-left: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--primary);
  cursor: pointer;
}

.image-remove-button {
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--danger-bg);
  color: var(--danger);
  cursor: pointer;
}

.image-remove-button::before {
  content: "\f1f8";
  font-family: "Font Awesome 6 Free";
  font-size: 13px;
  font-weight: 900;
}

.image-view-button::before {
  content: "\f06e";
  font-family: "Font Awesome 6 Free";
  font-size: 16px;
  font-weight: 900;
}

.image-preview.is-visible + .image-view-button {
  display: grid;
  place-items: center;
}

.image-preview.is-visible ~ .image-remove-button {
  display: grid;
  place-items: center;
}

.image-preview.is-visible {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 24px;
}

.image-lightbox.is-open {
  display: grid;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 16, 37, 0.72);
  cursor: pointer;
}

.image-lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: min(1100px, 94vw);
  max-height: 90vh;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 34px 10px 10px;
}

.image-lightbox-close {
  position: absolute;
  top: 4px;
  right: 4px;
}

.image-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 44px);
  object-fit: contain;
}

.items {
  overflow-x: auto;
  gap: 0;
}

.item-row,
.item-header {
  min-width: 720px;
  grid-template-columns: minmax(90px, 0.9fr) minmax(150px, 1.55fr) minmax(70px, 0.7fr) minmax(90px, 0.9fr) minmax(80px, 0.8fr) minmax(110px, 1fr) 50px;
}

.item-header {
  display: grid;
  column-gap: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.item-header span {
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 4px 5px;
}

.item-header span:not(:first-child) {
  border-left-width: 0;
}

.item-header.edit-row,
.item-row.edit-row {
  min-width: 620px;
  grid-template-columns: minmax(90px, 0.9fr) minmax(150px, 1.55fr) minmax(70px, 0.7fr) minmax(90px, 0.9fr) minmax(80px, 0.8fr);
}

.modal-item-row {
  min-width: 620px;
  grid-template-columns: minmax(90px, 0.9fr) minmax(150px, 1.7fr) minmax(70px, 0.7fr) minmax(90px, 0.9fr) minmax(80px, 0.8fr);
}

.item-row {
  row-gap: 0;
}

.item-row + .item-row input,
.item-row + .item-row select,
.item-row + .item-row .image-field,
.item-row + .item-row .button.remove {
  border-top-width: 0;
}

.item-row > label input,
.item-row > label select,
.modal-item-row > label input {
  border-left-width: 0;
}

.item-row > label:first-of-type input,
.item-row > label:first-of-type select,
.modal-item-row > label:first-of-type input {
  border-left-width: 1px;
}

.product-code-select {
  display: none;
}

.product-code-search {
  height: 24px;
  padding: 4px 5px;
}

.item-row .button.remove {
  display: grid;
  width: 50px;
  min-width: 50px;
  place-items: center;
  border: 1px solid var(--line);
  border-left-width: 0;
  padding: 0;
  font-size: 0;
}

.item-row .button.remove::before {
  margin-right: 0;
  font-size: 13px;
}

.button.remove,
.image-remove-button {
  background: #ffffff;
}

.currency-add-form,
.currency-row-form,
.unit-add-form,
.unit-row-form {
  display: grid;
  align-items: center;
  column-gap: 0;
}

.currency-add-form,
.currency-row-form {
  grid-template-columns: 90px minmax(160px, 1fr) 90px 70px 90px 130px;
}

.unit-add-form,
.unit-row-form {
  grid-template-columns: 100px minmax(180px, 1fr) 70px 90px 130px;
}

.warehouse-add-form,
.warehouse-row-form {
  display: grid;
  grid-template-columns: 110px minmax(160px, 1fr) minmax(140px, 0.8fr) 130px minmax(220px, 1.5fr) 65px 80px 130px;
  align-items: center;
  min-width: 1120px;
}

.location-add-form,
.location-row-form {
  display: grid;
  grid-template-columns: 110px minmax(170px, 1fr) minmax(170px, 1fr) minmax(220px, 1.2fr) 65px 80px 130px;
  align-items: center;
  min-width: 1030px;
}

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

.location-add-form input,
.location-add-form select,
.location-row-form input,
.location-row-form select {
  height: 34px;
  border-left-width: 0;
}

.location-add-form input:first-of-type,
.location-row-form input[name="code"] {
  border-left-width: 1px;
}

.location-add-form .currency-active,
.location-row-form .currency-active,
.location-add-form .currency-save-button,
.location-row-form .row-actions,
.location-row-form .table-button {
  height: 34px;
  min-height: 34px;
}

.location-table {
  min-width: 1030px;
}

.location-table td {
  padding: 0;
}

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

.warehouse-add-form input,
.warehouse-row-form input {
  height: 34px;
  border-left-width: 0;
}

.warehouse-add-form input:first-of-type,
.warehouse-row-form input[name="code"] {
  border-left-width: 1px;
}

.warehouse-add-form .currency-active,
.warehouse-row-form .currency-active {
  height: 34px;
}

.warehouse-add-form .currency-save-button,
.warehouse-row-form .row-actions,
.warehouse-row-form .table-button {
  height: 34px;
  min-height: 34px;
}

.warehouse-table {
  min-width: 1120px;
}

.asset-table {
  min-width: 1180px;
}

.asset-group-panel {
  margin-bottom: 18px;
}

.asset-group-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(130px, .7fr) minmax(180px, 1fr) minmax(220px, 1.2fr) 90px 54px auto auto;
  gap: 8px;
  align-items: center;
  margin: 12px 0 16px;
}

.asset-group-form input,
.asset-group-form select,
.asset-group-form .button {
  height: 36px;
  min-height: 36px;
}

.asset-group-form .checkbox-label.compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.asset-group-form .checkbox-label.compact input {
  width: 14px;
  height: 14px;
  min-height: 14px;
}

.asset-group-form .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  white-space: nowrap;
}

.asset-group-form .button.primary {
  width: auto;
  margin-top: 0;
  font-size: 13px;
}

.asset-group-tree,
.asset-group-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.asset-group-children {
  margin-left: 24px;
  padding-left: 14px;
  border-left: 1px solid #d8e3ee;
}

.asset-group-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  margin: 7px 0;
  border: 1px solid #d5e1ec;
  background: #fbfdfc;
}

.asset-group-node span:first-child {
  display: grid;
  gap: 2px;
}

.asset-group-node strong {
  color: #12213a;
}

.asset-group-node small {
  color: #67738a;
}

.asset-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.asset-group-actions form {
  margin: 0;
}

.asset-group-actions em {
  color: #b45309;
  font-style: normal;
  font-weight: 700;
}

.asset-form .grid {
  align-items: start;
}

.asset-form input:not([type="checkbox"]):not([type="file"]),
.asset-form select:not([multiple]) {
  height: 36px;
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.asset-form select[multiple] {
  height: 92px;
  min-height: 92px;
  padding: 6px 8px;
}

.asset-form .checkbox-label {
  min-height: 36px;
}

.asset-form .field-help {
  margin-top: -2px;
}

.asset-property-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.asset-property-toolbar p {
  margin: 0;
}

.asset-property-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.asset-property-table {
  min-width: 720px;
}

.asset-property-table th,
.asset-property-table td {
  padding: 0;
}

.asset-property-table th {
  padding: 8px 10px;
}

.asset-property-table th:last-child,
.asset-property-table td:last-child {
  width: 110px;
  text-align: center;
}

.asset-property-table input {
  height: 36px;
  border-width: 0 1px 1px 0;
}

.asset-property-table td:first-child input {
  border-left-width: 1px;
}

.asset-property-row .button.remove {
  width: 100%;
  height: 36px;
  min-height: 36px;
  border-top-width: 0;
}

.asset-file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.asset-file-toolbar p {
  margin: 0;
}

.asset-existing-files {
  margin-top: 12px;
}

.asset-existing-file-list {
  display: grid;
  gap: 8px;
}

.asset-existing-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #d5e1ec;
  background: #f8fbfa;
}

.asset-existing-file span:first-child {
  display: grid;
  gap: 2px;
}

.asset-existing-file strong {
  color: #1d725f;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.asset-existing-file a {
  color: #12213a;
  font-weight: 700;
  text-decoration: none;
}

.asset-existing-file small {
  color: #67738a;
}

.asset-file-remove-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #b42318;
  font-weight: 700;
}

.asset-file-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.asset-file-table {
  min-width: 900px;
}

.asset-file-table th,
.asset-file-table td {
  padding: 0;
}

.asset-file-table th {
  padding: 8px 10px;
}

.asset-file-table th:first-child,
.asset-file-table td:first-child {
  width: 210px;
}

.asset-file-table th:last-child,
.asset-file-table td:last-child {
  width: 110px;
  text-align: center;
}

.asset-file-table input,
.asset-file-table select {
  height: 36px;
  min-height: 36px;
  border-width: 0 1px 1px 0;
}

.asset-file-table td:first-child select {
  border-left-width: 1px;
}

.asset-file-row .button.remove {
  width: 100%;
  height: 36px;
  min-height: 36px;
  border-top-width: 0;
}

.empty.compact {
  margin: 0;
  padding: 8px 10px;
}

.warehouse-table td {
  padding: 0;
}

.currency-add-form {
  margin-top: 8px;
  min-width: 700px;
}

.unit-add-form {
  margin-top: 8px;
  min-width: 570px;
}

.currency-add-form input[name="name"],
.currency-add-form input[name="symbol"],
.currency-add-form input[name="sort_order"],
.currency-row-form input[name="name"],
.currency-row-form input[name="symbol"],
.currency-row-form input[name="sort_order"],
.unit-add-form input[name="name"],
.unit-add-form input[name="sort_order"],
.unit-row-form input[name="name"],
.unit-row-form input[name="sort_order"] {
  border-left-width: 0;
}

.currency-active {
  display: flex;
  height: 24px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-left-width: 0;
  background: #ffffff;
  padding: 0 5px;
  font-size: 11px;
}

.currency-active input {
  width: auto;
  margin: 0;
}

.currency-save-button {
  height: 24px;
  border-left-width: 0;
  white-space: nowrap;
}

.currency-table,
.unit-table {
  min-width: 700px;
}

.unit-table {
  min-width: 570px;
}

.currency-table td,
.unit-table td {
  padding: 0;
}

.currency-row-form .row-actions,
.unit-row-form .row-actions {
  height: 24px;
  gap: 0;
}

.currency-row-form .table-button,
.unit-row-form .table-button {
  height: 24px;
  min-height: 24px;
  flex: 1;
  border-left-width: 0;
}

.table-button.report::before {
  content: "\f080";
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.active {
  background: #e8fff0;
  color: #0fb100;
}

.status-badge.passive {
  background: #f1f3f5;
  color: #6b7280;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-modal-panel {
  width: min(1220px, 100%);
}

.compact-modal-panel {
  width: min(760px, 100%);
}

.sticky-modal-actions {
  position: sticky;
  bottom: -24px;
  z-index: 3;
  margin: 0 -24px -24px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 14px 24px 24px;
}

.sticky-modal-actions .button {
  width: 100%;
}

.calculated-field,
.stock-current {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 8px 10px;
}

.calculated-field span,
.stock-current span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.calculated-field strong,
.stock-current strong {
  color: var(--primary);
  font-size: 19px;
}

.stock-current {
  margin-bottom: 16px;
}

.cell-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.stock-badge,
.movement-type {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stock-badge + .stock-badge {
  margin-left: 4px;
}

.stock-badge.success,
.movement-type.in,
.movement-type.opening {
  background: #f3f3f3;
  color: #4cc51b;
}

.stock-badge.warning,
.movement-type.adjustment {
  background: #fff4d6;
  color: #946200;
}

.stock-badge.danger,
.movement-type.out {
  background: #ebebeb;
  color: #ff1200;
}

.stock-badge.muted {
  background: #eef1f4;
  color: #667085;
}

.table-button.stock::before {
  content: "\f1b2";
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.product-detail-layout .detail-grid {
  margin-top: 0;
}

.stock-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.stock-metrics article,
.value-cards article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.stock-metrics span,
.value-cards span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stock-metrics strong {
  color: var(--primary);
  font-size: 29px;
}

.stock-metrics small {
  color: var(--muted);
}

.stock-metrics .metric-warning {
  border-top: 3px solid #d69e00;
}

.stock-metrics .metric-danger {
  border-top: 3px solid #b42318;
}

.value-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.value-cards article {
  box-shadow: none;
}

.value-cards strong {
  color: var(--primary);
  font-size: 20px;
}

.stock-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(150px, 1fr)) auto auto;
  gap: 8px;
  margin-top: 16px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.asset-report-grid {
  gap: 14px;
}

.asset-report-card {
  display: grid;
  gap: 14px;
  align-content: space-between;
  min-height: 185px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 16px;
}

.asset-report-card h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.asset-report-card p:not(.eyebrow) {
  margin: 0 0 10px;
  color: var(--muted);
}

.asset-report-card strong {
  color: var(--primary);
}

.asset-report-card .button.primary {
  width: auto;
  margin-top: 0;
  justify-self: start;
  font-size: 13px;
}

.summary-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.summary-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.summary-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.summary-list strong {
  color: var(--primary);
}

@media (max-width: 980px) {
  .asset-group-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .stock-metrics,
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .stock-metrics,
  .report-grid,
  .stock-filter-form {
    grid-template-columns: 1fr;
  }

  .page-header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
}

.checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: end;
  min-height: 34px;
  gap: 8px;
}

.checkbox-label input {
  width: auto;
}

.report-template-panel {
  margin-bottom: 22px;
}

.report-template-new,
.report-template-list,
.report-open-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-template-new input {
  min-width: 240px;
}

.report-template-list {
  flex-wrap: wrap;
  margin-top: 18px;
}

.inline-delete-form {
  display: inline-flex;
  margin: 0;
}

.report-open-form select {
  min-width: 190px;
  height: 34px;
  padding: 5px 8px;
}

@media (max-width: 760px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-switch {
    width: 100%;
    justify-content: flex-start;
  }

  .report-template-new {
    width: 100%;
    flex-wrap: wrap;
  }

  .report-template-new input {
    min-width: 0;
    flex: 1;
  }
}

.app-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.current-user {
  display: grid;
  text-align: right;
  line-height: 1.2;
}

.current-user span {
  color: #6b7280;
  font-size: 12px;
}

.header-icon-button {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  height: 34px;
  padding: 0;
  place-items: center;
}

.header-icon-button::before {
  margin-right: 0;
  font-family: "Font Awesome 6 Free";
  font-size: 15px;
  font-weight: 900;
}

.header-logs-button::before {
  content: "\f46d";
}

.header-logout-button::before {
  content: "\f2f5";
}

.pwa-install-button {
  display: none;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  gap: 8px;
  white-space: nowrap;
}

.pwa-install-button.is-visible {
  display: inline-flex;
}

.pwa-install-button::before {
  content: "\f3cd";
  font-family: "Font Awesome 6 Free";
  font-size: 14px;
  font-weight: 900;
}

.pwa-install-button[hidden] {
  display: none !important;
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #edf3f1, #f6f7fb);
  color: #172033;
}

.auth-card {
  position: relative;
  width: min(440px, 100%);
  padding: 32px;
  background: #fff;
  border: 1px solid #d9e0e8;
}

.auth-card h1 {
  margin: 3px 0 22px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-brand div {
  display: grid;
}

.auth-brand small {
  color: #6b7280;
}

.auth-brand-text strong {
  color: #172033;
  font-size: 16px;
  line-height: 1.05;
}

.auth-brand-text small {
  color: #757575;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.auth-language {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  gap: 8px;
}

.auth-language a {
  color: #494949;
  font-weight: 700;
  text-decoration: none;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.auth-links a,
.dev-reset-link a {
  color: #494949;
  font-weight: 600;
}

.dev-reset-link {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  padding: 12px;
  overflow-wrap: anywhere;
  background: #edf7f3;
  border: 1px solid #b9d9cd;
}

@media (max-width: 760px) {
  .app-header-actions {
    justify-content: flex-start;
  }

  .current-user {
    text-align: left;
  }

  .auth-card {
    padding: 24px;
  }
}

@media (max-width: 820px) {
  .app-layout,
  .app-layout.sidebar-collapsed {
    display: block;
    min-width: 0;
  }

  .sidebar,
  .sidebar-collapsed .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .sidebar-brand,
  .sidebar-collapsed .sidebar-brand {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 34px;
    align-items: center;
    justify-content: stretch;
    justify-items: start;
    gap: 10px;
    width: 100%;
    margin: 0 0 10px;
  }

  .brand-mark,
  .sidebar-collapsed .brand-mark {
    width: 30px;
    min-width: 30px;
    height: 30px;
    background: #ffffff;
  }

  .brand-mark img,
  .sidebar-collapsed .brand-mark img {
    width: 30px;
    height: 30px;
    object-fit: contain;
  }

  .brand-text,
  .sidebar-collapsed .brand-text {
    display: grid;
    grid-column: auto;
    justify-items: start;
    text-align: left;
    opacity: 1;
    position: static;
    pointer-events: auto;
  }

  .brand-text strong,
  .brand-text small {
    max-width: none;
    line-height: 1.05;
  }

  .brand-text strong {
    font-size: 12px;
  }

  .brand-text small {
    font-size: 9px;
  }

  .sidebar-toggle,
  .sidebar-collapsed .sidebar-toggle {
    width: 34px;
    height: 34px;
    margin-left: 0;
    justify-self: end;
  }

  .app-layout:not(.sidebar-collapsed) .sidebar-menu {
    display: grid;
    width: 100%;
    gap: 6px;
    overflow: visible;
    padding: 6px 0 2px;
  }

  .app-layout:not(.sidebar-collapsed) .sidebar-menu a {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    justify-content: flex-start;
    min-height: 38px;
    padding: 8px 10px;
    white-space: normal;
  }

  .sidebar-collapsed .sidebar-menu {
    display: none;
  }

  .shell {
    width: 100%;
    min-width: 0;
    padding: 12px;
    overflow-x: hidden;
  }

  .app-header {
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .app-header-actions {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .current-user {
    min-width: 92px;
    text-align: left;
  }

  .header-icon-button {
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    height: 34px;
  }

  .language-switch {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .pwa-install-button.is-visible {
    flex: 0 0 auto;
  }

  .page-header,
  .section-title-row {
    align-items: stretch;
  }

  .page-header-actions,
  .header-actions {
    display: flex;
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
  }

  .page-header-actions .button,
  .header-actions .button,
  .stock-filter-form .button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .app-header h1 {
    font-size: 24px;
  }

  .button,
  button,
  input,
  select,
  textarea {
    max-width: 100%;
  }

  .table-wrap {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .auth-brand .brand-mark {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }

  .auth-brand .brand-mark img {
    width: 30px;
    height: 30px;
  }

  .auth-brand {
    gap: 8px;
    margin-bottom: 22px;
  }
}

.sidebar-menu {
  gap: 14px;
}

.sidebar-menu-group {
  display: grid;
  gap: 5px;
}

.sidebar-menu-group-title {
  display: block;
  padding: 0 12px;
  color: #7b8496;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sidebar-menu-group-links {
  display: grid;
  gap: 4px;
}

.sidebar-collapsed .sidebar-menu {
  gap: 10px;
}

.sidebar-collapsed .sidebar-menu-group {
  justify-items: center;
}

.sidebar-collapsed .sidebar-menu-group-title {
  display: none;
}

@media (max-width: 820px) {
  .app-layout:not(.sidebar-collapsed) .sidebar-menu {
    gap: 12px;
  }

  .app-layout:not(.sidebar-collapsed) .sidebar-menu-group {
    gap: 6px;
  }

  .app-layout:not(.sidebar-collapsed) .sidebar-menu-group-title {
    padding: 8px 10px 0;
  }

  .app-layout:not(.sidebar-collapsed) .sidebar-menu-group-links {
    display: grid;
    gap: 5px;
  }
}

.sidebar-toggle,
.sidebar-collapsed .sidebar-toggle {
  display: none !important;
}

.app-layout.sidebar-collapsed {
  grid-template-columns: 210px minmax(0, 1fr);
}

.sidebar-collapsed .menu-text {
  display: inline;
  opacity: 1;
  pointer-events: auto;
  position: static;
}

.sidebar-collapsed .sidebar-menu-group-title {
  display: block;
  opacity: 1;
  pointer-events: auto;
  position: static;
}
