:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --accent: #0f766e;
  --danger: #b91c1c;
  --line: #dbe3ef;
}

.session-plan-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.session-plan-link:hover {
  text-decoration: underline;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: 66px;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(145deg, #e6eef8, var(--bg));
  color: var(--text);
}

body.landing-page {
  padding-top: 0;
  background: #f0fdfa;
}

.landing-hero {
  position: relative;
  overflow: hidden;
  background: #134e4a;
  color: #ffffff;
  padding: 4rem 1.5rem;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
  background-image: radial-gradient(#14b8a6 2px, transparent 2px);
  background-size: 30px 30px;
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 64rem);
  margin: 0 auto;
  text-align: center;
}

.landing-hero-logo {
  width: clamp(88px, 16vw, 140px);
  height: auto;
  display: block;
  margin: 0 auto 0.9rem;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.28));
}

.landing-hero-title {
    font-size: clamp(2.4rem, 6vw, 3.75rem);
    font-weight: 300;
}

.landing-hero-subtitle {
  margin: 0.8rem auto 1.6rem;
  max-width: 42rem;
  font-size: clamp(1.05rem, 2.8vw, 1.5rem);
  color: #ccfbf1;
  font-weight: 300;
}

.landing-hero-subtitle-litle {
  margin: 0.8rem auto 1.6rem;
  max-width: 30rem;
  font-size: clamp(0.90rem, 2.3vw, 1.3rem);
  color: #ccfbf1;
  font-weight: 300;
}

.landing-hero-chip {
  display: inline-block;
  background: #14b8a6;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
  border-radius: 999px;
  padding: 0.75rem 2rem;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
  transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .landing-hero-chip:hover {
    transform: scale(1.05);
  }
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 238, 248, 0.88);
  backdrop-filter: blur(4px);
  transition: opacity 0.24s ease;
}

.app-loading-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.app-loading-box {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.app-loading-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 3px solid rgba(15, 118, 110, 0.2);
  border-top-color: #0f766e;
  animation: app-loading-spin 0.9s linear infinite;
}

.app-loading-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f766e;
  text-transform: capitalize;
}

.sale-payment-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.sale-payment-panel {
  width: min(680px, 100%);
  border-radius: 14px;
  border: 1px solid rgba(219, 227, 239, 0.9);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
  padding: 1rem;
}

.sale-payment-panel h4 {
  margin: 0 0 0.5rem;
}

.sale-payment-total-line {
  margin: 0 0 0.75rem;
  color: #334155;
}

.sale-payment-customer-block {
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.7rem;
}

.sale-payment-customer-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: #0f172a;
}

.sale-payment-customer-block label {
  margin-top: 0;
}

.sale-payment-customer-input {
  margin-top: 0.3rem;
}

.sale-payment-exact-row {
  margin-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  cursor: pointer;
}

.sale-payment-exact-row input[type="checkbox"] {
  margin: 0;
}

.sale-payment-exact-row p {
  margin: 0;
  color: #334155;
  font-weight: 700;
}

.sale-payment-methods-title {
  margin: 0 0 0.4rem;
  color: #334155;
}

.sale-payment-methods {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.sale-payment-method-btn {
  flex: 1 1 160px;
  margin-top: 0;
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--line);
}

.sale-payment-method-btn.is-selected {
  border-color: #0f766e;
  background: #ecfeff;
  color: #0f766e;
}

.sale-payment-mixed-fields {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  background: #f8fafc;
}

.sale-payment-mixed-fields label {
  margin-top: 0;
}

.sale-payment-mixed-preview {
  margin: 0.5rem 0 0;
  color: #334155;
}

.sale-payment-change-preview {
  margin: 0.6rem 0 0;
  color: #166534;
  font-weight: 700;
}

.sale-payment-change-preview.is-warning {
  color: #b91c1c;
}

.sale-payment-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.sale-payment-actions button {
  flex: 1 1 auto;
  margin-top: 0;
}

.sale-payment-processing {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  color: #0f766e;
  font-weight: 700;
}

.sale-payment-toast {
  margin: 0.6rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 700;
}
.employee-shift-panel .subtitle {
  margin-top: 0.6rem;
  margin-bottom: 0.35rem;
}

.shift-employee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.2rem 0;
}

.shift-employee-btn {
  margin-top: 0;
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--line);
  padding: 0.48rem 0.65rem;
}

.shift-employee-btn.is-selected {
  border-color: #0f766e;
  background: #ecfeff;
  color: #0f766e;
}

.cash-closure-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 142;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
}

.cash-closure-detail-card {
  width: min(760px, 100%);
  max-height: min(92vh, 760px);
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid rgba(219, 227, 239, 0.95);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.25);
  padding: 1rem;
}

.cash-closure-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.cash-closure-detail-head h4 {
  margin: 0;
}

.cash-closure-detail-close-btn {
  margin-top: 0;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
}

.cash-closure-detail-grid {
  display: grid;
  gap: 0.45rem;
}

.cash-closure-detail-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.cash-closure-detail-actions button {
  margin-top: 0;
  width: min(240px, 100%);
}

.cash-closure-detail-actions--multi {
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.cash-closure-detail-actions--multi button {
  width: auto;
  min-width: 170px;
}

.cash-closure-detail-row {
  display: grid;
  grid-template-columns: minmax(112px, 38%) 1fr;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.55rem 0.65rem;
}

.cash-closure-detail-key {
  color: #334155;
  font-weight: 700;
}

.cash-closure-detail-value {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.cash-sale-detail-summary-stack {
  display: grid;
  gap: 0.45rem;
}

.cash-sale-detail-summary-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  background: #ffffff;
}

.cash-sale-detail-summary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.cash-sale-detail-summary-table th,
.cash-sale-detail-summary-table td {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.86rem;
  white-space: nowrap;
}

.cash-sale-detail-summary-table th {
  text-align: left;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
}

.cash-sale-detail-summary-table td {
  text-align: left;
  font-weight: 700;
  color: #0f172a;
}

.cash-sale-detail-summary-table tbody tr:last-child td {
  border-bottom: 0;
}

.cash-sale-detail-products-title {
  margin-top: 0.65rem;
  font-weight: 700;
  color: #0f172a;
}

.cash-sale-detail-products-wrap {
  margin-top: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  background: #ffffff;
}

.cash-sale-detail-products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.cash-sale-detail-products-table th,
.cash-sale-detail-products-table td {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.86rem;
  white-space: nowrap;
}

.cash-sale-detail-products-table th {
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
}

.cash-sale-detail-products-table tbody tr:last-child td {
  border-bottom: 0;
}

.cash-sale-detail-products-empty {
  margin-top: 0.45rem;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  padding: 0.6rem;
}

.cash-closure-report-section-title {
  margin-top: 0.65rem;
  font-weight: 700;
  color: #0f172a;
}

.cash-closure-report-note {
  margin-top: 0.55rem;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
  color: #1e293b;
  padding: 0.6rem;
  font-size: 0.88rem;
}

@keyframes app-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.top-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  border-bottom: 1px solid #cfe5ec;
  background: linear-gradient(90deg, #0f766e, #0b5f58);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.24);
}

.top-banner-inner {
  width: min(96%, 1160px);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-banner-title {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.top-banner-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.top-banner-subtitle {
  display: block;
  font-size: 0.86rem;
  opacity: 0.92;
}

.top-banner-logout {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.55rem 0.8rem;
}

.top-banner-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.top-banner-userbadge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  margin-top: 0;
  padding: 0.45rem 0.7rem;
  color: #ffffff;
  min-width: 200px;
}

.top-banner-planbadge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  padding: 0.2rem 0.28rem;
  border: 1px solid transparent;
}

.top-banner-planbadge:focus-visible {
  outline: none;
  border-color: rgba(153, 246, 228, 0.9);
  box-shadow: 0 0 0 2px rgba(153, 246, 228, 0.35);
}

@media (hover: hover) and (pointer: fine) {
  .top-banner-planbadge:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
  }
}

