/* index.css - Glowkaya Salon POS Luxury UI System */

:root {
  --bg-cream: #FAF9FC;
  --primary-green: #2E3192; /* Twilight Blue */
  --primary-green-light: #3E42A8;
  --accent-gold: #EC008C; /* Neon Fuchsia */
  --accent-gold-light: rgba(236, 0, 140, 0.06);
  --accent-gold-dark: #D0007B; /* Readability-adjusted dark fuchsia */
  --text-dark: #1E2229;
  --text-light: #FFFFFF;
  --text-muted: #6C7A89;
  --bg-white: #FFFFFF;
  
  --radius-card: 12px;
  --radius-btn: 8px;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Montserrat', Georgia, serif;
  
  --shadow-subtle: 0 4px 20px rgba(46, 49, 146, 0.03);
  --shadow-hover: 0 8px 30px rgba(46, 49, 146, 0.08);
  --shadow-gold-glow: 0 6px 20px rgba(236, 0, 140, 0.15);
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-cream);
  color: var(--text-dark);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Viewport Shell */
#pos-app-shell {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ========================================================== */
/* HEADER & TOP NAVIGATION STYLES (No sidebar configuration) */
/* ========================================================== */
#pos-header {
  height: 70px;
  min-height: 70px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--primary-green);
  color: var(--text-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.logo-monogram {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: var(--accent-gold);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: var(--shadow-gold-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text .brand {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-text .sub {
  font-size: 0.55rem;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-top: 1px;
}

.header-nav {
  display: flex;
  gap: 6px;
  height: 100%;
  align-items: center;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-item i {
  font-size: 1rem;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

.nav-item.active {
  background-color: var(--accent-gold);
  color: var(--text-light);
  box-shadow: var(--shadow-gold-glow);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Compact Search Bar in Header */
.header-search-bar {
  position: relative;
  width: 220px;
}

.header-search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.header-search-bar input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
  transition: var(--transition-smooth);
}

.header-search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search-bar input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background-color: var(--bg-white);
  color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(236, 0, 140, 0.08);
}

.header-right .quick-stats-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
}

.quick-stats-pill .label {
  color: rgba(255, 255, 255, 0.6);
}

.quick-stats-pill .val {
  color: var(--accent-gold);
  font-weight: 700;
}

/* ========================================================== */
/* WORKSPACE CONTAINER */
/* ========================================================== */
#pos-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px);
  overflow: hidden;
}

/* View switcher views */
.workspace-view {
  display: none;
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  height: calc(100vh - 80px);
}

.workspace-view.active {
  display: flex;
  flex-direction: column;
}

/* ========================================================== */
/* POS GRID MODULES */
/* ========================================================== */
.pos-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 28px;
  height: 100%;
}

.pos-services-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  min-width: 0; /* allow shrinking; category tabs scroll instead of widening the page */
}

.search-bar-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.05rem;
}

.search-bar-wrapper input {
  width: 100%;
  padding: 14px 18px 14px 48px;
  border: 1.5px solid rgba(27, 67, 50, 0.1);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background-color: var(--bg-white);
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.search-bar-wrapper input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.08);
}

/* Category Tabs */
.category-tabs-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none; /* scroll hint comes from the edge fade instead */
  -webkit-overflow-scrolling: touch;
}

.category-tabs-container::-webkit-scrollbar {
  display: none;
}

/* Right-edge fade while more tabs are hidden off-screen (toggled by JS) */
.category-tabs-container.fade-end {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}

.category-tab {
  background-color: var(--bg-white);
  border: 1.5px solid rgba(46, 49, 146, 0.1);
  padding: 0 18px;
  min-height: 44px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  scroll-snap-align: start;
  touch-action: manipulation;
  box-shadow: 0 1px 3px rgba(46, 49, 146, 0.04);
}

.category-tab i {
  font-size: 0.82rem;
  color: var(--accent-gold-dark);
  transition: var(--transition-smooth);
}

.category-tab:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.category-tab:active {
  transform: scale(0.96);
}

.category-tab:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.category-tab.active {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
  border-color: var(--primary-green);
  color: var(--text-light);
  box-shadow: 0 6px 16px rgba(46, 49, 146, 0.28);
}

