:root {
  --bg: #eef6fb;
  --panel: #ffffff;
  --panel-soft: #f6fbfd;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e7ee;
  --brand: #0f6fb7;
  --brand-2: #13b8d4;
  --brand-dark: #0b5b95;
  --restaurant: #b91c1c;
  --restaurant-2: #f59e0b;
  --restaurant-dark: #431407;
  --restaurant-cream: #fff7ed;
  --warn: #b45309;
  --danger: #b42318;
  --ok: #15803d;
  --shadow: 0 24px 70px rgb(15 32 51 / 12%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgb(245 158 11 / 13%), transparent 24rem),
    radial-gradient(circle at 92% 5%, rgb(185 28 28 / 10%), transparent 25rem),
    linear-gradient(135deg, #fff7ed, #f8fafc 44%, #eef6fb);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 34px rgb(15 111 183 / 18%);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

button.ghost {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  box-shadow: none;
}

button.ghost:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid rgb(19 184 212 / 32%);
  outline-offset: 2px;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
  background:
    linear-gradient(90deg, rgb(22 8 4 / 72%), rgb(22 8 4 / 42%) 46%, rgb(22 8 4 / 88%)),
    linear-gradient(0deg, rgb(22 8 4 / 88%), transparent 44%),
    url("/assets/brand/restaurantes-login-ambiente.png") center / cover fixed;
  overflow: hidden;
}

.login-view::before,
.login-view::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

.login-view::before {
  inset: -30%;
  background:
    radial-gradient(circle at 18% 28%, rgb(245 158 11 / 18%), transparent 14rem),
    radial-gradient(circle at 72% 20%, rgb(254 215 170 / 12%), transparent 18rem),
    radial-gradient(circle at 88% 82%, rgb(185 28 28 / 18%), transparent 16rem);
  animation: ambientDrift 16s ease-in-out infinite alternate;
}

.login-view::after {
  inset: auto 0 0;
  height: 30vh;
  background: linear-gradient(0deg, rgb(0 0 0 / 52%), transparent);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  height: min(720px, calc(100vh - 42px));
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.62fr);
  overflow: hidden;
  border: 1px solid rgb(255 247 237 / 26%);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgb(255 247 237 / 12%), rgb(255 255 255 / 5%));
  box-shadow: 0 40px 110px rgb(0 0 0 / 54%);
  backdrop-filter: blur(18px);
}

.login-brand-panel {
  position: relative;
  display: grid;
  align-content: end;
  gap: 16px;
  min-height: 0;
  padding: clamp(28px, 4.4vw, 52px);
  color: white;
  background:
    linear-gradient(90deg, rgb(43 16 8 / 14%), rgb(43 16 8 / 54%) 56%, rgb(43 16 8 / 84%)),
    linear-gradient(0deg, rgb(43 16 8 / 84%), rgb(43 16 8 / 20) 58%, transparent);
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent 0 10%, rgb(255 247 237 / 7%) 10% 10.2%, transparent 10.2% 100%),
    linear-gradient(0deg, transparent 0 18%, rgb(255 247 237 / 5%) 18% 18.2%, transparent 18.2% 100%);
  background-size: 86px 86px;
  mask-image: linear-gradient(0deg, black, transparent 86%);
  opacity: 0.8;
}

.ambient-lights {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-lights span {
  position: absolute;
  width: 10rem;
  height: 10rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgb(255 247 237 / 22%), transparent 62%);
  filter: blur(8px);
  animation: tableGlow 9s ease-in-out infinite alternate;
}

.ambient-lights span:nth-child(1) {
  left: 5%;
  top: 10%;
}

.ambient-lights span:nth-child(2) {
  right: 12%;
  top: 18%;
  width: 7rem;
  height: 7rem;
  animation-delay: -3s;
}

.ambient-lights span:nth-child(3) {
  left: 42%;
  bottom: 10%;
  width: 12rem;
  height: 12rem;
  animation-delay: -6s;
}

.login-brand-mark {
  position: relative;
  z-index: 1;
  width: 92px;
  display: grid;
  gap: 7px;
}

.login-brand-mark span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: #fed7aa;
}

.login-brand-mark span:nth-child(2) {
  width: 72%;
  background: #ffffff;
}

