@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --forest: #1e3a2f;
  --forest-mid: #2d5243;
  --sage: #4a7c5f;
  --sage-light: #7aab8a;
  --cream: #f7f3ec;
  --cream-warm: #ede7da;
  --sand: #d4c5a9;
  --terracotta: #b5673b;
  --terracotta-deep: #8f4e2b;
  --gold: #c9a84c;
  --gold-light: #e8d08a;
  --ink: #1a1a18;
  --ink-soft: #5a5a52;
  --surface: #ffffff;
  --line: rgba(74, 124, 95, 0.18);
  --line-warm: rgba(212, 197, 169, 0.6);
  --shadow-sm: 0 2px 8px rgba(30, 58, 47, 0.08);
  --shadow-md: 0 8px 24px rgba(30, 58, 47, 0.12);
  --shadow-lg: 0 20px 48px rgba(30, 58, 47, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 5% 0%, rgba(74,124,95,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 95% 100%, rgba(181,103,59,0.1) 0%, transparent 45%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234a7c5f' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

/* ---- ACCESS LOCK ---- */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 14% 12%, rgba(74,124,95,0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 86% 84%, rgba(181,103,59,0.28) 0%, transparent 45%),
    rgba(17, 31, 25, 0.76);
  backdrop-filter: blur(6px);
}

.lock-screen.hidden {
  display: none;
}

.lock-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line-warm);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.lock-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 700;
  margin-bottom: 8px;
}

.lock-card h1 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--forest);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1;
  margin-bottom: 10px;
}

.lock-copy {
  color: var(--ink-soft);
  margin-bottom: 18px;
  font-size: 0.96rem;
}

.lock-form {
  display: grid;
  gap: 10px;
}

.lock-form label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}

.lock-submit {
  width: 100%;
  justify-content: center;
}

.lock-message {
  min-height: 20px;
  margin-top: 10px;
  color: var(--terracotta-deep);
  font-weight: 600;
  font-size: 0.88rem;
}

/* ---- LAYOUT ---- */
.app-layout { display: flex; min-height: 100vh; }

/* ---- SIDEBAR ---- */
.menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 300;
  background: var(--surface);
  border: 1.5px solid var(--line-warm);
  border-radius: var(--radius-xs);
  color: var(--forest);
  cursor: pointer;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.menu-toggle:hover {
  background: var(--cream-warm);
  border-color: var(--sage);
  transform: scale(1.04);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,58,47,0.35);
  z-index: 200;
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block; opacity: 1; }

.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 280px;
  height: 100vh;
  z-index: 250;
  background: var(--forest);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 15%, rgba(122,171,138,0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 85%, rgba(201,168,76,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.sidebar.collapsed { transform: translateX(-100%); }
.sidebar:not(.collapsed) { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(122,171,138,0.2);
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.sidebar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.01em;
}
.sidebar-subtitle {
  font-size: 0.75rem;
  color: var(--sage-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 1px;
}

.menu-close {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xs);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--cream);
  transition: background 0.2s;
  position: relative; z-index: 1;
}
.menu-close:hover { background: rgba(255,255,255,0.14); }

.sidebar-divider {
  height: 1px;
  background: rgba(122,171,138,0.15);
  margin: 8px 24px;
  position: relative; z-index: 1;
}

.sidebar-section-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-light);
  padding: 12px 24px 8px;
  position: relative; z-index: 1;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 14px;
  flex: 1;
  position: relative; z-index: 1;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: rgba(247,243,236,0.85);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.97rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}
.sidebar-btn .btn-icon {
  font-size: 1.15rem;
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-btn:hover {
  background: rgba(122,171,138,0.18);
  color: var(--cream);
  transform: translateX(3px);
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(122,171,138,0.15);
  position: relative; z-index: 1;
}
.sidebar-footer p {
  font-size: 0.78rem;
  color: var(--sage-light);
  opacity: 0.7;
}

/* ---- CONTENT ---- */
.content-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line-warm);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 0 76px;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-flower {
  font-size: 1.8rem;
  line-height: 1;
  animation: sway 4s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.topbar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.01em;
  line-height: 1;
}
.topbar-subtitle {
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 1px;
}

.topbar-spacer { flex: 1; }

.topbar-date {
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--cream);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line-warm);
}

/* ---- MAIN PAGE ---- */
.page {
  max-width: 900px;
  margin: 36px auto 60px;
  padding: 0 24px;
  width: 100%;
}

