:root {
  --blue: #2563eb;
  --blue-soft: #eef6ff;
  --green: #14b8a6;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --sidebar: #f8fbff;
  --sidebar-2: #eaf2ff;
  --sidebar-text: #1f2f46;
  --sidebar-muted: #64748b;
  --sidebar-hover: rgba(37, 99, 235, .08);
  --sidebar-active: rgba(20, 184, 166, .13);
  --sidebar-border: rgba(37, 99, 235, .16);
  --danger: #dc2626;
  --shadow: 0 18px 44px rgba(15, 23, 42, .12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(244, 247, 251, .96), rgba(236, 253, 245, .72)),
    linear-gradient(45deg, #f8fafc 0%, #eff6ff 44%, #f0fdfa 100%);
}

body.theme-elegant {
  --blue: #7c3aed;
  --green: #c084fc;
  --ink: #1f1633;
  --muted: #756987;
  --line: #eadcfb;
  --bg: #fbf7ff;
  --panel: #fffafd;
  --sidebar: #241733;
  --sidebar-2: #160d22;
  --sidebar-text: #fff7ff;
  --sidebar-muted: #dac8ef;
  --sidebar-hover: rgba(255, 255, 255, .13);
  --sidebar-active: rgba(192, 132, 252, .22);
  --sidebar-border: rgba(255, 255, 255, .18);
  background:
    radial-gradient(circle at 18% 12%, rgba(192, 132, 252, .22), transparent 34%),
    linear-gradient(135deg, #fff7ed, #f5f3ff 48%, #fdf2f8);
}

body.theme-gamer {
  --blue: #00e5ff;
  --green: #a3ff12;
  --ink: #e6fbff;
  --muted: #8ab4c1;
  --line: #17485a;
  --bg: #06131d;
  --panel: #0b1f2d;
  --sidebar: #06111a;
  --sidebar-2: #02070d;
  --sidebar-text: #dffbff;
  --sidebar-muted: #8ab4c1;
  --sidebar-hover: rgba(0, 229, 255, .12);
  --sidebar-active: rgba(163, 255, 18, .14);
  --sidebar-border: rgba(0, 229, 255, .26);
  --shadow: 0 18px 44px rgba(0, 229, 255, .13);
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 229, 255, .18), transparent 30%),
    radial-gradient(circle at 80% 8%, rgba(163, 255, 18, .14), transparent 26%),
    linear-gradient(135deg, #02070d, #082032 58%, #111827);
}

body.theme-modern {
  --blue: #0ea5e9;
  --green: #22c55e;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --bg: #f8fafc;
  --panel: #ffffff;
  --sidebar: #0f766e;
  --sidebar-2: #134e4a;
  --sidebar-text: #ecfeff;
  --sidebar-muted: #b5f5ee;
  --sidebar-hover: rgba(255, 255, 255, .14);
  --sidebar-active: rgba(255, 255, 255, .20);
  --sidebar-border: rgba(255, 255, 255, .18);
  background: linear-gradient(135deg, #ffffff, #eff6ff 48%, #ecfdf5);
}

body.theme-dark {
  --blue: #38bdf8;
  --green: #2dd4bf;
  --ink: #e5eef9;
  --muted: #9fb2c7;
  --line: #26384d;
  --bg: #0b1220;
  --panel: #111c2e;
  --sidebar: #060b14;
  --sidebar-2: #030712;
  --sidebar-text: #e5eef9;
  --sidebar-muted: #9fb2c7;
  --sidebar-hover: rgba(56, 189, 248, .12);
  --sidebar-active: rgba(45, 212, 191, .14);
  --sidebar-border: rgba(148, 163, 184, .18);
  --shadow: 0 18px 44px rgba(0, 0, 0, .28);
  background: linear-gradient(135deg, #030712, #111827 52%, #0f172a);
}

body.theme-minimal {
  --blue: #111827;
  --green: #475569;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #fafafa;
  --panel: #ffffff;
  --sidebar: #ffffff;
  --sidebar-2: #f3f4f6;
  --sidebar-text: #111827;
  --sidebar-muted: #6b7280;
  --sidebar-hover: rgba(17, 24, 39, .06);
  --sidebar-active: rgba(17, 24, 39, .09);
  --sidebar-border: rgba(17, 24, 39, .10);
  --shadow: 0 12px 28px rgba(17, 24, 39, .08);
  background: #f7f7f8;
}

body.theme-gamer .card,
body.theme-gamer .modal-content,
body.theme-gamer table,
body.theme-gamer .form-section,
body.theme-gamer .signature-card,
body.theme-gamer .settings-section,
body.theme-gamer .brand-settings-card,
body.theme-gamer .tech-part-row,
body.theme-dark .card,
body.theme-dark .modal-content,
body.theme-dark table,
body.theme-dark .form-section,
body.theme-dark .signature-card,
body.theme-dark .settings-section,
body.theme-dark .brand-settings-card,
body.theme-dark .tech-part-row {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

body.theme-gamer thead,
body.theme-dark thead {
  background: color-mix(in srgb, var(--panel) 84%, var(--blue));
}

body.theme-gamer tbody tr:hover,
body.theme-dark tbody tr:hover {
  background: color-mix(in srgb, var(--panel) 82%, var(--blue));
}

body.theme-gamer input,
body.theme-gamer select,
body.theme-gamer textarea,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: color-mix(in srgb, var(--panel) 88%, black);
  color: var(--ink);
  border-color: var(--line);
}

body.theme-gamer button,
body.theme-dark button {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 28%, transparent);
}

body.theme-gamer button,
body.theme-gamer .button-link,
body.theme-gamer .card,
body.theme-gamer .table-card,
body.theme-gamer .modal,
body.theme-gamer .form-section,
body.theme-gamer .signature-card,
body.theme-gamer .cash-register,
body.theme-gamer .scanner-box,
body.theme-gamer .label-preview,
body.theme-gamer .tech-status-card,
body.theme-gamer .tech-part-row {
  border-color: rgba(0, 229, 255, .42);
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, .32),
    0 0 15px rgba(0, 229, 255, .18),
    0 0 34px rgba(0, 229, 255, .08),
    inset 0 0 0 1px rgba(163, 255, 18, .10),
    inset 0 0 18px rgba(163, 255, 18, .045);
  animation: gamerDualGlow 3.6s ease-in-out infinite;
}

body.theme-gamer input,
body.theme-gamer select,
body.theme-gamer textarea {
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, .18),
    0 0 12px rgba(0, 229, 255, .08);
}