.top-banner-usertext {
  display: grid;
  line-height: 1.15;
}

.top-banner-userline {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  font-size: 0.78rem;
}

.top-banner-useremail {
  opacity: 0.92;
  font-size: 0.73rem;
}

.top-banner-userplan {
  opacity: 0.96;
  font-size: 0.69rem;
  letter-spacing: 0.01em;
  max-width: 66px;
  text-align: center;
}

.top-banner-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0;
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0.55rem 0.75rem;
}

.top-banner-config {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0;
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0.55rem 0.75rem;
}

.top-banner-config.is-active {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

.trial-warning-banner {
  margin: 0.7rem 0 0.55rem;
  border: 1px solid #facc15;
  border-radius: 12px;
  background: #fef9c3;
  color: #78350f;
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.trial-warning-text {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
}

.trial-warning-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0;
  text-decoration: none;
  white-space: nowrap;
  color: #78350f;
  font-weight: 800;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  background: #fde68a;
  padding: 0.46rem 0.68rem;
}

.trial-warning-link::after {
  content: ">";
  font-size: 0.85rem;
}

.trial-warning-link:hover {
  background: #fcd34d;
}

.tenant-message-banner {
  position: sticky;
  top: 66px;
  z-index: 56;
  margin: 0.35rem 0 0.45rem;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
  color: #7c2d12;
  padding: 0.38rem 0.6rem;
}

.tenant-message-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.3;
  font-weight: 700;
  white-space: pre-line;
}

.trial-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(2px);
}

.trial-lock-panel {
  width: min(94vw, 560px);
  border: 1px solid #f59e0b;
  border-radius: 14px;
  background: #fffbeb;
  color: #7c2d12;
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.35);
  padding: 1rem 1.05rem;
}

.trial-lock-panel h3 {
  margin: 0 0 0.45rem;
  color: #7c2d12;
}

.trial-lock-panel p {
  margin: 0;
  font-weight: 600;
  line-height: 1.45;
}

.trial-lock-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.trial-lock-actions a {
  margin-top: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.78rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
}

#trial-lock-update-link {
  background: #b45309;
  color: #ffffff;
  border-color: #92400e;
}

#trial-lock-whatsapp-link {
  background: #0f766e;
  color: #ffffff;
  border-color: #0b5f58;
}

body.trial-lock-active {
  overflow: hidden;
}