.login-brand-mark span:nth-child(3) {
  width: 48%;
  background: var(--restaurant-2);
}

.login-brand-panel .eyebrow {
  position: relative;
  z-index: 1;
  color: #fed7aa;
}

.login-brand-panel h1 {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.55rem, 5.6vw, 5.1rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.9;
  text-wrap: balance;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0;
  color: rgb(255 247 237 / 88%);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.65;
}

.menu-preview {
  position: relative;
  z-index: 1;
  max-width: 660px;
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(240px, 1fr);
  gap: 12px;
}

.menu-preview article {
  position: relative;
  display: grid;
  gap: 6px;
  border: 1px solid rgb(255 247 237 / 22%);
  border-radius: 20px;
  padding: 16px;
  background: rgb(255 247 237 / 12%);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%);
  animation: cardRise 700ms cubic-bezier(.2, .8, .2, 1) both;
}

.menu-preview article:nth-child(2) {
  animation-delay: 120ms;
}

.menu-preview article::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fed7aa, var(--restaurant-2));
}

.menu-preview span,
.menu-preview small {
  color: rgb(255 247 237 / 72%);
  font-size: 0.78rem;
  font-weight: 850;
}

.menu-preview strong {
  font-size: 1.06rem;
}

.menu-preview small {
  color: #fed7aa;
}

.login-status-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.login-status-grid article {
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgb(255 247 237 / 17%);
  border-radius: 18px;
  padding: 16px;
  background: rgb(255 247 237 / 10%);
  backdrop-filter: blur(12px);
}

.login-status-grid strong,
.login-status-grid span {
  display: block;
}

.login-status-grid strong {
  font-size: 1.2rem;
}

.login-status-grid span {
  color: rgb(255 247 237 / 70%);
  font-size: 0.84rem;
  font-weight: 800;
}

.login-card {
  width: 100%;
  align-self: center;
  display: grid;
  gap: 15px;
  max-width: 390px;
  margin: clamp(16px, 2.6vw, 28px);
  padding: clamp(22px, 3.4vw, 32px);
  border: 1px solid rgb(254 215 170 / 54%);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(255 247 237 / 90%));
  box-shadow: 0 28px 76px rgb(31 10 5 / 34%);
  backdrop-filter: blur(22px);
  animation: cardRise 650ms cubic-bezier(.2, .8, .2, 1) both;
}

.login-card-head {
  display: grid;
  gap: 5px;
  margin-bottom: 4px;
}

.login-card-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3.4vw, 2.35rem);
  letter-spacing: 0;
  line-height: 1;
}

.login-card-head span,
.login-mini-menu span {
  color: var(--muted);
  font-weight: 800;
}

.login-card h1,
.topbar h1,
.sidebar h2 {
  margin: 0;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 54px;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--brand);
  box-shadow: none;
  transform: translateY(-50%);
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--panel-soft);
  transform: translateY(-50%);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-submit {
  min-height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--restaurant), var(--restaurant-2));
  box-shadow: 0 18px 38px rgb(185 28 28 / 24%);
  overflow: hidden;
  position: relative;
}

.login-submit::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -45%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 32%), transparent);
  transform: skewX(-18deg);
  transition: left 520ms ease;
}

.login-submit:hover {
  background: linear-gradient(135deg, #991b1b, #d97706);
}

.login-submit:hover::after {
  left: 112%;
}

.login-mini-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 2px;
}

.login-mini-menu span {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(180 83 9 / 16%);
  border-radius: 999px;
  background: rgb(255 247 237 / 78%);
  color: #7c2d12;
  font-size: 0.74rem;
}

#loginError,
.alert {
  color: var(--danger);
  min-height: 20px;
}

.login-card .login-card-head span,
.login-card .login-mini-menu span,
.login-card .password-field {
  min-height: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgb(19 184 212 / 18%), transparent 34%),
    linear-gradient(180deg, #071b34, #0d263f);
  color: white;
}

.sidebar .eyebrow,
.sidebar span {
  color: #99f6e4;
}

.sidebar nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.sidebar nav button {
  justify-content: start;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgb(255 255 255 / 5%);
  box-shadow: none;
  text-align: left;
}

.sidebar nav button.is-active {
  background: var(--brand);
}