body.theme-gamer input:focus,
body.theme-gamer select:focus,
body.theme-gamer textarea:focus {
  box-shadow:
    0 0 0 3px rgba(0, 229, 255, .22),
    0 0 24px rgba(0, 229, 255, .22),
    inset 0 0 12px rgba(0, 229, 255, .07);
}

body.theme-gamer button:hover,
body.theme-gamer .card:hover,
body.theme-gamer .table-card:hover,
body.theme-gamer .modal:hover,
body.theme-gamer .form-section:hover,
body.theme-gamer .signature-card:hover,
body.theme-gamer .cash-register:hover,
body.theme-gamer .scanner-box:hover,
body.theme-gamer .label-preview:hover,
body.theme-gamer .tech-status-card:hover,
body.theme-gamer .tech-status-card.active {
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, .75),
    0 0 20px rgba(0, 229, 255, .34),
    0 0 46px rgba(0, 229, 255, .18),
    0 16px 34px rgba(0, 229, 255, .18),
    inset 0 0 0 1px rgba(163, 255, 18, .26),
    inset 0 0 24px rgba(163, 255, 18, .13),
    inset 0 0 42px rgba(163, 255, 18, .05);
  animation: gamerDualGlowActive 2.4s ease-in-out infinite;
}

body.theme-gamer .tabs button.active {
  box-shadow:
    inset 3px 0 0 var(--green),
    0 0 18px rgba(163, 255, 18, .22),
    0 0 32px rgba(0, 229, 255, .12);
}

body.theme-gamer .status {
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, .24),
    0 0 12px rgba(0, 229, 255, .10);
}

body.theme-gamer .tabs {
  padding: 16px 14px;
  border-right: 1px solid rgba(0, 0, 0, .92);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .88),
    0 0 18px rgba(0, 229, 255, .18),
    0 0 34px rgba(0, 0, 0, .55),
    inset -1px 0 0 rgba(0, 229, 255, .24);
}

body.theme-gamer .sidebar-brand {
  padding-right: 10px;
}

body.theme-gamer .tabs button {
  border: 1px solid rgba(0, 0, 0, .72);
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, .14),
    0 0 14px rgba(0, 0, 0, .36);
}

body.theme-gamer .tabs button:hover,
body.theme-gamer .tabs button.active {
  border-color: rgba(0, 0, 0, .95);
  box-shadow:
    inset 3px 0 0 var(--green),
    0 0 0 1px rgba(0, 0, 0, .95),
    0 0 18px rgba(0, 229, 255, .28),
    0 0 28px rgba(163, 255, 18, .12);
}

body.theme-elegant .card:hover,
body.theme-elegant button:hover {
  box-shadow: 0 18px 42px rgba(124, 58, 237, .16);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  padding: 10px 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, background .18s ease, color .18s ease, filter .18s ease;
}

button::after,
.button-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.26), transparent);
  transform: translateX(-120%);
  transition: transform .55s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .2);
  filter: saturate(1.08);
}

button:hover::after,
.button-link:hover::after {
  transform: translateX(120%);
}

button:active {
  transform: translateY(0) scale(.985);
  box-shadow: 0 5px 12px rgba(15, 23, 42, .18);
}

button.secondary {
  background: #e2e8f0;
  color: #334155;
}

button.danger {
  background: #fee2e2;
  color: var(--danger);
}

button.ghost {
  background: var(--blue-soft);
  color: var(--blue);
}

button.icon-only {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

button:not(.icon-only) .button-icon {
  margin-right: 6px;
  vertical-align: -5px;
}

.button-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button-link {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  padding: 10px 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, filter .18s ease;
}

.button-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--blue) 22%, transparent);
  filter: saturate(1.08);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent);
  transform: translateY(-1px);
}

