:root {
  color-scheme: dark;
  --ink: #eafffb;
  --muted: #8bd9cf;
  --line: rgba(35, 247, 221, 0.32);
  --panel: rgba(6, 22, 20, 0.92);
  --bg: #040908;
  --accent: #00b894;
  --accent-dark: #008f78;
  --danger: #ff4d3f;
  --neon: #23f7dd;
  --orange: #ff8a1f;
  --orange-soft: rgba(255, 138, 31, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(35, 247, 221, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(35, 247, 221, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 10% 0%, rgba(35, 247, 221, 0.16), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(255, 138, 31, 0.12), transparent 24%),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

[hidden] {
  display: none !important;
}

body.booting > * {
  display: none !important;
}

body.booting::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(35, 247, 221, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(35, 247, 221, 0.06) 1px, transparent 1px),
    #040908;
  background-size: 44px 44px;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(35, 247, 221, 0.15), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 130, 24, 0.15), transparent 34%),
    #020b0a;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  border: 1px solid rgba(35, 247, 221, 0.7);
  border-radius: 9px;
  padding: 26px;
  background:
    linear-gradient(90deg, rgba(35, 247, 221, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(35, 247, 221, 0.08) 1px, transparent 1px),
    rgba(2, 11, 10, 0.94);
  background-size: 36px 36px;
  box-shadow: 0 0 34px rgba(35, 247, 221, 0.24);
}

.login-card h1 {
  margin: 4px 0 22px;
  font-size: clamp(30px, 5vw, 44px);
}

.login-card label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #8ffff3;
  font-weight: 900;
}

.login-card input {
  min-height: 42px;
}

.login-card button {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
}

.login-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--orange);
  font-weight: 900;
}

.logout-button {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 95;
  min-height: 36px;
  max-width: min(190px, calc(100vw - 32px));
  padding: 0 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 72, 72, 0.92);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 72, 72, 0.28), transparent 44%),
    linear-gradient(180deg, rgba(104, 10, 14, 0.98), rgba(35, 2, 5, 0.98));
  color: #fff;
  box-shadow:
    0 0 18px rgba(255, 72, 72, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.logout-button:hover {
  border-color: #ffb4b4;
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 72, 72, 0.5);
}

.session-greeting {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 95;
  max-width: min(360px, calc(100vw - 220px));
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(35, 247, 221, 0.7);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(35, 247, 221, 0.2), transparent 54%),
    rgba(2, 18, 16, 0.96);
  color: #eafffb;
  box-shadow: 0 0 18px rgba(35, 247, 221, 0.24);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid rgba(35, 247, 221, 0.45);
  border-radius: 6px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(0, 184, 148, 0.94), rgba(0, 116, 99, 0.94));
  color: #f4fffd;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(35, 247, 221, 0.18);
}

button:hover {
  background: var(--accent-dark);
  box-shadow: 0 0 18px rgba(35, 247, 221, 0.32);
}

button.secondary {
  border: 1px solid rgba(35, 247, 221, 0.38);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

button.secondary:hover {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(35, 247, 221, 0.08);
}

.danger-main {
  border-color: rgba(255, 77, 63, 0.78);
  background: linear-gradient(180deg, rgba(255, 77, 63, 0.92), rgba(155, 24, 19, 0.94));
  box-shadow: 0 0 18px rgba(255, 77, 63, 0.28);
}

.danger-main:hover {
  background: #b42318;
  box-shadow: 0 0 24px rgba(255, 77, 63, 0.42);
}

.purchase-main {
  border: 2px solid #fff;
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.96), rgba(0, 135, 72, 0.96));
  color: #04100d;
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.35);
}

.purchase-main:hover {
  background: #00c46b;
  color: #fff;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.48);
}

.profit-main {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 6px 16px;
  border: 1px solid rgba(0, 255, 136, 0.9);
  background: linear-gradient(180deg, rgba(0, 136, 74, 0.78), rgba(0, 54, 34, 0.88));
  color: #dfffee;
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.28);
}

.profit-main:hover {
  border-color: #dfffee;
  background: linear-gradient(180deg, rgba(0, 186, 101, 0.88), rgba(0, 78, 49, 0.94));
  box-shadow: 0 0 26px rgba(0, 255, 136, 0.42);
}

.profit-main span {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.profit-main small {
  max-width: 170px;
  overflow: hidden;
  color: #a7ffdc;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.welcome-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background: #07110f;
  color: #fff;
}

.summary-screen {
  min-height: 100vh;
  padding-bottom: 36px;
  background:
    linear-gradient(90deg, rgba(35, 247, 221, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(35, 247, 221, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(35, 247, 221, 0.2), transparent 28%),
    #050b0a;
  background-size: 44px 44px, 44px 44px, auto, auto;
  color: #dffffa;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid rgba(35, 247, 221, 0.3);
  background: rgba(5, 11, 10, 0.86);
}

.summary-header .header-actions {
  align-items: center;
}

.summary-header .eyebrow {
  color: var(--neon);
}

.summary-header h1 {
  color: #fff;
}

.neon-lot-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 40px);
}

.processed-total-box {
  display: grid;
  grid-template-columns: repeat(4, auto);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 140, 26, 0.82);
  border-radius: 6px;
  padding: 7px 10px;
  background: rgba(255, 120, 10, 0.1);
  box-shadow: 0 0 10px rgba(255, 123, 0, 0.18);
  color: #ff9b2f;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 600;
}

.processed-total-box span {
  color: #78fff0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.processed-total-box strong {
  color: #ff9b2f;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.neon-lot-card,
.neon-empty {
  border: 2px solid rgba(35, 247, 221, 0.65);
  border-radius: 8px;
  background: rgba(4, 19, 17, 0.92);
  box-shadow: 0 0 18px rgba(35, 247, 221, 0.18), inset 0 0 22px rgba(35, 247, 221, 0.05);
}

.neon-lot-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  align-content: start;
}

.neon-empty {
  padding: 24px;
  color: var(--neon);
  font-weight: 700;
}

.neon-card-title {
  border: 1px solid rgba(35, 247, 221, 0.42);
  border-radius: 6px;
  padding: 10px;
}

.neon-card-title span,
.neon-total-grid span {
  display: block;
  color: #78fff0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.neon-card-title strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 20px;
}

.neon-category-grid {
  display: grid;
  gap: 8px;
}

.neon-category-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.8fr;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(35, 247, 221, 0.42);
  border-radius: 6px;
  padding: 10px;
  color: #dffffa;
}

.neon-category-row strong {
  color: var(--neon);
}

.neon-total-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 7px;
}

.neon-total-grid div {
  min-width: 0;
  border: 1px solid rgba(255, 140, 26, 0.72);
  border-radius: 5px;
  padding: 7px 8px;
  background: linear-gradient(180deg, rgba(255, 120, 10, 0.11), rgba(255, 120, 10, 0.05));
  box-shadow: 0 0 8px rgba(255, 123, 0, 0.13), inset 0 0 8px rgba(255, 138, 31, 0.04);
}

.neon-total-grid span {
  line-height: 1.15;
  font-size: 11px;
}

.neon-total-grid strong {
  display: block;
  margin-top: 2px;
  color: #ff9b2f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.neon-box-table {
  border: 1px solid rgba(35, 247, 221, 0.38);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(2, 11, 10, 0.5);
}

.neon-box-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(35, 247, 221, 0.18);
  padding: 8px 10px;
  color: #dffffa;
  font-size: 13px;
}

.neon-box-row:last-child {
  border-bottom: 0;
}

.neon-box-head {
  color: var(--neon);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(35, 247, 221, 0.08);
}

.neon-box-row span:first-child {
  font-weight: 700;
}

.neon-box-row span:last-child {
  color: #ff9b2f;
  font-weight: 700;
}

.neon-delete-lot {
  justify-self: end;
  align-self: end;
  margin-top: 2px;
  min-height: 34px;
  padding: 0 12px;
}

.circuit-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(35, 247, 221, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(35, 247, 221, 0.11) 1px, transparent 1px),
    radial-gradient(circle at 22% 18%, rgba(17, 122, 101, 0.58), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(180, 83, 9, 0.42), transparent 24%),
    #07110f;
  background-size: 54px 54px, 54px 54px, auto, auto, auto;
}

.circuit-bg::before,
.circuit-bg::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(35, 247, 221, 0.35);
  clip-path: polygon(0 0, 62% 0, 62% 18%, 100% 18%, 100% 100%, 28% 100%, 28% 76%, 0 76%);
}

.circuit-bg::after {
  inset: 23% 10% 14% 28%;
  border-color: rgba(255, 255, 255, 0.18);
  transform: rotate(180deg);
}

.welcome-content {
  position: relative;
  width: min(980px, 100%);
  padding: clamp(28px, 5vw, 58px);
  border: 1.5px solid rgba(35, 247, 221, 0.62);
  border-radius: 8px;
  background: rgba(7, 17, 15, 0.78);
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(35, 247, 221, 0.16);
  text-align: center;
}

.welcome-content .eyebrow {
  color: var(--neon);
}

.welcome-content h1 {
  margin-bottom: 16px;
  border: 1px solid rgba(35, 247, 221, 0.58);
  border-radius: 8px;
  padding: 12px 18px;
  background: rgba(2, 11, 10, 0.44);
  box-shadow: inset 0 0 18px rgba(35, 247, 221, 0.08);
  font-size: clamp(34px, 5.4vw, 66px);
  line-height: 1;
  white-space: nowrap;
}

.brand-line {
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 700;
}

.brand-subline {
  color: #b8fff4;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.welcome-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.welcome-sync-actions {
  position: fixed;
  top: 50%;
  right: 22px;
  z-index: 3;
  display: grid;
  gap: 10px;
  width: 210px;
  transform: translateY(-50%);
}