/* ---- SALE CARD ---- */
.sale-card {
  background: var(--surface);
  border: 1px solid var(--line-warm);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.sale-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--forest), var(--forest-mid));
  position: relative;
  overflow: hidden;
}
.sale-head::before {
  content: '🌿';
  position: absolute;
  right: -10px; top: -10px;
  font-size: 5rem;
  opacity: 0.08;
  transform: rotate(-20deg);
  pointer-events: none;
}
.sale-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.head-badge {
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.sale-body {
  padding: 28px;
}

/* ---- FIELDS ---- */
.field-block { margin-bottom: 22px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.field-label .lbl-icon { font-size: 1rem; }

select, input[type="text"], input[type="number"] {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid var(--line-warm);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  background: var(--cream);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%235a5a52' d='M8 10.5L3.5 6h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}
select:focus, input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(74,124,95,0.12);
  background: var(--surface);
}

/* ---- ADD PRODUCT ---- */
.add-product {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px dashed var(--sage);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--sage);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.add-product:hover {
  background: rgba(74,124,95,0.08);
  border-color: var(--forest);
  color: var(--forest);
  transform: translateY(-1px);
}
.add-product .plus-icon {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.add-product:hover .plus-icon { transform: rotate(90deg); }

/* ---- PRODUCTS LIST ---- */
.products-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-row {
  display: grid;
  grid-template-columns: 1fr 100px 90px auto;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  background: var(--cream);
  border: 1.5px solid var(--line-warm);
  border-radius: var(--radius-sm);
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  animation: rowIn 0.25s ease both;
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.product-row:hover {
  border-color: var(--sage-light);
  box-shadow: var(--shadow-sm);
}
.product-row .col-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
  font-weight: 600;
}
.input-group { display: flex; flex-direction: column; }

.product-row input[type="text"],
.product-row input[type="number"] {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 0.95rem;
  background: var(--surface);
}

.product-price-display {
  background: var(--forest);
  color: var(--gold-light);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.97rem;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.02em;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-product {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(181,103,59,0.3);
  background: transparent;
  color: var(--terracotta);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.remove-product:hover {
  background: var(--terracotta);
  color: white;
  border-color: var(--terracotta);
  transform: scale(1.1);
}

/* ---- SUMMARY ---- */
.summary {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1.5px solid var(--line-warm);
}

.summary-total-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}

.total-label {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.total-amount-display {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: 0.02em;
  line-height: 1;
}
.total-currency {
  font-size: 1.4rem;
  color: var(--ink-soft);
  margin-right: 2px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  min-height: 50px;
  border-radius: var(--radius-sm);
  border: none;
  padding: 0 28px;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s ease;
  letter-spacing: 0.01em;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--line-warm);
}
.btn-ghost:hover {
  background: var(--cream-warm);
  border-color: var(--sand);
  color: var(--ink);
}

.btn-primary {
  background: var(--forest);
  color: var(--cream);
  box-shadow: 0 4px 16px rgba(30,58,47,0.22);
}
.btn-primary:hover {
  background: var(--forest-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,58,47,0.28);
}
.btn-primary:active { transform: translateY(0); }

.btn-danger {
  background: transparent;
  color: var(--terracotta);
  border: 1.5px solid rgba(181,103,59,0.3);
}
.btn-danger:hover {
  background: rgba(181,103,59,0.08);
  border-color: var(--terracotta);
}

/* ---- MODALS ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,42,35,0.5);
  z-index: 500;
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  width: min(100%, 580px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--forest), var(--forest-mid));
}
.modal-header h2 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--cream);
  font-size: 1.5rem;
  font-weight: 600;
}
.modal-header-icon {
  font-size: 1.3rem;
  margin-right: 8px;
}

.icon-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-xs);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.22); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sand) transparent;
}

.config-section { margin-bottom: 28px; }
.config-section h3 {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-warm);
}

.config-catalog { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.config-item {
  display: grid;
  grid-template-columns: 2fr 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line-warm);
  border-radius: var(--radius-sm);
  background: var(--cream);
  transition: border-color 0.2s;
}
.config-item:hover { border-color: var(--sage-light); }
.config-item input[disabled] {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
  font-size: 0.92rem;
  min-height: 38px;
  padding: 6px 8px;
}
.config-item input:not([disabled]) {
  min-height: 38px;
  padding: 6px 10px;
  font-size: 0.92rem;
}

.cfg-btn {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-xs);
}
.cfg-delete { color: var(--terracotta) !important; border-color: rgba(181,103,59,0.3) !important; }
.cfg-delete:hover { background: rgba(181,103,59,0.08) !important; }

.add-new-product {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 10px;
  align-items: flex-end;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: rgba(74,124,95,0.06);
  border: 1.5px dashed rgba(74,124,95,0.3);
}
.config-field { margin-bottom: 0; }
.config-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.config-field input {
  min-height: 44px;
  padding: 10px 12px;
}

.config-field-inline {
  grid-column: 1 / -1;
  margin-top: -2px;
}

.config-field-inline label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.config-field-inline input[type='checkbox'] {
  min-height: auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--forest);
}

.config-note {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---- HISTORIAL ---- */
.historial-list { display: flex; flex-direction: column; gap: 10px; }
.historial-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
}
.historial-empty .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }

.historial-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line-warm);
  border-radius: var(--radius-sm);
  background: var(--cream);
  transition: all 0.2s ease;
  gap: 12px;
}
.historial-item:hover {
  border-color: var(--sage-light);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.historial-info { flex: 1; }
.fact-num {
  font-weight: 700;
  color: var(--forest);
  font-size: 1rem;
  margin-bottom: 3px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
}
.fact-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.fact-total {
  font-weight: 700;
  color: var(--terracotta);
  font-size: 0.95rem;
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  background: var(--forest);
  color: var(--cream);
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--gold);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ---- RESPONSIVE ---- */
@media (max-width: 700px) {
  .topbar-inner { padding-left: 72px; padding-right: 16px; }
  .topbar-date { display: none; }
  .page { padding: 0 14px; margin-top: 24px; }
  .sale-body { padding: 18px 16px; }
  .sale-head { padding: 16px 18px; }
  .product-row { grid-template-columns: 1fr 80px 70px auto; gap: 8px; padding: 10px 12px; }
  .actions { justify-content: stretch; flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .summary-total-row { flex-direction: column; align-items: flex-end; gap: 6px; }
  .total-amount-display { font-size: 2.2rem; }
  .add-new-product { grid-template-columns: 1fr; }
  .config-item { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .product-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .input-group:first-child { grid-column: 1 / -1; }
}
