/* ==========================================================================
   STAR FASHION SMART POS DESIGN SYSTEM
   ========================================================================== */

/* Design Tokens & Variables */
:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Color Palette */
  --bg-primary: #0a0a0f;
  --bg-secondary: #121021;
  --panel-glass: rgba(22, 19, 39, 0.55);
  --panel-glass-hover: rgba(29, 25, 51, 0.75);
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-active: rgba(124, 58, 237, 0.4);
  
  --color-text-primary: #f3f4f6;
  --color-text-muted: #9ca3af;
  --color-text-dark: #111827;
  
  --accent-purple: #7c3aed;
  --accent-purple-glow: rgba(124, 58, 237, 0.35);
  --accent-gold: #eab308;
  --accent-gold-glow: rgba(234, 179, 8, 0.2);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-red: #ef4444;
  
  /* Layout */
  --sidebar-width: 280px;
  --header-height: 90px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  
  /* Shadows & Blurs */
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --blur-main: blur(14px);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Globals */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at 50% 50%, var(--bg-secondary), var(--bg-primary));
  color: var(--color-text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Typography Helpers */
.gold-accent {
  color: var(--accent-gold);
}
.badge {
  background: var(--accent-purple-glow);
  color: #c4b5fd;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  border: 1px solid rgba(196, 181, 253, 0.2);
  width: fit-content;
}
.hidden {
  display: none !important;
}

/* ==========================================================================
   GLASS PANELS & CARDS
   ========================================================================== */
.glass-panel {
  background: var(--panel-glass);
  backdrop-filter: var(--blur-main);
  -webkit-backdrop-filter: var(--blur-main);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-main);
  padding: 24px;
  transition: var(--transition-normal);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: var(--transition-fast);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-weight: 500;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), #9333ea);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px var(--accent-purple-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ==========================================================================
   LOGIN SCREEN LAYOUT
   ========================================================================== */
#login-container {
  width: 450px;
  margin: 10vh auto;
  border: 1px solid var(--border-glass);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0.1em;
}

.login-header h2 {
  margin-top: 15px;
  font-size: 1.4rem;
  font-weight: 500;
}

.login-header p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.input-group input, .input-group select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.input-group input:focus, .input-group select:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--accent-purple-glow);
  background: rgba(0, 0, 0, 0.5);
  outline: none;
}

.demo-logins {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-logins h4 {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  text-align: center;
}

.demo-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.demo-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  padding: 6px;
  font-size: 0.75rem;
  text-align: center;
}

.demo-btn:hover {
  background: var(--accent-purple-glow);
  color: #fff;
  border-color: var(--accent-purple);
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */
#app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Left Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(10, 8, 21, 0.75);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
  z-index: 10;
}

.sidebar-header {
  margin-bottom: 40px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.menu-tab {
  background: transparent;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  text-align: left;
}

.menu-tab i {
  font-size: 1.1rem;
  width: 20px;
}

.menu-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.menu-tab.active {
  background: var(--accent-purple-glow);
  color: #fff;
  border-left: 3px solid var(--accent-purple);
}

/* User profile sidebar footer */
.user-profile {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 12px;
}

.user-avatar {
  background: var(--accent-purple-glow);
  color: #c4b5fd;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid rgba(196, 181, 253, 0.1);
}

.user-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.user-info h4 {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info .outlet-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#logout-btn {
  background: transparent;
  color: var(--accent-red);
  font-size: 1.1rem;
}

#logout-btn:hover {
  transform: scale(1.1);
}

/* Main Dashboard Panel */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 30px 40px;
}

/* Header Status Area */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
}

.header-title h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.header-title p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   VOICE ASSISTANT GLASS CARD
   ========================================================================== */
.voice-assistant-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 550px;
  padding: 12px 20px;
}

.waveform-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

#waveform-canvas {
  width: 100%;
  height: 32px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}

#voice-indicator-status {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.voice-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mic-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mic-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mic-btn.active-mic {
  background: var(--accent-purple);
  color: #fff;
  animation: micPulse 1.8s infinite;
  box-shadow: 0 0 15px var(--accent-purple);
}

@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

.transcription-box {
  display: flex;
  flex-direction: column;
  width: 220px;
}

.transcription-box .label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.transcription-box p {
  font-size: 0.8rem;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.help-btn {
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.2rem;
}

.help-btn:hover {
  color: var(--accent-gold);
}

/* ==========================================================================
   TAB PANELS LAYOUTS
   ========================================================================== */
.tab-panel {
  display: none;
  flex-grow: 1;
}

.tab-panel.active {
  display: block;
}

/* POS TERMINAL PANEL */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
  height: calc(100vh - var(--header-height) - 100px);
}

.product-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  padding-right: 10px;
}

.section-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-grow: 1;
  max-width: 500px;
}

.search-box i {
  color: var(--color-text-muted);
  margin-right: 12px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 12px 0;
  width: 100%;
  font-family: var(--font-body);
}

