:root {
  --forest: #12332a;
  --forest-light: #1b493d;
  --ink: #17362d;
  --ink-soft: #60746c;
  --ink-faint: #8a9a93;
  --paper: #fffdf8;
  --canvas: #eef1eb;
  --line: #e3e7e0;
  --accent: #f26a3d;
  --accent-dark: #d7532b;
  --accent-soft: #fff0e9;
  --amber: #f1b84b;
  --amber-soft: #fff7e5;
  --green: #38a873;
  --green-soft: #e9f8f0;
  --blue: #4d83d7;
  --blue-soft: #edf4ff;
  --red: #d64d4d;
  --red-soft: #fff0f0;
  --shadow-sm: 0 10px 30px rgba(28, 52, 43, .07);
  --shadow-md: 0 24px 70px rgba(19, 43, 35, .16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(242, 106, 61, .07), transparent 27rem),
    var(--canvas);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.dark-page {
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgba(241, 184, 75, .09), transparent 30rem),
    linear-gradient(150deg, #0d2b23, var(--forest) 50%, #09241d);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(242, 106, 61, .22);
  outline-offset: 2px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--ink-faint);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 19px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.hero .eyebrow,
.login-visual .eyebrow {
  color: var(--amber);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.small-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .18s, background-color .18s, border-color .18s, box-shadow .18s;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.small-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  min-height: 48px;
  padding: 0 20px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 11px 26px rgba(242, 106, 61, .2);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.secondary-button:hover {
  border-color: #becfc7;
  background: #f9fbf8;
}

.ghost-button {
  min-height: 40px;
  padding: 0 13px;
  color: var(--ink-soft);
  background: transparent;
}

.ghost-button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.danger-button {
  min-height: 38px;
  padding: 0 13px;
  color: var(--red);
  background: var(--red-soft);
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
}

.small-button.primary {
  color: #fff;
  background: var(--accent);
}

.small-button.cancel {
  color: var(--ink-soft);
  background: #eff2ee;
}

.small-button.refund {
  color: var(--red);
  background: var(--red-soft);
}

.small-button.delete {
  border: 1px solid #efd6d6;
  color: var(--red);
  background: #fff;
}

.full-button {
  width: 100%;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.text-input,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}

.text-input,
.form-field input,
.form-field select {
  height: 48px;
  padding: 0 13px;
}

.form-field textarea {
  min-height: 96px;
  padding: 12px 13px;
  line-height: 1.6;
  resize: vertical;
}

.text-input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(242, 106, 61, .08);
}

.form-error {
  display: none;
  min-height: 19px;
  margin: 7px 0 2px;
  color: var(--red);
  font-size: 11px;
}

.form-error.is-visible {
  display: block;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-logo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  color: var(--forest);
  background: var(--amber);
  box-shadow: 0 8px 24px rgba(241, 184, 75, .17);
}

.brand-logo .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
  letter-spacing: .18em;
}

.dark-page .brand-sub {
  color: rgba(255, 255, 255, .35);
}

/* Login and admin sign-in */
.login-page,
.admin-login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(241, 184, 75, .11), transparent 28rem),
    linear-gradient(140deg, #0d2b23, var(--forest));
}

.login-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  width: min(1040px, 100%);
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 31px;
  background: var(--paper);
  box-shadow: 0 36px 100px rgba(0, 0, 0, .3);
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 8%, rgba(241, 184, 75, .22), transparent 21rem),
    radial-gradient(circle at 10% 90%, rgba(242, 106, 61, .2), transparent 20rem),
    var(--forest);
}

.login-visual::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -130px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, .025), 0 0 0 90px rgba(255, 255, 255, .015);
}

.login-hero {
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.login-hero h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(42px, 5vw, 65px);
  line-height: 1.06;
  letter-spacing: -.055em;
}

.login-hero p {
  max-width: 400px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, .58);
  font-size: 14px;
  line-height: 1.8;
}

.login-status {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, .42);
  font-size: 10px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #65db94;
  box-shadow: 0 0 0 5px rgba(101, 219, 148, .1);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 50px;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 184, 75, .1), transparent 17rem),
    var(--paper);
}