input[type="color"] {
  min-height: 44px;
  padding: 4px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.shell {
  min-height: 100vh;
  padding: clamp(8px, 1vw, 18px);
}

.login-card {
  width: min(100%, 430px);
  margin: 7vh auto;
  padding: 34px 32px;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeUp .45s ease both;
}

.brand-lockup {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.brand-mark,
.brand-logo {
  width: clamp(48px, 14vw, 68px);
  height: clamp(48px, 14vw, 68px);
  border-radius: 8px;
  flex: 0 0 auto;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.brand-logo {
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
}

.login-card h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(26px, 7vw, 31px);
  overflow-wrap: anywhere;
}

.login-card p {
  margin: 12px 0 24px;
  color: var(--muted);
}

.login-status-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 40;
  width: min(calc(100vw - 32px), 320px);
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 94%, var(--blue-soft));
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  transform: translate(-50%, -50%);
}

.login-status-logo {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--blue) 38%, var(--line));
  box-shadow: 0 10px 20px rgba(15, 23, 42, .12);
}

.login-status-panel strong {
  color: var(--ink);
  font-size: 16px;
}

.login-status-panel small {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.login-status-panel[data-state="loading"] .login-status-logo {
  animation: loginSpin 1.9s linear infinite;
}

.login-status-panel[data-state="success"] {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  background: color-mix(in srgb, var(--panel) 90%, rgba(20, 184, 166, .12));
}

.login-status-panel[data-state="error"] {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
  background: color-mix(in srgb, var(--panel) 90%, rgba(220, 38, 38, .10));
}

.login-status-panel[data-state="error"] strong {
  color: var(--danger);
}

.login-card form {
  display: grid;
  gap: 12px;
}

.login-card small {
  display: block;
  margin-top: 16px;
  color: var(--muted);
}

.public-order-card {
  width: min(100%, 760px);
  text-align: left;
}

.public-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  min-width: 0;
}

.public-logo {
  width: clamp(52px, 16vw, 72px);
  height: clamp(52px, 16vw, 72px);
  flex: 0 0 auto;
  object-fit: contain;
}

.public-head > div {
  min-width: 0;
}

.public-head h1,
.public-head p {
  overflow-wrap: anywhere;
}

.public-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  width: max-content;
  max-width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--green) 13%, white);
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
  overflow-wrap: anywhere;
}

.public-status span,
.public-section h2,
.public-grid h2 {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.public-status strong {
  font-size: clamp(18px, 4vw, 22px);
  color: var(--blue);
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), max-content));
  justify-content: start;
  gap: 12px;
  margin: 14px 0;
}

.public-grid section,
.public-section {
  width: max-content;
  min-width: min(100%, 230px);
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.public-grid h2,
.public-section h2 {
  margin: 0 0 8px;
}

.public-grid p,
.public-section p {
  margin: 5px 0;
  color: #334155;
}

.public-timeline {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.public-timeline li {
  padding: 8px 10px;
  border-radius: 8px;
  background: white;
}

.public-timeline span,
.public-timeline small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.store-public-card {
  width: min(100%, 1180px);
  margin: 3vh auto;
  text-align: left;
}

.store-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.store-hero-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.store-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.store-cart-button {
  min-width: 118px;
  display: inline-grid;
  grid-template-columns: 36px 28px;
  gap: 2px 9px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  background: var(--green);
  color: white;
}

.store-cart-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-cart-button span {
  min-width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: 18px;
  font-weight: 900;
}

.store-cart-button small {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 900;
  opacity: .9;
}

.store-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.store-product {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 205px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.store-product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: clamp(138px, 24vw, 220px);
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #f8fafc;
}

.store-product-logo {
  object-fit: contain;
  padding: clamp(12px, 4vw, 22px);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.store-product-image.text {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: white;
  font-size: 34px;
  font-weight: 900;
}

.store-product small,
.store-cart-line small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.store-product h2 {
  margin: 8px 0 6px;
  font-size: 18px;
}

.store-product p {
  margin: 0;
  color: var(--muted);
}

.store-product-foot,
.store-cart-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.store-product-foot strong,
.store-cart-total strong {
  color: var(--blue);
  font-size: 22px;
}

.store-product-foot span {
  color: var(--muted);
  font-weight: 800;
}

.store-add-cart {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--green);
  color: white;
}

.store-add-cart span {
  min-width: 26px;
  min-height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .24);
  font-size: 14px;
  font-weight: 900;
}

.store-checkout {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .1);
}

.store-checkout h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.store-cart-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.store-cart-head h2,
.store-cart-head p {
  margin: 0;
}

.store-cart-head p {
  color: var(--muted);
}

.store-cart-head > strong {
  color: var(--blue);
  font-size: 26px;
}

.store-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.store-stepper {
  display: inline-grid;
  grid-template-columns: 34px 32px 34px;
  align-items: center;
  text-align: center;
}

.store-stepper button {
  min-height: 34px;
  padding: 6px;
}

