:root {
  --yellow: #f4b903;
  --yellow-hover: #ffd047;
  --black: #050505;
  --black-soft: #0d0d0d;
  --gray-light: #f4efe6;
  --gray-secondary: #d2c7b3;
  --gray-dark: #111111;
  --surface: #171717;
  --surface-muted: #121212;
  --surface-elevated: #1c1c1c;
  --surface-glass: rgba(23, 23, 23, 0.78);
  --surface-warning: rgba(244, 185, 3, 0.08);
  --surface-critical: rgba(255, 106, 106, 0.08);
  --success: #44d39c;
  --error: #ff6a6a;
  --text: #e5ddd1;
  --text-highlight: #f8db81;
  --text-soft: rgba(229, 221, 209, 0.82);
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --border-soft: 1px solid rgba(210, 199, 179, 0.12);
  --border-strong: 1px solid rgba(244, 185, 3, 0.16);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.26);
  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.18);
  --shadow-card-hover: 0 18px 40px rgba(0, 0, 0, 0.24);
  --shadow-glow: 0 18px 44px rgba(244, 185, 3, 0.08);
  --shadow-button: 0 14px 28px rgba(244, 185, 3, 0.2);
  --focus-ring: 0 0 0 3px rgba(244, 185, 3, 0.16);
  --focus-ring-strong:
    0 0 0 3px rgba(244, 185, 3, 0.18),
    0 0 0 6px rgba(244, 185, 3, 0.06);
  --max-width: 1080px;
  --line-body: 1.6;
  --transition-fast: 180ms ease;
  --transition-slow: 280ms ease;
  --safe-top: max(16px, env(safe-area-inset-top));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at top, rgba(244, 185, 3, 0.16), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(248, 219, 129, 0.08), transparent 18%),
    radial-gradient(circle at 0% 35%, rgba(244, 185, 3, 0.07), transparent 20%),
    linear-gradient(180deg, var(--black) 0%, var(--black-soft) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -160px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 185, 3, 0.12), transparent 68%);
  filter: blur(18px);
}

body::after {
  left: -140px;
  bottom: 12%;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(248, 219, 129, 0.08), transparent 70%);
  filter: blur(22px);
}

::selection {
  background: rgba(244, 185, 3, 0.3);
  color: var(--gray-light);
}

button,
input {
  font: inherit;
}

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

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) 56px;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-4) var(--space-3);
}

.auth-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 560px);
  display: grid;
  gap: clamp(20px, 3vw, 28px);
  padding: clamp(24px, 4vw, 36px);
  border: var(--border-strong);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(244, 185, 3, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(28, 28, 28, 0.96), rgba(10, 10, 10, 0.98));
  box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.auth-card::after,
.hero-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.auth-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
}

.auth-brand-mark {
  width: 92px;
  height: 92px;
  flex-basis: 92px;
  padding: 8px;
  border-radius: 28px;
  justify-self: start;
}

.auth-title {
  margin: 0;
  color: var(--gray-light);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
}

.auth-text {
  margin: var(--space-2) 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.auth-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  align-items: stretch;
}

.auth-form {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(210, 199, 179, 0.1);
}

.auth-submit {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-hover));
  color: var(--black);
  padding: 15px var(--space-3);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    opacity var(--transition-fast),
    filter var(--transition-fast);
  box-shadow: 0 16px 28px rgba(244, 185, 3, 0.18);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(244, 185, 3, 0.22);
  filter: saturate(1.05);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.auth-notice {
  padding: 14px var(--space-3);
  border: var(--border-soft);
  border-radius: var(--radius-md);
  line-height: 1.5;
  background: rgba(244, 239, 230, 0.05);
  color: var(--gray-light);
}

.auth-notice.is-error {
  background: rgba(255, 106, 106, 0.12);
  color: var(--error);
}

.auth-notice.is-success {
  background: rgba(68, 211, 156, 0.12);
  color: var(--success);
}

.auth-notice.is-warning {
  background: rgba(244, 185, 3, 0.12);
  color: var(--yellow);
}

.hero-card,
.panel,
.metric-card,
.product-card,
.history-card,
.state-card,
.view-switcher {
  border: var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: var(--space-4);
  padding: clamp(20px, 3vw, 32px);
  background:
    linear-gradient(145deg, rgba(244, 185, 3, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(28, 28, 28, 0.96), rgba(13, 13, 13, 0.98));
  box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -80px auto auto -80px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 185, 3, 0.22), transparent 68%);
  pointer-events: none;
}

.hero-card::after {
  inset: 0;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 48%);
}

.brand-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 208, 71, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(10, 10, 10, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 34px rgba(244, 185, 3, 0.18);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 185, 3, 0.12), transparent 70%);
  pointer-events: none;
}

.brand-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(244, 185, 3, 0.12));
}

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