.offline-sync-banner {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  margin: 0;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.offline-sync-banner.is-offline {
  background: #991b1b;
  border-color: #fca5a5;
  color: #ffffff;
}

.offline-sync-banner.is-syncing {
  background: #0f766e;
  border-color: #99f6e4;
  color: #ffffff;
}

.offline-sync-banner.is-error {
  background: #b45309;
  border-color: #fcd34d;
  color: #ffffff;
}

.ui-mode-toast {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 130;
  margin: 0;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #99f6e4;
  background: rgba(15, 118, 110, 0.96);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.ui-mode-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.floating-sync-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 96;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.62rem 0.85rem;
  background: #0f766e;
  color: #ffffff;
  border: 1px solid #99f6e4;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.floating-sync-btn.is-loading {
  pointer-events: none;
  opacity: 0.9;
}

.floating-stock-save-btn {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 96;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.62rem 0.85rem;
  background: #0f766e;
  color: #ffffff;
  border: 1px solid #99f6e4;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.container {
  width: min(96%, 1160px);
  padding: 2rem;
  margin: 1rem auto;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  text-align: left;
}

h1 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

h2 {
  margin: 0;
}

.subtitle {
  margin-top: 0;
  color: #64748b;
}

.video-guide {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: #f8fafc;
}

.video-guide-stack {
  display: grid;
  gap: 0.6rem;
}

.video-guide-title {
  margin: 0;
  color: #0f766e;
  font-size: 1rem;
}

.video-guide-toggle {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.video-guide-toggle > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.7rem 0.85rem;
  font-weight: 700;
  color: #0f766e;
}

.video-guide-toggle > summary::-webkit-details-marker {
  display: none;
}

.video-guide-toggle > summary::after {
  content: "+";
  float: right;
}

.video-guide-toggle[open] > summary::after {
  content: "-";
}

.video-guide-player {
  display: block;
  width: 100%;
  max-height: min(62vh, 460px);
  background: #000000;
  border-top: 1px solid #e2e8f0;
}

.subscription-box {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: #f8fafc;
  display: grid;
  gap: 0.55rem;
}

.subscription-box-head {
  display: grid;
  gap: 0.35rem;
}

.subscription-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid #99f6e4;
  background: #ecfeff;
  color: #0f766e;
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.subscription-status.is-pending {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.subscription-status.is-active {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.subscription-status.is-rejected,
.subscription-status.is-cancelled {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.subscription-hint {
  margin: 0;
  color: #334155;
  font-size: 0.9rem;
}

.subscription-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.subscription-actions button {
  margin-top: 0;
}

form {
  display: grid;
  gap: 0.5rem;
  text-align: left;
}

label {
  font-weight: 600;
  margin-top: 0.4rem;
}

input {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
}

select {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
  background: #fff;
}

.product-price-tools {
  border: 1px solid;
    border-radius: 12px;
    background-color: #ff8c006e;
    padding: 10px 5px 10px 5px;
}

input:focus,
select:focus {
  outline: 2px solid #99f6e4;
  border-color: var(--accent);
}

button {
  margin-top: 1rem;
  border: 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  button:hover {
    background: #475569;
  }
}

.scan-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.add-product-submit-btn {
  position: relative;
  min-width: 170px;
}

.add-product-submit-btn.is-loading {
  pointer-events: none;
  opacity: 0.9;
  padding-left: 2rem;
}

.add-product-submit-btn.is-loading::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  top: 50%;
  width: 0.78rem;
  height: 0.78rem;
  margin-top: -0.39rem;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin-add-product-btn 0.8s linear infinite;
}

@keyframes spin-add-product-btn {
  to {
    transform: rotate(360deg);
  }
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.feedback {
  min-height: 1.5rem;
  margin-bottom: 0;
  color: var(--danger);
  font-weight: 600;
}

.hidden {
  display: none !important;
}

body.ui-mode-pc #add-camera-controls,
body.ui-mode-pc #add-scan-feedback,
body.ui-mode-pc #add-scanner-reader,
body.ui-mode-pc #stock-camera-controls,
body.ui-mode-pc #stock-feedback,
body.ui-mode-pc #stock-scanner-reader,
body.ui-mode-pc #start-scan-btn,
body.ui-mode-pc #stop-scan-btn,
body.ui-mode-pc #scanner-reader {
  display: none !important;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.top-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  position: sticky;
  top: 66px;
  z-index: 70;
  background: rgba(244, 246, 251, 0.92);
  backdrop-filter: blur(2px);
  padding-top: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.top-actions-4 {
  display: flex;
}

.top-actions-5 {
  display: flex;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0;
  white-space: nowrap;
  flex: 1 1 0;
}

.mode-btn-secondary {
  background: #334155;
}

.mode-btn.is-active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 3px #99f6e4;
}

.panel {
  background: aliceblue;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}

.metrics-toolbar {
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.metrics-toolbar h3 {
  margin: 0;
}

.metrics-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.metrics-month-strip-wrap,
.metrics-week-selector-wrap {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.45rem;
}

.metrics-month-strip-title,
.metrics-week-selector-title {
  margin: 0;
}

.metrics-month-cards {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.2rem 0.15rem 0.45rem;
  scroll-snap-type: x mandatory;
}

.metrics-month-card {
  flex: 0 0 235px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.65rem;
  display: grid;
  gap: 0.45rem;
}

.metrics-month-card.is-selected {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.16);
}

.metrics-month-card.is-closed {
  background: #f0fdfa;
}

.metrics-month-card.is-open {
  background: #fff7ed;
}

.metrics-month-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.metrics-month-card-title {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.metrics-month-card-state {
  margin: 0;
  font-size: 0.78rem;
  color: #475569;
}

.metrics-month-card-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #334155;
}

.metrics-month-card-action {
  margin-top: 0;
}

.metrics-month-card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.metrics-month-card-actions .metrics-month-card-action {
  flex: 1 1 auto;
}

.metrics-month-card-recalc-btn {
  margin-top: 0;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
}

.metrics-week-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.metrics-week-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 0.34rem 0.58rem;
  font-size: 0.8rem;
}

.metrics-week-pill input {
  margin: 0;
}

.metrics-process-panel {
  width: min(740px, 100%);
}

.metrics-process-list {
  margin: 0.55rem 0 0;
  padding: 0.25rem 0.15rem 0.15rem 1rem;
  max-height: 230px;
  overflow-y: auto;
  display: grid;
  gap: 0.3rem;
  color: #334155;
}

.metrics-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.metrics-controls label {
  margin: 0;
  font-weight: 700;
}

.metrics-controls select {
  max-width: 300px;
  margin-top: 0;
}

.metrics-controls input[type="date"] {
  margin-top: 0;
  max-width: 165px;
}

.metrics-empty {
  margin-top: 0.75rem;
  padding: 0.8rem;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
}

.metrics-content {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.metrics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.metrics-kpi-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.65rem;
}

.metrics-kpi-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: #475569;
}

.metrics-kpi-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.metrics-custom-panel {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  padding: 0.65rem;
}

.metrics-custom-panel h4 {
  margin: 0 0 0.45rem;
  color: #1e3a8a;
}

.metrics-custom-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.metrics-custom-card {
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.55rem;
}

.metrics-custom-card h5 {
  margin: 0 0 0.3rem;
  color: #334155;
  font-size: 0.82rem;
}

.metrics-custom-value {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.metrics-custom-warning {
  margin: 0.55rem 0 0.25rem;
  color: #334155;
}

.metrics-custom-source {
  margin: 0;
  color: #475569;
}

.metrics-fiado-panel {
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  padding: 0.65rem;
}

.metrics-fiado-panel h4 {
  margin: 0 0 0.45rem;
  color: #92400e;
}

.metrics-fiado-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.metrics-fiado-card {
  border: 1px solid #fcd34d;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.55rem;
}

.metrics-fiado-card h5 {
  margin: 0 0 0.3rem;
  color: #92400e;
  font-size: 0.82rem;
}

.metrics-fiado-value {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.metrics-fiado-warning {
  margin: 0.55rem 0 0.25rem;
  color: #7c2d12;
}

.metrics-fiado-source {
  margin: 0;
  color: #a16207;
}

.metrics-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.metrics-chart-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.65rem;
}

.metrics-chart-panel h4 {
  margin: 0 0 0.5rem;
}

.metrics-bar-list {
  display: grid;
  gap: 0.45rem;
}

.metrics-bar-row {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.metrics-bar-label {
  color: #334155;
  font-size: 0.8rem;
}

.metrics-bar-track {
  height: 0.58rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.metrics-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.metrics-bar-fill.success,
.metrics-bar-fill.sales,
.metrics-bar-fill.profit {
  background: linear-gradient(90deg, #22c55e 0%, #15803d 100%);
}

.metrics-bar-value {
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 700;
}

.metrics-ranking-panel,
.metrics-stock-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.65rem;
}

.metrics-ranking-panel h4,
.metrics-stock-panel h4 {
  margin-top: 0;
}

.metrics-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.metrics-section-head h4 {
  margin: 0;
}

.metrics-top-products-note {
  margin-top: 0.45rem;
  margin-bottom: 0.55rem;
}

.metrics-section-head .metrics-section-toggle {
  width: 100%;
  justify-content: flex-start;
}

.metrics-section-toggle {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  padding: 0.38rem 0.6rem;
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--line);
}

.metrics-section-toggle .btn-icon {
  color: #0f766e;
}

.metrics-subsection-title {
  margin: 0 0 0.45rem;
}

.metrics-subsection-title .metrics-section-toggle {
  width: 100%;
  justify-content: flex-start;
}

.metrics-stock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.metrics-stock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.metrics-stock-pie-wrap {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 200px 1fr;
  align-items: center;
  margin: 0.4rem 0 0.8rem;
}

.metrics-stock-caption {
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
}

.metrics-stock-pie {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  position: relative;
  display: block;
  border: 2px solid #e2e8f0;
  box-shadow: inset 0 0 0 20px rgba(255, 255, 255, 0.92);
}

.metrics-stock-pie-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e2e8f0;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 700;
}

.metrics-stock-pie-slice-label {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #0f172a;
  font-size: 0.63rem;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  pointer-events: none;
  white-space: nowrap;
}

.metrics-stock-pie-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #1e293b;
}

.metrics-stock-pie-legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.metrics-stock-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  display: inline-block;
  flex-shrink: 0;
}

.metrics-stock-dot-zero {
  background: #dc2626;
}

.metrics-stock-dot-low {
  background: #facc15;
}

.metrics-stock-dot-ok {
  background: #0f766e;
}

.metrics-stock-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem;
  background: #f8fafc;
}