.category-tab.active i {
  color: var(--accent-gold);
}

@media (prefers-reduced-motion: reduce) {
  .category-tab, .category-tab i { transition: none; }
  .category-tab:active { transform: none; }
}

/* Service Tiles Grid */
.service-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  grid-auto-rows: max-content;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
}

.service-tile {
  background-color: var(--bg-white);
  border: 1.5px solid rgba(27, 67, 50, 0.08);
  border-radius: var(--radius-card);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 110px;
  box-shadow: var(--shadow-subtle);
}

.service-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-hover);
}

.service-tile .tile-icon {
  font-size: 1.3rem;
  color: var(--primary-green);
}

.service-tile .tile-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.25;
  height: 30px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-tile .tile-price {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
}

.service-tile .favorite-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--accent-gold);
  font-size: 0.75rem;
}

/* ========================================================== */
/* CHECKOUT PANEL STYLES */
/* ========================================================== */
.pos-checkout-panel {
  height: 100%;
}

.checkout-card {
  background-color: var(--bg-white);
  border: 1.5px solid rgba(27, 67, 50, 0.08);
  border-radius: var(--radius-card);
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
}

.card-title {
  font-family: var(--font-serif);
  color: var(--primary-green);
  font-size: 1.25rem;
  border-bottom: 1.5px solid rgba(27, 67, 50, 0.05);
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-selection-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-top: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.input-group select,
.input-group input,
.input-group textarea {
  padding: 10px 14px;
  border: 1.5px solid rgba(27, 67, 50, 0.1);
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background-color: var(--bg-white);
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.input-group select:focus,
.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.flex-1 {
  flex: 1;
}

.btn {
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-outline-gold {
  background: none;
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold-dark);
}

.btn-outline-gold:hover {
  background-color: var(--accent-gold);
  color: var(--primary-green);
}

.btn-accent-gold {
  background-color: var(--accent-gold);
  border: 1.5px solid var(--accent-gold);
  color: var(--primary-green);
}

.btn-accent-gold:hover {
  background-color: var(--accent-gold-dark);
  border-color: var(--accent-gold-dark);
  color: var(--text-light);
  box-shadow: var(--shadow-gold-glow);
}

.btn-full {
  width: 100%;
}

/* Cart Table styles */
.cart-items-table-wrapper {
  flex: 1;
  overflow-y: auto;
  margin-top: 20px;
  border-bottom: 1.5px solid rgba(27, 67, 50, 0.05);
  min-height: 120px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.cart-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(27, 67, 50, 0.05);
}

.cart-table td {
  padding: 12px 0;
  border-bottom: 1px solid rgba(27, 67, 50, 0.03);
  vertical-align: top;
}

.cart-table td .item-name {
  font-weight: 600;
  display: block;
  color: var(--text-dark);
}

.cart-table td .item-attr {
  font-size: 0.72rem;
  color: var(--accent-gold-dark);
  display: block;
  margin-top: 2px;
}

.cart-table td select {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(27, 67, 50, 0.1);
  font-size: 0.75rem;
}

.text-right {
  text-align: right;
}

.text-center {
  text-center: center;
}

.cart-table .btn-remove {
  background: none;
  border: none;
  color: #D32F2F;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.cart-table .btn-remove:hover {
  transform: scale(1.1);
}

/* Checkout summary card info */
.checkout-summary {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
}

.summary-row.align-center {
  align-items: center;
}

.discount-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discount-fields {
  display: flex;
  border: 1px solid rgba(27, 67, 50, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.discount-fields input {
  width: 50px;
  padding: 3px 6px;
  border: none;
  text-align: center;
  font-size: 0.8rem;
}

.discount-fields select {
  padding: 3px 6px;
  border: none;
  border-left: 1px solid rgba(27, 67, 50, 0.1);
  font-size: 0.8rem;
  background: var(--bg-cream);
  cursor: pointer;
}

.tax-toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Switch sliders */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(27, 67, 50, 0.1);
  transition: .3s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-green);
}

input:checked + .slider:before {
  transform: translateX(14px);
}

.summary-divider {
  border: none;
  border-top: 1.5px solid rgba(27, 67, 50, 0.08);
}

.summary-row.total-row {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-green);
}

.payment-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.btn-checkout {
  padding: 14px;
  font-size: 0.95rem;
  margin-top: 8px;
}

/* ========================================================== */
/* ADMIN TABLES */
/* ========================================================== */
.panel-card {
  background-color: var(--bg-white);
  border: 1.5px solid rgba(27, 67, 50, 0.08);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(27, 67, 50, 0.05);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.panel-header h3 {
  font-family: var(--font-serif);
  color: var(--primary-green);
  font-size: 1.3rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.admin-table th {
  padding: 12px 16px;
  background-color: rgba(27, 67, 50, 0.02);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1.5px solid rgba(27, 67, 50, 0.05);
}

.admin-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(27, 67, 50, 0.03);
}

.admin-table tr:hover td {
  background-color: rgba(27, 67, 50, 0.01);
}

/* ========================================================== */
/* ANALYTICS STYLES */
/* ========================================================== */
.reports-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px 24px;
}

.stat-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.stat-card h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--primary-green);
  margin-top: 6px;
}

