:root {
  --bg: #f7faf3;
  --surface: #fffefa;
  --ink: #241715;
  --muted: #6d6259;
  --line: #e3d7c9;
  --accent: #d7471f;
  --accent-dark: #8f2414;
  --green: #25745c;
  --gold: #c98922;
  --chili: #ef6a22;
  --leaf: #3e8b52;
  --shadow: 0 18px 44px rgba(72, 43, 20, 0.13);
  --soft-shadow: 0 10px 28px rgba(72, 43, 20, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(215, 71, 31, 0.13) 0 18%, transparent 18% 100%),
    linear-gradient(165deg, rgba(37, 116, 92, 0.12) 0 15%, transparent 15% 100%),
    linear-gradient(180deg, #fff4dc 0%, var(--bg) 380px, #ffffff 100%),
    var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(255, 254, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

h1 {
  font-size: clamp(1.35rem, 2.7vw, 2rem);
}

h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

h3 {
  font-size: 1rem;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body:not(.is-authenticated) main,
body:not(.is-authenticated) .top-actions {
  display: none;
}

body.is-authenticated .login-view {
  display: none;
}

.login-view {
  min-height: calc(100vh - 86px);
  display: grid;
  place-items: center;
  padding: 24px clamp(16px, 4vw, 56px);
}

.login-panel {
  display: grid;
  width: min(420px, 100%);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.97);
  padding: 24px;
  box-shadow: var(--shadow);
}

.nav-btn,
.category-btn,
.secondary-btn,
.icon-btn {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.nav-btn,
.category-btn,
.secondary-btn {
  padding: 0 14px;
}

.nav-btn.active,
.category-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--chili));
  color: #fff;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 56px) 56px;
}

.hero-strip {
  position: relative;
  min-height: 320px;
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 8px;
  background: #241715;
  box-shadow: var(--shadow);
}

.hero-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(36, 23, 21, 0.78) 0%, rgba(36, 23, 21, 0.34) 54%, rgba(36, 23, 21, 0.08) 100%),
    linear-gradient(0deg, rgba(36, 23, 21, 0.46), transparent 48%);
}

.hero-strip img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  position: absolute;
  z-index: 1;
  inset: auto 24px 22px 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  max-width: 540px;
  font-size: clamp(1.35rem, 4vw, 2.7rem);
  font-weight: 800;
}

.hero-copy strong {
  white-space: nowrap;
  font-size: 1.05rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-heading,
.panel-heading,
.menu-title-row,
.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 18px;
}

.search-wrap input,
label input,
label select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-wrap input:focus,
label input:focus,
label select:focus {
  outline: 0;
  border-color: rgba(215, 71, 31, 0.72);
  box-shadow: 0 0 0 4px rgba(215, 71, 31, 0.12);
}

.search-wrap {
  width: min(330px, 100%);
}

.category-tabs {
  margin-bottom: 18px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: 24px;
  align-items: start;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 20px;
}

.menu-card,
.cart-panel,
.admin-section,
.stat-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.97);
  box-shadow: var(--shadow);
}

.menu-card,
.order-item,
.stock-item,
.stat-box {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.menu-card:hover,
.order-item:hover,
.stock-item:hover,
.stat-box:hover {
  border-color: rgba(215, 71, 31, 0.36);
  box-shadow: 0 18px 42px rgba(76, 37, 15, 0.18);
  transform: translateY(-2px);
}

.menu-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  overflow: hidden;
}

.menu-card.is-unavailable img {
  filter: grayscale(1);
}

.menu-card.is-unavailable {
  border-color: #ead1cb;
  opacity: 0.72;
}

.menu-card.is-unavailable:hover {
  border-color: #ead1cb;
  box-shadow: var(--soft-shadow);
  transform: none;
}

.menu-card.is-unavailable .menu-card-body {
  background: #f2f1eb;
}