.metrics-stock-card h5 {
  margin: 0;
  font-size: 0.88rem;
}

.metrics-stock-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.metrics-stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.metrics-stock-item span {
  min-width: 0;
}

.metrics-stock-delete-btn {
  margin-top: 0;
  flex-shrink: 0;
  width: 1.9rem;
  height: 1.9rem;
}

.metrics-ranking-product-cell {
  max-width: 0;
}

.metrics-ranking-product-btn,
.metrics-ranking-product-text {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metrics-ranking-product-btn {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.metrics-ranking-product-btn:hover {
  color: #0f766e;
  text-decoration: underline;
}

#metrics-top-products-wrap table {
  width: 100%;
  table-layout: fixed;
}

#metrics-top-performance-wrap table {
  width: 100%;
  table-layout: fixed;
}

#metrics-top-products-wrap th,
#metrics-top-products-wrap td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#metrics-top-performance-wrap th,
#metrics-top-performance-wrap td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metrics-stock-details-row {
  padding-top: 0.3rem;
}

.metrics-stock-details-btn {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f766e;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.owner-admin {
  margin-top: 1rem;
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}

h3 {
  margin-top: 0;
}

h4 {
  margin: 1rem 0 0.6rem;
}

.icon {
  margin-right: 0.35rem;
}

.feature-list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.feature-item {
  margin: 0;
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.feature-icon {
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.column{
  display: flex;
  flex-direction: column;
}

.stock-summary-panel {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.7rem;
  margin-bottom: 0.7rem;
  position: sticky;
  top: var(--stock-sticky-summary-top, 122px);
  z-index: 68;
  max-height: 999px;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    max-height 0.2s ease,
    margin-bottom 0.2s ease,
    padding 0.2s ease,
    border-color 0.2s ease;
}

.stock-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.stock-summary-head-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.stock-summary-updated-at {
  margin: 0;
  font-size: 0.86rem;
  color: #334155;
}

.stock-summary-head button {
  margin-top: 0;
}

.stock-summary-toggle-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 999px;
}

.stock-summary-collapsed-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #334155;
  font-size: 0.98rem;
}

.stock-summary-body {
  display: grid;
  gap: 0.55rem;
}

.stock-summary-panel.is-collapsed {
  padding: 0.55rem 0.7rem;
  cursor: pointer;
}

.stock-summary-panel.is-collapsed .stock-summary-head {
  display: none;
}

.stock-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stock-summary-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}

.stock-summary-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.15);
}

.stock-summary-pill:focus {
  outline: 2px solid #0ea5a4;
  outline-offset: 1px;
}

.stock-summary-pill.is-active {
  box-shadow: 0 0 0 3px #99f6e4;
}

.stock-summary-pill-total {
  color: #000000;
}

.stock-summary-pill-zero {
  color: #b91c1c;
}

.stock-summary-pill-low {
  color: #ca8a04;
}

.stock-summary-pill-low:hover::after,
.stock-summary-pill-low:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid #dbe3ef;
  background: #0f172a;
  color: #f8fafc;
  padding: 0.35rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
  z-index: 72;
}

.stock-config-panel {
  margin-bottom: 1rem;
}

.config-sections-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
  padding: 0.45rem;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
}

.config-section-btn {
  margin-top: 0;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  padding: 0.45rem 0.72rem;
  font-size: 0.84rem;
}

.config-section-btn.is-active {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .config-section-btn:hover {
    border-color: #0f766e;
    color: #0f766e;
    background: #ecfeff;
  }

  .config-section-btn.is-active:hover {
    color: #ffffff;
    background: #0b5d59;
  }
}

.config-subsection {
  margin-bottom: 1rem;
}

.config-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.config-section-head h4 {
  margin: 0;
}

.sync-center-summary-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.sync-center-summary-card {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.55rem;
}

.sync-center-summary-card h5 {
  margin: 0 0 0.28rem;
  color: #475569;
  font-size: 0.82rem;
}

.sync-center-summary-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

#deleted-products-panel .table-wrap {
  margin-top: 0.5rem;
}

#deleted-sales-panel .table-wrap {
  margin-top: 0.5rem;
}

#deleted-products-table-body td:nth-child(5) {
  font-weight: 700;
}

#deleted-sales-table-body td:nth-child(2) {
  font-weight: 700;
}

.deleted-products-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem 0.7rem;
  align-items: end;
}

.deleted-products-filters label {
  margin: 0;
  font-size: 0.82rem;
  color: #334155;
}

.deleted-products-filters input,
.deleted-products-filters select {
  margin: 0;
}

.deleted-products-action-btn {
  margin: 0;
  font-size: 0.8rem;
  padding: 0.28rem 0.52rem;
}

.deleted-sales-panel {
  margin-top: 1rem;
  border-top: 1px dashed #cbd5e1;
  padding-top: 0.8rem;
}

.stock-filters {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 2fr 1fr auto;
  align-items: center;
  margin-top: 0.55rem;
  margin-bottom: 0;
  background: rgba(248, 250, 252, 0.86);
  padding: 0.35rem 0.4rem;
  border-radius: 10px;
  border: 1px solid #dbe3ef;
}

.stock-filters input,
.stock-filters select {
  margin: 0;
}

.stock-sort-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.stock-sort-switch-btn {
  width: 2.35rem;
  height: 1.3rem;
  margin-top: 0;
  border-radius: 999px;
  border: 1px solid #94a3b8;
  background: #e2e8f0;
  padding: 0.08rem;
  position: relative;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.stock-sort-switch-btn::after {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.22);
  display: block;
  transform: translateX(0);
  transition: transform 0.14s ease;
}

.stock-sort-switch-btn.is-abc {
  background: #0f766e;
  border-color: #0f766e;
}

.stock-sort-switch-btn.is-abc::after {
  transform: translateX(1rem);
}

.stock-sort-switch-btn:focus {
  outline: 2px solid #0ea5a4;
  outline-offset: 1px;
}

.stock-sort-option {
  color: #64748b;
  transition: color 0.12s ease;
}

.stock-sort-option.is-active {
  color: #0f766e;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {

  text-align: center;
  border-bottom: 1px solid var(--line);
  padding: 0.6rem;
  font-size: 0.95rem;
}

#stock-table-body tr[data-stock-row-id] {
  cursor: pointer;
}

#stock-table-body tr[data-stock-row-id]:hover {
  background: #61a77e;
}

thead th {
  text-align: center;
  font-size: 0.85rem;
  color: #ffffff;
  background: #0e6e67;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.scan-actions button {
  margin-top: 0;
}

.cash-owner-action-stack {
  display: grid;
  gap: 0.5rem;
}

.cash-owner-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cash-owner-action-row button {
  margin-top: 0;
}

.cash-shift-action-row {
  margin-top: 0.6rem;
}

.country-autocomplete {
  position: relative;
}

.country-suggestions {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 30;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  max-height: 210px;
  overflow-y: auto;
  padding: 0.2rem;
}

.country-suggestion-item {
  width: 100%;
  text-align: left;
  margin-top: 0;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #0f172a;
  padding: 0.45rem 0.55rem;
}