.workspace {
  min-width: 0;
  padding: 22px;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0), rgb(255 255 255 / 58%)),
    radial-gradient(circle at 92% 12%, rgb(245 158 11 / 10%), transparent 20rem);
}

.operation-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  border: 1px solid rgb(185 28 28 / 13%);
  border-radius: 28px;
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 94%), rgb(255 247 237 / 90%)),
    repeating-linear-gradient(90deg, transparent 0 70px, rgb(185 28 28 / 5%) 71px 72px);
  box-shadow: var(--shadow);
}

.operation-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.operation-hero span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.service-pulse {
  min-width: 188px;
  border-radius: 22px;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 20% 20%, rgb(245 158 11 / 34%), transparent 55%),
    linear-gradient(135deg, #431407, #991b1b);
  color: white;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 22px 50px rgb(153 27 27 / 24%);
}

.service-pulse strong {
  display: block;
  font-size: 1.55rem;
}

.service-pulse span {
  margin: 5px 0 0;
  color: #fed7aa;
  font-size: 0.78rem;
}

.command-grid,
.shift-strip {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.command-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.command-card {
  min-height: 106px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  border: 1px solid rgb(185 28 28 / 13%);
  border-radius: 22px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 92%), rgb(255 247 237 / 86%));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 16px 40px rgb(67 20 7 / 8%);
}

.command-card:hover {
  border-color: rgb(185 28 28 / 34%);
  background: white;
  color: var(--restaurant);
}

.command-card span {
  color: var(--restaurant);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.command-card strong {
  font-size: 1.05rem;
}

.shift-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shift-strip article {
  border: 1px solid rgb(185 28 28 / 12%);
  border-radius: 20px;
  padding: 15px;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 14px 32px rgb(67 20 7 / 7%);
}

.shift-strip span,
.shift-strip small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.shift-strip strong {
  display: block;
  margin: 4px 0;
  color: var(--restaurant-dark);
  font-size: 1.35rem;
}

.topbar,
.section-head,
.item-row,
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.alert {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
}

.alert.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--ok);
}

.grid,
.restaurant-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.restaurant-workspace {
  grid-template-columns: minmax(230px, 0.7fr) minmax(420px, 1.15fr) minmax(300px, 0.82fr);
}

.sale-flow {
  display: grid;
  gap: 10px;
}

.sale-flow-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgb(185 28 28 / 14%);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at 82% 0%, rgb(245 158 11 / 18%), transparent 16rem),
    linear-gradient(135deg, white, rgb(255 247 237 / 78%));
  box-shadow: 0 18px 52px rgb(67 20 7 / 8%);
}

.sale-flow-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.sale-flow-head strong {
  align-self: center;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--restaurant);
}

.sale-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sale-steps article {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgb(255 255 255 / 88%);
}

.sale-steps span {
  color: var(--restaurant);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.sale-flow-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(440px, 1.32fr) minmax(230px, 0.58fr);
  gap: 12px;
  align-items: stretch;
  min-height: min(720px, calc(100vh - 148px));
}

.sale-flow-grid > .panel {
  min-height: 0;
  overflow: auto;
}

.sale-mode-grid {
  display: grid;
  gap: 8px;
}

.sale-mode-card {
  min-height: 72px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
  border: 1px solid rgb(185 28 28 / 12%);
  border-radius: 18px;
  background: white;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

.sale-mode-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.sale-mode-card strong {
  font-size: 1.05rem;
}

.sale-mode-card.is-active {
  border-color: rgb(185 28 28 / 28%);
  background: linear-gradient(135deg, #431407, #7f1d1d);
  color: white;
}

.sale-mode-card.is-active span {
  color: #fed7aa;
}

.sale-table-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.sale-table-picker button {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  box-shadow: none;
}

.sale-table-picker button.is-active {
  border-color: rgb(185 28 28 / 30%);
  background: rgb(255 247 237);
  color: var(--restaurant);
}

.sale-table-picker small,
.sale-next-list span {
  color: var(--muted);
  font-weight: 750;
}

.sale-next-list {
  display: grid;
  gap: 10px;
}

.takeaway-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.grid.two {
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, 0.85fr);
}

.metric-grid,
.report-grid,
.method-grid {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-grid article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--panel-soft);
}

.method-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.method-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.2rem;
}

.panel,
.table-card,
.product-card,
.order-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 16px 44px rgb(15 32 51 / 7%);
}

