:root {
  --bg: #07111f;
  --bg-soft: #0d1830;
  --panel: rgba(10, 19, 36, 0.82);
  --panel-strong: rgba(15, 28, 49, 0.96);
  --text: #f3f7ff;
  --muted: #9aa9c2;
  --line: rgba(160, 184, 222, 0.16);
  --line-strong: rgba(160, 184, 222, 0.28);
  --accent: #6ee7c8;
  --accent-deep: #1fb59b;
  --accent-warm: #ff8a5b;
  --success: #73ef9f;
  --danger: #ff8471;
  --shadow: 0 24px 80px rgba(1, 6, 19, 0.42);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(38, 103, 188, 0.2), transparent 28%),
    linear-gradient(180deg, #09111f 0%, #07111f 45%, #050b15 100%);
  overflow-x: hidden;
}

body.app-booting .app-shell,
body.app-booting .mobile-action-bar {
  visibility: hidden;
  opacity: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 100%);
}

.page-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}

.page-glow--one {
  width: 340px;
  height: 340px;
  top: -80px;
  right: -40px;
  background: rgba(110, 231, 200, 0.24);
}

.page-glow--two {
  width: 380px;
  height: 380px;
  left: -120px;
  top: 320px;
  background: rgba(255, 138, 91, 0.18);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 1rem 1rem 3rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.sidebar,
.stat-card,
.panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
  min-height: calc(100vh - 2rem);
  padding: 1.25rem;
  border-radius: 28px;
  background: rgba(7, 16, 31, 0.78);
  backdrop-filter: blur(16px);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.sidebar__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, #5ba4ff 100%);
  color: #05111f;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sidebar__brand h1 {
  margin: 0.1rem 0 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.sidebar__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
}

.sidebar__nav {
  display: grid;
  gap: 0.5rem;
}

.sidebar__link {
  display: block;
  padding: 0.82rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: #d7e2f5;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sidebar__link--button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  cursor: pointer;
}

.sidebar__link:hover,
.sidebar__link--active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
  transform: translateX(2px);
}

.sidebar__card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar__card strong {
  display: block;
  margin-bottom: 0.45rem;
}

.sidebar__user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.sidebar__user-row strong {
  margin-bottom: 0;
  min-width: 0;
}

.sidebar__user-edit {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
}

.sidebar__card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.sidebar__actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.sidebar__footer {
  margin-top: auto;
}

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

.settings-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.settings-item {
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-item--permissions {
  padding: 1rem 1rem 1.05rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03)),
    rgba(10, 16, 30, 0.6);
  border: 1px solid rgba(120, 160, 255, 0.14);
  box-shadow: 0 18px 40px rgba(5, 10, 20, 0.18);
}

.settings-item__label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.3rem;
}

.settings-item--permissions .settings-item__label {
  margin-bottom: 0.22rem;
  font-size: 0.72rem;
}

.settings-item__value {
  display: block;
  font-size: 0.96rem;
}

.settings-integration {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.erply-field-mapping__actions {
  align-items: stretch;
}

.erply-field-mapping__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 156px;
}

#toggleErplyFieldMappingArrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  font-weight: 800;
}

.erply-field-mapping__panel.hidden {
  display: none;
}

.settings-restore-field {
  margin-bottom: 0;
}

.settings-tabs-panel {
  margin-bottom: 0;
}

.settings-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.82rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.settings-tab:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.settings-tab.is-active {
  background: linear-gradient(135deg, rgba(110, 231, 200, 0.18), rgba(91, 164, 255, 0.2));
  border-color: rgba(110, 231, 200, 0.5);
}

.settings-integration p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.sidebar__card-label,
.panel__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
}

.panel__header p,
.activity-item__meta,
.empty-state p,
.stat-card__note,
.sidebar__list {
  color: var(--muted);
}

.panel__eyebrow,
.panel__header > p,
.auth-copy > p {
  display: none;
}

.sidebar__list {
  margin: 0.6rem 0 0;
  padding-left: 1rem;
  line-height: 1.7;
}

.content-shell {
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 4.2rem);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1fr);
  gap: 1rem;
}

.auth-panel {
  padding: 1.4rem;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 23, 42, 0.92), rgba(9, 17, 31, 0.98));
  box-shadow: var(--shadow);
}

.auth-panel--brand {
  display: grid;
  align-content: start;
  gap: 1.2rem;
}

.auth-copy h2 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.auth-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-panel--form {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.auth-tabs {
  justify-content: flex-start;
}

.auth-form {
  margin: 0;
}

.auth-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: auto;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox-row input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-deep);
}

