:root {
  color-scheme: dark;
  --bg: #090a0f;
  --bg-2: #0f1118;
  --surface: rgba(20, 22, 31, .84);
  --surface-2: rgba(28, 31, 42, .72);
  --surface-solid: #151821;
  --text: #f6f7fb;
  --ink: #f6f7fb;
  --muted: #9ba3b5;
  --line: rgba(255, 255, 255, .1);
  --soft: #0f1118;
  --white: #ffffff;
  --black: #090a0f;
  --red: #e31b2f;
  --red-dark: #a50f17;
  --red-soft: rgba(227, 27, 47, .14);
  --good: #21c179;
  --warn: #f5b84b;
  --blue: #75a7ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, .22);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 284px;
  --sidebar-collapsed: 86px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f9;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, .86);
  --surface-2: rgba(255, 255, 255, .72);
  --surface-solid: #ffffff;
  --text: #171923;
  --ink: #171923;
  --muted: #687083;
  --line: rgba(20, 23, 35, .1);
  --soft: #f5f6f9;
  --black: #101114;
  --shadow: 0 24px 70px rgba(33, 37, 51, .12);
  --shadow-soft: 0 16px 40px rgba(33, 37, 51, .1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% -10%, rgba(227, 27, 47, .22), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(117, 167, 255, .16), transparent 24%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid rgba(227, 27, 47, .38);
  outline-offset: 2px;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 460px);
  background: var(--bg);
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(9, 10, 15, .7), rgba(9, 10, 15, .95)),
    url("https://images.unsplash.com/photo-1618843479313-40f8afb4b4d8?auto=format&fit=crop&w=1600&q=82") center/cover;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0;
}

.brand-mark span:first-child {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--red), #ff5666);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(227, 27, 47, .34);
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-visual h1 {
  max-width: 640px;
  font-size: 58px;
  line-height: 1;
  margin: 0;
}

.login-visual p {
  max-width: 560px;
  color: #d5dae6;
}

.login-panel {
  background: var(--surface);
  backdrop-filter: blur(22px);
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
}

.login-panel h2,
.view-head h1 {
  margin: 0 0 8px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(227, 27, 47, .58);
  box-shadow: 0 0 0 4px rgba(227, 27, 47, .12);
  outline: none;
}

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

