:root {
  --ink: #17212b;
  --muted: #637083;
  --line: #d9e0e8;
  --panel: #ffffff;
  --bg: #f4f7fb;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #b45309;
  --danger: #b42318;
  --ok: #047857;
  --warn: #a16207;
  --shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

#operationNoticeHost {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 3000;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}

.operation-notice {
  min-height: 48px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  font-weight: 700;
  pointer-events: auto;
}

.operation-notice.loading {
  grid-template-columns: 22px minmax(0, 1fr);
}

.operation-notice.success {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.operation-notice.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.operation-notice-icon {
  display: grid;
  place-items: center;
}

.operation-notice-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  color: currentColor;
}

.operation-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: operation-spin 0.7s linear infinite;
}

.button-operation-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  display: inline-block;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: operation-spin 0.7s linear infinite;
}

.mini-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: inline-block;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: operation-spin 0.7s linear infinite;
}

.badge .mini-spinner {
  vertical-align: -2px;
}

@keyframes operation-spin {
  to { transform: rotate(360deg); }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

body.operation-pending .main button,
body.operation-pending .sidebar button {
  pointer-events: none;
  opacity: 0.72;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -3px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  direction: ltr;
}

.sidebar {
  background: #111827;
  color: #f9fafb;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand-block h1 {
  margin: 0;
  font-size: 22px;
}

.brand-block p {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: #e5e7eb;
  text-align: start;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav button span:nth-child(2) {
  min-width: 0;
}

.nav-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.nav button.active,
.nav button:hover {
  background: #263244;
}

.side-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #263244;
}

.lang-select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 38px 9px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.side-footer .lang-select {
  width: 100%;
  border-color: #3b485b;
  background: #1f2937;
  color: #f9fafb;
}

.side-footer .btn.ghost {
  width: 100%;
  border-color: #3b485b;
  background: #f9fafb;
  color: #111827;
}

.side-footer .btn.ghost:hover {
  background: #e5e7eb;
}

.mobile-account-actions {
  display: none;
}

.nav .mobile-nav-logout,
.mobile-catalog-tools,
.mobile-filter-backdrop {
  display: none;
}

.catalog-search-submit {
  background: var(--brand);
  color: #fff;
}

.catalog-search-submit:hover {
  background: var(--brand-dark);
}

.main {
  min-width: 0;
  padding: 22px;
}

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

.topbar h2 {
  margin: 0;
  font-size: 24px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar input,
.toolbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

.auth-wrap {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #1f2937;
}

.auth-wrap::before {
  content: "";
  position: absolute;
  inset: -18px;
  background: url("assets/about.jpg") center 24% / cover no-repeat;
  filter: blur(5px);
  transform: scale(1.04);
}

.auth-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.44) 52%, rgba(226, 232, 240, 0.66)),
    rgba(15, 23, 42, 0.16);
}

.auth-grid {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 24px;
  align-items: center;
  min-width: 0;
}

.intro {
  padding: 32px 38px 38px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 540px;
  text-shadow: 0 2px 18px rgba(15, 23, 42, 0.42);
  min-width: 0;
}

.auth-brand-logo {
  width: min(430px, 78%);
  align-self: center;
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, 0.2));
}

.auth-brand-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-intro-copy {
  max-width: 620px;
  align-self: center;
  text-align: center;
}

.auth-intro-copy p {
  margin: 0;
}

.intro h1 {
  font-size: 44px;
  margin: 0 0 12px;
}

.intro p {
  max-width: 620px;
  color: #e2e8f0;
  font-size: 17px;
}

.card,
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card {
  width: 100%;
  min-width: 0;
  padding: 22px;
  background: rgba(248, 250, 252, 0.76);
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(3px);
}

.tabs,
.segmented {
  display: flex;
  gap: 6px;
  background: #e2e8f0;
  padding: 4px;
  border-radius: 8px;
}

.auth-card .tabs {
  background: #e8eef5;
  border: 0;
}

