:root {
  --canvas: #f7f8f2;
  --surface: #ffffff;
  --surface-soft: #f1f4ec;
  --surface-warm: #fff8e8;
  --ink: #17342a;
  --ink-soft: #5f716a;
  --muted: #8a9892;
  --line: #dfe6dc;
  --line-strong: #ccd7ca;
  --green: #255c45;
  --green-2: #34785a;
  --green-soft: #e5f1e9;
  --yellow: #f7cb68;
  --yellow-soft: #fff3ce;
  --coral: #e77b65;
  --coral-soft: #ffebe7;
  --blue: #4d78a8;
  --blue-soft: #eaf2fb;
  --red: #c95151;
  --red-soft: #fae9e8;
  --shadow-sm: 0 2px 8px rgba(28, 62, 48, 0.05);
  --shadow-md: 0 14px 40px rgba(28, 62, 48, 0.1);
  --shadow-lg: 0 28px 70px rgba(28, 62, 48, 0.17);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --sidebar: 260px;
  font-family: Inter, "Aptos", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

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

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

button {
  color: inherit;
}

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

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

img {
  max-width: 100%;
}

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

.is-hidden,
.sr-only {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -60px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 10px 16px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid rgba(37, 92, 69, 0.28);
  outline-offset: 2px;
}

::selection {
  color: var(--ink);
  background: var(--yellow);
}

/* Brand and shared controls */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  font-weight: 800;
}

.brand-name {
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -0.45px;
}

.brand-mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 9px;
  background: var(--green);
  box-shadow: 0 5px 14px rgba(37, 92, 69, 0.18);
}

.brand-mark span {
  border-radius: 2px;
  background: #fff;
}

.brand-mark span:first-child {
  background: var(--yellow);
}

.brand-mark span:last-child {
  background: #ef9a86;
}

.brand-mark--large {
  width: 60px;
  height: 60px;
  padding: 10px;
  gap: 5px;
  border-radius: 17px;
  box-shadow: 0 15px 40px rgba(30, 73, 55, 0.23);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
}

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

.button:active {
  transform: translateY(0);
}

.button svg {
  width: 17px;
  height: 17px;
}

.button--primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 92, 69, 0.18);
}

.button--primary:hover {
  background: #1e4f3a;
  box-shadow: 0 11px 23px rgba(37, 92, 69, 0.23);
}

.button--secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.button--secondary:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.button--soft {
  background: var(--green-soft);
  color: var(--green);
}

.button--danger {
  border-color: #efc4c2;
  background: var(--red-soft);
  color: var(--red);
}

.button--wide {
  width: 100%;
}

.button--small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.icon-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.icon-button:hover {
  color: var(--green);
  background: var(--surface-soft);
}

.icon-button--danger:hover {
  color: var(--red);
  background: var(--red-soft);
}

.avatar {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
}

.avatar--green {
  background: var(--green);
  color: #fff;
}

.avatar--yellow {
  background: var(--yellow);
  color: #5f4810;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #48a672;
  box-shadow: 0 0 0 1px #48a672;
}

kbd {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  padding: 0 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 1px 0 var(--line);
}

/* Login */
.login-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(430px, 1.05fr) minmax(470px, 0.95fr);
  background: #fff;
}

.login-art {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  padding: clamp(54px, 7vw, 100px);
  background: #e9f0df;
}

.login-art::before,
.login-art::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.login-art::before {
  width: 480px;
  height: 480px;
  right: -180px;
  bottom: -180px;
  border: 80px solid rgba(247, 203, 104, 0.55);
}

.login-art::after {
  width: 230px;
  height: 230px;
  top: -90px;
  right: 9%;
  background: rgba(255, 255, 255, 0.42);
}

.login-art__copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-top: 42px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-art h1 {
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(45px, 5vw, 74px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.login-art__copy > p:last-child {
  max-width: 460px;
  color: #52675d;
  font-size: 17px;
  line-height: 1.75;
}

.shelf-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.83);
  padding: 13px 16px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.shelf-card strong,
.shelf-card small {
  display: block;
}

.shelf-card strong {
  font-size: 12px;
}

.shelf-card small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10px;
}

