:root {
  --bg: #f6f3ee;
  --surface: #fffdf9;
  --surface-strong: #fbf7ee;
  --ink: #0e0e0e;
  --muted: #615a4c;
  --line: #dbcfae;
  --accent: #d6af36;
  --accent-soft: rgba(214, 175, 54, 0.16);
  --danger: #9f1239;
  --warning: #92400e;
  --shadow: 0 18px 50px rgba(14, 14, 14, 0.08);
  --font-ui: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(214, 175, 54, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(14, 14, 14, 0.06), transparent 26%),
    var(--bg);
}

a {
  color: #8d6b0b;
  text-decoration: none;
}

button,
.button-link {
  border: 0;
  background: var(--ink);
  color: var(--surface);
  font-family: inherit;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}

button.button-success {
  background: var(--accent);
  color: var(--ink);
}

button.button-accent,
.button-accent {
  background: var(--accent);
  color: var(--ink);
}

button.button-danger,
.button-danger {
  background: #a22727;
  color: #fff8f6;
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font: inherit;
}

::placeholder {
  color: #8f8877;
  opacity: 1;
}

input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button,
input::-webkit-clear-button,
input::-webkit-search-cancel-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none;
}

div[data-lastpass-icon-root],
iframe[data-lastpass-root] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(214, 175, 54, 0.44);
  outline-offset: 3px;
}

label span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 1.75rem;
  background: rgba(255, 253, 248, 0.85);
  border-right: 1px solid rgba(219, 207, 174, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: 0;
  align-items: center;
  margin-bottom: 2rem;
  color: var(--ink);
}

.brand-logo {
  width: auto;
  height: 64px;
  display: block;
  object-fit: contain;
}

.mobile-brand-wrap {
  display: none;
  margin-bottom: 1rem;
}

.brand-mobile {
  margin-bottom: 0;
}

.nav {
  display: grid;
  gap: 0.45rem;
}

.nav a {
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  color: var(--ink);
}

.nav a:hover {
  background: rgba(255, 248, 236, 0.7);
}

.content {
  padding: 2rem;
}

.page-header {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.5rem;
}

.eyebrow {
  letter-spacing: 0.02em;
  font-size: 0.92rem;
  color: #8d6b0b;
  margin: 0 0 0.4rem 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

.lead {
  color: var(--muted);
  max-width: 60ch;
}

.stats-grid,
.split,
.detail-grid,
.form-grid {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

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

.panel,
.stat-card,
.login-card {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(222, 214, 197, 0.9);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  margin: 0.3rem 0;
}

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

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.pill {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-strong);
  font-size: 0.83rem;
}

.stack,
.stack-large,
.event-list,
.feature-list {
  display: grid;
  gap: 1rem;
}

.stack-large {
  gap: 1.4rem;
}

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

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

.actions {
  display: flex;
  justify-content: flex-end;
}

.actions-left {
  justify-content: flex-start;
}

.users-page-header {
  align-items: center;
}

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

.meta-grid dt {
  color: var(--muted);
  font-size: 0.88rem;
}

.meta-grid dd {
  margin: 0.2rem 0 0;
}

.status-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: var(--surface-strong);
}

.code-block {
  overflow-x: auto;
  white-space: pre-wrap;
  background: #18202f;
  color: #f6f8fb;
  border-radius: 18px;
  padding: 1rem;
  font-size: 0.87rem;
  line-height: 1.5;
}

.event-card {
  padding: 1rem;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--line);
}

.event-header,
.user-card,
.user-row,
.filter-bar,
.action-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.event-header {
  justify-content: space-between;
}

