:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8f9fd;
  --text: #17203a;
  --muted: #707793;
  --line: #e6e9f2;
  --primary: #5b4bdb;
  --primary-dark: #4032b1;
  --primary-soft: #efedff;
  --teal: #17a589;
  --teal-soft: #e6f8f4;
  --orange: #f39b34;
  --orange-soft: #fff3e4;
  --red: #e34b64;
  --red-soft: #ffebef;
  --blue: #2d78e6;
  --blue-soft: #eaf2ff;
  --shadow-sm: 0 10px 30px rgba(31, 41, 85, 0.07);
  --shadow-md: 0 22px 70px rgba(34, 37, 79, 0.15);
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 92% -4%, rgba(91, 75, 219, 0.11), transparent 24rem),
    var(--bg);
  color: var(--text);
  overscroll-behavior-y: none;
}

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

button {
  color: inherit;
}

button,
[role="button"] {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(91, 75, 219, 0.24);
  outline-offset: 2px;
}

.app-root {
  min-height: 100dvh;
}

.hidden {
  display: none !important;
}

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

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon-sm {
  width: 18px;
  height: 18px;
}

.icon-lg {
  width: 29px;
  height: 29px;
}

.brand-logo {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(145deg, #7867f3, #4635bd);
  box-shadow: 0 12px 24px rgba(91, 75, 219, 0.26);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.brand-logo::before {
  position: absolute;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  content: "";
  transform: rotate(30deg);
}

.brand-logo span {
  position: relative;
  z-index: 1;
  transform: translateX(-1px);
}

.brand-logo--large {
  width: 66px;
  height: 66px;
  border-radius: 21px;
  font-size: 23px;
}

.brand-logo--large::before {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-shell {
  position: relative;
  display: grid;
  min-height: 100dvh;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  padding: 24px 18px;
}

.auth-shell::before,
.auth-shell::after {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  content: "";
  filter: blur(2px);
  pointer-events: none;
}

.auth-shell::before {
  top: -140px;
  right: -110px;
  width: 330px;
  height: 330px;
  background: rgba(91, 75, 219, 0.14);
}

.auth-shell::after {
  bottom: -160px;
  left: -90px;
  width: 300px;
  height: 300px;
  background: rgba(23, 165, 137, 0.1);
}

.auth-layout {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 1060px);
  overflow: hidden;
  border: 1px solid rgba(225, 228, 239, 0.9);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.auth-art {
  position: relative;
  display: none;
  min-height: 690px;
  overflow: hidden;
  padding: 58px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), transparent 45%),
    linear-gradient(145deg, #31258f, #5b4bdb 58%, #7768ed);
  color: white;
}

.auth-art::before {
  position: absolute;
  top: -15%;
  right: -25%;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 108px;
  content: "";
  transform: rotate(34deg);
}

.auth-art::after {
  position: absolute;
  right: 50px;
  bottom: 65px;
  width: 160px;
  height: 160px;
  border: 34px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.auth-art-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.art-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.art-brand strong {
  display: block;
  font-size: 17px;
}

.art-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.auth-art h2 {
  max-width: 420px;
  margin: 0;
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.auth-art p {
  max-width: 390px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.8;
}

.art-status {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6cf2c1;
  box-shadow: 0 0 0 6px rgba(108, 242, 193, 0.12);
}

.auth-panel {
  min-height: 570px;
  padding: 30px 24px 32px;
  background: var(--surface);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 46px;
}

.auth-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-panel h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(29px, 7vw, 39px);
  line-height: 1.07;
  letter-spacing: -0.045em;
}

.auth-lead {
  margin: 13px 0 27px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
}

.step {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #e7e9f1;
  transition: width 180ms ease, background 180ms ease;
}

.step.active {
  width: 64px;
  background: linear-gradient(90deg, var(--primary), #8476f5);
}

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

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field label,
.field-label {
  color: #4f5670;
  font-size: 12px;
  font-weight: 750;
}

.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 19px;
  height: 19px;
  color: #9a9fb2;
  transform: translateY(-50%);
  pointer-events: none;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #dfe3ee;
  border-radius: 14px;
  background: #fbfcfe;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.input,
.select {
  min-height: 51px;
  padding: 0 14px;
}

.input.has-icon {
  padding-left: 47px;
}

.input.pin-input {
  min-height: 58px;
  text-align: center;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: 0.48em;
  text-indent: 0.48em;
}

.textarea {
  min-height: 90px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.55;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 75, 219, 0.1);
}

.input::placeholder,
.textarea::placeholder {
  color: #a5a9b9;
  font-weight: 500;
}

.helper {
  margin: -8px 0 18px;
  color: #8b91a5;
  font-size: 11px;
  line-height: 1.5;
}

.error-text {
  min-height: 18px;
  margin: 4px 0 7px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

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

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

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6858e7, #4a39c4);
  box-shadow: 0 13px 25px rgba(91, 75, 219, 0.23);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 16px 30px rgba(91, 75, 219, 0.3);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: #4d546d;
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.btn-danger-soft {
  background: var(--red-soft);
  color: #c8344e;
}

.btn-teal {
  background: var(--teal);
  box-shadow: 0 12px 24px rgba(23, 165, 137, 0.19);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-small {
  min-height: 38px;
  border-radius: 11px;
  padding: 0 13px;
  font-size: 12px;
}

.icon-btn {
  display: inline-grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: #606781;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

.pin-card {
  position: relative;
  overflow: hidden;
  margin: 24px 0 21px;
  border: 1px solid #dfdcff;
  border-radius: 20px;
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(91, 75, 219, 0.14), transparent 120px),
    #f8f7ff;
}

.pin-card::after {
  position: absolute;
  right: -22px;
  bottom: -32px;
  width: 95px;
  height: 95px;
  border: 18px solid rgba(91, 75, 219, 0.05);
  border-radius: 50%;
  content: "";
}

.pin-label {
  color: #777095;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pin-number {
  position: relative;
  z-index: 1;
  margin: 9px 0 16px;
  color: #36279f;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1;
}

.pin-note {
  margin: 0;
  color: #777095;
  font-size: 11px;
  line-height: 1.55;
}

.pin-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  border-radius: 13px;
  padding: 12px 13px;
  background: #f7f8fb;
  color: #7f8599;
  font-size: 11px;
  line-height: 1.55;
}

.security-note .icon {
  margin-top: 1px;
  color: var(--teal);
}

.shell {
  min-height: 100dvh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(225, 228, 238, 0.8);
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
}

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

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

.avatar-btn {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #e9e6ff, #d8d2ff);
  color: #4938bd;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.content {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 25px 16px 30px;
}

.screen {
  animation: screen-in 190ms ease both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

.eyebrow {
  margin: 0 0 7px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.screen-head h1,
.section-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(25px, 6vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.screen-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.date-chip {
  display: none;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: #fff;
  color: #727990;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.hero-card {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 190px;
  align-items: center;
  margin-bottom: 17px;
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.18), transparent 170px),
    linear-gradient(135deg, #3c2eae, #6554df 56%, #8070ed);
  box-shadow: 0 20px 46px rgba(67, 52, 184, 0.2);
  color: #fff;
}

.hero-card::before {
  position: absolute;
  right: -35px;
  bottom: -75px;
  width: 210px;
  height: 210px;
  border: 34px solid rgba(255, 255, 255, 0.07);
  border-radius: 58px;
  content: "";
  transform: rotate(32deg);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(45px, 12vw, 66px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.hero-value span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 650;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 24px;
}

.stat-card {
  min-width: 0;
  border: 1px solid rgba(229, 231, 240, 0.9);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

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

.stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
}

.stat-icon.teal {
  background: var(--teal-soft);
  color: var(--teal);
}

.stat-icon.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.stat-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.stat-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.trend {
  border-radius: 999px;
  padding: 5px 8px;
  background: #f1f2f7;
  color: #858a9d;
  font-size: 9px;
  font-weight: 800;
}

.stat-value {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 27px;
  font-weight: 880;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

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

.section-row h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

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

.quick-card {
  display: flex;
  min-height: 110px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.quick-card:hover {
  border-color: #d4d0fb;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.quick-card strong {
  display: block;
  margin-top: 13px;
  font-size: 13px;
}

.quick-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.form-card {
  padding: 20px;
}

.form-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.form-title-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
}

.form-title h2 {
  margin: 0;
  font-size: 15px;
}

.form-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.form-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  margin-top: 24px;
}

.stock-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 18px;
  border-radius: 13px;
  padding: 12px 13px;
  background: var(--teal-soft);
  color: #117861;
  font-size: 11px;
  font-weight: 700;
}

.stock-hint.danger {
  background: var(--red-soft);
  color: #be344b;
}

.empty-state {
  display: grid;
  min-height: 250px;
  place-items: center;
  border: 1px dashed #d8dce8;
  border-radius: var(--radius);
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 65px;
  height: 65px;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
}

.empty-state h3 {
  margin: 0;
  font-size: 16px;
}

.empty-state p {
  max-width: 300px;
  margin: 8px auto 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.search {
  position: relative;
}

.search .icon {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #9aa0b2;
  transform: translateY(-50%);
}

.search .input {
  padding-left: 44px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  min-height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: #777d91;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.pill.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.inventory-grid {
  display: grid;
  gap: 11px;
}

.inventory-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(34, 40, 74, 0.045);
}

.product-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.product-icon.low {
  background: var(--red-soft);
  color: var(--red);
}

.inventory-card h3 {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  font-size: 13px;
  white-space: nowrap;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.stock-number {
  text-align: right;
}

.stock-number strong {
  display: block;
  color: #2f3650;
  font-size: 23px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stock-number span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.low-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

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

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  transition: border 140ms ease, box-shadow 140ms ease;
}

.activity-item:hover {
  border-color: #d6d1fb;
  box-shadow: 0 8px 22px rgba(44, 39, 103, 0.06);
}

.activity-type {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
}

.activity-type.in {
  background: var(--teal-soft);
  color: var(--teal);
}

.activity-type.out {
  background: var(--orange-soft);
  color: var(--orange);
}

.activity-type.product {
  background: var(--blue-soft);
  color: var(--blue);
}

.activity-type.system {
  background: var(--primary-soft);
  color: var(--primary);
}

.activity-main {
  min-width: 0;
}

.activity-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  white-space: nowrap;
}

.activity-main p {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-qty {
  text-align: right;
}

.activity-qty strong {
  display: block;
  font-size: 15px;
}

.activity-qty .plus {
  color: var(--teal);
}

.activity-qty .minus {
  color: var(--orange);
}

.activity-qty time {
  display: block;
  margin-top: 5px;
  color: #9297a8;
  font-size: 8px;
  font-weight: 650;
}

.log-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 11px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 850;
}

.settings-grid {
  display: grid;
  gap: 14px;
}

.settings-card {
  padding: 19px;
}

.settings-card h2 {
  margin: 0 0 5px;
  font-size: 15px;
}

.settings-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.user-list {
  display: grid;
  gap: 9px;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 13px;
  padding: 12px;
  background: var(--surface-soft);
}

.user-info {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: #e9e6ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.user-info strong {
  display: block;
  font-size: 11px;
}

.user-info span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--teal-soft);
  color: #137a65;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.data-action {
  display: flex;
  min-height: 83px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.data-action .icon {
  margin-bottom: 10px;
  color: var(--primary);
}

.data-action strong {
  font-size: 11px;
}

.data-action span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  border-top: 1px solid rgba(221, 225, 236, 0.9);
  padding: 7px 7px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -12px 35px rgba(33, 39, 76, 0.08);
  backdrop-filter: blur(20px);
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #8d93a7;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-item.active::before {
  position: absolute;
  top: -7px;
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--primary);
  content: "";
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0;
  background: rgba(16, 21, 43, 0.54);
  backdrop-filter: blur(5px);
  animation: fade-in 150ms ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(100%, 570px);
  max-height: min(92dvh, 820px);
  overflow-y: auto;
  border-radius: 27px 27px 0 0;
  background: #fff;
  box-shadow: 0 -24px 70px rgba(12, 18, 43, 0.22);
  animation: modal-up 180ms ease both;
}

@keyframes modal-up {
  from {
    transform: translateY(30px);
  }
}

.modal-handle {
  width: 43px;
  height: 4px;
  margin: 9px auto 0;
  border-radius: 999px;
  background: #dfe1e9;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 20px 15px;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.modal-body {
  padding: 3px 20px 24px;
}

.verify-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
  border-radius: 15px;
  padding: 13px 14px;
  background: var(--surface-soft);
}

.verify-summary span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.verify-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.verify-qty {
  color: var(--primary);
  font-size: 18px !important;
}

.otp-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 17px;
  border: 1px solid #dfdcff;
  border-radius: 15px;
  padding: 13px 14px;
  background: #f7f6ff;
}

.otp-strip span {
  display: block;
  color: #777095;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.otp-strip strong {
  display: block;
  margin-top: 4px;
  color: #3c2ca7;
  font-size: 23px;
  letter-spacing: 0.18em;
}

.signature-box {
  position: relative;
  overflow: hidden;
  border: 1px dashed #cbd0df;
  border-radius: 14px;
  background:
    linear-gradient(to bottom, transparent calc(100% - 31px), #eef0f5 calc(100% - 30px), transparent calc(100% - 29px)),
    #fbfcfe;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 148px;
  cursor: crosshair;
  touch-action: none;
}

.signature-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #a3a7b6;
  font-size: 11px;
  font-weight: 650;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.signature-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}

.signature-preview {
  overflow: hidden;
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.signature-preview img {
  display: block;
  width: 100%;
  max-height: 130px;
  object-fit: contain;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 15px 0;
}

.detail-cell {
  border-radius: 12px;
  padding: 11px;
  background: var(--surface-soft);
}

.detail-cell span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
}

.detail-cell strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.toast-root {
  position: fixed;
  top: max(17px, env(safe-area-inset-top));
  right: 14px;
  left: 14px;
  z-index: 200;
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  width: min(100%, 430px);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(225, 228, 238, 0.9);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 42px rgba(29, 35, 71, 0.17);
  color: #3c435b;
  font-size: 11px;
  font-weight: 750;
  animation: toast-in 200ms ease both;
}

.toast.success .icon {
  color: var(--teal);
}

.toast.error .icon {
  color: var(--red);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@media (min-width: 580px) {
  .auth-panel {
    padding: 46px;
  }

  .content {
    padding-right: 25px;
    padding-left: 25px;
  }

  .date-chip {
    display: inline-flex;
  }

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

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

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

  .form-actions .btn {
    width: auto;
    min-width: 150px;
  }

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

  .toolbar {
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
  }

  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }

  .modal {
    border-radius: 27px;
  }

  .modal-handle {
    display: none;
  }
}

@media (min-width: 860px) {
  .auth-layout {
    grid-template-columns: 1.08fr 0.92fr;
  }

  .auth-art {
    display: grid;
  }

  .auth-panel {
    display: flex;
    min-height: 690px;
    flex-direction: column;
    justify-content: center;
    padding: 54px;
  }

  .mobile-brand {
    display: none;
  }

  .shell {
    padding: 0 0 0 244px;
  }

  .topbar {
    min-height: 82px;
    padding: 15px 27px;
  }

  .content {
    padding: 31px 30px 50px;
  }

  .bottom-nav {
    top: 20px;
    right: auto;
    bottom: 20px;
    left: 20px;
    width: 204px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, min-content) 1fr;
    align-content: start;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 96px 13px 14px;
    background:
      linear-gradient(180deg, rgba(91, 75, 219, 0.075), transparent 190px),
      #fff;
    box-shadow: var(--shadow-sm);
  }

  .bottom-nav::before {
    position: absolute;
    top: 22px;
    left: 21px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, #7867f3, #4635bd);
    box-shadow: 0 10px 22px rgba(91, 75, 219, 0.23);
    content: "AA";
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 42px;
    text-align: center;
    letter-spacing: -0.08em;
  }

  .bottom-nav::after {
    position: absolute;
    top: 27px;
    left: 75px;
    width: 100px;
    content: "AA IMPEX PO";
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
  }

  .nav-item {
    min-height: 50px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
    font-size: 11px;
  }

  .nav-item.active::before {
    top: 50%;
    left: -13px;
    width: 3px;
    height: 25px;
    border-radius: 0 5px 5px 0;
    transform: translateY(-50%);
  }

  .form-card {
    padding: 26px;
  }

  .stock-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 17px;
    align-items: start;
  }

  .side-summary {
    position: sticky;
    top: 105px;
  }

  .settings-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

