:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fffaf0;
  --ink: #2a2418;
  --muted: #776c5b;
  --line: #eadfcb;
  --line-soft: #f3ead8;
  --brand: #b8890b;
  --brand-dark: #7f5d00;
  --accent: #c99a18;
  --danger: #b42318;
  --success: #16803c;
  --sidebar: #fffdf8;
  --sidebar-soft: #fff4d8;
  --shadow: 0 20px 60px rgba(103, 78, 16, 0.12);
  --shadow-soft: 0 10px 30px rgba(103, 78, 16, 0.08);
  font-family: "Inter", "Noto Sans Thai", "Tahoma", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, #fffdf8 0, #ffffff 260px),
    var(--bg);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(201, 154, 24, 0.12), transparent 280px),
    radial-gradient(circle at 90% 0%, rgba(184, 137, 11, 0.1), transparent 340px);
  z-index: -1;
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(212, 171, 55, 0.18), transparent 360px),
    var(--bg);
}

.login-panel {
  width: min(440px, 100%);
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-logo {
  width: 210px;
  max-width: 76%;
  display: block;
  margin: 0 auto 20px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 24px;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  margin: 0;
  font-size: 18px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 7px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(184, 137, 11, 0.18);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.35;
}

.stack-form,
.operation-panel,
.modal-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(184, 137, 11, 0.16);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(180deg, #cfa324, var(--brand));
  color: #fff;
  box-shadow: 0 8px 18px rgba(184, 137, 11, 0.18);
}

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

.ghost-button {
  background: #fffdf8;
  border-color: var(--line);
  color: var(--ink);
}

.danger-button {
  background: #fff5f4;
  border-color: #f2b8b3;
  color: var(--danger);
}

.icon-button {
  width: 40px;
  min-width: 40px;
  padding: 0;
  background: #fffdf8;
  border-color: var(--line);
  color: var(--brand-dark);
}

.button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.receive-action,
.transfer-action,
.history-action,
.add-line-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.receive-action {
  background: linear-gradient(180deg, #22c55e, #16803c);
  color: #fff;
  box-shadow: 0 10px 20px rgba(22, 128, 60, 0.18);
}

.receive-action:hover {
  background: #137236;
}

.transfer-action {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
}

.transfer-action:hover {
  background: #bfdbfe;
}

.history-action {
  border-color: #e9d5ff;
  background: linear-gradient(180deg, #faf5ff, #f3e8ff);
  color: #7e22ce;
}

.add-line-button {
  border-color: #f5d48a;
  background: #fff7df;
  color: var(--brand-dark);
}

.add-line-button:hover {
  background: #ffefbd;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 30px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  color: var(--ink);
  border-right: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(103, 78, 16, 0.06);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 218px;
  padding: 0;
  border-bottom: 0;
}

.sidebar-brand span:not(.brand-mark) {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.main-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 0;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 40px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--brand-dark);
}

.mobile-menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.sidebar.menu-open .mobile-menu-button span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sidebar.menu-open .mobile-menu-button span:nth-child(2) {
  opacity: 0;
}

.sidebar.menu-open .mobile-menu-button span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-group {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item,
.logout-button,
.nav-parent {
  width: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
  color: #5c4b26;
  text-align: left;
  font-weight: 800;
  position: relative;
}

.nav-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #9aa0a6;
}

.nav-parent {
  min-width: 148px;
  justify-content: space-between;
}

.nav-parent.active,
.nav-parent:hover {
  background: transparent;
  color: var(--brand-dark);
  box-shadow: none;
}

.nav-parent.active::after,
.nav-item.active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -8px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.chevron {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.nav-submenu {
  display: none;
  gap: 6px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffefb;
  box-shadow: var(--shadow);
}

.nav-group.open .nav-submenu {
  display: grid;
}

.nav-group.open .chevron {
  transform: rotate(90deg);
}

.nav-item span {
  color: var(--muted);
  font-size: 12px;
}

.nav-item.sub-item {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  padding-left: 14px;
  font-size: 14px;
  border-radius: 8px;
}

.nav-item:hover,
.nav-item.active {
  background: transparent;
  color: var(--brand-dark);
  box-shadow: none;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon,
.nav-parent:hover .nav-icon,
.nav-parent.active .nav-icon {
  color: var(--brand);
}

.logout-button {
  flex: 0 0 auto;
  margin-top: 0;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
}

.workspace {
  min-width: 0;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px 28px 44px;
}

.topbar,
.toolbar,
.panel-heading,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.topbar h1 {
  margin-bottom: 0;
}

.user-chip {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.user-chip span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff0c2;
  color: var(--brand-dark);
  font-weight: 900;
}

.user-chip small {
  display: block;
  color: var(--muted);
}

.view-section {
  display: none;
}

.active-view {
  display: grid;
  gap: 18px;
}

.toolbar {
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-box {
  flex: 1 1 280px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input {
  min-height: 40px;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-tile {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8, #fff);
}

.stat-tile strong {
  font-size: 22px;
  color: var(--brand-dark);
}

.stat-tile span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.table-wrap.embedded {
  border-radius: 6px;
}

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

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #fffaf0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.actions-cell {
  width: 160px;
  text-align: right;
}

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

.product-cell,
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fff1bf;
  color: var(--brand-dark);
  font-weight: 900;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subtext {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.map-link {
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

.branch-info {
  min-width: 220px;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 28px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.status-active {
  background: #eef8f0;
  color: var(--success);
}

.status-inactive {
  background: #f2f4f3;
  color: var(--muted);
}

.operation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.tabbar {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.tab-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.tab-button.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(103, 78, 16, 0.1);
}

.central-panel {
  display: none;
}

.central-panel.active-panel {
  display: grid;
}

.operation-grid.branch-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.operation-panel,
.activity-band {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

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

.form-grid.compact {
  gap: 12px;
}

.span-2 {
  grid-column: span 2;
}

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

.line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 112px 40px;
  gap: 8px;
  align-items: end;
}

.transfer-row {
  grid-template-columns: minmax(0, 1fr) 112px 40px;
}

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

.summary-card > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 20px;
}

.summary-note {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fffdf8;
}

.summary-table {
  min-width: 560px;
}

.inline-field {
  width: min(360px, 100%);
}

.important-field {
  padding: 10px;
  border: 1px solid #f0c866;
  border-radius: 12px;
  background: #fff8e5;
}

.important-field span {
  color: var(--brand-dark);
}

.branch-stock-toolbar {
  align-items: end;
}

.branch-actions {
  margin-left: auto;
}

.branch-actions #openSaleButton {
  order: 2;
}

.branch-actions #openSaleHistoryButton {
  order: 1;
}

.chat-shell {
  height: min(720px, calc(100vh - 154px));
  min-height: 520px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.chat-messages {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px;
  background: linear-gradient(180deg, #fffdf8, #fff);
}

.chat-message {
  max-width: min(720px, 86%);
  padding: 12px 14px;
  border-radius: 14px;
  white-space: pre-line;
}

.chat-message p {
  margin: 0;
}

.bot-message {
  justify-self: start;
  border: 1px solid var(--line);
  background: #fff;
}

.user-message {
  justify-self: end;
  background: #fff0c2;
  color: var(--brand-dark);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.activity-log {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.activity-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
}

.activity-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 36, 24, 0.46);
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-header {
  margin-bottom: 16px;
}

.modal-header h2 {
  font-size: 22px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.branch-children {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.child-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

@media (max-width: 980px) {
  .sidebar {
    position: sticky;
    height: auto;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 8px 18px;
  }

  .sidebar-brand {
    min-width: 0;
    flex: 1 1 260px;
  }

  .main-nav {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

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

  .nav-group {
    display: flex;
    flex: 0 0 auto;
  }

  .nav-parent,
  .nav-item,
  .logout-button {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
    border-radius: 0;
    white-space: nowrap;
  }

  .nav-parent {
    min-width: 0;
  }

  .nav-submenu {
    position: absolute;
    width: 220px;
    margin-top: 0;
    box-shadow: var(--shadow);
    background: #fffefb;
  }

  .logout-button {
    flex: 0 0 auto;
  }

  .operation-grid,
  .operation-grid.branch-layout,
  .summary-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 17px;
  }

  .sidebar {
    padding: 7px 12px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .sidebar-brand {
    flex: 1 1 0;
    min-width: 0;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .sidebar-logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

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

  .sidebar-brand span:not(.brand-mark) {
    display: none;
  }

  .workspace {
    padding: 14px 12px 28px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
    border-radius: 12px;
  }

  .user-chip {
    width: 100%;
  }

  .main-nav {
    order: 3;
    display: none;
    width: 100%;
    flex: 0 0 100%;
    margin-inline: 0;
    padding: 8px 0 2px;
    overflow: visible;
    border-top: 1px solid var(--line-soft);
  }

  .sidebar.menu-open .main-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .nav-group {
    display: grid;
    position: relative;
    width: 100%;
  }

  .nav-submenu {
    position: static;
    z-index: auto;
    width: 100%;
    margin-top: 4px;
    padding: 5px;
    box-shadow: none;
    background: #fffaf0;
  }

  .nav-parent,
  .nav-item,
  .logout-button {
    width: 100%;
    min-height: 40px;
    justify-content: flex-start;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
  }

  .nav-parent {
    min-width: 0;
  }

  .nav-parent.active::after,
  .nav-item.active::after {
    right: auto;
    bottom: 8px;
    left: 0;
    width: 3px;
    height: 24px;
  }

  .logout-button {
    display: none;
    order: 4;
    width: 100%;
    flex: 0 0 auto;
    min-height: 42px;
    justify-content: center;
    padding: 0 12px;
    font-size: 13px;
    gap: 8px;
  }

  .sidebar.menu-open .logout-button {
    display: flex;
  }

  .nav-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .toolbar,
  .panel-heading,
  .modal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions,
  .modal-actions,
  .row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .toolbar-actions > *,
  .modal-actions > *,
  .row-actions > * {
    width: 100%;
  }

  .branch-actions {
    margin-left: 0;
  }

  .important-field {
    width: 100%;
  }

  .form-grid,
  .line-row,
  .transfer-row,
  .child-row {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .summary-strip,
  .summary-card {
    grid-template-columns: 1fr;
  }

  .operation-panel,
  .activity-band {
    padding: 14px;
    border-radius: 12px;
  }

  .table-wrap {
    border-radius: 12px;
    margin-inline: -2px;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 620px;
    font-size: 13px;
  }

  .branch-table {
    min-width: 860px;
  }

  th,
  td {
    padding: 12px 10px;
  }

  .product-cell,
  .user-cell {
    min-width: 190px;
  }

  .thumb {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .actions-cell {
    width: auto;
  }

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

  .modal-root {
    align-items: end;
    padding: 8px;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 10px 10px;
    padding: 14px;
  }

  .toast {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
  }

  .chat-shell {
    height: calc(100vh - 150px);
    min-height: 420px;
    border-radius: 12px;
  }

  .chat-messages {
    padding: 12px;
  }

  .chat-message {
    max-width: 94%;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }
}