.filter-chips {
  display: flex;
  gap: 8px;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 0.85rem;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.filter-chip.active {
  background: var(--accent-purple);
  color: #fff;
}

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--panel-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.product-card .cat-tag {
  align-self: flex-start;
  font-size: 0.65rem;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-text-muted);
}

.product-card .sku-label {
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.product-card h4 {
  font-size: 0.95rem;
  min-height: 40px;
}

.product-card .spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.product-card .price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card .price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.product-card .stock-count {
  font-size: 0.75rem;
  color: var(--accent-emerald);
}
.product-card .stock-count.out-of-stock {
  color: var(--accent-red);
}

.product-card .add-cart-btn {
  background: var(--accent-purple-glow);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card:hover .add-cart-btn {
  background: var(--accent-purple);
}

/* ==========================================================================
   CART SECTION LAYOUT
   ========================================================================== */
.cart-section {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-section h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.cart-items-container {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 20px;
}

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

.cart-table th {
  text-align: left;
  color: var(--color-text-muted);
  font-weight: 500;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-table td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.cart-table .spec-desc {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.cart-table .qty-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 0.7rem;
}
.cart-table .qty-btn:hover {
  background: var(--accent-purple);
}

.cart-table .item-qty {
  display: inline-block;
  width: 24px;
  text-align: center;
}

.cart-table .remove-item-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.25);
}
.cart-table .remove-item-btn:hover {
  color: var(--accent-red);
}

.empty-cart-row .empty-msg {
  text-align: center;
  padding: 40px 0;
  color: var(--color-text-muted);
}

.empty-cart-row .empty-msg i {
  font-size: 2.2rem;
  margin-bottom: 12px;
  opacity: 0.3;
}

.card-subpanel {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 15px;
}

.card-subpanel h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.card-subpanel input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  color: #fff;
  border-radius: 4px;
  font-size: 0.8rem;
  width: 100%;
}

.card-subpanel .row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.billing-details .discount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.billing-details .discount-input {
  display: flex;
  gap: 4px;
  width: 200px;
}

.billing-details select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  color: #fff;
  font-size: 0.8rem;
}

.pay-method-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pay-methods {
  display: flex;
  gap: 12px;
}

.pay-radio input {
  display: none;
}

.pay-radio span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  display: block;
}

.pay-radio input:checked + span {
  background: var(--accent-purple-glow);
  border-color: var(--accent-purple);
  color: #fff;
}

.cart-summary {
  margin-bottom: 15px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.summary-line.highlight-total {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  margin-top: 8px;
}

.cart-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}

/* ==========================================================================
   INVENTORY TABLE LAYOUT
   ========================================================================== */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.select-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.select-group select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  color: #fff;
  border-radius: var(--radius-sm);
}

.table-container {
  overflow-x: auto;
  margin-bottom: 10px;
}

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

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text-muted);
  font-weight: 500;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.editable-qty {
  width: 70px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 4px;
  border-radius: 4px;
  text-align: center;
}

/* ==========================================================================
   RECEIVING BILL PANEL
   ========================================================================== */
.receiving-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 35px;
  align-items: start;
}

.section-sub {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.col {
  flex: 1;
}

.receiving-items-box {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.receiving-items-box h4 {
  font-size: 0.9rem;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.receiving-item-line {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr 30px;
  gap: 8px;
  margin-bottom: 10px;
}

.receiving-item-line select, .receiving-item-line input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  padding: 8px;
  color: #fff;
  border-radius: 4px;
  font-size: 0.8rem;
  width: 100%;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.margin-top {
  margin-top: 20px;
}

/* ==========================================================================
   REPORTS & ANALYTICS
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.border-purple { border-left: 4px solid var(--accent-purple); }
.border-gold { border-left: 4px solid var(--accent-gold); }
.border-green { border-left: 4px solid var(--accent-emerald); }
.border-blue { border-left: 4px solid #3b82f6; }

.metric-info p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.metric-info h2 {
  font-size: 1.4rem;
}

.reports-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ==========================================================================
   SYNC TABS & INSTRUCTION SETS
   ========================================================================== */
.sync-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 35px;
}

.sync-actions-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.csv-transfer-area {
  margin-top: 20px;
}

.csv-transfer-area textarea {
  width: 100%;
  height: 250px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #a7f3d0;
  font-family: monospace;
  padding: 16px;
  font-size: 0.85rem;
  resize: vertical;
}

.instruction-panel .instructions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 15px;
}

.instruction-panel .step {
  display: flex;
  gap: 15px;
}

.instruction-panel .step-num {
  background: var(--accent-purple-glow);
  color: #c4b5fd;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(196, 181, 253, 0.1);
}

.instruction-panel .step-body h5 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.instruction-panel .step-body p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   OVERLAY DIALOG MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.modal-close-btn {
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.2rem;
}
.modal-close-btn:hover {
  color: #fff;
}

.form-modal {
  width: 650px;
}

.form-modal .outlet-qty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.outlet-qty-input {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0,0,0,0.2);
  padding: 8px;
  border-radius: 4px;
  text-align: center;
}
.outlet-qty-input label {
  font-size: 0.75rem;
}
.outlet-qty-input input {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-glass);
  color: #fff;
  text-align: center;
  padding: 4px;
  border-radius: 4px;
  font-size: 0.85rem;
  width: 100%;
}