@media (min-width: 1180px) {
  .stats-grid {
    gap: 15px;
  }

  .stat-card {
    padding: 19px;
  }

  .hero-card {
    min-height: 210px;
    padding: 32px;
  }

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

@media (max-width: 390px) {
  .brand-copy small {
    display: none;
  }

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

  .content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .nav-item {
    font-size: 7px;
  }
}

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


/* Strong stock-control additions */
.inventory-card-manage {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.inventory-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.inventory-actions .btn .icon {
  width: 15px;
  height: 15px;
}

.activity-type.adjust {
  background: #eef0ff;
  color: #5263cf;
}

.reversed-tag {
  display: inline-flex;
  margin-left: 5px;
  border-radius: 999px;
  padding: 3px 6px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
  vertical-align: middle;
}

.adjust-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-radius: 13px;
  padding: 12px 14px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
}

.adjust-preview.negative {
  background: var(--orange-soft);
  color: var(--orange);
}

.adjust-preview strong {
  font-size: 15px;
}

.danger-panel,
.success-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  border-radius: 15px;
  padding: 14px;
  background: var(--red-soft);
  color: #b92d47;
}

.success-panel {
  background: var(--teal-soft);
  color: #117b68;
}

.danger-panel .icon,
.success-panel .icon {
  flex: 0 0 auto;
}