.panel {
  padding: 18px;
}

.metric-card,
.salon-panel,
.order-compose-panel,
.kitchen-side-panel,
.cash-queue-panel,
.kitchen-board {
  border-color: rgb(185 28 28 / 12%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(255 247 237 / 72%));
}

.panel h2,
.panel h3,
.table-card h3,
.product-card h3,
.order-card h3 {
  margin: 0;
}

.stack {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(260px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.settings-company-card {
  grid-row: span 2;
}

.discount-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.42fr);
  gap: 12px;
  align-items: end;
}

.toggle-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--restaurant);
}

.plan-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgb(245 158 11 / 26%);
  border-radius: 14px;
  background: rgb(255 247 237 / 82%);
  color: var(--warn);
  font-size: 0.88rem;
  font-weight: 800;
}

.plan-card {
  background:
    linear-gradient(145deg, rgb(67 20 7 / 96%), rgb(127 29 29 / 94%)),
    var(--restaurant-dark);
  color: white;
}

.plan-card .eyebrow,
.plan-card .muted {
  color: rgb(255 237 213 / 80%);
}

.limit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.limit-grid article {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgb(255 247 237 / 18%);
  border-radius: 16px;
  background: rgb(255 255 255 / 8%);
}

.limit-grid span {
  color: rgb(255 237 213 / 76%);
  font-size: 0.78rem;
  font-weight: 850;
}

.limit-grid strong {
  font-size: 1.05rem;
}

.table-grid,
.product-grid,
.kitchen-grid {
  display: grid;
  gap: 10px;
}

.premium-table-grid {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.table-card,
.product-card,
.order-card {
  padding: 13px;
}

.table-card {
  min-height: 116px;
  display: grid;
  gap: 10px;
  border-color: rgb(185 28 28 / 10%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.table-card:hover,
.product-card:hover,
.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgb(67 20 7 / 10%);
}

.table-card.is-selected {
  border-color: var(--restaurant);
  box-shadow: 0 0 0 3px rgb(185 28 28 / 13%), 0 20px 48px rgb(67 20 7 / 12%);
}

.table-card-head h3 {
  font-size: 1.04rem;
}

.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 800;
}

.status.libre {
  background: #dcfce7;
  color: var(--ok);
}

.status.en_cocina,
.status.preparando {
  background: #fef3c7;
  color: var(--warn);
}

.status.lista,
.status.listo {
  background: #fef3c7;
  color: var(--warn);
}

.table-legend,
.menu-rail,
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff7ed;
  color: var(--restaurant);
  font-size: 0.78rem;
  font-weight: 900;
}

.compact-action {
  min-height: 34px;
}

.order-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at 90% 0%, rgb(245 158 11 / 18%), transparent 10rem),
    #431407;
  color: white;
}

.order-compose-head .eyebrow {
  color: #fed7aa;
}

.order-compose-head h2 {
  margin: 0;
}

.order-compose-head strong {
  font-size: 1.35rem;
}

.order-mode-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgb(185 28 28 / 12%);
  border-radius: 18px;
  padding: 12px;
  background: rgb(255 255 255 / 70%);
}

.table-order-detail {
  display: grid;
  gap: 12px;
  border: 1px solid rgb(185 28 28 / 14%);
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 96%), rgb(255 247 237 / 76%));
}

.table-order-detail.is-empty {
  border-style: dashed;
}

.table-order-head,
.table-order-summary,
.table-order-items article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-order-head strong {
  color: var(--restaurant);
  font-size: 1.35rem;
}

.table-order-items {
  display: grid;
  gap: 8px;
}

.table-order-items article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: white;
}

.table-order-items small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 750;
}

.table-order-summary {
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-weight: 850;
}

.table-order-summary strong {
  color: var(--restaurant-dark);
}

.table-order-note {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgb(239 246 255 / 72%);
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 850;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-radius: 16px;
  padding: 5px;
  background: #fff7ed;
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #7c2d12;
  box-shadow: none;
}

.segmented-control button.is-active {
  background: #431407;
  color: white;
}

.product-picker-tools {
  display: grid;
  gap: 10px;
}

.product-search input {
  min-height: 42px;
  border-color: rgb(185 28 28 / 18%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(255 247 237 / 58%));
}