.tabs button,
.segmented button {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.auth-card .tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 8px;
  text-align: center;
  font-size: 14px;
}

.tabs button.active,
.segmented button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.auth-card .field input,
.auth-card .field select,
.auth-card .field textarea {
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.auth-card .field input:focus,
.auth-card .field select:focus,
.auth-card .field textarea:focus {
  border-color: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.18);
  outline: none;
}

.form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 700;
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.password-strength {
  display: grid;
  gap: 5px;
}

.password-strength-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.password-strength-bar span {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: #ef4444;
  transition: width 0.18s ease, background 0.18s ease;
}

.password-strength small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.password-strength.medium .password-strength-bar span {
  width: 62%;
  background: #f59e0b;
}

.password-strength.strong .password-strength-bar span {
  width: 100%;
  background: #16a34a;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 8px;
  background: #e8eef5;
  color: var(--ink);
  font-weight: 700;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.primary .icon,
.btn.primary svg,
.catalog-search-submit .icon,
.catalog-search-submit svg {
  color: #fff;
  stroke: currentColor;
}

.btn.primary:hover {
  background: var(--brand-dark);
}

.btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.btn.danger {
  background: #fee4e2;
  color: var(--danger);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.stat {
  padding: 18px;
}

.stat strong {
  display: block;
  font-size: 27px;
}

.stat span {
  color: var(--muted);
}

.panel {
  padding: 18px;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-row h3 {
  margin: 0;
}

.nebim-sync-card {
  margin-top: 16px;
}

.nebim-sync-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.nebim-sync-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.nebim-sync-grid strong,
.nebim-sync-grid span {
  display: block;
}

.nebim-sync-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .nebim-sync-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px;
  text-align: start;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f0fdfa;
}

.request-table td:first-child {
  color: var(--brand-dark);
}

.customer-permissions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-top: 16px;
}

.discount-summary {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.discount-summary-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.discount-summary-head p {
  margin: 4px 0 0;
}

.discount-tree {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.discount-tree summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 800;
  color: var(--brand-dark);
}

.discount-tree-body {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 0 12px 12px;
}

.discount-tree-group {
  display: grid;
  gap: 5px;
}

.discount-tree-skus {
  display: grid;
  gap: 4px;
  padding-inline-start: 24px;
}

.discount-tree-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
}

.discount-tree-row.root {
  background: #ecfeff;
  border: 1px solid #99f6e4;
}

.discount-tree-row.group {
  background: #f8fafc;
  border: 1px solid var(--line);
}

.discount-tree-row.sku {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 13px;
}

.discount-tree-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-grid,
.product-permission-list {
  display: grid;
  gap: 10px;
}

.product-permission-list {
  max-height: 520px;
  overflow: auto;
  padding-inline-end: 4px;
}

.permission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.permission-card.enabled {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.group-permission-card {
  grid-template-columns: minmax(0, 1fr) 104px 38px;
}

.group-permission-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.12);
}

.permission-open-btn {
  width: 36px;
  height: 36px;
  justify-self: end;
}

.permission-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.permission-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

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

.mini-input {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.mini-input input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
}

.permission-filterbar {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.permission-group-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.group-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 8px 11px;
  font-weight: 800;
  cursor: pointer;
}

.group-pill span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--muted);
  font-size: 12px;
}

.group-pill.active {
  border-color: var(--brand);
  background: #ccfbf1;
  color: var(--brand-dark);
}

.permission-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.permission-search-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
}

.permission-result-title {
  font-weight: 800;
}

.group-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.group-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  color: var(--ink);
  text-align: start;
}

.group-summary:hover,
.group-summary.active {
  border-color: #5eead4;
  background: #f0fdfa;
}

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

.product-preview-list {
  display: grid;
  gap: 10px;
}

.admin-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pager-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.pager-btn:hover:not(:disabled) {
  background: #e8eef5;
}

.pager-btn svg {
  width: 14px;
  height: 14px;
}