.auth-brand > div,
.section-head > div:first-child,
.alerts-head > div,
.create-head > div,
.history-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 var(--space-1);
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy h1,
.section-head h2,
.alerts-head h3,
.create-head h3,
.product-name,
.history-product {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.brand-copy h1 {
  color: var(--gray-light);
  font-size: clamp(2rem, 6vw, 3rem);
}

.hero-location {
  margin: var(--space-1) 0 0;
  color: var(--text-highlight);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-text {
  max-width: 48ch;
  margin: var(--space-2) 0 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
}

.session-chip {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 185, 3, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-highlight);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ghost-button {
  border: 1px solid rgba(244, 185, 3, 0.14);
  border-radius: var(--radius-md);
  background: rgba(244, 239, 230, 0.06);
  color: var(--gray-light);
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  backdrop-filter: blur(8px);
}

.ghost-button:not(:disabled):hover,
.view-button:not(:disabled):hover,
.action-button:not(:disabled):hover {
  background: var(--yellow-hover);
  color: var(--black);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(244, 185, 3, 0.16);
}

.ghost-button:active,
.view-button:active,
.action-button:active,
.auth-submit:active {
  transform: translateY(0);
}

.ghost-button-danger {
  border-color: rgba(255, 106, 106, 0.18);
}

.ghost-button-danger:hover {
  background: rgba(255, 106, 106, 0.92);
  color: var(--black);
  box-shadow: 0 10px 24px rgba(255, 106, 106, 0.18);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 0;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(210, 199, 179, 0.1);
  position: relative;
  z-index: 1;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-1) var(--space-2);
  border: 1px solid rgba(244, 185, 3, 0.12);
  border-radius: 999px;
  background: rgba(244, 185, 3, 0.1);
  color: var(--text-highlight);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
}

.auth-summary .meta-pill {
  min-height: 72px;
  padding: 14px 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(244, 185, 3, 0.12), transparent),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--space-3);
  margin-top: 0;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.hero-highlight {
  position: relative;
  min-height: 100%;
  padding: var(--space-3);
  border: var(--border-soft);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(9, 9, 9, 0.42);
  backdrop-filter: blur(8px);
  transition:
    transform var(--transition-slow),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.hero-highlight::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 185, 3, 0.3), transparent 72%);
}

.hero-highlight:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 185, 3, 0.16);
  box-shadow: var(--shadow-card);
}

.hero-highlight-label {
  display: inline-block;
  margin-bottom: var(--space-1);
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-highlight strong {
  display: block;
  color: var(--gray-light);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.hero-highlight p {
  margin: var(--space-1) 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.view-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-1);
  padding: var(--space-1);
  margin-top: var(--space-4);
  position: sticky;
  top: var(--safe-top);
  z-index: 5;
  background: var(--surface-glass);
  border: var(--border-strong);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.view-button {
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--gray-secondary);
  min-height: 48px;
  padding: 14px var(--space-3);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.view-button.is-active {
  background: var(--yellow);
  color: var(--black);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 22px rgba(244, 185, 3, 0.16);
}

.notice-bar {
  margin-top: var(--space-3);
  padding: 14px var(--space-3);
  border: var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(244, 185, 3, 0.12);
  color: var(--text-highlight);
  line-height: 1.5;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.notice-bar.is-error {
  background: rgba(255, 106, 106, 0.12);
  color: var(--error);
}

.notice-bar.is-success {
  background: rgba(68, 211, 156, 0.12);
  color: var(--success);
}

.notice-bar.is-warning {
  background: rgba(244, 185, 3, 0.12);
  color: var(--yellow);
}

.content-stack {
  margin-top: var(--space-4);
}

.panel {
  display: none;
  padding: clamp(20px, 3vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 22%),
    linear-gradient(180deg, rgba(23, 23, 23, 0.96), rgba(14, 14, 14, 0.98));
}

.panel.is-active {
  display: grid;
  gap: var(--space-4);
}

.section-head {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: var(--border-soft);
}

.section-head h2 {
  color: var(--gray-light);
  font-size: 1.5rem;
}

.products-toolbar {
  display: grid;
  gap: var(--space-3);
}

.search-field input {
  padding-right: 44px;
}

.type-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-chip {
  min-height: 42px;
  border: 1px solid rgba(244, 185, 3, 0.12);
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.05);
  color: var(--gray-light);
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.filter-chip:hover {
  border-color: rgba(244, 185, 3, 0.24);
  transform: translateY(-1px);
}

.filter-chip.is-active {
  background: rgba(244, 185, 3, 0.14);
  color: var(--text-highlight);
  border-color: rgba(244, 185, 3, 0.28);
  box-shadow: 0 10px 22px rgba(244, 185, 3, 0.08);
}

.alerts-panel {
  margin-bottom: 0;
}

.alerts-head,
.create-head {
  display: flex;
  align-items: flex-end;
  min-height: 68px;
  margin-bottom: 0;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(210, 199, 179, 0.08);
}

.alerts-head h3,
.create-head h3 {
  color: var(--gray-light);
  font-size: 1.15rem;
}

.panel-note {
  margin: 0 0 var(--space-3);
  padding: 14px var(--space-3);
  border: var(--border-soft);
  border-radius: var(--radius-md);
  line-height: 1.5;
  color: var(--text-soft);
  background: rgba(244, 239, 230, 0.04);
}

.panel-note.is-warning {
  color: var(--yellow);
  background: rgba(244, 185, 3, 0.1);
}

.panel-note.is-success {
  color: var(--success);
  background: rgba(68, 211, 156, 0.1);
}

.utility-grid {
  display: grid;
  gap: var(--space-3);
  align-items: stretch;
  margin-bottom: var(--space-4);
}

.create-panel {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: var(--space-3);
  border: var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 32%),
    linear-gradient(180deg, rgba(20, 20, 20, 0.96), rgba(12, 12, 12, 0.98));
  box-shadow: var(--shadow-card);
}

.alerts-panel {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: var(--space-3);
  border: var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(244, 185, 3, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(20, 20, 20, 0.96), rgba(12, 12, 12, 0.98));
  box-shadow: var(--shadow-card);
}

.create-form {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.form-field {
  display: grid;
  gap: var(--space-1);
}

.form-field label {
  color: var(--gray-light);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.form-field input,
.form-field select {
  width: 100%;
  border: var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(8, 8, 8, 0.7);
  color: var(--text);
  min-height: 48px;
  padding: 14px var(--space-3);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.form-field input {
  appearance: none;
}

.form-field input::placeholder {
  color: rgba(210, 199, 179, 0.58);
}

.form-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(244, 185, 3, 0.85) 50%),
    linear-gradient(135deg, rgba(244, 185, 3, 0.85) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.form-field input:focus,
.form-field select:focus {
  border-color: rgba(244, 185, 3, 0.34);
  box-shadow: var(--focus-ring);
  background: rgba(12, 12, 12, 0.88);
}

.form-field-wide {
  min-width: 0;
}

.create-button {
  width: 100%;
  justify-self: start;
  border: 0;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-hover));
  color: var(--black);
  box-shadow: var(--shadow-button);
}

.create-button:hover {
  filter: saturate(1.05);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  align-items: stretch;
}

.metric-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 4px;
  padding: var(--space-3);
  min-height: 104px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(15, 15, 15, 0.86);
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(244, 185, 3, 0.72), transparent 70%);
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 185, 3, 0.1), transparent 72%);
  pointer-events: none;
}

