:root {
  --bg: #f7f3ea;
  --panel: #fffdf8;
  --ink: #272522;
  --muted: #746f66;
  --line: rgba(39, 37, 34, 0.12);
  --brand: #1f7a5a;
  --brand-2: #d99a2b;
  --danger: #b34235;
  --blue: #3867b7;
  --shadow: 0 18px 50px rgba(39, 37, 34, 0.1);
  --radius: 8px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button, a { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.kicker {
  color: var(--brand);
  display: inline-block;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 5.4rem); line-height: .92; margin-bottom: 10px; }
h2 { font-size: clamp(1.35rem, 3vw, 2.1rem); line-height: 1; margin-bottom: 10px; }
h3 { margin-bottom: 8px; }
p { color: var(--muted); line-height: 1.55; }

button, .top-actions a, .home-actions a {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 800;
}
.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.danger, .alert.danger {
  border-color: rgba(179, 66, 53, .26);
  background: rgba(179, 66, 53, .08);
  color: var(--danger);
}
.icon-button { width: 42px; padding: 0; font-size: 1.25rem; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 12px;
}
label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: .82rem;
  font-weight: 800;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input { width: auto; }

.home-page, .login-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 22px;
}
.home-shell { width: min(920px, 100%); }
.login-shell { width: min(460px, 100%); }
.home-hero, .login-card, .form-card, .side-panel, .main-panel, .stats-row article, .locked-card, .cart-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, .88);
  box-shadow: var(--shadow);
}
.home-hero, .login-card { padding: clamp(26px, 6vw, 56px); }
.login-card {
  width: 100%;
  margin: auto;
  display: grid;
  gap: 16px;
}
.login-card h1 {
  font-size: clamp(3rem, 10vw, 4rem);
  line-height: 1;
  margin-bottom: 4px;
}
.login-card small { color: var(--muted); }
.login-footer {
  margin-top: 16px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
  text-align: center;
}
.login-footer a {
  color: var(--brand);
  font-weight: 900;
}
.login-page {
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
  background: #07111d;
  color: #f9f3e7;
}
.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(110deg, rgba(7,17,29,.96), rgba(19,27,37,.86) 46%, rgba(34,28,22,.76)),
    url("../img/hero-bakery.webp") center / cover no-repeat;
  filter: saturate(.85);
  transform: scale(1.02);
}
.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18));
  backdrop-filter: blur(3px);
}
.login-page .login-shell {
  position: relative;
  width: min(1120px, 100%);
  min-height: calc(100svh - 44px);
  display: grid;
  place-items: center;
}
.login-brand {
  position: absolute;
  top: clamp(8px, 3vw, 28px);
  left: 0;
}
.login-brand a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  width: clamp(112px, 17vw, 150px);
  min-width: 112px;
}
.brand-logo img {
  width: 100%;
  height: auto;
  max-height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.28));
}
.brand-product {
  border-left: 1px solid rgba(255,255,255,.28);
  color: #d9b66d;
  padding-left: 10px;
  font-size: clamp(1rem, 2.3vw, 1.25rem);
  font-weight: 850;
}
.login-page .login-card {
  width: min(460px, 100%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  background: rgba(11, 20, 33, .72);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  padding: clamp(28px, 5vw, 46px);
  gap: 18px;
}
.login-page .login-card .kicker {
  color: #d9b66d;
  letter-spacing: .16em;
}
.login-page .login-card h1 {
  color: #fff8ec;
  font-size: clamp(2rem, 6vw, 3.1rem);
  line-height: 1.02;
  margin-bottom: 0;
}
.login-page .login-card p {
  color: rgba(249,243,231,.72);
}
.login-page .login-card label {
  color: rgba(249,243,231,.78);
}
.login-page .login-card input {
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  min-height: 52px;
}
.login-page .login-card input::placeholder {
  color: rgba(249,243,231,.46);
}
.login-page .login-card input:focus {
  outline: 2px solid rgba(217,182,109,.5);
  border-color: rgba(217,182,109,.74);
}
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(249,243,231,.72);
  font-size: .88rem;
  font-weight: 800;
}
.login-options .check {
  display: inline-flex;
  min-width: 0;
  color: rgba(249,243,231,.72);
}
.login-options input {
  width: auto;
  min-height: auto;
  padding: 0;
  border-color: transparent;
  background: transparent;
  accent-color: #d9b66d;
}
.login-options a,
.login-help a {
  color: #e5c77f;
  font-weight: 900;
}
.login-page .login-card .primary {
  min-height: 54px;
  border-color: rgba(230,194,118,.9);
  background: linear-gradient(180deg, #e3bd70, #b98735);
  color: #14120e;
  box-shadow: 0 14px 34px rgba(185,135,53,.28);
}
.login-page .login-card .primary:hover {
  filter: brightness(1.04);
}
.login-help {
  margin: 0;
  text-align: center;
  font-size: .9rem;
}
.login-page .login-footer {
  position: absolute;
  right: 0;
  bottom: clamp(8px, 3vw, 24px);
  color: rgba(249,243,231,.66);
}
.login-page .login-footer a {
  color: #e5c77f;
}
.login-page .alert.danger {
  border-color: rgba(255,123,103,.34);
  background: rgba(179,66,53,.16);
  color: #ffd8d1;
}
@media (max-width: 640px) {
  .login-page {
    padding: 16px;
  }
  .login-page .login-shell {
    min-height: calc(100svh - 32px);
    align-content: center;
    gap: 18px;
  }
  .login-brand,
  .login-page .login-footer {
    position: static;
    justify-self: start;
  }
  .login-page .login-footer {
    justify-self: center;
    text-align: center;
  }
  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }
}
.home-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.home-page {
  display: block;
  min-height: 100svh;
  overflow-x: hidden;
  padding: 0;
  background: #f7f3ea;
}
.home-shell {
  width: 100%;
}
.home-hero {
  min-height: min(720px, 86svh);
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(14, 22, 29, .92), rgba(14, 22, 29, .66) 58%, rgba(31, 122, 90, .18)),
    url("../img/hero-bakery.webp") center / cover no-repeat;
  box-shadow: none;
  color: #fff8ec;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(56px, 10vw, 120px) max(20px, calc((100vw - 1160px) / 2));
}
.home-hero .kicker {
  color: #e1bd74;
}
.home-hero h1 {
  width: min(760px, 100%);
  font-size: clamp(2.5rem, 7.6vw, 6.2rem);
  letter-spacing: 0;
}
.home-hero p {
  width: min(700px, 100%);
  color: rgba(255, 248, 236, .82);
  font-size: clamp(1rem, 2vw, 1.22rem);
}
.home-actions a {
  min-height: 50px;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 253, 248, .12);
  color: #fff8ec;
  padding: 0 18px;
}
.home-actions a.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.home-section,
.home-split,
.home-trust {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 74px) 0;
}
.home-section-head {
  width: min(680px, 100%);
  margin-bottom: 20px;
}
.home-section-head h2,
.home-split h2,
.home-trust h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.02;
}
.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.home-feature-grid article,
.home-steps article,
.home-mini-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, .92);
  box-shadow: 0 16px 38px rgba(39, 37, 34, .07);
  padding: 20px;
}
.home-feature-grid article span,
.home-steps article span {
  color: var(--brand);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 18px;
}
.home-feature-grid h3,
.home-mini-panel strong {
  font-size: 1.12rem;
}
.home-feature-grid p,
.home-steps p {
  margin-bottom: 0;
}
.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  align-items: center;
  gap: clamp(22px, 4vw, 46px);
}
.home-mini-panel {
  background: #10231d;
  color: #fff8ec;
}
.home-mini-panel ul {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 18px;
}
.home-mini-panel li {
  color: rgba(255, 248, 236, .82);
}
.home-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.home-steps article span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(31, 122, 90, .12);
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.home-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}
.home-trust div {
  width: min(720px, 100%);
}
.home-trust a {
  white-space: nowrap;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr);
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
}
.home-hero-copy {
  min-width: 0;
}
.home-hero-card {
  display: grid;
  gap: 16px;
  justify-self: end;
  width: min(420px, 100%);
}
.home-phone,
.home-dashboard-card {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  background: rgba(255, 253, 248, .12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter: blur(14px);
}
.home-phone {
  display: grid;
  gap: 14px;
  margin-left: auto;
  min-height: 360px;
  padding: 24px;
}
.home-phone strong {
  color: #fff8ec;
  font-size: 2.2rem;
}
.home-phone-item {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 248, 236, .86);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
}
.home-phone-item b {
  color: #e1bd74;
}
.home-phone button {
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: white;
  min-height: 48px;
  font-weight: 900;
}
.home-dashboard-card {
  color: #fff8ec;
  display: grid;
  gap: 6px;
  padding: 18px 20px;
}
.home-dashboard-card span,
.home-dashboard-card small {
  color: rgba(255, 248, 236, .72);
  font-weight: 800;
}
.home-dashboard-card strong {
  font-size: 1.8rem;
}
.home-feature-grid article {
  transition: transform .18s ease, box-shadow .18s ease;
}
.home-feature-grid article:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(39, 37, 34, .1);
}
.home-feature-grid article .home-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(31, 122, 90, .12);
  color: var(--brand);
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  letter-spacing: 0;
  margin-bottom: 18px;
}
.home-trust a.primary {
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  font-weight: 900;
}