.danger-panel strong,
.success-panel strong,
.return-box strong {
  display: block;
  font-size: 12px;
}

.danger-panel p,
.success-panel p,
.return-box p {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.55;
}

.return-box {
  margin-top: 18px;
  border: 1px solid #cdeee6;
  border-radius: 16px;
  padding: 15px;
  background: #f5fffc;
  color: #225d52;
}

.return-box .textarea {
  margin: 12px 0 10px;
  background: #fff;
}

@media (min-width: 700px) {
  .inventory-actions {
    grid-column: auto;
    border-top: 0;
    padding-top: 0;
  }

  .inventory-card-manage {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }
}

/* Product search, popup stock entry and dynamic PDF additions */
.product-picker-card {
  min-height: 520px;
}

.transaction-search-wrap {
  margin-top: 18px;
}

.search-large .input {
  min-height: 52px;
  border-color: #dcdff0;
  background: #fbfbfe;
  font-size: 13px;
  font-weight: 650;
}

.picker-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 2px 13px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.picker-help span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.transaction-product-list {
  display: grid;
  gap: 9px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 3px;
}

.transaction-product {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(31, 41, 85, 0.045);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.transaction-product:hover {
  border-color: rgba(91, 75, 219, 0.35);
  box-shadow: 0 12px 28px rgba(31, 41, 85, 0.09);
  transform: translateY(-1px);
}

.transaction-product-copy {
  min-width: 0;
}

.transaction-product-copy strong,
.transaction-product-copy small,
.transaction-product-stock strong,
.transaction-product-stock small,
.transaction-product-action small {
  display: block;
}

.transaction-product-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.transaction-product-copy small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.transaction-product-stock {
  min-width: 64px;
  text-align: right;
}

.transaction-product-stock strong {
  color: var(--text);
  font-size: 15px;
}

.transaction-product-stock small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.transaction-product-action {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal);
}