.user-card {
  justify-content: space-between;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.filter-bar {
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  max-width: 320px;
}

.user-email {
  margin-top: 0.2rem;
  color: var(--muted);
}

.users-top {
  align-items: start;
}

.user-create-panel,
.user-edit-panel {
  min-height: 100%;
}

.user-profile,
.user-table-person {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: #8d6b0b;
  font-size: 1.02rem;
  font-weight: 600;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(214, 175, 54, 0.28), 0 8px 18px rgba(14, 14, 14, 0.08);
}

.user-avatar-small {
  width: 46px;
  height: 46px;
  font-size: 1.02rem;
}

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

.user-meta-grid > div {
  padding: 0.95rem;
  border: 1px solid rgba(219, 207, 174, 0.78);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.72);
}

.user-meta-grid span,
.user-meta-grid strong {
  display: block;
}

.user-meta-grid strong {
  margin-top: 0.35rem;
}

.input-static {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--ink);
}

.table-row-active {
  background: rgba(214, 175, 54, 0.08);
}

.table-actions {
  text-align: right;
}

.button-link-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
}

.data-table tbody tr {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.data-table tbody tr:hover {
  background: rgba(214, 175, 54, 0.11);
  box-shadow: inset 3px 0 0 rgba(214, 175, 54, 0.72);
}

.checkbox-panel {
  min-height: 52px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
}

.checkbox-panel span {
  margin-bottom: 0;
}

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

.permission-card {
  padding: 1.1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: white;
}

.permission-card strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.04rem;
}

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

.panel-light {
  background: rgba(255, 252, 246, 0.82);
}

.users-detail-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: start;
}

.users-list-panel {
  min-height: 60vh;
}

.users-toolbar {
  justify-content: space-between;
}

.user-row-link {
  color: var(--ink);
}

.user-detail-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
}

.user-summary-card {
  margin-bottom: 1rem;
  padding: 1.35rem;
}

.user-summary-header {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.55fr);
  gap: 1.4rem;
  align-items: center;
}

.user-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.85rem;
}

.summary-stat {
  min-height: 72px;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(219, 207, 174, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.summary-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.summary-value {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: nowrap;
}

.role-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  line-height: 1;
}

.role-badge {
  background: var(--ink);
  color: var(--surface);
}

.status-badge {
  background: #ecfdf5;
  color: #14532d;
}

.status-badge-inactive {
  background: #fff7ed;
  color: #7c2d12;
}

.users-profile-card {
  align-self: start;
  position: sticky;
  top: 2rem;
}

.user-profile-large {
  margin-bottom: 1.2rem;
}

.user-summary-stack strong,
.empty-state strong {
  display: block;
}

.user-tab-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.user-tab-nav a {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.84);
  color: var(--ink);
}

.user-tab-nav a.active {
  background: var(--ink);
  color: var(--surface);
}

.permission-card-active {
  border-color: rgba(214, 175, 54, 0.7);
  box-shadow: 0 10px 24px rgba(214, 175, 54, 0.12);
}