.btn,
.icon-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.btn {
  min-height: 42px;
  padding: 10px 14px;
  background: var(--surface-solid);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.btn.red {
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  background: linear-gradient(135deg, var(--red), #ff4354);
  box-shadow: 0 14px 32px rgba(227, 27, 47, .28);
}

.btn.light,
.btn.ghost {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

:root[data-theme="light"] .btn.light,
:root[data-theme="light"] .btn.ghost {
  background: #fff;
}

.btn.good {
  background: linear-gradient(135deg, var(--good), #48d99a);
  color: #062012;
}

.btn.warn {
  background: linear-gradient(135deg, var(--warn), #ffd27a);
  color: #2c1d00;
}

.btn.block {
  width: 100%;
}

.icon-btn {
  width: 42px;
  height: 42px;
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.shell.is-collapsed {
  grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #fff;
  background: rgba(9, 10, 15, .78);
  border-right: 1px solid rgba(255, 255, 255, .09);
  backdrop-filter: blur(24px);
  z-index: 30;
}

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

.sidebar-head .brand-mark {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
}

.sidebar-head .brand-mark span:first-child {
  width: 40px;
  height: 40px;
}

.sidebar-head .collapse {
  flex: 0 0 auto;
}

.collapse .icon {
  transition: transform .18s ease;
}

.is-collapsed .collapse .icon {
  transform: rotate(180deg);
}

.is-collapsed .brand-text,
.is-collapsed .nav button span,
.is-collapsed .user-meta,
.is-collapsed .userbox .btn {
  display: none;
}

.is-collapsed .sidebar {
  align-items: center;
}

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

.nav button {
  min-height: 46px;
  border: 0;
  background: transparent;
  color: #bfc5d4;
  text-align: left;
  padding: 0 13px;
  border-radius: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav button:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  transform: translateX(2px);
}

.nav button.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(227, 27, 47, .28), rgba(255, 255, 255, .08));
  box-shadow: inset 0 0 0 1px rgba(227, 27, 47, .22);
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: -18px;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: var(--red);
}

.userbox {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 18px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
}

.userbox .btn {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #2b2f3c, var(--red));
}

.user-meta {
  min-width: 0;
}

.user-meta strong,
.user-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta span {
  color: #9ba3b5;
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(260px, 560px) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(22px);
}

.topbar-left,
.topbar-actions,
.profile-chip,
.global-search {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 12px;
  min-width: 0;
}

.topbar-left strong {
  display: block;
  font-size: 15px;
}

.crumb {
  color: var(--muted);
  font-size: 12px;
}

.menu {
  display: none;
}

.global-search {
  gap: 9px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.global-search input {
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 10px;
}

.notification {
  position: relative;
}

.notification > span:last-child {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.profile-chip {
  gap: 8px;
  min-height: 42px;
  max-width: 180px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 800;
}

.profile-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  padding: 28px;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.loader-card {
  width: min(420px, 100%);
  padding: 32px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.loader-card h1 {
  margin: 18px 0 8px;
  font-size: 26px;
}

.loader-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.loader {
  width: 42px;
  height: 42px;
  display: inline-block;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, .14);
  border-top-color: var(--red);
  animation: spin .8s linear infinite;
}

.error-state .icon {
  width: 44px;
  height: 44px;
  color: var(--red);
}

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

.panel,
.card,
.table-wrap,
.modal-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 20px;
  padding: 26px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(227, 27, 47, .22), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02));
}

:root[data-theme="light"] .dashboard-hero {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(227, 27, 47, .16), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .78));
}

.dashboard-hero h1 {
  margin: 4px 0 8px;
  font-size: 42px;
  line-height: 1.02;
}

.dashboard-hero p {
  margin: 0;
  color: #d6dbea;
}

:root[data-theme="light"] .dashboard-hero p {
  color: var(--muted);
}

.hero-metrics {
  display: flex;
  gap: 10px;
}

.hero-metrics span {
  min-width: 132px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #d6dbea;
}

:root[data-theme="light"] .hero-metrics span {
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
}

.hero-metrics strong {
  display: block;
  color: #fff;
  font-size: 18px;
}

:root[data-theme="light"] .hero-metrics strong {
  color: var(--text);
}

.eyebrow {
  color: #ffb6bd;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.view-head h1 {
  font-size: 34px;
  line-height: 1.05;
}

.view-head p {
  margin: 0;
}

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

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

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

.card {
  border-radius: var(--radius);
  padding: 18px;
}

.glass {
  background:
    linear-gradient(135deg, rgba(227, 27, 47, .08), transparent 46%),
    var(--surface);
}

.card h2 {
  margin: 0;
  font-size: 18px;
}

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

.card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stat {
  position: relative;
  overflow: hidden;
  min-height: 154px;
}

.stat::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -42px;
  bottom: -48px;
  border-radius: 50%;
  background: var(--red-soft);
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.stat .icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff5666);
  box-shadow: 0 14px 30px rgba(227, 27, 47, .22);
}

.trend {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--good);
  background: rgba(33, 193, 121, .12);
  font-size: 12px;
  font-weight: 900;
}

.stat.low .trend {
  color: var(--warn);
  background: rgba(245, 184, 75, .13);
}

.stat.out .trend {
  color: #ff7180;
  background: rgba(227, 27, 47, .15);
}

.stat strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin: 8px 0;
}

.stat small {
  color: var(--muted);
  font-weight: 750;
}

.split {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  align-items: start;
}

.dashboard-grid {
  margin-top: 16px;
}

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

.alert {
  border: 1px solid rgba(227, 27, 47, .22);
  background: rgba(227, 27, 47, .1);
  padding: 12px;
  border-radius: 13px;
}

.alert-content,
.item-row,
.movement-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.alert-content > span,
.movement-row > span:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-content strong,
.alert-content small {
  display: block;
}

.alert-content small {
  color: var(--muted);
}