.shelf-card--one {
  right: 8%;
  bottom: 14%;
  transform: rotate(-3deg);
}

.shelf-card--two {
  right: 13%;
  top: 17%;
  transform: rotate(3deg);
}

.shelf-card__icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.mini-bars {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: end;
  justify-content: center;
  gap: 3px;
  border-radius: 10px;
  background: var(--yellow-soft);
  padding: 9px;
}

.mini-bars i {
  width: 4px;
  border-radius: 3px 3px 0 0;
  background: #a77c17;
}

.mini-bars i:nth-child(1) { height: 40%; }
.mini-bars i:nth-child(2) { height: 75%; }
.mini-bars i:nth-child(3) { height: 55%; }
.mini-bars i:nth-child(4) { height: 92%; }

.login-panel {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 48px clamp(32px, 6vw, 90px);
}

.login-panel__inner {
  width: min(100%, 430px);
}

.brand--login {
  margin-bottom: clamp(44px, 8vh, 82px);
}

.login-heading {
  margin-bottom: 24px;
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: #785815;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-heading h2 {
  margin: 12px 0 8px;
  font-size: 31px;
  letter-spacing: -0.035em;
}

.login-heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.demo-accounts {
  display: grid;
  gap: 9px;
  margin-bottom: 22px;
}

.demo-account {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  padding: 11px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.demo-account:hover {
  border-color: var(--green);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.demo-account strong,
.demo-account small {
  display: block;
}

.demo-account strong { font-size: 13px; }
.demo-account small { margin-top: 1px; color: var(--muted); font-size: 11px; }

.role-chip {
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.role-chip--light {
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.login-form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: 0;
  transition: border-color 0.18s, box-shadow 0.18s;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37, 92, 69, 0.1);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > svg {
  position: absolute;
  left: 13px;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.input-wrap input {
  min-height: 44px;
  padding-left: 42px;
}

.input-wrap .input-action {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
}

.input-wrap .input-action + input,
.input-wrap input[type="password"] {
  padding-right: 42px;
}

.form-error {
  min-height: 0;
  margin: -4px 0 0;
  color: var(--red);
  font-size: 12px;
}

.form-error:empty {
  display: none;
}

.local-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.local-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--green);
}

/* App shell */
.app-view {
  min-height: 100vh;
  background: var(--canvas);
}

.sidebar {
  position: fixed;
  z-index: 60;
  display: flex;
  width: var(--sidebar);
  height: 100vh;
  inset: 0 auto 0 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 22px 16px 14px;
}

.sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.sidebar-close {
  display: none;
}

.workspace-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  margin: 24px 2px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 9px;
}

.workspace-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--yellow);
  color: #5e4816;
  font-size: 10px;
  font-weight: 900;
}

.workspace-chip strong,
.workspace-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-chip strong { font-size: 11px; }
.workspace-chip small { color: var(--muted); font-size: 9px; }
.workspace-chip .status-dot { width: 6px; height: 6px; }

