:root {
  font-family: "Noto Sans Myanmar", "Myanmar Text", system-ui, sans-serif;
  color: #203c34;
  background: #f3f6f3;
  font-size: 15px;
  --green: #103e35;
  --gold: #bd9453;
  --muted: #728078;
  --line: #dfe6df;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  min-height: 46px;
  background: var(--green);
  color: white;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover {
  background: #236454;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  color: var(--green);
  background: #e8eee8;
}
.danger {
  background: #a43c35;
}
.small {
  padding: 8px 12px;
  min-height: 42px;
}
.outline {
  border: 1px solid var(--line);
  background: white;
  color: var(--green);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 26px;
  line-height: 1.8;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 17px;
}
label {
  display: block;
  font-size: 13px;
  color: #5a6b61;
  margin-bottom: 7px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #ced8ce;
  border-radius: 9px;
  background: white;
  color: #203c34;
  min-height: 46px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #3d826d;
}
textarea {
  min-height: 85px;
}
.field {
  margin-bottom: 16px;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.formgrid .full {
  grid-column: 1/-1;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 700;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--green);
}
.login-brand {
  padding: 10vw 7vw;
  color: white;
  background: radial-gradient(ellipse at top right, #326d58, transparent 65%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand h1 {
  font-size: 44px;
  line-height: 1.5;
  max-width: 500px;
}
.login-brand p {
  color: #b8cfc3;
  line-height: 2.2;
}
.brandmark {
  font-family: Georgia, serif;
  font-size: 42px;
  color: #d9be82;
  margin-bottom: 28px;
}
.login-panel {
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f8f4;
}
.login-card {
  max-width: 410px;
  width: 100%;
}
.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: #e9eee7;
  border-radius: 12px;
  margin: 22px 0;
}
.tabs button {
  flex: 1;
  font-size: 13px;
  background: transparent;
  color: var(--muted);
  padding: 9px;
}
.tabs button.active {
  background: white;
  color: var(--green);
  box-shadow: 0 2px 10px #00000008;
}
.layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--green);
  color: white;
  padding: 27px 18px;
  display: flex;
  flex-direction: column;
}
.sidebar .brandmark {
  font-size: 26px;
  margin: 0 12px 8px;
}
.sidebar .subtitle {
  font-size: 11px;
  letter-spacing: 2px;
  color: #aac3b3;
  margin: 0 12px 32px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  overflow: auto;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: transparent;
  color: #bccec4;
  font-size: 13px;
  font-weight: 400;
}
.nav button.active {
  color: white;
  background: #ffffff17;
  border-left: 3px solid #d4b779;
}
.nav .icon {
  font-size: 19px;
  width: 22px;
}
.sidebar .account {
  border-top: 1px solid #ffffff20;
  padding: 17px 10px 0;
  margin-top: 15px;
  color: #b7c9bd;
  font-size: 12px;
}
.account strong {
  display: block;
  color: white;
  margin-bottom: 7px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 83px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 18px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.topbar strong {
  display: block;
}
.status {
  font-size: 11px;
  border: 1px solid #d8e5da;
  color: #4c715c;
  border-radius: 100px;
  padding: 7px 12px;
}
.content {
  padding: 30px 34px;
  max-width: 1500px;
  margin: auto;
}
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.pagehead h1 {
  margin: 0;
}
.pagehead p {
  margin: 4px 0 0;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 23px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px #19392603;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 20px;
}
.stat:first-child {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.stat .label {
  font-size: 12px;
  opacity: 0.7;
}
.stat .value {
  font-size: 28px;
  letter-spacing: -1px;
  font-weight: 700;
  margin-top: 12px;
}
.stat .foot {
  font-size: 11px;
  margin-top: 7px;
  opacity: 0.6;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 15px;
}
.table-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 150px;
  color: var(--green);
  text-align: left;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.table-card.busy {
  border-color: #d4b981;
  background: #fffaf0;
}
.table-card:hover {
  background: #eaf2eb;
}
.table-card .num {
  font-size: 20px;
  font-weight: 700;
}
.badge {
  display: inline-flex;
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 30px;
  background: #e9f3eb;
  color: #407052;
}
.badge.busy {
  background: #f5e8c9;
  color: #8b6827;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 26px 0 15px;
}
.section-title h2 {
  margin: 0;
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
}
th {
  text-align: left;
  background: #f5f7f3;
  color: #718074;
  font-weight: 500;
  font-size: 12px;
}
th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf0e9;
}
td .actions {
  flex-wrap: nowrap;
}
.empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.empty .empty-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 22px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 11px;
}
.menu-item {
  text-align: left;
  padding: 18px;
  background: #f7f9f5;
  border: 1px solid var(--line);
  color: var(--green);
  font-weight: 400;
}
.menu-item strong {
  display: block;
  margin-bottom: 9px;
}
.menu-item span {
  color: var(--gold);
  font-weight: 700;
}
.bill-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.bill-row .name {
  font-weight: 600;
}
.bill-row .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.bill-total {
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
  font-size: 22px;
  font-weight: 700;
}
.notice {
  background: #fff7e6;
  border: 1px solid #ead7ab;
  padding: 14px;
  border-radius: 10px;
  font-size: 13px;
  margin: 15px 0;
  color: #876526;
}
.error {
  background: #fff0ed;
  border: 1px solid #edbfb3;
  color: #a43c35;
  padding: 14px;
  border-radius: 10px;
  margin: 15px 0;
}
.loading {
  padding: 50px;
  color: var(--muted);
  text-align: center;
}
.initial {
  padding: 30px;
  text-align: center;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  max-width: 650px;
  width: calc(100% - 30px);
  box-shadow: 0 25px 80px #0002;
}
dialog::backdrop {
  background: #08271eb0;
}
dialog h2 {
  margin-bottom: 20px;
}
.modalhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modalhead button {
  padding: 5px 12px;
}
.kitchen-list { display: flex; flex-direction: column; gap: 8px; }
.kitchen-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px auto;
  align-items: center; gap: 12px; padding: 12px 14px;
  background: white; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px;
}
.kitchen-row.acknowledged { border-left-color: var(--green); }
.kitchen-table, .kitchen-qty { font-size: 20px; }
.kitchen-dish { min-width: 0; overflow-wrap: anywhere; }
.kitchen-dish strong { display: block; }
.kitchen-dish .muted { font-size: 12px; }
.kitchen-note { margin: 4px 0; color: #a43c35; }
.kitchen-actions { display: flex; align-items: center; gap: 8px; }
.kitchen-actions button { min-height: 46px; }
.kitchen-actions button:disabled { cursor: default; opacity: .7; }
@media (max-width: 760px) {
  .kitchen-row { grid-template-columns: 44px minmax(0, 1fr) 48px; gap: 8px; padding: 10px; }
  .kitchen-actions { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
  .kitchen-actions button { font-size: 13px; padding: 8px 10px; }
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: 420px;
  background: var(--green);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px #0002;
  z-index: 20;
  display: none;
}
#toast.error {
  background: #a43c35;
}
#toast.show {
  display: block;
}
.print-only {
  display: none;
}
.footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 30px;
}
.mobile-toggle {
  display: none;
}
.banner {
  width: 100%;
  height: 175px;
  object-fit: cover;
  border-radius: 13px;
  margin-bottom: 20px;
}
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filters input,
.filters select {
  width: auto;
}
.search {
  margin-bottom: 18px;
}
.currency {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1050px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .split {
    grid-template-columns: 1fr;
  }
  .layout {
    grid-template-columns: 205px 1fr;
  }
  .content {
    padding: 23px;
  }
  .topbar {
    padding: 16px 23px;
  }
}
@media (max-width: 700px) {
  .login {
    grid-template-columns: 1fr;
  }
  .login-brand {
    display: none;
  }
  .login-panel {
    min-height: 100vh;
    padding: 28px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    width: 250px;
    z-index: 10;
    left: -260px;
    transition: left 0.2s;
  }
  .sidebar.open {
    left: 0;
  }
  .mobile-toggle {
    display: block;
    padding: 8px 13px;
  }
  .topbar {
    height: auto;
    padding: 13px 17px;
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .topbar .muted {
    font-size: 11px;
  }
  .content {
    padding: 20px 16px;
  }
  .pagehead {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  h1 {
    font-size: 22px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat .value {
    font-size: 24px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .table-card {
    min-height: 140px;
    padding: 17px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .formgrid .full {
    grid-column: auto;
  }
  .card {
    padding: 17px;
  }
  .status {
    font-size: 10px;
  }
  .banner {
    height: 120px;
  }
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 15px;
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  .layout,
  .login,
  #toast,
  dialog {
    display: none !important;
  }
  .print-only {
    display: block;
    font-family: "Myanmar Text", sans-serif;
    font-size: 12px;
  }
  .receipt {
    width: 72mm;
    margin: 0 auto;
  }
  .receipt.a4 {
    width: auto;
    max-width: 180mm;
  }
  .receipt h2 {
    text-align: center;
    font-size: 17px;
  }
  .receipt p {
    text-align: center;
    font-size: 11px;
    margin: 4px 0;
  }
  .receipt table {
    white-space: normal;
    font-size: 11px;
  }
  .receipt th,
  .receipt td {
    padding: 7px 2px;
    background: white;
    color: black;
  }
  .receipt .bill-total {
    font-size: 15px;
  }
  .receipt .receipt-foot {
    text-align: center;
    border-top: 1px dashed black;
    margin-top: 15px;
    padding-top: 10px;
  }
  @page {
    margin: 4mm;
  }
}

.batch-edit { display: block; width: 100%; text-align: left; margin: 8px 0; }

@media print {
  .stock-sheet { page: inventory-a4; }
  .receipt.stock-sheet { max-width: none; width: 100%; }
  .stock-sheet .tablewrap { overflow: visible; }
  .stock-sheet table { width: 100%; table-layout: fixed; border-collapse: collapse; }
  .stock-sheet thead { display: table-header-group; }
  .stock-sheet tr { break-inside: avoid; }
  .stock-sheet th, .stock-sheet td { border: 1px solid #333; padding: 6px 4px; font-size: 10px; overflow-wrap: anywhere; vertical-align: middle; }
  .stock-sheet td { height: 9mm; }
  .stock-sheet th:first-child, .stock-sheet td:first-child { width: 6mm; }
  .stock-sheet th:nth-child(2), .stock-sheet td:nth-child(2) { width: 39mm; }
  .stock-sheet .stock-signature { margin-top: 12mm; break-inside: avoid; }
  @page inventory-a4 { size: A4 portrait; margin: 12mm; }
}

/* Administrator shop viewing keeps all mutations blocked on the server too. */
.admin-view #content button:not([data-table]):not([data-history]):not([data-sales-day]):not([data-sales-table]):not([data-category]):not(#refresh-tables):not(#back-tables):not(#refresh-order):not(#report-show):not(#csv):not(#stock-print-current):not(#stock-print-month):not(#prev):not(#next):not(#stock-month-form button):not(#retry):not(#print80):not(#printA4):not(#android-print):not(#share-receipt) { display: none !important; }
