/* Terpz POS - Styles */

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --secondary: #6366f1;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark: #1f2937;
  --darker: #111827;
  --light: #f3f4f6;
  --white: #ffffff;
  --gray: #6b7280;
  --gray-light: #e5e7eb;
  --sativa: #f59e0b;
  --indica: #8b5cf6;
  --hybrid: #10b981;
  --cbd: #3b82f6;
}

/* Theme: Default (Emerald) */
[data-theme="default"] {
  --primary: #10b981 !important;
  --primary-dark: #059669 !important;
  --secondary: #6366f1 !important;
  --dark: #1f2937 !important;
  --darker: #111827 !important;
}

/* Theme: Ocean */
[data-theme="ocean"] {
  --primary: #0ea5e9 !important;
  --primary-dark: #0284c7 !important;
  --secondary: #8b5cf6 !important;
  --dark: #0f172a !important;
  --darker: #020617 !important;
}

/* Theme: Sunset */
[data-theme="sunset"] {
  --primary: #f97316 !important;
  --primary-dark: #ea580c !important;
  --secondary: #ec4899 !important;
  --dark: #292524 !important;
  --darker: #1c1917 !important;
}

/* Theme: Purple Haze */
[data-theme="purple"] {
  --primary: #a855f7 !important;
  --primary-dark: #9333ea !important;
  --secondary: #06b6d4 !important;
  --dark: #1e1b4b !important;
  --darker: #0f0a1e !important;
}

/* Theme: Midnight */
[data-theme="midnight"] {
  --primary: #f43f5e !important;
  --primary-dark: #e11d48 !important;
  --secondary: #22d3ee !important;
  --dark: #18181b !important;
  --darker: #09090b !important;
}

/* Theme: Light */
[data-theme="light"] {
  --primary: #059669 !important;
  --primary-dark: #047857 !important;
  --secondary: #4f46e5 !important;
  --dark: #e5e7eb !important;
  --darker: #f9fafb !important;
  --white: #1f2937 !important;
  --gray: #4b5563 !important;
}

/* Theme: Neon */
[data-theme="neon"] {
  --primary: #22d3ee !important;
  --primary-dark: #06b6d4 !important;
  --secondary: #f0abfc !important;
  --dark: #134e4a !important;
  --darker: #042f2e !important;
}

/* Theme: Forest */
[data-theme="forest"] {
  --primary: #22c55e !important;
  --primary-dark: #16a34a !important;
  --secondary: #84cc16 !important;
  --dark: #14532d !important;
  --darker: #052e16 !important;
}

/* Theme: Rose */
[data-theme="rose"] {
  --primary: #f472b6 !important;
  --primary-dark: #ec4899 !important;
  --secondary: #c084fc !important;
  --dark: #4c1d3a !important;
  --darker: #2a0f20 !important;
}

/* Theme: Cyber */
[data-theme="cyber"] {
  --primary: #00ff88 !important;
  --primary-dark: #00cc6a !important;
  --secondary: #ff00ff !important;
  --dark: #0a0a1f !important;
  --darker: #000010 !important;
}

/* Theme: Amber */
[data-theme="amber"] {
  --primary: #fbbf24 !important;
  --primary-dark: #f59e0b !important;
  --secondary: #fb923c !important;
  --dark: #451a03 !important;
  --darker: #27150a !important;
}

/* Theme: Ice */
[data-theme="ice"] {
  --primary: #38bdf8 !important;
  --primary-dark: #0ea5e9 !important;
  --secondary: #a5f3fc !important;
  --dark: #082f49 !important;
  --darker: #041c2c !important;
}

/* Theme: Volcano */
[data-theme="volcano"] {
  --primary: #ef4444 !important;
  --primary-dark: #dc2626 !important;
  --secondary: #fbbf24 !important;
  --dark: #450a0a !important;
  --darker: #2a0505 !important;
}

[data-theme="light"] body,
[data-theme="light"] .screen {
  background: var(--darker);
  color: var(--white);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #fff;
  color: #1f2937;
  border-color: #d1d5db;
}

[data-theme="light"] .modal-content {
  background: #fff;
}

[data-theme="light"] .stat-card,
[data-theme="light"] .dashboard-card,
[data-theme="light"] .analytics-card,
[data-theme="light"] .table-container {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--darker);
  color: var(--white);
  height: 100vh;
  overflow: hidden;
}

/* Screens */
.screen {
  display: none;
  height: 100vh;
}

.screen.active {
  display: flex;
}

/* Login Screen */
/* ============================================================================
   LOGIN SCREEN - Cool Animated Design
   ============================================================================ */

#login-screen {
  justify-content: center;
  align-items: center;
  background: var(--darker);
  position: relative;
  overflow: hidden;
}