.role-preview-grid {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.role-preview-card {
  padding: 0.9rem;
  border-color: rgba(219, 207, 174, 0.72);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.role-preview-card strong {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
}

.role-preview-card p {
  font-size: 0.93rem;
}

.users-data-table th:nth-child(5),
.users-data-table th:nth-child(6),
.users-data-table td:nth-child(5),
.users-data-table td:nth-child(6),
.user-meta-grid strong {
  white-space: nowrap;
}

.section-divider {
  height: 1px;
  background: var(--line);
}

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

.empty-state p {
  margin: 0.6rem 0 1.2rem 0;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.45rem;
  flex: 0 0 auto;
}

.status-badge .status-dot {
  margin-right: 0;
}

.status-active {
  background: #0f766e;
}

.status-inactive {
  background: #b45309;
}

.feature-list {
  margin: 0;
  padding-left: 1.2rem;
}

.feature-list li {
  line-height: 1.5;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.mini-stats div {
  padding: 1rem;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--line);
}

.mini-stats strong {
  display: block;
  font-size: 1.5rem;
}

.mini-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.login-body {
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(214, 175, 54, 0.22), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(14, 14, 14, 0.08), transparent 18%),
    linear-gradient(135deg, #f6f3ee 0%, #f2ece0 48%, #f8f6f1 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

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

.login-card-logo {
  width: auto;
  height: 104px;
  display: block;
  object-fit: contain;
  margin: 0 auto 1.1rem auto;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.login-panel-full {
  min-height: 100vh;
}

.login-card {
  width: min(640px, 100%);
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #8d6b0b;
  font-size: 0.85rem;
}

.login-card-polished {
  max-width: 460px;
  padding: 2.75rem;
  border-radius: 32px;
  background: rgba(255, 252, 246, 0.98);
  text-align: center;
}

.login-copy {
  margin: 0 0 1.4rem 0;
  color: var(--muted);
  font-size: 1rem;
}

.flash-stack {
  display: grid;
  gap: 0.7rem;
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  width: min(360px, calc(100vw - 2rem));
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.flash-success {
  background: #ecfdf5;
}

.flash-warning {
  background: #fff7ed;
}

.flash-error {
  background: #fff1f2;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.checkbox input {
  width: auto;
}

.compact span {
  margin: 0;
}

.qty-input {
  max-width: 90px;
}

.price-input {
  min-width: 110px;
}

.price-breaks-cell {
  min-width: 180px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.page-header-products {
  align-items: center;
}

.inventory-title-row,
.page-header-actions,
.inventory-toolbar-row,
.toolbar-cluster,
.filter-chip-row,
.bulk-toolbar-row,
.bulk-toolbar-actions,
.products-table-meta,
.pagination-bar,
.pagination-actions,
.empty-actions,
.row-actions,
.drawer-actions {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.inventory-title-row {
  margin-bottom: 0.35rem;
}

.record-badge,
.filter-chip,
.page-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.84);
  color: var(--ink);
}

.record-badge {
  font-size: 0.9rem;
  color: #8d6b0b;
}

.inventory-toolbar {
  margin-bottom: 1rem;
}

.inventory-toolbar-row {
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
}

.toolbar-search {
  flex: 1 1 320px;
  max-width: 520px;
}

.toolbar-search input {
  min-height: 54px;
}

.toolbar-cluster {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-field {
  min-width: 118px;
}

.toolbar-field span {
  margin-bottom: 0.35rem;
}

.toolbar-field-compact select {
  min-width: 106px;
}

.filter-menu {
  position: relative;
}

.filter-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 0.78rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
}

.filter-menu summary::-webkit-details-marker {
  display: none;
}

.filter-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  min-width: 240px;
  max-height: 280px;
  overflow: auto;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.98);
  box-shadow: var(--shadow);
}

.filter-check {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.filter-check:last-child {
  margin-bottom: 0;
}

.filter-check input,
.table-checkbox input {
  width: auto;
  flex: 0 0 auto;
}

.filter-check-inline {
  margin: 0;
  padding: 0.78rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
}

.compact-note {
  margin: 0;
  font-size: 0.9rem;
}

.filter-chip-row {
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-chip-clear {
  background: var(--ink);
  color: var(--surface);
}

.error-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  border-color: rgba(159, 18, 57, 0.2);
  background: #fff6f8;
}

.error-banner p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.bulk-toolbar {
  margin-bottom: 1rem;
}

.bulk-toolbar-row {
  justify-content: space-between;
  flex-wrap: wrap;
}

.products-panel {
  position: relative;
  overflow: hidden;
}

.products-table-meta {
  justify-content: space-between;
  margin-bottom: 0.8rem;
  color: var(--muted);
}

.inventory-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 320px);
  border: 1px solid rgba(219, 207, 174, 0.78);
  border-radius: 20px;
}

.inventory-table {
  min-width: 1080px;
}

.inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 252, 246, 0.98);
  backdrop-filter: blur(10px);
}

.inventory-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.inventory-row {
  cursor: pointer;
}

.inventory-row:hover {
  background: rgba(214, 175, 54, 0.11);
}

.inventory-row-archived {
  opacity: 0.84;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}

.checkbox-col {
  width: 56px;
  min-width: 56px;
  text-align: center;
}