.reports-layout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

/* ========================================================== */
/* MODALS & POPUPS */
/* ========================================================== */
.pos-modal {
  border: none;
  border-radius: var(--radius-card);
  margin: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  background: var(--bg-white);
  transition: var(--transition-smooth);
}

.pos-modal::backdrop {
  background: rgba(27, 67, 50, 0.25);
  backdrop-filter: blur(4px);
}

.modal-content {
  width: 500px;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(27, 67, 50, 0.05);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-family: var(--font-serif);
  color: var(--primary-green);
  font-size: 1.25rem;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover {
  color: var(--primary-green);
}

.modal-instructions {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.attributes-selection-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Option Checkbox/Radio selectors */
.attr-select-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border: 1.5px solid rgba(27, 67, 50, 0.08);
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  user-select: none;
}

.attr-select-option input[type="radio"],
.attr-select-option input[type="checkbox"] {
  display: none;
}

.attr-select-option:hover {
  background-color: rgba(27, 67, 50, 0.02);
}

.attr-select-option.selected {
  border-color: var(--accent-gold);
  background-color: var(--accent-gold-light);
  color: var(--primary-green);
  font-weight: 600;
}

.attr-select-option .option-price {
  color: var(--accent-gold-dark);
  font-weight: 700;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  border-top: 1.5px solid rgba(27, 67, 50, 0.05);
  padding-top: 16px;
}

.modal-total-display {
  display: flex;
  flex-direction: column;
}

.modal-total-display span:first-child {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-total-display span:last-child {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Forms layout */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* ========================================================== */
/* RECEIPTS & PRINTS */
/* ========================================================== */
.thermal-receipt {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  color: #000;
  line-height: 1.4;
  padding: 10px 0;
}

.receipt-header {
  text-align: center;
  margin-bottom: 12px;
}

.receipt-header .shop-name {
  font-size: 1.15rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.receipt-divider {
  border: none;
  border-top: 1px dashed #000;
  margin: 8px 0;
}

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

.receipt-row.bold {
  font-weight: bold;
}

.receipt-items {
  margin: 10px 0;
}

.receipt-item-row {
  margin-bottom: 6px;
}

.receipt-item-desc {
  display: block;
}

.receipt-item-sub {
  font-size: 0.68rem;
  color: #555;
  padding-left: 8px;
}

/* ========================================================== */
/* FLOATING TOASTS */
/* ========================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-btn);
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 250px;
  transform: translateY(20px);
  opacity: 0;
  animation: slideUp 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
  background-color: var(--primary-green);
}

.toast.danger {
  background-color: #D32F2F;
}

.toast.warning {
  background-color: #EF6C00;
}

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

/* Print utilities styles */
@media print {
  body * {
    visibility: hidden;
  }
  
  #modal-invoice, #invoice-receipt-content, #invoice-receipt-content * {
    visibility: visible;
  }
  
  #modal-invoice {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  
  .invoice-actions, .btn-close-modal {
    display: none !important;
  }
}

/* ========================================================== */
/* DENSE/ICON CTA STYLES & MOBILE NAV/DRAWER SYSTEM */
/* ========================================================== */
.btn-icon-only {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold-dark);
}

.checkout-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(27, 67, 50, 0.05);
  padding-bottom: 12px;
}

.checkout-card-header .card-title {
  border-bottom: none;
  padding-bottom: 0;
}

.mobile-close-drawer-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* Hide mobile elements on desktop by default */
#mobile-bottom-nav,
#mobile-cart-trigger {
  display: none !important;
}

