/* ============================
   Cuadre - Custom Styles v3
   Modern Android-First Design
   ============================ */

/* ---- Cordova WebView Fixes ---- */
html { font-size: 16px !important; -webkit-text-size-adjust: 100% !important; text-size-adjust: 100% !important; }
body { -webkit-text-size-adjust: 100% !important; text-size-adjust: 100% !important; overflow-x: hidden; }
.flex-1, .grid > div, .card, .dash-stat, .dash-action { min-width: 0; overflow: hidden; }

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #f8faf9;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c8c8d0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a0a0a8; }

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ===================== VIEW TRANSITIONS ===================== */
.view-container {
  animation: viewEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  max-width: 100%;
  overflow-x: hidden;
}
.view-container.view-exit {
  animation: viewExit 0.15s cubic-bezier(0.4, 0, 1, 1) both;
}
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes viewExit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* Staggered children animation */
.stagger > * {
  opacity: 0;
  animation: staggerIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger > *:nth-child(1) { animation-delay: 0.04s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.16s; }
.stagger > *:nth-child(5) { animation-delay: 0.20s; }
.stagger > *:nth-child(6) { animation-delay: 0.24s; }
.stagger > *:nth-child(7) { animation-delay: 0.28s; }
.stagger > *:nth-child(8) { animation-delay: 0.32s; }
.stagger > *:nth-child(n+9) { animation-delay: 0.36s; }
@keyframes staggerIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===================== CARD ===================== */
.card {
  background: white;
  border-radius: 16px;
  border: 1px solid #e8e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  transition: box-shadow 0.25s, transform 0.25s;
}
.card-hover { cursor: pointer; }
.card-hover:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}
.card-hover:active { transform: scale(0.98) translateY(0); }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.125rem; border-radius: 12px; font-size: 0.875rem; font-weight: 600;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1); cursor: pointer; border: none;
  outline: none; text-decoration: none; white-space: nowrap;
  position: relative; overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