.metric-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 185, 3, 0.18);
  box-shadow: var(--shadow-card-hover);
}

.metric-label {
  display: block;
  color: var(--gray-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.metric-value {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-highlight);
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric-ok {
  color: var(--success);
}

.metric-low {
  color: var(--yellow);
}

.metric-critical {
  color: var(--error);
}

.card-list,
.history-list,
.alerts-list {
  display: grid;
  gap: var(--space-3);
}

.product-card,
.history-card,
.state-card {
  padding: 18px;
}

.state-card-compact {
  margin-bottom: var(--space-3);
}

.product-card {
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%),
    linear-gradient(180deg, rgba(26, 26, 26, 0.96), rgba(16, 16, 16, 0.98));
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 185, 3, 0.34), transparent 72%);
}

.product-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 185, 3, 0.24);
  box-shadow: var(--shadow-card-hover);
}

.product-card.is-pending {
  opacity: 0.72;
}

.product-card.product-card-low {
  border-color: rgba(244, 185, 3, 0.26);
  background:
    linear-gradient(180deg, rgba(244, 185, 3, 0.05), transparent 28%),
    linear-gradient(180deg, rgba(26, 26, 26, 0.96), rgba(16, 16, 16, 0.98));
}

.product-card.product-card-critical {
  border-color: rgba(255, 106, 106, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 106, 106, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(26, 26, 26, 0.96), rgba(16, 16, 16, 0.98));
}

.product-card.product-card-critical::before {
  background: linear-gradient(90deg, rgba(255, 106, 106, 0.52), transparent 72%);
}

.product-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 156px);
  gap: var(--space-3);
  align-items: flex-start;
}