.menu-rail {
  align-items: center;
}

.menu-rail button {
  min-height: 34px;
  border: 1px solid rgb(185 28 28 / 14%);
  border-radius: 999px;
  padding: 0 12px;
  background: white;
  color: var(--restaurant);
  box-shadow: none;
}

.menu-rail button.is-active {
  background: var(--restaurant);
  color: white;
}

.premium-product-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  max-height: min(330px, 38vh);
  overflow: auto;
  padding-right: 4px;
}

.product-card {
  display: grid;
  gap: 8px;
  border-color: rgb(185 28 28 / 10%);
}

.product-image-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgb(185 28 28 / 10%);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgb(255 247 237), rgb(254 226 226));
}

.sale-flow .product-image-frame {
  aspect-ratio: 16 / 9;
}

.product-image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.product-image-placeholder {
  display: grid;
  place-items: center;
}

.product-image-placeholder span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #431407;
  color: white;
  font-size: 1.15rem;
  font-weight: 900;
}

.product-upload-field {
  gap: 6px;
}

.product-upload-field input[type="file"] {
  min-height: 48px;
  padding: 10px;
  border-style: dashed;
  background: rgb(255 247 237 / 72%);
}

.product-upload-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-list-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.product-list-row.is-editing {
  border-color: rgb(185 28 28 / 24%);
  border-radius: 14px;
  padding: 8px;
  background: rgb(255 247 237 / 82%);
}

.product-list-row .product-image-frame {
  width: 54px;
  aspect-ratio: 1;
  border-radius: 14px;
}

.product-list-row .product-image-placeholder span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.product-card button {
  min-height: 38px;
  background: linear-gradient(135deg, var(--restaurant), var(--restaurant-2));
}

.draft-panel {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.draft-item {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(130px, 0.8fr) auto;
  gap: 8px;
  align-items: end;
  border: 1px solid rgb(185 28 28 / 10%);
  border-radius: 16px;
  padding: 8px;
  background: rgb(255 255 255 / 78%);
}

.draft-quantity {
  display: inline-grid;
  grid-template-columns: 34px minmax(34px, auto) 34px;
  align-items: center;
  justify-items: center;
  min-height: 36px;
  border: 1px solid rgb(185 28 28 / 14%);
  border-radius: 14px;
  background: #fff7ed;
  overflow: hidden;
}

.draft-quantity button {
  width: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--restaurant);
  box-shadow: none;
}

.draft-note {
  gap: 4px;
}

.draft-note input {
  min-height: 36px;
}

.cash-console {
  display: grid;
  gap: 14px;
}

.cash-console-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  border: 1px solid rgb(185 28 28 / 10%);
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgb(255 255 255 / 92%), rgb(255 247 237 / 68%));
}

.cash-console-head h2 {
  margin: 0;
}

.cash-console-head > strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
  color: var(--restaurant);
}

.cash-session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgb(22 163 74 / 18%);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, rgb(240 253 244 / 94%), rgb(255 255 255 / 92%));
}

.cash-session-card h3,
.cash-session-card p {
  margin: 0;
}

.cash-session-card > strong {
  color: #166534;
}

.cash-session-form {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.3fr) minmax(100px, 0.22fr) auto;
  align-items: end;
}

.cash-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgb(185 28 28 / 10%);
  border-radius: 18px;
  padding: 6px;
  background: rgb(255 255 255 / 82%);
}

.cash-tabs button {
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: transparent;
  color: #7c2d12;
  box-shadow: none;
}

.cash-tabs button.is-active {
  background: #431407;
  color: white;
}

.cash-tabs strong {
  min-width: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgb(255 247 237 / 76%);
  color: #7c2d12;
}

.cash-tabs button.is-active strong {
  background: rgb(255 255 255 / 18%);
  color: white;
}

.cash-compact-list,
.cash-order-detail {
  display: grid;
  gap: 10px;
}

.cash-order-card {
  display: grid;
  gap: 0;
}

.cash-compact-card {
  padding: 0;
  overflow: hidden;
}