.plan-grid {
  margin-top: 14px;
}

.plan-card p {
  color: var(--muted);
  font-size: .92rem;
  margin: 8px 0 0;
}

.table-card small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.store-cart-total {
  margin: 12px 0 4px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.store-checkout-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.store-cart-floating {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-grid;
  grid-template-columns: 28px 34px;
  gap: 2px 9px;
  align-items: center;
  padding: 11px 15px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
}

.store-cart-floating span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .24);
  font-size: 18px;
  font-weight: 900;
}

.store-cart-floating small {
  grid-column: 1 / -1;
  line-height: 1.05;
}

.store-cart-floating small {
  font-size: 12px;
  font-weight: 900;
  opacity: .9;
}

.store-cart-floating.has-items {
  transform: translateY(-2px);
}

.app[hidden] {
  display: none;
}

.app {
  width: min(100%, calc(100vw - clamp(16px, 2vw, 36px)));
  max-width: none;
  min-height: calc(100vh - clamp(16px, 2vw, 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--shadow);
  animation: fadeUp .35s ease both;
}

.app.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.app.sidebar-collapsed .tabs {
  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;
}

.topbar {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: inline-grid;
  gap: 4px;
  place-content: center;
  padding: 0;
  background: #eef6ff;
  color: var(--blue);
  box-shadow: none;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.topbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.tabs {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: max-content;
  min-width: 218px;
  max-width: 286px;
  height: fit-content;
  max-height: calc(100vh - 44px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(20, 184, 166, .13), transparent 34%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  border-right: 1px solid var(--sidebar-border);
  border-radius: 8px 0 0 8px;
  transition: transform .22s ease, opacity .22s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-width: 190px;
  max-width: 252px;
  padding: 6px 4px 18px;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--sidebar-border);
  color: var(--sidebar-text);
}

.sidebar-brand .brand-mark,
.sidebar-brand .brand-logo {
  width: clamp(38px, 4.5vw, 46px);
  height: clamp(38px, 4.5vw, 46px);
  flex: 0 0 auto;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.sidebar-brand small {
  margin-top: 3px;
  color: var(--sidebar-muted);
}

.tabs button {
  width: max-content;
  min-width: 190px;
  max-width: 252px;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  background: transparent;
  color: var(--sidebar-text);
  box-shadow: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabs button:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
  transform: translateX(5px);
  box-shadow: none;
}

.tabs button.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text);
  box-shadow: inset 3px 0 0 var(--green);
  animation: selectedGlow 2.8s ease-in-out infinite;
}

.view {
  grid-column: 2;
  grid-row: 2;
  display: none;
  padding: clamp(14px, 1.4vw, 24px);
  overflow: auto;
}

.view.active {
  display: block;
  animation: viewIn .22s ease both;
}

body.silent-refresh .view.active,
body.silent-refresh .card,
body.silent-refresh .table-card {
  animation: none !important;
  transition: none !important;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar h2 {
  margin: 0;
  font-size: 22px;
}

.orders-toolbar {
  align-items: stretch;
}

.tech-order-summary {
  flex: 1 1 540px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), max-content));
  justify-content: start;
  gap: 8px;
  max-width: 100%;
}

.tech-status-card {
  display: grid;
  align-content: center;
  justify-items: start;
  width: max-content;
  min-width: 118px;
  max-width: min(100%, 190px);
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.tech-status-card:hover,
.tech-status-card.active {
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, white);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--green) 18%, rgba(15, 23, 42, .08));
}

.tech-status-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tech-status-card strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: clamp(18px, 3vw, 22px);
  line-height: 1;
}

.tech-status-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

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

.filters input,
.filters select {
  width: min(100%, 260px);
}

.order-filter-row {
  flex: 1 1 100%;
  display: grid;
  align-items: center;
  gap: 10px;
}

.technician-order-filter {
  grid-template-columns: minmax(220px, 1.6fr) minmax(108px, .55fr) minmax(145px, .7fr) minmax(160px, .75fr);
}

.staff-order-filter {
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 240px) max-content;
}

.order-filter-row input,
.order-filter-row select,
.order-filter-row button {
  width: 100%;
  min-width: 0;
}

.order-filter-row button {
  white-space: nowrap;
}

@media (orientation: landscape) and (max-height: 560px) and (min-width: 640px) {
  .orders-toolbar {
    gap: 8px;
  }

  .order-filter-row {
    gap: 8px;
  }

  .technician-order-filter {
    grid-template-columns: minmax(180px, 1.5fr) minmax(92px, .55fr) minmax(124px, .72fr) minmax(130px, .75fr);
  }

  .staff-order-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 190px) max-content;
  }

  .order-filter-row input,
  .order-filter-row select,
  .order-filter-row button {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
}

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