.product-copy-main {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.product-name {
  color: var(--gray-light);
  font-size: 1.1rem;
}

.product-headline {
  display: grid;
  gap: var(--space-2);
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.inline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.06);
  color: var(--gray-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-type-badge {
  color: var(--text-highlight);
  background: rgba(244, 185, 3, 0.1);
}

.product-unit-badge {
  color: var(--gray-light);
}

.product-meta {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.quantity-block {
  min-width: clamp(132px, 20vw, 156px);
  display: grid;
  gap: 4px;
  padding: 14px var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid rgba(244, 185, 3, 0.08);
  background:
    linear-gradient(180deg, rgba(244, 185, 3, 0.08), transparent 68%),
    rgba(11, 11, 11, 0.92);
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.quantity-label {
  display: block;
  color: var(--gray-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quantity-value {
  display: block;
  color: var(--text-highlight);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.quantity-unit {
  color: var(--gray-secondary);
  font-size: 0.82rem;
  line-height: 1.3;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-3);
}

.product-footer {
  padding-top: var(--space-3);
  border-top: 1px solid rgba(210, 199, 179, 0.08);
}

.status-badge,
.history-type {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge::before,
.history-type::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.status-ok {
  color: var(--success);
  background: rgba(68, 211, 156, 0.1);
}

.status-low {
  color: var(--yellow);
  background: rgba(244, 185, 3, 0.1);
}

.status-critical {
  color: var(--error);
  background: rgba(255, 106, 106, 0.1);
}

.action-group {
  display: inline-flex;
  gap: var(--space-2);
  padding: 6px;
  border: 1px solid rgba(210, 199, 179, 0.1);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    rgba(8, 8, 8, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.action-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(244, 239, 230, 0.08);
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.06);
  color: var(--gray-light);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 700;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast),
    box-shadow var(--transition-fast);
}

.action-button-add {
  background: var(--yellow);
  color: var(--black);
  border-color: rgba(255, 208, 71, 0.24);
  box-shadow: 0 8px 20px rgba(244, 185, 3, 0.16);
}

.action-button:disabled,
.ghost-button:disabled,
.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.alert-card {
  padding: var(--space-3);
  border: var(--border-soft);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(17, 17, 17, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.alert-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.alert-card.alert-low {
  border-color: rgba(244, 185, 3, 0.24);
  background:
    linear-gradient(180deg, var(--surface-warning), transparent),
    rgba(17, 17, 17, 0.96);
}

.alert-card.alert-critical {
  border-color: rgba(255, 106, 106, 0.24);
  background:
    linear-gradient(180deg, var(--surface-critical), transparent),
    rgba(17, 17, 17, 0.96);
}

.alert-card-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: flex-start;
  flex-wrap: wrap;
}

.alert-card-title {
  margin: 0;
  color: var(--gray-light);
  font-size: 1rem;
  font-weight: 700;
}

.alert-card-body {
  margin: var(--space-2) 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.history-copy {
  display: grid;
  align-content: start;
  gap: 6px;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  margin-top: 0;
  border: var(--border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent),
    linear-gradient(180deg, rgba(24, 24, 24, 0.96), rgba(14, 14, 14, 0.98));
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.history-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 185, 3, 0.18);
  box-shadow: var(--shadow-card-hover);
}

.history-product {
  color: var(--gray-light);
  font-size: 1rem;
}

.history-summary {
  margin: 0;
  color: var(--text-highlight);
  line-height: 1.55;
}

.history-detail {
  margin: 0;
  color: var(--gray-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-date {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.history-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 112px;
  align-items: flex-end;
  justify-self: end;
  text-align: right;
}

.history-type-entrada {
  color: var(--success);
  background: rgba(68, 211, 156, 0.1);
}

.history-type-saida {
  color: var(--yellow);
  background: rgba(244, 185, 3, 0.1);
}

.history-quantity {
  color: var(--text-highlight);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.state-card {
  display: grid;
  place-items: center;
  min-height: 132px;
  color: var(--gray-secondary);
  padding: var(--space-4);
  border-style: dashed;
  border-color: rgba(210, 199, 179, 0.16);
  line-height: 1.6;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent),
    rgba(17, 17, 17, 0.9);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.ghost-button:focus-visible,
.view-button:focus-visible,
.filter-chip:focus-visible,
.action-button:focus-visible,
.auth-submit:focus-visible,
.form-field input:focus-visible,
.form-field select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-strong);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero-highlight {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
      rgba(15, 15, 15, 0.9);
  }

  .view-switcher,
  .ghost-button {
    background: rgba(23, 23, 23, 0.96);
  }
}

@media (max-width: 899px) {
  .brand-row {
    flex-direction: column;
  }

  .hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .view-switcher {
    top: var(--space-3);
  }
}

@media (min-width: 760px) {
  .app-shell {
    padding: var(--space-6) var(--space-4) 72px;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 460px);
    min-width: 0;
    justify-self: end;
  }

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

  .utility-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: stretch;
  }

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

  .create-form {
    grid-template-columns:
      minmax(0, 1.5fr)
      minmax(140px, 0.75fr)
      minmax(140px, 0.75fr)
      minmax(140px, 0.75fr)
      minmax(140px, 0.75fr)
      auto;
    align-items: end;
  }

  .form-field-wide {
    grid-column: 1 / -1;
  }

  .create-button {
    width: auto;
    min-width: 160px;
  }
}

@media (min-width: 900px) {
  .brand-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
  }

  .hero-actions {
    max-width: 340px;
    justify-content: flex-end;
  }
}

@media (min-width: 1024px) {
  .hero-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .app-shell {
    padding-inline: var(--space-2);
  }

  .auth-card {
    padding: 24px;
    border-radius: 22px;
  }

  .auth-brand {
    grid-template-columns: 1fr;
  }

  .auth-summary .meta-pill {
    min-height: 64px;
    padding-inline: 10px;
    font-size: 0.72rem;
    width: 100%;
  }

  .brand-row,
  .product-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .type-filter-group {
    gap: var(--space-1);
  }

  .product-copy,
  .history-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ghost-button,
  .quantity-block,
  .history-meta {
    width: 100%;
    text-align: left;
    align-items: flex-start;
  }

  .action-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-button {
    width: 100%;
  }

  .hero-actions {
    width: 100%;
  }

  .view-switcher {
    top: var(--space-2);
  }

  .hero-meta {
    gap: var(--space-1);
  }

  .meta-pill {
    width: fit-content;
  }

  .product-headline {
    gap: var(--space-1);
  }

  .session-chip {
    max-width: none;
    width: 100%;
  }

  .panel {
    padding: 18px;
  }

  .product-card,
  .history-card,
  .state-card,
  .alert-card {
    padding: 16px;
  }

  .metric-card {
    min-height: 92px;
  }
}

:root {
  --max-width: 1200px;
  --surface: #14110f;
  --surface-muted: #110d0b;
  --surface-elevated: #1a1512;
  --surface-glass: rgba(20, 16, 13, 0.76);
  --border-soft: 1px solid rgba(255, 232, 196, 0.09);
  --border-strong: 1px solid rgba(244, 185, 3, 0.18);
  --shadow-soft: 0 30px 88px rgba(0, 0, 0, 0.42);
  --shadow-card: 0 16px 34px rgba(0, 0, 0, 0.24);
  --shadow-card-hover: 0 24px 52px rgba(0, 0, 0, 0.32);
  --shadow-glow: 0 26px 74px rgba(244, 185, 3, 0.12);
  --shadow-button: 0 18px 30px rgba(244, 185, 3, 0.24);
}

body {
  background:
    radial-gradient(circle at 14% -4%, rgba(255, 199, 72, 0.2), transparent 24%),
    radial-gradient(circle at 88% 0%, rgba(177, 105, 18, 0.18), transparent 22%),
    radial-gradient(circle at 18% 42%, rgba(244, 185, 3, 0.08), transparent 24%),
    linear-gradient(180deg, #090807 0%, #120e0b 54%, #080706 100%);
}

body::before {
  top: -150px;
  right: -90px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(244, 185, 3, 0.18), transparent 64%);
  filter: blur(20px);
}

body::after {
  inset: 0;
  width: auto;
  height: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 26%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 88px);
  opacity: 0.16;
  filter: none;
}

.app-shell {
  padding: clamp(24px, 4vw, 56px) var(--space-3) 88px;
}

.auth-card,
.hero-card,
.panel {
  border-radius: 30px;
}

.auth-card {
  width: min(100%, 640px);
  gap: clamp(22px, 3vw, 32px);
  padding: clamp(28px, 4vw, 40px);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(145deg, rgba(244, 185, 3, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(25, 20, 16, 0.96), rgba(10, 9, 7, 0.99));
}

.auth-card::before,
.hero-card::before,
.panel::before,
.alerts-panel::before,
.create-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 215, 112, 0.42), transparent 74%);
  pointer-events: none;
}

.auth-brand {
  align-items: center;
  gap: clamp(16px, 2.5vw, 24px);
}

.auth-brand-mark {
  width: 104px;
  height: 104px;
  flex-basis: 104px;
  padding: 10px;
  border-radius: 30px;
}

.auth-title {
  line-height: 1;
}

.auth-text {
  max-width: 44ch;
  color: rgba(229, 221, 209, 0.84);
}

.auth-summary {
  gap: 14px;
}

.auth-summary .meta-pill {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 8px;
  min-height: 92px;
  padding: 18px 16px;
  border-radius: 20px;
  border-color: rgba(244, 185, 3, 0.14);
  background:
    linear-gradient(180deg, rgba(244, 185, 3, 0.12), transparent),
    rgba(255, 255, 255, 0.04);
  text-align: left;
}

.auth-summary .meta-pill strong {
  color: var(--gray-light);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-summary .meta-pill small {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.auth-form {
  gap: 18px;
  padding-top: 18px;
}

.auth-submit {
  min-height: 54px;
  border-radius: 16px;
}

.hero-card {
  gap: clamp(24px, 3vw, 30px);
  padding: clamp(24px, 4vw, 38px);
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 222, 138, 0.08), transparent 16%),
    linear-gradient(128deg, rgba(244, 185, 3, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(27, 21, 17, 0.96), rgba(10, 9, 7, 0.99));
}

.hero-card::before {
  inset: -96px auto auto -96px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(244, 185, 3, 0.24), transparent 68%);
}

.brand-row {
  gap: clamp(20px, 3vw, 32px);
  align-items: center;
}

.brand-mark {
  width: 96px;
  height: 96px;
  flex-basis: 96px;
  padding: 8px;
  border-radius: 30px;
  border-color: rgba(255, 208, 71, 0.22);
}

.brand-copy h1 {
  max-width: 10ch;
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  line-height: 0.96;
}

.hero-location {
  margin-top: 10px;
}

.hero-text {
  max-width: 54ch;
  font-size: 1rem;
  color: rgba(229, 221, 209, 0.84);
}

.hero-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.session-chip {
  max-width: 320px;
  padding: 13px 16px;
  border-color: rgba(244, 185, 3, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(255, 255, 255, 0.03);
}

.ghost-button {
  min-height: 50px;
  border-radius: 16px;
  padding: 13px 16px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding-top: 0;
  border-top: 0;
}

.hero-meta .meta-pill {
  min-height: 50px;
  justify-content: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(255, 255, 255, 0.03);
  color: var(--gray-light);
}

.hero-highlights {
  gap: 14px;
}

.hero-highlight {
  min-height: 176px;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 36%),
    rgba(11, 10, 9, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-highlight strong {
  font-size: 1.08rem;
}

.view-switcher {
  width: min(100%, 540px);
  margin: 28px auto 0;
  padding: 6px;
  border-radius: 22px;
  background: rgba(20, 16, 13, 0.8);
}

.view-button {
  min-height: 52px;
  border-radius: 16px;
}

.view-button.is-active {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-hover));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 14px 26px rgba(244, 185, 3, 0.16);
}

.notice-bar {
  max-width: 780px;
  margin-inline: auto;
  padding: 15px 18px;
  border-radius: 18px;
}

.content-stack {
  margin-top: 28px;
}

.panel {
  position: relative;
  overflow: hidden;
  gap: 22px;
  padding: clamp(20px, 3vw, 30px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    linear-gradient(180deg, rgba(22, 18, 15, 0.96), rgba(10, 9, 8, 0.99));
}

.section-head {
  gap: 18px;
  margin-bottom: 0;
  padding: 22px;
  border: var(--border-soft);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 36%),
    rgba(255, 255, 255, 0.02);
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.section-text {
  max-width: 54ch;
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.panel-text {
  max-width: 40ch;
}

.products-toolbar {
  position: relative;
  gap: 16px;
  padding: 18px;
  border: var(--border-soft);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    rgba(255, 255, 255, 0.02);
}

.search-field {
  position: relative;
}

.search-field::before,
.search-field::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.search-field::before {
  right: 20px;
  bottom: 18px;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(244, 185, 3, 0.78);
  border-radius: 999px;
}

.search-field::after {
  right: 16px;
  bottom: 15px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(244, 185, 3, 0.78);
  transform: rotate(45deg);
  transform-origin: center;
}

.search-field input {
  padding-right: 52px;
}

.type-filter-group {
  gap: 10px;
  align-items: center;
}

.filter-chip {
  min-height: 44px;
  padding: 10px 16px;
  border-color: rgba(244, 185, 3, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(255, 255, 255, 0.035);
}

.filter-chip.is-active {
  color: var(--black);
  border-color: transparent;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-hover));
  box-shadow: 0 14px 26px rgba(244, 185, 3, 0.16);
}

.utility-grid {
  gap: 18px;
  margin-bottom: 0;
}

.alerts-panel,
.create-panel {
  position: relative;
  overflow: hidden;
  gap: 18px;
  padding: 22px;
  border-radius: 26px;
}

.alerts-panel {
  background:
    linear-gradient(180deg, rgba(244, 185, 3, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(20, 18, 15, 0.96), rgba(11, 10, 8, 0.98));
}

.create-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%),
    linear-gradient(180deg, rgba(20, 18, 15, 0.96), rgba(11, 10, 8, 0.98));
}

.alerts-head,
.create-head {
  min-height: auto;
  padding-bottom: 0;
  border-bottom: 0;
}

.create-form {
  gap: 14px;
}

.form-field label {
  color: var(--gray-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-field input,
.form-field select {
  min-height: 52px;
  border-radius: 16px;
  background: rgba(9, 8, 7, 0.78);
}

.metrics-grid {
  gap: 14px;
}

.metric-card {
  min-height: 116px;
  padding: 18px;
  border-radius: 20px;
}

.metric-card::before {
  height: 4px;
}

.metric-card-total::before {
  background: linear-gradient(90deg, rgba(244, 185, 3, 0.92), transparent 72%);
}

.metric-card-ok::before {
  background: linear-gradient(90deg, rgba(68, 211, 156, 0.92), transparent 72%);
}

.metric-card-low::before {
  background: linear-gradient(90deg, rgba(244, 185, 3, 0.92), transparent 72%);
}

.metric-card-critical::before {
  background: linear-gradient(90deg, rgba(255, 106, 106, 0.96), transparent 72%);
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-value {
  font-size: 1.8rem;
}

.card-list {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  align-items: stretch;
  gap: 16px;
}

.alerts-list,
.history-list {
  gap: 14px;
}

.alerts-list {
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 185, 3, 0.34) transparent;
}

.alerts-list::-webkit-scrollbar {
  width: 8px;
}

.alerts-list::-webkit-scrollbar-track {
  background: transparent;
}

.alerts-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(244, 185, 3, 0.28);
}

.product-card,
.history-card,
.alert-card,
.state-card {
  border-radius: 22px;
}

.product-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  min-height: 100%;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -50px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 185, 3, 0.1), transparent 70%);
  pointer-events: none;
}