.pager-count {
  min-width: 92px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.admin-filterbar {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(180px, 1fr) minmax(180px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.audit-filterbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.audit-filterbar input,
.audit-filterbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

.audit-filter-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.audit-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.audit-table code {
  white-space: nowrap;
  font-size: 12px;
}

.audit-date {
  white-space: nowrap;
}

.audit-details summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 700;
}

.audit-details pre {
  max-width: 360px;
  max-height: 220px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 9px;
  border-radius: 6px;
  background: #f1f5f9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.admin-filterbar label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}

.admin-filterbar input,
.admin-filterbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

.product-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.product-preview:hover {
  border-color: #5eead4;
  background: #f0fdfa;
}

.product-preview.price-missing {
  border-left: 4px solid var(--danger);
  background: #fff7ed;
}

.product-preview.price-partial {
  border-left: 4px solid var(--warn);
  background: #fffbeb;
}

.product-preview.price-missing:hover,
.product-preview.price-partial:hover {
  border-color: #fdba74;
  background: #fff7ed;
}

.product-preview.price-missing:hover {
  border-left-color: var(--danger);
}

.product-preview.price-partial:hover {
  border-left-color: var(--warn);
}

.product-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #e2e8f0;
}

.product-preview strong,
.product-preview span {
  display: block;
}

.product-preview div > span {
  color: var(--muted);
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 700;
}

.badge.ok {
  background: #dcfce7;
  color: var(--ok);
}

.badge.warn {
  background: #fef3c7;
  color: var(--warn);
}

.badge.danger {
  background: #fee4e2;
  color: var(--danger);
}

.unread-note {
  border-color: #fecaca;
  background: #fff7ed;
}

.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.notification-main {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  text-align: left;
  background: transparent;
  color: inherit;
  overflow-wrap: anywhere;
}

.notification-main strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.char-counter {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  justify-self: end;
}

.char-counter.over {
  color: var(--danger);
}

.notification-main[onclick] {
  cursor: pointer;
}

.notification-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-action.danger {
  color: var(--danger);
  background: #fff7f7;
}

.mini-action svg {
  width: 14px;
  height: 14px;
}

.request-line-action {
  text-align: right;
  white-space: nowrap;
}

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

.group-manage-list {
  display: grid;
  gap: 8px;
}

.product-groups-panel {
  padding: 0;
  overflow: hidden;
}

.collapse-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.collapse-header strong,
.collapse-header small {
  display: block;
}

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

.collapse-arrow {
  font-size: 18px;
  color: var(--muted);
}

.product-groups-content {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.group-manage-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(240px, 1.4fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.group-manage-row.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(20, 93, 160, 0.08);
}

.group-list-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
}

.group-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.group-edit-form input {
  min-width: 0;
}

.catalog-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 14px;
}

.catalog-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 180px;
  font-weight: 700;
  font-size: 13px;
}

.catalog-toolbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

.catalog-search-box {
  min-height: 42px;
  flex: 1 1 360px;
  display: grid;
  grid-template-columns: 22px minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 6px 6px 10px;
  background: #fff;
}

.catalog-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.catalog-search-box .icon {
  color: var(--muted);
}

.catalog-search-box .catalog-search-submit .icon {
  color: #fff;
}

.compact-catalog {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

@media (min-width: 1500px) {
  .compact-catalog {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.product {
  overflow: hidden;
}

.product img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #e2e8f0;
}

.product-main-image {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
}

.no-product-image {
  display: grid;
  place-items: center;
  min-height: 180px;
  aspect-ratio: 1 / 0.72;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f8fafc, #e5e7eb);
  color: #64748b;
  font-weight: 700;
  text-align: center;
}

.main-product-image.no-product-image {
  min-height: 240px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.compact-product .product-main-image img {
  aspect-ratio: 1 / 0.72;
}

.catalog-image-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 6px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

.catalog-image-strip button {
  min-height: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  background: transparent;
}

.catalog-image-strip .image-more-btn,
.image-more-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 100%;
  border: 1px solid var(--line);
  background: #e8eef5;
  color: var(--ink);
  font-weight: 900;
}

.catalog-image-strip .image-more-btn {
  aspect-ratio: 1;
  font-size: 14px;
}

.catalog-image-strip button.active {
  border-color: var(--brand);
}

.catalog-image-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.load-more-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
}

.image-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.image-modal {
  width: min(1120px, 96vw);
  max-height: 94dvh;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow);
}

