:root {
  --bg: #eef3f6;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --ink: #15222e;
  --muted: #647381;
  --line: #dbe4e8;
  --brand: #0f7a5a;
  --brand-strong: #075f45;
  --accent: #e35d2f;
  --warning: #c97a12;
  --danger: #b42318;
  --nav: #10242b;
  --shadow: 0 18px 45px rgba(22, 36, 46, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

input[type="file"] {
  padding: 8px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 9px 14px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--brand-strong);
}

button.secondary {
  color: var(--ink);
  background: #edf2f4;
}

button.secondary:hover {
  background: #e1e9ed;
}

button.warning {
  background: var(--warning);
}

button.danger {
  background: var(--danger);
}

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

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

h1 {
  max-width: 760px;
  font-size: 26px;
  line-height: 1.18;
}

h2 {
  font-size: 29px;
  line-height: 1.15;
}

h3 {
  font-size: 18px;
}

p,
label,
.user-box span,
.item-meta,
.metric span,
.metric small,
.role-list span,
.section-kicker,
.panel-label {
  color: var(--muted);
}

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

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: var(--nav);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup small {
  display: block;
  color: #a8bbc2;
  margin-top: 3px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f6ef;
  color: var(--brand-strong);
  font-weight: 900;
}

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

.step-link {
  width: 100%;
  min-height: 46px;
  color: #c9d6db;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  text-align: left;
}

.step-link span {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #b9c9ce;
  font-size: 12px;
}

.step-link.active,
.step-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.13);
}

.step-link.active span {
  background: #e7f6ef;
  color: var(--brand-strong);
}

.side-note {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 5px;
}

.side-note span {
  color: #aac0c7;
  font-size: 13px;
}