/* Animated Background */
.login-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.login-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.login-glow-2 {
  width: 350px;
  height: 350px;
  background: var(--secondary);
  bottom: -50px;
  right: -50px;
  animation-delay: -7s;
}

.login-glow-3 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.05); }
}

/* Particle effect */
.login-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.3), transparent);
  background-size: 200px 200px;
  animation: particles 60s linear infinite;
}

@keyframes particles {
  0% { transform: translateY(0); }
  100% { transform: translateY(-200px); }
}

/* Login Container */
.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 2rem;
}

.login-box {
  background: rgba(31, 41, 55, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: 1.5rem;
  text-align: center;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  max-width: 380px;
  width: 100%;
  animation: slideUp 0.6s ease-out;
}

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

/* Brand Area */
.login-brand {
  margin-bottom: 2rem;
}

.brand-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
  animation: pulse-brand 3s ease-in-out infinite;
}

@keyframes pulse-brand {
  0%, 100% { box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 15px 40px rgba(16, 185, 129, 0.5); }
}

.leaf-icon {
  width: 50px;
  height: 50px;
  color: white;
}

.brand-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 4px;
  margin: 0;
}

.brand-subtitle {
  font-size: 0.875rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0.25rem 0 0;
}

/* Login Form */
.login-form {
  text-align: left;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.staff-input-wrapper {
  position: relative;
}

.staff-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-size: 1rem;
  background: var(--darker);
  border: 2px solid transparent;
  border-radius: 0.75rem;
  color: var(--white);
  transition: all 0.3s;
  box-sizing: border-box;
}

.staff-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.staff-input::placeholder {
  color: var(--gray);
}

.input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  width: 20px;
  height: 20px;
  pointer-events: none;
  transition: color 0.3s;
}

.staff-input:focus + .input-icon,
.staff-input-wrapper:focus-within .input-icon {
  color: var(--primary);
}

/* PIN Display */
.pin-display {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.pin-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--darker);
  border: 2px solid var(--gray);
  transition: all 0.3s;
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  animation: pop 0.2s ease-out;
}

@keyframes pop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* PIN Pad */
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 260px;
  margin: 0 auto;
}

.pin-btn {
  padding: 1rem;
  font-size: 1.35rem;
  font-weight: 600;
  border: none;
  border-radius: 0.75rem;
  background: var(--darker);
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.pin-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.pin-btn:active::before {
  width: 200px;
  height: 200px;
}

.pin-btn:hover {
  background: var(--gray);
  transform: translateY(-2px);
}

.pin-btn:active {
  transform: scale(0.95) translateY(0);
}

.pin-clear {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.pin-clear:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
}

.pin-enter {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-enter:hover {
  background: linear-gradient(135deg, #34d399, var(--primary));
}

.pin-enter svg {
  pointer-events: none;
}

/* Login Error */
.login-error {
  color: var(--danger);
  margin-top: 1rem;
  min-height: 1.25rem;
  font-size: 0.875rem;
  text-align: center;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Login Time */
.login-time {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}

/* Login Navigation Links */
.login-links {
  margin-top: 1.5rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

.login-links a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}

.login-links a:hover {
  color: var(--primary);
}

.login-links .link-divider {
  color: rgba(255, 255, 255, 0.2);
  margin: 0 0.75rem;
}

/* POS Screen */
#pos-screen {
  flex-direction: column;
  position: relative;
}

/* Header */
.pos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--dark);
  border-bottom: 1px solid var(--gray);
}

.pos-header h1 {
  font-size: 1.25rem;
  color: var(--primary);
}

.header-center {
  font-size: 1rem;
  color: var(--gray);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#staff-name {
  color: var(--gray);
  font-size: 0.85rem;
}

.btn-logout {
  padding: 0.35rem 0.75rem;
  background: var(--danger);
  color: var(--white);
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.8rem;
}

.btn-logout:hover {
  background: #dc2626;
}

/* Time Clock Widget */
.time-clock-widget {
  display: flex;
  align-items: center;
}

.time-clock-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

.time-clock-btn.clocked-out {
  background: var(--warning);
  color: var(--white);
}

.time-clock-btn.clocked-out:hover {
  background: #d97706;
}

.time-clock-btn.clocked-in {
  background: var(--primary);
  color: var(--white);
  animation: pulse-clock 2s infinite;
}

.time-clock-btn.clocked-in:hover {
  background: var(--primary-dark);
}

@keyframes pulse-clock {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.time-clock-btn svg {
  flex-shrink: 0;
}

/* Time Clock Modal */
.time-clock-modal {
  max-width: 400px;
  text-align: center;
}

.time-clock-modal h2 {
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.time-clock-info {
  background: var(--darker);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.clock-display {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.clock-time {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Courier New', monospace;
}

.clock-date {
  font-size: 0.9rem;
  color: var(--gray);
}

.clock-staff {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--white);
}

.clock-current-status {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(0,0,0,0.2);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.status-label {
  color: var(--gray);
}

.status-value {
  font-weight: 600;
}

.status-value.clocked-in {
  color: var(--primary);
}

.status-value.clocked-out {
  color: var(--gray);
}

.clock-shift-time {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.shift-label {
  color: var(--gray);
}

.shift-value {
  color: var(--white);
  font-weight: 500;
}

.shift-duration {
  color: var(--primary);
  font-size: 0.85rem;
}

/* Break Time Section */
.break-time-section {
  background: var(--darker);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.break-time-section label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.break-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  justify-content: center;
}

.break-quick-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray);
  background: transparent;
  color: var(--white);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.break-quick-btn:hover,
.break-quick-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.break-time-section input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray);
  background: var(--dark);
  color: var(--white);
  border-radius: 0.375rem;
  text-align: center;
  font-size: 1.1rem;
}

/* Main Layout */
.pos-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Products Section */
.products-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--dark);
  gap: 0.5rem;
}

.search-bar input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: var(--darker);
  border: 2px solid var(--gray);
  border-radius: 0.375rem;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  border-color: var(--primary);
}