.welcome-sync-actions button {
  width: 100%;
  justify-content: center;
  border-color: rgba(35, 247, 221, 0.55) !important;
  background:
    linear-gradient(180deg, rgba(6, 22, 20, 0.94), rgba(2, 11, 10, 0.94)) !important;
  box-shadow:
    0 0 18px rgba(35, 247, 221, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dark-secondary {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.inventory-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  text-align: left;
}

.inventory-list button,
.inventory-year-row,
.inventory-detail-row,
.inventory-year-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(35, 247, 221, 0.28);
  border-radius: 6px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.inventory-year-row,
.inventory-detail-row,
.inventory-year-title {
  background: rgba(2, 11, 10, 0.62);
  box-shadow: 0 0 14px rgba(35, 247, 221, 0.12);
}

.inventory-year-row strong,
.inventory-detail-row strong,
.inventory-year-title strong {
  display: block;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-year-row span,
.inventory-detail-row span {
  display: block;
  margin-top: 3px;
  color: #b8fff4;
  font-size: 13px;
  font-weight: 700;
}

.inventory-year-row button,
.inventory-detail-row button,
.inventory-year-title button {
  width: auto;
  min-height: 34px;
  padding: 0 14px;
}

.inventory-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inventory-status-btn {
  min-width: 112px;
  border-width: 1px;
  border-style: solid;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: none;
}

.inventory-status-btn:disabled {
  cursor: default;
  opacity: 0.95;
}

.inventory-status-comprado {
  border-color: rgba(0, 255, 127, 0.9);
  background: linear-gradient(180deg, #04c96d, #078044);
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 255, 127, 0.22);
}

.inventory-status-almacen {
  border-color: rgba(255, 230, 0, 0.95);
  background: linear-gradient(180deg, #ffe95b, #e3be12);
  color: #111;
  box-shadow: 0 0 14px rgba(255, 230, 0, 0.22);
}

.inventory-status-vendido {
  border-color: rgba(255, 64, 64, 0.92);
  background: linear-gradient(180deg, #ff4747, #b91515);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 64, 64, 0.24);
}

.inventory-year-modal {
  width: min(980px, 100%);
}

.inventory-year-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(16px, 4vw, 40px);
  background: rgba(4, 14, 13, 0.9);
  border-bottom: 1px solid rgba(35, 247, 221, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.has-session .app-header,
.has-session .summary-header {
  padding-top: 58px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--neon);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(35, 247, 221, 0.4);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 40px);
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px) 34px;
}

.single-layout {
  grid-template-columns: 1fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 0 22px rgba(35, 247, 221, 0.08), inset 0 0 28px rgba(35, 247, 221, 0.03);
}

.table-panel {
  grid-column: 1 / -1;
  grid-row: 3;
}

.lots-panel {
  grid-column: 1 / -1;
  grid-row: auto;
}

.inventory-panel {
  grid-column: 1;
  grid-row: 1;
}

.voice-panel {
  grid-column: 2;
  grid-row: 1;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(2, 11, 10, 0.78);
}

input:focus {
  outline: 2px solid rgba(35, 247, 221, 0.22);
  border-color: var(--neon);
  box-shadow: 0 0 16px rgba(35, 247, 221, 0.18);
}

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

.stats div {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 5px;
  padding: 8px;
  background: rgba(0, 255, 136, 0.08);
  box-shadow:
    0 0 0 1px rgba(0, 255, 136, 0.14) inset,
    0 0 14px rgba(0, 255, 136, 0.14);
}

.stats strong {
  display: block;
  color: #00ff88;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.36);
}

.stats span {
  color: var(--neon);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 400;
}

.voice-box {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 18px;
}

.talk-button {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #0f766e;
  border: 2px solid rgba(35, 247, 221, 0.62);
  box-shadow: 0 0 28px rgba(35, 247, 221, 0.26);
}

.talk-button:active,
.talk-button.listening {
  transform: scale(0.98);
  background: #b45309;
  border-color: var(--orange);
  box-shadow: 0 0 28px rgba(255, 138, 31, 0.36);
}

.talk-button span {
  display: block;
  font-size: 20px;
}

#transcript {
  min-height: 44px;
  margin-bottom: 14px;
  color: var(--muted);
}

.inventory-mode-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(35, 247, 221, 0.42);
  border-radius: 6px;
  background: rgba(2, 11, 10, 0.46);
}

.manual-entry {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 132px minmax(360px, 1fr);
  gap: 10px;
  align-items: center;
}

.manual-entry button {
  width: 132px;
  padding: 0 12px;
}

.bulk-entry {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(140px, 190px) minmax(150px, 210px) 310px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(35, 247, 221, 0.66);
  border-radius: 6px;
  background: rgba(0, 255, 136, 0.08);
  box-shadow:
    0 0 0 1px rgba(35, 247, 221, 0.1) inset,
    0 0 18px rgba(35, 247, 221, 0.13);
}

.bulk-entry button {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  margin-top: 15px;
  padding: 0 16px;
  border-color: rgba(35, 247, 221, 0.86);
  background: linear-gradient(180deg, #00d9b7, #008f78);
  color: #fff;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgba(35, 247, 221, 0.18) inset,
    0 0 22px rgba(35, 247, 221, 0.28);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.32);
}

.bulk-entry input[readonly] {
  border-color: rgba(255, 138, 31, 0.72);
  color: var(--orange);
  font-weight: 900;
  background: rgba(255, 138, 31, 0.12);
}

.bulk-switch-field {
  display: grid;
  gap: 7px;
  align-self: end;
}

.bulk-switch-field span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--neon);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 400;
}

.bulk-switch-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--neon);
}

.bulk-switch-field input:disabled {
  border-color: rgba(148, 163, 184, 0.36);
  color: rgba(226, 232, 240, 0.38);
  background: rgba(2, 11, 10, 0.32);
}

.category-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 8px;
}

.category-rule {
  display: grid;
  grid-template-columns: 1.25fr 74px 74px;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: rgba(2, 11, 10, 0.54);
}

.category-rule label {
  margin-bottom: 0;
  gap: 4px;
  font-size: 11px;
}

.category-rule input {
  min-height: 34px;
  padding: 0 8px;
  font-size: 14px;
}

.category-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.inline-category-counts {
  margin-top: 0;
}

.category-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(2, 11, 10, 0.6);
  min-width: 104px;
}

.category-count strong {
  font-size: 20px;
  color: var(--orange);
}

.category-count span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.category-badge {
  display: inline-block;
  min-width: 88px;
  border: 1px solid rgba(35, 247, 221, 0.55);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(35, 247, 221, 0.1);
  color: var(--neon);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.category-intermedio {
  border-color: rgba(0, 153, 255, 0.9);
  background: rgba(0, 153, 255, 0.14);
  color: #55c7ff;
  box-shadow: 0 0 14px rgba(0, 153, 255, 0.18);
}

.category-pesado {
  border-color: rgba(0, 255, 136, 0.85);
  background: rgba(0, 255, 136, 0.12);
  color: #32ff9c;
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.16);
}

.category-liviano {
  border-color: rgba(170, 184, 194, 0.8);
  background: rgba(170, 184, 194, 0.12);
  color: #c2ccd3;
  box-shadow: 0 0 12px rgba(170, 184, 194, 0.12);
}

.category-default {
  border-color: rgba(35, 247, 221, 0.55);
  background: rgba(35, 247, 221, 0.1);
  color: var(--neon);
}

.lot-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 10px;
  align-items: end;
}

.lot-toolbar label {
  margin-bottom: 0;
}

.lot-add {
  display: grid;
  grid-template-columns: 118px minmax(260px, 1fr);
  align-items: center;
  gap: 18px;
  margin: 0 0 14px;
}

.talk-lot-button {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  padding: 0 14px;
  background: #0f766e;
  border: 2px solid rgba(35, 247, 221, 0.62);
  box-shadow: 0 0 28px rgba(35, 247, 221, 0.26);
  line-height: 1.15;
}

.talk-lot-button:active,
.talk-lot-button.listening {
  transform: scale(0.98);
  background: #b45309;
  border-color: var(--orange);
  box-shadow: 0 0 28px rgba(255, 138, 31, 0.36);
}

.lot-input-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto 150px;
  gap: 10px;
  align-items: center;
}

.lot-voice-status {
  margin: 8px 0 0;
  color: var(--muted);
}

.lot-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.lot-stat {
  flex: 0 0 170px;
  border: 1px solid rgba(35, 247, 221, 0.35);
  border-radius: 6px;
  padding: 10px;
  background: rgba(2, 11, 10, 0.6);
}

.lot-stat strong {
  display: block;
  font-size: 20px;
  color: var(--orange);
}

.lot-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lot-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.lot-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: rgba(2, 11, 10, 0.62);
}

.lot-box button {
  min-height: 28px;
  padding: 0 8px;
}

.sales-panel {
  grid-column: 1 / -1;
}

.purchase-panel {
  grid-column: 1 / -1;
}

.purchase-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 10px;
  align-items: end;
}

.purchase-form label {
  margin-bottom: 0;
}

.purchase-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.purchase-summary div {
  border: 1px solid rgba(255, 138, 31, 0.72);
  border-radius: 6px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 138, 31, 0.18), rgba(35, 247, 221, 0.05)),
    rgba(2, 11, 10, 0.78);
  box-shadow: 0 0 22px rgba(255, 138, 31, 0.14), inset 0 0 18px rgba(35, 247, 221, 0.04);
}

.purchase-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.purchase-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--orange);
  font-size: 28px;
  font-weight: 900;
}

.purchase-table-title {
  margin: 4px 0 12px;
  border: 1px solid rgba(35, 247, 221, 0.38);
  border-radius: 6px;
  padding: 12px;
  background: rgba(2, 11, 10, 0.62);
  color: var(--neon);
  font-size: 18px;
  text-transform: uppercase;
  box-shadow: inset 0 0 16px rgba(35, 247, 221, 0.05);
}

.purchase-table-title span {
  color: #fff;
}

.sales-history-panel {
  grid-column: 1 / -1;
}

.sale-form,
.sale-add-grid,
.sale-total-box {
  display: grid;
  gap: 10px;
}

.sale-form {
  grid-template-columns: 1.2fr 1.2fr 180px 180px;
}

.sale-add-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.sale-add-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: rgba(2, 11, 10, 0.54);
}

.sale-add-card h3 {
  margin: 0 0 10px;
  color: var(--neon);
  font-size: 16px;
}

.sale-add-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
}

.scan-button {
  border-color: rgba(0, 174, 255, 0.92);
  background:
    linear-gradient(180deg, rgba(0, 174, 255, 0.9), rgba(0, 63, 145, 0.94)),
    rgba(2, 11, 10, 0.92);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  box-shadow: 0 0 16px rgba(0, 174, 255, 0.34);
}

.scan-button:hover {
  color: #fff;
  box-shadow: 0 0 22px rgba(0, 174, 255, 0.5);
}

button.scan-button,
button.secondary.scan-button {
  border-color: rgba(0, 174, 255, 0.95) !important;
  background:
    linear-gradient(180deg, rgba(0, 174, 255, 0.95), rgba(0, 64, 150, 0.96)) !important;
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 400 !important;
  box-shadow: 0 0 16px rgba(0, 174, 255, 0.38) !important;
}

.sale-total-box {
  grid-template-columns: repeat(4, 1fr);
  margin: 14px 0;
}

.sale-total-box div {
  border: 1px solid rgba(255, 138, 31, 0.72);
  border-radius: 6px;
  padding: 12px;
  background: var(--orange-soft);
  box-shadow: 0 0 18px rgba(255, 138, 31, 0.12);
}

.sale-total-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sale-total-box strong {
  display: block;
  margin-top: 3px;
  color: var(--orange);
  font-size: 24px;
}