.main-nav {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-label {
  margin: 12px 10px 7px;
  color: #9aa69f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-label--second {
  margin-top: 24px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5d6d66;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.nav-item > span:nth-child(2) {
  flex: 1;
}

.nav-count {
  display: inline-flex;
  min-width: 23px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
  padding: 0 6px;
  font-size: 9px;
}

.new-badge {
  border-radius: 999px;
  background: var(--yellow);
  color: #634a0e;
  padding: 3px 6px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar__footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.sidebar-user {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  padding: 7px;
  text-align: left;
  cursor: pointer;
}

.sidebar-user:hover { background: var(--surface-soft); }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user strong { font-size: 11px; }
.sidebar-user small { color: var(--muted); font-size: 9px; }
.sidebar-user > svg { width: 16px; height: 16px; color: var(--muted); }

.user-menu {
  position: absolute;
  z-index: 5;
  right: 3px;
  bottom: 62px;
  left: 3px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 5px;
  box-shadow: var(--shadow-md);
}

.user-menu button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 9px;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.user-menu button:hover { background: var(--surface-soft); }

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 242, 0.93);
  padding: 0 clamp(20px, 3vw, 42px);
  backdrop-filter: blur(14px);
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu { display: none; }

.command-trigger {
  display: flex;
  width: clamp(270px, 30vw, 410px);
  height: 38px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  padding: 0 8px 0 11px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.command-trigger:hover { border-color: var(--line-strong); }
.command-trigger svg { width: 16px; height: 16px; }
.command-trigger span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.command-trigger kbd { height: 19px; font-size: 9px; }

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.save-status .status-dot { width: 6px; height: 6px; }

.notification-button { position: relative; }

.notification-count {
  position: absolute;
  display: inline-flex;
  min-width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  top: 0;
  right: 0;
  border: 2px solid var(--canvas);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  padding: 0 3px;
  font-size: 8px;
  font-weight: 900;
}

.assistant-shortcut {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.assistant-shortcut:hover { background: var(--yellow-soft); border-color: #ebce7e; }
.assistant-spark { color: #b87912; }

.view-content {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: 31px clamp(20px, 3vw, 42px) 54px;
}

/* Page foundation */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 0 0 5px;
  font-size: clamp(25px, 2.2vw, 34px);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.page-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.015em;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.panel-body { padding: 19px 20px; }

.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.text-button:hover { text-decoration: underline; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  position: absolute;
  width: 80px;
  height: 80px;
  content: "";
  right: -28px;
  bottom: -30px;
  border-radius: 50%;
  background: var(--metric-soft, var(--green-soft));
  opacity: 0.8;
}

.metric-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-card__top > span:first-child {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.metric-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--metric-soft, var(--green-soft));
  color: var(--metric-color, var(--green));
}

.metric-icon svg { width: 16px; height: 16px; }

.metric-card__value {
  display: block;
  margin-top: 12px;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.metric-card__meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.metric-card__meta strong { color: var(--green-2); font-weight: 800; }
.metric-card--yellow { --metric-soft: var(--yellow-soft); --metric-color: #8b6512; }
.metric-card--coral { --metric-soft: var(--coral-soft); --metric-color: var(--coral); }
.metric-card--blue { --metric-soft: var(--blue-soft); --metric-color: var(--blue); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-stack { display: grid; gap: 18px; }

.stock-list,
.activity-list,
.chart-list {
  display: grid;
}

.stock-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(110px, 0.65fr) 105px auto;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  border-bottom: 1px solid #edf1eb;
  padding: 9px 20px;
}

.stock-row:last-child { border-bottom: 0; }

.product-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.product-symbol {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--product-soft, var(--green-soft));
  color: var(--product-color, var(--green));
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.product-cell strong,
.product-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-cell strong { font-size: 11px; }
.product-cell small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.quantity-cell strong,
.quantity-cell small { display: block; }
.quantity-cell strong { font-size: 12px; }
.quantity-cell small { color: var(--muted); font-size: 9px; }

.stock-progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.stock-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-2);
}

.stock-progress.is-low span { background: var(--coral); }
.stock-progress.is-out span { background: var(--red); }

.status-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge::before {
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.status-badge--low { background: var(--yellow-soft); color: #8a6516; }
.status-badge--out { background: var(--red-soft); color: var(--red); }
.status-badge--neutral { background: var(--surface-soft); color: var(--ink-soft); }
.status-badge--in { background: var(--green-soft); color: var(--green); }
.status-badge--adjust { background: var(--blue-soft); color: var(--blue); }

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

.quick-action {
  display: flex;
  min-height: 94px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}

.quick-action:hover { border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); }
.quick-action span:first-child { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 9px; background: var(--surface-soft); color: var(--green); }
.quick-action svg { width: 15px; height: 15px; }
.quick-action strong { font-size: 10px; }

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 57px;
  border-bottom: 1px solid #edf1eb;
  padding: 8px 0;
}

.activity-item:last-child { border-bottom: 0; }

.movement-icon {
  display: inline-flex;
  width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green);
}

.movement-icon svg { width: 14px; height: 14px; }
.movement-icon--out { background: var(--coral-soft); color: var(--coral); }
.movement-icon--adjust { background: var(--blue-soft); color: var(--blue); }
.activity-item strong, .activity-item small { display: block; }
.activity-item strong { font-size: 10px; }
.activity-item small { color: var(--muted); font-size: 9px; }
.activity-qty { color: var(--green); font-size: 11px; font-weight: 850; }
.activity-qty.is-out { color: var(--coral); }

.chart-row {
  display: grid;
  grid-template-columns: 95px 1fr 50px;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.chart-row:last-child { margin-bottom: 0; }
.chart-row__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.chart-row__value { color: var(--ink-soft); font-size: 9px; text-align: right; }
.bar-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.bar-track span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--bar-color, var(--green-2)); }

/* Toolbars and tables */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar__group { display: flex; min-width: 0; align-items: center; gap: 8px; }

.search-field {
  position: relative;
  min-width: min(330px, 35vw);
}

.search-field svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 15px;
  height: 15px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-field input,
.filter-select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.search-field input { padding: 0 12px 0 36px; }
.filter-select { min-width: 130px; padding: 0 28px 0 10px; font-size: 11px; }
.search-field input:focus, .filter-select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(37, 92, 69, 0.08); }

.segmented {
  display: flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 3px;
}

.segmented button {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented button.is-active { background: var(--green-soft); color: var(--green); }
.segmented svg { width: 14px; height: 14px; }

.results-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
}

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

.data-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #edf1eb;
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: #fbfcf9;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td { font-size: 10px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fbfcf9; }
.data-table .product-cell { min-width: 190px; }
.table-number { font-variant-numeric: tabular-nums; font-weight: 750; }
.table-muted { color: var(--muted); }

.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.row-actions .icon-button { width: 30px; height: 30px; border-radius: 8px; }
.row-actions svg { width: 14px; height: 14px; }

.checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.bulk-bar {
  position: sticky;
  z-index: 10;
  bottom: 14px;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  margin: 14px auto 0;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  padding: 8px 10px 8px 15px;
  box-shadow: var(--shadow-lg);
}

.bulk-bar span { font-size: 10px; font-weight: 750; }
.bulk-bar button { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.1); color: #fff; }

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

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, transform 0.18s;
}

.product-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.product-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.product-card__meta div { border-radius: 9px; background: var(--surface-soft); padding: 9px; }
.product-card__meta small, .product-card__meta strong { display: block; }
.product-card__meta small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.product-card__meta strong { margin-top: 2px; font-size: 11px; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

.empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 35px;
  text-align: center;
}

.empty-state__inner { max-width: 330px; }
.empty-icon { display: inline-flex; width: 58px; height: 58px; align-items: center; justify-content: center; border-radius: 17px; background: var(--surface-soft); color: var(--green); }
.empty-icon svg { width: 25px; height: 25px; }
.empty-state h3 { margin: 15px 0 5px; font-size: 15px; }
.empty-state p { margin-bottom: 16px; color: var(--muted); font-size: 11px; }

/* Category, suppliers, reports */
.category-grid,
.supplier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.category-card,
.supplier-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.category-card__top,
.supplier-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.category-swatch {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--category-soft);
  color: var(--category-color);
}