@media (max-width: 860px) {
  .home-feature-grid,
  .home-steps,
  .home-split,
  .home-hero {
    grid-template-columns: 1fr;
  }
  .home-hero-card {
    justify-self: stretch;
    width: 100%;
  }
  .home-trust {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .home-hero {
    min-height: 76svh;
    padding: 46px 18px;
  }
  .home-phone {
    min-height: 300px;
  }
  .home-actions a,
  .home-trust a {
    width: 100%;
  }
  .home-section,
  .home-split,
  .home-trust {
    width: min(100% - 28px, 1160px);
  }
}

.app-shell {
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}
.topbar, .panel-head, .top-actions, .cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.panel-actions a,
.panel-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
.panel-actions a.primary {
  border-color: rgba(31, 122, 90, .34);
  background: rgba(255, 253, 248, .9);
  color: var(--brand);
}
.panel-actions button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.panel-actions a.primary:hover {
  border-color: var(--brand);
  background: rgba(31, 122, 90, .06);
}
.topbar { margin-bottom: 18px; }
.topbar h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
.top-actions span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
  font-weight: 800;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stats-row article { padding: 18px; }
.stats-row span { color: var(--muted); display: block; font-size: .78rem; font-weight: 900; text-transform: uppercase; }
.stats-row strong { display: block; font-size: clamp(1.7rem, 4vw, 2.7rem); margin-top: 8px; }
.stats-row article.has-open-orders {
  border-color: rgba(179, 66, 53, .42);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(179,66,53,.14));
  animation: open-order-pulse 1.45s ease-in-out infinite;
}
.stats-row article.has-open-orders span,
.stats-row article.has-open-orders strong {
  color: var(--danger);
}

