:root {
  --bg: #dff2ff;
  --card: #ffffff;
  --ink: #152033;
  --muted: #657386;
  --line: #162338;
  --blue: #1f7bbf;
  --blue-dark: #135f96;
  --green: #0d8b76;
  --green-bg: #e3f8f3;
  --amber: #b77911;
  --amber-bg: #fff4d7;
  --red: #c73535;
  --red-bg: #ffe8e8;
  --shadow: 0 18px 45px rgba(21, 32, 51, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.app-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 18px;
  border-bottom: 7px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", Inter, sans-serif;
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.3rem, 7vw, 4.6rem);
  line-height: 0.92;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  text-transform: uppercase;
}

h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
}

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

.icon-button,
.mode-button {
  min-height: 46px;
  border: 3px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--line);
}

.icon-button {
  width: 48px;
  border-radius: 8px;
  font-size: 0.84rem;
}

.mode-button {
  border-radius: 8px;
  padding: 0 16px;
  text-transform: uppercase;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(380px, 1.08fr);
  gap: 18px;
  padding-top: 20px;
}

.panel,
.dashboard {
  background: var(--card);
  border: 3px solid rgba(22, 35, 56, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.store-pill,
.daypart-pill,
.status-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: #edf8ff;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 50px;
  border: 2px solid #c7d8e6;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
}

.selected-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #f8fcff;
}

.product-symbol {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff7dd;
  color: var(--line);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
}

.selected-label,
.selected-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.selected-card h3 {
  margin: 2px 0;
  font-size: 1.45rem;
}

.quantity-row {
  display: grid;
  grid-template-columns: 76px 1fr 76px;
  gap: 12px;
  align-items: stretch;
  margin-top: 14px;
}

.stepper-button,
.submit-button {
  border: 3px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 5px 5px 0 var(--line);
}

.stepper-button {
  min-height: 76px;
  background: #f0f9ff;
  font-size: 2.4rem;
}

.quantity-display {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 3px solid #c7d8e6;
  border-radius: 8px;
  background: #ffffff;
}

.quantity-display span {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
}

.quantity-display small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.submit-button {
  width: 100%;
  min-height: 62px;
  margin-top: 14px;
  background: var(--blue);
  color: #ffffff;
  text-transform: uppercase;
}

.confirmation {
  display: none;
  margin-top: 14px;
  border-radius: 8px;
  padding: 12px;
  background: var(--green-bg);
  color: #075f52;
  font-weight: 800;
}

.confirmation.is-visible {
  display: block;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.product-button {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 86px;
  border: 3px solid #bfd3e4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.product-button.is-selected {
  border-color: var(--line);
  box-shadow: 4px 4px 0 var(--line);
}

.product-button strong,
.product-button span {
  display: block;
}

.product-button strong {
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.metric-grid,
.dashboard-columns {
  display: grid;
  gap: 10px;
}

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

.metric-card {
  min-height: 94px;
  border-radius: 8px;
  background: #f6fbff;
  border: 2px solid #d0e2ee;
  padding: 12px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-block {
  margin-top: 18px;
}

.dashboard-block h3 {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 4px solid var(--line);
}

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

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

.pan-card,
.total-row,
.activity-row {
  border: 2px solid #d0e2ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.pan-card {
  display: grid;
  gap: 10px;
}

.pan-card-header,
.total-row,
.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-empty {
  background: #eef3f7;
  color: #556274;
}

.status-cooling {
  background: var(--green-bg);
  color: var(--green);
}

.status-ready {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-over {
  background: var(--red-bg);
  color: var(--red);
}

.pan-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.content-chip {
  border-radius: 999px;
  background: #edf8ff;
  color: var(--blue-dark);
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.wrap-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--amber);
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
}

.total-row strong,
.activity-row strong {
  font-weight: 900;
}

.total-meta,
.activity-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.settings-dialog {
  width: min(720px, calc(100% - 24px));
  border: 3px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.settings-dialog::backdrop {
  background: rgba(21, 32, 51, 0.36);
}

.settings-body {
  display: grid;
  gap: 12px;
}

.settings-group {
  border: 2px solid #d0e2ee;
  border-radius: 8px;
  padding: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.empty-state {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 980px) {
  .main-grid,
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 14px;
  }

  .app-header,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    align-items: stretch;
  }

  .mode-button {
    flex: 1;
  }

  .entry-fields,
  .product-grid,
  .metric-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .selected-card {
    grid-template-columns: 62px 1fr;
  }

  .product-symbol {
    width: 54px;
    height: 54px;
  }

  .pan-card-header,
  .total-row,
  .activity-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