.auth-checkbox-row span {
  line-height: 1.4;
}

.auth-panel--form .inventory-form,
.auth-panel--form .auth-form,
.auth-panel--form .settings-user-table-wrap,
.auth-panel--form .form-actions,
.auth-panel--form .grid-two,
.auth-panel--form label,
.auth-panel--form input,
.auth-panel--form select,
.auth-panel--form textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.auth-panel--form .auth-checkbox-row {
  width: auto;
}

.auth-feedback {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.auth-feedback--error {
  background: rgba(255, 132, 113, 0.12);
  border-color: rgba(255, 132, 113, 0.28);
  color: #ffd6cf;
}

.auth-feedback--success {
  background: rgba(115, 239, 159, 0.12);
  border-color: rgba(115, 239, 159, 0.24);
  color: #d6ffe2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.stat-card {
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.stat-card--items {
  background:
    linear-gradient(180deg, rgba(17, 37, 73, 0.96), rgba(8, 19, 39, 0.96));
}

.stat-card--value {
  background:
    linear-gradient(180deg, rgba(14, 58, 48, 0.96), rgba(7, 33, 27, 0.96));
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card.is-active {
  border-color: rgba(110, 231, 200, 0.6);
  box-shadow: 0 0 0 1px rgba(110, 231, 200, 0.22), var(--shadow);
}

.stat-card--alert {
  background:
    linear-gradient(180deg, rgba(58, 24, 29, 0.96), rgba(35, 11, 18, 0.96));
}

.stat-card--warning {
  background:
    linear-gradient(180deg, rgba(64, 44, 14, 0.96), rgba(39, 24, 8, 0.96));
}

.stat-card--out {
  background:
    linear-gradient(180deg, rgba(73, 18, 28, 0.96), rgba(44, 10, 17, 0.96));
}

.stat-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 0.5rem;
}

.stat-card__value {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.stat-card__note {
  margin: 0;
  line-height: 1.5;
  font-size: 0.92rem;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  min-height: 100%;
  width: 100%;
}

.panel {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(12, 23, 42, 0.92), rgba(9, 17, 31, 0.98));
  backdrop-filter: blur(18px);
}

.panel--inventory {
  width: 100%;
  padding-inline: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4.2rem);
}

.panel--inventory .panel__header,
.panel--inventory .bulk-actions {
  padding-inline: 1.25rem;
}

.panel--inventory .table-wrap {
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  flex: 1 1 auto;
  min-height: calc(100vh - 12rem);
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.panel__header {
  margin-bottom: 1rem;
}

.panel__header h2 {
  margin: 0.35rem 0;
  font-size: 1.26rem;
}

.panel__header--tight {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(2, minmax(140px, 0.9fr)) auto auto;
  gap: 0.75rem;
  min-width: 0;
  width: 100%;
  align-items: center;
}

.table-pagination {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  justify-self: end;
}

.table-pagination__label {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.toolbar > input {
  min-width: 0;
  width: 100%;
}

.toolbar > select {
  min-width: 0;
  width: 100%;
}

.column-picker {
  position: relative;
  min-width: 0;
  justify-self: end;
}

.column-picker__toggle {
  min-width: 110px;
}

.column-picker__menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 12;
  width: 260px;
  padding: 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(10, 19, 36, 0.98);
  box-shadow: var(--shadow);
}

.column-picker__menu label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0;
  padding: 0.45rem 0;
}

.column-picker__menu input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
}

label {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  color: #d7e2f5;
}

.required-mark {
  color: #ff7a7a;
  font-weight: 700;
}

input,
select,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

select {
  color: #f3f7ff;
  background-color: rgba(17, 28, 49, 0.96);
}

select option {
  color: #f3f7ff;
  background-color: #12203a;
}

input::placeholder {
  color: #7f91af;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(110, 231, 200, 0.72);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(110, 231, 200, 0.12);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.settings-permissions-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.settings-permissions-grid label {
  display: flex;
  align-items: flex-start;
  gap: 0.62rem;
  margin-bottom: 0;
  min-height: 62px;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  line-height: 1.35;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.settings-permissions-grid label:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 160, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 20px rgba(5, 10, 20, 0.14);
}

.settings-permissions-grid input[type="checkbox"] {
  margin: 0.05rem 0 0;
  width: 18px;
  height: 18px;
  accent-color: #7bb2ff;
  flex: 0 0 auto;
}