.category-swatch svg { width: 18px; height: 18px; }
.category-card h3, .supplier-card h3 { margin: 13px 0 3px; font-size: 14px; }
.category-card > p, .supplier-card > p { margin-bottom: 0; color: var(--muted); font-size: 10px; }
.category-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.category-stats div { border-radius: 10px; background: var(--surface-soft); padding: 10px; }
.category-stats small, .category-stats strong { display: block; }
.category-stats small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.category-stats strong { margin-top: 3px; font-size: 12px; }

.supplier-avatar {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.supplier-contact { display: grid; gap: 7px; margin-top: 15px; border-top: 1px solid var(--line); padding-top: 13px; }
.supplier-contact span { display: flex; min-width: 0; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 9px; }
.supplier-contact svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--muted); }
.supplier-contact span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.donut-layout { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 25px; }
.donut {
  position: relative;
  width: 160px;
  height: 160px;
  margin: auto;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 38%, var(--yellow) 38% 60%, var(--coral) 60% 76%, var(--blue) 76% 90%, #8ab48e 90% 100%);
}
.donut::after { position: absolute; width: 95px; height: 95px; content: ""; inset: 50% auto auto 50%; border-radius: 50%; background: #fff; transform: translate(-50%,-50%); }
.donut-label { position: absolute; z-index: 1; inset: 50% auto auto 50%; text-align: center; transform: translate(-50%,-50%); }
.donut-label strong, .donut-label small { display: block; }
.donut-label strong { font-size: 20px; }
.donut-label small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.legend { display: grid; gap: 9px; }
.legend-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 10px; }
.legend-row i { width: 8px; height: 8px; border-radius: 3px; background: var(--legend-color); }
.legend-row span:last-child { color: var(--muted); }