.item-row,
.movement-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .04);
}

.qty-change {
  color: var(--text);
  font-weight: 900;
}

.filters {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

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

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

th {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
  letter-spacing: .04em;
}

tr {
  transition: background .18s ease;
}

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

.thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--red-soft);
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  color: #ff7180;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(33, 193, 121, .13);
  color: var(--good);
}

.pill.low {
  background: rgba(245, 184, 75, .13);
  color: var(--warn);
}

.pill.out {
  background: rgba(227, 27, 47, .14);
  color: #ff7180;
}

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

.brand-manager {
  margin-bottom: 16px;
}

.brand-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.brand-form .field {
  margin: 0;
}

.brand-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.brand-item {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .04);
}

.brand-item > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.brand-item small {
  color: var(--muted);
  font-weight: 800;
}

.brand-item .icon {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff5666);
}

.btn:disabled,
.btn:disabled:hover {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

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

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(940px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: var(--radius);
  padding: 22px;
  animation: modalIn .18s ease both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.doc-builder {
  grid-template-columns: minmax(0, 1fr) 360px;
}

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

.doc-item {
  display: grid;
  grid-template-columns: 1fr 80px 100px 42px;
  gap: 8px;
  align-items: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 13px 16px;
  border-radius: 13px;
  opacity: 0;
  transform: translateY(12px);
  transition: .2s;
  z-index: 70;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.graph-grid {
  display: grid;
  gap: 18px;
}

.stock-health {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .04);
}

.donut {
  width: 126px;
  height: 126px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--surface-solid) 0 51%, transparent 52%),
    conic-gradient(
      var(--good) 0 calc(var(--healthy) * 1%),
      var(--warn) calc(var(--healthy) * 1%) calc((var(--healthy) + var(--low)) * 1%),
      var(--red) calc((var(--healthy) + var(--low)) * 1%) 100%
    );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.donut span {
  font-size: 24px;
  font-weight: 950;
}

.legend {
  display: grid;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
}

.legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 8px;
}

.legend .ok { background: var(--good); }
.legend .low { background: var(--warn); }
.legend .out { background: var(--red); }

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 112px 1fr 42px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.bar-row div {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), #ff8a96);
}

.bar-row strong {
  color: var(--text);
  text-align: right;
}

.empty-state {
  min-height: 170px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 13px;
  padding: 24px;
}

.empty-state .icon {
  width: 38px;
  height: 38px;
  color: var(--red);
}

.empty-state strong {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .global-search {
    order: 3;
    grid-column: 1 / -1;
  }

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

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

  .hero-metrics {
    flex-wrap: wrap;
  }
}

@media (max-width: 980px) {
  .login,
  .shell,
  .split,
  .doc-builder {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 320px;
  }

  .login-visual h1 {
    font-size: 40px;
  }

  .dashboard-hero h1 {
    font-size: 34px;
  }

  .view-head h1 {
    font-size: 30px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 310px);
    transform: translateX(-100%);
    transition: transform .22s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .is-collapsed .sidebar {
    align-items: stretch;
  }

  .is-collapsed .brand-text,
  .is-collapsed .nav button span,
  .is-collapsed .user-meta,
  .is-collapsed .userbox .btn {
    display: initial;
  }

  .menu {
    display: inline-flex;
  }

  .collapse {
    display: none;
  }

  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .content {
    padding: 18px 16px 28px;
  }

  .filters,
  .form-grid,
  .brand-form {
    grid-template-columns: 1fr;
  }

  .view-head {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .login-panel,
  .login-visual {
    padding: 26px;
  }

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

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

  .topbar-left,
  .topbar-actions,
  .actions,
  .alert-content,
  .item-row,
  .movement-row {
    align-items: stretch;
  }

  .topbar-actions,
  .actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .profile-chip {
    display: none;
  }

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

  .hero-metrics,
  .alert-content,
  .item-row,
  .movement-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .icon-btn,
  .topbar .btn {
    width: auto;
  }

  .stock-health {
    grid-template-columns: 1fr;
    justify-items: center;
  }

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

  .bar-row strong {
    text-align: left;
  }
}
