:root {
  --forest-950: #123226;
  --forest-900: #183f2f;
  --forest-800: #20543c;
  --forest-700: #2b6e4b;
  --leaf-600: #3f8f5e;
  --leaf-500: #5aa873;
  --leaf-100: #e8f4eb;
  --leaf-50: #f3faf5;
  --gold-500: #e8a93d;
  --gold-100: #fff2d8;
  --cream-100: #faf8f1;
  --cream-50: #fdfcf8;
  --ink-900: #193128;
  --ink-700: #435b50;
  --ink-500: #6f8179;
  --line: #dfe9e1;
  --white: #ffffff;
  --danger: #b84646;
  --danger-soft: #fff0ee;
  --warning: #966716;
  --warning-soft: #fff5dc;
  --shadow-sm: 0 8px 24px rgba(25, 65, 45, 0.08);
  --shadow-md: 0 18px 50px rgba(25, 65, 45, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 8% 0%, rgba(90, 168, 115, 0.15), transparent 28rem),
    radial-gradient(circle at 94% 18%, rgba(232, 169, 61, 0.10), transparent 24rem),
    var(--cream-100);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

h1, h2, h3 {
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: .65rem; }
h2 { font-size: clamp(1.3rem, 2vw, 1.75rem); }
h3 { font-size: 1.05rem; }

p { color: var(--ink-700); }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 20px;
  background: rgba(253, 252, 248, 0.86);
  border-bottom: 1px solid rgba(223, 233, 225, 0.9);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  color: var(--forest-900);
  text-decoration: none;
}

.brand-logo {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(43, 110, 75, .16);
}

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 1rem; font-weight: 850; }
.brand-copy small { margin-top: 3px; color: var(--ink-500); font-size: .72rem; font-weight: 700; }

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 12px;
  color: var(--ink-700);
  font-size: .88rem;
  font-weight: 750;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--forest-800);
  background: var(--leaf-100);
}

.nav a:hover { transform: translateY(-1px); }
.nav a.nav-cta { color: var(--white); background: var(--forest-800); padding-inline: 15px; }
.nav a.nav-cta:hover { background: var(--forest-700); }

.nav-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--white);
  background: var(--gold-500);
  font-size: .7rem;
}

.menu {
  display: none;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--forest-900);
  background: var(--white);
  cursor: pointer;
  font-size: 1.25rem;
}

.container {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 78px;
  flex: 1;
}

.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.pagehead p { max-width: 660px; margin-bottom: 0; }

.eyebrow,
.tag,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--forest-700);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow::before,
.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold-500);
  box-shadow: 0 0 0 5px var(--gold-100);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  align-items: center;
  gap: clamp(30px, 6vw, 74px);
  min-height: 520px;
  padding: clamp(42px, 7vw, 82px) clamp(24px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid rgba(223, 233, 225, .88);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(243,250,245,.94));
  box-shadow: var(--shadow-md);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
}

.hero::before {
  width: 330px;
  height: 330px;
  right: -90px;
  top: -95px;
  background: rgba(90, 168, 115, .18);
}

.hero::after {
  width: 230px;
  height: 230px;
  left: 36%;
  bottom: -160px;
  background: rgba(232, 169, 61, .13);
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(2.7rem, 6.2vw, 5.2rem);
}

.hero h1 span { color: var(--forest-700); }
.hero-copy > p { max-width: 670px; margin-bottom: 28px; font-size: 1.08rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 30px;
  color: var(--ink-500);
  font-size: .88rem;
  font-weight: 700;
}

.trust-line span::before { content: "✓"; margin-right: 7px; color: var(--leaf-600); }

.hero-card,
.panel,
.form-card,
.card,
.stat,
.empty-state,
.auth-aside {
  border: 1px solid rgba(223, 233, 225, .96);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-sm);
}

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

.hero-card-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.hero-card-head h2,
.panel-head h2 { margin-bottom: 0; }

.live-pill,
.status-pill,
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.2;
}

.live-pill { color: var(--forest-700); background: var(--leaf-100); }
.live-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf-600); }
.status-pill { color: var(--forest-700); background: var(--leaf-100); }
.status-pill.warning { color: var(--warning); background: var(--warning-soft); }
.status-pill.danger { color: var(--danger); background: var(--danger-soft); }
.role-pill { color: var(--ink-700); background: #f0f3f1; text-transform: capitalize; }

.price-row,
.activity-row,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.price-row:last-child,
.activity-row:last-child,
.row:last-child { border-bottom: 0; }

.item-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.item-icon {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--leaf-100);
  font-size: 1.1rem;
}
.item-identity strong { display: block; }
.item-identity small { display: block; color: var(--ink-500); }
.price-value { color: var(--forest-800); font-size: 1.02rem; white-space: nowrap; }