.country-suggestion-item:hover {
  background: #ecfeff;
}

.register-plan-intro {
  margin: 0.8rem 0 1rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8fbff, #eef4ff);
  padding: 0.75rem 0.85rem;
}

.register-plan-intro-title {
  margin: 0;
  font-size: 1.12rem;
  color: #1e3a8a;
}

.register-plan-intro-subtitle {
  margin: 0.35rem 0 0;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.4;
}

.register-plan-intro-trust {
  margin: 0.45rem 0 0;
  color: #1d4ed8;
  font-size: 0.79rem;
  font-weight: 700;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.plan-card {
  margin-top: 0;
  display: grid;
  gap: 0.3rem;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .plan-card:hover {
    background: #f7fbff;
    border-color: #93c5fd;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.14);
    transform: translateY(-2px);
  }
}

.plan-card-selected-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.plan-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.plan-card-price {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f766e;
}

.plan-card-description {
  font-size: 0.84rem;
  color: #334155;
}

.plan-card-features {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
}

.plan-card-feature-list {
  display: grid;
  gap: 0.18rem;
  font-size: 0.76rem;
  color: #475569;
}

.plan-card-feature-item {
  display: block;
  line-height: 1.35;
}

.plan-card-action {
  margin-top: 0.32rem;
  width: 100%;
  border-radius: 10px;
  background: #0f766e;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.6rem;
  text-align: center;
}

.plan-change-btn {
  margin-top: 0.35rem;
  width: 100%;
  padding: 0.62rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 10px;
}

.plan-card.is-selected,
.plan-card.seleccionado {
  border: 2px solid #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  transform: scale(1.02);
  background: #eff6ff;
}

.plan-card.is-selected .plan-card-action,
.plan-card.seleccionado .plan-card-action {
  background: #2563eb;
}

.plan-card-current {
  font-size: 0.78rem;
  color: #0f766e;
  font-weight: 700;
}

.plan-comparison-host {
  margin-top: 0.85rem;
}

.plan-comparison-block {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8fbff, #eef4ff);
  padding: 0.75rem;
}

.plan-comparison-title {
  margin: 0;
  color: #1e3a8a;
  font-size: 1rem;
}

.plan-comparison-subtitle {
  margin: 0.32rem 0 0;
  color: #334155;
  font-size: 0.83rem;
}

.plan-comparison-scroll {
  margin-top: 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  overflow-x: auto;
}

.plan-comparison-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.plan-comparison-table th,
.plan-comparison-table td {
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.55rem 0.62rem;
  font-size: 0.81rem;
  color: #0f172a;
}

.plan-comparison-table thead th {
  text-transform: none;
  letter-spacing: normal;
  background: #0f766e;
  color: #ffffff;
  font-size: 0.8rem;
}

.plan-comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.plan-comparison-note {
  margin: 0.58rem 0 0;
  color: #475569;
  font-size: 0.77rem;
  line-height: 1.4;
}

.plan-comparison-load-error {
  margin: 0;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.65rem 0.72rem;
}

.sell-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.sell-search-row input {
  margin: 0;
}

.add-barcode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.add-barcode-switch input[type="checkbox"] {
  margin: 0;
  position: absolute;
  left: -9999px;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.add-barcode-switch-slider {
  width: 2.4rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  flex: 0 0 auto;
  transition: background-color 0.2s ease;
}

.add-barcode-switch-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
  transition: transform 0.2s ease;
}

.add-barcode-switch input[type="checkbox"]:checked + .add-barcode-switch-slider {
  background: #0f766e;
}

.add-barcode-switch input[type="checkbox"]:checked + .add-barcode-switch-slider::after {
  transform: translateX(1.02rem);
}

.add-barcode-switch input[type="checkbox"]:focus-visible + .add-barcode-switch-slider {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

#barcode:disabled {
  background: #e2e8f0;
  color: #475569;
  cursor: not-allowed;
}

.sell-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #334155;
}

.sell-mode-switch input[type="checkbox"] {
  width: 2.2rem;
  height: 1.2rem;
  margin: 0;
}

.sale-search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.sale-suggestion-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #0f766e;
  font-size: 0.82rem;
  color: #ffffff;
  cursor: pointer;
}

.sale-suggestion-pill--in {
  background: #0f766e;
}

.sale-suggestion-pill--out {
  background: #b91c1c;
}

.sale-suggestion-empty {
  color: #64748b;
  font-size: 0.88rem;
}

.scanner-box {
  top: 50px;
  margin-top: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem;
  background: #f8fafc;
  min-height: 120px;
}


.btn-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.icon-only-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.9;
  padding-left: 1.8rem !important;
}

.btn-loading::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 50%;
  width: 0.75rem;
  height: 0.75rem;
  margin-top: -0.375rem;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin-delete-btn 0.8s linear infinite;
}
.sale-total-line {
  text-align: right;
  margin-bottom: 0;
}

.sale-custom-wrap {
  margin-top: 0.7rem;
}

.sale-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sale-custom-toggle-btn {
  margin-top: 0;
}

.sale-fiado-open-btn {
  margin-top: 0;
}

.sale-custom-section {
  margin-top: 0.55rem;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.65rem;
}

.sale-custom-section h4 {
  margin: 0 0 0.45rem;
}

.sale-custom-row {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.sale-custom-row label {
  margin-top: 0;
}

.sale-custom-row input {
  margin-top: 0;
}

.sale-custom-section button {
  margin-top: 0.55rem;
}

.sale-custom-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #166534;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sale-fiado-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fiado-clients-admin {
  margin-top: 0.9rem;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.75rem;
}

.fiado-clients-admin h4 {
  margin: 0 0 0.35rem;
}

.fiado-clients-admin form button {
  margin-top: 0.6rem;
}

.fiado-client-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.fiado-client-form-actions button {
  margin-top: 0 !important;
}