/* ========================================================== */
/* RESPONSIVE DESIGN - MOBILE & TABLETS (under 768px) */
/* ========================================================== */
@media (max-width: 768px) {
  /* Topbar logo scaling & navigation hiding */
  #desktop-nav {
    display: none !important;
  }
  
  #pos-header {
    height: 60px;
    min-height: 60px;
    padding: 0 16px;
  }
  
  .header-logo .brand {
    font-size: 0.95rem;
  }
  
  .header-logo .sub {
    display: none; /* Hide tagline on mobile */
  }
  
  .header-logo .logo-monogram {
    width: 32px;
    height: 32px;
    font-size: 1.15rem;
  }
  
  .header-search-bar {
    width: 140px;
  }
  
  .header-search-bar input {
    padding: 6px 10px 6px 28px;
    font-size: 0.76rem;
  }
  
  .header-search-bar .search-icon {
    left: 10px;
    font-size: 0.8rem;
  }
  
  .quick-stats-pill {
    display: none !important; /* Hide stats in header on mobile */
  }
  
  /* Main workspace padding */
  .workspace-view {
    padding: 16px 12px;
    height: calc(100vh - 125px); /* Subtract header (60px) + bottom nav (65px) */
  }
  
  /* POS layout grid splits into single column stack */
  .pos-layout-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    height: 100%;
  }
  
  /* Tiles Grid sizing */
  .service-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 8px;
    padding-bottom: 80px; /* Space for floating cart trigger */
  }
  
  .service-tile {
    height: 96px;
    padding: 10px 6px;
    gap: 4px;
  }
  
  .service-tile .tile-icon {
    font-size: 1.15rem;
  }
  
  .service-tile .tile-name {
    font-size: 0.74rem;
    height: 26px;
  }
  
  /* Slide-up Cart Drawer on Mobile */
  .pos-checkout-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 80vh;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .pos-checkout-panel.active {
    transform: translateY(0);
    box-shadow: 0 -10px 30px rgba(46, 49, 146, 0.15);
  }
  
  .checkout-card {
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    border: none;
    border-top: 1px solid rgba(27, 67, 50, 0.08);
    height: 100%;
    padding: 20px 16px;
    overflow-y: auto; /* Enable safe scrolling for all checkout inputs */
  }
  
  .mobile-close-drawer-btn {
    display: block; /* Show handle back button inside drawer */
  }
  
  .cart-items-table-wrapper {
    min-height: 80px;
  }

  /* Floating Bottom Navigation Menu (Replaces Sidebar) */
  #mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: var(--primary-green);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 997;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  }
  
  #mobile-bottom-nav .nav-tab {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: var(--transition-smooth);
  }
  
  #mobile-bottom-nav .nav-tab i {
    font-size: 1.15rem;
  }
  
  #mobile-bottom-nav .nav-tab.active {
    color: var(--accent-gold);
    font-weight: 700;
  }
  
  /* Floating Mobile Cart Trigger Pill */
  #mobile-cart-trigger {
    display: flex !important;
    position: fixed;
    bottom: -100px; /* Hidden by default */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 480px;
    height: 52px;
    background-color: var(--accent-gold);
    color: var(--text-light);
    border: none;
    border-radius: 30px;
    z-index: 998;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: var(--shadow-gold-glow);
    cursor: pointer;
    transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  #mobile-cart-trigger.visible {
    bottom: 80px; /* Pops up right above the bottom nav bar! */
  }
  
  #mobile-cart-trigger .trigger-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  #mobile-cart-trigger .trigger-right {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  #mobile-cart-trigger .trigger-right .label {
    font-weight: 400;
    opacity: 0.8;
  }
  
  #mobile-cart-trigger .trigger-right i {
    font-size: 0.75rem;
    margin-left: 2px;
  }
  
  /* Modals sizing for mobile */
  .modal-content {
    width: calc(100vw - 20px);
    max-width: 100vw;
    padding: 16px;
  }
  
  .pos-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    margin-top: auto;
  }
  
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  
  .reports-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .reports-layout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ========================================================== */
