:root {
  --mv-bg: #080a0f;
  --mv-sidebar: #090b10;
  --mv-main: #0a0c10;
  --mv-card: #121722;
  --mv-card-hover: #171d29;
  --mv-text: #f4f7fb;
  --mv-muted: #98a2b6;
  --mv-soft: #d8deea;
  --mv-line: #1d2433;
  --mv-green: #1adb8a;
  --mv-blue: #4a9eff;
  --mv-purple: #a78bfa;
  --mv-amber: #fbbf24;
  --mv-red: #fb7185;
  --mv-cyan: #12c8c8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, rgba(18,200,200,0.08), transparent 32rem),
    linear-gradient(180deg, #080a0f 0%, #0a0c10 100%);
  color: var(--mv-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: inherit; }

.mv-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.mv-sidebar {
  background: var(--mv-sidebar);
  border-right: 1px solid var(--mv-line);
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.mv-sidebar-brand {
  padding: 0 20px 22px;
  border-bottom: 1px solid var(--mv-line);
  margin-bottom: 14px;
}

.mv-sidebar-brand img {
  display: block;
  width: 148px;
  max-width: 148px;
  height: auto;
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
}

.mv-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 8px;
}

.mv-nav a {
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mv-muted);
  transition: background 0.15s, color 0.15s;
}

.mv-nav a:hover {
  background: #171c27;
  color: var(--mv-soft);
}

.mv-nav a.active {
  background: rgba(26,219,138,0.08);
  color: var(--mv-green);
}

.mv-side-note {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--mv-line);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
}

.mv-side-note strong {
  color: var(--mv-soft);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mv-side-note span {
  color: var(--mv-muted);
  line-height: 1.5;
}

.mv-shell {
  min-height: 100vh;
  padding: 36px 44px;
  max-width: 1280px;
  width: 100%;
}

.mv-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: linear-gradient(180deg, #141923 0%, #111722 100%);
  border: 1px solid var(--mv-line);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.22);
  padding: 18px 20px;
  margin-bottom: 22px;
}

.mv-brand {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: #fff;
}

.mv-subtitle {
  color: var(--mv-muted);
  margin-top: 5px;
  font-size: 14px;
}

.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
}

.mv-card {
  background: linear-gradient(180deg, #141923 0%, #111722 100%);
  border: 1px solid var(--mv-line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.18);
  color: var(--mv-text);
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}

.mv-card:hover {
  background: linear-gradient(180deg, #171d29 0%, #121925 100%);
  border-color: #2b3550;
}

.mv-card-title {
  font-size: 19px;
  font-weight: 820;
  line-height: 1.15;
  margin-bottom: 8px;
  color: #fff;
  letter-spacing: -0.02em;
}

.mv-muted {
  color: var(--mv-muted);
  margin: 0;
  line-height: 1.5;
}

.mv-total {
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.mv-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  background: rgba(255,255,255,0.08);
  color: var(--mv-soft);
  white-space: nowrap;
}

.mv-status.demo {
  background: rgba(251,191,36,0.12);
  color: var(--mv-amber);
}

.mv-status.available,
.mv-status.delivered,
.mv-status.closed,
.mv-status.paid {
  background: rgba(26,219,138,0.13);
  color: var(--mv-green);
}

.mv-status.open,
.mv-status.occupied,
.mv-status.pending,
.mv-status.preparing,
.mv-status.sent_to_kitchen,
.mv-status.draft {
  background: rgba(251,191,36,0.13);
  color: var(--mv-amber);
}

.mv-status.ready {
  background: rgba(74,158,255,0.14);
  color: var(--mv-blue);
}

.mv-status.canceled,
.mv-status.void {
  background: rgba(251,113,133,0.14);
  color: var(--mv-red);
}

.mv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.mv-btn {
  appearance: none;
  border: 1px solid rgba(26,219,138,0.22);
  border-radius: 10px;
  min-height: 40px;
  padding: 10px 14px;
  background: rgba(26,219,138,0.13);
  color: var(--mv-green);
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
}

.mv-btn:hover {
  transform: translateY(-1px);
  background: rgba(26,219,138,0.18);
}

.mv-btn.secondary {
  background: rgba(255,255,255,0.06);
  border-color: var(--mv-line);
  color: var(--mv-soft);
}

.mv-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.mv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #0f141f;
  border: 1px solid var(--mv-line);
  border-radius: 14px;
  overflow: hidden;
}

.mv-table th,
.mv-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--mv-line);
  text-align: left;
  vertical-align: middle;
}