.fiado-client-active-switch {
  margin-top: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.fiado-client-active-switch input {
  margin: 0;
}

.fiado-clients-table-wrap {
  margin-top: 0.65rem;
}

.fiado-clients-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.fiado-clients-view-btn {
  background: #0b5cab;
  color: #ffffff;
}

.fiado-clients-charge-btn {
  background: #0f766e;
  color: #ffffff;
}

.fiado-clients-charge-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fiado-clients-state-active {
  color: #166534;
  font-weight: 700;
}

.fiado-clients-state-inactive {
  color: #991b1b;
  font-weight: 700;
}

.fiado-client-detail-card {
  width: min(940px, 100%);
  max-height: min(94vh, 860px);
}

.fiado-client-detail-summary-grid {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.5rem;
}

.fiado-client-detail-kpi {
  border: 1px solid #dbe7ef;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.5rem 0.55rem;
}

.fiado-client-detail-kpi h5 {
  margin: 0;
  font-size: 0.72rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fiado-client-detail-kpi p {
  margin: 0.28rem 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.fiado-client-detail-events {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.55rem;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.fiado-client-detail-event {
  border: 1px solid #dbe7ef;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.58rem 0.62rem;
}

.fiado-client-detail-event--compra {
  border-left: 4px solid #0f766e;
}

.fiado-client-detail-event--pago {
  border-left: 4px solid #0b5cab;
}

.fiado-client-detail-event-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.fiado-client-detail-badge {
  border-radius: 999px;
  padding: 0.12rem 0.48rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.fiado-client-detail-badge--compra {
  background: #dcfce7;
  color: #166534;
}

.fiado-client-detail-badge--pago {
  background: #dbeafe;
  color: #1d4ed8;
}

.fiado-client-detail-id {
  font-size: 0.8rem;
  color: #0f172a;
  font-weight: 700;
}

.fiado-client-detail-date {
  font-size: 0.8rem;
  color: #475569;
  margin-left: auto;
}

.fiado-client-detail-event-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.3rem 0.5rem;
  font-size: 0.84rem;
  color: #1f2937;
}

.fiado-client-detail-subtitle {
  margin-top: 0.5rem;
  font-weight: 700;
  color: #0f172a;
}

.fiado-client-detail-actions {
  margin-top: 0.7rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.fiado-client-detail-actions button {
  margin-top: 0;
  width: auto;
  min-width: 170px;
}

.cash-fiado-panel {
  width: min(560px, calc(100vw - 1rem));
}

.cash-fiado-sales-list {
  margin-top: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.55rem;
  max-height: 230px;
  overflow-y: auto;
  display: grid;
  gap: 0.4rem;
}

.cash-fiado-sale-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.45rem;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.4rem 0.45rem;
}

.cash-fiado-sale-row input[type="checkbox"] {
  margin: 0;
}

.cash-fiado-sale-main {
  display: grid;
  gap: 0.15rem;
}

.cash-fiado-sale-title {
  font-weight: 700;
  color: #0f172a;
}

.cash-fiado-sale-subtitle {
  color: #475569;
  font-size: 0.8rem;
}

.cash-fiado-sale-amount {
  font-weight: 700;
  color: #92400e;
}

.cash-fiado-sale-detail-btn {
  margin-top: 0;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 999px;
  background: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sale-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 0.3rem 0.55rem;
  line-height: 1;
  background: #b91c1c;
}

.sale-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.sale-qty-btn {
  margin-top: 0;
  padding: 0.2rem 0.55rem;
  min-width: 2rem;
  line-height: 1;
  font-weight: 700;
}

.sale-qty-value {
  min-width: 1.4rem;
  text-align: center;
  font-weight: 700;
}

th.sale-col-price-subtotal,
td.sale-col-price-subtotal {
  display: none;
}

.sale-mobile-price-stack {
  display: grid;
  gap: 0.14rem;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.2;
}

.sale-mobile-price-stack span {
  display: block;
  white-space: nowrap;
  font-weight: 700;
}

.stock-danger {
  background-color: #f19797;
}

.stock-warning {
  background-color: #f5ee97;
}

.stock-edit-cell {
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.stock-edit-input {
  width: 92px;
  padding: 0.4rem 0.5rem;
}

.stock-save-btn {
  margin-top: 0;
  padding: 0.45rem 0.7rem;
  white-space: nowrap;
}

.stock-save-btn.icon-only-btn,
.stock-delete-btn.icon-only-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  gap: 0;
}

.stock-save-btn.is-dirty {
  box-shadow: 0 0 0 2px rgba(153, 246, 228, 0.9);
}

.stock-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0;
  padding: 0.45rem 0.7rem;
  background: #b91c1c;
  white-space: nowrap;
}

.stock-delete-btn.is-loading {
  position: relative;
  pointer-events: none;
  padding-left: 1.8rem;
}

.stock-delete-btn.is-loading::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 50%;
  width: 0.75rem;
  height: 0.75rem;
  margin-top: -0.375rem;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin-delete-btn 0.8s linear infinite;
}

.employee-actions-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.employee-edit-overlay-card {
  width: min(560px, 100%);
}

.employee-edit-form label {
  margin-top: 0.55rem;
}

.employee-edit-form input {
  width: 100%;
  margin-top: 0.25rem;
}

.employee-edit-form .feedback {
  margin-top: 0.7rem;
}

.employee-edit-form .cash-closure-detail-actions {
  margin-top: 0.85rem;
}

@keyframes spin-delete-btn {
  to {
    transform: rotate(360deg);
  }
}

.stock-detail-panel {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.9rem;
}

.stock-detail-panel p {
  margin: 0.35rem 0;
}

.stock-detail-overlay-card {
  width: min(680px, 100%);
}

#stock-detail-panel #stock-detail-readonly p {
  margin: 0.35rem 0;
}

.stock-detail-actions {
  margin-top: 0.8rem;
}

.stock-detail-actions button {
  margin-top: 0;
}

.stock-detail-edit-form {
  margin-top: 0.9rem;
  max-width: 100%;
}

.stock-detail-edit-form input,
.stock-detail-edit-form select {
  width: 100%;
}

.stock-detail-edit-submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.6rem;
}

.stock-detail-edit-submit-wrap button {
  margin-top: 0;
  min-width: 180px;
}

.stock-detail-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 10px);
  z-index: 140;
  margin: 0;
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #86efac;
  background: rgba(21, 128, 61, 0.96);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.stock-detail-toast.stock-detail-toast--success {
  border-color: #86efac;
  background: rgba(21, 128, 61, 0.96);
}

.stock-detail-toast.stock-detail-toast--error {
  border-color: #fecaca;
  background: rgba(185, 28, 28, 0.96);
}

.stock-detail-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.add-product-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 10px);
  z-index: 140;
  margin: 0;
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #86efac;
  background: rgba(21, 128, 61, 0.96);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.add-product-toast.add-product-toast--error {
  border-color: #fecaca;
  background: rgba(185, 28, 28, 0.96);
}

.add-product-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cash-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.cash-shift-employees-wrap {
  margin-bottom: 0.65rem;
}

.cash-shift-employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.5rem;
}

.cash-employee-card {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0.55rem 0.45rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #f3f4f6;
  color: #475569;
}

.cash-employee-card.is-active {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
  cursor: pointer;
}

.cash-employee-card.is-active:hover {
  filter: brightness(0.98);
}

.cash-employee-icon {
  width: 1rem;
  height: 1rem;
  color: currentColor;
}

.cash-employee-name {
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.cash-employee-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: #166534;
}

.cash-summary.cash-summary-limited {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cash-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.cash-header-row h3 {
  margin: 0;
}

.cash-section-title {
  margin: 1rem 0 0.6rem;
}

.cash-closures-filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.55rem;
}

.cash-closures-filter-row label {
  margin: 0;
  min-width: 2.2rem;
  font-weight: 600;
  color: #334155;
}

.cash-closures-month-select {
  width: min(260px, 100%);
  margin-top: 0;
}