.cash-order-summary {
  width: 100%;
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  padding: 14px 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.cash-order-summary:hover {
  background: rgb(255 247 237 / 76%);
}

.cash-order-summary.is-static:hover {
  background: transparent;
}

.cash-order-summary span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.cash-order-summary small {
  color: var(--muted);
  font-weight: 800;
}

.cash-order-summary > strong {
  color: var(--restaurant);
  font-size: 1.16rem;
}

.cash-order-detail {
  border-top: 1px solid var(--line);
  padding: 12px;
  background: rgb(255 255 255 / 68%);
}

.cash-kitchen-items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
}

.cash-kitchen-items span {
  border: 1px solid rgb(185 28 28 / 10%);
  border-radius: 999px;
  padding: 6px 9px;
  background: white;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.cash-waiting-panel {
  border-color: rgb(245 158 11 / 18%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(255 247 237 / 68%));
}

.cash-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  padding: 12px;
  background: #431407;
  color: white;
}

.cash-summary-line span {
  color: #fed7aa;
  font-weight: 800;
}

.cash-summary-line strong {
  font-size: 1.25rem;
}

.order-balance-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgb(15 111 183 / 14%);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgb(238 246 251 / 74%);
  color: var(--ink);
  font-weight: 850;
}

.order-balance-line span {
  color: var(--muted);
}

.partial-payment-panel,
.void-order-panel {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 0.45fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgb(185 28 28 / 10%);
  border-radius: 16px;
  padding: 10px;
  background: rgb(255 255 255 / 82%);
}

.void-order-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: rgb(180 35 24 / 16%);
  background: rgb(254 242 242 / 70%);
}

.split-payment-list {
  border: 1px dashed rgb(15 111 183 / 22%);
  border-radius: 14px;
  padding: 9px 10px;
  background: rgb(246 251 253 / 78%);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.split-payment-item {
  cursor: pointer;
}

.split-payment-item input {
  width: auto;
  margin-right: 8px;
}

.split-payment-item.is-paid {
  opacity: 0.62;
}

.cash-received-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.55fr);
  gap: 10px;
  align-items: end;
}

.cash-received-row input {
  min-height: 40px;
}

.cash-received-row > span {
  min-height: 40px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid rgb(22 163 74 / 16%);
  border-radius: 14px;
  padding: 7px 10px;
  background: rgb(240 253 244 / 82%);
  color: #166534;
  font-size: 0.78rem;
  font-weight: 850;
}

.cash-received-row strong {
  color: #14532d;
  font-size: 1rem;
}

.cash-close-section {
  margin-top: 0;
}

.cash-close-card {
  border-color: rgb(22 163 74 / 18%);
  background:
    radial-gradient(circle at 88% 8%, rgb(22 163 74 / 10%), transparent 30%),
    linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(240 253 244 / 76%));
}

.cash-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cash-breakdown-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid rgb(22 163 74 / 12%);
  border-radius: 16px;
  padding: 12px;
  background: rgb(255 255 255 / 76%);
}

.cash-breakdown-grid span,
.cash-history-list span,
.cash-history-list small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.cash-breakdown-grid strong {
  color: #14532d;
}

.cash-history-list {
  display: grid;
  gap: 9px;
}

.cash-history-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: var(--panel-soft);
}

.cash-history-list small {
  grid-column: 1 / -1;
}

.receipt-history-panel {
  border-color: rgb(15 111 183 / 14%);
  background:
    radial-gradient(circle at 92% 8%, rgb(19 184 212 / 10%), transparent 28%),
    linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(239 246 255 / 66%));
}

.receipt-history-list {
  display: grid;
  gap: 8px;
}

.receipt-history-list article {
  min-width: 0;
}

.receipt-history-main {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

.receipt-history-main:hover {
  border-color: var(--brand);
  background: rgb(239 246 255);
  color: var(--brand-dark);
}

.receipt-history-main span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.receipt-history-main span:last-child {
  justify-items: end;
}

.receipt-history-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-button {
  min-height: 42px;
  background:
    linear-gradient(135deg, rgb(185 28 28), rgb(245 158 11));
}

.prepay-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.prepay-panel {
  display: grid;
  gap: 5px;
  border: 1px solid rgb(21 128 61 / 18%);
  border-radius: 16px;
  padding: 12px;
  background: rgb(240 253 244 / 82%);
  color: var(--ok);
}

.prepay-panel.is-warning {
  border-color: rgb(245 158 11 / 26%);
  background: rgb(255 247 237 / 88%);
  color: var(--warn);
}

.prepay-panel span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.receipt-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(15 23 42 / 46%);
  backdrop-filter: blur(8px);
}