.form-section {
  display: grid;
  width: max-content;
  min-width: min(100%, 260px);
  max-width: 100%;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.form-section h3 {
  margin: 0;
  font-size: 16px;
}

.inline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tech-part-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.5fr) minmax(150px, 1.2fr) 80px repeat(2, minmax(115px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profit-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.profit-summary span {
  width: max-content;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ecfeff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.profit-summary strong {
  color: var(--ink);
}

@media (max-width: 980px) {
  .tech-part-row {
    grid-template-columns: 1fr;
  }
}

.billing-profile-card {
  display: grid;
  width: max-content;
  min-width: min(100%, 240px);
  max-width: 100%;
  gap: 12px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--green) 42%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(240, 253, 250, .92), rgba(239, 246, 255, .96));
}

.billing-profile-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-profile-card strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.billing-profile-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.profile-badges,
.doc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: flex-start;
}

.profile-badges span,
.doc-badges span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: white;
  color: #0f766e;
  border: 1px solid rgba(20, 184, 166, .22);
  font-size: 12px;
  text-transform: none;
  overflow-wrap: anywhere;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.check-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 800;
}

.check-tile small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.visual-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.visual-check-tile {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.visual-check-tile.checked {
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  box-shadow: 0 10px 28px rgba(37, 99, 235, .1);
}

.visual-check-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.visual-check-main input {
  margin: 0;
}

.visual-check-media {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--blue) 10%, white);
  border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--line));
  color: var(--blue);
  flex-shrink: 0;
}

.visual-check-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visual-check-fallback {
  font-size: 11px;
  font-weight: 900;
}

.visual-check-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.visual-check-copy strong,
.visual-check-chip span {
  overflow-wrap: anywhere;
}

.visual-check-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.visual-check-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.visual-check-chip select {
  min-width: 0;
}

#stockPdfProductList {
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.pattern-lock {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 8px;
  background: white;
}

.pattern-lock[hidden] {
  display: none;
}

.pattern-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 58px);
  grid-template-rows: repeat(3, 58px);
  gap: 16px;
  justify-content: center;
  touch-action: none;
  user-select: none;
}

.pattern-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.pattern-lines line {
  stroke: var(--green);
  stroke-width: 7;
  stroke-linecap: round;
  opacity: .72;
}

.pattern-dot {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--blue) 25%, var(--line));
  background: #f8fafc;
  color: #64748b;
  font-weight: 900;
}

.pattern-dot.active {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 18%, white);
  color: var(--blue);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 12%, transparent);
}

.pattern-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 172px), max-content));
  justify-content: start;
  gap: 14px;
  margin-bottom: 16px;
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 146px), max-content));
  justify-content: start;
  gap: 10px;
  margin-bottom: 12px;
}

.compact-grid .card {
  padding: 14px;
}

.cash-breakdown {
  margin: 14px 0;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), max-content));
  justify-content: start;
  gap: 14px;
  margin-bottom: 16px;
}

.report-grid section {
  width: max-content;
  min-width: min(100%, 260px);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.report-grid section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card,
.table-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  animation: softEnter .34s cubic-bezier(.2,.8,.2,1) both;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.table-card {
  width: 100%;
  max-width: 100%;
}

.card {
  width: max-content;
  min-width: 172px;
  max-width: min(100%, 270px);
  padding: 16px;
  overflow-wrap: anywhere;
}

.card:hover,
.table-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  box-shadow: 0 24px 54px color-mix(in srgb, var(--blue) 13%, rgba(15, 23, 42, .12));
}

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

.card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.08;
}

.card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.brand-settings-card,
.brand-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-settings-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 16px;
  padding: clamp(16px, 2vw, 24px);
  justify-content: flex-start;
}

.brand-settings-card > div {
  min-width: 0;
  max-width: 760px;
}

.brand-settings-card strong {
  font-size: clamp(24px, 3.2vw, 40px);
  overflow-wrap: anywhere;
}

.brand-settings-card p {
  max-width: 680px;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.35;
}

.settings-detail-card {
  justify-content: space-between;
  align-items: center;
}

.settings-detail-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.settings-detail-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.settings-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.settings-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin: 18px 0;
}

button.settings-selector-card {
  width: 100%;
  min-height: 156px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 18px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

button.settings-selector-card strong {
  width: 100%;
  margin-top: 10px;
  font-size: clamp(20px, 2.3vw, 30px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

button.settings-selector-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.35;
}

button.settings-selector-card.active {
  border-color: color-mix(in srgb, var(--blue) 46%, var(--line));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--blue) 18%, transparent),
    0 20px 42px color-mix(in srgb, var(--blue) 16%, rgba(15, 23, 42, .12));
}

button.settings-selector-card.active span {
  color: var(--blue);
}