.login-panel h2 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 33px;
  letter-spacing: -.04em;
}

.login-panel > p {
  margin: 9px 0 26px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.login-field {
  margin-bottom: 12px;
}

.login-field .text-input {
  height: 52px;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.text-link {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent);
}

.security-note {
  display: flex;
  gap: 9px;
  margin-top: 36px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.65;
}

.admin-login-card {
  width: min(430px, 100%);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.admin-login-card h1 {
  margin: 28px 0 5px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 34px;
  letter-spacing: -.045em;
}

.admin-login-card > p {
  margin: 0 0 25px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

/* Shared app frame */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(23, 54, 45, .07);
  background: rgba(238, 241, 235, .9);
  backdrop-filter: blur(16px);
}

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

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, .72);
  font-size: 10px;
}

.user-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--forest);
  font-size: 10px;
  font-weight: 800;
}

.workspace {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 32px clamp(18px, 4vw, 54px) 56px;
}

/* User home */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  min-height: 240px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 87% 18%, rgba(241, 184, 75, .2), transparent 15rem),
    linear-gradient(130deg, var(--forest-light), var(--forest));
  box-shadow: var(--shadow-md);
}

.hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -155px;
  width: 275px;
  height: 275px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, .025), 0 0 0 76px rgba(255, 255, 255, .018);
}

.hero-main {
  position: relative;
  z-index: 1;
  padding: 37px 39px;
}

.hero h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.hero p {
  margin: 13px 0 0;
  color: rgba(255, 255, 255, .57);
  font-size: 12px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 21px;
}

.hero-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.hero-button.primary {
  border-color: var(--amber);
  color: var(--forest);
  background: var(--amber);
}

.hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 36px 28px 8px;
}

.queue-preview {
  width: min(300px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 19px;
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(10px);
}

.queue-preview-head {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, .48);
  font-size: 9px;
}

.queue-preview-head strong {
  color: #fff;
  font-size: 11px;
}

.queue-number {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 17px 0 14px;
}

.queue-number strong {
  font-family: Georgia, serif;
  font-size: 50px;
  line-height: 1;
}

.queue-number span {
  color: rgba(255, 255, 255, .43);
  font-size: 10px;
}

.queue-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
}

.queue-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), #ffd97a);
  transition: width .35s;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 17px;
}

.stat-card {
  display: flex;
  min-height: 108px;
  align-items: flex-start;
  gap: 13px;
  padding: 19px;
  border: 1px solid rgba(23, 54, 45, .07);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}

.stat-card:nth-child(2) .stat-icon {
  color: #a8720f;
  background: var(--amber-soft);
}

.stat-card:nth-child(3) .stat-icon {
  color: var(--green);
  background: var(--green-soft);
}

.stat-card:nth-child(4) .stat-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.stat-copy span {
  display: block;
  color: var(--ink-faint);
  font-size: 10px;
}

.stat-copy strong {
  display: block;
  margin: 5px 0 2px;
  font-family: Georgia, serif;
  font-size: 29px;
  line-height: 1;
}

.stat-copy small {
  color: var(--ink-faint);
  font-size: 8px;
}

.product-overview {
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid rgba(23, 54, 45, .07);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 27px 20px;
  border-bottom: 1px solid var(--line);
}

.section-head h1,
.section-head h2 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 25px;
  letter-spacing: -.035em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.6;
}

.count-badge {
  display: inline-flex;
  min-width: 29px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 99px;
  color: var(--ink-soft);
  background: #eff2ed;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.product-overview-body {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.8fr);
  gap: 13px;
  padding: 19px 27px 25px;
}

.baopao-total {
  position: relative;
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 23px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(241, 184, 75, .2), transparent 10rem),
    var(--forest);
}

.baopao-total span {
  color: rgba(255, 255, 255, .48);
  font-size: 9px;
}

.baopao-total strong {
  margin-top: 7px;
  font-family: Georgia, serif;
  font-size: 53px;
  line-height: 1;
}

.baopao-total small {
  margin-top: 3px;
  color: var(--amber);
  font-size: 10px;
  font-weight: 800;
}

.dish-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.dish-stat {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbf8;
}