@keyframes open-order-pulse {
  0%, 100% {
    box-shadow: var(--shadow), 0 0 0 0 rgba(179, 66, 53, .18);
  }
  50% {
    box-shadow: var(--shadow), 0 0 0 8px rgba(179, 66, 53, .06);
  }
}

.workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.workspace > *,
.main-panel,
.side-panel,
.order-columns {
  min-width: 0;
}
.side-panel, .main-panel { padding: 18px; }
.side-panel { position: sticky; top: 14px; }
.table-grid { display: grid; gap: 10px; margin-top: 14px; }
.table-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  background: white;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.table-card > * {
  position: relative;
  z-index: 1;
}
.table-card.is-open {
  border-color: rgba(31,122,90,.42);
  border-left-color: var(--brand);
  background: linear-gradient(90deg, rgba(31,122,90,.11), rgba(255,255,255,.96) 44%);
  box-shadow: 0 10px 24px rgba(31, 122, 90, .08);
}
.table-card.is-open::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 14px;
  bottom: 10px;
  width: 124px;
  pointer-events: none;
  opacity: .14;
  background: right center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 170 130'%3E%3Cg fill='none' stroke='%231f7a5a' stroke-width='7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='85' cy='72' rx='42' ry='24' fill='%23ffffff' fill-opacity='.75'/%3E%3Cpath d='M48 72h74M66 58h38M62 86h48' opacity='.55'/%3E%3Ccircle cx='45' cy='35' r='13' fill='%231f7a5a' fill-opacity='.32'/%3E%3Cpath d='M28 63c7-14 27-14 34 0'/%3E%3Ccircle cx='125' cy='35' r='13' fill='%231f7a5a' fill-opacity='.32'/%3E%3Cpath d='M108 63c7-14 27-14 34 0'/%3E%3Ccircle cx='45' cy='104' r='13' fill='%231f7a5a' fill-opacity='.32'/%3E%3Cpath d='M28 119c7-13 27-13 34 0'/%3E%3Ccircle cx='125' cy='104' r='13' fill='%231f7a5a' fill-opacity='.32'/%3E%3Cpath d='M108 119c7-13 27-13 34 0'/%3E%3C/g%3E%3C/svg%3E");
}
.table-card.is-focused {
  outline: 3px solid rgba(217,154,43,.85);
  box-shadow: 0 0 0 6px rgba(217,154,43,.18), var(--shadow);
}
.table-card header, .table-card footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.badge {
  border-radius: 999px;
  background: rgba(31,122,90,.1);
  color: var(--brand);
  padding: 5px 8px;
  font-size: .72rem;
  font-weight: 900;
}
.badge.warn { background: rgba(217,154,43,.14); color: #8a5d13; }
.badge.blue { background: rgba(56,103,183,.12); color: var(--blue); }
.badge.danger { background: rgba(179,66,53,.1); color: var(--danger); border: 0; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab.is-active { border-color: var(--brand); color: var(--brand); }
.management-menu { display: none; position: relative; }
.management-menu summary {
  list-style: none;
  user-select: none;
}
.management-menu summary::-webkit-details-marker { display: none; }
.management-menu summary.tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 800;
}
.management-menu[open] summary.tab,
.management-menu.is-active summary.tab {
  border-color: var(--brand);
  color: var(--brand);
}
.management-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 35;
  display: grid;
  gap: 6px;
  width: min(220px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.management-menu-panel .tab {
  width: 100%;
  justify-content: flex-start;
}
.view { display: none; }
.view.is-active { display: block; }
.order-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.order-column {
  min-height: 320px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.58);
  padding: 12px;
}
.order-column-open {
  border-color: rgba(179, 66, 53, .24);
  border-top-color: #d84a3a;
  background: rgba(179, 66, 53, .055);
}
.order-column-assigned {
  border-color: rgba(217, 154, 43, .28);
  border-top-color: #d99a2b;
  background: rgba(217, 154, 43, .07);
}
.order-column-delivered {
  border-color: rgba(31, 122, 90, .28);
  border-top-color: var(--brand);
  background: rgba(31, 122, 90, .06);
}
.order-column h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-column h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
}
.order-column-open h3 { color: var(--danger); }
.order-column-open h3::before { background: #d84a3a; }
.order-column-assigned h3 { color: #8a5d13; }
.order-column-assigned h3::before { background: #d99a2b; }
.order-column-delivered h3 { color: var(--brand); }
.order-column-delivered h3::before { background: var(--brand); }
.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
  margin-bottom: 10px;
}
.order-card header, .order-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.order-card ul { margin: 10px 0; padding-left: 18px; color: var(--muted); }
.order-card footer { flex-wrap: wrap; }
.order-card small { color: var(--muted); }
.delivered-group-card p {
  margin: 0;
}
.source-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.pos-layout,
.pos-layout > *,
.pos-products,
.menu-products,
.category-pills,
.product-card,
.cart-panel {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.category-pills { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 12px; }
.category-pills button { flex: 0 0 auto; white-space: nowrap; }
.category-pills .is-active { border-color: var(--brand); color: var(--brand); }
.pos-products, .menu-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.qr-preview-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 10px;
  margin: 12px 0 8px;
}
.qr-preview-summary button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
  min-height: 84px;
  text-align: left;
  color: var(--ink);
  box-shadow: none;
}
.qr-preview-summary button:hover,
.qr-preview-summary button.is-active {
  border-color: var(--brand);
  background: #eef7f1;
}
.qr-preview-summary button.is-active {
  box-shadow: inset 0 0 0 1px var(--brand);
}
.qr-preview-summary span {
  color: var(--muted);
  display: block;
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}
.qr-preview-summary strong {
  display: block;
  font-size: 1.8rem;
  margin-top: 4px;
}
.qr-preview-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.preview-product.is-disabled {
  opacity: .72;
  background: rgba(255,255,255,.72);
}
.preview-product.is-disabled img {
  filter: grayscale(.45);
}
.preview-product-head {
  display: grid;
  gap: 8px;
}
.preview-product-head h3 {
  margin: 0;
}
.preview-product footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
  display: grid;
  min-width: 0;
}
.product-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: #ebe5d8;
}
.product-card .body { padding: 12px; display: grid; gap: 8px; }
.product-card p { margin: 0; font-size: .92rem; }
.product-short-description {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.price { color: var(--brand); font-weight: 900; }
.cart-panel {
  align-self: start;
  padding: 14px;
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
}
.cart-panel h3 { margin: 0; }
.cart-panel label { gap: 6px; }
.cart-panel textarea {
  min-height: 92px;
  max-height: 160px;
  resize: vertical;
}
.cart-panel .primary {
  min-height: 44px;
  padding: 0 16px;
}
.cart-row {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  display: grid;
  gap: 6px;
}
.cart-row footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button { width: 34px; min-height: 34px; padding: 0; }

.settings-grid {
  display: grid;
  grid-template-columns: minmax(240px, .6fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
}
.form-card { padding: 18px; display: grid; gap: 13px; }
[data-panel="menu"] .settings-grid {
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
}
[data-panel="menu"] .form-card {
  align-self: start;
  gap: 10px;
  padding: 14px;
  box-shadow: 0 12px 32px rgba(39, 37, 34, .07);
}
[data-panel="menu"] .form-card h2 {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  margin-bottom: 2px;
}
[data-panel="menu"] .form-card label {
  gap: 5px;
  font-size: .78rem;
}
[data-panel="menu"] .form-card input,
[data-panel="menu"] .form-card select,
[data-panel="menu"] .form-card textarea {
  min-height: 38px;
  padding: 9px 10px;
}
[data-panel="menu"] .form-card textarea {
  min-height: 82px;
  resize: vertical;
}
[data-panel="menu"] .form-card > button {
  justify-self: start;
  min-height: 38px;
  padding: 0 18px;
}
[data-category-form] {
  grid-template-columns: minmax(0, 1fr) 96px;
}
[data-category-form] > .kicker,
[data-category-form] > h2,
[data-category-form] > input[type="hidden"] {
  grid-column: 1 / -1;
}
[data-category-form] .check {
  align-self: center;
}
[data-category-form] > button {
  justify-self: end;
}
[data-product-form] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
[data-product-form] > .kicker,
[data-product-form] > h2,
[data-product-form] > input[type="hidden"],
[data-product-form] > label:nth-of-type(3),
[data-product-form] > .rich-editor-label,
[data-product-form] > .product-image-upload,
[data-product-form] > label:nth-of-type(7),
[data-product-form] > .check,
[data-product-form] > button {
  grid-column: 1 / -1;
}
.product-image-upload {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.58);
  padding: 12px;
}
.product-image-upload input[type="file"] {
  border: 0;
  background: white;
  padding: 10px;
}
.product-image-upload small {
  color: var(--muted);
  font-weight: 800;
}
.product-image-upload img {
  width: min(220px, 100%);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center;
  background: #ebe5d8;
}
.rich-editor-label { gap: 8px; }
.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  background: rgba(255,255,255,.72);
  padding: 6px;
}
.rich-editor-toolbar button {
  min-height: 32px;
  padding: 0 9px;
}
.rich-editor {
  min-height: 136px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: white;
  color: var(--ink);
  padding: 10px;
  font-weight: 500;
  line-height: 1.6;
}
.rich-editor:focus {
  outline: 2px solid var(--brand-2);
  outline-offset: 0;
}
.rich-editor:empty::before {
  content: "Ürünün detaylı açıklaması, içerik bilgisi, görseli veya tablosu...";
  color: var(--muted);
}
.rich-editor img,
.rich-content img {
  border-radius: 6px;
  height: auto;
  margin: 8px 0;
}
.rich-editor table,
.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}
.rich-editor th,
.rich-editor td,
.rich-content th,
.rich-content td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}
.rich-editor ul,
.rich-editor ol,
.rich-content ul,
.rich-content ol {
  padding-left: 22px;
}
.catalog-list { display: grid; gap: 8px; margin-top: 14px; }
.catalog-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 9px 10px;
}
.catalog-row img { width: 76px; height: 62px; object-fit: cover; border-radius: 6px; background: #ebe5d8; }
.catalog-row strong {
  display: block;
  line-height: 1.2;
}
.catalog-row p {
  margin: 3px 0 0;
  font-size: .86rem;
}
.catalog-row button {
  min-height: 36px;
  padding: 0 12px;
}
.staff-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.staff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
}
.staff-row p {
  margin: 4px 0 0;
}