.search-bar input::placeholder {
  color: var(--gray);
}

.clear-search-btn {
  width: 32px;
  height: 32px;
  background: var(--gray);
  border: none;
  border-radius: 0.375rem;
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  display: none;
  transition: background 0.2s;
}

.clear-search-btn.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-search-btn:hover {
  background: var(--danger);
}

.category-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--dark);
  overflow-x: auto;
  flex-shrink: 0;
}

.cat-tab {
  padding: 0.4rem 0.75rem;
  background: var(--darker);
  color: var(--gray);
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.8rem;
}

.cat-tab:hover {
  background: var(--gray);
  color: var(--white);
}

.cat-tab.active {
  background: var(--primary);
  color: var(--white);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  padding: 0.5rem;
  overflow-y: auto;
  flex: 1;
}

.product-card {
  background: var(--dark);
  border-radius: 0.5rem;
  padding: 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
}

.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.product-card.out-of-stock {
  opacity: 0.5;
  pointer-events: none;
}

.product-name {
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.product-brand {
  font-size: 0.65rem;
  color: var(--gray);
  margin-bottom: 0.3rem;
}

.product-meta {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.strain-badge {
  font-size: 0.5rem;
  padding: 0.15rem 0.35rem;
  border-radius: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
}

.strain-badge.sativa { background: var(--sativa); color: var(--dark); }
.strain-badge.indica { background: var(--indica); color: var(--white); }
.strain-badge.hybrid { background: var(--hybrid); color: var(--white); }
.strain-badge.cbd { background: var(--cbd); color: var(--white); }

/* Strain Type Filters */
.strain-filters {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--darker);
  border-bottom: 1px solid var(--gray);
}

.strain-filter-btn {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--gray);
  border-radius: 1rem;
  background: transparent;
  color: var(--light);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.strain-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.strain-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.strain-filter-btn.sativa.active {
  background: var(--sativa);
  border-color: var(--sativa);
  color: var(--dark);
}

.strain-filter-btn.indica.active {
  background: var(--indica);
  border-color: var(--indica);
}

.strain-filter-btn.hybrid.active {
  background: var(--hybrid);
  border-color: var(--hybrid);
}

/* Product Card Badges */
.product-badges {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
}

.product-badge {
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sale-badge {
  background: var(--danger);
  color: white;
}

.favorite-badge {
  background: var(--warning);
  color: var(--dark);
}

.product-card {
  position: relative;
}

.product-card.on-sale {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.product-card.customer-favorite {
  border-color: var(--warning);
}

.product-card.on-sale.customer-favorite {
  border-color: var(--danger);
}

.original-price {
  text-decoration: line-through;
  color: var(--gray);
  font-size: 0.8em;
}

.thc-badge {
  font-size: 0.625rem;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  background: var(--darker);
  color: var(--gray);
}

.product-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: auto;
}

.product-stock {
  font-size: 0.6rem;
  color: var(--gray);
}

.product-stock.low {
  color: var(--warning);
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--gray);
  padding: 2rem;
  font-size: 0.95rem;
}

/* Cart Section */
.cart-section {
  width: 320px;
  min-width: 320px;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--gray);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray);
}

.cart-header h2 {
  font-size: 1rem;
}

/* Customer Panel */
.customer-panel {
  padding: 0.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
  border: 1px solid var(--primary);
  border-radius: 0.375rem;
  margin: 0.5rem;
}

.customer-panel-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.customer-type-badge {
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
  font-size: 0.55rem;
  font-weight: 700;
  background: var(--primary);
  color: var(--white);
}

.customer-type-badge.medical {
  background: var(--secondary);
}

.customer-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.8rem;
}