.dish-stat span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.dish-stat strong {
  font-family: Georgia, serif;
  font-size: 25px;
}

/* Order management */
.order-page {
  padding-bottom: 50px;
}

.order-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(1480px, calc(100% - 36px));
  margin: 20px auto 0;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, .8);
  box-shadow: var(--shadow-sm);
}

.order-tab {
  display: inline-flex;
  min-height: 42px;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.order-tab:hover {
  color: var(--ink);
  background: #f2f5f0;
}

.order-tab.is-active {
  color: #fff;
  background: var(--forest);
}

.order-section {
  display: none;
  width: min(1480px, calc(100% - 36px));
  margin: 16px auto 0;
}

.order-section.is-active {
  display: block;
}

.section-card {
  overflow: hidden;
  border: 1px solid rgba(23, 54, 45, .07);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.form-body {
  padding: 24px 27px 28px;
}

.order-meta-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 23px;
}

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

.items-head h3 {
  margin: 0;
  font-size: 13px;
}

.items-head p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.product-list {
  display: grid;
  gap: 9px;
}

.product-item {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr)) 36px;
  gap: 9px;
  align-items: end;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafbf8;
}

.product-item.three-fields {
  grid-template-columns: repeat(3, minmax(118px, 1fr)) 36px;
}

.product-item.two-fields {
  grid-template-columns: repeat(2, minmax(130px, 1fr)) 36px;
}

.product-field {
  min-width: 0;
}

.product-field.is-hidden {
  display: none;
}

.product-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 750;
}

.product-field select {
  width: 100%;
  height: 43px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

.product-field select.invalid {
  border-color: var(--red);
  background: var(--red-soft);
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid #f0d7d7;
  color: var(--red);
  background: var(--red-soft);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-footer p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.65;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 27px 20px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  padding: 14px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 9px;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 15px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.order-code {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}

.time-text {
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.product-lines {
  display: grid;
  min-width: 210px;
  gap: 4px;
}

.product-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}

.product-line::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .6;
}

.refunded .product-line {
  text-decoration: line-through;
  opacity: .52;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-pending {
  color: #a16b0a;
  background: var(--amber-soft);
}

.status-making {
  color: var(--blue);
  background: var(--blue-soft);
}

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

.status-refund {
  color: var(--red);
  background: var(--red-soft);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 105px;
}

.queue-list {
  display: grid;
  gap: 11px;
  padding: 21px 27px 27px;
}

.queue-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(125px, auto);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}

.queue-card-id {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--forest);
}

.queue-card-id span {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, .43);
  font-size: 8px;
  letter-spacing: .13em;
}

.queue-card-id strong {
  font-family: Georgia, serif;
  font-size: 31px;
}

.queue-card-main {
  min-width: 0;
  padding: 17px 19px;
}

.queue-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.queue-dishes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dish-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: #fafbf8;
  font-size: 9px;
}

.dish-chip.is-finished {
  opacity: .54;
}

.dish-chip button {
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.queue-remark {
  margin-top: 9px;
  color: var(--ink-faint);
  font-size: 9px;
}

.queue-card-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 17px;
  border-left: 1px solid var(--line);
  background: #fafbf8;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 15px 18px;
  border: 1px dashed #ecd1d1;
  border-radius: 16px;
  background: rgba(255, 250, 250, .75);
}

.danger-zone strong {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
}

.danger-zone span {
  color: var(--ink-faint);
  font-size: 8px;
}

.empty-state {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 30px;
  color: var(--ink-faint);
  text-align: center;
}

.empty-state-inner {
  max-width: 290px;
}

.empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 17px;
  color: var(--ink-faint);
  background: #eff2ed;
}

.empty-state h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 13px;
}

.empty-state p {
  margin: 0;
  font-size: 9px;
  line-height: 1.7;
}

/* Admin console */
.admin-shell {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 26px 18px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 0% 0%, rgba(241, 184, 75, .12), transparent 15rem),
    var(--forest);
}

.admin-sidebar .brand {
  padding: 0 7px;
  color: #fff;
}

.admin-nav {
  margin-top: 38px;
}