@media (max-width: 1400px) {
  .settings-permissions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .settings-permissions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-code-row {
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.product-code-row > label {
  display: grid;
  align-content: start;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.input-with-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
}

.button--icon {
  min-width: 48px;
  padding: 0.82rem 0.7rem;
}

.scan-torch-button {
  min-width: 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.15rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0.92rem 1.25rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent) 0%, #5ba4ff 100%);
  color: #04101f;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(68, 175, 255, 0.22);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
}

.button--danger,
.button--ghost.button--danger {
  background: rgba(22, 163, 74, 0.08);
  color: #ff818f;
  border-color: rgba(34, 197, 94, 0.75);
}

#bulkDeleteButton,
#categoryBulkDeleteButton,
#supplierBulkDeleteButton,
#deleteBarcodeTemplateButton,
#confirmBulkDeleteButton,
[data-action="delete"],
[data-category-delete],
[data-supplier-delete],
[data-user-delete],
[data-role-delete],
[data-printer-remove],
[data-network-printer-remove],
[data-zebra-cloud-printer-remove],
[data-image-remove] {
  color: #ff818f;
  border-color: rgba(34, 197, 94, 0.75);
}

.button.button--ghost#bulkDeleteButton,
.button.button--ghost#categoryBulkDeleteButton,
.button.button--ghost#supplierBulkDeleteButton,
.button.button--ghost#deleteBarcodeTemplateButton,
.button.button--ghost[data-category-delete],
.button.button--ghost[data-supplier-delete],
.button.button--ghost[data-user-delete],
.button.button--ghost[data-role-delete],
.button.button--ghost[data-printer-remove],
.button.button--ghost[data-network-printer-remove],
.button.button--ghost[data-zebra-cloud-printer-remove] {
  background: rgba(22, 163, 74, 0.08);
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  scrollbar-width: auto;
  scrollbar-color: auto;
}

.bulk-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(160, 184, 222, 0.08);
  background: rgba(12, 23, 42, 0.98);
}

.bulk-actions__text {
  color: var(--muted);
  font-size: 0.92rem;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(160, 184, 222, 0.08);
}

th:first-child,
td:first-child {
  width: 56px;
}

thead th,
th {
  position: sticky;
  top: 0;
  z-index: 5;
  background:
    linear-gradient(180deg, rgba(18, 33, 58, 0.99) 0%, rgba(10, 20, 38, 0.99) 100%);
  box-shadow:
    inset 0 -1px 0 rgba(160, 184, 222, 0.08),
    0 8px 20px rgba(1, 6, 19, 0.26);
  color: #89a2ca;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

thead th::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(160, 184, 222, 0.14);
}

.table-column-header {
  cursor: grab;
  user-select: none;
}

.table-sort-header {
  cursor: pointer;
  user-select: none;
}

.table-column-header.is-dragging {
  opacity: 0.45;
}

tbody tr {
  transition: background 180ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.status-pill--healthy {
  color: var(--success);
  background: rgba(115, 239, 159, 0.12);
}

.status-pill--low {
  color: var(--danger);
  background: rgba(255, 132, 113, 0.14);
}

.status-pill--warning {
  color: #ffbf69;
  background: rgba(255, 191, 105, 0.14);
}

.status-pill--out {
  color: #ff8a96;
  background: rgba(255, 74, 102, 0.16);
}

.subtle {
  margin-top: 0.24rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.table-item-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.table-item-button:hover,
.table-item-button:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  outline: none;
}

.row-actions button,
.row-menu__toggle,
.row-menu__panel button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.row-actions button:hover,
.row-menu__toggle:hover,
.row-menu__panel button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.row-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.row-menu__toggle {
  min-width: 42px;
  padding-inline: 0.7rem;
}

.row-menu__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 15;
  display: none;
  min-width: 160px;
  padding: 0.45rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(10, 18, 33, 0.98);
  box-shadow: var(--shadow);
}

.row-menu.is-open .row-menu__panel {
  display: grid;
  gap: 0.35rem;
}

.row-menu__panel button {
  justify-content: flex-start;
  border-radius: 14px;
}