/* CLIENT PARALLEL TABS & AUTOCOMPLETE AUTO-SUGGEST STYLES */
/* ========================================================== */
.relative-container {
  position: relative;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper input {
  width: 100%;
  padding-right: 36px;
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-clear-search:hover {
  color: var(--accent-gold-dark);
}

.btn-clear-search.hidden {
  display: none;
}

.autocomplete-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background-color: var(--bg-white);
  border: 1.5px solid rgba(46, 49, 146, 0.1);
  border-radius: var(--radius-btn);
  box-shadow: 0 10px 25px rgba(46, 49, 146, 0.08);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1010;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.autocomplete-results.hidden {
  display: none;
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
}

.autocomplete-item i {
  color: var(--primary-green);
  font-size: 0.9rem;
  width: 16px;
}

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

.autocomplete-item:hover {
  background-color: rgba(236, 0, 140, 0.04);
  color: var(--primary-green);
}

.cart-tabs-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  width: 100%;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1.5px solid rgba(46, 49, 146, 0.06);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.cart-tabs-row::-webkit-scrollbar {
  height: 4px;
}

.cart-tabs-row::-webkit-scrollbar-thumb {
  background-color: rgba(46, 49, 146, 0.1);
  border-radius: 2px;
}

.cart-tab-btn {
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border-radius: 6px;
  border: 1px solid rgba(46, 49, 146, 0.12);
  background-color: rgba(46, 49, 146, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.cart-tab-btn i {
  font-size: 0.8rem;
}

.cart-tab-btn:hover {
  background-color: rgba(46, 49, 146, 0.08);
  color: var(--primary-green);
}

.cart-tab-btn.active {
  background-color: var(--primary-green);
  color: var(--text-light);
  border-color: var(--primary-green);
  box-shadow: 0 4px 10px rgba(46, 49, 146, 0.15);
}

.cart-tab-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: inherit;
  opacity: 0.6;
  font-size: 0.62rem;
  transition: var(--transition-smooth);
}

.cart-tab-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  opacity: 1;
  transform: scale(1.1);
}

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

/* Staff status badges styles */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border-radius: 14px;
}

.badge-status.success {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.badge-status.danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}
/* Login screen overlay container styles */
.login-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--primary-green);
  background-image: radial-gradient(circle at 80% 20%, rgba(236, 0, 140, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 10% 80%, rgba(46, 49, 146, 0.3) 0%, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.login-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
  margin-bottom: 24px;
}

.login-header h2 {
  color: var(--primary-green);
}

.login-type-switch {
  display: flex;
  gap: 8px;
  margin: 24px 0 16px 0;
  background: rgba(46, 49, 146, 0.05);
  padding: 4px;
  border-radius: 8px;
}

.login-switch-btn {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.login-switch-btn.active {
  background: var(--bg-white);
  color: var(--primary-green);
  box-shadow: 0 2px 8px rgba(46, 49, 146, 0.1);
}

/* Hide utilities class */
.hidden {
  display: none !important;
}

/* ========================================================== */
/* MY STATS — ARTISAN REWARDS (mobile-first) */
/* ========================================================== */
.mystats-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* --- Profile hero --- */
.mystats-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 24px 32px;
  border-radius: 20px;
  color: var(--text-light);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(236, 0, 140, 0.35) 0%, rgba(236, 0, 140, 0) 55%),
    linear-gradient(160deg, var(--primary-green) 0%, #1B1E5E 60%, #14163F 100%);
  box-shadow: 0 16px 40px rgba(46, 49, 146, 0.25);
}

.mystats-hero-icon {
  font-size: 2.6rem;
  color: var(--accent-gold);
  margin-bottom: 14px;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(236, 0, 140, 0.45));
}

.mystats-hero h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.mystats-hero-sub {
  font-size: 0.72rem;
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
}