.cash-section-toggle {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  width: 100%;
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

.cash-section-toggle .btn-icon {
  color: #0f766e;
}

@media (hover: hover) and (pointer: fine) {
  .cash-section-toggle:hover {
    background: #ecfeff;
    color: #0f766e;
  }
}

.cash-privacy-toggle {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.cash-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
  background: #f8fafc;
}

.cash-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: #475569;
}

.cash-card-clickable {
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.cash-card-clickable:focus,
.cash-card-clickable:hover {
  border-color: #38bdf8;
  background: #ecfeff;
}

.cash-card-clickable:active {
  transform: translateY(1px);
}

.cash-value {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.cash-split-line {
  margin: 0.32rem 0 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.cash-split-cash {
  color: #15803d;
}

.cash-split-virtual {
  color: #0284c7;
}

.cash-split-start {
  color: #ca8a04;
}

.cash-split-profit {
  color: #7c3aed;
}

.cash-table-loading-row td {
  background: #f8fafc;
  text-align: center;
}

.cash-table-loading-inline {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #334155;
  font-weight: 700;
}

.cash-table-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  border-top-color: #0f766e;
  display: inline-block;
  animation: app-loading-spin 0.9s linear infinite;
}

#cash-custom-pending-alert {
  margin-top: 0.45rem;
  border: 1px solid #facc15;
  border-radius: 10px;
  background: #fffbeb;
  padding: 0.5rem 0.65rem;
  color: #92400e;
  font-weight: 700;
}

.sync-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 0.28rem;
  vertical-align: middle;
}

.sync-state-badge.unsynced {
  color: #b45309;
}

.cash-row-action-btn {
  margin-top: 0;
  margin-right: 0.28rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  background: #b91c1c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.cash-row-action-btn.cash-row-action-btn-view {
  background: #0f766e;
}

#cash-sales-table-body tr.employee-tone-1 td,
#cash-closures-table-body tr.employee-tone-1 td {
  background: #ecfeff;
}

#cash-sales-table-body tr.employee-tone-2 td,
#cash-closures-table-body tr.employee-tone-2 td {
  background: #eff6ff;
}

#cash-sales-table-body tr.employee-tone-3 td,
#cash-closures-table-body tr.employee-tone-3 td {
  background: #f0fdf4;
}

#cash-sales-table-body tr.employee-tone-4 td,
#cash-closures-table-body tr.employee-tone-4 td {
  background: #fff7ed;
}

#cash-sales-table-body tr.employee-tone-5 td,
#cash-closures-table-body tr.employee-tone-5 td {
  background: #fdf2f8;
}

body.ui-mode-mobile th.sale-col-code,
body.ui-mode-mobile td.sale-col-code,
body.ui-mode-mobile th.sale-col-price,
body.ui-mode-mobile td.sale-col-price,
body.ui-mode-mobile th.sale-col-subtotal,
body.ui-mode-mobile td.sale-col-subtotal {
  display: none;
}

body.ui-mode-mobile th.sale-col-price-subtotal,
body.ui-mode-mobile td.sale-col-price-subtotal {
  display: table-cell;
}

body.ui-mode-mobile #cash-panel th.cash-closure-col-user,
body.ui-mode-mobile #cash-panel td.cash-closure-col-user,
body.ui-mode-mobile #cash-panel th.cash-closure-col-sales,
body.ui-mode-mobile #cash-panel td.cash-closure-col-sales,
body.ui-mode-mobile #cash-panel th.cash-closure-col-cash,
body.ui-mode-mobile #cash-panel td.cash-closure-col-cash,
body.ui-mode-mobile #cash-panel th.cash-closure-col-virtual,
body.ui-mode-mobile #cash-panel td.cash-closure-col-virtual {
  display: none;
}

body.ui-mode-mobile #cash-panel th.cash-sale-col-user,
body.ui-mode-mobile #cash-panel td.cash-sale-col-user,
body.ui-mode-mobile #cash-panel th.cash-sale-col-items,
body.ui-mode-mobile #cash-panel td.cash-sale-col-items,
body.ui-mode-mobile #cash-panel th.cash-sale-col-cash,
body.ui-mode-mobile #cash-panel td.cash-sale-col-cash,
body.ui-mode-mobile #cash-panel th.cash-sale-col-virtual,
body.ui-mode-mobile #cash-panel td.cash-sale-col-virtual {
  display: none;
}

body.ui-mode-mobile #cash-closures-table-body tr.cash-closure-row {
  cursor: pointer;
}

body.ui-mode-mobile #cash-sales-table-body tr.cash-sale-row {
  cursor: pointer;
}

body.ui-mode-mobile #cash-closures-table-body tr.cash-closure-row td {
  transition: filter 0.16s ease;
}

body.ui-mode-mobile #cash-sales-table-body tr.cash-sale-row td {
  transition: filter 0.16s ease;
}

body.ui-mode-mobile #cash-closures-table-body tr.cash-closure-row:active td {
  filter: brightness(0.96);
}

body.ui-mode-mobile #cash-sales-table-body tr.cash-sale-row:active td {
  filter: brightness(0.96);
}

body.ui-mode-mobile .cash-closure-detail-overlay {
  padding: 0.65rem;
}

body.ui-mode-mobile .cash-closure-detail-card {
  width: 100%;
  min-height: calc(100vh - 1.3rem);
  max-height: calc(100vh - 1.3rem);
  border-radius: 16px;
}

body.ui-mode-mobile .cash-closure-detail-row {
  grid-template-columns: 1fr;
  gap: 0.25rem;
}

body.ui-mode-mobile .cash-closure-detail-value {
  text-align: left;
}