.btn::after {
  content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.btn:active::after { background: rgba(255,255,255,0.15); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  box-shadow: 0 2px 8px rgba(4,120,87,0.25);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(4,120,87,0.35);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: scale(0.96) translateY(0); }
.btn-outline { background: transparent; border: 1.5px solid #d6d3d1; color: #44403c; }
.btn-outline:hover:not(:disabled) { background: #f5f5f4; border-color: #a8a29e; }
.btn-ghost { background: transparent; color: #44403c; }
.btn-ghost:hover:not(:disabled) { background: #f5f5f4; }
.btn-destructive {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white; box-shadow: 0 2px 8px rgba(220,38,38,0.25);
}
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; border-radius: 10px; }
.btn-lg { padding: 0.875rem 1.5rem; font-size: 1rem; border-radius: 14px; }
.btn-icon { padding: 0.5rem; border-radius: 12px; min-width: 40px; min-height: 40px; }

/* ===================== INPUTS ===================== */
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1.5px solid #e0e0e8; border-radius: 12px; font-size: 16px;
  background: white; outline: none; font-family: inherit; color: #1a1a2e;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5,150,105,0.12);
}
.input::placeholder { color: #a0a0a8; }
textarea.input { height: auto; min-height: 80px; resize: vertical; padding: 12px 14px; }

/* ===================== BADGE ===================== */
.badge {
  display: inline-flex; align-items: center; padding: 2px 10px;
  border-radius: 99px; font-size: 0.75rem; font-weight: 500;
  border: 1px solid #e8e8f0; background: #f5f5f8; color: #6b6b80;
  transition: all 0.2s;
}
.badge-amber { background: #fef9ec; color: #92400e; border-color: #fde68a; }
.badge-emerald { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.badge-red { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.badge-blue { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* ===================== DIALOG ===================== */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0); display: flex;
  align-items: center; justify-content: center; padding: 1rem;
  animation: dialogBackdropIn 0.2s ease forwards;
  -webkit-tap-highlight-color: transparent;
}
@keyframes dialogBackdropIn {
  from { background: rgba(0,0,0,0); }
  to { background: rgba(0,0,0,0.5); }
}
.dialog-panel {
  background: white; border-radius: 20px; width: 100%;
  max-width: 28rem; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 25px 60px -12px rgba(0,0,0,0.3);
  animation: dialogPanelIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  -webkit-overflow-scrolling: touch;
}
@keyframes dialogPanelIn {
  from { opacity: 0; transform: scale(0.9) translateY(24px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.dialog-header {
  padding: 20px 20px 16px; display: flex;
  align-items: center; justify-content: space-between;
}
.dialog-header h3 { font-size: 1.0625rem; font-weight: 700; margin: 0; color: #1a1a2e; }
.dialog-body { padding: 0 20px 20px; }
.dialog-footer {
  padding: 16px 20px; border-top: 1px solid #f0f0f5;
  display: flex; justify-content: flex-end; gap: 0.5rem;
}

/* ===================== SHEET (Bottom Drawer) ===================== */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0);
  animation: sheetBackdropIn 0.25s ease forwards;
  -webkit-tap-highlight-color: transparent;
}
@keyframes sheetBackdropIn {
  from { background: rgba(0,0,0,0); }
  to { background: rgba(0,0,0,0.5); }
}
.sheet-panel {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: white; border-radius: 20px 20px 0 0;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.12);
  animation: sheetIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  -webkit-overflow-scrolling: touch;
}
@keyframes sheetIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-handle {
  width: 36px; height: 4px; background: #d4d4dc;
  border-radius: 99px; margin: 10px auto 4px;
}
.sheet-header {
  padding: 12px 20px; border-bottom: 1px solid #f0f0f5;
  display: flex; align-items: center; justify-content: space-between;
}
.sheet-body { padding: 16px 20px 32px; }

/* ===================== TOAST ===================== */
.toast {
  pointer-events: auto; margin-top: 0.5rem; padding: 12px 16px;
  border-radius: 14px; font-size: 0.875rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  animation: toastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  min-width: 16rem; max-width: 24rem;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-success { background: linear-gradient(135deg, #059669, #047857); color: white; }
.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.toast-info { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.toast-exit { animation: toastOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards; }
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* ===================== TABS ===================== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid #e8e8f0; }
.tab {
  padding: 12px 16px; font-size: 0.875rem; font-weight: 500;
  color: #8888a0; cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.2s; position: relative;
}
.tab:hover { color: #44403c; }
.tab.active { color: #059669; font-weight: 600; }
.tab.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: #059669; border-radius: 1px;
  animation: tabLineIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes tabLineIn {
  from { transform: scaleX(0); } to { transform: scaleX(1); }
}

/* ===================== PROGRESS BAR ===================== */
.progress-bar {
  height: 6px; background: #e8e8f0; border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, #059669, #34d399);
  border-radius: 99px; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===================== PIN PAD ===================== */
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #d4d4dc; transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.pin-dot.filled { background: #059669; border-color: #059669; transform: scale(1.2); box-shadow: 0 0 8px rgba(5,150,105,0.3); }
.pin-dots-wrap { display: flex; justify-content: center; gap: 14px; margin: 20px 0; }
.pin-error { color: #dc2626; font-size: 0.8125rem; text-align: center; margin-bottom: 12px; animation: fadeIn 0.2s; }
.pin-error.hidden { display: none; }
.pin-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-width: 220px; margin: 0 auto;
}
.pin-spacer { }
.pin-key {
  width: 64px; height: 64px; border-radius: 16px; border: 1px solid #e8e8f0;
  background: white; font-size: 1.25rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none; -webkit-user-select: none;
  justify-self: center; color: #1a1a2e;
}
.pin-key:active { background: #f0f0f5; transform: scale(0.9); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.pin-key-del { color: #a0a0a8; }
.btn-back {
  display: block; margin: 16px auto 0; background: none; border: none;
  color: #8888a0; font-size: 0.8125rem; cursor: pointer; padding: 8px;
  -webkit-tap-highlight-color: transparent;
}
.btn-back:active { color: #059669; }

/* ===================== LOGIN ===================== */
.login-bg {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #064e3b 0%, #065f46 30%, #1a1a2e 100%);
  padding: 24px;
  position: relative; overflow: hidden;
}
.login-bg::before {
  content: ''; position: absolute; top: -50%; right: -50%;
  width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle, rgba(5,150,105,0.15) 0%, transparent 70%);
}
.login-card {
  max-width: 380px; width: 100%; text-align: center;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
  border-radius: 24px; padding: 32px 24px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.2);
  animation: loginCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative; z-index: 1;
}
@keyframes loginCardIn {
  from { opacity: 0; transform: scale(0.9) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.login-logo-wrap {
  width: 72px; height: 72px; border-radius: 20px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(5,150,105,0.15);
}
.login-logo { width: 44px; height: 44px; object-fit: contain; }
.login-title {
  font-size: 1.5rem; font-weight: 800; color: #1a1a2e;
  margin-bottom: 4px; letter-spacing: -0.02em;
}
.login-subtitle { font-size: 0.8125rem; color: #8888a0; margin-bottom: 8px; }
.login-step-label { font-size: 0.8125rem; color: #6b6b80; margin-bottom: 16px; }
.login-users-section { animation: fadeIn 0.3s ease; }
.login-users-grid {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.login-user-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 16px; border-radius: 16px; cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  border: 2px solid transparent; background: none;
  -webkit-tap-highlight-color: transparent;
}
.login-user-btn:active { transform: scale(0.93); background: #f5f5f8; }
.login-avatar {
  width: 48px; height: 48px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; color: white;
  font-weight: 700; font-size: 1.125rem; transition: transform 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.login-user-name { font-size: 0.75rem; font-weight: 500; color: #44403c; }

/* ===================== SIDEBAR (Desktop) ===================== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 256px;
  background: linear-gradient(180deg, #003a6e 0%, #005290 40%, #006bb8 100%);
  color: white; z-index: 30; overflow-y: auto;
  display: flex; flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}
.sb-overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
  animation: overlayIn 0.25s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.sb-brand {
  padding: 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sb-logo-wrap {
  width: 44px; height: 44px; border-radius: 10px;
  background: #ffffff; padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.sb-logo { width: 100%; height: 100%; border-radius: 7px; object-fit: contain; }
.sb-brand-name { font-weight: 700; font-size: 0.9375rem; }
.sb-brand-sub { font-size: 0.6875rem; color: #93c5fd; }

.sb-user {
  padding: 14px 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sb-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #059669;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 700;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 0.8125rem; font-weight: 600; }
.sb-role-badge {
  font-size: 0.625rem; padding: 1px 8px; border-radius: 99px;
  background: rgba(255,255,255,0.12); color: #a7f3d0;
}

.sb-nav { flex: 1; padding: 8px; overflow-y: auto; }
.sb-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; margin: 2px 0;
  font-size: 0.8125rem; color: #a7f3d0; cursor: pointer;
  transition: all 0.2s; border: none; background: none;
  text-align: left; width: 100%; text-decoration: none;
  position: relative;
}
.sb-link::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 0; background: white; border-radius: 0 2px 2px 0;
  transition: height 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.sb-link:hover { background: rgba(255,255,255,0.08); color: white; }
.sb-link:hover::before { height: 60%; }
.sb-link.active { background: rgba(255,255,255,0.12); color: white; font-weight: 600; }
.sb-link.active::before { height: 70%; }
.sb-link-icon { flex-shrink: 0; opacity: 0.7; }
.sb-link.active .sb-link-icon { opacity: 1; }
.sb-link-text { flex: 1; }

.sb-badge {
  font-size: 0.625rem; padding: 1px 6px; border-radius: 99px;
  font-weight: 600; white-space: nowrap;
}
.sb-badge-ok { background: #059669; color: white; }
.sb-badge-cart { background: #ef4444; color: white; }

.sb-footer {
  padding: 12px; border-top: 1px solid rgba(255,255,255,0.08);
}
.sb-link-logout { color: #fca5a5; }
.sb-link-logout:hover { background: rgba(255,255,255,0.06); color: #fecaca; }
.sb-version { font-size: 0.625rem; color: rgba(255,255,255,0.3); text-align: center; margin-top: 8px; }

/* ===================== MOBILE HEADER ===================== */
.mobile-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #064e3b, #065f46);
  color: white; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.mh-btn {
  background: rgba(255,255,255,0.12); border: none; color: white;
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mh-btn:active { background: rgba(255,255,255,0.2); }
.mh-title { font-size: 1rem; font-weight: 700; flex: 1; }
.mh-cart-badge {
  background: #ef4444; color: white; font-size: 0.75rem; font-weight: 700;
  border-radius: 99px; min-width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0 6px;
}
.mh-logo { display: flex; }

/* ===================== BOTTOM NAVIGATION ===================== */
.bnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 25;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #e8e8f0;
  display: flex; align-items: stretch; justify-content: space-around;
  padding: 4px 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.05);
  animation: bnavIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes bnavIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  padding: 6px 0; flex: 1;
  background: none; border: none; cursor: pointer;
  color: #8888a0; transition: all 0.2s;
  position: relative; min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}
.bnav-item:active { transform: scale(0.9); }
.bnav-item.active { color: #059669; }
.bnav-item.active .bnav-icon-wrap {
  background: #ecfdf5;
}
.bnav-icon-wrap {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; position: relative;
}
.bnav-label { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.01em; }
.bnav-badge {
  position: absolute; top: -4px; right: -8px;
  background: #ef4444; color: white; font-size: 0.5625rem;
  font-weight: 700; border-radius: 99px;
  min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 4px rgba(239,68,68,0.4);
}

/* Hide bottom nav on desktop */
@media (min-width: 768px) {
  .bnav { display: none !important; }
}

/* ===================== STAT CARD ===================== */
.stat-card {
  padding: 14px; border-radius: 14px; border: 1px solid #e8e8f0;
  background: white; transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden; min-width: 0; word-wrap: break-word; overflow-wrap: break-word;
}
.stat-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.stat-card .stat-label { font-size: 0.6875rem; color: #8888a0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .stat-value { font-size: 1.125rem; font-weight: 800; margin-top: 4px; color: #1a1a2e; letter-spacing: -0.02em; word-break: break-all; overflow-wrap: anywhere; line-height: 1.2; }
.stat-card .stat-sub { font-size: 0.6875rem; color: #a0a0a8; margin-top: 4px; }

/* ===================== PAYMENT METHOD TOGGLE ===================== */
.pm-toggle {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1.5px solid #e8e8f0; border-radius: 12px; cursor: pointer;
  font-size: 0.8125rem; font-weight: 500; transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  background: white; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pm-toggle:active { transform: scale(0.97); }
.pm-toggle:hover { border-color: #c8c8d0; }
.pm-toggle.active { border-color: currentColor; background: rgba(0,0,0,0.02); }
.pm-dot { width: 10px; height: 10px; border-radius: 50%; transition: transform 0.2s; flex-shrink: 0; }
.pm-toggle.active .pm-dot { transform: scale(1.3); box-shadow: 0 0 8px currentColor; }

/* ===================== STEP INDICATOR ===================== */
.step { display: flex; align-items: center; gap: 8px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700;
  background: #e8e8f0; color: #8888a0;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.step-num.active { background: #059669; color: white; transform: scale(1.1); box-shadow: 0 2px 10px rgba(5,150,105,0.35); }
.step-num.done { background: #059669; color: white; }

/* ===================== SELECT ===================== */
.select {
  height: 48px; padding: 0 14px; border: 1.5px solid #e8e8f0;
  border-radius: 12px; font-size: 16px; background: white;
  outline: none; cursor: pointer; font-family: inherit; color: #1a1a2e;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238888a0' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center; background-repeat: no-repeat;
  background-size: 20px 20px; padding-right: 40px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select:focus { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,0.12); }

/* ===================== BASE ANIMATIONS ===================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes countUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-scale-in { animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ===================== TABLE ===================== */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.data-table th {
  text-align: left; padding: 10px 12px; font-weight: 600; color: #8888a0;
  border-bottom: 2px solid #e8e8f0; font-size: 0.6875rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f5f5f8; }
.data-table tbody tr { animation: tableRowIn 0.25s ease both; }
.data-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.04s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.06s; }
.data-table tbody tr:nth-child(n+4) { animation-delay: 0.08s; }
@keyframes tableRowIn { from { opacity: 0; } to { opacity: 1; } }
.data-table tr:hover td { background: #fafafa; }

/* ===================== CHART CONTAINER ===================== */
.chart-container { position: relative; width: 100%; height: 240px; animation: scaleIn 0.4s ease both; }
.chart-container canvas { width: 100% !important; height: 100% !important; }

/* ===================== TOGGLE SWITCH ===================== */
.toggle-track {
  width: 44px; height: 24px; background: #d4d4dc; border-radius: 99px;
  cursor: pointer; position: relative; transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.toggle-track.active { background: #059669; }
.toggle-thumb {
  width: 20px; height: 20px; background: white; border-radius: 50%;
  position: absolute; top: 2px; left: 2px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-track.active .toggle-thumb { transform: translateX(20px); }

/* ===================== EMPTY STATE ===================== */
.empty-state { text-align: center; padding: 32px 16px; color: #a0a0a8; animation: fadeIn 0.3s ease; }
.empty-state svg { margin: 0 auto 8px; opacity: 0.4; }

/* ===================== CATEGORY PILL ===================== */
.cat-pill {
  padding: 6px 14px; border-radius: 99px; font-size: 0.8125rem;
  white-space: nowrap; cursor: pointer; border: 1.5px solid #e8e8f0;
  background: white; color: #6b6b80; transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none; -webkit-user-select: none; font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.cat-pill:active { transform: scale(0.95); }
.cat-pill:hover { border-color: #c8c8d0; }
.cat-pill.active {
  background: linear-gradient(135deg, #059669, #047857); color: white; border-color: transparent;
  box-shadow: 0 2px 8px rgba(5,150,105,0.3);
}

/* ===================== FAB CART ===================== */
#view-vender { padding-bottom: 140px !important; }
.fab-cart {
  position: fixed; bottom: 72px; left: 16px; right: 16px;
  background: linear-gradient(135deg, #059669, #047857); color: white;
  padding: 12px 20px; border-radius: 16px; font-size: 0.9375rem; font-weight: 700;
  box-shadow: 0 8px 28px rgba(5,150,105,0.4); z-index: 20;
  cursor: pointer; border: none; display: flex; align-items: center; gap: 12px;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  animation: fabIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  letter-spacing: -0.01em;
}
.fab-cart-count {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.2); display: flex; align-items: center;
  justify-content: center; font-size: 0.875rem; font-weight: 700; flex-shrink: 0;
}
.fab-cart-label {
  font-size: 0.8125rem; font-weight: 500; opacity: 0.85; flex: 1; min-width: 0;
}
.fab-cart-total {
  font-size: 1.0625rem; font-weight: 800; flex-shrink: 0;
}
@keyframes fabIn {
  from { opacity: 0; transform: translateY(2rem); }
  to { opacity: 1; transform: translateY(0); }
}
.fab-cart:active { transform: scale(0.97); }

/* ===================== NUMBER INPUT GROUP ===================== */
.num-input-group { display: flex; align-items: center; gap: 4px; }
.num-input-group button {
  width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid #e8e8f0;
  background: white; cursor: pointer; font-size: 1rem; display: flex;
  align-items: center; justify-content: center; transition: all 0.15s;
  color: #44403c; flex-shrink: 0;
}
.num-input-group button:active { transform: scale(0.9); background: #f5f5f8; }
.num-input-group input {
  width: 40px; text-align: center; border: 1.5px solid #e8e8f0;
  border-radius: 10px; height: 36px; font-size: 16px;
  font-family: inherit; outline: none; transition: border-color 0.2s; color: #1a1a2e;
  -webkit-appearance: none;
}
.num-input-group input:focus { border-color: #059669; }

/* ===================== ADD-TO-CART BOUNCE ===================== */
.add-btn-pop { animation: addBtnPop 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes addBtnPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===================== DASHBOARD ===================== */
.dash-greeting { margin-bottom: 20px; }
.dash-h1 { font-size: 1.5rem; font-weight: 800; color: #1a1a2e; letter-spacing: -0.02em; }
.dash-date { font-size: 0.8125rem; color: #8888a0; margin-top: 4px; }

.dash-status-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 16px; margin-bottom: 16px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #a7f3d0;
}
.dash-status-closed { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #86efac; }
.dash-status-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: #059669; color: white;
  display: flex; align-items: center; justify-content: center;
}
.dash-status-icon-ok { background: #059669; }
.dash-status-info { flex: 1; min-width: 0; }
.dash-status-title { font-size: 0.875rem; font-weight: 700; color: #065f46; }
.dash-status-sub { font-size: 0.75rem; color: #059669; margin-top: 2px; }
.dash-status-btn { margin-left: 8px; flex-shrink: 0; }

.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.dash-stat {
  padding: 14px; border-radius: 16px; background: white;
  border: 1px solid #e8e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.dash-stat-label { font-size: 0.6875rem; color: #8888a0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.dash-stat-value { font-size: 1.25rem; font-weight: 800; margin-top: 4px; color: #1a1a2e; letter-spacing: -0.02em; }
.dash-stat-sub { font-size: 0.6875rem; color: #a0a0a8; margin-top: 4px; }
.dash-stat-up { color: #059669 !important; font-weight: 600; }
.dash-stat-down { color: #dc2626 !important; font-weight: 600; }

.dash-alert {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px;
  padding: 14px; margin-bottom: 16px;
}
.dash-alert-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dash-alert-title { font-size: 0.8125rem; font-weight: 700; color: #92400e; }
.dash-alert-item { font-size: 0.8125rem; padding: 3px 0; }
.dash-alert-warn { color: #b45309; }
.dash-alert-empty { color: #dc2626; font-weight: 500; }
.dash-alert-more { font-size: 0.6875rem; color: #b45309; margin-top: 4px; }

.dash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.dash-action {
  background: white; border: 1px solid #e8e8f0; border-radius: 16px;
  padding: 16px; text-align: left; cursor: pointer;
  transition: all 0.2s; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.dash-action:active { transform: scale(0.97); background: #f8f8fc; }
.dash-action-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: #ecfdf5; display: flex; align-items: center; justify-content: center;
}
.dash-action-label { font-size: 0.875rem; font-weight: 700; color: #1a1a2e; }

.dash-biz-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 16px; background: white;
  border: 1px solid #e8e8f0;
}
.dash-biz-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: #f5f5f8; display: flex; align-items: center; justify-content: center;
}
.dash-biz-name { font-size: 0.875rem; font-weight: 600; }

.cashier-banner {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px;
  padding: 10px 14px; font-size: 0.8125rem; color: #92400e;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

/* ===================== MOBILE HEADER — HIDDEN ===================== */
#mobile-header {
  display: none !important;
}
#bottom-nav {
  display: none;
}
@media (max-width: 767px) {
  #bottom-nav.bnav {
    display: flex !important;
  }
}

/* ===================== RESPONSIVE ===================== */

/* --- Safe area insets --- */
@supports (padding: env(safe-area-inset-bottom)) {
  .fab-cart { bottom: calc(72px + env(safe-area-inset-bottom)); }
  #view-vender { padding-bottom: calc(140px + env(safe-area-inset-bottom)) !important; }
  .bnav { padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  .sheet-body { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .mobile-header { padding-top: calc(12px + env(safe-area-inset-top)); }
}

/* --- Sidebar: hidden off-screen on mobile --- */
@media (max-width: 767px) {
  .sidebar { transform: translateX(-100%); will-change: transform; }
  #main-content { margin-left: 0 !important; padding-bottom: 72px !important; }
}

/* --- Dialog: slide up from bottom on mobile --- */
@media (max-width: 520px) {
  .dialog-backdrop { padding: 0; align-items: flex-end; }
  .dialog-panel {
    max-width: 100%; max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation: dialogSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  @keyframes dialogSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
  }
  .dialog-header { padding: 16px 20px 12px; }
  .dialog-body { padding: 0 20px 20px; }
  .dialog-footer { padding: 12px 20px; flex-direction: column; gap: 8px; }
  .dialog-footer .btn { width: 100%; justify-content: center; }
}

/* --- Touch target sizing --- */
@media (max-width: 640px) {
  .input { height: 48px; font-size: 16px; }
  .select { height: 48px; font-size: 16px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; padding: 6px 12px; }
  .btn-icon { min-width: 44px; min-height: 44px; }
  .num-input-group button { width: 40px; height: 40px; }
  .num-input-group input { width: 44px; height: 40px; font-size: 16px; }
}

/* --- PIN pad small screens --- */
@media (max-width: 360px) {
  .pin-key { width: 56px; height: 56px; font-size: 1.125rem; border-radius: 14px; }
  .pin-grid { gap: 8px; }
}

/* --- FAB cart smaller screens --- */
@media (max-width: 400px) {
  .fab-cart { padding: 10px 16px; gap: 8px; border-radius: 14px; }
  .fab-cart-total { font-size: 0.9375rem; }
}

/* --- Tables: horizontal scroll --- */
.card.overflow-hidden { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { min-width: 480px; }
@media (max-width: 640px) {
  .data-table { min-width: 420px; }
  .data-table th, .data-table td { padding: 8px 10px; }
}
@media (max-width: 380px) {
  .data-table { min-width: 360px; font-size: 0.75rem; }
  .data-table th { font-size: 0.6875rem; }
}

/* --- Payment toggle small screens --- */
@media (max-width: 480px) {
  .pm-toggle { padding: 8px 10px; font-size: 0.75rem; gap: 6px; }
}

/* --- Stat cards small screens --- */
@media (max-width: 380px) {
  .dash-stat-value { font-size: 1.0625rem; }
  .stat-card .stat-value { font-size: 0.9375rem; }
  .dash-stats { gap: 8px; }
  .dash-actions { gap: 8px; }
}

/* --- Sheet mobile --- */
@media (max-width: 480px) {
  .sheet-panel { max-height: 90vh; border-radius: 16px 16px 0 0; }
  .sheet-header { padding: 8px 16px; }
  .sheet-body { padding: 12px 16px 32px; }
}

/* --- Category pills scrollable --- */
@media (max-width: 640px) {
  .cat-pill { padding: 8px 14px; font-size: 0.8125rem; }
}

/* --- Login small screens --- */
@media (max-height: 600px) {
  #login-screen > div { padding: 24px; }
  .pin-key { width: 56px; height: 56px; }
}

/* --- Chart container mobile --- */
@media (max-width: 480px) {
  .chart-container { height: 200px; }
}

/* --- ONAT table scroll --- */
@media (max-width: 640px) {
  .card > .overflow-x-auto { margin: 0 -16px; padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --- Toast small screens --- */
@media (max-width: 400px) {
  .toast { min-width: auto; max-width: calc(100% - 32px); margin-left: 16px; margin-right: 16px; }
}

/* --- Reportes table scroll --- */
@media (max-width: 640px) {
  #view-reportes .card.overflow-hidden { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --- Settings user rows --- */
@media (max-width: 480px) {
  .btn-icon.btn-sm { min-width: 40px; min-height: 40px; }
}

/* --- Prevent iOS zoom on input focus --- */
@media screen and (max-width: 640px) {
  input[type="text"], input[type="number"], input[type="search"], select, textarea { font-size: 16px !important; }
  .input, .select { font-size: 16px !important; }
  .num-input-group input { font-size: 16px !important; width: 44px; }
}

/* --- Desktop: hide mobile header + show sidebar --- */
@media (min-width: 768px) {
  #mobile-header { display: none !important; }
  .bnav { display: none !important; }
  .sidebar { transform: translateX(0) !important; }
  #main-content { margin-left: 256px; }
}

/* ===================== PRINT ===================== */
@media print {
  .no-print, .bnav, .mobile-header, .sidebar { display: none !important; }
  body { background: white !important; }
  #main-content { margin-left: 0 !important; }
}

/* ===================== DARK MODE ===================== */
body.dark-mode {
  background: #0f1117;
  color: #e4e4e8;
}
body.dark-mode .card {
  background: #1a1d27;
  border-color: #2a2d3a;
}
body.dark-mode .input, body.dark-mode .select {
  background: #1a1d27;
  border-color: #2a2d3a;
  color: #e4e4e8;
}
body.dark-mode .btn-outline {
  border-color: #3a3d4a;
  color: #c4c4c8;
}
body.dark-mode .btn-outline:hover {
  background: #2a2d3a;
}
body.dark-mode .tab {
  color: #8888a0;
  border-color: transparent;
}
body.dark-mode .tab.active {
  color: #34d399;
  border-color: #34d399;
}
body.dark-mode .cat-pill {
  background: #1a1d27;
  color: #a0a0a8;
  border-color: #2a2d3a;
}
body.dark-mode .cat-pill.active {
  background: #064e3b;
  color: #34d399;
  border-color: #064e3b;
}
body.dark-mode .data-table th {
  background: #1a1d27;
  color: #a0a0a8;
}
body.dark-mode .data-table td {
  color: #c4c4c8;
  border-color: #2a2d3a;
}
body.dark-mode .stat-card {
  background: #1a1d27;
}
body.dark-mode .stat-label {
  color: #8888a0;
}
body.dark-mode .stat-value {
  color: #e4e4e8;
}
body.dark-mode .badge {
  background: #2a2d3a;
  color: #a0a0a8;
}
body.dark-mode .badge-emerald {
  background: #064e3b;
  color: #34d399;
}
body.dark-mode .badge-amber {
  background: #451a03;
  color: #fbbf24;
}
body.dark-mode .badge-red {
  background: #450a0a;
  color: #f87171;
}
body.dark-mode .dialog-backdrop {
  background: rgba(0,0,0,0.7);
}
body.dark-mode .dialog-panel {
  background: #1a1d27;
}
body.dark-mode .dialog-header h3 {
  color: #e4e4e8;
}
body.dark-mode .dialog-body {
  color: #c4c4c8;
}
body.dark-mode .sheet-panel {
  background: #1a1d27;
}
body.dark-mode .sheet-header h3 {
  color: #e4e4e8;
}
body.dark-mode .sidebar {
  background: linear-gradient(180deg, #001f3d 0%, #002d5a 40%, #003d7a 100%);
  border-color: #2a2d3a;
}
body.dark-mode .sb-link {
  color: #a0a0a8;
}
body.dark-mode .sb-link.active {
  background: rgba(52,211,153,0.1);
  color: #34d399;
}
body.dark-mode .bnav {
  background: rgba(15,17,23,0.95);
  border-color: #2a2d3a;
}
body.dark-mode .bnav-label {
  color: #8888a0;
}
body.dark-mode .bnav-item.active .bnav-label {
  color: #34d399;
}
body.dark-mode .cashier-banner {
  background: #1c1917;
  border-color: #451a03;
  color: #fbbf24;
}
body.dark-mode .empty-state {
  color: #6b6b80;
}
body.dark-mode .text-stone-400, body.dark-mode .text-stone-500, body.dark-mode .text-stone-600 {
  color: #8888a0 !important;
}
body.dark-mode .text-stone-800, body.dark-mode [style*="color:#1a1a2e"] {
  color: #e4e4e8 !important;
}
body.dark-mode .dash-status-card {
  background: #1a1d27;
  border-color: #2a2d3a;
}
body.dark-mode .dash-stat {
  background: #1a1d27;
  border-color: #2a2d3a;
}
body.dark-mode .dash-stat-label { color: #8888a0; }
body.dark-mode .dash-stat-value { color: #e4e4e8; }
body.dark-mode .dash-stat-sub { color: #6b6b80; }
body.dark-mode .dash-alert { background: #1a1d27; border-color: #2a2d3a; }
body.dark-mode .dash-alert-title { color: #e4e4e8; }
body.dark-mode .dash-alert-item { color: #a0a0a8; border-color: #2a2d3a; }
body.dark-mode .dash-action { background: #1a1d27; border-color: #2a2d3a; }
body.dark-mode .dash-action-label { color: #c4c4c8; }
body.dark-mode .dash-biz-card { background: #1a1d27; border-color: #2a2d3a; }
body.dark-mode .dash-biz-name { color: #e4e4e8; }
body.dark-mode .login-card {
  background: #1a1d27;
}
body.dark-mode .login-title { color: #e4e4e8; }
body.dark-mode .login-subtitle { color: #8888a0; }
body.dark-mode .login-step-label { color: #a0a0a8; }
body.dark-mode .login-user-name { color: #c4c4c8; }
body.dark-mode .pin-key {
  background: #2a2d3a;
  color: #e4e4e8;
}
body.dark-mode .pin-key:active { background: #064e3b; }
body.dark-mode .toggle-track {
  background: #3a3d4a;
}
body.dark-mode .toggle-track.active {
  background: #059669;
}
body.dark-mode .progress-bar {
  background: #2a2d3a;
}
body.dark-mode .pm-toggle {
  background: #1a1d27;
  border-color: #2a2d3a;
  color: #a0a0a8;
}
body.dark-mode .pm-toggle.active {
  border-color: currentColor;
}
body.dark-mode .step-num {
  background: #2a2d3a;
  color: #a0a0a8;
}
body.dark-mode .step-num.active {
  background: #059669;
  color: white;
}
body.dark-mode .step-num.done {
  background: #059669;
  color: white;
}

/* ===================== SKELETON LOADING ===================== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f5 25%, #e0e0e8 50%, #f0f0f5 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}
body.dark-mode .skeleton {
  background: linear-gradient(90deg, #2a2d3a 25%, #3a3d4a 50%, #2a2d3a 75%);
  background-size: 200% 100%;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.w-3-4 { width: 75%; }
.skeleton-text.w-1-2 { width: 50%; }
.skeleton-text.w-1-3 { width: 33%; }
.skeleton-card { height: 80px; margin-bottom: 12px; }
.skeleton-circle { width: 40px; height: 40px; border-radius: 50%; }

/* ===================== PULL TO REFRESH ===================== */
.ptr-indicator {
  position: fixed;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  transition: top 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.ptr-indicator.visible {
  top: 8px;
}
.ptr-indicator-inner {
  background: #064e3b;
  color: white;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.ptr-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: ptrSpin 0.6s linear infinite;
}
@keyframes ptrSpin {
  to { transform: rotate(360deg); }
}

/* ===================== SWIPE INDICATOR ===================== */
.swipe-edge-left, .swipe-edge-right {
  position: fixed;
  top: 0; bottom: 0;
  width: 20px;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.swipe-edge-left { left: 0; background: linear-gradient(to right, rgba(5,150,105,0.15), transparent); }
.swipe-edge-right { right: 0; background: linear-gradient(to left, rgba(5,150,105,0.15), transparent); }
.swipe-edge-left.visible, .swipe-edge-right.visible { opacity: 1; }