.receipt-modal {
  width: min(420px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  display: grid;
  gap: 12px;
  border: 1px solid rgb(255 247 237 / 32%);
  border-radius: 20px;
  padding: 16px;
  background: white;
  box-shadow: 0 32px 90px rgb(15 23 42 / 28%);
  overflow: auto;
}

.receipt-modal-head,
.receipt-modal-actions,
.receipt-preview-total,
.receipt-preview-change,
.receipt-preview-items div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.receipt-preview {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgb(248 250 252);
}

.receipt-preview h3 {
  margin: 0;
  text-align: center;
}

.receipt-preview > span,
.receipt-preview-change {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.receipt-preview-items {
  display: grid;
  gap: 6px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  padding: 8px 0;
}

.receipt-preview-total {
  color: var(--restaurant-dark);
  font-size: 1.1rem;
  font-weight: 950;
}

.kitchen-board .kitchen-grid,
.kitchen-side-panel .kitchen-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.kitchen-kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.kitchen-column {
  display: grid;
  gap: 10px;
  min-height: 240px;
  border: 1px solid rgb(185 28 28 / 10%);
  border-radius: 20px;
  padding: 12px;
  background: rgb(255 255 255 / 70%);
}

.kitchen-column .section-head h3 {
  margin: 0;
  font-size: 1rem;
}

.kitchen-alert-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kitchen-alert {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 14px;
}

.kitchen-alert strong {
  font-size: 2rem;
}

.kitchen-alert span {
  font-weight: 900;
}

.kitchen-alert.ready {
  background: rgb(240 253 244);
  color: var(--ok);
}

.kitchen-alert.active {
  background: rgb(255 247 237);
  color: var(--warn);
}

.kitchen-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kitchen-control-card {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgb(15 111 183 / 13%);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, white, rgb(239 246 255 / 64%));
}

.kitchen-control-card span,
.kitchen-control-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.kitchen-control-card strong {
  color: var(--brand-dark);
  font-size: 1.45rem;
  line-height: 1.05;
}

.kitchen-control-card.is-warning {
  border-color: rgb(245 158 11 / 32%);
  background: linear-gradient(135deg, rgb(255 251 235), rgb(255 247 237));
}

.kitchen-control-card.is-warning strong {
  color: var(--warn);
}

.kitchen-order-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.age-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgb(241 245 249);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
}

.priority-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgb(241 245 249);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.priority-chip.active {
  background: rgb(239 246 255);
  color: var(--brand-dark);
}

.priority-chip.late {
  background: rgb(254 243 199);
  color: var(--warn);
}

.priority-chip.urgent {
  background: rgb(254 226 226);
  color: var(--danger);
}

.priority-chip.ready {
  background: rgb(220 252 231);
  color: var(--ok);
}

.paid-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgb(220 252 231);
  color: var(--ok);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.order-card.is-delayed {
  border-color: rgb(180 83 9 / 30%);
  box-shadow: 0 20px 52px rgb(180 83 9 / 12%);
}

.order-card.is-delayed .age-chip {
  background: rgb(254 243 199);
  color: var(--warn);
}

.kitchen-service-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kitchen-service-badge.dine-in {
  border: 1px solid rgb(15 111 183 / 20%);
  background: rgb(239 246 255 / 90%);
  color: var(--brand-dark);
}

.kitchen-service-badge.takeaway {
  border: 1px solid rgb(245 158 11 / 24%);
  background: rgb(255 247 237 / 94%);
  color: var(--warn);
}

.muted {
  color: var(--muted);
}

.total {
  font-size: 1.6rem;
  font-weight: 900;
}

.item-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.item-row:last-child {
  border-bottom: 0;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--panel-soft);
}

.audit-row div {
  display: grid;
  gap: 4px;
}

.audit-row span,
.audit-row small {
  color: var(--muted);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@keyframes ambientDrift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.04);
  }
}