.qr-layout,
.staff-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.qr-layout .form-card,
.staff-layout .form-card {
  position: sticky;
  top: 14px;
}
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.qr-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.qr-card img { width: 180px; height: 180px; margin: 0 auto; image-rendering: crisp-edges; }
.qr-card code { color: var(--muted); overflow-wrap: anywhere; }
.qr-card footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qr-card footer a,
.qr-card footer button {
  flex: 1 1 96px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
.qr-card footer a.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.qr-card footer a:not(.primary):hover,
.qr-card footer button:hover {
  border-color: rgba(31, 122, 90, .32);
  background: rgba(31, 122, 90, .06);
}

.modal { border: 0; border-radius: var(--radius); padding: 0; background: transparent; }
.modal::backdrop { background: rgba(0,0,0,.32); }
.modal-close { position: absolute; right: 12px; top: 12px; width: 34px; min-height: 34px; padding: 0; }
.payment-modal .form-card {
  width: min(620px, calc(100vw - 28px));
}
.product-detail-modal .form-card {
  width: min(520px, calc(100vw - 28px));
}
.support-modal .form-card {
  width: min(620px, calc(100vw - 28px));
}
.support-source {
  border: 1px solid rgba(31, 122, 90, .22);
  border-radius: var(--radius);
  background: rgba(31, 122, 90, .07);
  padding: 12px;
  display: grid;
  gap: 4px;
}
.support-source span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}
.support-source strong {
  color: var(--brand);
}
.support-history {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.support-history .panel-head {
  margin-bottom: 8px;
}
.support-history h3 {
  margin: 4px 0 0;
}
.support-history-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}
.support-request-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 10px;
}
.support-request-row header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.support-request-row small {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin-top: 6px;
}
.support-request-row p {
  margin: 8px 0 0;
  max-height: 4.8em;
  overflow: auto;
}
.management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.management-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.82);
  padding: 16px;
}
.management-card h3 {
  font-size: 1.28rem;
  margin-bottom: 12px;
}
.management-wide {
  grid-column: 1 / -1;
}
.management-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.management-profit-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.management-stats article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
}
.profit-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
  min-width: 0;
}
.management-stats span,
.management-row small,
.profit-card span {
  color: var(--muted);
  font-weight: 800;
}
.management-stats strong,
.profit-card strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.profit-card.is-positive strong {
  color: var(--brand);
}
.profit-card.is-negative {
  border-color: rgba(179,66,53,.36);
  background: rgba(179,66,53,.06);
}
.profit-card.is-negative strong,
.profit-card.is-expense strong {
  color: var(--danger);
}
.management-card h4 {
  font-size: 1rem;
  margin: 8px 0 10px;
}
.expense-distribution-row > b {
  box-shadow: 0 0 0 4px rgba(31,122,90,.08);
}
.management-list {
  display: grid;
  gap: 8px;
}
.expense-screen {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.expense-layout {
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.expense-layout.is-waiter {
  grid-template-columns: minmax(0, 620px);
}
.expense-form {
  align-self: start;
}
.expense-form-grid,
.expense-admin-grid,
.expense-summary-grid,
.compact-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.expense-form-grid,
.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.expense-wide-field {
  grid-column: 1 / -1;
}
.expense-admin-grid {
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
}
.expense-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.expense-summary-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  background: rgba(255,255,255,.84);
  min-width: 0;
}
.expense-summary-grid span,
.expense-summary-grid small {
  color: var(--muted);
  font-weight: 800;
}
.expense-summary-grid strong {
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.expense-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, .8fr)) minmax(150px, 1fr) minmax(130px, .9fr) minmax(190px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.76);
  padding: 12px;
  min-width: 0;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.expense-list,