.product-card.product-card-low {
  box-shadow: 0 20px 44px rgba(244, 185, 3, 0.08);
}

.product-card.product-card-critical {
  box-shadow: 0 20px 44px rgba(255, 106, 106, 0.08);
}

.product-copy {
  grid-template-columns: minmax(0, 1fr) minmax(124px, 148px);
  gap: 16px;
  align-items: stretch;
}

.product-name {
  font-size: 1.15rem;
  line-height: 1.1;
}

.product-headline {
  gap: 10px;
}

.product-tags {
  gap: 8px;
}

.inline-badge {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 232, 196, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.product-type-badge {
  color: var(--text-highlight);
  border-color: rgba(244, 185, 3, 0.18);
  background: rgba(244, 185, 3, 0.1);
}

.product-unit-badge {
  color: var(--gray-light);
}

.product-meta {
  font-size: 0.92rem;
}

.quantity-block {
  gap: 8px;
  justify-content: end;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(244, 185, 3, 0.1), transparent 72%),
    rgba(12, 11, 9, 0.94);
}

.quantity-value {
  font-size: clamp(1.9rem, 3vw, 2.25rem);
}

.quantity-unit {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-footer {
  gap: 14px;
  align-items: flex-end;
  margin-top: 0;
}

.status-badge,
.history-type {
  min-height: 38px;
  padding: 10px 14px;
}

.action-group {
  gap: 10px;
  padding: 7px;
}

.action-button {
  width: 46px;
  height: 46px;
}

.alert-card {
  padding: 18px;
}

.alert-card-title {
  font-size: 1.02rem;
}

.alert-card-body {
  font-size: 0.94rem;
}

.history-card {
  position: relative;
  padding: 20px;
}

.history-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(244, 185, 3, 0.86), transparent 88%);
}