.settings-section {
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.section-head h3 {
  margin: 0;
}

.brand-upload {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.settings-logo {
  width: clamp(58px, 16vw, 82px);
  height: clamp(58px, 16vw, 82px);
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: white;
}

.brand-settings-card .settings-logo {
  width: clamp(86px, 9vw, 128px);
  height: clamp(86px, 9vw, 128px);
}

.settings-logo.text {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: white;
  font-size: 24px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .settings-detail-card {
    align-items: flex-start;
  }

  .settings-detail-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.inventory-product-cell,
.product-image-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inventory-product-cell strong,
.inventory-product-cell small {
  display: block;
}

.inventory-product-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-thumb,
.product-image-preview {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #f8fafc;
}

.inventory-thumb {
  width: 48px;
  height: 48px;
}

.product-image-preview {
  width: 112px;
  height: 112px;
}

.inventory-thumb.text,
.product-image-preview.text {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: white;
  font-weight: 900;
}

.product-image-upload {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.whatsapp-qr-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.whatsapp-qr-status {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.whatsapp-qr-status small {
  color: var(--muted);
  font-weight: 800;
}

.whatsapp-qr-image {
  width: min(260px, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  object-fit: contain;
}

.whatsapp-pairing-code {
  width: min(320px, 100%);
  padding: 14px 18px;
  border: 1px dashed var(--blue);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}

.whatsapp-float-alert {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 38;
  width: min(92vw, 430px);
  animation: fadeUp .2s ease both;
}

.whatsapp-float-alert .alert-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line));
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 48px rgba(15, 23, 42, .2);
}

.whatsapp-float-alert .alert-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fee2e2;
  color: var(--danger);
}

.whatsapp-float-alert .alert-icon svg {
  width: 24px;
  height: 24px;
}

.whatsapp-float-alert strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.whatsapp-float-alert p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.whatsapp-float-alert .alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.whatsapp-float-alert .alert-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.manual-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--green) 12%, white));
}

.manual-hero span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-hero h2 {
  margin: 6px 0;
  font-size: 26px;
}

.manual-hero p,
.manual-card p,
.manual-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.manual-device {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 18px 34px rgba(15, 23, 42, .18);
}

.manual-device div {
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.manual-device div:nth-child(2) {
  width: 74%;
  background: #e2e8f0;
}

.manual-device div:nth-child(3) {
  width: 52%;
  background: #94a3b8;
}

.manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.manual-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.manual-shot {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 9px;
}

.manual-icon {
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--green) 13%, white);
  color: var(--green);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.manual-screen {
  width: 82px;
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.manual-screen span {
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
}

.manual-screen span:first-child {
  width: 78%;
  background: var(--blue);
}

.manual-screen span:nth-child(2) {
  width: 100%;
}

.manual-screen span:nth-child(3) {
  width: 58%;
  background: var(--green);
}

.manual-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.manual-card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
}

.manual-card li {
  margin-bottom: 5px;
  line-height: 1.35;
}

.manual-card p {
  margin-top: 9px;
  font-size: 13px;
}

.manual-note {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 7%, white);
}

.manual-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
}

.sale-preview {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--green) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--green) 11%, white);
  color: var(--ink);
  font-size: 14px;
}

.sale-preview strong {
  font-size: 22px;
  font-weight: 900;
}

.sale-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sale-lines {
  display: grid;
  gap: 10px;
}

.client-ready-orders {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 7%, white);
}

.client-ready-orders p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ready-order-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ready-order-list button {
  min-height: 38px;
}

.sale-line {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 96px 130px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.product-combo {
  display: grid;
  gap: 6px;
}

.product-combo input,
.product-combo select {
  width: 100%;
}

.product-combo small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sale-line-remove {
  min-height: 43px;
}

.scanner-box,
.cash-register,
.label-preview,
.code-field {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.scanner-box,
.code-field {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.scanner-preview {
  grid-column: 1 / -1;
}

.scanner-preview video {
  width: min(100%, 420px);
  max-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
}

.native-scanner {
  width: min(100%, 420px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
}

.native-scanner video {
  width: 100% !important;
}

.cash-register {
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  background: color-mix(in srgb, var(--green) 10%, white);
}

.cash-register span,
.label-preview p,
.lookup-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cash-register strong {
  display: block;
  margin-top: 4px;
  font-size: 32px;
  color: var(--blue);
}

.cash-register h3 {
  margin: 0;
}

.label-preview .barcode {
  width: 100%;
  max-width: 360px;
  height: 70px;
  background: white;
  border-radius: 6px;
}

.lookup-status {
  min-height: 18px;
  margin: -4px 0 2px;
}

.lookup-status.ok {
  color: #166534;
}

.lookup-status.warn {
  color: #92400e;
}

.lookup-status.loading {
  color: var(--blue);
}

.invoice-fields {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 8px;
  background: #f8fafc;
}

.invoice-fields[hidden] {
  display: none;
}

.signature-card,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), max-content));
  justify-content: start;
  width: max-content;
  min-width: min(100%, 240px);
  max-width: 100%;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.signature-card p,
.detail-grid p {
  margin: 0;
  color: var(--muted);
}

.checkline {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
}

.checkline input,
.invoice-select {
  width: auto;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  width: 100%;
}

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

.photo-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.photo-file-input {
  display: none !important;
}

.photo-grid figure {
  margin: 0;
  display: grid;
  gap: 7px;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.lock-note {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 800;
}

.empty.small {
  padding: 10px;
  font-size: 13px;
}

.message-history {
  display: grid;
  gap: 8px;
}

.order-message-list {
  margin: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
  box-shadow: none;
}

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

table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  height: auto;
  max-height: 72px;
  overflow: hidden;
}

td:nth-child(2),
td:nth-child(3),
td:nth-child(4) {
  white-space: normal;
  min-width: 130px;
}

td:not(.actions) {
  max-width: 280px;
  text-overflow: ellipsis;
}

td:not(.actions):has(br),
td:not(.actions):has(small),
td:not(.actions):has(strong),
td:not(.actions).work-cell,
td:not(.actions).sales-client-cell,
td:not(.actions).sales-products-cell,
td:not(.actions).sales-responsible-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

td:not(.actions) small {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#orders .table-card table {
  min-width: 1220px;
  table-layout: auto;
}

#orders th:last-child,
#orders td.actions {
  width: 220px;
  min-width: 220px;
}