.expense-category-list {
  display: grid;
  gap: 10px;
}
.expense-list-card {
  min-width: 0;
}
.expense-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.expense-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.82);
  padding: 12px;
  min-width: 0;
}
.expense-row-main {
  min-width: 0;
}
.expense-row header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
}
.expense-row header span {
  color: var(--brand);
  font-weight: 950;
  white-space: nowrap;
}
.expense-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.expense-meta span {
  border-radius: 999px;
  background: rgba(31,122,90,.08);
  color: var(--brand);
  font-size: .76rem;
  font-weight: 850;
  padding: 4px 8px;
}
.expense-row p,
.expense-row small,
.expense-category-row small {
  color: var(--muted);
  margin: 6px 0 0;
}
.expense-detail {
  margin-top: 7px;
}
.expense-detail summary {
  color: var(--brand);
  cursor: pointer;
  font-weight: 850;
}
.expense-detail p {
  max-height: 6.2em;
  overflow: auto;
}
.expense-row footer,
.expense-category-row footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
.expense-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 999px;
  margin-top: 5px;
  box-shadow: 0 0 0 4px rgba(31,122,90,.08);
}
.expense-category-card {
  min-width: 0;
}
.expense-category-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.82);
  padding: 12px;
  min-width: 0;
}
.expense-category-row footer {
  grid-column: 2 / -1;
  justify-content: flex-start;
}
.empty-state {
  border: 1px dashed rgba(39,37,34,.22);
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 800;
  padding: 14px;
  text-align: center;
  background: rgba(255,255,255,.52);
}
.management-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
}
.management-row > b {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: rgba(31,122,90,.1);
  color: var(--brand);
}
.management-row.is-danger > b {
  background: rgba(179,66,53,.1);
  color: var(--danger);
}
.management-row strong,
.management-row small {
  display: block;
}
.management-row > span {
  font-weight: 900;
  white-space: nowrap;
}
.table-detail-modal .form-card {
  width: min(760px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  overflow: auto;
}
.table-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.table-detail-summary article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 10px;
}
.table-detail-summary span {
  color: var(--muted);
  display: block;
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
}
.table-detail-summary strong {
  display: block;
  margin-top: 4px;
}
.table-detail-list {
  display: grid;
  gap: 10px;
}
.table-detail-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px;
}
.table-detail-row header,
.table-detail-row footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.table-detail-row p {
  margin: 4px 0 0;
}
.table-detail-row ul {
  color: var(--muted);
  margin: 10px 0;
  padding-left: 18px;
}
.table-detail-row li strong,
.table-detail-row footer strong {
  color: var(--ink);
}
.product-detail-modal img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: #ebe5d8;
}
.product-detail-modal h2 {
  margin-bottom: 0;
}
.product-detail-modal .rich-content {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}
.rich-content p {
  color: var(--ink);
  margin: 0 0 10px;
}
.rich-content a {
  color: var(--brand);
  font-weight: 900;
  text-decoration: underline;
}
.payment-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.payment-modes .is-active {
  border-color: var(--brand);
  color: var(--brand);
}
.payment-summary,
.payment-change {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.payment-summary span,
.payment-change span {
  color: var(--muted);
  font-weight: 800;
}
.payment-summary span {
  display: grid;
  gap: 4px;
}
.payment-summary b {
  color: var(--muted);
}
.payment-summary small {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}
.payment-summary strong,
.payment-change strong {
  font-size: 1.45rem;
}
.payment-change {
  background: rgba(31, 122, 90, .08);
  border-color: rgba(31, 122, 90, .24);
}
.payment-change.is-change {
  background: rgba(31, 122, 90, .1);
  border-color: rgba(31, 122, 90, .34);
  color: var(--brand);
}
.payment-change.is-change span,
.payment-change.is-change strong {
  color: var(--brand);
}
.payment-change.is-short {
  background: rgba(179, 66, 53, .09);
  border-color: rgba(179, 66, 53, .36);
  color: var(--danger);
}
.payment-change.is-short span,
.payment-change.is-short strong {
  color: var(--danger);
}
.split-panel,
.pending-settlement,
.full-bill-panel,
.order-log-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
  padding: 12px;
}
.pending-settlement {
  border-color: rgba(217, 154, 43, .28);
  background: rgba(217, 154, 43, .07);
}
.split-panel .panel-head,
.pending-settlement .panel-head,
.full-bill-panel .panel-head,
.order-log-panel .panel-head {
  margin-bottom: 10px;
}
.split-panel h3,
.pending-settlement h3,
.full-bill-panel h3,
.order-log-panel h3 {
  margin: 4px 0 0;
}
.split-list,
.pending-settlement-list,
.full-bill-list,
.order-log-list {
  display: grid;
  gap: 8px;
  max-height: min(38vh, 360px);
  overflow: auto;
}
.order-log-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.order-log-total {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 10px;
  display: grid;
  gap: 6px;
}
.order-log-total .badge {
  width: fit-content;
}
.order-log-total small {
  color: var(--muted);
  font-weight: 800;
}
.split-row,
.settlement-row,
.bill-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 10px;
}
.split-row p,
.settlement-row p,
.bill-detail-row p {
  margin: 4px 0 0;
}
.split-row .stepper,
.settlement-row .stepper {
  justify-content: flex-end;
}
.order-log-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 10px;
}
.order-log-row header,
.order-log-row footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.order-log-row p {
  margin: 4px 0 0;
}
.order-log-row ul {
  margin: 10px 0;
  padding-left: 18px;
  color: var(--muted);
}
.order-log-row li strong {
  color: var(--ink);
}
.order-log-row footer {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(380px, calc(100% - 36px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast[hidden] {
  display: none;
}
.toast-item {
  position: relative;
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  padding: 14px 46px 14px 16px;
  box-shadow: var(--shadow);
  font-weight: 800;
  display: grid;
  gap: 8px;
  pointer-events: auto;
}
.toast-item span {
  font-weight: 700;
}
.toast-item button {
  width: fit-content;
  min-height: 38px;
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.14);
  color: white;
  padding: 0 12px;
}
.toast-item .toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: rgba(255,255,255,.35);
}
.toast-item.is-alert {
  background: var(--brand);
  color: white;
  border: 2px solid rgba(255, 255, 255, .82);
  box-shadow: 0 18px 60px rgba(31, 122, 90, .34);
  animation: toast-pulse 1s ease-in-out infinite;
}
@keyframes toast-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.touch-mode button,
.touch-mode .top-actions a,
.touch-mode input,
.touch-mode select,
.touch-mode textarea {
  min-height: 52px;
  font-size: 1rem;
}
.touch-mode .toast-item button {
  min-height: 38px;
}
.touch-mode .toast-item .toast-close {
  min-height: 30px;
}
.touch-mode .panel-actions a,
.touch-mode .panel-actions button {
  min-height: 40px;
  font-size: .95rem;
}
.touch-mode .icon-button {
  width: 52px;
}
.touch-mode .table-card {
  gap: 12px;
  padding: 16px;
}
.touch-mode .table-card footer,
.touch-mode .preview-product footer {
  gap: 10px;
}
.touch-mode .product-card .body {
  gap: 10px;
  padding: 14px;
}
.touch-mode .cart-panel textarea {
  min-height: 104px;
  resize: vertical;
}
.touch-mode .cart-panel .primary {
  min-height: 54px;
  font-size: 1rem;
}

.customer-page { background: var(--bg); }
.customer-shell { width: min(980px, calc(100% - 24px)); margin: 0 auto; padding: 18px 0 120px; }
.customer-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(247,243,234,.92);
  backdrop-filter: blur(14px);
  padding: 12px 0;
}
.customer-top h1 { font-size: clamp(2rem, 9vw, 4.2rem); }
.customer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.waiter-call-button {
  border-color: #c58a2a;
  background: #fff7e8;
  color: #8a5a12;
}
.waiter-call-button:not(:disabled):hover {
  border-color: #a66b12;
  color: #6f4509;
}
.waiter-call-button:disabled {
  opacity: .72;
  cursor: not-allowed;
}
.customer-notice {
  border: 1px solid rgba(31, 122, 90, .24);
  border-radius: var(--radius);
  background: rgba(31, 122, 90, .09);
  color: var(--brand);
  font-weight: 900;
  margin: 0 0 12px;
  padding: 10px 12px;
}
.customer-notice.is-error {
  border-color: rgba(183, 48, 48, .28);
  background: rgba(183, 48, 48, .08);
  color: #b73030;
}
.customer-demo-note {
  color: var(--muted);
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.customer-demo-note textarea {
  min-height: 86px;
  resize: vertical;
}
.cart-button strong,
.history-button strong {
  border-radius: 999px;
  background: var(--brand);
  color: white;
  min-width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
}
.history-button.is-active {
  border-color: var(--brand);
  color: var(--brand);
}
.sticky {
  position: sticky;
  top: 86px;
  z-index: 9;
  background: rgba(247,243,234,.92);
  backdrop-filter: blur(14px);
}
.locked-card { padding: 22px; margin: 18px 0; }
.preview-banner {
  border: 1px solid rgba(31, 122, 90, .24);
  border-radius: var(--radius);
  background: rgba(31, 122, 90, .08);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 12px 14px;
}
.preview-banner strong {
  color: var(--brand);
}
.preview-banner span {
  color: var(--muted);
  font-weight: 800;
}
.table-orders {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, .88);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 12px 0 16px;
}
.table-orders-head,
.bill-list li,
.table-order-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.table-orders-head h2 {
  margin: 4px 0 0;
}
.table-orders-head > strong {
  color: var(--brand);
  font-size: 1.5rem;
}
.bill-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 14px 0;
  padding: 0;
}
.bill-list li {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 10px 12px;
}
.table-order-list {
  display: grid;
  gap: 8px;
}
.table-order-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 12px;
}
.pending-orders,
.delivered-bill,
.order-history {
  margin-top: 14px;
}
.pending-orders h3,
.delivered-bill h3,
.order-history h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.bill-list.is-pending li {
  border-color: rgba(217, 154, 43, .36);
  background: rgba(217, 154, 43, .08);
}
.table-order-card.is-pending {
  border-color: rgba(217, 154, 43, .38);
  background: rgba(217, 154, 43, .08);
}
.table-order-card.is-pending header span {
  background: rgba(217, 154, 43, .16);
  color: #8a5d13;
}
.table-order-card header span {
  border-radius: 999px;
  background: rgba(31, 122, 90, .1);
  color: var(--brand);
  font-size: .74rem;
  font-weight: 900;
  padding: 5px 8px;
}
.table-order-card ul {
  color: var(--muted);
  margin: 10px 0 0;
  padding-left: 18px;
}
.customer-cart {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--panel);
  box-shadow: -18px 0 50px rgba(39,37,34,.16);
  transform: translateX(102%);
  transition: transform .2s ease;
  z-index: 40;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px;
}
.customer-cart.is-open { transform: translateX(0); }
.customer-cart [data-cart-items] { overflow: auto; }
.customer-cart footer {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 12px;
}
.customer-cart footer strong { font-size: 1.5rem; }