.mv-table th {
  background: rgba(255,255,255,0.045);
  color: var(--mv-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.mv-table tr:last-child td {
  border-bottom: 0;
}

.mv-table strong {
  color: #fff;
}

.mv-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.mv-input {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--mv-line);
  border-radius: 10px;
  background: #0f141f;
  color: var(--mv-text);
  font: inherit;
}

.mv-input:focus {
  outline: none;
  border-color: rgba(26,219,138,0.55);
  box-shadow: 0 0 0 4px rgba(26,219,138,0.10);
}

.mv-input.small {
  width: 5.5rem;
}

form {
  margin: 0;
}

section.mv-card:first-of-type {
  position: relative;
  overflow: hidden;
}

section.mv-card:first-of-type::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mv-green), var(--mv-cyan));
}

@media (max-width: 1100px) {
  .mv-layout {
    grid-template-columns: 1fr;
  }

  .mv-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
  }

  .mv-sidebar-brand {
    border-bottom: 0;
    padding: 0;
    margin: 0;
  }

  .mv-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
  }

  .mv-side-note {
    display: none;
  }

  .mv-shell {
    padding: 24px 18px;
  }
}

@media (max-width: 700px) {
  .mv-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .mv-inline-form,
  .mv-btn,
  .mv-input {
    width: 100%;
  }

  .mv-table {
    display: block;
    overflow-x: auto;
  }
}


/* MESA VIVA MOBILE WAITER v0.1 — QUICK PRODUCT BUTTONS */
.mv-kicker {
  color: var(--mv-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.mv-order-toolbar {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--mv-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
}

.mv-product-quick-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mv-product-quick-form {
  margin: 0;
}

.mv-product-tile {
  width: 100%;
  min-height: 96px;
  appearance: none;
  border: 1px solid var(--mv-line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.035));
  color: var(--mv-text);
  padding: 13px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.12);
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
}

.mv-product-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(26,219,138,0.38);
  background: linear-gradient(180deg, rgba(26,219,138,0.10), rgba(255,255,255,0.04));
}

.mv-product-name {
  display: block;
  color: #fff;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.mv-product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--mv-soft);
  font-size: 12px;
  font-weight: 800;
}

.mv-product-station {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(74,158,255,0.14);
  color: var(--mv-blue);
}

.mv-product-station.bar {
  background: rgba(18,200,200,0.14);
  color: var(--mv-cyan);
}

.mv-product-station.kitchen {
  background: rgba(251,191,36,0.13);
  color: var(--mv-amber);
}

.mv-product-station.dessert {
  background: rgba(167,139,250,0.14);
  color: var(--mv-purple);
}

.mv-product-stock {
  color: var(--mv-muted);
  font-size: 11px;
  font-weight: 750;
}

.mv-advanced-add {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--mv-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  padding: 0;
  overflow: hidden;
}

.mv-advanced-add summary {
  cursor: pointer;
  color: var(--mv-soft);
  font-size: 13px;
  font-weight: 850;
  padding: 13px 14px;
  list-style: none;
}

.mv-advanced-add summary::-webkit-details-marker {
  display: none;
}

.mv-advanced-add summary::after {
  content: "＋";
  float: right;
  color: var(--mv-green);
}

.mv-advanced-add[open] summary::after {
  content: "–";
}

.mv-advanced-add .mv-inline-form {
  padding: 0 14px 14px;
}

@media (max-width: 700px) {
  .mv-order-toolbar {
    flex-direction: column;
  }

  .mv-product-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .mv-product-tile {
    min-height: 108px;
    padding: 12px;
  }

  .mv-product-name {
    font-size: 14px;
  }
}

@media (max-width: 390px) {
  .mv-product-quick-grid {
    grid-template-columns: 1fr;
  }
}


/* MESA VIVA MOBILE WAITER v0.1b — PHONE SPACING FIX */
.mv-product-quick-grid {
  align-items: stretch;
}

.mv-product-quick-form {
  display: block;
  width: 100%;
}

.mv-product-tile {
  width: 100%;
  min-width: 0;
  border-radius: 16px;
}

.mv-product-name,
.mv-product-meta,
.mv-product-stock {
  min-width: 0;
}

@media (max-width: 700px) {
  .mv-product-quick-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mv-product-tile {
    min-height: 92px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
  }

  .mv-product-name {
    font-size: 17px;
    line-height: 1.15;
  }

  .mv-product-meta {
    font-size: 13px;
    justify-content: space-between;
  }

  .mv-product-stock {
    font-size: 12px;
  }

  .mv-advanced-add summary {
    font-size: 15px;
    padding: 16px;
  }
}