.sku-col {
  width: 140px;
  min-width: 140px;
  white-space: nowrap;
}

.name-col {
  min-width: 280px;
}

.supplier-col,
.category-col {
  min-width: 150px;
}

.qty-col {
  width: 110px;
  min-width: 110px;
}

.price-col {
  width: 120px;
  min-width: 120px;
}

.actions-col {
  width: 180px;
  min-width: 180px;
}

.table-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
}

.sort-arrow {
  color: #8d6b0b;
  font-size: 0.95rem;
}

.row-link {
  color: var(--ink);
  font-weight: 600;
}

.product-name-stack {
  display: grid;
  gap: 0.25rem;
}

.product-name-stack .row-link {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-name-stack small,
.archived-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.status-stock-in {
  background: #ecfdf5;
  color: #14532d;
}

.status-stock-in .status-dot {
  background: #15803d;
}

.status-stock-low {
  background: #fff7ed;
  color: #9a3412;
}

.status-stock-low .status-dot {
  background: #d97706;
}

.status-stock-out {
  background: #fff1f2;
  color: #9f1239;
}

.status-stock-out .status-dot {
  background: #e11d48;
}

.row-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.06);
  color: var(--ink);
  box-shadow: none;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button-danger {
  background: rgba(159, 18, 57, 0.1);
  color: var(--danger);
}

.row-action-link {
  padding: 0.3rem 0;
  border: 0;
  background: transparent;
  color: #8d6b0b;
  box-shadow: none;
}

.pagination-bar {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 1rem;
}

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

.pagination-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-pill-active {
  background: var(--ink);
  color: var(--surface);
}

.page-jump-form {
  display: flex;
  gap: 0.6rem;
  align-items: end;
}

.page-jump-form label span {
  margin-bottom: 0.25rem;
}

.page-jump-form input {
  width: 84px;
}

.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.empty-state-illustrated {
  padding: 3.5rem 1.5rem;
}

.empty-state-art {
  width: 160px;
  max-width: 100%;
  margin-bottom: 1rem;
}

.empty-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 14, 0.28);
  backdrop-filter: blur(4px);
  z-index: 50;
}

.product-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 51;
  width: min(560px, 100vw);
  height: 100vh;
  padding: 1.5rem;
  overflow: auto;
  background: rgba(255, 252, 246, 0.98);
  border-left: 1px solid rgba(219, 207, 174, 0.92);
  box-shadow: -24px 0 60px rgba(14, 14, 14, 0.12);
}

.product-drawer-header {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.drawer-section {
  padding: 1rem;
  border: 1px solid rgba(219, 207, 174, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
}

.drawer-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.field-error {
  display: block;
  margin-top: 0.35rem;
  color: var(--danger);
  font-size: 0.88rem;
}

body.inventory-submitting::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 252, 246, 0.36);
  pointer-events: none;
  z-index: 60;
}

@media (max-width: 980px) {
  .shell,
  .stats-grid,
  .split,
  .detail-grid,
  .form-grid,
  .field-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 1rem;
  }

  .mobile-brand-wrap {
    display: block;
  }

  .page-header {
    align-items: start;
    flex-direction: column;
  }

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

  .user-meta-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }

  .user-summary-header,
  .user-detail-shell {
    grid-template-columns: 1fr;
  }

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

  .users-profile-card {
    position: static;
  }

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

  .login-panel {
    padding: 1rem;
  }

  .login-card-polished {
    padding: 1.5rem;
    border-radius: 24px;
  }

  .flash-stack {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .inventory-toolbar-row,
  .products-table-meta,
  .pagination-bar,
  .bulk-toolbar-row,
  .page-header-products {
    align-items: start;
    flex-direction: column;
  }

  .toolbar-cluster,
  .pagination-actions,
  .page-header-actions {
    justify-content: flex-start;
  }

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

  .product-drawer {
    width: 100vw;
    padding: 1rem;
  }
}