.section-block { margin-top: 42px; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-heading h2 { margin-bottom: 4px; }
.section-heading p { margin-bottom: 0; }

.cards,
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  padding: 22px;
  border-radius: 22px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card::after {
  content: "";
  position: absolute;
  width: 105px;
  height: 105px;
  right: -45px;
  bottom: -50px;
  border-radius: 50%;
  background: var(--leaf-50);
  transition: transform .25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #cfe1d3;
  box-shadow: var(--shadow-md);
}
.card:hover::after { transform: scale(1.18); }
.card h2, .card h3 { margin: 8px 0 12px; }
.card p { margin-bottom: 12px; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.product-emoji {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--leaf-100), var(--gold-100));
  font-size: 1.45rem;
}

.metric,
.stat b {
  display: block;
  color: var(--forest-800);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 880;
  letter-spacing: -0.04em;
}

.market-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.market-price span { color: var(--ink-500); font-size: .83rem; font-weight: 700; }
.market-price strong { color: var(--forest-800); }

.stat {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 22px;
  border-radius: 20px;
}
.stat b { grid-row: 1; }
.stat > span:not(.stat-icon) { grid-column: 1; color: var(--ink-500); font-weight: 700; }
.stat-icon {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--leaf-100);
  font-size: 1.25rem;
}

.grid2,
.grid3 {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel,
.form-card { padding: clamp(20px, 3vw, 30px); border-radius: 24px; }
.panel h2:first-child { margin-bottom: 18px; }

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 13px;
  color: var(--white);
  background: linear-gradient(135deg, var(--forest-800), var(--forest-700));
  box-shadow: 0 9px 22px rgba(32, 84, 60, .18);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 28px rgba(32, 84, 60, .24);
}

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

.button.secondary {
  color: var(--forest-800);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: none;
}
.button.secondary:hover { background: var(--leaf-50); }
.button.small,
button.small { min-height: 36px; padding: 7px 12px; border-radius: 10px; font-size: .84rem; }
.button.danger, button.danger { background: var(--danger); }

label {
  display: block;
  color: var(--ink-900);
  font-size: .9rem;
  font-weight: 780;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 11px 13px;
  border: 1px solid #cfdcd2;
  border-radius: 12px;
  outline: none;
  color: var(--ink-900);
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input::placeholder,
textarea::placeholder { color: #97a49e; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--leaf-500);
  box-shadow: 0 0 0 4px rgba(90, 168, 115, .14);
}

.form-card { max-width: 840px; margin: 22px auto; }
.form-card.narrow { max-width: 470px; }
.form-card h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.form-card form { margin-top: 22px; }
.form-card label + label { margin-top: 16px; }

.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 12px; align-self: end; }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  align-items: stretch;
  gap: 22px;
  max-width: 980px;
  margin: 28px auto;
}

.auth-aside {
  position: relative;
  min-height: 520px;
  padding: clamp(28px, 5vw, 52px);
  overflow: hidden;
  border-radius: 28px;
  color: var(--white);
  background:
    linear-gradient(150deg, rgba(24,63,47,.96), rgba(63,143,94,.92)),
    var(--forest-900);
}
.auth-aside h1, .auth-aside h2 { color: var(--white); }
.auth-aside p { color: rgba(255,255,255,.78); }
.auth-benefits { display: grid; gap: 14px; margin-top: 30px; }
.auth-benefit { display: flex; gap: 12px; align-items: flex-start; }
.auth-benefit span { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: rgba(255,255,255,.12); }
.auth-benefit strong { display: block; }
.auth-benefit small { display: block; color: rgba(255,255,255,.68); }

.auth-layout .form-card { width: 100%; margin: 0; display: flex; flex-direction: column; justify-content: center; }
.form-footer { margin-top: 18px; text-align: center; color: var(--ink-500); }
.form-footer a { color: var(--forest-700); font-weight: 800; }

.inline-form {
  display: grid;
  grid-template-columns: 1.1fr 1fr .65fr 1.3fr auto;
  align-items: end;
  gap: 12px;
}
.inline-form input,
.inline-form select { margin-top: 0; }

.tablewrap {
  overflow: auto;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}

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

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