.history-summary {
  font-size: 0.97rem;
}

.history-detail {
  font-size: 0.78rem;
}

.history-date {
  font-size: 0.88rem;
}

.history-meta {
  min-width: 124px;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 232, 196, 0.08);
}

.history-quantity {
  font-size: 1.14rem;
}

.state-card {
  min-height: 148px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 34%),
    rgba(16, 14, 13, 0.92);
}

.auth-card,
.hero-card,
.panel {
  animation: surface-rise 420ms ease both;
}

@keyframes surface-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .app-shell {
    padding-inline: var(--space-4);
  }

  .auth-card {
    width: min(100%, 700px);
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }

  .metrics-grid {
    width: min(100%, 500px);
  }

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

  .utility-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  }

  .create-form {
    grid-template-columns:
      minmax(0, 1.4fr)
      minmax(146px, 0.8fr)
      minmax(146px, 0.8fr)
      minmax(146px, 0.8fr)
      minmax(146px, 0.8fr)
      auto;
  }

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

@media (min-width: 900px) {
  .brand-row {
    grid-template-columns: auto minmax(0, 1fr) minmax(240px, 320px);
    align-items: center;
  }
}

@media (min-width: 1120px) {
  .card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .hero-actions {
    width: 100%;
    justify-items: stretch;
  }

  .ghost-button,
  .session-chip {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 639px) {
  .auth-card,
  .hero-card,
  .panel {
    border-radius: 24px;
  }

  .auth-summary {
    grid-template-columns: 1fr;
  }

  .auth-summary .meta-pill {
    min-height: auto;
  }

  .section-head,
  .products-toolbar,
  .alerts-panel,
  .create-panel {
    padding: 18px;
  }

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

  .view-switcher {
    width: 100%;
  }

  .type-filter-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .type-filter-group::-webkit-scrollbar {
    display: none;
  }

  .product-card,
  .history-card,
  .alert-card,
  .state-card {
    border-radius: 20px;
  }

  .history-card::before {
    left: 18px;
    right: 18px;
    top: 0;
    bottom: auto;
    width: auto;
    height: 3px;
    background: linear-gradient(90deg, rgba(244, 185, 3, 0.86), transparent 88%);
  }

  .history-meta {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid rgba(255, 232, 196, 0.08);
  }
}

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

.auth-support-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 16px;
  border: var(--border-soft);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-support-label {
  color: var(--text-highlight);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-support-card strong {
  color: var(--gray-light);
  font-size: 0.92rem;
  line-height: 1.45;
}

.product-health {
  display: grid;
  gap: 10px;
}

.stock-progress {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

.stock-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-hover));
  box-shadow: 0 0 18px rgba(244, 185, 3, 0.22);
  transition: width var(--transition-slow), background-color var(--transition-fast);
}