.admin-nav-label {
  margin: 0 10px 11px;
  color: rgba(255, 255, 255, .3);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .17em;
}

.admin-nav-item {
  display: flex;
  width: 100%;
  min-height: 47px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 3px 0 0 var(--amber);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.admin-sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  color: rgba(255, 255, 255, .43);
  font-size: 9px;
  line-height: 1.6;
}

.admin-main {
  min-width: 0;
}

.admin-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid rgba(23, 54, 45, .07);
  background: rgba(238, 241, 235, .88);
  backdrop-filter: blur(15px);
}

.admin-header h1 {
  margin: 0;
  font-size: 15px;
}

.admin-header p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.admin-content {
  padding: 30px clamp(20px, 4vw, 48px) 48px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-summary-card {
  padding: 19px;
  border: 1px solid rgba(23, 54, 45, .07);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.admin-summary-card span {
  color: var(--ink-faint);
  font-size: 9px;
}

.admin-summary-card strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, serif;
  font-size: 28px;
}

.admin-table-card {
  overflow: hidden;
  border: 1px solid rgba(23, 54, 45, .07);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.admin-table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
}

.admin-table-tools h2 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 22px;
}

.admin-table-tools p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.admin-table-wrap {
  overflow-x: auto;
  padding: 0 24px 18px;
}

.db-name {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--forest);
  background: #edf2ed;
  font-family: Consolas, monospace;
  font-size: 8px;
}

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  font-weight: 800;
}

.account-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.account-status.active {
  color: var(--green);
}

.account-status.disabled {
  color: var(--red);
}

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

/* Board */
.board-page .workspace {
  width: min(1680px, 100%);
  padding-top: 20px;
}

.board-header {
  border-color: rgba(255, 255, 255, .07);
  color: #fff;
  background: rgba(18, 51, 42, .78);
}

.board-header .brand-sub {
  color: rgba(255, 255, 255, .34);
}

.board-header .user-chip {
  border-color: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .54);
  background: rgba(255, 255, 255, .045);
}

.board-title h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(30px, 3.2vw, 42px);
  letter-spacing: -.045em;
}

.board-title p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .38);
  font-size: 9px;
}

.board-tabs {
  display: flex;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
}

.board-tab {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, .48);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.board-tab.is-active {
  color: var(--forest);
  background: var(--amber);
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.board-grid {
  column-count: 5;
  column-width: 325px;
  column-gap: 7px;
}

.board-order {
  display: inline-block;
  width: 100%;
  margin: 0 0 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .16);
  break-inside: avoid;
}

.board-order-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfcf9);
}

.board-order-id {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.board-order-id span {
  color: var(--ink-faint);
  font-size: 7px;
}

.board-order-id strong {
  color: var(--forest);
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: .95;
}

.board-order-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--ink-faint);
  font-size: 8px;
}

.board-order-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-order-summary b {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--ink-soft);
  background: #eef2ec;
  font-size: 8px;
}

.board-dishes {
  display: grid;
  gap: 4px;
  padding: 6px 7px;
}

.board-dish {
  display: grid;
  grid-template-columns: 21px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbf8;
}

.board-dish-index {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  font-family: Georgia, serif;
  font-size: 7px;
  font-weight: 700;
}