th {
  color: var(--ink-700);
  background: #f2f7f3;
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

tbody tr { transition: background .18s ease; }
tbody tr:hover { background: var(--leaf-50); }
tbody tr:last-child td { border-bottom: 0; }
tr.low { background: var(--danger-soft); }
tr.low:hover { background: #ffe8e5; }

.mini {
  display: grid;
  grid-template-columns: 115px 86px 1fr auto;
  gap: 7px;
  min-width: 430px;
  align-items: center;
}
.mini input,
.mini select { min-height: 38px; margin: 0; padding: 8px 10px; }
.mini button { min-height: 38px; padding: 8px 12px; border-radius: 10px; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #cfe6d3;
  border-radius: 14px;
  color: var(--forest-800);
  background: #edf8ef;
  box-shadow: var(--shadow-sm);
}
.alert::before { content: "✓"; font-weight: 900; }
.alert.danger { color: var(--danger); border-color: #f0cac6; background: var(--danger-soft); }
.alert.danger::before { content: "!"; }
.alert.warning { color: var(--warning); border-color: #efdba9; background: var(--warning-soft); }
.alert.warning::before { content: "•"; }

.notice {
  position: relative;
  padding: 18px 18px 18px 52px;
  border-bottom: 1px solid var(--line);
}
.notice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gold-100);
}
.notice:last-child { border-bottom: 0; }
.notice h3 { margin-bottom: 5px; }
.notice p { margin-bottom: 7px; }
.notice small { color: var(--ink-500); }

.empty-state {
  padding: 42px 26px;
  border-radius: 20px;
  text-align: center;
  color: var(--ink-500);
}
.empty-state .empty-icon { display: block; margin-bottom: 10px; font-size: 2.2rem; }

.error-page {
  max-width: 720px;
  margin: 50px auto;
  padding: 56px 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.error-illustration { width: 86px; height: 86px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 24px; background: var(--warning-soft); font-size: 2.6rem; }

footer {
  padding: 28px 20px 34px;
  color: var(--ink-500);
  text-align: center;
  font-size: .88rem;
}
.footer-inner { width: min(1180px, 100%); margin: 0 auto; padding-top: 20px; border-top: 1px solid var(--line); }

@media (max-width: 1060px) {
  .menu { display: grid; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 16px;
    right: 16px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav a { justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; }
  .hero-card { max-width: 650px; }
  .inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-form button { width: 100%; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 24px, 1180px); padding-top: 24px; }
  .topbar { padding-inline: 12px; }
  .brand-copy small { display: none; }
  .nav.open { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding: 38px 22px; border-radius: 24px; }
  .hero h1 { font-size: clamp(2.45rem, 12vw, 4rem); }
  .hero-actions .button { width: 100%; }
  .pagehead, .section-heading { align-items: flex-start; flex-direction: column; }
  .pagehead .button { width: 100%; }
  .grid2, .grid3, .auth-layout { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .auth-aside { min-height: auto; }
  .inline-form { grid-template-columns: 1fr; }
  .panel, .form-card { border-radius: 20px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .button, .form-actions button { width: 100%; }
  .cards, .stats { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .brand-logo { width: 54px; height: 54px; }
  .brand-copy strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding-inline: 18px; }
  .hero-card, .panel, .form-card, .card { padding: 18px; }
  th, td { padding: 13px; }
}

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

/* Dashboard stock graph */
.stock-chart-panel {
  margin: 22px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(235, 196, 92, .12), transparent 32%),
    var(--white);
}
.stock-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.stock-chart-heading h2 { margin: 4px 0 6px; }
.stock-chart-heading p { max-width: 650px; margin: 0; color: var(--ink-500); }
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3da56c;
  box-shadow: 0 0 0 5px rgba(61, 165, 108, .13);
}
.stock-chart-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}
.chart-summary-item {
  position: relative;
  min-height: 78px;
  padding: 15px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(248, 251, 247, .86);
}
.chart-summary-item::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(44, 111, 73, .07);
}
.chart-summary-item.healthy { background: #eff8f1; }
.chart-summary-item.warning { background: #fff8e8; }
.chart-summary-item span { display: block; margin-bottom: 5px; color: var(--ink-500); font-size: .8rem; font-weight: 750; }
.chart-summary-item strong { position: relative; z-index: 1; color: var(--forest-800); font-size: 1.35rem; }
.chart-summary-item.warning strong { color: #9a6914; }
.stock-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--ink-500);
  font-size: .82rem;
  font-weight: 700;
}
.stock-chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-swatch { width: 11px; height: 11px; border-radius: 4px; }
.legend-swatch.available { background: #2f7d50; }
.stock-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 330px;
  padding-top: 8px;
}
.stock-chart-wrap canvas { width: 100% !important; }
.dashboard-lists { margin-top: 0; }

@media (max-width: 760px) {
  .stock-chart-heading { flex-direction: column; }
  .stock-chart-summary { grid-template-columns: 1fr; }
  .stock-chart-wrap { min-height: 390px; overflow-x: auto; }
}

.muted { color: var(--ink-500); }
.pagehead.compact { margin-top: 28px; margin-bottom: 12px; }
.flush-table { margin-top: 14px; box-shadow: none; }


/* Admin product-catalog controls */
.admin-catalog-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--leaf-50);
}
.admin-catalog-notice strong { color: var(--forest-800); }
.admin-catalog-notice span { color: var(--ink-500); font-size: .9rem; }
.catalog-table { min-width: 640px; }
.catalog-product-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 260px;
}
.catalog-delete-form { margin: 0; flex: 0 0 auto; }
.catalog-delete-button {
  min-width: 78px;
  font-weight: 850;
  box-shadow: 0 4px 12px rgba(184, 70, 70, .16);
}
@media (max-width: 700px) {
  .catalog-product-cell { align-items: flex-start; flex-direction: column; gap: 9px; }
}