.stock-progress-fill-ok {
  background: linear-gradient(90deg, rgba(68, 211, 156, 0.96), rgba(125, 226, 184, 0.96));
  box-shadow: 0 0 18px rgba(68, 211, 156, 0.18);
}

.stock-progress-fill-low {
  background: linear-gradient(90deg, rgba(244, 185, 3, 0.96), rgba(255, 208, 71, 0.96));
}

.stock-progress-fill-critical {
  background: linear-gradient(90deg, rgba(255, 106, 106, 0.96), rgba(255, 146, 146, 0.96));
  box-shadow: 0 0 18px rgba(255, 106, 106, 0.18);
}

.stock-note {
  margin: 0;
  color: var(--gray-secondary);
  font-size: 0.84rem;
  line-height: 1.52;
}

.quantity-block-ok {
  border-color: rgba(68, 211, 156, 0.16);
  background:
    linear-gradient(180deg, rgba(68, 211, 156, 0.08), transparent 72%),
    rgba(12, 11, 9, 0.94);
}

.quantity-block-low {
  border-color: rgba(244, 185, 3, 0.18);
}

.quantity-block-critical {
  border-color: rgba(255, 106, 106, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 106, 106, 0.1), transparent 72%),
    rgba(12, 11, 9, 0.94);
}

.history-card-entrada::before {
  background: linear-gradient(180deg, rgba(68, 211, 156, 0.92), transparent 88%);
}

.history-card-saida::before {
  background: linear-gradient(180deg, rgba(244, 185, 3, 0.92), transparent 88%);
}

