:root {
  color-scheme: light;
  --ink: #12231d;
  --muted: #62736c;
  --line: #dce7e2;
  --surface: #ffffff;
  --canvas: #f3f7f5;
  --brand: #087a55;
  --brand-dark: #075d43;
  --brand-soft: #e6f5ef;
  --danger: #a72c31;
  --danger-soft: #fff0f0;
  --success: #176447;
  --success-soft: #eaf7f0;
  --shadow: 0 24px 70px rgba(18, 35, 29, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
a { color: var(--brand-dark); font-weight: 700; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(8, 122, 85, 0.28);
  outline-offset: 2px;
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 15%, rgba(48, 182, 132, 0.22), transparent 28rem),
    linear-gradient(135deg, #eff8f4 0%, #f8fbfa 56%, #edf4f1 100%);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(22rem, 31rem);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  width: min(68rem, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 3rem 0;
}

.auth-brand { display: flex; align-items: center; gap: 1.25rem; }
.auth-brand strong { display: block; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.045em; }
.auth-brand p { max-width: 22rem; margin: 0.35rem 0 0; color: var(--muted); font-size: 1.08rem; }

.brand-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 4.4rem;
  height: 4.4rem;
  place-items: center;
  border-radius: 1.25rem;
  color: white;
  background: var(--brand);
  box-shadow: 0 14px 34px rgba(8, 122, 85, 0.25);
  font-size: 2rem;
  font-weight: 900;
}

.brand-mark-small { width: 2.35rem; height: 2.35rem; border-radius: 0.7rem; font-size: 1rem; }

.auth-card, .welcome-card {
  border: 1px solid rgba(220, 231, 226, 0.9);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-card { padding: clamp(1.6rem, 4vw, 2.5rem); }
.auth-card header { margin-bottom: 1.5rem; }
.auth-card h1, .welcome-card h1 { margin: 0.15rem 0 0.5rem; font-size: clamp(1.85rem, 4vw, 2.35rem); line-height: 1.1; letter-spacing: -0.035em; }
.auth-card header > p:last-child, .welcome-card > p { margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--brand); font-size: 0.78rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }

.form-stack { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.42rem; }
.field label { font-weight: 750; }
.field small { color: var(--muted); }
.field input {
  width: 100%;
  min-height: 3.2rem;
  border: 1px solid #b9c9c2;
  border-radius: 0.75rem;
  padding: 0.72rem 0.9rem;
  color: var(--ink);
  background: white;
}
.field input:hover { border-color: #79968a; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(8, 122, 85, 0.1); outline: none; }

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.78rem;
  padding: 0.7rem 1.15rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { margin-top: 0.25rem; color: white; background: var(--brand); box-shadow: 0 10px 20px rgba(8, 122, 85, 0.18); }
.button-primary:hover { background: var(--brand-dark); }
.button-ghost { min-height: 2.55rem; color: var(--ink); background: transparent; }
.button-ghost:hover { background: var(--brand-soft); }
.button-secondary { border: 1px solid var(--line); color: var(--ink); background: white; }
.button-secondary:hover { border-color: #9bb0a7; background: var(--canvas); }
.button-ghost-danger { color: var(--danger); background: transparent; }
.button-ghost-danger:hover { background: var(--danger-soft); }
.button-disabled { margin-top: 1.5rem; color: #64766e; background: #e8efec; cursor: default; }

.auth-switch { margin: 1.5rem 0 0; color: var(--muted); text-align: center; }
.alert { margin: 0 0 1.15rem; border: 1px solid; border-radius: 0.75rem; padding: 0.8rem 0.95rem; font-weight: 650; }
.alert-error { border-color: #efb8ba; color: var(--danger); background: var(--danger-soft); }
.alert-success { border-color: #b7dec9; color: var(--success); background: var(--success-soft); }
.alert-with-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.app-layout { display: grid; grid-template-columns: 16rem minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; border-right: 1px solid var(--line); padding: 1.25rem 1rem; background: #102c23; }
.sidebar-brand { margin: 0 0.5rem 2.25rem; }
.main-nav { display: grid; gap: 0.35rem; }
.nav-link { display: flex; min-height: 3rem; align-items: center; gap: 0.75rem; border-radius: 0.75rem; padding: 0.72rem 0.85rem; color: #d9ebe4; font-weight: 750; text-decoration: none; }
.nav-link small { margin-left: auto; color: #88a89c; font-size: 0.66rem; font-weight: 650; }
.nav-link:not(.nav-disabled):hover, .nav-link.nav-active { color: white; background: rgba(255,255,255,0.12); }
.nav-disabled { color: #809b91; cursor: default; }
.app-workspace { min-width: 0; }
.app-header {
  display: flex;
  min-height: 4.8rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem clamp(1.25rem, 4vw, 3.5rem);
  background: var(--surface);
}
.mobile-nav { display: none; }
.brand-link { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); font-size: 1.1rem; text-decoration: none; }
.sidebar .sidebar-brand { color: white; }
.app-header .mobile-brand { display: none; }
.user-menu { display: flex; align-items: center; gap: 1rem; color: var(--muted); }
.content-shell { width: min(72rem, calc(100% - 3rem)); margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) 0; }
.welcome-card { max-width: 46rem; padding: clamp(1.75rem, 5vw, 3.5rem); }
.dashboard-welcome { max-width: none; }
.button-inline { width: auto; margin-top: 1.5rem; }
.setup-steps { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 1.25rem; padding: clamp(1.25rem, 4vw, 2rem); background: white; box-shadow: 0 16px 48px rgba(18,35,29,0.07); }
.setup-steps .section-heading { margin-bottom: 1rem; }
.setup-steps .section-heading h2 { margin-top: 0.2rem; font-size: 1.35rem; }
.setup-steps ol { display: grid; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }
.setup-step { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 0.85rem; padding: 0.85rem 1rem; }
.setup-step > span { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: 50%; color: var(--brand-dark); background: var(--brand-soft); font-weight: 900; }
.setup-step.is-complete > span { color: white; background: var(--brand); }
.setup-step p { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.86rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.page-heading h1 { margin: 0.15rem 0 0.35rem; font-size: clamp(2rem, 4vw, 2.7rem); letter-spacing: -0.04em; }
.page-heading p:last-child { margin: 0; color: var(--muted); }
.settings-card { overflow: hidden; border: 1px solid var(--line); border-radius: 1.25rem; background: white; box-shadow: 0 16px 48px rgba(18,35,29,0.08); }
.form-section { display: grid; grid-template-columns: minmax(12rem, 0.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-section + .form-section { border-top: 1px solid var(--line); }
.section-heading h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field-wide { grid-column: 1 / -1; }
.field textarea { width: 100%; resize: vertical; border: 1px solid #b9c9c2; border-radius: 0.75rem; padding: 0.8rem 0.9rem; color: var(--ink); background: white; font: inherit; }
.field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(8,122,85,0.1); outline: none; }
.logo-field { display: grid; grid-template-columns: 6rem minmax(0, 1fr); align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.logo-field > small { grid-column: 2; color: var(--muted); }
.logo-placeholder, .logo-preview { display: grid; width: 6rem; height: 6rem; place-items: center; overflow: hidden; border: 1px dashed #a9bcb4; border-radius: 1rem; color: var(--muted); background: var(--canvas); font-size: 0.8rem; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-field label:not(.checkbox-row) { display: block; margin-bottom: 0.5rem; font-weight: 750; }
.logo-field input[type="file"] { max-width: 100%; }
.logo-field input[type="file"]::file-selector-button { border: 0; border-radius: 0.55rem; margin-right: 0.65rem; padding: 0.6rem 0.75rem; color: var(--brand-dark); background: var(--brand-soft); font-weight: 750; cursor: pointer; }
.checkbox-row { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.8rem; color: var(--danger); font-size: 0.9rem; font-weight: 650; }
.checkbox-row input { width: 1rem; height: 1rem; }
.form-actions { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding: 1.25rem clamp(1.5rem, 4vw, 2.5rem); background: #f8fbfa; }
.product-list { display: grid; gap: 0.75rem; }
.product-row { display: grid; grid-template-columns: minmax(12rem, 1fr) 7rem 5rem auto; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.15rem; background: white; }
.product-inactive { opacity: 0.68; }
.product-main { display: grid; }
.product-main strong { font-size: 1.05rem; }
.product-main span { color: var(--muted); font-size: 0.88rem; }
.product-price { font-size: 1.12rem; text-align: right; }
.status-badge { border-radius: 999px; padding: 0.3rem 0.55rem; font-size: 0.76rem; font-weight: 800; text-align: center; }
.status-active { color: var(--success); background: var(--success-soft); }
.status-inactive { color: var(--muted); background: #e8efec; }
.product-actions { display: flex; align-items: center; gap: 0.35rem; }
.empty-state { display: grid; min-height: 24rem; place-items: center; align-content: center; border: 1px dashed #b4c8bf; border-radius: 1.25rem; padding: 2rem; text-align: center; background: rgba(255,255,255,0.6); }
.empty-state h2 { margin: 0.75rem 0 0; }
.empty-state p { margin: 0.35rem 0 1rem; color: var(--muted); }
.empty-icon { display: grid; width: 3.5rem; height: 3.5rem; place-items: center; border-radius: 1rem; color: var(--brand); background: var(--brand-soft); font-size: 1.5rem; }
.back-link { display: inline-block; margin-bottom: 1rem; text-decoration: none; }
.product-form { max-width: 48rem; padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem) 0; }
.product-form .form-actions { margin: 2rem clamp(-2.5rem, -4vw, -1.5rem) 0; gap: 0.75rem; }
.field select { width: 100%; min-height: 3.2rem; border: 1px solid #b9c9c2; border-radius: 0.75rem; padding: 0.72rem 0.9rem; color: var(--ink); background: white; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 2.5rem; }
.input-suffix span { position: absolute; top: 50%; right: 1rem; transform: translateY(-50%); color: var(--muted); font-weight: 750; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pos-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(21rem, 28rem); min-height: calc(100vh - 4.8rem); }
.pos-catalog { min-width: 0; padding: clamp(1.25rem, 3vw, 2.5rem); }
.pos-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.pos-heading h1 { margin: 0.1rem 0 0; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1; }
.pos-count { color: var(--muted); font-size: 0.9rem; }
.category-filter { display: flex; gap: 0.5rem; overflow-x: auto; margin-bottom: 1.25rem; padding-bottom: 0.25rem; }
.category-chip { flex: 0 0 auto; min-height: 2.6rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 0.9rem; color: var(--muted); background: white; font-weight: 750; cursor: pointer; }
.category-chip.is-active { border-color: var(--brand); color: white; background: var(--brand); }
.pos-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.85rem; }
.pos-product { display: grid; min-height: 9rem; align-content: space-between; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; color: var(--ink); background: white; text-align: left; box-shadow: 0 8px 24px rgba(18,35,29,0.05); cursor: pointer; touch-action: manipulation; }
.pos-product:hover { border-color: #91b6a6; transform: translateY(-1px); box-shadow: 0 12px 28px rgba(18,35,29,0.1); }
.pos-product:active { transform: scale(0.98); background: var(--brand-soft); }
.pos-product-name { font-size: 1.05rem; font-weight: 850; }
.pos-product-category { align-self: end; color: var(--muted); font-size: 0.8rem; }
.pos-product strong { color: var(--brand-dark); font-size: 1.3rem; }
.current-sale { position: sticky; top: 0; display: flex; height: calc(100vh - 4.8rem); flex-direction: column; border-left: 1px solid var(--line); background: white; }
.current-sale > header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 1.25rem; }
.current-sale h2 { margin: 0.1rem 0 0; }
.clear-sale { border: 0; color: var(--danger); background: transparent; font-weight: 750; cursor: pointer; }
.cart-empty { display: grid; flex: 1; place-items: center; align-content: center; padding: 2rem; color: var(--muted); text-align: center; }
.cart-empty[hidden] { display: none; }
.cart-empty div { display: grid; width: 3.5rem; height: 3.5rem; place-items: center; border-radius: 1rem; margin-bottom: 0.8rem; color: var(--brand); background: var(--brand-soft); font-size: 1.5rem; }
.cart-empty p { margin: 0.25rem 0; }
.cart-lines { flex: 1; overflow-y: auto; padding: 0 1.25rem; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 0.65rem; border-bottom: 1px solid var(--line); padding: 1rem 0; }
.cart-line-info { display: grid; min-width: 0; }
.cart-line-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line-info span { color: var(--muted); font-size: 0.8rem; }
.quantity-control { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 0.65rem; overflow: hidden; }
.quantity-control button { width: 2.75rem; height: 2.75rem; border: 0; color: var(--brand-dark); background: var(--brand-soft); font-size: 1.2rem; font-weight: 850; cursor: pointer; }
.quantity-control span { min-width: 1.8rem; text-align: center; font-weight: 800; }
.cart-line-total { min-width: 4.2rem; text-align: right; }
.remove-line { width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; color: var(--danger); background: transparent; font-size: 1.25rem; cursor: pointer; }
.sale-total { border-top: 1px solid var(--line); padding: 1.25rem; background: #f8fbfa; }
.sale-total > div { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.85rem; }
.sale-total > div span { font-size: 1.05rem; font-weight: 750; }
.sale-total > div strong { font-size: 1.75rem; }
.checkout-button { width: 100%; min-height: 3.6rem; color: white; background: var(--brand); font-size: 1.05rem; }
.checkout-button:disabled { color: #708078; background: #dfe8e4; box-shadow: none; cursor: not-allowed; }
.sale-total small { display: block; margin-top: 0.65rem; color: var(--muted); text-align: center; }
.pos-empty { min-height: 25rem; }
.ticket-result { max-width: 48rem; }
.ticket-success { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.ticket-success > span { display: grid; width: 3.25rem; height: 3.25rem; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-size: 1.4rem; font-weight: 900; }
.ticket-success h1 { margin: 0.1rem 0 0; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.ticket-paper { width: min(100%, 31rem); margin: 0 auto; border: 1px solid var(--line); border-radius: 0.5rem; padding: clamp(1.25rem, 5vw, 2.5rem); background: white; box-shadow: 0 18px 50px rgba(18,35,29,0.1); }
.ticket-paper > header { padding-bottom: 1.25rem; text-align: center; }
.ticket-logo { display: block; width: auto; max-width: 9rem; height: auto; max-height: 5rem; margin: 0 auto 0.75rem; object-fit: contain; }
.ticket-paper > header h2 { margin: 0 0 0.35rem; font-size: 1.4rem; }
.ticket-paper > header p { margin: 0.1rem 0; color: var(--muted); font-size: 0.9rem; }
.ticket-meta { display: flex; justify-content: space-between; gap: 1rem; border-block: 1px dashed #aebdb7; padding: 0.85rem 0; font-size: 0.9rem; }
.ticket-lines { padding: 0.5rem 0; }
.ticket-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; }
.ticket-line > div { display: grid; }
.ticket-line span { color: var(--muted); font-size: 0.8rem; }
.ticket-totals { border-top: 1px dashed #aebdb7; margin: 0; padding-top: 0.75rem; }
.ticket-totals > div { display: flex; justify-content: space-between; padding: 0.2rem 0; }
.ticket-totals dd { margin: 0; }
.ticket-grand-total { margin-top: 0.5rem; border-top: 2px solid var(--ink); padding-top: 0.65rem !important; font-size: 1.3rem; font-weight: 900; text-transform: uppercase; }
.ticket-tax-note { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.8rem; text-align: center; }
.ticket-footer-text { border-top: 1px dashed #aebdb7; margin: 1rem 0 0; padding-top: 1rem; text-align: center; white-space: pre-line; }
.ticket-result-actions { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }
.ticket-history { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: var(--shadow); }
.ticket-history-head, .ticket-history-row { display: grid; grid-template-columns: 1fr 1.35fr 1fr 1fr auto; gap: 1rem; align-items: center; }
.ticket-history-head { padding: 0.8rem 1.25rem; color: var(--muted); background: #f2f7f5; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.ticket-history-row { border-top: 1px solid var(--line); padding: 1rem 1.25rem; }
.ticket-history-row:first-of-type { border-top: 0; }
.ticket-history-number strong, .ticket-history-total strong { color: var(--ink); font-size: 1.05rem; }
.ticket-history-date time { display: grid; }
.ticket-history-date small { color: var(--muted); font-size: 0.78rem; }
.ticket-history-items { color: var(--muted); }
.mobile-field-label { display: none; }
.mobile-cart-jump { display: none; }

@media print {
  @page { size: 80mm 297mm; margin: 4mm; }
  html, body { width: 72mm; min-width: 0; color: #000; background: #fff; }
  body { margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; }
  .app-layout { display: block; min-height: 0; }
  .sidebar, .app-header, .mobile-nav, .ticket-success, .ticket-result-actions { display: none !important; }
  .app-workspace, .content-shell.ticket-result { width: auto; max-width: none; margin: 0; padding: 0; }
  .ticket-paper { width: auto; margin: 0; border: 0; border-radius: 0; padding: 0; color: #000; box-shadow: none; }
  .ticket-logo { max-width: 42mm; max-height: 22mm; filter: grayscale(1); }
  .ticket-paper > header { padding-bottom: 3mm; }
  .ticket-paper > header h2 { font-size: 14pt; }
  .ticket-paper > header p, .ticket-line span, .ticket-tax-note { color: #000; }
  .ticket-meta { gap: 1mm; border-color: #000; padding: 3mm 0; }
  .ticket-line { break-inside: avoid; gap: 3mm; padding: 2.5mm 0; }
  .ticket-line > strong { flex: 0 0 auto; }
  .ticket-totals { border-color: #000; padding-top: 3mm; }
  .ticket-grand-total { border-color: #000; font-size: 14pt; }
  .ticket-footer-text { border-color: #000; }
}

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; gap: 2rem; width: min(31rem, calc(100% - 1.5rem)); padding: 1.5rem 0; }
  .auth-brand { justify-content: center; text-align: left; }
  .brand-mark { width: 3.4rem; height: 3.4rem; border-radius: 1rem; font-size: 1.5rem; }
  .auth-brand strong { font-size: 1.65rem; }
  .auth-brand p { display: none; }
  .app-layout { display: block; }
  .sidebar { display: none; }
  .app-header { min-height: 4rem; align-items: center; padding: 0.65rem 1rem; }
  .app-header .mobile-brand { display: inline-flex; }
  .user-menu { align-items: flex-end; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; }
  .user-email { display: none; }
  .mobile-nav { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 0.55rem 0.75rem; background: white; }
  .mobile-nav-item { flex: 0 0 auto; border-radius: 0.55rem; padding: 0.55rem 0.75rem; color: var(--muted); font-size: 0.86rem; font-weight: 750; text-decoration: none; }
  .mobile-nav-item.nav-active { color: var(--brand-dark); background: var(--brand-soft); }
  .content-shell { width: min(100% - 1.25rem, 45rem); padding: 1.5rem 0 3rem; }
  .form-section { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .logo-field { grid-template-columns: 5rem minmax(0, 1fr); }
  .logo-placeholder, .logo-preview { width: 5rem; height: 5rem; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
  .page-heading > .button { width: 100%; }
  .product-row { grid-template-columns: 1fr auto; }
  .product-price { grid-column: 2; grid-row: 1; }
  .status-badge { width: max-content; }
  .product-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 0.75rem; }
  .product-actions .button { min-height: 2.7rem; }
  .product-form .form-actions { flex-direction: column-reverse; }
  .product-form .form-actions .button { width: 100%; }
  .dashboard-actions { display: grid; }
  .alert-with-action { align-items: flex-start; flex-direction: column; }
  .setup-step { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .setup-step > a { grid-column: 2; width: max-content; }
  .pos-shell { display: block; }
  .pos-catalog { padding: 1.25rem 0.65rem; }
  .pos-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .pos-product { min-height: 8rem; padding: 0.85rem; }
  .current-sale { position: static; height: auto; min-height: 28rem; border-top: 1px solid var(--line); border-left: 0; }
  .current-sale { scroll-margin-top: 0.75rem; }
  .mobile-cart-jump:not([hidden]) { position: fixed; right: 0.65rem; bottom: 0.65rem; left: 0.65rem; z-index: 20; display: flex; min-height: 3.8rem; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 0.9rem; padding: 0.7rem 1rem; color: white; background: #102c23; box-shadow: 0 12px 30px rgba(18,35,29,0.28); text-decoration: none; }
  .mobile-cart-jump span { display: grid; }
  .mobile-cart-jump small { color: #cce1d8; font-weight: 650; }
  .cart-lines { overflow: visible; }
  .sale-total { position: static; }
  .cart-line { grid-template-columns: minmax(0, 1fr) auto auto; }
  .cart-line-info { grid-column: 1 / -1; }
  .ticket-meta { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .ticket-result-actions { flex-direction: column; }
  .ticket-result-actions .button { width: 100%; }
  .ticket-history { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .ticket-history-head { display: none; }
  .ticket-history-row { grid-template-columns: 1fr 1fr; gap: 0.85rem 1rem; margin-bottom: 0.75rem; border: 1px solid var(--line); border-radius: 0.8rem; padding: 1rem; background: white; }
  .ticket-history-row:first-of-type { border-top: 1px solid var(--line); }
  .ticket-history-row .button { grid-column: 1 / -1; width: 100%; }
  .ticket-history-items, .ticket-history-total { display: grid; }
  .mobile-field-label { display: block; margin-bottom: 0.15rem; color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .app-layout { grid-template-columns: 12.5rem minmax(0, 1fr); }
  .sidebar { padding-inline: 0.65rem; }
  .pos-shell { grid-template-columns: minmax(0, 1fr) 21rem; }
  .pos-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart-line { grid-template-columns: minmax(0, 1fr) auto auto; }
  .cart-line-info { grid-column: 1 / -1; }
}