.sale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sales-history-list {
  display: grid;
  gap: 10px;
}

.sales-grand-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.sales-grand-summary div {
  border: 1px solid rgba(255, 138, 31, 0.72);
  border-radius: 6px;
  padding: 12px;
  background: var(--orange-soft);
  box-shadow: 0 0 18px rgba(255, 138, 31, 0.12);
}

.sales-grand-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sales-grand-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--orange);
  font-size: 28px;
  font-weight: 900;
}

.sales-grand-summary .sales-paid-summary {
  border-color: rgba(0, 255, 136, 0.9);
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.18), rgba(0, 110, 70, 0.26));
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.24);
}

.sales-grand-summary .sales-paid-summary span,
.sales-grand-summary .sales-paid-summary strong {
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.42);
}

.sales-grand-summary .sales-due-summary {
  border-color: rgba(35, 247, 221, 0.72);
  background:
    linear-gradient(180deg, rgba(35, 247, 221, 0.12), rgba(0, 0, 0, 0.7)),
    #030806;
  box-shadow: 0 0 18px rgba(35, 247, 221, 0.18);
}

.sales-grand-summary .sales-due-summary span,
.sales-grand-summary .sales-due-summary strong {
  color: #fff;
  text-shadow: 0 0 10px rgba(35, 247, 221, 0.38);
}

.sale-history-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: rgba(2, 11, 10, 0.58);
}

.sale-history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sale-history-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sale-history-card strong {
  color: var(--orange);
  font-size: 18px;
}

.sale-seller-chip {
  display: inline-block;
  width: 100%;
  border: 1px solid hsl(var(--seller-hue), 100%, 62%);
  border-radius: 6px;
  padding: 8px 10px;
  background:
    linear-gradient(180deg, hsla(var(--seller-hue), 100%, 48%, 0.34), hsla(var(--seller-hue), 85%, 18%, 0.62));
  color: hsl(var(--seller-hue), 100%, 72%) !important;
  font-weight: 900;
  text-align: center;
  box-shadow:
    0 0 0 1px hsla(var(--seller-hue), 100%, 65%, 0.18) inset,
    0 0 18px hsla(var(--seller-hue), 100%, 55%, 0.28);
}

.sale-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sale-history-actions button {
  min-height: 34px;
  padding: 0 10px;
}

.payment-due-btn {
  border-color: rgba(255, 138, 31, 0.85);
  background: rgba(255, 138, 31, 0.16);
  color: #ffb36b;
  box-shadow: 0 0 14px rgba(255, 138, 31, 0.16);
}

.payment-paid-btn {
  border-color: rgba(0, 255, 136, 0.95);
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.95), rgba(0, 154, 91, 0.9));
  color: #fff;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0 14px rgba(0, 255, 136, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.payment-modal {
  width: min(760px, 100%);
}

.payment-summary-box,
.payment-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.payment-form-grid {
  grid-template-columns: 1fr 1fr;
}

.payment-summary-box div {
  border: 1px solid rgba(255, 138, 31, 0.72);
  border-radius: 6px;
  padding: 12px;
  background: var(--orange-soft);
}

.payment-summary-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-summary-box strong {
  display: block;
  margin-top: 4px;
  color: var(--orange);
  font-size: 22px;
  font-weight: 900;
}

.payment-info-box {
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px solid rgba(35, 247, 221, 0.45);
  border-radius: 8px;
  padding: 14px;
  background: rgba(2, 11, 10, 0.7);
  color: #fff;
}

.payment-info-box img {
  width: min(300px, 100%);
  border-radius: 8px;
  background: #fff;
}

.payment-info-box strong {
  color: var(--neon);
  font-size: 20px;
  text-transform: uppercase;
}

.payment-info-box span {
  color: #fff;
  font-weight: 800;
}

.sale-history-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
  border: 1px solid rgba(35, 247, 221, 0.28);
  border-radius: 6px;
  background: rgba(0, 255, 210, 0.03);
}

.sale-history-table-row {
  display: grid;
  grid-template-columns: 170px 220px 320px 130px 120px 116px 110px;
  min-width: 1186px;
  border-bottom: 1px solid rgba(35, 247, 221, 0.18);
}

.sale-history-table-row:last-child {
  border-bottom: 0;
}

.sale-history-table-row > * {
  padding: 9px 10px;
  border-right: 1px solid rgba(35, 247, 221, 0.16);
  min-width: 0;
  overflow-wrap: anywhere;
}

.sale-history-table-row > *:last-child {
  border-right: 0;
}

.sale-history-table-head {
  background: rgba(35, 247, 221, 0.11);
}

.sale-history-table-head span {
  color: var(--neon);
  font-size: 11px;
  text-transform: uppercase;
}

.sale-history-table-row strong {
  color: #fff;
  font-size: 14px;
}

.sale-history-table-row strong:nth-child(7) {
  color: var(--orange);
}

.edit-sale-form {
  margin-bottom: 12px;
}

.edit-sale-add-grid {
  margin-bottom: 14px;
}

.edit-sale-lines {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.edit-sale-total,
.edit-sale-line {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(35, 247, 221, 0.38);
  border-radius: 6px;
  padding: 9px;
  background: rgba(2, 11, 10, 0.58);
}

.edit-sale-total {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: rgba(255, 138, 31, 0.66);
  color: var(--orange);
  font-weight: 900;
}

.edit-sale-line span:first-child {
  color: #fff;
  font-weight: 900;
}

.edit-sale-line span:nth-child(3) {
  color: var(--orange);
  font-weight: 900;
}

.edit-sale-line button {
  min-height: 32px;
  padding: 0 10px;
}

.empty-sale-detail {
  grid-template-columns: 1fr;
  min-width: 0;
}

.sales-print-area {
  display: none;
}

.purchase-print-area {
  display: none;
}

.summary-print-area {
  display: none;
}

.profit-print-area {
  display: none;
}

.annual-print-area {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}

.table-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.delete-all-btn {
  border-color: rgba(255, 77, 63, 0.72);
  background: linear-gradient(180deg, rgba(255, 77, 63, 0.88), rgba(153, 27, 27, 0.92));
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 77, 63, 0.24);
}

.delete-all-btn:hover {
  border-color: #ff9b92;
  box-shadow: 0 0 26px rgba(255, 77, 63, 0.38);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.modal-panel {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(35, 247, 221, 0.64);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(35, 247, 221, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(35, 247, 221, 0.08) 1px, transparent 1px),
    rgba(2, 11, 10, 0.98);
  background-size: 40px 40px;
  box-shadow: 0 0 42px rgba(35, 247, 221, 0.24);
}

.large-modal {
  width: min(1180px, 100%);
}

.price-modal {
  width: min(620px, 100%);
}

.users-modal {
  width: min(760px, 100%);
}

.scanner-modal {
  width: min(560px, 100%);
}

.scanner-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(35, 247, 221, 0.82);
  border-radius: 8px;
  background: #010706;
  box-shadow:
    0 0 24px rgba(35, 247, 221, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  aspect-ratio: 4 / 3;
}

.scanner-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.scanner-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 2px;
  background: var(--orange);
  box-shadow: 0 0 16px rgba(255, 138, 31, 0.9);
}

.scanner-status {
  margin: 12px 0 0;
  color: var(--neon);
  font-weight: 800;
}

.users-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.users-form-grid label {
  display: grid;
  gap: 7px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 700;
}

.users-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.user-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(35, 247, 221, 0.45);
  border-radius: 7px;
  background: rgba(1, 20, 17, 0.85);
}

.user-row strong {
  color: #fff;
}

.user-row span {
  color: var(--mint);
}

.user-row em {
  color: var(--orange);
  font-style: normal;
  font-weight: 800;
}

.modal-subtitle {
  display: inline-block;
  margin-top: 4px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.profit-screen {
  min-height: 100vh;
}

.profit-panel {
  width: 100%;
}

.profit-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.profit-summary-grid div {
  min-height: 86px;
  border: 1px solid rgba(35, 247, 221, 0.48);
  border-radius: 7px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(35, 247, 221, 0.08), rgba(0, 0, 0, 0.12));
  box-shadow: inset 0 0 18px rgba(35, 247, 221, 0.05);
}

.profit-summary-grid span {
  display: block;
  margin-bottom: 9px;
  color: var(--neon);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.profit-summary-grid strong {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
}

.profit-summary-grid strong span {
  display: grid;
  gap: 3px;
  margin: 0;
  border: 1px solid rgba(35, 247, 221, 0.32);
  border-radius: 5px;
  padding: 7px 8px;
  background: rgba(2, 11, 10, 0.46);
}

.profit-summary-grid strong small {
  color: #79fff1;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.profit-summary-grid strong b {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.profit-summary-grid .profit-final-card {
  border-color: rgba(0, 255, 136, 0.92);
  background:
    linear-gradient(180deg, rgba(0, 255, 136, 0.16), rgba(0, 92, 55, 0.18)),
    rgba(1, 18, 13, 0.96);
  box-shadow:
    0 0 20px rgba(0, 255, 136, 0.22),
    inset 0 0 0 1px rgba(0, 255, 136, 0.14);
}

.profit-summary-grid .profit-final-card.profit-final-positive-card {
  border-color: rgba(0, 255, 136, 0.92);
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.16), rgba(0, 92, 55, 0.18));
  box-shadow:
    0 0 20px rgba(0, 255, 136, 0.22),
    inset 0 0 0 1px rgba(0, 255, 136, 0.14);
}

.profit-summary-grid .profit-final-card strong {
  display: block;
  color: var(--orange);
  font-size: 18px;
}

.profit-due-mini {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid rgba(35, 247, 221, 0.7);
  border-radius: 6px;
  padding: 8px 10px;
  background:
    linear-gradient(180deg, rgba(35, 247, 221, 0.09), rgba(0, 0, 0, 0.78)),
    #020605;
  color: #fff;
  font-style: normal;
  box-shadow: 0 0 14px rgba(35, 247, 221, 0.14);
}

.profit-due-mini span {
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 900;
  text-transform: uppercase;
}

.profit-due-mini b {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(35, 247, 221, 0.4);
}

.profit-finalize-btn {
  min-height: 30px;
  margin-top: 12px;
  border: 1px solid rgba(255, 140, 26, 0.72);
  border-radius: 5px;
  padding: 6px 10px;
  background: rgba(255, 140, 26, 0.12);
  color: #ffb36b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(255, 140, 26, 0.16);
}

.profit-finalize-btn:hover {
  background: rgba(255, 140, 26, 0.2);
  color: #fff;
}

.profit-positive {
  color: #00ff7f !important;
  font-weight: 900;
  text-shadow:
    0 0 8px rgba(0, 255, 127, 0.72),
    0 0 18px rgba(0, 255, 127, 0.42);
}