.btn-clear-customer {
  background: transparent;
  border: none;
  color: var(--gray);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}

.btn-clear-customer:hover {
  color: var(--danger);
}

.customer-panel-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--gray);
}

.customer-points-display {
  color: var(--primary);
  font-weight: 600;
}

.btn-customer-support {
  padding: 0.2rem 0.5rem;
  font-size: 0.6rem;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-customer-support:hover {
  background: #4f46e5;
}

/* Customer Recent Orders */
.customer-recent-orders {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--gray);
}

.recent-orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--light);
}

.view-all-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.55rem;
}

.view-all-link:hover {
  text-decoration: underline;
}

.recent-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: 60px;
  overflow-y: auto;
}

.recent-order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0.35rem;
  background: var(--darker);
  border-radius: 0.2rem;
  font-size: 0.55rem;
  cursor: pointer;
  transition: background 0.2s;
}

.recent-order-item:hover {
  background: var(--gray);
}

.recent-order-date {
  color: var(--light);
}

.recent-order-total {
  color: var(--primary);
  font-weight: 600;
}

.no-orders {
  font-size: 0.65rem;
  color: var(--gray);
  font-style: italic;
}

/* Select Customer Bar */
.select-customer-bar {
  padding: 0.5rem;
  margin: 0.5rem;
  background: transparent;
}

.btn-select-customer {
  width: 100%;
  padding: 0.6rem;
  background: var(--primary);
  border: none;
  border-radius: 0.375rem;
  color: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-select-customer:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Compliance Bar */
.compliance-bar {
  padding: 0.4rem 0.5rem;
  background: var(--darker);
  border-bottom: 1px solid var(--gray);
}

.compliance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
}

.compliance-status {
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
  font-size: 0.55rem;
}

.compliance-status.ok {
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary);
}

.compliance-status.warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.compliance-status.over {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.compliance-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.limit-label {
  font-size: 0.55rem;
  color: var(--gray);
  width: 30px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--dark);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

.progress-fill.warning {
  background: var(--warning);
}

.progress-fill.over {
  background: var(--danger);
}

.limit-value {
  font-size: 0.55rem;
  color: var(--gray);
  min-width: 50px;
  text-align: right;
}

.btn-clear-cart {
  padding: 0.25rem 0.5rem;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.75rem;
}

.btn-clear-cart:hover {
  background: var(--danger);
  color: var(--white);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.cart-empty {
  color: var(--gray);
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem;
  background: var(--darker);
  border-radius: 0.375rem;
  margin-bottom: 0.35rem;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-size {
  font-size: 0.65rem;
  color: var(--gray);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 0.2rem;
  background: var(--gray);
  color: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: var(--primary);
}

.qty-btn.remove {
  background: var(--danger);
}

.cart-item-price {
  font-weight: 600;
  color: var(--primary);
  min-width: 50px;
  text-align: right;
  font-size: 0.8rem;
}

.cart-totals {
  padding: 0.5rem;
  border-top: 1px solid var(--gray);
  background: var(--darker);
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
  color: var(--gray);
  font-size: 0.75rem;
}

.total-final {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  border-top: 1px solid var(--gray);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}

.cart-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
}

.btn-pay {
  flex: 1;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pay:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-cash {
  background: var(--primary);
  color: var(--white);
}

.btn-cash:not(:disabled):hover {
  background: var(--primary-dark);
}

.btn-card {
  background: var(--secondary);
  color: var(--white);
}

.btn-card:not(:disabled):hover {
  background: #4f46e5;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--dark);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

/* Staff Schedule Modal - desktop */
#staff-schedule-modal .modal-content {
  max-width: 900px;
  width: 90vw;
  padding: 1.5rem;
}

#staff-schedule-modal h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

#staff-schedule-modal .schedule-nav {
  margin-bottom: 1rem;
}

#staff-schedule-modal .schedule-nav h3 {
  font-size: 1.1rem;
}

#staff-schedule-modal .schedule-nav button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

#staff-schedule-modal .staff-calendar-grid {
  gap: 4px !important;
  padding: 0.75rem !important;
}

#staff-schedule-modal .staff-calendar-grid > div {
  padding: 0.35rem !important;
  min-height: 55px !important;
  font-size: 0.8rem !important;
}

/* Staff Schedule Modal - tablet */
@media (max-width: 768px) {
  #staff-schedule-modal .modal-content {
    width: 95vw;
    padding: 1rem;
  }

  #staff-schedule-modal .staff-calendar-grid > div {
    min-height: 45px !important;
    font-size: 0.7rem !important;
  }
}