.mystats-balance-chip {
  margin-top: 28px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.07);
  padding: 18px 36px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.mystats-balance-chip .chip-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mystats-balance-chip .chip-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.mystats-balance-chip .chip-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

/* --- Progress to next slab --- */
.slab-progress-wrap {
  margin: 28px auto 0;
  max-width: 420px;
  text-align: left;
}

.slab-progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.slab-progress-track {
  height: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.slab-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, #FF5BB8 100%);
  box-shadow: 0 0 12px rgba(236, 0, 140, 0.55);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  .slab-progress-fill { transition: none; }
}

.slab-progress-hint {
  display: block;
  margin-top: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

/* --- Incentive slabs card --- */
.mystats-slab-card {
  border-radius: 20px;
  padding: 24px;
  background: var(--bg-white);
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(46, 49, 146, 0.06);
}

.mystats-slab-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.slab-header-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--accent-gold-dark);
  background: rgba(236, 0, 140, 0.08);
}

.mystats-slab-header h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-green);
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.mystats-slab-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Slab table --- */
.slab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.slab-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1.5px solid rgba(46, 49, 146, 0.1);
}

.slab-table th.num,
.slab-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.slab-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(46, 49, 146, 0.06);
  font-weight: 600;
  color: var(--text-dark);
}

.slab-table tbody tr:last-child td {
  border-bottom: none;
}

.slab-table td.slab-incentive {
  color: var(--accent-gold-dark);
  font-weight: 700;
}

.slab-table td.slab-total {
  color: var(--primary-green);
  font-weight: 700;
}

/* Slabs already reached: subtle confirmation tint */
.reached-slab-row td {
  color: var(--text-muted);
}

.reached-slab-row td.slab-incentive,
.reached-slab-row td.slab-total {
  color: var(--text-muted);
}

/* Current slab: strong highlight */
.current-slab-row td {
  background: linear-gradient(90deg, rgba(236, 0, 140, 0.09) 0%, rgba(46, 49, 146, 0.05) 100%);
  border-top: 1.5px solid rgba(236, 0, 140, 0.35);
  border-bottom: 1.5px solid rgba(236, 0, 140, 0.35);
  color: var(--text-dark);
}

.current-slab-row td:first-child { border-radius: 10px 0 0 10px; }
.current-slab-row td:last-child  { border-radius: 0 10px 10px 0; }

.slab-you-are-here {
  display: inline-block;
  background: var(--accent-gold);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 9px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(236, 0, 140, 0.35);
}

/* Mobile: tighter table + clearance above the bottom nav bar */
@media (max-width: 768px) {
  .mystats-hero { padding: 32px 18px 26px; }
  .mystats-balance-chip { padding: 14px 26px; width: 100%; }
  .mystats-slab-card { padding: 18px 14px; }
  .slab-table { font-size: 0.8rem; }
  .slab-table th, .slab-table td { padding-left: 8px; padding-right: 8px; }

  /* Keep scrollable content clear of the fixed bottom nav (65px) + gesture bar */
  .workspace-view {
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
  }
}

/* Mobile browsers: 100vh includes the URL bar area, pushing content under
   the bottom nav — dvh tracks the actual visible viewport instead */
@media (max-width: 768px) {
  @supports (height: 100dvh) {
    .workspace-view { height: calc(100dvh - 125px); }
    .pos-checkout-panel { height: 80dvh; }
  }
}

/* ========================================================== */
/* MOBILE HEADER: compact, never overflows the right edge */
/* ========================================================== */
@media (max-width: 768px) {
  #pos-header {
    gap: 10px;
  }

  .header-logo {
    flex: none;
  }

  .header-right {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    gap: 8px;
  }

  /* Search shrinks gracefully instead of pushing things off-screen */
  .header-search-bar {
    flex: 0 1 140px;
    min-width: 84px;
    width: auto;
  }

  /* User chip: truncate long names */
  #header-user-badge {
    min-width: 0;
    max-width: 132px;
    padding: 8px 12px;
  }

  #header-user-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Logout collapses to an icon-only round button (aria-label supplies the name) */
  .logout-label {
    display: none;
  }

  #header-logout-btn {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    font-size: 0.9rem !important;
  }
}