.menu-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  min-height: 0;
  padding: 20px;
  object-fit: contain;
  background:
    radial-gradient(circle at 70% 20%, rgba(244, 183, 64, 0.28), transparent 38%),
    linear-gradient(160deg, rgba(255, 247, 232, 0.96), rgba(230, 239, 224, 0.96)),
    #f4ead7;
}

.menu-card-body {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 12px;
  padding: 16px;
  align-content: stretch;
}

.description {
  min-height: 62px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.menu-title-row {
  align-items: flex-start;
}

.menu-title-row h3 {
  line-height: 1.3;
}

.price {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff1df;
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-options {
  display: grid;
  gap: 10px;
  align-self: end;
  padding: 12px;
  border: 1px solid #efe2d5;
  border-radius: 8px;
  background: #fff9ee;
}

.note-field {
  grid-column: 1 / -1;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eaf2ec;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.pill.hot {
  background: #ffe8e1;
  color: var(--accent-dark);
}

.pill.sold-out {
  background: #ffe2df;
  color: #b42318;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.is-hidden {
  display: none;
}

.primary-btn,
.secondary-btn {
  min-height: 44px;
}

.primary-btn {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--chili));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(215, 71, 31, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn:hover,
.nav-btn.active:hover,
.category-btn.active:hover {
  background: var(--accent-dark);
}

.secondary-btn:hover,
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.primary-btn:hover {
  box-shadow: 0 14px 28px rgba(215, 71, 31, 0.28);
  transform: translateY(-1px);
}

.primary-btn:disabled,
.primary-btn:disabled:hover {
  background: #b9b0a7;
  box-shadow: none;
  transform: none;
}

.add-btn {
  align-self: end;
  width: 100%;
}

.cart-panel {
  position: sticky;
  top: 108px;
  padding: 18px;
}

.icon-btn {
  width: 40px;
  padding: 0;
}

.cart-items,
.order-list,
.stock-list {
  display: grid;
  gap: 10px;
}

.cart-items {
  max-height: 330px;
  margin: 18px 0;
  overflow: auto;
}

.cart-item,
.order-item,
.stock-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffefa;
  box-shadow: var(--soft-shadow);
}

.cart-line,
.order-line,
.stock-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.muted {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.qty-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

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

.total-row {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.order-list:empty::before,
.cart-items:empty::before {
  content: "Belum ada data.";
  display: block;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.status.waiting {
  background: var(--gold);
}

.status.cooking {
  background: var(--accent);
}

.status.done {
  background: var(--green);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.order-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

.order-actions button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.flow-panel,
.mini-flow,
.stock-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-panel {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #fffef9 0%, #fff0d6 52%, #eaf4ee 100%);
  box-shadow: var(--shadow);
}

.admin-flow {
  margin-top: -4px;
}

.flow-step {
  position: relative;
  display: flex;
  min-height: 46px;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffefa;
  color: var(--muted);
  font-weight: 800;
}

.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -12px;
  width: 16px;
  height: 2px;
  background: var(--accent);
}

.flow-step strong {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: #fff;
}

.mini-flow {
  flex-wrap: wrap;
  margin: 10px 0;
}

.mini-step {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.mini-step.active {
  border-color: var(--green);
  background: #e7f3ee;
  color: var(--green);
}

.section-note {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.stock-controls {
  margin-top: 12px;
}

.stock-controls input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.stock-controls input {
  width: 100%;
  padding: 0 10px;
  text-align: center;
}

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

.stat-box {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-top: 4px solid var(--leaf);
}

.stat-box span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.stat-box strong {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
}

.admin-section {
  padding: 18px;
}

.admin-section h3 {
  margin-bottom: 14px;
}

@media (max-width: 1080px) {
  .workspace-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }
}

@media (max-width: 780px) {
  .app-header,
  .section-heading,
  .hero-copy {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-copy strong {
    white-space: normal;
  }

  .menu-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .flow-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .flow-step:not(:last-child)::after {
    display: none;
  }

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

  .menu-card img {
    aspect-ratio: 16 / 10;
  }
}