@media (max-width: 1080px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace, .pos-layout, .settings-grid, .qr-layout, .staff-layout, .management-grid, .expense-layout, .expense-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .side-panel, .cart-panel, .qr-layout .form-card, .staff-layout .form-card { position: static; }
  .management-wide { grid-column: auto; }
}

@media (max-width: 768px) {
  body.touch-mode { overflow-x: hidden; }
  .stats-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }
  .stats-row article {
    min-width: 0;
    padding: 10px 6px;
  }
  .stats-row span,
  .stats-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .stats-row span {
    font-size: .62rem;
    letter-spacing: 0;
  }
  .stats-row strong {
    font-size: clamp(.95rem, 4.5vw, 1.35rem);
    margin-top: 5px;
  }
  .workspace,
  .main-panel,
  .side-panel,
  .pos-layout,
  .pos-layout > *,
  .pos-products,
  .category-pills,
  .cart-panel,
  .tabs,
  .expense-screen,
  .expense-layout,
  .expense-form,
  .expense-list-card,
  .expense-admin-grid,
  .order-columns {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .main-panel { order: 1; }
  .side-panel { order: 2; }
  .tabs { flex-wrap: wrap; }
  .admin-menu-tab,
  .admin-extra-tab { display: none; }
  .management-menu {
    display: block;
    flex: 1 1 132px;
    min-width: 0;
  }
  .management-menu > summary.tab {
    width: 100%;
  }
  .pos-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    overflow-x: hidden;
  }
  .pos-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-pills {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }
  .product-card {
    min-width: 0;
  }
  .product-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }
  .cart-panel {
    position: static;
    overflow-x: hidden;
  }
  .cart-row,
  .cart-row footer,
  .stepper {
    min-width: 0;
    max-width: 100%;
  }
  [data-panel="menu"] .settings-grid,
  [data-category-form],
  [data-product-form] {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-panel="menu"] .form-card {
    padding: 12px;
  }
  [data-category-form] > button,
  [data-product-form] > button {
    justify-self: stretch;
  }
  .rich-editor {
    min-height: 118px;
  }
  .order-columns {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }
  .order-column {
    width: 100%;
    min-height: auto;
    min-width: 0;
    box-sizing: border-box;
  }
  .order-column > p {
    margin-bottom: 0;
  }
  .expense-filters,
  .compact-form,
  .expense-form-grid,
  .expense-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .expense-row,
  .expense-category-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .expense-row footer,
  .expense-category-row > .badge,
  .expense-category-row footer {
    grid-column: 2;
    justify-self: flex-start;
  }
  .expense-row header {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .app-shell { width: min(100% - 18px, 1480px); padding-top: 12px; }
  .topbar, .panel-head { align-items: flex-start; flex-direction: column; }
  .panel-actions { justify-content: flex-start; width: 100%; }
  .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    gap: 6px;
  }
  .tabs > .tab,
  .management-menu > summary.tab {
    width: 100%;
    min-height: 38px;
    padding: 0 6px;
    font-size: .78rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .side-panel, .main-panel { padding: 12px; }
  .catalog-row { grid-template-columns: 64px minmax(0, 1fr); }
  .catalog-row button { grid-column: 1 / -1; }
  .staff-row { grid-template-columns: 1fr; }
  .payment-modes,
  .order-log-summary,
  .management-stats,
  .management-profit-stats,
  .management-row,
  .table-detail-summary,
  .split-row,
  .settlement-row,
  .bill-detail-row { grid-template-columns: 1fr; }
  .table-orders-head,
  .bill-list li,
  .table-order-card header,
  .table-detail-row header,
  .table-detail-row footer,
  .order-log-row header,
  .order-log-row footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .preview-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .pos-products, .menu-products { grid-template-columns: minmax(0, 1fr); }
  .management-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
  }
  .management-row > b {
    width: 36px;
    min-height: 36px;
    align-self: flex-start;
  }
  .management-row > span {
    grid-column: 2;
    justify-self: flex-start;
    white-space: normal;
  }
}