/* Staff Schedule Modal - phone */
@media (max-width: 480px) {
  #staff-schedule-modal .modal-content {
    width: 98vw;
    padding: 0.75rem;
  }

  #staff-schedule-modal h2 {
    font-size: 1rem;
  }

  #staff-schedule-modal .schedule-nav h3 {
    font-size: 0.9rem;
  }

  #staff-schedule-modal .schedule-nav button {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }

  #staff-schedule-modal .staff-calendar-grid {
    gap: 2px !important;
    padding: 0.35rem !important;
  }

  #staff-schedule-modal .staff-calendar-grid > div {
    min-height: 40px !important;
    font-size: 0.6rem !important;
    padding: 0.2rem !important;
  }
}

.modal-content h2 {
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-cancel {
  flex: 1;
  padding: 1rem;
  background: var(--gray);
  color: var(--white);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

.btn-complete {
  flex: 1;
  padding: 1rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.btn-complete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Payment Modal */
.payment-modal {
  width: 400px;
}

.payment-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--darker);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.payment-amount .amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.payment-section label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gray);
}

.cash-input-row {
  display: flex;
  align-items: center;
  background: var(--darker);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.cash-input-row .currency {
  font-size: 1.5rem;
  color: var(--gray);
  margin-right: 0.5rem;
}

.cash-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  outline: none;
}

.quick-cash {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.quick-cash-btn {
  flex: 1;
  padding: 0.75rem;
  background: var(--darker);
  color: var(--white);
  border: 1px solid var(--gray);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-cash-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
}

.change-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--primary);
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Product Modal */
.product-modal {
  width: 400px;
}

.product-modal .product-info {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.size-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.size-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--darker);
  border: 2px solid var(--gray);
  border-radius: 0.5rem;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover {
  border-color: var(--primary);
}

.size-btn .size-name {
  font-weight: 600;
}

.size-btn .size-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Order Details Modal */
.order-details-modal {
  width: 400px;
}

.order-info {
  background: var(--darker);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.order-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.order-info-row:last-child {
  margin-bottom: 0;
}

.order-items-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray);
  font-size: 0.85rem;
}

.order-item:last-child {
  border-bottom: none;
}

.order-item-name {
  flex: 1;
}

.order-item-qty {
  color: var(--light);
  margin: 0 1rem;
}

.order-item-price {
  font-weight: 600;
  color: var(--primary);
}

.order-totals {
  background: var(--darker);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.order-total-row.total-final {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray);
  font-weight: 700;
  font-size: 1.1rem;
}

.order-total-row.total-final span:last-child {
  color: var(--primary);
}

/* Receipt Modal */
.receipt-modal {
  width: 350px;
  background: var(--white);
  color: var(--dark);
}