.help-modal {
  width: 800px;
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.help-section h4 {
  color: var(--accent-gold);
  font-size: 0.95rem;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 4px;
}

.help-section ul {
  list-style: none;
}

.help-section li {
  font-size: 0.8rem;
  margin-bottom: 8px;
  color: var(--color-text-muted);
}
.help-section li strong {
  color: #fff;
}

/* ==========================================================================
   INVOICE / RECEIPT INK PRINT STYLING
   ========================================================================== */
.invoice-sheet {
  background: #fff;
  color: #000;
  width: 550px;
  font-size: 0.85rem;
  padding: 30px;
  border-radius: 4px;
}

.invoice-sheet .modal-header h3 {
  color: #000;
}
.invoice-sheet .modal-close-btn {
  color: #666;
}

/* Internal Layout of printable receipt */
.receipt-header {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 2px dashed #ccc;
  padding-bottom: 15px;
}
.receipt-header h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.05em;
}
.receipt-header p {
  color: #555;
  font-size: 0.8rem;
}

.receipt-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 20px;
  font-size: 0.8rem;
  gap: 8px;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.receipt-table th {
  text-align: left;
  border-bottom: 1px solid #000;
  border-top: 1px solid #000;
  padding: 8px 0;
  font-weight: 700;
}

.receipt-table td {
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
}

.receipt-summary-box {
  width: 250px;
  margin-left: auto;
  margin-bottom: 25px;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.receipt-line.total-row {
  border-top: 1px solid #000;
  font-weight: 800;
  font-size: 1.1rem;
}

.receipt-customer {
  border-top: 1px solid #ccc;
  padding-top: 10px;
  margin-bottom: 20px;
  font-size: 0.8rem;
}

.receipt-footer {
  text-align: center;
  border-top: 2px dashed #ccc;
  padding-top: 15px;
  font-size: 0.75rem;
  color: #444;
}

/* Native Print Media Override */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  
  #app-container, .modal-overlay {
    display: none !important;
  }
  
  #invoice-modal, #receiving-modal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: #fff !important;
    display: flex !important;
    z-index: 9999 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  
  .modal-content {
    width: 100% !important;
    max-height: 100% !important;
    overflow: visible !important;
    border: none !important;
    background: #fff !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .modal-header, .modal-footer {
    display: none !important;
  }
  
  .invoice-sheet {
    width: 100% !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE LAYOUTS
   ========================================================================== */
.hidden-desktop {
  display: none !important;
}

.mobile-user-profile {
  position: relative;
}

.mobile-avatar {
  background: var(--accent-purple-glow);
  color: #c4b5fd;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid rgba(196, 181, 253, 0.15);
  cursor: pointer;
}

#mobile-user-box {
  position: absolute;
  top: 50px;
  right: 0;
  width: 200px;
  padding: 16px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Bottom Navigation Styling */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(10, 8, 21, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 98;
}

.bottom-nav .menu-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  border: none;
  width: 20%;
  text-align: center;
}

.bottom-nav .menu-tab i {
  font-size: 1.2rem;
  width: auto;
}

.bottom-nav .menu-tab.active {
  color: var(--accent-purple);
  background: transparent;
  border-left: none;
  border-bottom: 2px solid var(--accent-purple);
}

/* POS Mobile sub-toggle */
.pos-mobile-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 15px;
  border: 1px solid var(--border-glass);
}

.pos-toggle-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  border-radius: 6px;
  font-weight: 600;
}

.pos-toggle-btn.active {
  background: var(--accent-purple);
  color: #fff;
}

/* Media Queries */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 0px;
  }
  
  .sidebar {
    display: none !important;
  }
  
  .hidden-desktop {
    display: flex !important;
  }
  
  .bottom-nav.hidden-desktop {
    display: flex !important;
  }
  
  .main-content {
    padding: 20px 20px 85px 20px; /* Extra bottom padding for bottom nav */
  }
  
  .content-header {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  .voice-assistant-panel {
    width: 100%;
    margin-top: 10px;
  }
  
  /* POS layout */
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: visible;
  }
  
  /* Toggle visibility of catalog and cart based on active mobile view class */
  .pos-layout.show-cart .product-section {
    display: none !important;
  }
  .pos-layout.show-cart .cart-section {
    display: flex !important;
    width: 100%;
    margin-top: 0;
  }
  
  .pos-layout.show-catalog .product-section {
    display: flex !important;
  }
  .pos-layout.show-catalog .cart-section {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  .receiving-layout, .sync-layout {
    grid-template-columns: 1fr;
  }
  
  .voice-assistant-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .transcription-box {
    width: 100%;
  }
  
  .modal-content {
    width: 95%;
  }
  
  .help-grid {
    grid-template-columns: 1fr;
  }
  
  .section-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