.workspace {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-kicker {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.user-box,
.panel,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.user-box {
  min-width: 270px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.hero-band {
  min-height: 310px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(9, 30, 35, 0.86), rgba(9, 30, 35, 0.46), rgba(9, 30, 35, 0.04)),
    url("./assets/enterprise-grocery-hero.png") center / cover;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 34px;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-content {
  max-width: 590px;
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.hero-content p {
  color: #d9e6e2;
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hero-meta {
  width: fit-content;
  max-width: 520px;
  padding: 9px 11px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #edf7f4;
  font-size: 13px;
}

.hero-visual {
  width: 300px;
  flex: 0 0 300px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 13px;
  position: relative;
  z-index: 1;
}

.visual-tag {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.visual-row {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 10px;
  align-items: center;
}

.visual-row span,
.visual-row b {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.visual-row b {
  background: #f5cf62;
}

.visual-row.short {
  grid-template-columns: 0.62fr 82px;
}

.visual-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.visual-stack i {
  height: 74px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.visual-stack i:nth-child(2) {
  background: rgba(255, 255, 255, 0.32);
}

.visual-stack i:nth-child(3) {
  background: rgba(227, 93, 47, 0.72);
}

.eyebrow {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: #e5f4ee;
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 12px;
}

.hero-band .eyebrow {
  background: rgba(255, 255, 255, 0.92);
}

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

.metric {
  padding: 16px;
  display: grid;
  gap: 5px;
}

.metric strong {
  font-size: 26px;
}

.metric small {
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

body[data-screen="register"] .hero-band,
body[data-screen="login"] .hero-band {
  min-height: 245px;
  background:
    linear-gradient(115deg, rgba(11, 42, 56, 0.92), rgba(25, 93, 110, 0.78)),
    radial-gradient(circle at 86% 22%, rgba(245, 207, 98, 0.46), transparent 24%),
    linear-gradient(135deg, #12323a, #0f4f63);
}

body[data-screen="register"] .content-grid,
body[data-screen="login"] .content-grid {
  grid-template-columns: minmax(0, 760px) minmax(280px, 1fr);
}

body[data-screen="register"] .main-panel,
body[data-screen="login"] .main-panel {
  align-self: start;
}

body[data-screen="register"] .screen.active,
body[data-screen="login"] .screen.active {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
}

body[data-screen="register"] .screen-head,
body[data-screen="login"] .screen-head {
  grid-column: 1 / -1;
  padding: 20px;
  border-radius: 8px;
  background: #ffffff;
  border-left: 5px solid #195d6e;
  box-shadow: var(--shadow);
}

body[data-screen="products"] .hero-band {
  background:
    linear-gradient(90deg, rgba(38, 49, 56, 0.9), rgba(38, 49, 56, 0.56), rgba(38, 49, 56, 0.06)),
    url("./assets/enterprise-grocery-hero.png") center / cover;
}

body[data-screen="categories"] .hero-band {
  background:
    linear-gradient(115deg, rgba(20, 54, 64, 0.92), rgba(15, 122, 90, 0.66)),
    radial-gradient(circle at 76% 24%, rgba(227, 93, 47, 0.32), transparent 25%),
    linear-gradient(135deg, #143640, #0f7a5a);
}

body[data-screen="categories"] .form-card {
  border-top: 5px solid #195d6e;
}

body[data-screen="categories"] .category-board {
  border-top: 5px solid var(--brand);
}

body[data-screen="products"] .metric:nth-child(2) {
  border-color: rgba(227, 93, 47, 0.35);
}

body[data-screen="ration"] .hero-band {
  background:
    linear-gradient(90deg, rgba(21, 34, 46, 0.9), rgba(15, 122, 90, 0.54), rgba(15, 122, 90, 0.08)),
    url("./assets/enterprise-grocery-hero.png") center / cover;
}

body[data-screen="ration"] .form-card {
  border-top: 5px solid #195d6e;
}

body[data-screen="admin"] .hero-band {
  background:
    linear-gradient(115deg, rgba(36, 29, 22, 0.93), rgba(142, 82, 18, 0.72)),
    radial-gradient(circle at 80% 30%, rgba(255, 240, 220, 0.34), transparent 28%),
    linear-gradient(135deg, #241d16, #8e5212);
}

body[data-screen="admin"] .hero-visual .visual-stack i {
  background: rgba(255, 240, 220, 0.28);
}

body[data-screen="admin"] .hero-visual .visual-stack i:nth-child(3) {
  background: rgba(245, 207, 98, 0.72);
}

body[data-screen="customer"] .hero-band {
  background:
    linear-gradient(90deg, rgba(16, 36, 43, 0.84), rgba(15, 122, 90, 0.52), rgba(15, 122, 90, 0.08)),
    url("./assets/enterprise-grocery-hero.png") center / cover;
}

body[data-screen="customer"] .content-grid {
  grid-template-columns: minmax(0, 1fr) 300px;
}

body[data-screen="customer"] .product-grid .item-card {
  background: #fff;
  border-color: rgba(15, 122, 90, 0.22);
}

body[data-screen="shop"] .form-card {
  border-top: 5px solid var(--brand);
}

body[data-screen="products"] .form-card {
  border-top: 5px solid var(--accent);
}

body[data-screen="admin"] .action-panel {
  border-top: 5px solid var(--warning);
}

.main-panel,
.insight-rail {
  display: grid;
  gap: 16px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

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

.screen-head p {
  line-height: 1.5;
}

.panel {
  padding: 18px;
}

.form-card {
  display: grid;
  gap: 12px;
}

.auth-value-grid {
  display: grid;
  gap: 12px;
}

.auth-value-grid article,
.signin-strip {
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 7px;
}

.auth-value-grid span,
.signin-strip span {
  color: var(--muted);
  line-height: 1.45;
}

.signin-strip {
  align-self: start;
  border-left: 5px solid #195d6e;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

input,
select {
  min-height: 42px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus {
  outline: 3px solid rgba(15, 122, 90, 0.14);
  border-color: var(--brand);
}

.row,
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.customer-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1.25fr);
  gap: 16px;
}

.customer-layout .list-panel:nth-child(2) {
  grid-row: span 2;
}

.store-orders-panel {
  grid-column: 1 / -1;
}

.category-products-panel {
  grid-column: 1 / -1;
}

.store-orders-panel label {
  margin-bottom: 14px;
  max-width: 360px;
}

.ration-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
  gap: 16px;
}

.ration-wide-panel {
  grid-column: 1 / -1;
}

.nested-form {
  display: grid;
  gap: 12px;
}

.inline-head {
  margin-bottom: 0;
}

.ration-filter-grid,
.ration-total-grid,
.ration-columns {
  display: grid;
  gap: 12px;
}

.ration-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 220px));
  margin-bottom: 14px;
}

.ration-total-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.ration-total-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  display: grid;
  gap: 5px;
}

.ration-total-grid span,
.ration-total-grid small {
  color: var(--muted);
}

.ration-total-grid strong {
  font-size: 24px;
}

.ration-columns {
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
}

.list-panel {
  min-height: 300px;
}

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

.panel-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface-soft);
  display: grid;
  gap: 10px;
}

.ration-entry-card {
  border-left: 5px solid var(--brand);
}

.ration-entry-media {
  height: 118px;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(135deg, #e7f6ef, #f7faf9);
  display: grid;
  place-items: center;
}

.ration-entry-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ration-entry-media span {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-strong);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
}

.product-card {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.product-card .item-head,
.product-card .item-meta,
.product-card .actions {
  padding-inline: 13px;
}

.product-card .actions {
  padding-bottom: 13px;
}

.product-media {
  height: 150px;
  background: linear-gradient(135deg, #e7f6ef, #f7faf9);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-media span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-strong);
  font-size: 28px;
  font-weight: 900;
}

.image-preview {
  min-height: 160px;
  border: 1px dashed #b7c8cf;
  border-radius: 8px;
  background: #f7faf9;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}

.image-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.category-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 249, 0.95));
}

.category-product-group {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  display: grid;
  gap: 12px;
}

.category-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.category-group-head span {
  color: var(--muted);
  font-size: 13px;
}

.category-group-head div {
  display: grid;
  gap: 3px;
}

.category-group-head small {
  color: var(--muted);
  font-size: 12px;
}

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

.item-meta {
  font-size: 13px;
  line-height: 1.45;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #dff3ea;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.pill.pending {
  background: #fff0dc;
  color: #7a3d00;
}

.pill.neutral {
  background: #edf2f4;
  color: #4f5f6d;
}

.general-product-group {
  background: #ffffff;
  border-color: rgba(15, 122, 90, 0.28);
}

.role-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 12px;
}

.role-list li {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.role-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.response-panel {
  position: sticky;
  top: 18px;
}

pre {
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 13px;
  border-radius: 8px;
  background: #101820;
  color: #d7f7e8;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.5;
}

.hidden {
  display: none;
}

@media (max-width: 1120px) {
  .enterprise-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    height: auto;
  }

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

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

  body[data-screen="register"] .content-grid,
  body[data-screen="login"] .content-grid,
  body[data-screen="customer"] .content-grid {
    grid-template-columns: 1fr;
  }

  .response-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 18px;
  }

  .topbar,
  .two-column,
  .customer-layout,
  .row,
  .metric-grid,
  .ration-layout,
  .ration-filter-grid,
  .ration-total-grid,
  .ration-columns {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-band {
    min-height: 360px;
    padding: 24px;
  }

  .hero-visual {
    display: none;
  }

  body[data-screen="register"] .screen.active,
  body[data-screen="login"] .screen.active {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .workspace {
    padding: 14px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 24px;
  }

  .nav-stack {
    grid-template-columns: 1fr;
  }

  .side-nav {
    padding: 18px 14px;
  }
}