.board-dish-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-dish-options {
  display: flex;
  min-width: 0;
  justify-content: flex-start;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.board-dish-options span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-dish-options b {
  flex: 0 0 auto;
  font-size: 8px;
  font-weight: 800;
}

.board-option.spicy-none,
.board-option.spicy-none b {
  color: #175e86;
}

.board-option.spicy-none {
  border-color: #b9ddf1;
  background: #e7f6ff;
}

.board-option.spicy-light,
.board-option.spicy-light b {
  color: #3e7b26;
}

.board-option.spicy-light {
  border-color: #bddda9;
  background: #e9f8dd;
}

.board-option.spicy-mild,
.board-option.spicy-mild b {
  color: #8a6400;
}

.board-option.spicy-mild {
  border-color: #efd16e;
  background: #fff1b0;
}

.board-option.spicy-medium,
.board-option.spicy-medium b {
  color: #a84b00;
}

.board-option.spicy-medium {
  border-color: #f1b37b;
  background: #ffe0bc;
}

.board-option.spicy-hot,
.board-option.spicy-hot b {
  color: #a92121;
}

.board-option.spicy-hot {
  border-color: #eba1a1;
  background: #ffdada;
}

.board-option.spicy-default {
  color: var(--ink-soft);
  background: #eef2ed;
}

.board-option.egg-hard,
.board-option.egg-hard b {
  color: #315f9f;
}

.board-option.egg-hard {
  border-color: #b8cdea;
  background: #e5f0ff;
}

.board-option.egg-soft,
.board-option.egg-soft b {
  color: #82478b;
}

.board-option.egg-soft {
  border-color: #d8b9df;
  background: #f6e9fa;
}

.board-option.eat-tone,
.board-option.eat-tone b {
  color: #626865;
}

.board-option.eat-tone {
  border-color: #dddedd;
  background: #f0f1f0;
}

.board-dish-state {
  padding: 2px 4px;
  border-radius: 6px;
  color: #a66c08;
  background: var(--amber-soft);
  font-size: 7.5px;
  font-weight: 800;
  white-space: nowrap;
}

.board-dish.finished {
  border-color: #efcaca;
  background: #fff9f9;
}

.board-dish.finished .board-dish-name,
.board-dish.finished .board-option {
  text-decoration-line: line-through;
  text-decoration-color: #d43f3f;
  text-decoration-thickness: 2px;
}

.board-dish.finished .board-dish-index,
.board-dish.finished .board-dish-state {
  color: #c93434;
  background: #ffebeb;
}

.board-note {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 7px 7px;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--ink-soft);
  background: #f1f4ef;
  font-size: 8px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.board-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .035);
  color: rgba(255, 255, 255, .38);
  text-align: center;
}

.board-empty strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-family: "STSong", "Songti SC", serif;
  font-size: 23px;
}

/* Modals and notifications */
.modal-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 29, 23, .66);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(460px, 100%);
  padding: 27px;
  border-radius: 21px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.modal h3 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
  letter-spacing: -.03em;
}

.modal > p {
  margin: 7px 0 20px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.modal .form-field {
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 19px;
}

.toast-stack {
  position: fixed;
  z-index: 800;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(340px, calc(100vw - 32px));
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 15px;
  border-radius: 13px;
  color: #fff;
  background: var(--forest);
  box-shadow: 0 17px 45px rgba(15, 43, 34, .25);
  font-size: 11px;
  line-height: 1.5;
}

.toast.error {
  background: #522d2d;
}

.toast.warning {
  color: var(--ink);
  background: #fff7e5;
}

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

  .hero-side {
    display: none;
  }

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

  .board-grid {
    column-count: 2;
  }
}