.transaction-product-action.out {
  background: var(--orange-soft);
  color: var(--orange);
}

.transaction-product-action .icon {
  width: 17px;
  height: 17px;
}

.transaction-product-action small {
  margin-top: -7px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.selected-product-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid #dedcf8;
  border-radius: 17px;
  padding: 13px;
  background: linear-gradient(135deg, #f8f7ff, #f4f8ff);
}

.selected-product-panel > div:nth-child(2) {
  min-width: 0;
}

.selected-product-panel > div:nth-child(2) strong,
.selected-product-panel > div:nth-child(2) span,
.selected-product-balance strong,
.selected-product-balance span {
  display: block;
}

.selected-product-panel > div:nth-child(2) strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  white-space: nowrap;
}

.selected-product-panel > div:nth-child(2) span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.selected-product-balance {
  text-align: right;
}

.selected-product-balance strong {
  color: var(--primary);
  font-size: 18px;
}

.selected-product-balance span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.input-quantity {
  min-height: 58px;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: .02em;
}

.field-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.transaction-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 750;
}

.transaction-preview strong {
  font-size: 15px;
}

.text-danger {
  color: var(--red) !important;
}

.existing-product-search {
  border: 1px solid #dbd9f6;
  border-radius: 17px;
  padding: 14px;
  background: linear-gradient(145deg, #f8f7ff, #fbfcff);
}

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

.mini-section-head strong {
  font-size: 12px;
}

.mini-section-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
}