@keyframes tableGlow {
  from {
    opacity: 0.46;
    transform: translate3d(0, 0, 0) scale(0.94);
  }

  to {
    opacity: 0.82;
    transform: translate3d(14px, -10px, 0) scale(1.06);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .login-shell {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .login-brand-panel {
    min-height: 410px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .restaurant-workspace,
  .sale-flow-grid,
  .sale-steps,
  .kitchen-kanban,
  .kitchen-control-grid,
  .takeaway-workspace,
  .settings-layout,
  .command-grid,
  .shift-strip {
    grid-template-columns: 1fr;
  }

  .grid.two,
  .metric-grid,
  .discount-control,
  .draft-item,
  .cash-session-card,
  .cash-session-form,
  .partial-payment-panel,
  .void-order-panel,
  .cash-received-row,
  .cash-breakdown-grid,
  .cash-console-head,
  .cash-tabs {
    grid-template-columns: 1fr;
  }

  .cash-console-head {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .login-view {
    align-items: start;
    overflow: auto;
    padding: 10px;
  }

  .login-shell {
    min-height: auto;
    border-radius: 24px;
    overflow: hidden;
  }

  .login-card {
    order: -1;
    max-width: none;
  }

  .login-brand-panel {
    min-height: auto;
    gap: 16px;
    padding: 24px;
  }

  .login-brand-panel h1 {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }

  .login-brand-panel::before {
    background:
      linear-gradient(90deg, transparent 0 10%, rgb(255 247 237 / 6%) 10% 10.2%, transparent 10.2% 100%),
      linear-gradient(0deg, transparent 0 18%, rgb(255 247 237 / 4%) 18% 18.2%, transparent 18.2% 100%);
  }

  .login-brand-mark {
    width: 72px;
  }

  .login-brand-mark span {
    height: 10px;
  }

  .login-copy {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .login-status-grid {
    grid-template-columns: 1fr;
  }

  .restaurant-flow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .menu-preview {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .menu-preview article {
    padding: 12px;
  }

  .login-status-grid article {
    min-height: 54px;
    padding: 10px;
  }

  .login-status-grid strong {
    font-size: 0.9rem;
  }

  .login-status-grid span {
    font-size: 0.7rem;
  }

  .login-card {
    margin: 10px;
    border-radius: 22px;
  }

  .login-mini-menu {
    gap: 8px;
  }

  .workspace,
  .sidebar {
    padding: 12px;
  }

  .app-shell {
    min-width: 0;
  }

  .sidebar {
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    gap: 8px;
  }

  .brand h1 {
    font-size: 1.25rem;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .nav button {
    min-width: max-content;
    min-height: 44px;
    scroll-snap-align: start;
  }

  .topbar {
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .topbar-actions button {
    min-height: 44px;
    padding-inline: 10px;
  }

  .panel {
    border-radius: 16px;
    padding: 14px;
  }

  .operation-hero,
  .sale-flow-head,
  .cash-console-head {
    border-radius: 18px;
    padding: 14px;
  }

  .operation-hero,
  .sale-flow-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sale-steps,
  .command-grid,
  .metric-grid,
  .shift-strip {
    gap: 8px;
  }

  .sale-steps article,
  .command-card,
  .metric-card {
    min-height: 72px;
  }

  .topbar,
  .section-head,
  .order-head {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .sale-mode-grid,
  .segmented-control,
  .cash-received-row,
  .button-row {
    grid-template-columns: 1fr;
  }

  .menu-rail,
  .cash-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .menu-rail button,
  .cash-tabs button {
    flex: 0 0 auto;
    min-height: 44px;
    scroll-snap-align: start;
  }

  .cash-tabs {
    grid-template-columns: none;
    border-radius: 16px;
  }

  .cash-tabs button {
    min-width: 132px;
  }

  .cash-console-head > strong,
  .total {
    font-size: 1.35rem;
  }

  .cash-order-summary {
    min-height: 68px;
    padding: 12px;
  }

  .cash-order-summary > strong {
    font-size: 1rem;
  }

  .cash-order-detail {
    padding: 10px;
  }

  .payment-button,
  .login-submit,
  button,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .draft-item {
    align-items: stretch;
  }

  .draft-quantity {
    justify-self: start;
  }

  .cash-breakdown-grid article,
  .cash-history-list article,
  .receipt-history-main {
    padding: 10px;
  }

  .table-grid,
  .product-grid,
  .report-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .product-card,
  .table-card,
  .cash-compact-card {
    border-radius: 16px;
  }
}