.history-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.history-flow-value {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 232, 196, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--gray-light);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.history-flow-arrow {
  color: var(--gray-secondary);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.history-flow-after {
  color: var(--text-highlight);
  border-color: rgba(244, 185, 3, 0.18);
  background: rgba(244, 185, 3, 0.1);
}

.history-card-entrada .history-flow-after {
  color: var(--success);
  border-color: rgba(68, 211, 156, 0.2);
  background: rgba(68, 211, 156, 0.1);
}

.history-card-saida .history-flow-after {
  color: var(--yellow);
  border-color: rgba(244, 185, 3, 0.18);
  background: rgba(244, 185, 3, 0.1);
}

.history-summary {
  font-weight: 700;
}

.history-detail {
  margin-top: -2px;
}

.section-runtime {
  display: inline-flex;
  align-items: center;
  margin: 14px 0 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 232, 196, 0.1);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(255, 255, 255, 0.03);
  color: var(--gray-light);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.hero-card,
.section-head,
.products-toolbar,
.alerts-panel,
.create-panel,
.product-card,
.history-card,
.state-card,
.alert-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.section-head,
.products-toolbar,
.alerts-panel,
.create-panel {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 36px rgba(0, 0, 0, 0.18);
}

.brand-row {
  align-items: start;
}

.brand-copy {
  display: grid;
  align-content: start;
  gap: 2px;
}

.hero-actions {
  align-content: start;
}

.section-head > div:first-child,
.alerts-head > div,
.create-head > div {
  display: grid;
  align-content: start;
}

.products-toolbar {
  align-items: end;
}

.type-filter-group {
  align-content: start;
}

.create-form {
  align-content: start;
}

.card-list {
  gap: 18px;
}

.product-card {
  min-height: 292px;
  border-color: rgba(255, 232, 196, 0.08);
}

.product-copy-main {
  gap: 10px;
}

.quantity-block {
  min-height: 132px;
}

.product-footer {
  align-items: center;
}

.action-group {
  align-self: center;
}

.history-list {
  gap: 16px;
}

.history-card {
  grid-template-columns: minmax(0, 1fr) minmax(136px, auto);
  border-color: rgba(255, 232, 196, 0.08);
}

.history-meta {
  min-height: 100%;
  justify-content: center;
}

@media (min-width: 760px) {
  .alerts-panel,
  .create-panel {
    align-self: start;
  }
}

@media (max-width: 639px) {
  .auth-support {
    grid-template-columns: 1fr;
  }

  .auth-support-card {
    min-height: auto;
  }

  .history-flow {
    gap: 6px;
  }

  .history-flow-value {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .section-runtime {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

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

  .products-toolbar,
  .section-head {
    gap: 14px;
  }

  .product-card {
    min-height: auto;
  }

  .quantity-block {
    min-height: auto;
  }

  .history-card {
    grid-template-columns: 1fr;
  }

  .alerts-list {
    max-height: 320px;
  }
}

.auth-card,
.hero-card,
.panel {
  box-shadow:
    0 26px 64px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.01);
}

.auth-summary .meta-pill,
.auth-support-card,
.hero-meta .meta-pill,
.metric-card,
.quantity-block,
.history-meta {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-summary .meta-pill {
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
}

.auth-submit {
  min-height: 56px;
  box-shadow: 0 18px 32px rgba(244, 185, 3, 0.18);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(244, 185, 3, 0.22);
}

.hero-card {
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 222, 138, 0.11), transparent 18%),
    radial-gradient(circle at 8% 0%, rgba(244, 185, 3, 0.1), transparent 24%),
    linear-gradient(128deg, rgba(244, 185, 3, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(27, 21, 17, 0.97), rgba(10, 9, 7, 0.99));
}

.brand-row {
  align-items: stretch;
}

.brand-copy {
  gap: 6px;
}

.hero-actions {
  min-width: min(100%, 220px);
  padding: 14px;
  border: 1px solid rgba(255, 232, 196, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
    rgba(9, 8, 7, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-actions .ghost-button,
.hero-actions .session-chip {
  width: 100%;
  justify-content: center;
}

.hero-meta {
  gap: 14px;
}

.hero-meta .meta-pill {
  min-height: 56px;
  border-color: rgba(255, 232, 196, 0.08);
}

.hero-highlight {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 188px;
  border: 1px solid rgba(255, 232, 196, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 38%),
    rgba(11, 10, 9, 0.54);
}

.hero-highlight::before {
  content: "";
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), transparent);
}

.hero-highlight p {
  margin: 0;
}

.section-head,
.products-toolbar,
.alerts-panel,
.create-panel {
  border-color: rgba(255, 232, 196, 0.09);
}

.section-head {
  gap: 20px;
}

.metrics-grid {
  gap: 16px;
}

.metric-card {
  justify-content: space-between;
}

.products-toolbar {
  gap: 18px;
  padding: 20px;
}

.type-filter-group {
  padding: 6px;
  border: 1px solid rgba(255, 232, 196, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 50%),
    rgba(9, 8, 7, 0.42);
}

.filter-chip {
  min-height: 46px;
  white-space: nowrap;
}

.card-list {
  gap: 20px;
}

.product-card {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%),
    rgba(16, 14, 12, 0.95);
}

.product-copy {
  grid-template-columns: minmax(0, 1fr) minmax(136px, 156px);
  gap: 18px;
}

.product-copy-main {
  align-content: start;
  gap: 12px;
}

.product-meta {
  margin: 0;
}

.quantity-block {
  min-height: 144px;
  align-content: center;
  justify-items: end;
  text-align: right;
  padding: 18px;
  border: 1px solid rgba(255, 232, 196, 0.09);
  background:
    linear-gradient(180deg, rgba(244, 185, 3, 0.11), transparent 70%),
    rgba(11, 10, 9, 0.95);
}

.quantity-value {
  line-height: 1;
}

.product-footer {
  padding-top: 16px;
  border-top-color: rgba(255, 232, 196, 0.1);
}

.action-group {
  padding: 8px;
  border-color: rgba(255, 232, 196, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 60%),
    rgba(8, 8, 7, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.action-button {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.action-button-add {
  box-shadow: 0 14px 26px rgba(244, 185, 3, 0.18);
}

.history-card {
  grid-template-columns: minmax(0, 1fr) minmax(152px, 184px);
  gap: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.03), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
    rgba(15, 13, 12, 0.95);
}

.history-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

.history-flow {
  margin-top: 2px;
}

.history-meta {
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 232, 196, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 46%),
    rgba(255, 255, 255, 0.02);
  border-left: 0;
}

.history-quantity {
  line-height: 1;
}

.section-runtime::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-hover));
  box-shadow: 0 0 0 5px rgba(244, 185, 3, 0.08);
}

@media (min-width: 900px) {
  .hero-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .section-head {
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 500px);
  }
}

@media (max-width: 899px) {
  .hero-actions {
    min-width: 100%;
  }
}

@media (max-width: 639px) {
  .hero-actions {
    padding: 12px;
  }

  .type-filter-group {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .quantity-block,
  .history-meta {
    justify-items: start;
    text-align: left;
  }
}

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