.existing-product-results {
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 9px;
}

.existing-product-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.existing-product-result:hover {
  border-color: rgba(91, 75, 219, 0.35);
}

.existing-product-result > span:first-child {
  min-width: 0;
}

.existing-product-result strong,
.existing-product-result small {
  display: block;
}

.existing-product-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  white-space: nowrap;
}

.existing-product-result small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.existing-product-result > span:last-child {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
  font-weight: 850;
}

.existing-product-result > span:last-child .icon {
  width: 16px;
  height: 16px;
}

.inline-empty {
  border-radius: 11px;
  padding: 12px;
  background: #f0f2f8;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.inline-empty.success {
  background: var(--teal-soft);
  color: #117861;
}

.modal-divider {
  position: relative;
  margin: 20px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.modal-divider span {
  position: relative;
  top: -7px;
  padding: 0 10px;
  background: #fff;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .09em;
}

.btn-pdf {
  justify-content: center;
  border: 0;
  background: linear-gradient(135deg, #5b4bdb, #337ae8);
  box-shadow: 0 11px 24px rgba(70, 74, 199, 0.2);
  color: #fff;
}

.btn-pdf:hover {
  box-shadow: 0 14px 30px rgba(70, 74, 199, 0.28);
  transform: translateY(-1px);
}

.inventory-filters {
  grid-column: 1 / -1;
}

@media (min-width: 700px) {
  .inventory-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .inventory-toolbar .btn-pdf {
    min-width: 205px;
  }
}

@media (max-width: 520px) {
  .transaction-product {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .transaction-product-stock {
    display: none;
  }

  .transaction-product-action {
    width: 43px;
    height: 43px;
  }

  .selected-product-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .selected-product-balance {
    grid-column: 2;
    text-align: left;
  }
}


/* Final Live Stock product-name visibility + safer card layout */
.inventory-card-manage {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center;
}

.inventory-card-manage .inventory-main {
  min-width: 0;
}

.inventory-name-label {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.inventory-card-manage .inventory-product-name {
  display: block;
  overflow: visible;
  margin: 0;
  color: #202743;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.inventory-card-manage .product-meta {
  margin-top: 7px;
  line-height: 1.35;
}

.inventory-card-manage .inventory-sku {
  color: #4c5575;
  font-weight: 850;
}

.inventory-card-manage .stock-number {
  min-width: 54px;
  align-self: center;
}

.inventory-card-manage .inventory-actions {
  grid-column: 1 / -1 !important;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  justify-content: stretch;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.inventory-card-manage .inventory-actions .btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

@media (min-width: 580px) {
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .inventory-card-manage .inventory-actions {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-card-manage .inventory-actions .btn-danger-soft {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   FINAL V2 — FULL PRODUCT NAME, NEVER ELLIPSIS
   This block intentionally uses !important to override every
   legacy desktop/mobile card rule that used text-overflow.
   ============================================================ */
.inventory-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)) !important;
  align-items: start !important;
}

.inventory-card.inventory-card-manage {
  grid-template-columns: 52px minmax(0, 1fr) auto !important;
  grid-auto-rows: auto !important;
  align-items: start !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  gap: 12px 14px !important;
}

.inventory-card.inventory-card-manage .inventory-main {
  min-width: 0 !important;
  width: 100% !important;
  overflow: visible !important;
}

.inventory-card.inventory-card-manage h3,
.inventory-card.inventory-card-manage .inventory-product-name {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  color: #202743 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
}

.inventory-card.inventory-card-manage .product-meta {
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 7px !important;
  overflow: visible !important;
  white-space: normal !important;
}

.inventory-card.inventory-card-manage .stock-number {
  align-self: start !important;
  min-width: 58px !important;
  padding-top: 2px !important;
}

.inventory-card.inventory-card-manage .inventory-actions {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--line) !important;
  gap: 8px !important;
}

.inventory-card.inventory-card-manage .inventory-actions .btn {
  width: 100% !important;
  min-width: 0 !important;
  justify-content: center !important;
}

@media (max-width: 560px) {
  .inventory-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .inventory-card.inventory-card-manage {
    grid-template-columns: 46px minmax(0, 1fr) auto !important;
    padding: 14px !important;
  }

  .inventory-card.inventory-card-manage h3,
  .inventory-card.inventory-card-manage .inventory-product-name {
    font-size: 14px !important;
  }

  .inventory-card.inventory-card-manage .inventory-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .inventory-card.inventory-card-manage .inventory-actions .btn-danger-soft {
    grid-column: 1 / -1 !important;
  }
}