#inventory .table-card table {
  min-width: 1160px;
}

#inventory th:last-child,
#inventory td.actions {
  width: 190px;
  min-width: 190px;
}

#sales .table-card table,
.sales-table-wrap table {
  min-width: 1320px;
}

#sales th:last-child,
#sales td.actions {
  width: 220px;
  min-width: 220px;
}

.work-cell {
  width: 230px;
  max-width: 260px;
  min-width: 170px;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.sales-table-wrap .table-card {
  max-height: none;
}

.sales-table-wrap table {
  min-width: 1180px;
}

.sales-table-wrap th,
.sales-table-wrap td {
  height: auto;
  max-height: none;
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align: top;
}

.sales-table-wrap .sales-client-cell,
.sales-table-wrap .sales-products-cell,
.sales-table-wrap .sales-responsible-cell {
  white-space: normal;
  overflow-wrap: anywhere;
}

.sales-table-wrap .sales-products-cell {
  max-width: 260px;
  line-height: 1.35;
}

.sales-table-wrap .sales-products-cell br:nth-of-type(n+3) {
  display: none;
}

.sales-table-wrap .actions {
  align-content: flex-start;
  align-items: flex-start;
  max-width: 260px;
}

th {
  color: var(--muted);
  background: #fbfdff;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr {
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

tbody tr:hover {
  background: #f8fafc;
  transform: translateX(2px);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--blue) 38%, transparent);
}

.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: flex-start;
  min-width: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  white-space: normal;
  padding-bottom: 2px;
}

.actions button {
  flex: 0 1 auto;
  padding: 7px 9px;
  font-size: 12px;
  transform-origin: center;
}

.actions button.icon-only,
button.action-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
}

.actions .button-icon,
button.action-icon .button-icon {
  width: 19px;
  height: 19px;
}

.actions button:hover {
  transform: translateY(-2px) scale(1.03);
}

.status {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform .18s ease, box-shadow .18s ease;
}

.status:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
}

.status.ok {
  background: #dcfce7;
  color: #166534;
  animation: statusPulse 2.8s ease-in-out infinite;
}

.status.warn {
  background: #fef3c7;
  color: #92400e;
  animation: statusPulse 3.4s ease-in-out infinite;
}

.status.bad {
  background: #fee2e2;
  color: #991b1b;
}

.empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 18px);
  background: rgba(15, 23, 42, .62);
  animation: fadeIn .15s ease both;
}

.modal-wrap[hidden] {
  display: none;
}

.modal {
  width: min(100%, 580px);
  max-width: calc(100vw - 20px);
  max-height: calc(100dvh - 20px);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 8px;
  background: white;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .28);
  animation: modalIn .22s cubic-bezier(.2,.8,.2,1) both;
}

.modal.wide {
  width: min(96vw, 980px);
}

.modal header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 96%, white);
}

.modal h2 {
  margin: 0;
  min-width: 0;
  font-size: clamp(20px, 5vw, 30px);
  overflow-wrap: anywhere;
}

.modal .icon {
  width: 34px;
  height: 34px;
  padding: 0;
}

#modalBody {
  padding: clamp(14px, 3vw, 20px);
}

#modalBody form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

#modalBody label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

#modalBody input,
#modalBody select,
#modalBody textarea {
  min-width: 0;
}

#modalBody .form-section {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-self: stretch;
}

#modalBody .form-section > .two,
#modalBody .form-section > .three {
  width: 100%;
}

#modalBody .form-section > .three {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  transform: translateX(-50%) translateY(12px);
  max-width: min(92vw, 520px);
  padding: 13px 16px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .95);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.965);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes softEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gamerDualGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(0, 229, 255, .28),
      0 0 13px rgba(0, 229, 255, .14),
      0 0 28px rgba(0, 229, 255, .07),
      inset 0 0 0 1px rgba(163, 255, 18, .08),
      inset 0 0 14px rgba(163, 255, 18, .04);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 229, 255, .46),
      0 0 20px rgba(0, 229, 255, .24),
      0 0 42px rgba(0, 229, 255, .11),
      inset 0 0 0 1px rgba(163, 255, 18, .16),
      inset 0 0 22px rgba(163, 255, 18, .08);
  }
}

