: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-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-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-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;
}

@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;
}

.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;
}

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 {
  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-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-filters {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 2fr 1fr;
  margin-bottom: 0.6rem;
}

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;
}

.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;
}

.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;
}

.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;
}

.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 {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.22);
  background: #ecfeff;
}

.plan-card-current {
  font-size: 0.78rem;
  color: #0f766e;
  font-weight: 700;
}

.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;
}

.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-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-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;
}

@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-actions {
  margin-top: 0.8rem;
}

.stock-detail-actions button {
  margin-top: 0;
}

.stock-detail-edit-form {
  margin-top: 0.9rem;
  max-width: 520px;
}

.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.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;
}

.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-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;
}

.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-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;
}

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;
}
.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%;
  }

  .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;
  }

  .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;
  }

  .plan-cards {
    grid-template-columns: 1fr;
  }

  .sell-search-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sell-mode-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;
  }
}