.profit-negative {
  color: #ff4d3f !important;
  font-weight: 900;
  text-shadow:
    0 0 8px rgba(255, 77, 63, 0.68),
    0 0 18px rgba(255, 77, 63, 0.36);
}

.profit-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.annual-tables {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.annual-tables article,
.annual-summary-panel {
  border-color: rgba(35, 247, 221, 0.48);
}

.annual-result-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.annual-result-cards div {
  border: 1px solid rgba(35, 247, 221, 0.48);
  border-radius: 7px;
  padding: 13px;
  background: rgba(2, 11, 10, 0.58);
}

.annual-result-cards span {
  display: block;
  color: var(--neon);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.annual-result-cards strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.annual-result-cards .annual-gain strong {
  color: #00ff7f;
  text-shadow: 0 0 12px rgba(0, 255, 127, 0.5);
}

.annual-result-cards .annual-loss strong {
  color: #ff4d3f;
  text-shadow: 0 0 12px rgba(255, 77, 63, 0.45);
}

.annual-result-cards .annual-due-card {
  border-color: rgba(35, 247, 221, 0.7);
  background:
    linear-gradient(180deg, rgba(35, 247, 221, 0.12), rgba(0, 0, 0, 0.7)),
    #020605;
  box-shadow: 0 0 16px rgba(35, 247, 221, 0.18);
}

.annual-result-cards .annual-due-card strong {
  color: #fff;
  text-shadow: 0 0 10px rgba(35, 247, 221, 0.42);
}

.profit-tables article,
.annual-tables article {
  border: 1px solid rgba(35, 247, 221, 0.45);
  border-radius: 8px;
  padding: 14px;
  background: rgba(2, 11, 10, 0.62);
}

.annual-tables .annual-benefit-card {
  border-color: rgba(0, 174, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(0, 174, 255, 0.12), rgba(2, 11, 10, 0.72));
  box-shadow:
    0 0 0 1px rgba(0, 174, 255, 0.18) inset,
    0 0 22px rgba(0, 174, 255, 0.16);
}

.annual-tables .annual-expense-card {
  border-color: rgba(255, 64, 64, 0.82);
  background:
    linear-gradient(135deg, rgba(255, 64, 64, 0.14), rgba(6, 7, 8, 0.9)),
    #060708;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 22px rgba(255, 64, 64, 0.16);
  color: #f4f4f4;
}

.annual-tables .annual-expense-card h3 {
  color: #fff;
}

.annual-expense-card .compact-table-wrap th {
  color: #e5e5e5;
}

.annual-expense-card .compact-table-wrap td {
  color: #fff;
  border-color: rgba(210, 210, 210, 0.22);
}

.annual-expense-card .compact-table-wrap tr:nth-child(even) td {
  background: rgba(160, 160, 160, 0.08);
}

.profit-benefit-total {
  border: 1px solid rgba(0, 174, 255, 0.82);
  background: rgba(0, 174, 255, 0.12);
  color: #64d7ff;
  min-width: 138px;
  text-align: center;
  box-shadow: 0 0 16px rgba(0, 174, 255, 0.2);
  text-shadow: 0 0 12px rgba(0, 174, 255, 0.5);
}

.profit-benefit-total.profit-benefit-gain,
.annual-benefit-gain td:last-child,
.annual-benefit-gain td:nth-child(2) {
  color: #00ff7f;
  text-shadow: 0 0 12px rgba(0, 255, 127, 0.45);
}

.profit-benefit-total.profit-benefit-loss,
.annual-benefit-loss td:last-child,
.annual-benefit-loss td:nth-child(2) {
  color: #ff4d3f;
  text-shadow: 0 0 12px rgba(255, 77, 63, 0.45);
}

.annual-benefit-pending td:nth-child(2),
.annual-benefit-pending td:last-child {
  color: var(--orange);
  text-shadow: 0 0 10px rgba(255, 130, 24, 0.36);
}

.profit-tables h3,
.annual-tables h3 {
  margin: 0;
  color: #fff;
}

.profit-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.annual-tables .profit-table-head {
  min-height: 72px;
  align-content: flex-start;
}

.annual-tables .profit-table-head h3 {
  align-self: flex-start;
  line-height: 1.15;
}

.annual-tables .compact-table-wrap {
  margin-top: 0;
}

.profit-table-total {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 7px 9px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.profit-buy-total {
  border: 1px solid rgba(0, 255, 136, 0.72);
  background: rgba(0, 255, 136, 0.12);
  color: #56ffad;
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.18);
}

.profit-sale-total {
  border: 1px solid rgba(255, 77, 63, 0.78);
  background: rgba(255, 77, 63, 0.12);
  color: #ff6b5d;
  box-shadow: 0 0 16px rgba(255, 77, 63, 0.2);
}

.annual-sales-head-totals {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.annual-sales-head-totals .profit-table-total {
  min-width: 230px;
  text-align: center;
}

.annual-unpaid-total {
  border: 1px solid rgba(35, 247, 221, 0.72);
  background:
    linear-gradient(180deg, rgba(35, 247, 221, 0.12), rgba(0, 0, 0, 0.75)),
    #020605;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  box-shadow: 0 0 16px rgba(35, 247, 221, 0.18);
  text-shadow: 0 0 10px rgba(35, 247, 221, 0.4);
}

.annual-tables article:nth-child(2) th:nth-child(3) {
  font-size: 10px;
  line-height: 1;
}

.annual-unpaid-heading {
  display: block;
  line-height: 1;
  white-space: nowrap;
}

.compact-table-wrap table {
  min-width: 0;
  table-layout: fixed;
}

.annual-tables .compact-table-wrap th,
.annual-tables .compact-table-wrap td {
  padding: 9px 9px;
  font-size: 13px;
  white-space: normal;
}

.annual-tables .compact-table-wrap th {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.annual-tables .compact-table-wrap th:first-child,
.annual-tables .compact-table-wrap td:first-child {
  width: 40%;
}

.annual-tables .compact-table-wrap th:nth-child(2),
.annual-tables .compact-table-wrap td:nth-child(2) {
  width: 32%;
}

.annual-tables .compact-table-wrap th:nth-child(3),
.annual-tables .compact-table-wrap td:nth-child(3) {
  width: 28%;
}

.annual-tables .expense-table th:first-child,
.annual-tables .expense-table td:first-child {
  width: 58%;
}

.mini-neon-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(35, 247, 221, 0.78);
  border-radius: 6px;
  padding: 7px 10px;
  background: rgba(0, 181, 152, 0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(35, 247, 221, 0.18);
}

.profit-expense-total {
  border: 1px solid rgba(255, 64, 64, 0.82);
  background: rgba(255, 64, 64, 0.14);
  color: #ffb8b8;
  box-shadow: 0 0 16px rgba(255, 64, 64, 0.22);
}

.expense-reason-btn {
  width: 100%;
  min-height: 0;
  border: 1px solid transparent;
  padding: 4px 6px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  box-shadow: none;
}

.expense-reason-btn:hover {
  border-color: rgba(255, 64, 64, 0.5);
  background: rgba(255, 64, 64, 0.12);
  color: #ffd6d6;
}

.danger-button {
  border-color: rgba(255, 64, 64, 0.82);
  background: rgba(255, 64, 64, 0.12);
  color: #ff4d3f;
  box-shadow: 0 0 12px rgba(255, 64, 64, 0.18);
}

.danger-button:hover {
  background: rgba(255, 64, 64, 0.2);
  color: #fff;
}

.processed-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.processed-lists article,
.price-form-grid {
  border: 1px solid rgba(35, 247, 221, 0.45);
  border-radius: 8px;
  padding: 14px;
  background: rgba(2, 11, 10, 0.58);
}

.processed-lists h3 {
  margin: 0 0 12px;
  color: var(--neon);
}

.compact-box-list {
  display: grid;
  gap: 8px;
  max-height: 54vh;
  overflow: auto;
}

.compact-box-list div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(35, 247, 221, 0.32);
  border-radius: 6px;
  padding: 9px 10px;
  background: rgba(35, 247, 221, 0.06);
}

.compact-box-list strong {
  color: #fff;
}

.compact-box-list span {
  color: var(--muted);
  font-weight: 700;
}

.price-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.category-modal-summary {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.category-modal-summary > span {
  justify-self: start;
  border: 1px solid rgba(255, 138, 31, 0.68);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--orange);
  background: var(--orange-soft);
  font-weight: 900;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(35, 247, 221, 0.18);
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  color: var(--neon);
  font-size: 12px;
  text-transform: uppercase;
}

.barcode-small {
  width: 190px;
  height: 54px;
}

.delete-btn {
  min-height: 34px;
  padding: 0 10px;
  background: rgba(255, 77, 63, 0.08);
  border: 1px solid rgba(255, 77, 63, 0.58);
  color: var(--danger);
}

.delete-btn:hover {
  background: rgba(255, 77, 63, 0.14);
  color: var(--danger);
}

.empty-row td {
  padding: 26px 10px;
  color: var(--muted);
  text-align: center;
}

.print-area {
  display: none;
}

@media (max-width: 820px) {
  body {
    font-size: 14px;
  }

  .session-greeting {
    top: 8px;
    left: 8px;
    max-width: calc(100vw - 150px);
    min-height: 30px;
    padding: 0 10px;
    font-size: 10px;
  }

  .logout-button {
    top: 8px;
    right: 8px;
    min-height: 30px;
    max-width: 132px;
    padding: 0 10px;
    font-size: 10px;
  }

  .has-session .app-header,
  .has-session .summary-header {
    padding-top: 46px;
  }

  .app-header,
  .layout,
  .summary-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app-header,
  .summary-header {
    gap: 10px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .app-header h1,
  .summary-header h1 {
    font-size: clamp(24px, 8vw, 32px);
    line-height: 1.05;
  }

  .eyebrow {
    font-size: 11px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions button,
  .sale-actions button,
  .modal-actions button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .layout {
    gap: 12px;
    padding: 12px 10px 24px;
  }

  .panel {
    padding: 12px;
    border-radius: 7px;
  }

  .section-title {
    gap: 8px;
    margin-bottom: 12px;
  }

  .section-title h2 {
    font-size: 18px;
  }

  label {
    gap: 5px;
    margin-bottom: 10px;
    font-size: 12px;
  }

  input,
  select,
  button {
    min-height: 38px;
    border-radius: 5px;
    font-size: 14px;
  }

  input,
  select {
    padding: 0 10px;
  }

  .sale-form,
  .purchase-form,
  .inventory-mode-grid,
  .manual-entry,
  .bulk-entry {
    gap: 8px;
  }

  .sale-add-grid {
    gap: 9px;
    margin-top: 10px;
  }

  .sale-add-card {
    padding: 10px;
  }

  .sale-add-card h3 {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .sale-add-row {
    gap: 8px;
  }

  .sale-total-box {
    gap: 8px;
    margin: 10px 0;
  }

  .sale-total-box div,
  .sales-grand-summary > div,
  .purchase-summary > div {
    min-height: 0;
    padding: 10px;
  }

  .sale-total-box span,
  .sales-grand-summary span {
    font-size: 11px;
  }

  .sale-total-box strong,
  .sales-grand-summary strong {
    font-size: 20px;
    line-height: 1.05;
  }

  .table-wrap,
  .compact-table-wrap,
  .sale-history-table {
    overflow-x: auto;
  }

  .sale-history-table-row,
  .sale-history-table-head {
    min-width: 680px;
  }

  .inventory-panel,
  .voice-panel,
  .lots-panel,
  .table-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .voice-box,
  .inventory-mode-grid,
  .manual-entry,
  .bulk-entry,
  .table-actions,
  .modal-actions,
  .category-rules,
  .category-rule,
  .lot-toolbar,
  .lot-add,
  .lot-input-row,
  .lot-stats,
  .sale-form,
  .purchase-form,
  .purchase-summary,
  .sale-add-grid,
  .sale-add-row,
  .sale-total-box,
  .sales-grand-summary,
  .sale-history-card,
  .profit-summary-grid,
  .profit-tables,
  .annual-result-cards,
  .annual-tables,
  .processed-lists,
  .price-form-grid {
    grid-template-columns: 1fr;
  }

  .talk-button,
  .talk-lot-button {
    justify-self: center;
  }

  .neon-lot-summary,
  .processed-total-box,
  .neon-category-row,
  .neon-total-grid {
    grid-template-columns: 1fr;
  }

  .welcome-content h1 {
    white-space: normal;
  }

  .welcome-sync-actions {
    position: static;
    width: min(100%, 320px);
    margin: 18px auto 0;
    transform: none;
  }

  .users-form-grid,
  .user-row {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: start;
    padding: 12px;
    overflow: auto;
  }

  .modal-panel {
    width: 100%;
    max-height: none;
    padding: 16px;
  }

  .inventory-year-modal {
    width: 100%;
  }

  .inventory-year-row,
  .inventory-detail-row,
  .inventory-year-title {
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
  }

  .inventory-year-row strong,
  .inventory-detail-row strong,
  .inventory-year-title strong {
    font-size: 15px;
    line-height: 1.15;
  }

  .inventory-year-row span,
  .inventory-detail-row span {
    font-size: 12px;
    line-height: 1.35;
  }

  .inventory-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .inventory-detail-actions button,
  .inventory-year-row button,
  .inventory-year-title button {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .inventory-status-btn {
    min-width: 0;
  }

  .inventory-year-row,
  .inventory-detail-row,
  .inventory-year-title {
    display: grid;
  }
}

@media (max-width: 560px) {
  .has-session .app-header,
  .has-session .summary-header {
    padding-top: 36px;
  }

  .app-header,
  .summary-header {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .app-header h1,
  .summary-header h1 {
    font-size: clamp(19px, 6.3vw, 25px);
    line-height: 1;
  }

  .session-greeting,
  .logout-button {
    min-height: 24px;
    font-size: 8px;
  }

  .eyebrow {
    margin-bottom: 2px;
    font-size: 9px;
  }

  .header-actions {
    gap: 5px;
  }

  .header-actions button {
    min-height: 29px;
    padding: 0 7px;
    font-size: 11px;
  }

  .layout {
    gap: 7px;
    padding: 6px 5px 14px;
  }

  .panel {
    padding: 7px;
    border-radius: 6px;
  }

  .section-title {
    margin-bottom: 6px;
  }

  .section-title h2 {
    font-size: 14px;
  }

  .section-title span {
    font-size: 9px;
  }

  label {
    gap: 3px;
    margin-bottom: 5px;
    font-size: 10px;
  }

  input,
  select,
  button {
    min-height: 28px;
    padding-right: 7px;
    padding-left: 7px;
    font-size: 11px;
  }

  .sale-form,
  .edit-sale-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .sale-form label:nth-child(1),
  .sale-form label:nth-child(2),
  .edit-sale-form label:nth-child(1),
  .edit-sale-form label:nth-child(2) {
    grid-column: 1 / -1;
  }

  .sale-add-grid {
    gap: 5px;
    margin-top: 5px;
  }

  .sale-add-card {
    padding: 5px;
    border-radius: 5px;
  }

  .sale-add-card h3 {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .sale-add-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .lot-input-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .sale-add-row input,
  .sale-add-row select,
  .lot-input-row input {
    grid-column: 1 / -1;
  }

  .sale-total-box,
  .sales-grand-summary {
    gap: 5px;
    margin: 6px 0;
  }

  .sale-total-box div,
  .sales-grand-summary > div {
    padding: 5px 6px;
  }

  .sale-total-box span,
  .sales-grand-summary span {
    font-size: 9px;
  }

  .sale-total-box strong,
  .sales-grand-summary strong {
    font-size: 15px;
  }

  th,
  td {
    padding: 5px 6px;
    font-size: 10px;
  }

  th {
    font-size: 9px;
  }

  .empty-row td {
    padding: 12px 6px;
  }

  .sale-actions {
    gap: 6px;
    margin-top: 7px;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .scanner-modal {
    width: min(94vw, 390px);
    padding: 10px;
  }

  .scanner-frame {
    max-height: 42vh;
    aspect-ratio: 16 / 10;
    border-radius: 6px;
  }

  .scanner-status {
    margin-top: 8px;
    font-size: 11px;
  }
}

@media (min-width: 821px) and (max-width: 1400px) {
  .neon-lot-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 821px) and (max-width: 1100px) {
  .app-header,
  .summary-header {
    gap: 14px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .layout {
    padding-right: 18px;
    padding-left: 18px;
  }

  .sale-form,
  .purchase-form,
  .inventory-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sale-add-grid,
  .edit-sale-add-grid {
    grid-template-columns: 1fr;
  }

  .sale-total-box,
  .sales-grand-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-year-modal {
    width: min(860px, 100%);
  }

  .inventory-detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .inventory-detail-actions {
    flex-wrap: nowrap;
  }
}

@media (max-width: 820px) {
  .has-session .app-header,
  .has-session .summary-header {
    padding-top: 34px !important;
  }

  .app-header,
  .summary-header {
    gap: 6px !important;
    padding: 7px 5px 7px !important;
  }

  .app-header h1,
  .summary-header h1 {
    font-size: clamp(18px, 5.7vw, 24px) !important;
    line-height: 1 !important;
  }

  .eyebrow {
    margin-bottom: 1px !important;
    font-size: 9px !important;
  }

  .session-greeting,
  .logout-button {
    min-height: 23px !important;
    padding: 0 8px !important;
    font-size: 8px !important;
  }

  .header-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .header-actions button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: auto !important;
    padding: 0 4px !important;
    border-radius: 5px !important;
    font-size: 8px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .profit-main {
    min-height: 25px !important;
    padding: 2px 4px !important;
    gap: 0 !important;
  }

  .profit-main span {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .profit-main small {
    max-width: 100% !important;
    font-size: 6px !important;
    line-height: 1 !important;
  }

  .layout {
    gap: 5px !important;
    padding: 5px 4px 12px !important;
  }

  .panel {
    padding: 6px !important;
    border-radius: 6px !important;
  }

  .section-title {
    margin-bottom: 5px !important;
  }

  .section-title h2 {
    font-size: 13px !important;
    line-height: 1.05 !important;
  }

  .section-title span {
    font-size: 8px !important;
  }

  label {
    gap: 2px !important;
    margin-bottom: 4px !important;
    font-size: 9px !important;
  }

  input,
  select,
  button {
    min-height: 25px !important;
    padding-right: 6px !important;
    padding-left: 6px !important;
    font-size: 10px !important;
  }

  .sale-form,
  .edit-sale-form,
  .purchase-form,
  .price-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .sale-form label:nth-child(1),
  .sale-form label:nth-child(2),
  .edit-sale-form label:nth-child(1),
  .edit-sale-form label:nth-child(2) {
    grid-column: 1 / -1 !important;
  }

  .sale-add-grid,
  .edit-sale-add-grid {
    gap: 4px !important;
    margin-top: 4px !important;
  }

  .sale-add-card {
    padding: 4px !important;
    border-radius: 5px !important;
  }

  .sale-add-card h3 {
    margin-bottom: 3px !important;
    font-size: 10px !important;
  }

  .sale-add-row,
  .lot-input-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
  }

  .sale-add-row input,
  .sale-add-row select,
  .lot-input-row input {
    grid-column: 1 / -1 !important;
  }

  .sale-total-box,
  .sales-grand-summary,
  .purchase-summary {
    gap: 4px !important;
    margin: 5px 0 !important;
  }

  .sale-total-box div,
  .sales-grand-summary > div,
  .purchase-summary > div {
    padding: 4px 5px !important;
  }

  .sale-total-box span,
  .sales-grand-summary span,
  .purchase-summary span {
    font-size: 8px !important;
  }

  .sale-total-box strong,
  .sales-grand-summary strong,
  .purchase-summary strong {
    font-size: 13px !important;
    line-height: 1 !important;
  }

  th,
  td {
    padding: 4px 5px !important;
    font-size: 9px !important;
  }

  th {
    font-size: 8px !important;
  }

  .empty-row td {
    padding: 10px 5px !important;
  }

  .sale-actions {
    gap: 5px !important;
    margin-top: 6px !important;
  }

  .modal-backdrop {
    padding: 6px !important;
  }

  .modal-panel {
    padding: 10px !important;
  }

  .scanner-modal {
    width: min(92vw, 360px) !important;
  }

  .scanner-frame {
    max-height: 38vh !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 6px !important;
  }

  .scanner-status {
    margin-top: 6px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 820px) {
  .app-screen,
  .summary-screen,
  .layout,
  .panel {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .layout {
    gap: 3px !important;
    padding: 3px 3px 10px !important;
  }

  .panel,
  .sale-add-card,
  .inventory-panel,
  .voice-panel,
  .table-panel,
  .lots-panel,
  .sales-panel,
  .purchase-panel {
    padding: 3px !important;
    border-radius: 4px !important;
  }

  .section-title {
    gap: 3px !important;
    margin-bottom: 2px !important;
  }

  .section-title h2 {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .section-title span,
  label,
  .hint,
  .muted {
    font-size: 7px !important;
    line-height: 1.05 !important;
  }

  label {
    gap: 1px !important;
    margin-bottom: 2px !important;
  }

  input,
  select,
  button,
  textarea {
    min-height: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    border-radius: 3px !important;
    font-family: Arial, sans-serif !important;
    font-size: 7.5px !important;
    line-height: 1 !important;
  }

  .sale-form,
  .edit-sale-form,
  .purchase-form,
  .price-form-grid,
  .inventory-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }

  .sale-form label:nth-child(1),
  .sale-form label:nth-child(2),
  .edit-sale-form label:nth-child(1),
  .edit-sale-form label:nth-child(2),
  .purchase-form label:first-child {
    grid-column: 1 / -1 !important;
  }

  .sale-add-grid,
  .edit-sale-add-grid {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
    margin-top: 2px !important;
  }

  .sale-add-card h3 {
    margin: 0 0 2px !important;
    font-size: 8px !important;
    line-height: 1 !important;
  }

  .sale-add-row,
  .lot-input-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }

  .sale-add-row input,
  .sale-add-row select,
  .lot-input-row input {
    grid-column: 1 / -1 !important;
  }

  .sale-add-row button,
  .lot-input-row button,
  .sale-actions button {
    min-height: 18px !important;
    height: 18px !important;
  }

  button.scan-button,
  button.secondary.scan-button {
    background: linear-gradient(180deg, #11a7ff, #006ed6) !important;
    border-color: #47cfff !important;
    box-shadow: 0 0 10px rgba(17, 167, 255, 0.55) !important;
    color: #ffffff !important;
    font-family: Arial, sans-serif !important;
    font-weight: 400 !important;
    text-transform: none !important;
  }

  .sale-total-box,
  .sales-grand-summary,
  .purchase-summary,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
    margin: 2px 0 !important;
  }

  .sale-total-box div,
  .sales-grand-summary > div,
  .purchase-summary > div,
  .summary-grid > div {
    min-height: 18px !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
  }

  .sale-total-box span,
  .sales-grand-summary span,
  .purchase-summary span,
  .summary-grid span {
    font-size: 6.5px !important;
    line-height: 1 !important;
  }

  .sale-total-box strong,
  .sales-grand-summary strong,
  .purchase-summary strong,
  .summary-grid strong {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .table-wrap {
    overflow-x: auto !important;
  }

  table {
    min-width: 0 !important;
  }

  th,
  td {
    padding: 2px 3px !important;
    font-size: 7px !important;
    line-height: 1.05 !important;
  }

  th {
    font-size: 6.5px !important;
  }

  .empty-row td {
    padding: 5px 3px !important;
  }

  .sale-actions {
    gap: 3px !important;
    margin-top: 3px !important;
  }

  .scanner-modal {
    width: min(90vw, 310px) !important;
    padding: 6px !important;
  }

  .scanner-frame {
    max-height: 30vh !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 5px !important;
  }

  .scanner-status {
    margin-top: 3px !important;
    font-size: 8px !important;
  }

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .app-header,
  .summary-header,
  .app-screen,
  .summary-screen,
  .layout,
  .panel,
  .sales-panel,
  .purchase-panel,
  .inventory-panel,
  .voice-panel,
  .table-panel,
  .lots-panel,
  .sale-form,
  .edit-sale-form,
  .purchase-form,
  .sale-add-grid,
  .edit-sale-add-grid,
  .sale-add-card,
  .sale-add-row,
  .lot-input-row,
  .sale-total-box,
  .sales-grand-summary,
  .purchase-summary,
  .table-wrap,
  .sale-history-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .app-header,
  .summary-header {
    overflow-x: hidden !important;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .sale-form,
  .edit-sale-form,
  .purchase-form,
  .price-form-grid,
  .inventory-mode-grid,
  .sale-add-row,
  .lot-input-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .sale-form label,
  .edit-sale-form label,
  .purchase-form label,
  .price-form-grid label,
  .inventory-mode-grid label,
  .sale-add-row > *,
  .lot-input-row > * {
    grid-column: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .sale-total-box,
  .sales-grand-summary,
  .purchase-summary {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  input,
  select,
  button,
  textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .header-actions button,
  .logout-button,
  .session-greeting {
    width: auto !important;
  }

  .sale-actions,
  .table-actions,
  .modal-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .sale-history-table {
    overflow-x: hidden !important;
  }

  .sale-history-table-row {
    grid-template-columns: 0.9fr 1.25fr 1.25fr 0.85fr 0.8fr 0.95fr 0.85fr !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .sale-history-table-row > * {
    padding: 3px 2px !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .sale-history-table-head span,
  .sale-history-table-row strong,
  .sale-history-table-row span {
    font-size: 6.5px !important;
    line-height: 1.05 !important;
  }

  .header-actions button,
  .table-actions button,
  .modal-actions button,
  .sale-actions button,
  .inventory-detail-actions button,
  .lot-actions button,
  .sale-add-row button,
  .lot-input-row button {
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    text-align: center !important;
    line-height: 1.08 !important;
  }

  th,
  td,
  .sale-history-table-row > *,
  .compact-table-wrap th,
  .compact-table-wrap td,
  .annual-tables .compact-table-wrap th,
  .annual-tables .compact-table-wrap td {
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    vertical-align: middle !important;
  }

  .summary-header .header-actions button,
  .app-header .header-actions button {
    min-height: 36px !important;
    max-height: none !important;
  }
}

@media print {
  @page {
    size: Letter;
    margin: 8mm;
  }

  body {
    background: #fff;
  }

  .app-header,
  .layout,
  .welcome-screen,
  .app-screen,
  #lotsScreen,
  .summary-screen,
  .sales-print-area,
  .purchase-print-area,
  .summary-print-area,
  .profit-print-area,
  .annual-print-area {
    display: none !important;
  }

  .print-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, 74mm);
    gap: 4mm;
    align-items: start;
  }

  .label {
    break-inside: avoid;
    border: 0;
    padding: 2mm;
    min-height: 28mm;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    color: #000;
  }

  .label h3 {
    margin: 0 0 1mm;
    font-size: 12pt;
    font-weight: 700;
  }

  .label canvas {
    width: 62mm;
    max-width: 100%;
    height: 17mm;
  }

  .label p {
    margin: 0.5mm 0 0;
    font-size: 7pt;
  }

  body.print-sales .print-area {
    display: none !important;
  }

  body.print-sales .sales-print-area {
    display: block !important;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-sales .sales-print-area * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-purchases .print-area,
  body.print-purchases .sales-print-area,
  body.print-purchases .profit-print-area {
    display: none !important;
  }

  body.print-purchases .purchase-print-area {
    display: block !important;
    color: #000;
    border: 1.8px solid #00a88f;
    border-radius: 3mm;
    padding: 5mm;
    background:
      linear-gradient(90deg, rgba(0, 168, 143, 0.08) 1px, transparent 1px),
      linear-gradient(0deg, rgba(0, 168, 143, 0.08) 1px, transparent 1px),
      #fff;
    background-size: 14mm 14mm;
  }

  body.print-summary .print-area,
  body.print-summary .sales-print-area,
  body.print-summary .purchase-print-area,
  body.print-summary .profit-print-area {
    display: none !important;
  }

  body.print-summary .summary-print-area {
    display: block !important;
    color: #06110f;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-summary .summary-print-area * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-profit .print-area,
  body.print-profit .sales-print-area,
  body.print-profit .purchase-print-area,
  body.print-profit .summary-print-area {
    display: none !important;
  }

  body.print-profit .profit-print-area {
    display: block !important;
    color: #06110f;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-profit .profit-print-area * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-annual .print-area,
  body.print-annual .sales-print-area,
  body.print-annual .purchase-print-area,
  body.print-annual .summary-print-area,
  body.print-annual .profit-print-area {
    display: none !important;
  }

  body.print-annual .annual-print-area {
    display: block !important;
    color: #06110f;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-annual .annual-print-area * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .annual-print-card {
    min-height: calc(100vh - 16mm);
    border: 1.8px solid #18bca8;
    border-radius: 3mm;
    padding: 7mm;
    background:
      linear-gradient(90deg, rgba(24, 188, 168, 0.08) 1px, transparent 1px),
      linear-gradient(0deg, rgba(24, 188, 168, 0.08) 1px, transparent 1px),
      #ffffff;
    background-size: 10mm 10mm;
  }

  .annual-print-totals,
  .annual-print-tables {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4mm;
    margin: 7mm 0;
  }

  .annual-print-tables {
    grid-template-columns: 1fr;
    gap: 5mm;
  }

  .annual-print-totals div,
  .annual-print-tables section {
    border: 1.4px solid #18bca8;
    border-radius: 2mm;
    padding: 3mm;
    background-color: #edfffc !important;
  }

  .annual-print-tables .annual-print-benefit {
    border-color: #1aa9ff;
    background-color: #eefaff !important;
  }

  .annual-print-tables .annual-print-expense {
    border-color: #ff8218;
    background-color: #fff7ed !important;
  }

  .annual-print-totals span,
  .annual-print-tables h2 {
    display: block;
    margin: 0 0 2mm;
    color: #006f62 !important;
    font-size: 9pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .annual-print-totals strong {
    color: #06110f !important;
    font-size: 14pt;
    font-weight: 900;
  }

  .annual-print-gain strong {
    color: #008f4f !important;
  }

  .annual-print-loss strong {
    color: #d33f32 !important;
  }

  .annual-print-due {
    border-color: #18bca8 !important;
    background-color: #edfffc !important;
  }

  .annual-print-due span {
    color: #006f62 !important;
  }

  .annual-print-due strong {
    color: #06110f !important;
  }

  .annual-print-tables table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff !important;
  }

  .annual-print-tables th,
  .annual-print-tables td {
    border: 1px solid #8fd7ce;
    padding: 1.6mm;
    color: #06110f !important;
    font-size: 8pt;
  }

  .annual-print-tables th {
    background-color: #009f88 !important;
    color: #fff !important;
    text-transform: uppercase;
  }

  .profit-print-card {
    min-height: calc(100vh - 16mm);
    border: 1.8px solid #18bca8;
    border-radius: 3mm;
    padding: 7mm;
    background:
      linear-gradient(90deg, rgba(24, 188, 168, 0.08) 1px, transparent 1px),
      linear-gradient(0deg, rgba(24, 188, 168, 0.08) 1px, transparent 1px),
      #ffffff;
    background-size: 10mm 10mm;
  }

  .profit-print-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4mm;
    border-left: 9mm solid #ff8a1f;
    border-radius: 2mm;
    padding: 4mm 5mm;
    background-color: #04100e !important;
    color: #fff !important;
  }

  .profit-print-head span,
  .profit-print-head em {
    display: block;
    color: #19e6cf !important;
    font-size: 8pt;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
  }

  .profit-print-head strong {
    display: block;
    color: #fff !important;
    font-size: 22pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .profit-print-head b {
    border: 1.5px solid #ff8a1f;
    border-radius: 2mm;
    padding: 2.5mm 3mm;
    background-color: #07110f !important;
    color: #ff8a1f !important;
    font-size: 12pt;
    font-weight: 900;
  }

  .profit-print-state,
  .profit-print-money {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4mm;
    margin: 7mm 0;
  }

  .profit-print-state section {
    border: 1.4px solid #18bca8;
    border-radius: 2mm;
    padding: 3mm;
    background-color: #edfffc !important;
  }

  .profit-print-state h2 {
    margin: 0 0 2.5mm;
    color: #006f62 !important;
    font-size: 10pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .profit-print-state div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2mm;
    border-top: 1px solid #9edbd4;
    padding: 2mm 0;
  }

  .profit-print-state span,
  .profit-print-money span {
    color: #006f62 !important;
    font-size: 8pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .profit-print-state strong {
    color: #06110f !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12pt;
    font-weight: 800;
  }

  .profit-print-money div {
    border-radius: 2mm;
    padding: 4mm;
    background-color: #f8fffd !important;
  }

  .profit-print-money span,
  .profit-print-money strong {
    display: block;
  }

  .profit-print-money strong {
    margin-top: 1.5mm;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18pt;
    font-weight: 900;
  }

  .profit-print-buy {
    border: 1.6px solid #00a86b;
  }

  .profit-print-buy span,
  .profit-print-buy strong {
    color: #007f4f !important;
  }

  .profit-print-sale {
    border: 1.6px solid #d33f32;
  }

  .profit-print-sale span,
  .profit-print-sale strong {
    color: #c72e22 !important;
  }

  .profit-print-gain {
    border: 1.8px solid #ff8a1f;
    background-color: #fff5ea !important;
  }

  .profit-print-gain span,
  .profit-print-gain strong {
    color: #f27a0a !important;
  }

  .sales-print-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sales-print-card {
    page-break-after: always;
    break-after: page;
    min-height: calc(100vh - 16mm);
    border: 1.8px solid #18bca8;
    border-radius: 3mm;
    padding: 6mm;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(24, 188, 168, 0.08) 1px, transparent 1px),
      linear-gradient(0deg, rgba(24, 188, 168, 0.08) 1px, transparent 1px),
      #ffffff;
    background-size: 9mm 9mm;
    box-shadow: inset 0 0 0 1px rgba(24, 188, 168, 0.18);
  }

  .sales-print-card:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .sales-print-summary-card {
    min-height: auto;
    padding-bottom: 10mm;
  }

  .sales-print-summary-list {
    display: grid;
    gap: 0;
    width: min(132mm, 100%);
    margin: 7mm auto 0;
    border: 1.7px solid #18bca8;
    border-radius: 2.2mm;
    overflow: hidden;
    background-color: #f7fffd !important;
    box-shadow:
      0 0 0 1px rgba(24, 188, 168, 0.2),
      0 2mm 6mm rgba(0, 64, 55, 0.12);
  }

  .sales-print-summary-list div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 5mm;
    border-bottom: 1px solid #8fd7ce;
    padding: 3mm 4mm;
    background-color: #edfffc !important;
  }

  .sales-print-summary-list div:last-child {
    border-bottom: 0;
  }

  .sales-print-summary-list span {
    color: #006f62 !important;
    font-size: 10pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-summary-list strong {
    color: #f27a0a !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15pt;
    font-weight: 900;
    line-height: 1.05;
    text-align: right;
    white-space: nowrap;
  }

  .sales-print-summary-list .sale-print-paid {
    background-color: #effff6 !important;
  }

  .sales-print-summary-list .sale-print-paid span,
  .sales-print-summary-list .sale-print-paid strong {
    color: #008b52 !important;
  }

  .sales-print-summary-list .sale-print-due {
    background-color: #fff1ef !important;
  }

  .sales-print-summary-list .sale-print-due span,
  .sales-print-summary-list .sale-print-due strong {
    color: #d33f32 !important;
  }

  .sales-print-seller-summary {
    width: min(165mm, 100%);
    margin: 7mm auto 0;
    border: 1.7px solid #18bca8;
    border-radius: 2.2mm;
    overflow: hidden;
    background-color: #f7fffd !important;
    box-shadow:
      0 0 0 1px rgba(24, 188, 168, 0.2),
      0 2mm 6mm rgba(0, 64, 55, 0.12);
  }

  .sales-print-seller-summary h3 {
    margin: 0;
    padding: 2.6mm 4mm;
    background-color: #04100e !important;
    color: #19e6cf !important;
    font-size: 10pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-seller-row {
    display: grid;
    grid-template-columns: 34mm 18mm 24mm 28mm 31mm 28mm;
    align-items: center;
    border-bottom: 1px solid #8fd7ce;
    background-color: #edfffc !important;
  }

  .sales-print-seller-row:last-child {
    border-bottom: 0;
  }

  .sales-print-seller-row > * {
    min-width: 0;
    border-right: 1px solid #8fd7ce;
    padding: 2mm 2.2mm;
    color: #06110f !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8.4pt;
    font-weight: 800;
    text-align: center;
  }

  .sales-print-seller-row > *:last-child {
    border-right: 0;
  }

  .sales-print-seller-name {
    margin: 1.2mm;
    border: 1.4px solid hsl(var(--seller-hue), 85%, 45%) !important;
    border-radius: 1.3mm;
    background:
      linear-gradient(180deg, hsla(var(--seller-hue), 100%, 68%, 0.42), hsla(var(--seller-hue), 100%, 43%, 0.2)),
      #f7fffb !important;
    color: hsl(var(--seller-hue), 96%, 28%) !important;
    font-size: 10pt !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.5),
      0 1mm 3mm hsla(var(--seller-hue), 100%, 40%, 0.18);
  }

  .sales-print-seller-row .seller-paid {
    color: #008b52 !important;
  }

  .sales-print-seller-row .seller-due {
    color: #d33f32 !important;
  }

  .sales-print-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4mm;
    align-items: center;
    border-left: 9mm solid #ff8a1f;
    border-radius: 2mm;
    padding: 4mm 5mm;
    background-color: #04100e !important;
    color: #fff !important;
    border-top: 1px solid #0b3d38;
    border-right: 1px solid #0b3d38;
    border-bottom: 1px solid #0b3d38;
  }

  .sales-print-head span,
  .sales-print-head em {
    display: block;
    color: #19e6cf !important;
    font-size: 8pt;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-head strong {
    display: block;
    color: #fff !important;
    font-size: 20pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-head b {
    border: 1.5px solid #ff8a1f;
    border-radius: 2mm;
    padding: 2.5mm 3mm;
    color: #ff8a1f !important;
    font-size: 12pt;
    font-weight: 900;
    background-color: #07110f !important;
  }

  .purchase-print-area h1 {
    margin: 0 0 5mm;
    border: 1.8px solid #00a88f;
    border-left: 7px solid #ff8a1f;
    border-radius: 3mm;
    padding: 4mm 5mm;
    background: #07110f;
    color: #fff;
    font-size: 18pt;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .purchase-print-area h1::after {
    content: "FACTURA DE COMPRA";
    display: block;
    margin-top: 1mm;
    color: #00e6ce;
    font-size: 8pt;
    font-weight: 900;
  }

  .sales-print-ident,
  .sales-print-totals {
    display: grid;
    gap: 4mm;
    margin: 6mm 0;
  }

  .sales-print-ident {
    grid-template-columns: 1fr;
    gap: 0;
    border: 1.6px solid #18bca8;
    border-radius: 2.2mm;
    padding: 0;
    background-color: #edfffc !important;
    overflow: hidden;
    box-shadow:
      0 0 0 1px rgba(24, 188, 168, 0.22),
      0 2mm 5mm rgba(0, 64, 55, 0.12);
  }

  .sales-print-totals {
    grid-template-columns: repeat(3, 1fr);
  }

  .sales-print-payment-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4mm;
    margin: -2mm 0 5mm;
  }

  .sales-print-payment-summary div {
    border: 1.3px solid #18bca8;
    border-radius: 2mm;
    padding: 2.5mm;
    background-color: #edfffc !important;
  }

  .sales-print-payment-summary span {
    display: block;
    color: #006f62 !important;
    font-size: 8pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-payment-summary strong {
    display: block;
    margin-top: 1mm;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13pt;
    font-weight: 900;
  }

  .sales-print-payment-summary .sale-print-paid {
    border-color: #00a86b;
    background-color: #effff6 !important;
  }

  .sales-print-payment-summary .sale-print-paid strong {
    color: #008b52 !important;
  }

  .sales-print-payment-summary .sale-print-due {
    border-color: #d33f32;
    background-color: #fff1ef !important;
  }

  .sales-print-payment-summary .sale-print-due span,
  .sales-print-payment-summary .sale-print-due strong {
    color: #d33f32 !important;
  }

  .print-purchase-totals {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4mm;
    margin-bottom: 7mm;
  }

  .print-provider-line {
    display: grid;
    grid-template-columns: 34mm 1fr;
    align-items: center;
    gap: 2mm;
    border: 1.3px solid #18bca8;
    border-radius: 2mm;
    padding: 2.8mm;
    margin: 0 0 5mm;
    background-color: #edfffc !important;
  }

  .print-provider-line span {
    color: #006f62 !important;
    font-size: 8pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .print-provider-line strong {
    color: #ff7a00 !important;
    font-size: 13pt;
    font-weight: 900;
  }

  .sales-print-totals div {
    border: 1.3px solid #18bca8;
    border-radius: 2mm;
    padding: 2.5mm;
    background-color: #edfffc !important;
  }

  .sales-print-ident div {
    display: grid;
    grid-template-columns: 36mm 1fr;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid #8fd7ce;
    padding: 0;
    background-color: #edfffc !important;
  }

  .sales-print-ident div:last-child {
    border-bottom: 0;
  }

  .sales-print-ident span,
  .sales-print-totals span {
    display: block;
    color: #006f62 !important;
    font-size: 8pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-ident strong,
  .sales-print-totals strong {
    display: block;
    color: #f27a0a !important;
    border: 0;
    border-left: 1px solid #8fd7ce;
    padding: 2mm 3mm;
    background-color: #f8fffd !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12.5pt;
    font-weight: 700;
    line-height: 1.2;
  }

  .sales-print-ident span {
    padding: 2mm 3mm;
    background-color: #e4fbf7 !important;
  }

  .sales-print-type-list {
    display: flex !important;
    flex-wrap: wrap;
    gap: 1.2mm;
    border-left: 1px solid #8fd7ce !important;
    background-color: #f8fffd !important;
    padding: 1.7mm 3mm !important;
  }

  .sales-print-type-badge {
    display: inline-block !important;
    border: 1px solid #6d7b77;
    border-radius: 1.2mm;
    padding: 1mm 1.8mm;
    background:
      linear-gradient(180deg, rgba(120, 132, 128, 0.18), rgba(64, 74, 70, 0.12)),
      #eef2f1 !important;
    color: #31403c !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt !important;
    font-weight: 700 !important;
    text-transform: none !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  }

  .sales-print-vendor {
    border-bottom-color: hsl(var(--seller-hue), 70%, 60%) !important;
    border-color: hsl(var(--seller-hue), 100%, 62%) !important;
    border-width: 0 0 1.4px 0 !important;
    border-style: solid !important;
    border-radius: 0;
    padding: 0 !important;
    background:
      linear-gradient(90deg, hsla(var(--seller-hue), 100%, 48%, 0.18), hsla(var(--seller-hue), 85%, 20%, 0.08)),
      #f8fffd !important;
    box-shadow: inset 0 0 0 1px hsla(var(--seller-hue), 100%, 60%, 0.18);
  }

  .sales-print-vendor span {
    color: hsl(var(--seller-hue), 90%, 34%) !important;
  }

  .sales-print-vendor strong {
    color: hsl(var(--seller-hue), 96%, 28%) !important;
    border: 1.3px solid hsl(var(--seller-hue), 70%, 48%) !important;
    border-radius: 1.2mm;
    margin: 1.4mm 2mm;
    padding: 1.5mm 2.5mm !important;
    background:
      linear-gradient(180deg, hsla(var(--seller-hue), 100%, 70%, 0.42), hsla(var(--seller-hue), 100%, 45%, 0.18)),
      #f7fffb !important;
    font-size: 14pt !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.5),
      0 1mm 3mm hsla(var(--seller-hue), 100%, 40%, 0.18);
  }

  .print-purchase-totals div {
    border: 1.5px solid #ff8a1f;
    border-left: 5px solid #00a88f;
    border-radius: 2mm;
    padding: 3.2mm;
    background: #f7fffd;
    font-size: 10pt;
    box-shadow: inset 0 0 0 1px rgba(0, 168, 143, 0.18);
  }

  .print-purchase-totals span {
    display: block;
    color: #006f62;
    font-size: 8pt;
    font-weight: 700;
    text-transform: uppercase;
  }

  .print-purchase-totals strong {
    display: block;
    margin-top: 1mm;
    color: #d96500;
    font-size: 14pt;
    font-weight: 900;
  }

  .purchase-print-area table {
    min-width: 0;
    width: 100%;
    border-collapse: collapse;
    border: 1.2px solid #07110f;
    border-radius: 2mm;
    overflow: hidden;
    background-color: #fff !important;
  }

  .sales-print-items {
    min-width: 0;
    width: 100%;
    border-collapse: collapse;
    border: 1.6px solid #063f39;
    border-bottom: 2.4px solid #063f39;
    border-radius: 2mm;
    background-color: #f0fffc !important;
    box-shadow:
      0 0 0 1px rgba(0, 168, 143, 0.28),
      0 2mm 5mm rgba(0, 64, 55, 0.18);
  }

  .sales-print-items th,
  .sales-print-items td {
    border: 1.15px solid #67bdb3;
    padding: 1.55mm 2mm;
    background-color: #f0fffc !important;
    color: #06110f !important;
    font-size: 8.5pt;
  }

  .sales-print-items tbody tr:last-child td {
    border-bottom: 1.6px solid #063f39;
  }

  .sales-print-items th {
    background-color: #009f88 !important;
    border: 1.25px solid #067468;
    border-bottom: 1.6px solid #063f39;
    color: #fff !important;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-items th:nth-child(3),
  .sales-print-items td:nth-child(3),
  .sales-print-items th:nth-child(6),
  .sales-print-items td:nth-child(6) {
    color: #f27a0a !important;
    font-weight: 900;
  }

  .sales-print-items th:nth-child(4),
  .sales-print-items td:nth-child(4) {
    border-left: 2px solid #063f39;
  }

  .sales-print-payments {
    margin-top: 5mm;
    border: 1.3px solid #18bca8;
    border-radius: 2mm;
    padding: 2.5mm 3mm;
    background-color: #edfffc !important;
    overflow: hidden;
  }

  .sales-print-payments h3 {
    margin: 0 0 2mm;
    color: #006f62 !important;
    font-size: 10pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-payments table {
    width: calc(100% - 1mm);
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border: 1px solid #07110f;
    border-radius: 2mm;
    overflow: hidden;
    background-color: #fff !important;
  }

  .sales-print-payments th,
  .sales-print-payments td {
    border: 1px solid #8fd7ce;
    padding: 1.45mm 1.6mm;
    color: #06110f !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8pt;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
  }

  .sales-print-payments .payment-method-col {
    width: 47%;
  }

  .sales-print-payments .payment-amount-col {
    width: 24%;
  }

  .sales-print-payments .payment-date-col {
    width: 29%;
  }

  .sales-print-payments th {
    background-color: #009f88 !important;
    color: #fff !important;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-payments .sale-print-debt-row td {
    background-color: #fff1ef !important;
    color: #d33f32 !important;
    font-weight: 900;
  }

  .sales-print-payments th:first-child,
  .sales-print-payments td:first-child {
    text-align: left;
  }

  .sales-print-payments th:nth-child(2),
  .sales-print-payments td:nth-child(2) {
    white-space: nowrap;
  }

  .sales-print-payments th:nth-child(3),
  .sales-print-payments td:nth-child(3) {
    font-size: 7.1pt;
    line-height: 1.12;
  }

  .sales-print-payments-grid {
    display: grid;
    width: 100%;
    border: 1px solid #07110f;
    border-radius: 1.5mm;
    overflow: hidden;
    background-color: #fff !important;
  }

  .sales-print-payment-row {
    display: grid;
    grid-template-columns: 36% 22% 42%;
    align-items: stretch;
    min-width: 0;
    border-bottom: 1px solid #8fd7ce;
  }

  .sales-print-payment-row:last-child {
    border-bottom: 0;
  }

  .sales-print-payment-row span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border-right: 1px solid #8fd7ce;
    padding: 1.35mm 1.1mm;
    color: #06110f !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 7.6pt;
    font-weight: 700;
    line-height: 1.12;
    overflow: hidden;
    text-align: center;
    white-space: normal;
    word-break: break-word;
  }

  .sales-print-payment-row span:first-child {
    justify-content: flex-start;
    text-align: left;
  }

  .sales-print-payment-row span:last-child {
    border-right: 0;
    font-size: 6.9pt;
    white-space: nowrap;
  }

  .sales-print-payment-head span {
    background-color: #009f88 !important;
    color: #fff !important;
    font-size: 7.2pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sales-print-payments-grid .sale-print-debt-row span {
    background-color: #fff1ef !important;
    color: #d33f32 !important;
    font-weight: 900;
  }

  .purchase-print-area th,
  .purchase-print-area td {
    border: 1px solid #8bbdb4;
    color: #000;
    padding: 2.6mm;
    font-size: 9.5pt;
  }

  .purchase-print-area th {
    background: #07110f;
    color: #00e6ce;
    border-color: #00a88f;
    font-weight: 900;
    text-transform: uppercase;
  }

  .purchase-print-area td {
    font-weight: 700;
  }

  .purchase-print-area tbody tr:nth-child(even) td {
    background: #f2fbf8;
  }

  .summary-print-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .summary-print-card {
    page-break-after: always;
    break-after: page;
    min-height: calc(100vh - 16mm);
    border: 1.8px solid #18bca8;
    border-radius: 3mm;
    padding: 6mm;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(24, 188, 168, 0.08) 1px, transparent 1px),
      linear-gradient(0deg, rgba(24, 188, 168, 0.08) 1px, transparent 1px),
      #ffffff;
    background-size: 9mm 9mm;
    box-shadow: inset 0 0 0 1px rgba(24, 188, 168, 0.18);
  }

  .summary-print-card:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .summary-print-card-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4mm;
    align-items: center;
    border-left: 9mm solid #ff8a1f;
    border-radius: 2mm;
    padding: 4mm 5mm;
    background-color: #04100e !important;
    color: #fff !important;
    border-top: 1px solid #0b3d38;
    border-right: 1px solid #0b3d38;
    border-bottom: 1px solid #0b3d38;
    box-shadow: none;
  }

  .summary-print-card-head span,
  .summary-print-card-head em {
    display: block;
    color: #19e6cf !important;
    font-size: 8pt;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
  }

  .summary-print-card-head strong {
    display: block;
    color: #fff !important;
    font-size: 20pt;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: none;
  }

  .summary-print-card-head b {
    border: 1.5px solid #ff8a1f;
    border-radius: 2mm;
    padding: 2.5mm 3mm;
    color: #ff8a1f !important;
    font-size: 12pt;
    font-weight: 900;
    background-color: #07110f !important;
  }

  .summary-print-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4mm;
    margin: 6mm 0;
  }

  .summary-print-totals div {
    border: 1.3px solid #18bca8;
    border-radius: 2mm;
    padding: 2.5mm;
    background-color: #edfffc !important;
    box-shadow: none;
  }

  .summary-print-totals span {
    display: block;
    color: #006f62 !important;
    font-size: 8pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .summary-print-totals strong {
    display: block;
    margin-top: 1mm;
    color: #f27a0a !important;
    border: 1px solid #7a9b98;
    padding: 1.4mm 2mm;
    background-color: #f8fffd !important;
    font-size: 15pt;
    font-weight: 900;
  }

  .summary-print-items {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    border: 1.2px solid #07110f;
    border-radius: 2mm;
    overflow: hidden;
    background-color: #fff !important;
    box-shadow: none;
  }

  .summary-print-items th,
  .summary-print-items td {
    border: 1px solid #8fd7ce;
    padding: 1.55mm 2mm;
    font-size: 8.5pt;
    background-color: #f0fffc !important;
  }

  .summary-print-items th {
    background-color: #00a88f !important;
    color: #fff !important;
    font-weight: 900;
    text-transform: uppercase;
  }

  .summary-print-items th:nth-child(3),
  .summary-print-items td:nth-child(3) {
    border-right: 2.4px solid #07110f;
    box-shadow: inset -1.2mm 0 0 rgba(0, 168, 143, 0.14);
  }

  .summary-print-items td:nth-child(1),
  .summary-print-items td:nth-child(4) {
    font-weight: 700;
  }

  .summary-print-items td:nth-child(2),
  .summary-print-items td:nth-child(5) {
    text-align: right;
  }

  .summary-print-items td:nth-child(3),
  .summary-print-items td:nth-child(6) {
    color: #d96500 !important;
    font-weight: 700;
    text-align: right;
  }

  .summary-print-items th:nth-child(2),
  .summary-print-items th:nth-child(3),
  .summary-print-items th:nth-child(5),
  .summary-print-items th:nth-child(6) {
    text-align: right;
  }
}