.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  padding: 14px;
}
.insight-card + .insight-card { margin-top: 10px; }
.insight-card > span { display: inline-flex; width: 32px; height: 32px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 9px; background: var(--yellow-soft); color: #8a6516; }
.insight-card svg { width: 15px; height: 15px; }
.insight-card strong { display: block; font-size: 10px; }
.insight-card p { margin: 3px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.55; }

/* Settings */
.settings-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 760px);
  align-items: start;
  gap: 18px;
}

.settings-nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 7px;
}
.settings-nav button { border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); padding: 9px; font-size: 10px; font-weight: 700; text-align: left; cursor: pointer; }
.settings-nav button:hover, .settings-nav button.is-active { background: var(--green-soft); color: var(--green); }
.settings-content { display: grid; gap: 14px; }
.settings-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.settings-card__header { border-bottom: 1px solid var(--line); padding: 18px 20px; }
.settings-card__header h2 { margin: 0 0 3px; font-size: 14px; }
.settings-card__header p { margin: 0; color: var(--muted); font-size: 10px; }
.settings-card__body { padding: 19px 20px; }
.settings-card__footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 13px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .field--wide { grid-column: 1 / -1; }
.warning-callout { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 15px; border: 1px solid #ead59d; border-radius: 10px; background: var(--yellow-soft); color: #66501a; padding: 11px; font-size: 9px; line-height: 1.55; }
.warning-callout svg { width: 15px; height: 15px; flex: 0 0 auto; }
.connection-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; border-radius: 10px; background: var(--surface-soft); padding: 10px 12px; }
.connection-status span { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 10px; }
.data-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.data-action-card { display: flex; min-height: 112px; flex-direction: column; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 13px; text-align: left; cursor: pointer; }
.data-action-card:hover { border-color: var(--green); background: var(--green-soft); }
.data-action-card span { display: inline-flex; width: 31px; height: 31px; align-items: center; justify-content: center; border-radius: 9px; background: var(--surface-soft); color: var(--green); }
.data-action-card svg { width: 15px; height: 15px; }
.data-action-card strong { font-size: 10px; }
.data-action-card small { color: var(--muted); font-size: 8px; }

/* Modal */
.modal-backdrop {
  position: fixed;
  z-index: 110;
  display: grid;
  overflow-y: auto;
  place-items: center;
  inset: 0;
  background: rgba(19, 43, 34, 0.38);
  padding: 22px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease-out;
}