.table-inline-input {
  min-width: 90px;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.table-row-checkbox,
#selectAllItems {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-deep);
  cursor: pointer;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.category-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.category-block {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-role-picker__actions {
  display: flex;
  align-items: end;
}

.barcode-designer {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
  gap: 1.15rem;
  align-items: start;
}

.barcode-designer__intro,
.barcode-designer__preview-head {
  margin-bottom: 1rem;
}

.barcode-designer__eyebrow {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
}

.barcode-designer__intro h3,
.barcode-designer__preview-head h3 {
  margin: 0;
  font-size: 1.35rem;
}

.barcode-designer__intro p,
.barcode-designer__preview-head p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.barcode-template-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.barcode-template-actions {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.barcode-designer .modal-card:first-child .grid-two {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.barcode-designer .modal-card:first-child label {
  margin-bottom: 0.65rem;
}

.barcode-design-preview {
  display: grid;
  gap: 0.7rem;
  padding: 1.2rem;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 255, 0.94));
  color: #07111f;
  border: 1px solid rgba(7, 17, 31, 0.08);
  box-shadow: 0 24px 60px rgba(3, 10, 22, 0.22);
  position: sticky;
  top: 1rem;
}

.barcode-design-preview__title {
  font-size: 1.2rem;
  font-weight: 800;
}

.barcode-design-preview__bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  min-height: var(--barcode-bar-height, 90px);
  padding: 0.4rem 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.barcode-design-preview__bar {
  display: inline-block;
  height: var(--barcode-bar-height, 90px);
  background: #07111f;
}

.barcode-design-preview__bar--thin {
  opacity: 0.4;
}

.barcode-design-preview__value,
.barcode-design-preview__caption,
.barcode-design-preview__price {
  font-weight: 700;
  text-align: center;
}

.barcode-design-preview__price {
  font-size: 1.05rem;
}

.labelary-preview-block {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(7, 17, 31, 0.08);
  background: rgba(248, 251, 255, 0.92);
}

.labelary-preview-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.labelary-preview-block__canvas {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 140px;
  padding: 1rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px dashed rgba(7, 17, 31, 0.14);
}

.labelary-preview-block__canvas img {
  max-width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 18px 40px rgba(3, 10, 22, 0.12);
}

.barcode-design-zpl-editor {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.barcode-design-zpl-editor textarea {
  min-height: 280px;
  border-radius: 18px;
  font-family: "Courier New", monospace;
  line-height: 1.45;
  background: rgba(4, 10, 20, 0.86);
}

.category-card {
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-card strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.88rem;
}

.category-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  margin-top: 0.55rem;
}

.settings-user-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  height: auto;
  max-height: none;
}

.settings-user-table-wrap .bulk-actions {
  top: 0;
  z-index: 6;
  border-radius: 20px 20px 0 0;
}

#categoryList,
#supplierList {
  height: auto;
  max-height: none;
  overflow: visible;
}

.settings-user-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.settings-user-table th,
.settings-user-table td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.settings-user-table th {
  color: #f3f7ff;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-user-table td {
  color: var(--muted);
  font-size: 0.92rem;
}

.settings-user-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.settings-user-table .table-inline-input {
  min-width: 120px;
  background: rgba(17, 28, 49, 0.98);
  color: #f6f8ff;
}

.settings-user-table select.table-inline-input,
.settings-user-table select.table-inline-input option {
  color: #f6f8ff;
  background: #16233d;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 7, 15, 0.76);
  backdrop-filter: blur(12px);
  overflow-y: auto;
}

.modal-sheet {
  width: min(1180px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.25rem;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 21, 40, 0.98), rgba(7, 14, 27, 0.99));
  box-shadow: var(--shadow);
}

.modal-sheet--product {
  width: min(1120px, 100%);
  max-height: calc(100dvh - 0.6rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.9rem;
  position: relative;
  border: 1px solid rgba(160, 184, 222, 0.14);
  background:
    radial-gradient(circle at top right, rgba(110, 231, 200, 0.08), transparent 24%),
    radial-gradient(circle at top left, rgba(91, 164, 255, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(13, 25, 44, 0.985) 0%, rgba(7, 14, 26, 0.995) 100%);
  box-shadow:
    0 34px 80px rgba(1, 6, 19, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.inventory-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-sheet--product .modal-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  grid-template-areas:
    "left details"
    "left dimensions";
  column-gap: 0.8rem;
  row-gap: 0.8rem;
  align-items: start;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.1rem 0.15rem 0.15rem 0.05rem;
  scrollbar-width: none;
}

.modal-sheet--product .modal-grid::-webkit-scrollbar {
  display: none;
}

.product-modal-stack--left {
  grid-area: left;
  display: grid;
  gap: 0.8rem;
  align-self: start;
}

.product-modal-card--details {
  grid-area: details;
}

.product-modal-card--dimensions {
  grid-area: dimensions;
}

.modal-sheet--confirm {
  width: min(520px, 100%);
}

.modal-sheet--image-preview {
  width: min(900px, 100%);
  max-height: calc(100vh - 2rem);
}

.image-preview-modal__body {
  display: grid;
  place-items: center;
}

.image-preview-modal__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  border-radius: 18px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.03);
}

.modal-sheet__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.75rem;
}