.receipt {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

.receipt-header {
  text-align: center;
  border-bottom: 1px dashed var(--gray);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.receipt-header h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.receipt-header p {
  color: var(--gray);
  font-size: 0.75rem;
}

.receipt-info {
  margin-bottom: 1rem;
}

.receipt-info p {
  display: flex;
  justify-content: space-between;
}

.receipt-items {
  border-top: 1px dashed var(--gray);
  border-bottom: 1px dashed var(--gray);
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.receipt-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.receipt-item-name {
  flex: 1;
}

.receipt-item-qty {
  width: 30px;
  text-align: center;
}

.receipt-item-price {
  width: 60px;
  text-align: right;
}

.receipt-totals p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.receipt-total {
  font-weight: 700;
  font-size: 1.25rem;
  border-top: 1px solid var(--dark);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.receipt-footer {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--gray);
  color: var(--gray);
  font-size: 0.75rem;
}

.btn-print {
  flex: 1;
  padding: 1rem;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--darker);
}

::-webkit-scrollbar-thumb {
  background: var(--gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Admin Link */
.admin-link {
  padding: 0.35rem 0.75rem;
  background: var(--secondary);
  color: var(--white);
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.admin-link:hover {
  background: #4f46e5;
}

/* Staff Profile Button */
.staff-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--darker);
  border: 1px solid var(--gray);
  border-radius: 0.375rem;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
}

.staff-profile-btn:hover {
  border-color: var(--primary);
  background: var(--dark);
}

.profile-arrow {
  font-size: 0.65rem;
  color: var(--gray);
}

/* Profile Dropdown */
.profile-dropdown {
  position: fixed;
  top: 65px;
  right: 1rem;
  width: 280px;
  background: var(--dark);
  border: 1px solid var(--gray);
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.profile-dropdown.active {
  display: block;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-header {
  padding: 1.5rem;
  background: var(--darker);
  text-align: center;
  border-bottom: 1px solid var(--gray);
}

.profile-avatar {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 0.75rem;
}

.profile-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.profile-role {
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-info {
  padding: 1rem 1.5rem;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(107, 114, 128, 0.3);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-label {
  color: var(--gray);
  font-size: 0.875rem;
}

.profile-value {
  font-weight: 500;
  font-size: 0.875rem;
}

.profile-theme {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(107, 114, 128, 0.3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-theme select {
  flex: 1;
  padding: 0.5rem;
  background: var(--darker);
  border: 1px solid var(--gray);
  border-radius: 0.375rem;
  color: var(--white);
  font-size: 0.875rem;
  cursor: pointer;
}

.profile-status.active {
  color: var(--primary);
}

/* ============================================================================
   RESPONSIVE / MOBILE STYLES
   ============================================================================ */

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .pos-header {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .header-right {
    gap: 0.35rem;
  }

  .admin-link,
  .time-clock-btn,
  .staff-profile-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  .cart-section {
    width: 280px;
    min-width: 280px;
  }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  /* Allow scrolling on mobile */
  body {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

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

  /* Header - stack and wrap */
  .pos-header {
    flex-wrap: wrap;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .header-left h1 {
    font-size: 1rem;
  }

  .header-center {
    order: 3;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    border-top: 1px solid var(--gray);
    margin-top: 0.25rem;
  }

  .header-right {
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
  }

  /* All buttons visible on mobile, just smaller */

  .admin-link,
  .time-clock-btn,
  .staff-profile-btn,
  .btn-logout {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
  }

  .time-clock-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Main layout */
  .pos-main {
    flex-direction: column;
    overflow: visible;
  }

  .products-section {
    min-height: 50vh;
    overflow: visible;
  }

  .cart-section {
    width: 100%;
    min-width: 100%;
    max-height: none;
    border-left: none;
    border-top: 2px solid var(--primary);
  }

  /* Search bar */
  .search-bar {
    padding: 0.5rem;
  }

  .search-bar input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Category and strain filters - horizontal scroll */
  .category-tabs {
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .cat-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .strain-filters {
    padding: 0.35rem 0.5rem;
    gap: 0.25rem;
  }

  .strain-filter-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.65rem;
  }

  /* Product grid */
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.4rem;
    padding: 0.4rem;
  }

  .product-card {
    padding: 0.5rem;
  }

  .product-name {
    font-size: 0.75rem;
  }

  .product-brand {
    font-size: 0.6rem;
  }

  .product-price {
    font-size: 0.85rem;
  }

  .strain-badge {
    font-size: 0.45rem;
    padding: 0.1rem 0.25rem;
  }

  .thc-badge {
    font-size: 0.55rem;
  }

  /* Cart section */
  .cart-header {
    padding: 0.75rem;
  }

  .cart-items {
    max-height: 200px;
    overflow-y: auto;
  }

  .cart-item {
    padding: 0.5rem;
  }

  .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .cart-actions {
    padding: 0.75rem;
  }

  .btn-pay {
    padding: 1rem;
    font-size: 1.1rem;
  }

  /* Customer panel */
  .customer-panel {
    margin: 0.5rem;
    padding: 0.5rem;
  }

  .select-customer-bar {
    margin: 0.5rem;
    padding: 0.5rem;
  }

  .btn-select-customer {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Compliance bar */
  .compliance-bar {
    padding: 0.5rem;
  }

  /* Profile dropdown */
  .profile-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 1rem 1rem 0 0;
    max-height: 70vh;
    overflow-y: auto;
  }

  /* Modals - full width on mobile */
  .modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 90vh;
    margin: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .modal-content h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-actions button {
    width: 100%;
  }

  /* Payment modal */
  .payment-modal {
    width: 95vw !important;
  }

  .payment-amount .amount {
    font-size: 1.5rem;
  }

  .quick-cash {
    flex-wrap: wrap;
  }

  .quick-cash-btn {
    flex: 1 1 45%;
    padding: 0.75rem;
  }

  .cash-input-row input {
    font-size: 1.25rem;
  }

  /* Receipt modal */
  .receipt-modal {
    width: 95vw !important;
  }

  /* Product modal */
  .product-modal {
    width: 95vw !important;
  }

  .size-btn {
    padding: 0.75rem;
  }

  /* Time clock modal */
  .time-clock-modal {
    width: 95vw !important;
  }

  .clock-time {
    font-size: 2rem;
  }

  .break-quick-btn {
    padding: 0.6rem 0.8rem;
  }

  /* Staff timesheet/schedule modals */
  #staff-timesheet-modal .modal-content,
  #staff-schedule-modal .modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 1rem;
  }

  #staff-schedule-modal .modal-content {
    max-height: 85vh;
    overflow-y: auto;
  }

  .staff-calendar-grid {
    gap: 4px !important;
    padding: 0.5rem !important;
  }

  /* Redeem points modal */
  #redeem-points-modal .modal-content {
    width: 95vw !important;
  }

  .quick-redeem {
    flex-wrap: wrap;
  }

  .quick-redeem-btn {
    flex: 1 1 45%;
  }
}

/* Small phone breakpoint */
@media (max-width: 480px) {
  /* Login screen */
  .login-box {
    padding: 1.5rem;
    margin: 0.5rem;
    border-radius: 1rem;
  }

  .brand-icon {
    width: 60px;
    height: 60px;
  }

  .brand-icon img {
    width: 100px !important;
    height: 100px !important;
  }

  .brand-title {
    font-size: 1.5rem;
    letter-spacing: 2px;
  }

  .brand-subtitle {
    font-size: 0.75rem;
  }

  /* PIN pad - larger touch targets */
  .pin-pad {
    max-width: 100%;
    gap: 0.4rem;
  }

  .pin-btn {
    padding: 1.1rem;
    font-size: 1.5rem;
    min-height: 52px;
  }

  .pin-display {
    gap: 0.5rem;
  }

  .pin-dot {
    width: 0.875rem;
    height: 0.875rem;
  }

  .login-time {
    font-size: 1.25rem;
  }

  .login-links {
    font-size: 0.75rem;
  }

  /* Header - minimal */
  .pos-header {
    padding: 0.35rem;
  }

  .header-left h1 {
    font-size: 0.9rem;
  }

  /* All buttons visible, just compact */

  .admin-link {
    padding: 0.35rem 0.5rem;
    font-size: 0.65rem;
  }

  .staff-profile-btn {
    padding: 0.35rem 0.5rem;
  }

  #staff-name {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-logout {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
  }

  /* Product grid - 2 columns */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    padding: 0.35rem;
  }

  .product-card {
    padding: 0.4rem;
  }

  .product-name {
    font-size: 0.7rem;
  }

  .product-meta {
    gap: 0.2rem;
  }

  /* Cart */
  .cart-header h2 {
    font-size: 0.9rem;
  }

  .btn-clear-cart {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }

  .cart-item-name {
    font-size: 0.7rem;
  }

  .cart-totals {
    padding: 0.5rem;
  }

  .total-row {
    font-size: 0.7rem;
  }

  .total-final {
    font-size: 1rem;
  }

  /* Customer panel compact */
  .customer-name {
    font-size: 0.75rem;
  }

  .customer-panel-details {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .btn-redeem-points,
  .btn-customer-support {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
  }

  /* Modals */
  .modal-content {
    padding: 0.75rem;
  }

  .modal-content h2 {
    font-size: 1.1rem;
  }

  /* Receipt */
  .receipt {
    font-size: 0.75rem;
  }

  .receipt-header h2 {
    font-size: 1rem;
  }

  /* Form inputs - prevent zoom */
  input, select, textarea {
    font-size: 16px;
  }
}

/* Landscape phone */
@media (max-width: 896px) and (orientation: landscape) {
  .pos-main {
    flex-direction: row;
  }

  .products-section {
    flex: 1;
  }

  .cart-section {
    width: 280px;
    min-width: 280px;
    max-height: 100%;
    border-top: none;
    border-left: 2px solid var(--primary);
  }

  .product-grid {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
  }

  .login-box {
    padding: 1rem 2rem;
    max-width: 450px;
  }

  .pin-pad {
    max-width: 240px;
  }

  .pin-btn {
    padding: 0.75rem;
    font-size: 1.2rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .cat-tab,
  .strain-filter-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-card {
    min-height: 80px;
  }

  .qty-btn {
    width: 36px;
    height: 36px;
  }

  .btn-pay {
    min-height: 52px;
  }

  .pin-btn {
    min-height: 48px;
  }

  /* Remove hover effects that don't work on touch */
  .product-card:hover {
    transform: none;
  }

  .pin-btn:hover {
    transform: none;
  }
}

/* ============================================================================
   LOYALTY POINTS REDEMPTION
   ============================================================================ */

.btn-redeem-points {
  padding: 0.25rem 0.5rem;
  background: var(--warning);
  color: var(--darker);
  border: none;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-redeem-points:hover {
  background: #d97706;
}

.btn-redeem-points:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.discount-row {
  color: var(--success);
}

.discount-value {
  font-weight: 600;
  color: var(--success);
}

.redeem-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--darker);
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.redeem-balance, .redeem-value {
  display: flex;
  justify-content: space-between;
}

.points-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--warning);
}

.quick-redeem-btn {
  flex: 1;
  padding: 0.5rem;
  background: var(--dark);
  border: 1px solid var(--gray);
  border-radius: 0.375rem;
  color: var(--white);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.quick-redeem-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ============================================================================
   DEALS DISPLAY IN CART
   ============================================================================ */

.cart-deals-container {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-deal-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--success);
}

.deal-badge {
  display: inline-block;
  background: var(--success);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.deal-savings {
  margin-left: auto;
  font-weight: 600;
  color: var(--success);
}

.deal-discount-row {
  color: var(--success);
}

.deal-discount-row .discount-value {
  font-weight: 600;
  color: var(--success);
}

/* Receipt deal display */
.receipt-savings {
  font-weight: 700;
}

.receipt-deals {
  text-align: center;
  padding: 0.5rem 0;
  border-top: 1px dashed #ccc;
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

.receipt-deals-header {
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.receipt-deal-name {
  margin: 0;
}

.receipt-deal-saved {
  font-weight: 700;
  margin-top: 0.25rem;
}

/* ============================================================================
   PRINT STYLES - Receipt only
   ============================================================================ */

@media print {
  /* Hide everything */
  body * {
    visibility: hidden;
  }

  /* Show only the receipt */
  #receipt-modal,
  #receipt-modal * {
    visibility: visible;
  }

  /* Remove modal overlay styling */
  #receipt-modal {
    position: absolute;
    inset: 0;
    background: none;
    display: block !important;
  }

  /* Position receipt at top of page */
  #receipt-modal .modal-content {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: #fff;
  }

  /* Receipt sizing for thermal printer */
  #receipt-modal .receipt {
    width: 80mm;
    font-size: 12px;
    color: #000;
  }

  #receipt-modal .receipt-header h2 {
    font-size: 16px;
  }

  #receipt-modal .receipt-header p {
    color: #333;
  }

  /* Hide the print/new sale buttons */
  #receipt-modal .modal-actions {
    display: none !important;
  }

  /* Single page */
  @page {
    margin: 0;
    size: 80mm auto;
  }
}

/* ============================================================================
   RETURNS & EXCHANGES - POS Styles
   ============================================================================ */

.return-modal-content {
  max-width: 650px;
}

.return-item-row {
  transition: border-color 0.2s;
  border: 1px solid transparent;
}

.return-item-row:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
}