@media (max-width: 820px) {
  .login-page,
  .admin-login-page {
    display: block;
    padding: 0;
  }

  .login-frame {
    display: block;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-visual {
    min-height: 255px;
    padding: 27px 24px 32px;
  }

  .login-hero {
    margin-top: 39px;
  }

  .login-hero h1 {
    max-width: 320px;
    font-size: 40px;
  }

  .login-hero p,
  .login-status {
    display: none;
  }

  .login-panel {
    padding: 32px 24px calc(30px + env(safe-area-inset-bottom));
  }

  .admin-login-page {
    padding: 18px;
  }

  .admin-login-card {
    margin: 8vh auto 0;
    padding: 28px 22px;
  }

  .app-header {
    min-height: 68px;
    padding: 12px 17px;
  }

  .app-header .brand-sub {
    display: none;
  }

  .workspace {
    padding: 18px 13px 36px;
  }

  .hero {
    min-height: 220px;
    border-radius: 22px;
  }

  .hero-main {
    padding: 27px 23px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .stats-grid {
    gap: 8px;
    margin-top: 11px;
  }

  .stat-card {
    min-height: 92px;
    padding: 14px;
  }

  .stat-copy strong {
    font-size: 24px;
  }

  .product-overview {
    margin-top: 11px;
    border-radius: 20px;
  }

  .product-overview-body {
    grid-template-columns: 1fr;
    padding: 13px 17px 17px;
  }

  .order-toolbar,
  .order-section {
    width: calc(100% - 26px);
  }

  .order-toolbar {
    margin-top: 13px;
  }

  .section-head {
    padding: 19px 17px 16px;
  }

  .form-body,
  .queue-list {
    padding: 17px;
  }

  .order-meta-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-item,
  .product-item.three-fields,
  .product-item.two-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-footer p {
    text-align: center;
  }

  .queue-card {
    grid-template-columns: 67px minmax(0, 1fr);
  }

  .queue-card-id {
    min-height: 145px;
  }

  .queue-card-action {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding: 9px 13px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-header {
    min-height: 68px;
    padding: 12px 17px;
  }

  .admin-content {
    padding: 18px 13px 36px;
  }

  .admin-summary {
    gap: 8px;
  }

  .admin-summary-card {
    padding: 14px;
  }

  .admin-table-tools {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .board-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-grid {
    column-count: 1;
  }

  .toast-stack {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 360px) {
  .order-page .app-header {
    gap: 8px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .order-page .brand {
    gap: 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .order-page .brand-logo {
    width: 35px;
    height: 35px;
  }

  .order-page .header-actions {
    gap: 5px;
  }

  .order-page .order-home-button {
    width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .order-page .home-button-label {
    display: none;
  }
}

/* Fluid, larger type for the pending-order queue */
.order-page #waitSection {
  --queue-main-size: clamp(15px, .95vw, 18px);
  --queue-meta-size: clamp(13px, .8vw, 15px);
  --queue-note-size: clamp(13px, .78vw, 15px);
}

.order-page #waitSection .section-head {
  padding-top: 19px;
  padding-bottom: 16px;
}

.order-page #waitSection {
  width: min(1680px, calc(100% - 36px));
}

.order-page #waitSection .section-head h2 {
  font-size: clamp(27px, 1.9vw, 34px);
}

.order-page #waitSection .section-head p {
  font-size: clamp(13px, .8vw, 15px);
}

.order-page #waitSection .queue-list {
  grid-template-columns: repeat(auto-fit, minmax(clamp(360px, 27vw, 480px), 1fr));
  gap: 12px;
  padding: 18px 22px 24px;
}

.order-page #waitSection .queue-card {
  grid-template-columns: 72px minmax(0, 1fr) 112px;
  min-height: 126px;
}

.order-page #waitSection .queue-card-id {
  min-height: 126px;
}

.order-page #waitSection .queue-card-id span {
  margin-bottom: 4px;
  font-size: clamp(9px, .55vw, 11px);
}

.order-page #waitSection .queue-card-id strong {
  font-size: clamp(30px, 1.9vw, 36px);
}

.order-page #waitSection .queue-card-main {
  padding: 14px 16px;
}

.order-page #waitSection .queue-card-top {
  gap: 8px;
  margin-bottom: 8px;
}

.order-page #waitSection .queue-card-top .status-badge {
  padding: 5px 9px;
  font-size: var(--queue-meta-size);
}

.order-page #waitSection .queue-card-top .time-text {
  font-size: var(--queue-meta-size);
}

.order-page #waitSection .queue-dishes {
  gap: 6px;
}

.order-page #waitSection .dish-chip {
  gap: 7px;
  padding: 7px 10px;
  font-size: var(--queue-main-size);
  line-height: 1.45;
}

.order-page #waitSection .dish-chip button {
  padding: 4px 7px;
  font-size: clamp(11px, .64vw, 13px);
}

.order-page #waitSection .queue-remark {
  margin-top: 7px;
  font-size: var(--queue-note-size);
  line-height: 1.5;
}

.order-page #waitSection .queue-card-action {
  padding: 11px;
}

.order-page #waitSection .queue-card-action .small-button {
  min-height: 38px;
  font-size: clamp(12px, .72vw, 14px);
}