/* Admin product catalog actions */
.catalog-actions-heading,
.catalog-actions-cell {
  width: 120px;
  text-align: center;
  white-space: nowrap;
}
.catalog-actions-cell .catalog-delete-form { margin: 0; }
.catalog-actions-cell .catalog-delete-button {
  display: inline-flex;
  min-width: 78px;
  justify-content: center;
  background: var(--danger, #b84646);
  color: #fff;
  border: 0;
}
.catalog-actions-cell .catalog-delete-button:hover { filter: brightness(.92); }

/* Final polish: navigation, catalog, price metadata, and dependency-free stock bars */
.nav-form { margin: 0; display: inline-flex; }
.nav-form input { display: none; }
.nav-logout {
  min-height: 40px;
  padding: 9px 11px;
  border: 0;
  border-radius: 12px;
  color: var(--ink-700);
  background: transparent;
  box-shadow: none;
  font-size: .88rem;
  font-weight: 750;
}
.nav-logout:hover {
  color: var(--forest-800);
  background: var(--leaf-100);
  box-shadow: none;
  transform: translateY(-1px);
}

.footer-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.footer-inner strong { color: var(--forest-800); }

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 300px);
  gap: 6px;
  margin: 22px 0 -8px;
}
.catalog-toolbar label { color: var(--ink-700); font-size: .8rem; }
.catalog-toolbar input { margin-top: 0; background: rgba(255,255,255,.92); }

.price-source {
  display: block;
  margin-top: 10px;
  color: var(--ink-500);
  font-size: .76rem;
}

.info-panel { margin-top: 20px; }
.info-panel p { margin: 5px 0 0; }
.history-heading { margin-top: 40px; }

.stock-bars {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}
.stock-bar-row { display: grid; gap: 7px; }
.stock-bar-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink-700);
  font-size: .88rem;
}
.stock-bar-heading span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}
.stock-bar-heading strong { color: var(--forest-800); white-space: nowrap; }
.stock-bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3ee;
  box-shadow: inset 0 0 0 1px rgba(223,233,225,.75);
}
.stock-bar-fill {
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-700), var(--leaf-500));
  transition: width .35s ease;
}

.error-code {
  width: max-content;
  margin: 0 auto 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--forest-800);
  background: var(--leaf-100);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.error-actions { justify-content: center; margin-top: 24px; }

@media (max-width: 1060px) {
  .nav-form { display: flex; width: 100%; }
  .nav-logout { width: 100%; justify-content: flex-start; }
}

@media (max-width: 620px) {
  .brand-logo { width: 58px; height: 58px; }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .stock-bar-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .stock-bar-heading span { white-space: normal; }
  .market-price { align-items: flex-start; flex-direction: column; }
}

/* Keep Admin product actions visible while a wide catalog table scrolls. */
.catalog-actions-heading {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #f2f7f3;
}
.catalog-actions-cell {
  position: sticky;
  right: 0;
  z-index: 2;
  background: rgba(255,255,255,.98);
}
tbody tr:hover .catalog-actions-cell { background: var(--leaf-50); }
.full-width { width: 100%; }
.login-submit { margin-top: 20px; }