.return-summary {
  background: var(--darker);
  padding: 1rem;
  border-radius: 0.5rem;
}

/* Store Credit Display in Customer Panel */
.customer-credit-display {
  color: #3b82f6;
  font-weight: 600;
  font-size: 0.65rem;
}

.btn-use-credit {
  padding: 0.2rem 0.5rem;
  font-size: 0.6rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-use-credit:hover {
  background: #2563eb;
}

/* Store Credit Discount Row in Cart */
.store-credit-row {
  color: #3b82f6;
}

.store-credit-row .discount-value {
  font-weight: 600;
  color: #3b82f6;
}

/* Return step indicators */
.return-step {
  animation: fadeIn 0.2s ease-out;
}

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

/* Mobile responsive for return modal */
@media (max-width: 768px) {
  .return-modal-content {
    width: 98vw !important;
    max-width: 98vw !important;
    padding: 1rem;
  }

  .return-item-row {
    padding: 0.5rem !important;
  }

  #return-items-list {
    max-height: 250px !important;
  }
}

/* Return error banner */
.return-error {
  background: #ef4444;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Return mode selection cards */
.return-mode-cards {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.return-mode-card {
  flex: 1;
  background: var(--darker);
  border: 2px solid var(--gray);
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.return-mode-card:hover {
  border-color: var(--primary);
  background: var(--dark);
  transform: translateY(-2px);
}

.return-mode-card:active {
  transform: translateY(0);
  border-color: var(--primary);
  background: var(--darker);
}

/* Single-flow item cards */
.return-item-card {
  border: 2px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.return-item-card:hover {
  border-color: var(--gray);
}

.return-item-card.selected {
  border-color: var(--primary);
  background: var(--dark) !important;
}

/* Mobile responsive for mode cards */
@media (max-width: 768px) {
  .return-mode-cards {
    flex-direction: column;
    gap: 0.75rem;
  }

  .return-mode-card {
    padding: 1rem 0.75rem;
  }
}

/* ============================================================================
   CLOCK-IN ENFORCEMENT OVERLAY
   ============================================================================ */

.clock-in-overlay {
  position: absolute;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.clock-in-overlay-content {
  text-align: center;
  background: var(--dark);
  border: 1px solid rgba(107, 114, 128, 0.3);
  border-radius: 1rem;
  padding: 2.5rem 3rem;
  max-width: 420px;
  width: 90%;
}

.clock-in-overlay-content h2 {
  font-size: 1.5rem;
  margin: 1rem 0 0.25rem;
  color: var(--white);
}

.clock-in-overlay-content p {
  color: var(--gray);
  margin: 0.25rem 0;
}

.clock-in-overlay-msg {
  font-size: 0.9rem;
  margin-top: 0.5rem !important;
  margin-bottom: 1.5rem !important;
}

.clock-in-overlay-icon {
  color: var(--warning);
}

.clock-in-overlay-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.clock-in-overlay-actions button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

/* ============================================================================
   SHIFT-END COUNTDOWN
   ============================================================================ */

.shift-end-countdown {
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  padding: 1rem 0;
}

#shift-end-countdown.urgent {
  color: var(--danger);
  animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}