.modal-sheet__header h2 {
  margin: 0.3rem 0 0;
  font-size: 1.6rem;
}

.modal-sheet__close {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.modal-sheet__close--floating {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 8;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  box-shadow: 0 12px 22px rgba(2, 8, 20, 0.34);
  backdrop-filter: blur(14px);
}

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

.select-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.select-with-action label {
  margin-bottom: 0;
}

.button--compact {
  padding: 0.82rem 0.95rem;
  min-width: 84px;
  white-space: nowrap;
}

.modal-card {
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.modal-sheet--product .modal-card {
  position: relative;
  padding: 0.82rem;
  border-radius: 26px;
  border-color: rgba(160, 184, 222, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.028) 100%);
  box-shadow:
    0 18px 36px rgba(3, 10, 22, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.modal-sheet--product .modal-card h3 {
  margin-bottom: 0.65rem;
}

.modal-card h3 {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.product-modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

.product-modal-card--images {
  background:
    radial-gradient(circle at top left, rgba(110, 231, 200, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.062) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.product-modal-card--details {
  background:
    radial-gradient(circle at top right, rgba(91, 164, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.062) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.product-modal-card--pricing {
  background:
    radial-gradient(circle at top left, rgba(249, 212, 35, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.062) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.product-modal-card--dimensions {
  background:
    radial-gradient(circle at top right, rgba(163, 122, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.062) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.form-actions--modal {
  justify-content: flex-end;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(160, 184, 222, 0.1);
}

.form-actions--align-end {
  align-items: end;
  height: 100%;
}

.inventory-form__checks {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.check-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0;
}


.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.image-preview-item {
  position: relative;
  overflow: visible;
  min-height: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  box-shadow: 0 10px 24px rgba(3, 10, 22, 0.18);
}

.image-preview-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  border-radius: 14px;
  object-fit: contain;
  cursor: zoom-in;
}

.image-preview-item button {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  border: none;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background: rgba(7, 16, 31, 0.82);
  color: #fff;
  cursor: pointer;
}

.barcode-camera {
  margin-bottom: 0.9rem;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, rgba(8, 16, 29, 0.56) 100%);
  padding: 0.85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.barcode-camera__video {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 18px;
  background: #02060d;
}

.modal-sheet--product label {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.62rem;
  color: #d7e5ff;
  font-weight: 600;
}

.modal-sheet--product input,
.modal-sheet--product select,
.modal-sheet--product textarea {
  border-radius: 18px;
  border: 1px solid rgba(160, 184, 222, 0.12);
  background: rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 18px rgba(5, 10, 20, 0.08);
}

.modal-sheet--product input:focus,
.modal-sheet--product select:focus,
.modal-sheet--product textarea:focus {
  transform: translateY(-1px);
  border-color: rgba(110, 231, 200, 0.3);
  box-shadow:
    0 0 0 1px rgba(110, 231, 200, 0.16),
    0 14px 28px rgba(18, 59, 113, 0.18);
}

.modal-sheet--product .button {
  border-radius: 16px;
}

.modal-sheet--product .button--primary {
  box-shadow: 0 16px 30px rgba(28, 96, 206, 0.28);
}

.modal-sheet--product .input-with-actions {
  padding: 0.32rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(160, 184, 222, 0.08);
}

.modal-sheet--product .input-with-actions input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.modal-sheet--product .input-with-actions input:focus {
  transform: none;
  box-shadow: none;
}

.modal-sheet--product .select-with-action {
  align-items: end;
  gap: 0.75rem;
}

.product-modal-card--details > .select-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.product-meta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.product-meta-row > .select-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.product-meta-row > .select-with-action label {
  margin-bottom: 0;
}

.product-meta-row > .select-with-action .button {
  min-width: 84px;
  height: 48px;
  padding-inline: 0.85rem;
  align-self: end;
}

.product-modal-card--details > .select-with-action label {
  margin-bottom: 0;
}

.product-modal-card--details > .select-with-action .button {
  min-width: 84px;
  height: 48px;
  padding-inline: 0.85rem;
  align-self: end;
}

.modal-sheet--product .helper-text {
  color: #a8b8d5;
}

.quick-barcode-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.quick-barcode-row input {
  min-width: 0;
}

.quick-barcode-action {
  min-width: 56px;
  font-weight: 600;
  line-height: 1;
  padding-inline: 0.65rem;
}

.quick-barcode-action__icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
  margin: 0 auto;
}

.quick-price-row {
  align-items: stretch;
}

.quick-price-row > label {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  margin-bottom: 0;
  height: 100%;
}

.quick-price-row > label input {
  align-self: end;
}

.printer-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.printer-status > div {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.printer-status__label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.zpl-preview {
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
  background: rgba(3, 8, 17, 0.74);
  color: #b7ffd7;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.45;
}

.helper-text {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.mfa-qr-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0 1rem;
}

.mfa-qr-block img {
  width: min(220px, 100%);
  max-width: 220px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #ffffff;
  padding: 0.7rem;
}

.mfa-qr-help {
  max-width: 280px;
  display: grid;
  gap: 0.45rem;
  color: rgba(233, 240, 255, 0.88);
  font-size: 0.9rem;
  line-height: 1.5;
}

.mfa-qr-help strong {
  color: #f7fbff;
  font-size: 0.96rem;
}

.mfa-qr-help p {
  margin: 0;
}

.settings-section[data-settings-panel="profile"] {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.settings-section[data-settings-panel="profile"] > .panel__header {
  margin-bottom: 0.7rem;
}

.settings-section[data-settings-panel="profile"] .inventory-form label {
  margin-bottom: 0.58rem;
}

.profile-mfa-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.7rem;
  margin-top: 0.12rem;
}

.profile-mfa-method {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  margin: 0;
  padding: 0.58rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.profile-mfa-method input {
  margin: 0;
}

.profile-mfa-method span {
  font-size: 0.88rem;
}

.settings-section[data-settings-panel="profile"] .grid-two {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.settings-section[data-settings-panel="profile"] .profile-grid-row {
  align-items: end;
}

.settings-section[data-settings-panel="profile"] .inventory-form {
  gap: 0.1rem;
}

.settings-section[data-settings-panel="profile"] label {
  gap: 0.32rem;
  font-size: 0.88rem;
}

.settings-section[data-settings-panel="profile"] input,
.settings-section[data-settings-panel="profile"] select,
.settings-section[data-settings-panel="profile"] textarea {
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  font-size: 0.92rem;
}

.settings-section[data-settings-panel="profile"] .form-actions .button {
  min-height: 42px;
  padding: 0.72rem 0.9rem;
}

.settings-section[data-settings-panel="profile"] .profile-inline-actions {
  height: 100%;
  justify-content: flex-end;
}

.settings-section[data-settings-panel="profile"] .category-block {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
}

.settings-section[data-settings-panel="profile"] .panel__header h2 {
  margin: 0.15rem 0;
}

.settings-section[data-settings-panel="profile"] .form-actions {
  gap: 0.5rem;
}

.settings-section[data-settings-panel="profile"] .helper-text {
  margin-top: 0.15rem;
}

.settings-section[data-settings-panel="profile"] .mfa-qr-block {
  margin: 0.3rem 0 0.7rem;
  align-items: start;
}

.settings-section[data-settings-panel="profile"] .mfa-qr-block img {
  width: min(180px, 100%);
  max-width: 180px;
  padding: 0.5rem;
}

.settings-section[data-settings-panel="profile"] .mfa-qr-help {
  max-width: 300px;
  font-size: 0.87rem;
}

.scanner-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.scanner-panel__controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 0.9rem;
  align-items: end;
}

.scanner-panel__field {
  margin-bottom: 0;
}

.scanner-panel__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.scanner-camera {
  margin-top: 0.9rem;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.scanner-camera__video {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.print-sheet {
  display: none;
}

.print-label {
  width: 4in;
  min-height: 3in;
  padding: 0.22in;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  font-family: Arial, sans-serif;
}

.print-label__brand {
  font-size: 13pt;
  font-weight: 700;
  margin-bottom: 0.14in;
}

.print-label__name {
  font-size: 22pt;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.12in;
}

.print-label__barcode {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  min-height: 0.9in;
  width: 100%;
  overflow: hidden;
  margin-bottom: 0.08in;
}

.print-label__barcode .barcode-design-preview__bar,
.print-label__barcode .barcode-design-preview__bar--thin {
  height: 0.9in;
}

.print-label__meta {
  font-size: 11pt;
  margin-bottom: 0.06in;
  text-align: center;
}

.print-label__row {
  display: flex;
  justify-content: space-between;
  gap: 0.1in;
  margin-top: 0.18in;
  font-size: 12pt;
  font-weight: 700;
}

.print-label__footer {
  margin-top: 0.28in;
  font-size: 10pt;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-item__title {
  display: block;
  margin-bottom: 0.25rem;
}

.activity-item__meta {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.activity-item__delta {
  font-weight: 800;
  white-space: nowrap;
}

.delta-positive {
  color: var(--success);
}

.delta-negative {
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 1.4rem;
}

.hidden {
  display: none;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 0.9rem 0.75rem 2rem;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    top: auto;
  }

  .dashboard,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .panel--inventory {
    grid-row: auto;
    min-height: auto;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .app-shell {
    width: 100%;
    gap: 0.8rem;
    padding: 0.65rem 0.55rem 1.4rem;
  }

  .auth-page {
    padding: 0.75rem;
  }

  .auth-shell {
    gap: 0.85rem;
  }

  .auth-panel,
  .sidebar,
  .panel,
  .stat-card {
    border-radius: 22px;
  }

  .sidebar {
    padding: 0.95rem;
    gap: 0.8rem;
    border-color: rgba(160, 184, 222, 0.12);
    background:
      linear-gradient(180deg, rgba(17, 31, 56, 0.96) 0%, rgba(8, 18, 34, 0.94) 100%);
    box-shadow: 0 16px 48px rgba(1, 6, 19, 0.34);
  }

  .sidebar__footer {
    margin-top: 0;
  }

  .sidebar__brand {
    gap: 0.75rem;
    padding: 0.2rem;
  }

  .sidebar__mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(25, 108, 255, 0.22);
  }

  .sidebar__brand h1 {
    font-size: 1.2rem;
    line-height: 1.1;
  }

  .sidebar__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .sidebar__link,
  .sidebar__link--button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.82rem 0.9rem;
    border-radius: 18px;
    text-align: center;
    font-size: 0.94rem;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.045);
  }

  .stats-grid {
    grid-auto-flow: column;
    grid-auto-columns: minmax(185px, 72vw);
    gap: 0.7rem;
    margin: 0 -0.05rem 0.9rem;
    padding: 0.05rem 0.05rem 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .stat-card {
    min-height: 136px;
    padding: 1rem;
    scroll-snap-align: start;
    background:
      linear-gradient(180deg, rgba(17, 30, 52, 0.96) 0%, rgba(10, 18, 34, 0.98) 100%);
  }

  .stats-grid::-webkit-scrollbar {
    display: none;
  }

  .panel__header--tight {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .toolbar > input {
    grid-column: 1 / -1;
  }

  .toolbar > input,
  .toolbar > select,
  .column-picker {
    width: 100%;
    flex: 1 1 100%;
  }

  .table-pagination,
  .column-picker {
    grid-column: span 1;
  }

  .table-pagination {
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    padding: 0.15rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(160, 184, 222, 0.08);
  }

  .column-picker__toggle {
    width: 100%;
  }

  .column-picker__menu {
    left: 0;
    right: auto;
    width: min(100%, 320px);
  }

  .settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  .settings-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.78rem 0.95rem;
  }

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

  .input-with-actions {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .modal-sheet--product .modal-card:first-child {
    max-width: none;
  }

  .settings-role-picker__actions {
    align-items: stretch;
  }

  .barcode-designer {
    grid-template-columns: 1fr;
  }

  .printer-status {
    grid-template-columns: 1fr;
  }

  .scanner-panel__controls {
    grid-template-columns: 1fr;
  }

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

  .modal-sheet--product .modal-grid {
    grid-template-areas:
      "left"
      "details"
      "dimensions";
  }

  .select-with-action {
    grid-template-columns: 1fr;
  }

  .product-meta-row {
    grid-template-columns: 1fr;
  }

  .modal-sheet {
    width: min(100%, 100%);
    max-height: calc(100vh - 0.5rem);
    padding: 0.95rem;
    border-radius: 24px;
  }

  .modal-sheet--product {
    width: 100%;
    max-height: calc(100dvh - 0.5rem);
    padding: 0.8rem;
    border-radius: 24px;
  }

  .modal-sheet--product .modal-grid {
    padding-right: 0;
  }

  .modal-sheet__header {
    gap: 0.75rem;
  }

  .modal-sheet__header h2 {
    font-size: 1.3rem;
  }

  .modal-sheet__close {
    width: 42px;
    height: 42px;
  }

  .table-wrap {
    border-radius: 20px;
    max-height: none;
  }

  table {
    min-width: 560px;
  }

  th,
  td {
    padding: 0.72rem 0.62rem;
  }

  .bulk-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .row-actions {
    flex-wrap: wrap;
  }

  .image-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .barcode-camera__video,
  .scanner-camera__video {
    max-height: 220px;
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  body::before {
    background-size: 28px 28px;
  }

  .app-shell {
    padding: 0.45rem 0.4rem 6.4rem;
    gap: 0.55rem;
  }

  .panel,
  .stat-card {
    padding: 0.88rem;
  }

  .content-shell {
    min-width: 0;
    min-height: auto;
  }

  .sidebar {
    padding: 0.8rem;
    border-radius: 22px;
    gap: 0.65rem;
  }

  .sidebar__brand {
    gap: 0.65rem;
  }

  .sidebar__mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 0.88rem;
  }

  .sidebar__brand h1 {
    font-size: 1.02rem;
  }

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

  .sidebar__link,
  .sidebar__link--button {
    border-radius: 16px;
    font-size: 0.88rem;
    padding: 0.78rem 0.55rem;
    min-height: 46px;
  }

  .sidebar__actions .button {
    width: 100%;
  }

  .settings-item,
  .category-card,
  .modal-card {
    border-radius: 16px;
  }

  .stats-grid {
    grid-auto-columns: minmax(165px, 82vw);
    gap: 0.55rem;
  }

  .helper-text,
  .subtle,
  .stat-card__note,
  .panel__header p {
    font-size: 0.86rem;
  }

  .hero__actions,
  .form-actions,
  .sidebar__actions {
    display: grid;
  }

  .button {
    width: 100%;
    padding: 0.82rem 0.95rem;
  }

  .settings-tab {
    padding: 0.72rem 0.85rem;
    font-size: 0.92rem;
  }

  .stat-card__value {
    font-size: 1.65rem;
  }

  .panel--inventory {
    min-height: auto;
  }

  .panel--inventory .panel__header,
  .panel--inventory .bulk-actions {
    padding-inline: 0.9rem;
  }

  .panel--inventory .table-wrap {
    max-height: none;
  }

  .panel__header {
    margin-bottom: 0.75rem;
  }

  .panel__header h2 {
    font-size: 1.08rem;
  }

  .panel--inventory {
    border-radius: 22px;
  }

  .panel--inventory .panel__header {
    padding-top: 0.15rem;
  }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .table-pagination,
  .column-picker {
    grid-column: auto;
  }

  .table-pagination {
    padding: 0.2rem;
    border-radius: 18px;
  }

  .modal-backdrop {
    padding: 0.2rem;
  }

  .modal-sheet,
  .modal-sheet--product,
  .modal-sheet--confirm {
    width: 100%;
    max-height: calc(100vh - 0.7rem);
    padding: 0.8rem;
    border-radius: 24px;
  }

  .modal-sheet__header {
    margin-bottom: 0.6rem;
  }

  .modal-sheet__header h2 {
    font-size: 1.08rem;
  }

  .modal-sheet__close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .modal-card {
    padding: 0.75rem;
  }

  .modal-sheet--product .modal-card {
    padding: 0.72rem;
  }

  .modal-card h3 {
    font-size: 0.98rem;
    margin-bottom: 0.7rem;
  }

  .form-actions--modal {
    gap: 0.55rem;
  }

  .image-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .barcode-camera__video,
  .scanner-camera__video {
    max-height: 180px;
    border-radius: 14px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
  }

  table {
    min-width: 520px;
  }

  th,
  td {
    padding: 0.64rem 0.52rem;
    font-size: 0.88rem;
  }

  .row-menu__toggle {
    min-width: 38px;
    min-height: 38px;
  }

  .image-preview-grid {
    grid-template-columns: 1fr;
  }

  .print-label {
    width: 100%;
  }

  .mobile-action-bar {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.45rem;
    border-radius: 22px;
    border: 1px solid rgba(160, 184, 222, 0.16);
    background:
      linear-gradient(180deg, rgba(16, 31, 55, 0.94) 0%, rgba(8, 17, 32, 0.96) 100%);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 48px rgba(1, 6, 19, 0.48);
  }

  .mobile-action-bar__item {
    min-height: 54px;
    padding: 0.72rem 0.4rem;
    border: 1px solid rgba(160, 184, 222, 0.1);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .mobile-action-bar__label {
    display: block;
    font-size: 0.74rem;
    line-height: 1.2;
    text-align: center;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  body::before,
  .page-glow,
  .app-shell {
    display: none !important;
  }

  .print-sheet {
    display: block;
  }

  @page {
    size: auto;
    margin: 0.2in;
  }
}