.image-modal-stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  height: min(68dvh, 680px);
}

.image-modal-stage.single-image {
  grid-template-columns: minmax(0, 1fr);
}

.image-modal-stage img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: contain;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid var(--line);
  image-rendering: auto;
  display: block;
}

.image-modal-stage .icon-btn {
  width: 44px;
  height: 44px;
  font-size: 28px;
}

.image-modal-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 4px;
}

.image-modal-strip button {
  flex: 0 0 74px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.image-modal-strip button.active {
  border-color: var(--brand);
}

.image-modal-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.product-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.compact-product .product-body {
  padding: 11px;
}

.compact-product {
  align-self: start;
}

.selected-product {
  border-color: #14b8a6;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.18), var(--shadow);
}

.product-body h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.product-meta-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

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

.variant-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  background: #f8fafc;
}

.catalog-variant-panel {
  grid-column: 1 / -1;
  margin-bottom: 14px;
  border-color: #99f6e4;
}

.variant-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.variant-section-title strong {
  color: var(--ink);
}

.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.color-picker button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.color-picker button.active {
  border-color: #0f766e;
  background: #ccfbf1;
  color: #115e59;
}

.size-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.variant-row {
  display: grid;
  grid-template-columns: minmax(84px, 0.8fr) minmax(82px, 0.7fr) minmax(110px, 0.8fr) minmax(92px, 0.7fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.variant-size-cell,
.variant-stock-cell,
.variant-price-cell,
.variant-qty-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.variant-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 42px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
}

.stock-pill.empty {
  background: #fee2e2;
  color: #991b1b;
}

.variant-row .btn {
  min-height: 36px;
  padding: 7px 10px;
}

.disabled-variant {
  opacity: 0.55;
}

.variant-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  min-height: 36px;
}

.receipt-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar .upload-panel {
  margin-top: 0;
  min-width: min(100%, 260px);
}

.upload-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.upload-panel.uploading {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.upload-panel.success {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.upload-panel.error {
  border-color: #fecaca;
  background: #fff1f2;
}

.upload-message {
  font-weight: 800;
  color: var(--brand-dark);
}

.bulk-image-import {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.bulk-image-import .section-head {
  margin-bottom: 0;
}

.import-help-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.import-help-details summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.import-help-details ol {
  margin: 0;
  padding: 0 34px 12px;
  color: var(--muted);
}

.import-help-details li + li {
  margin-top: 6px;
}

.upload-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 180ms ease;
}

.ticket-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ticket-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 800;
}

.ticket-tabs button.active {
  border-color: var(--brand);
  background: #ccfbf1;
  color: var(--brand-dark);
}

.ticket-tabs span {
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #e2e8f0;
  font-size: 12px;
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.ticket-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.ticket-main {
  display: grid;
  gap: 4px;
  text-align: start;
  color: var(--ink);
  background: transparent;
  padding: 0;
}

.ticket-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ticket-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 260px;
}

.ticket-row-actions .btn {
  min-height: 32px;
  padding: 6px 8px;
}

.cart-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.cart-toast {
  padding: 10px 12px;
  border-radius: 8px;
  background: #064e3b;
  color: #ecfdf5;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.cart-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #059669;
  color: #fff;
  box-shadow: var(--shadow);
  text-align: start;
}

.cart-button:hover {
  background: #047857;
}

.cart-button strong,
.cart-button small {
  display: block;
}

.cart-button small {
  color: #d1fae5;
  margin-top: 2px;
}

.cart-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 900;
}