body.ui-mode-mobile .cash-closure-detail-actions--multi button {
  width: 100%;
  min-width: 0;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


.install-app-btn {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 97;
  margin: 0;
  border-radius: 999px;
  padding: 0.54rem 0.82rem;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
}

.install-app-btn:not(.is-active) {
  display: none;
}

.global-sync-status-bar {
  position: sticky;
  bottom: 0;
  z-index: 88;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #dbe3ef;
  border-bottom: 1px solid #dbe3ef;
  backdrop-filter: blur(6px);
}

.global-sync-status-bar.has-warning {
  background: #fff8e1;
  border-top-color: #facc15;
  border-bottom-color: #facc15;
}

.global-sync-status-bar.has-error {
  background: #fef2f2;
  border-top-color: #f87171;
  border-bottom-color: #f87171;
}

.global-sync-status-inner {
  width: min(96%, 1160px);
  margin: 0 auto;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.35rem 0;
}

.global-sync-status-title {
  color: #0f172a;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.global-sync-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.24rem 0.6rem;
}

.global-sync-status-link {
  cursor: pointer;
}

.global-sync-status-inner button {
  margin-top: 0;
}

.global-sync-status-link:hover {
  background: #ecfeff;
}
.site-footer {
  width: 100%;
  margin-top: 1rem;
  border-top: 1px solid #dbe3ef;
  background: rgba(255, 255, 255, 0.86);
}

.site-footer-inner {
  width: min(96%, 1160px);
  margin: 0 auto;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: #334155;
  font-size: 0.9rem;
}

.site-footer-inner-contact {
  min-height: 64px;
  padding: 0.55rem 0;
}

.site-footer-contact-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid #cfe5ec;
  border-radius: 999px;
  background: #ffffff;
  padding: 0.4rem 0.75rem;
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.site-footer-contact-link:hover {
  background: #ecfeff;
  text-decoration: none;
}

.site-footer-contact-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-footer-contact-icon svg {
  width: 100%;
  height: 100%;
}

.site-footer-copy {
  color: #475569;
  font-size: 0.86rem;
  white-space: nowrap;
}

.site-footer a {
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  body {
    padding-top: 62px;
  }

  .top-banner-inner {
    width: 100%;
    padding: 0 0.8rem;
    height: 52px;
  }

  .top-banner-title {
    font-size: 0.92rem;
  }

  .top-banner-subtitle {
    font-size: 0.74rem;
  }

  .trial-warning-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .trial-warning-link {
    width: 100%;
  }

  .tenant-message-banner {
    top: 58px;
    margin: 0.28rem 0 0.4rem;
    padding: 0.34rem 0.55rem;
  }

  .tenant-message-text {
    font-size: 0.8rem;
  }

  .trial-lock-panel {
    padding: 0.9rem;
  }

  .trial-lock-actions a {
    width: 100%;
  }

  .offline-sync-banner {
    top: 58px;
    width: calc(100% - 1rem);
    max-width: 460px;
    border-radius: 12px;
  }

  .install-app-btn {
    top: 58px;
    width: fit-content;
    max-width: calc(100% - 1rem);
  }

  .floating-sync-btn {
    right: 10px;
    bottom: 12px;
    padding: 0.56rem 0.72rem;
    font-size: 0.84rem;
  }

  body.ui-mode-mobile.mode-sell .floating-sync-btn {
    bottom: calc(98px + env(safe-area-inset-bottom, 0px));
  }

  .floating-stock-save-btn {
    left: 10px;
    bottom: 12px;
    padding: 0.56rem 0.72rem;
    font-size: 0.84rem;
  }

  .container {
    width: 100%;
    border-radius: 0;
    min-height: 100vh;
    padding: 1rem 0.8rem;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .top-banner-logout {
    padding: 0.5rem 0.62rem;
    font-size: 0.76rem;
  }

  body.ui-mode-mobile .top-banner-config,
  body.ui-mode-mobile .top-banner-logout {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
  }

  body.ui-mode-mobile .top-banner-config > span:not(.btn-icon),
  body.ui-mode-mobile .top-banner-logout > span:not(.btn-icon) {
    display: none;
  }

  .top-banner-userbadge {
    min-width: 0;
    max-width: 180px;
    padding: 0.42rem 0.55rem;
  }

  .top-banner-planbadge {
    padding: 0.14rem 0.2rem;
  }

  .top-banner-userline {
    max-width: 128px;
    font-size: 0.7rem;
  }

  .top-banner-useremail {
    font-size: 0.67rem;
  }

  .top-banner-userplan {
    font-size: 0.64rem;
    max-width: 54px;
  }

  .top-banner-mode-toggle {
    padding: 0.5rem 0.62rem;
    font-size: 0.76rem;
  }

  body.ui-mode-mobile .top-banner-mode-toggle {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
  }

  body.ui-mode-mobile .top-banner-mode-toggle > span:not(.btn-icon) {
    display: none;
  }

  .top-actions,
  .top-actions-4 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    top: 62px;
    gap: 0.45rem;
    overflow-x: visible;
  }

  .mode-btn {
    /* flex: 0 1 calc(50% - 0.45rem); */
    max-width: 320px;
    font-size: 0.77rem;
    padding: 0.58rem 0.62rem;
  }

  .subscription-actions button {
    width: 100%;
  }

  .stock-filters {
    grid-template-columns: 1fr;
  }

  .stock-sort-switch {
    justify-content: flex-start;
  }

  .stock-summary-metrics {
    flex-direction: row;
  }

  .metrics-kpi-grid,
  .metrics-chart-grid,
  .metrics-stock-grid {
    grid-template-columns: 1fr;
  }

  .metrics-toolbar-actions {
    width: 100%;
  }

  .metrics-toolbar-actions button {
    flex: 1 1 140px;
  }

  .metrics-month-card {
    flex-basis: 86vw;
  }

  .metrics-week-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .metrics-controls {
    align-items: stretch;
  }

  .metrics-controls label {
    width: 100%;
  }

  .metrics-controls select,
  .metrics-controls input[type="date"],
  .metrics-controls button {
    width: 100%;
    max-width: 100%;
  }

  .metrics-stock-pie-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  #metrics-panel {
    overflow-x: hidden;
  }

  #metrics-panel .metrics-content,
  #metrics-panel .metrics-chart-panel,
  #metrics-panel .metrics-ranking-panel,
  #metrics-panel .metrics-stock-panel {
    min-width: 0;
    max-width: 100%;
  }

  #metrics-panel .table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .metrics-stock-pie {
    width: 170px;
    height: 170px;
    font-size: 1.2rem;
    box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.92);
  }

  .metrics-bar-row {
    grid-template-columns: 52px 1fr auto;
  }

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

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

  .sync-center-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-cards {
    grid-template-columns: 1fr;
  }

  .plan-comparison-block {
    padding: 0.65rem;
  }

  .plan-comparison-table {
    min-width: 540px;
  }

  .sell-search-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sell-mode-switch {
    justify-content: flex-start;
  }

  .sale-custom-section {
    padding: 0.55rem;
  }

  .sale-secondary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .add-barcode-switch {
    justify-content: flex-start;
  }

  .stock-edit-cell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    width: 100%;
  }

  .stock-edit-input {
    grid-column: 1 / -1;
    width: 100%;
  }

  .stock-save-btn,
  .stock-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
    width: 100%;
  }

  .cash-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sell-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.55rem;
    margin: 0 auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 14px 14px 0 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
  }

  #sell-panel {
    padding-bottom: 7.2rem;
  }

  body.ui-mode-mobile.mode-cash .cash-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    width: 100%;
    z-index: 55;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding: 0.55rem;
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }

  body.ui-mode-mobile.mode-cash .cash-owner-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  body.ui-mode-mobile.mode-cash .cash-owner-action-row:first-child {
    grid-template-columns: 1fr;
  }

  body.ui-mode-mobile.mode-cash #cash-panel {
    padding-bottom: 10rem;
  }

  body.ui-mode-mobile.mode-cash .floating-sync-btn {
    bottom: calc(128px + env(safe-area-inset-bottom, 0px));
  }

  .site-footer-inner {
    width: 100%;
    padding: 0 0.8rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    font-size: 0.8rem;
    text-align: center;
  }

  .site-footer-contact-list {
    justify-content: center;
  }

  .site-footer-copy {
    width: 100%;
    white-space: normal;
  }

  .global-sync-status-inner {
    padding: 0.45rem 0.7rem;
  }

  .config-sections-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .deleted-products-filters {
    grid-template-columns: 1fr 1fr;
  }
}