@keyframes gamerDualGlowActive {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(0, 229, 255, .60),
      0 0 18px rgba(0, 229, 255, .28),
      0 0 40px rgba(0, 229, 255, .14),
      0 14px 30px rgba(0, 229, 255, .16),
      inset 0 0 0 1px rgba(163, 255, 18, .20),
      inset 0 0 20px rgba(163, 255, 18, .10),
      inset 0 0 34px rgba(163, 255, 18, .04);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(163, 255, 18, .42),
      0 0 26px rgba(0, 229, 255, .42),
      0 0 56px rgba(0, 229, 255, .22),
      0 18px 36px rgba(0, 229, 255, .22),
      inset 0 0 0 1px rgba(163, 255, 18, .34),
      inset 0 0 30px rgba(163, 255, 18, .18),
      inset 0 0 52px rgba(163, 255, 18, .08);
  }
}

@keyframes statusPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 9%, transparent);
  }
}

@keyframes selectedGlow {
  0%, 100% {
    box-shadow: inset 3px 0 0 var(--green), 0 0 0 rgba(20, 184, 166, 0);
  }
  50% {
    box-shadow: inset 3px 0 0 var(--green), 0 0 22px rgba(20, 184, 166, .2);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 980px) {
  .shell {
    padding: 0;
  }

  .app {
    min-height: 100vh;
    display: block;
    border-radius: 0;
  }

  .app.sidebar-collapsed .tabs {
    opacity: 1;
  }

  .app.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 14;
    background: rgba(15, 23, 42, .48);
    animation: fadeIn .18s ease both;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: row;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .tabs {
    position: fixed;
    top: 12px;
    bottom: auto;
    left: 10px;
    z-index: 20;
    width: min(84vw, 310px);
    height: fit-content;
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px;
    overflow-y: auto;
    background:
      linear-gradient(180deg, rgba(20, 184, 166, .13), transparent 34%),
      linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    border-right: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    transform: translateX(-105%);
    opacity: 1;
    box-shadow: 24px 0 48px rgba(15, 23, 42, .28);
  }

  .tabs {
    width: max-content;
    min-width: min(78vw, 218px);
    max-width: min(84vw, 286px);
  }

  .tabs button,
  .sidebar-brand {
    min-width: min(70vw, 190px);
    max-width: min(76vw, 252px);
  }

  .app.sidebar-open .tabs {
    transform: translateX(0);
  }

  .tabs button {
    width: max-content;
    min-width: min(70vw, 190px);
    max-width: min(76vw, 252px);
    color: #cbd5e1;
  }

  .tabs button:hover,
  .tabs button.active {
    background: rgba(20, 184, 166, .16);
    color: white;
    box-shadow: inset 3px 0 0 var(--green);
    transform: translateX(2px);
  }

  .public-head {
    align-items: flex-start;
  }

  .view {
    padding: 18px;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 172px), max-content));
    justify-content: start;
  }

  .tech-order-summary {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), max-content));
    justify-content: start;
    max-width: none;
  }

  .order-filter-row {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

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

  .store-checkout {
    position: static;
  }

  .modal,
  .modal.wide {
    width: min(100%, 760px);
    max-width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }

  .modal header {
    padding: 14px 16px;
  }

  #modalBody {
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .view,
  .topbar {
    padding: 16px;
  }

  .grid,
  .report-grid,
  .two,
  .three,
  .sale-line,
  .scanner-box,
  .code-field {
    grid-template-columns: 1fr;
  }

  .modal-wrap {
    align-items: start;
    padding: 8px;
  }

  .modal,
  .modal.wide {
    width: 100%;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 8px;
  }

  .modal header {
    align-items: flex-start;
    padding: 12px 14px;
  }

  .modal .icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
  }

  #modalBody {
    padding: 14px;
  }

  #modalBody .form-section,
  #modalBody .signature-card,
  #modalBody .detail-grid,
  #modalBody .billing-profile-card {
    width: 100%;
    min-width: 0;
  }

  .tech-order-summary {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), max-content));
    justify-content: start;
  }

  .order-filter-row {
    grid-template-columns: 1fr;
  }

  .card,
  .tech-status-card {
    width: max-content;
    max-width: 100%;
  }

  .brand-settings-card,
  .brand-upload,
  .product-image-upload,
  .public-head,
  .sale-lines-head {
    align-items: stretch;
    flex-direction: column;
  }

  .public-grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-float-alert {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .whatsapp-float-alert .alert-card {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px;
  }

  .store-hero-actions,
  .store-cart-line,
  .store-cart-head {
    grid-template-columns: 1fr;
  }

  .manual-hero,
  .manual-card {
    grid-template-columns: 1fr;
  }

  .manual-shot {
    justify-items: start;
  }

  .store-cart-head {
    display: grid;
  }

  .store-stepper {
    width: 100%;
    grid-template-columns: 44px 1fr 44px;
  }

  .store-cart-floating {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }

  .login-card {
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    display: grid;
    align-content: center;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (min-width: 640px) {
  .order-filter-row.technician-order-filter {
    grid-template-columns: minmax(180px, 1.5fr) minmax(92px, .55fr) minmax(124px, .72fr) minmax(130px, .75fr);
  }

  .order-filter-row.staff-order-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 190px) max-content;
  }
}