.cart-icon .icon {
  width: 20px;
  height: 20px;
}

.badge .icon {
  width: 14px;
  height: 14px;
  margin-inline-end: 4px;
}

.message-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.message {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f1f5f9;
}

.message.mine {
  background: #ccfbf1;
}

.notice {
  padding: 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.danger-notice {
  display: grid;
  gap: 6px;
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.staff-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.staff-page {
  gap: 14px;
}

.staff-create-panel {
  border-left: 4px solid #0ea5e9;
}

.staff-list-panel {
  border-left: 4px solid #22c55e;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.section-head h3 {
  margin: 0;
}

.section-head p {
  margin: 4px 0 0;
}

.staff-filterbar {
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.customer-filterbar .search-control {
  min-width: min(520px, 100%);
}

.search-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(460px, 100%);
  flex: 1;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-control input {
  width: 100%;
  min-height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.staff-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.staff-actions {
  gap: 12px;
  row-gap: 10px;
  align-items: stretch;
  margin-top: 4px;
}

.staff-actions .btn {
  min-width: 128px;
  max-width: 100%;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.compact-form {
  margin-top: 10px;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.kpi-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-hint {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.product-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.main-product-image {
  position: relative;
  margin-bottom: 12px;
}

.main-product-image img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #e2e8f0;
}

.main-product-image .badge {
  position: absolute;
  left: 10px;
  top: 10px;
}

.image-thumb {
  display: grid;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px;
}

.draggable-thumb {
  cursor: grab;
}

.draggable-thumb:active {
  cursor: grabbing;
}

.draggable-thumb:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.12);
}

.image-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #e2e8f0;
}

.image-thumb-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.image-thumb-actions .btn {
  min-height: 32px;
  padding: 6px 8px;
}

.image-more-card {
  cursor: pointer;
  min-height: 118px;
}

.image-more-card span {
  font-size: 24px;
}

.image-more-card small {
  color: var(--muted);
  font-weight: 800;
}

.inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

[dir="rtl"] body {
  font-family: Arial, Helvetica, sans-serif;
}

[dir="rtl"] .nav button,
[dir="rtl"] th,
[dir="rtl"] td {
  text-align: right;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    height: auto;
    max-height: none;
  }

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

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

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

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

  .auth-card {
    max-width: 430px;
    justify-self: center;
  }

  .intro {
    min-height: 340px;
    padding: 22px;
    gap: 16px;
  }

  .auth-brand-logo {
    width: min(390px, 68vw);
  }
}

@media (min-width: 681px) and (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    height: 100dvh;
    max-height: 100dvh;
    padding: 18px 14px;
  }

  .brand-block h1 {
    font-size: 18px;
  }

  .brand-block p {
    font-size: 12px;
  }

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

  .nav button {
    min-height: 42px;
    padding: 9px 10px;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    gap: 10px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .customer-permissions,
  .product-admin-grid {
    grid-template-columns: 1fr;
  }

  .group-manage-row {
    grid-template-columns: minmax(160px, 0.9fr) minmax(180px, 1fr) auto;
  }

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

  .variant-row .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  body {
    padding-bottom: 86px;
  }

  .app-shell {
    display: block;
    position: relative;
  }

  .sidebar {
    position: static;
    height: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
  }

  .brand-block {
    display: none;
  }

  .side-footer {
    display: none;
  }

  .mobile-account-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 15;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
  }

  .mobile-account-actions .lang-select {
    width: 82px;
    min-width: 82px;
    min-height: 38px;
    padding: 7px 8px;
    border-color: #cbd5e1;
    background: #fff;
    color: var(--ink);
    text-align: center;
    text-align-last: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  }

  .staff-actions {
    align-items: stretch;
  }

  .staff-actions .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .sidebar .nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 30;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(72px, 1fr);
    overflow-x: auto;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.96);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.32);
  }

  .sidebar .nav::-webkit-scrollbar {
    display: none;
  }

  .role-customer .sidebar .nav {
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .sidebar .nav .mobile-nav-logout {
    display: flex;
    color: #fecaca;
  }

  .sidebar .nav button {
    min-height: 54px;
    padding: 7px 5px;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    font-size: 11px;
    line-height: 1.15;
  }

  .sidebar .nav .icon {
    width: 20px;
    height: 20px;
  }

  .sidebar .nav-badge {
    position: absolute;
    top: 3px;
    right: 16px;
    margin-left: 0;
  }

  .group-manage-row,
  .group-edit-form {
    grid-template-columns: 1fr;
  }

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

  .variant-row .btn {
    grid-column: 1 / -1;
  }

  .admin-pager {
    justify-content: stretch;
  }

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

  .customer-filterbar .search-control {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .customer-filterbar .btn {
    width: 100%;
    justify-content: center;
  }

  .pager-actions {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .main {
    padding: 14px 14px 22px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    min-height: 42px;
    padding-right: 92px;
  }

  .nav,
  .catalog,
  .compact-catalog,
  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .desktop-catalog-toolbar {
    display: none;
  }

  .mobile-catalog-tools {
    position: sticky;
    top: 0;
    z-index: 12;
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
    padding: 8px;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .mobile-catalog-tools.scroll-hidden {
    transform: translateY(calc(-100% - 10px));
    opacity: 0;
    pointer-events: none;
  }

  .mobile-catalog-search {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 36px 36px;
    gap: 6px;
    align-items: center;
  }

  .mobile-catalog-search > .icon {
    color: var(--muted);
  }

  .mobile-catalog-search input {
    width: 100%;
    min-width: 0;
    height: 36px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
  }

  .mobile-catalog-search .icon-btn {
    width: 36px;
    height: 36px;
  }

  .mobile-filter-button {
    position: relative;
  }

  .mobile-filter-button.active {
    background: #ccfbf1;
    color: var(--brand-dark);
  }

  .mobile-filter-button span {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  .mobile-filter-chips button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-filter-chips .icon {
    width: 13px;
    height: 13px;
  }

  .mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    background: rgba(15, 23, 42, 0.58);
  }

  .mobile-filter-sheet {
    width: 100%;
    display: grid;
    gap: 14px;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
    background: #fff;
    box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.24);
  }

  .mobile-filter-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-filter-sheet label {
    display: grid;
    gap: 6px;
    font-weight: 700;
  }

  .mobile-filter-sheet select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 11px;
    background: #fff;
    color: var(--ink);
  }

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

  .image-modal-stage {
    grid-template-columns: 1fr;
    height: min(62dvh, 520px);
  }

  .image-modal-stage .icon-btn {
    width: 100%;
  }

  .image-modal-stage img {
    height: 100%;
    min-height: 280px;
  }

  .cart-float {
    left: 14px;
    right: 14px;
    bottom: 88px;
  }

  .cart-button {
    width: 100%;
    min-width: 0;
  }

  .product-admin-grid,
  .inline-field,
  .customer-permissions {
    grid-template-columns: 1fr;
  }

  .admin-filterbar {
    grid-template-columns: 1fr;
  }

  .audit-filterbar {
    grid-template-columns: 1fr;
  }

  .audit-filter-actions .btn {
    flex: 1;
  }

  .permission-card,
  .group-permission-card,
  .permission-search-row {
    grid-template-columns: 1fr;
  }

  .permission-open-btn {
    justify-self: stretch;
    width: 100%;
  }

  .product-preview {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .intro h1 {
    font-size: 32px;
  }

  .auth-wrap {
    padding: 14px;
  }

  .auth-grid {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    gap: 14px;
  }

  .auth-card {
    width: calc(100vw - 28px);
    max-width: 100%;
  }

  .intro {
    min-height: 230px;
    padding: 10px 12px 18px;
  }

  .auth-brand-logo {
    width: min(280px, 76vw);
  }

  .auth-intro-copy p {
    margin-bottom: 0;
    font-size: 15px;
  }
}