@media (max-width: 1450px) {
  .order-page #waitSection .queue-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .order-page #waitSection {
    --queue-main-size: 13px;
    --queue-meta-size: 12px;
    --queue-note-size: 11.5px;
  }

  .order-page #waitSection .section-head h2 {
    font-size: 22px;
  }

  .order-page #waitSection .section-head p {
    font-size: 12px;
  }

  .order-page #waitSection .queue-list {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 11px 14px;
  }

  .order-page #waitSection .queue-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .order-page #waitSection .queue-card-id {
    min-height: auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 7px;
    padding: 7px 11px;
  }

  .order-page #waitSection .queue-card-id span {
    margin-bottom: 0;
    font-size: 9px;
  }

  .order-page #waitSection .queue-card-id strong {
    font-size: 20px;
  }

  .order-page #waitSection .queue-card-main {
    padding: 9px 11px 10px;
  }

  .order-page #waitSection .queue-card-top {
    gap: 6px;
    margin-bottom: 6px;
  }

  .order-page #waitSection .queue-card-top .status-badge,
  .order-page #waitSection .queue-card-top .time-text {
    font-size: 11px;
  }

  .order-page #waitSection .queue-dishes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .order-page #waitSection .dish-chip {
    width: 100%;
    justify-content: space-between;
    gap: 7px;
    padding: 5px 7px;
    font-size: 13px;
    line-height: 1.3;
  }

  .order-page #waitSection .dish-chip-text {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .order-page #waitSection .dish-chip button {
    flex: 0 0 auto;
    padding: 2px 5px;
    font-size: 10px;
  }

  .order-page #waitSection .queue-remark {
    overflow: hidden;
    margin-top: 6px;
    font-size: 11.5px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .order-page #waitSection .queue-card-action {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding: 8px 11px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 440px) {
  .hero h1 {
    font-size: 31px;
  }

  .hero-button {
    flex: 1;
    padding: 0 11px;
  }

  .product-item,
  .product-item.three-fields,
  .product-item.two-fields {
    grid-template-columns: 1fr;
  }

  .user-chip {
    padding: 7px;
  }

  .user-chip > span:last-child {
    display: none;
  }

  .login-links {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Compact and readable order workspace */
.order-page .app-header {
  min-height: 68px;
  padding-top: 11px;
  padding-bottom: 11px;
}

.order-page .order-toolbar {
  margin-top: 12px;
  border-radius: 13px;
}

.order-page .order-tab {
  min-height: 38px;
  font-size: 11px;
}

.order-page .order-section {
  margin-top: 12px;
}

.order-page .section-card {
  border-radius: 18px;
}

.order-page .section-head {
  padding: 17px 20px 14px;
}

.order-page .section-head .eyebrow {
  margin-bottom: 5px;
  font-size: 9px;
}

.order-page .section-head h2 {
  font-size: 22px;
}

.order-page .section-head p {
  margin-top: 4px;
  font-size: 10px;
}

.order-page .form-body {
  padding: 16px 20px 20px;
}

.order-page .order-meta-grid {
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}

.order-page .field-label {
  margin-bottom: 5px;
  font-size: 11px;
}

.order-page .form-field input {
  height: 43px;
  font-size: 13px;
}

.order-page .form-field textarea {
  min-height: 74px;
  padding: 10px 12px;
  font-size: 12px;
}

.order-page .items-head {
  margin-bottom: 8px;
}

.order-page .items-head h3 {
  font-size: 14px;
}

.order-page .items-head p {
  font-size: 10px;
}

.order-page .product-list {
  gap: 7px;
}

.order-page .product-item {
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
}

.order-page .product-field label {
  margin-bottom: 4px;
  font-size: 10px;
}

.order-page .product-field select {
  height: 41px;
  font-size: 12px;
}

.order-page .icon-button {
  width: 34px;
  height: 34px;
}

.order-page .form-footer {
  margin-top: 13px;
  padding-top: 13px;
}

.order-page .form-footer p {
  font-size: 10px;
}

.order-page .table-wrap {
  padding: 0 18px 16px;
}

.order-page table {
  min-width: 860px;
}

.order-page th {
  padding: 10px 9px;
  font-size: 10px;
}

.order-page td {
  padding: 11px 9px;
  font-size: 12px;
  line-height: 1.45;
}

.order-page tbody tr:nth-child(even) {
  background: #fcfdfa;
}

.order-page tbody tr:hover {
  background: #f5f8f3;
}

.order-page .order-code {
  font-size: 16px;
}

.order-page .time-text {
  font-size: 10px;
}

.order-page .product-lines {
  display: flex;
  min-width: 230px;
  flex-wrap: wrap;
  gap: 4px;
}

.order-page .product-line {
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f5;
  font-size: 12px;
  white-space: nowrap;
}

.order-page .product-line::before {
  width: 4px;
  height: 4px;
}

.order-page .status-badge {
  padding: 4px 7px;
  font-size: 9px;
}

.order-page .row-actions {
  gap: 4px;
}

.order-page .small-button {
  min-height: 29px;
  padding: 0 8px;
  font-size: 9px;
}

.order-page .queue-list {
  grid-template-columns: repeat(auto-fill, minmax(410px, 1fr));
  gap: 9px;
  padding: 14px 18px 18px;
}

.order-page .queue-card {
  grid-template-columns: 66px minmax(0, 1fr) 100px;
  min-height: 96px;
  border-radius: 13px;
}

.order-page .queue-card-id {
  min-height: 96px;
}

.order-page .queue-card-id span {
  margin-bottom: 3px;
  font-size: 7px;
}

.order-page .queue-card-id strong {
  font-size: 25px;
}

.order-page .queue-card-main {
  padding: 10px 12px;
}

.order-page .queue-card-top {
  margin-bottom: 7px;
}

.order-page .queue-dishes {
  gap: 4px;
}

.order-page .dish-chip {
  gap: 5px;
  padding: 4px 6px;
  font-size: 10.5px;
}

.order-page .dish-chip-text {
  min-width: 0;
  white-space: nowrap;
}

.order-page .dish-chip.is-finished .dish-chip-text {
  text-decoration: line-through;
}

.order-page .dish-chip button {
  padding: 2px 4px;
  font-size: 8px;
}

.order-page .queue-remark {
  margin-top: 6px;
  font-size: 9px;
}

.order-page .queue-card-action {
  padding: 10px;
}

.order-page .danger-zone {
  margin-top: 10px;
  padding: 11px 15px;
  border-radius: 13px;
}

.order-page .danger-zone strong {
  font-size: 11px;
}

.order-page .danger-zone span {
  font-size: 9px;
}

@media (max-width: 820px) {
  .order-page .order-toolbar,
  .order-page .order-section {
    width: calc(100% - 20px);
  }

  .order-page .order-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    margin-top: 9px;
    gap: 3px;
  }

  .order-page .order-tab {
    min-width: 0;
    min-height: 37px;
    gap: 4px;
    padding: 0 4px;
  }

  .order-page .section-head {
    padding: 15px 14px 12px;
  }

  .order-page .section-head h2 {
    font-size: 21px;
  }

  .order-page .form-body,
  .order-page .queue-list {
    padding: 13px 14px 15px;
  }

  .order-page .order-meta-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .order-page .queue-list {
    grid-template-columns: 1fr;
  }

  .order-page .queue-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .order-page .queue-card-id {
    min-height: 98px;
  }

  .order-page .queue-card-action {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding: 7px 11px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .order-page .table-wrap {
    overflow: visible;
    padding: 0 10px 12px;
  }

  .order-page table,
  .order-page tbody,
  .order-page tbody tr,
  .order-page tbody td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .order-page thead {
    display: none;
  }

  .order-page tbody {
    display: grid;
    gap: 8px;
  }

  .order-page tbody tr {
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .order-page tbody tr:hover {
    background: #fff;
  }

  .order-page tbody td {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
    padding: 4px 0;
    border: 0;
    font-size: 12px;
  }

  .order-page tbody td::before {
    content: attr(data-label);
    color: var(--ink-faint);
    font-size: 10px;
    font-weight: 700;
  }

  .order-page tbody td[colspan] {
    display: block;
    padding: 0;
  }

  .order-page tbody td[colspan]::before {
    display: none;
  }

  .order-page .product-lines {
    min-width: 0;
  }

  .order-page .product-line {
    white-space: normal;
  }

  .order-page .row-actions {
    min-width: 0;
  }
}