.modal {
  width: min(100%, 620px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease-out;
}

.modal--small { width: min(100%, 440px); }
.modal--wide { width: min(100%, 760px); }
.modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 19px 21px; }
.modal__header h2 { margin: 0 0 3px; font-size: 17px; letter-spacing: -0.025em; }
.modal__header p { margin: 0; color: var(--muted); font-size: 10px; }
.modal__body { padding: 20px 21px; }
.modal__footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 14px 21px; }
.radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 16px; }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card span { display: flex; min-height: 66px; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 10px; }
.radio-card strong { font-size: 10px; }
.radio-card small { color: var(--muted); font-size: 8px; }
.radio-card input:checked + span { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 2px rgba(37,92,69,.08); }
.color-options { display: flex; gap: 8px; }
.color-option input { position: absolute; opacity: 0; }
.color-option span { display: block; width: 28px; height: 28px; border: 3px solid #fff; border-radius: 9px; background: var(--swatch); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.color-option input:checked + span { box-shadow: 0 0 0 2px var(--ink); }

/* Assistant */
.assistant-backdrop {
  position: fixed;
  z-index: 80;
  visibility: hidden;
  inset: 0;
  background: rgba(21, 47, 37, 0.2);
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}

.assistant-panel {
  position: fixed;
  z-index: 90;
  display: flex;
  width: min(420px, 100vw);
  height: 100vh;
  inset: 0 0 0 auto;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 50px rgba(27, 60, 47, 0.12);
  transform: translateX(102%);
  transition: transform 0.25s ease;
}

body.assistant-open .assistant-panel { transform: translateX(0); }
body.assistant-open .assistant-backdrop { visibility: visible; opacity: 1; }

.assistant-panel__header { display: flex; min-height: 69px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 15px 12px 18px; }
.assistant-panel__header > div { display: flex; align-items: center; gap: 9px; }
.assistant-panel__header strong, .assistant-panel__header small { display: block; }
.assistant-panel__header strong { font-size: 13px; }
.assistant-panel__header small { color: var(--muted); font-size: 9px; }
.assistant-icon { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 11px; background: var(--yellow-soft); color: #a36f0c; font-size: 17px; }
.assistant-messages { flex: 1; overflow-y: auto; padding: 20px 17px; scrollbar-width: thin; }
.assistant-welcome { margin-bottom: 22px; border-radius: 15px; background: var(--surface-soft); padding: 16px; }
.assistant-welcome h3 { margin: 0 0 5px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; }
.assistant-welcome p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }
.message { display: flex; margin-bottom: 13px; }
.message--user { justify-content: flex-end; }
.message__bubble { max-width: 86%; border-radius: 14px 14px 14px 4px; background: var(--surface-soft); color: var(--ink); padding: 10px 12px; font-size: 10px; line-height: 1.6; white-space: pre-wrap; }
.message--user .message__bubble { border-radius: 14px 14px 4px 14px; background: var(--green); color: #fff; }
.message__meta { margin-top: 4px; color: var(--muted); font-size: 8px; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite alternate; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
.assistant-suggestions { display: flex; overflow-x: auto; gap: 6px; padding: 0 17px 10px; scrollbar-width: none; }
.assistant-suggestions button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--green); padding: 7px 10px; font-size: 9px; font-weight: 700; cursor: pointer; }
.assistant-suggestions button:hover { background: var(--green-soft); }
.assistant-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 16px; border: 1px solid var(--line-strong); border-radius: 13px; background: #fff; padding: 7px 7px 7px 11px; }
.assistant-form:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(37,92,69,.08); }
.assistant-form textarea { max-height: 110px; flex: 1; border: 0; outline: 0; resize: none; padding: 6px 0; font-size: 11px; }
.assistant-form button { display: inline-flex; width: 34px; height: 34px; flex: 0 0 auto; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: var(--green); color: #fff; cursor: pointer; }
.assistant-form button:hover { background: #1e4f3a; }
.assistant-form svg { width: 15px; height: 15px; }
.assistant-disclaimer { margin: 7px 16px 12px; color: var(--muted); font-size: 8px; text-align: center; }

/* Command palette and toasts */
.command-palette {
  position: fixed;
  z-index: 130;
  display: none;
  align-items: flex-start;
  justify-content: center;
  inset: 0;
  background: rgba(18, 42, 33, 0.35);
  padding: 12vh 20px 20px;
  backdrop-filter: blur(4px);
}

.command-palette.is-open { display: flex; }
.command-box { width: min(100%, 610px); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); animation: slideUp .18s ease-out; }
.command-search { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 12px 14px; }
.command-search svg { width: 18px; height: 18px; color: var(--muted); }
.command-search input { flex: 1; border: 0; outline: 0; color: var(--ink); font-size: 13px; }
.command-results { max-height: 390px; overflow-y: auto; padding: 8px; }
.command-section-title { margin: 7px 9px 5px; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.command-item { display: grid; width: 100%; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 0; border-radius: 10px; background: transparent; padding: 9px 10px; text-align: left; cursor: pointer; }
.command-item:hover, .command-item.is-selected { background: var(--green-soft); }
.command-item__icon { display: inline-flex; width: 31px; height: 31px; align-items: center; justify-content: center; border-radius: 9px; background: var(--surface-soft); color: var(--green); }
.command-item__icon svg { width: 14px; height: 14px; }
.command-item strong, .command-item small { display: block; }
.command-item strong { font-size: 10px; }
.command-item small { color: var(--muted); font-size: 8px; }
.command-item > span:last-child { color: var(--muted); font-size: 9px; }
.command-footer { display: flex; justify-content: flex-end; gap: 16px; border-top: 1px solid var(--line); background: #fbfcf9; padding: 8px 13px; }
.command-footer span { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; }
.command-footer kbd { height: 17px; min-width: 17px; padding: 0 4px; font-size: 8px; }

.toast-region { position: fixed; z-index: 200; display: grid; width: min(340px, calc(100vw - 28px)); right: 18px; bottom: 18px; gap: 9px; }
.toast { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 11px; box-shadow: var(--shadow-md); animation: toastIn .25s ease-out; }
.toast__icon { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 9px; background: var(--green-soft); color: var(--green); }
.toast--error .toast__icon { background: var(--red-soft); color: var(--red); }
.toast--warning .toast__icon { background: var(--yellow-soft); color: #886313; }
.toast svg { width: 14px; height: 14px; }
.toast strong, .toast small { display: block; }
.toast strong { font-size: 10px; }
.toast small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.toast button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes blink { from { opacity: .3; transform: translateY(1px); } to { opacity: 1; transform: translateY(-1px); } }

/* Responsive */
@media (max-width: 1150px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .product-grid, .category-grid, .supplier-grid { grid-template-columns: 1fr 1fr; }
  .shelf-card--two { display: none; }
}

@media (max-width: 920px) {
  .login-view { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; }
  .sidebar { transform: translateX(-102%); transition: transform .23s ease; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close, .mobile-menu { display: inline-flex; }
  .sidebar-backdrop { position: fixed; z-index: 50; visibility: hidden; inset: 0; background: rgba(18,42,33,.25); opacity: 0; transition: opacity .2s, visibility .2s; }
  body.sidebar-open .sidebar-backdrop { visibility: visible; opacity: 1; }
  .main-content { margin-left: 0; }
  .dashboard-grid, .report-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav button { flex: 0 0 auto; }
}

@media (max-width: 700px) {
  .topbar { height: 60px; padding: 0 14px; }
  .view-content { padding: 23px 14px 42px; }
  .command-trigger { width: 42px; justify-content: center; padding: 0; }
  .command-trigger span, .command-trigger kbd, .save-status, .assistant-shortcut span:last-child { display: none; }
  .assistant-shortcut { width: 38px; justify-content: center; padding: 0; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-actions { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .page-actions .button { flex: 0 0 auto; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 122px; padding: 15px; }
  .metric-card__value { font-size: 22px; }
  .stock-row { grid-template-columns: minmax(150px, 1fr) 90px auto; }
  .stock-row .stock-progress { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar__group { width: 100%; }
  .search-field { min-width: 0; flex: 1; }
  .filter-select { min-width: 0; flex: 1; }
  .product-grid, .category-grid, .supplier-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field--wide { grid-column: auto; }
  .data-actions { grid-template-columns: 1fr; }
  .donut-layout { grid-template-columns: 1fr; }
  .radio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 470px) {
  .login-panel { padding: 30px 20px; }
  .brand--login { margin-bottom: 38px; }
  .role-chip { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .stock-row { grid-template-columns: 1fr auto; }
  .stock-row .quantity-cell { display: none; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .assistant-panel { width: 100%; }
}

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

@media print {
  .sidebar, .topbar, .page-actions, .toolbar, .assistant-panel, .assistant-backdrop, .toast-region { display: none !important; }
  .main-content { margin: 0; }
  .view-content { width: 100%; padding: 0; }
  .panel, .metric-card, .table-wrap { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}
