/* ==========================================================================
   SEMILIR SENJA POS - ULTRA MODERN CLASSIC DESIGN SYSTEM
   Inspired by Sheron Web Classic Theme: Glassmorphism, Outfit Typography & Neat Grid Layout
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700;800&family=Orbitron:wght@600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

/* Fallback Icon Display Rules for cPanel & ISP CDN blocking */
i[class^="ri-"], i[class*=" ri-"], i[class^="fa-"], i[class*=" fa-"] {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent missing font glyph boxes (🗌) if CDN font fails */
@supports not (font-technology(color-COLRv1)) {
  i[class^="ri-"]:not(.has-font)::before, i[class*=" ri-"]:not(.has-font)::before {
    font-family: inherit;
  }
}

/* SVG Inline Icon Base Rule (replaces font icons for cPanel & Mobile reliability) */
.icon-svg {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  vertical-align: -0.2em;
  flex-shrink: 0;
}

/* Default Light Mode Theme System (Classic Clean Luxury) */
:root, body[data-theme="light"] {
  --bg-main: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-glass: rgba(255, 255, 255, 0.88);

  --text-heading: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --primary: #5B7065;
  --primary-hover: #475B50;
  --primary-light: #EEF4F0;
  --primary-border: #C2D3C9;

  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --info: #0284C7;
  --info-bg: #F0F9FF;
  --purple: #8B5CF6;
  --purple-bg: #F5F3FF;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;

  --border-color: #E2E8F0;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(91, 112, 101, 0.08);
  --shadow-lg: 0 20px 45px -10px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(91, 112, 101, 0.2);

  --font-heading: 'Space Grotesk', 'Outfit', sans-serif;
  --font-serif: 'Space Grotesk', 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-sans: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  --font-digital: 'Chakra Petch', 'Share Tech Mono', 'Orbitron', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Classic Theme System (High-Tech Dark Luxury) */
body[data-theme="dark"] {
  --bg-main: #0A0E1A;
  --bg-surface: #111728;
  --bg-subtle: #161F33;
  --bg-glass: rgba(17, 23, 40, 0.9);

  --text-heading: #F8FAFC;
  --text-body: #CBD5E1;
  --text-muted: #94A3B8;
  --text-light: #64748B;

  --primary: #8FA89B;
  --primary-hover: #AAC3B5;
  --primary-light: #1F3027;
  --primary-border: #334A3F;

  --success: #34D399;
  --success-bg: #064E3B;
  --warning: #FBBF24;
  --warning-bg: #78350F;
  --info: #38BDF8;
  --info-bg: #0C4A6E;
  --purple: #A78BFA;
  --purple-bg: #4C1D95;
  --danger: #F87171;
  --danger-bg: #7F1D1D;

  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 24px rgba(143, 168, 155, 0.25);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent !important;
}

html, body, a, button, input, select, textarea, div, span, label, table, tr, td, [onclick], [role="button"] {
  -webkit-tap-highlight-color: transparent !important;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body.pos-app-body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-body);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphic Header & Role Navigation */
.pos-header {
  position: relative;
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  z-index: 100;
  width: 100%;
}

.pos-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.pos-brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.pos-brand img {
  border-radius: 10px !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.pos-brand img:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 5px 14px rgba(91, 112, 101, 0.16);
}

.pos-brand-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-heading);
  white-space: nowrap;
}

.role-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  background-color: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  margin: 0 auto;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 1;
  min-width: 0;
}

.role-switcher::-webkit-scrollbar {
  display: none;
}

.role-btn {
  padding: 5px 12px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.role-btn:hover { color: var(--primary); transform: translateY(-1px); }
.role-btn.active {
  background-color: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--primary-border);
}
.role-btn.hidden { display: none !important; }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 0;
  padding-right: 52px;
}

/* ==========================================================================
   SUPER CLEAN UNIFIED CONTROL CENTER SETTINGS DROPDOWN MENU
   ========================================================================== */
.pos-settings-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.pos-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-heading);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  white-space: nowrap;
}

body[data-theme="dark"] .pos-settings-btn {
  background: var(--bg-subtle);
  border-color: rgba(255, 255, 255, 0.12);
}

.pos-settings-btn:hover, .pos-settings-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
  transform: translateY(-1px);
}

.pos-settings-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 390px;
  max-width: 92vw;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: settingsMenuFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body[data-theme="dark"] .pos-settings-menu {
  background: #111728;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.pos-settings-menu.active {
  display: flex;
}

@keyframes settingsMenuFadeIn {
  0% { opacity: 0; transform: translateY(-8px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.settings-menu-header {
  padding: 14px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-heading);
}

.settings-close-btn {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.settings-close-btn:hover {
  color: var(--danger);
}

.settings-menu-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.settings-menu-item:hover {
  background: var(--bg-subtle);
}

body[data-theme="dark"] .settings-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.settings-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.bg-primary-soft { background: var(--primary-light); color: var(--primary); }
.bg-info-soft { background: var(--info-bg); color: var(--info); }
.bg-success-soft { background: var(--success-bg); color: var(--success); }
.bg-purple-soft { background: var(--purple-bg); color: var(--purple); }
.bg-warning-soft { background: var(--warning-bg); color: var(--warning); }
.bg-secondary-soft { background: var(--bg-subtle); color: var(--text-muted); }

.settings-item-icon svg,
.tile-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
  display: block;
}

.mobile-settings-icon-header {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.mobile-settings-icon-header svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.settings-item-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  white-space: nowrap;
}

.settings-item-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-action-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-action-pill.success-pill {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Switch Toggle Component */
.settings-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: .25s;
  border-radius: 22px;
}

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

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

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

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  white-space: nowrap;
}

.staff-header-card {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 8px 3px 4px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

body[data-theme="dark"] .staff-header-card {
  background: var(--bg-subtle);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.staff-avatar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.staff-avatar-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E5A967 0%, #D4AF37 50%, var(--primary) 100%);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(229, 169, 103, 0.35);
}

.staff-avatar-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.staff-online-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background-color: var(--success);
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
}

.staff-greeting-col {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.staff-salutation {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.staff-name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-heading);
}

.staff-metrics-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  margin: 0 2px;
}

body[data-theme="dark"] .staff-metrics-card {
  background: rgba(255, 255, 255, 0.05);
}

.metric-item {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.metric-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #D4AF37;
  letter-spacing: 0.3px;
}

.metric-value {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-value.role-gold-glow {
  color: #D4AF37;
}

.metric-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
}

.staff-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.staff-action-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-heading);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.staff-action-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
  transform: translateY(-1px);
}

.staff-action-btn.logout-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

@media (max-width: 992px) {
  .role-switcher {
    position: static;
    transform: none;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .staff-header-card {
    padding: 3px 8px 3px 4px;
    gap: 6px;
  }
  .staff-metrics-card {
    display: none;
  }
  .staff-name {
    font-size: 0.8rem;
  }
}

.logout-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.logout-btn:hover { background-color: var(--danger-bg); }

.live-clock {
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-heading);
  background-color: var(--bg-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

/* Fullscreen Toggle Button - Ultra Clean & Stable */
.fullscreen-toggle-btn {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: var(--shadow-sm);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.fullscreen-toggle-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.fullscreen-toggle-btn.active {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.back-to-web {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: var(--transition);
}

.back-to-web:hover { transform: translateX(-2px); }

/* Glassmorphic Login Modal */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: var(--transition);
  padding: 16px;
}

.login-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
}

.login-card {
  background-color: var(--bg-surface);
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  text-align: center;
}

.login-card-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 auto 16px auto;
  box-shadow: var(--shadow-glow);
}

.login-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--text-heading); margin-bottom: 6px; }
.login-subtitle { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 24px; }
.login-form-group { text-align: left; margin-bottom: 14px; }
.login-form-group label { display: block; font-size: 0.78rem; font-weight: 700; font-family: var(--font-heading); color: var(--text-heading); margin-bottom: 6px; }
.login-form-group input, .login-form-group select {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-subtle);
  color: var(--text-heading);
  outline: none;
  transition: var(--transition);
}

.login-form-group input:focus, .login-form-group select:focus {
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(91, 112, 101, 0.15);
}

.login-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.login-submit-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

/* Main Container */
.pos-body { flex-grow: 1; display: flex; overflow: hidden; position: relative; width: 100%; }
.role-view { width: 100%; height: 100%; display: none; overflow: hidden; }
.role-view.active { display: flex; animation: smoothViewFade 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes smoothViewFade {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 1. KASIR VIEW - Premium Classic Typography (Outfit & Plus Jakarta Sans) */
#view-pos, .pos-catalog-panel, .pos-cart-panel {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif !important;
}

#view-pos *, .pos-catalog-panel *, .pos-cart-panel * {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

.pos-catalog-panel { flex: 1; display: flex; flex-direction: column; padding: 24px; overflow-y: auto; }
.catalog-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.category-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.pill-btn { padding: 9px 18px; font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700; background-color: var(--bg-surface); color: var(--text-body); border: 1px solid var(--border-color); border-radius: var(--radius-full); cursor: pointer; white-space: nowrap; transition: var(--transition); }
.pill-btn.active, .pill-btn:hover { background-color: var(--primary); color: #FFFFFF; border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.pos-search { position: relative; width: 260px; }
.pos-search input { width: 100%; padding: 10px 16px 10px 38px; font-size: 0.88rem; border-radius: var(--radius-full); border: 1px solid var(--border-color); background-color: var(--bg-surface); color: var(--text-heading); outline: none; transition: var(--transition); }
.pos-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 112, 101, 0.15); }
.pos-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); }

.pos-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }

.pos-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pos-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2), 0 14px 30px -6px rgba(91, 112, 101, 0.22) !important;
}

.pos-card:active {
  transform: translateY(-2px) scale(0.96) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.35), 0 8px 20px rgba(46, 125, 50, 0.25) !important;
}

.pos-card-click-active {
  animation: cardActiveSelectionPop 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes cardActiveSelectionPop {
  0% {
    transform: scale(0.95) translateY(0);
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0);
  }
  40% {
    transform: scale(1.03) translateY(-6px);
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.4), 0 16px 36px rgba(46, 125, 50, 0.28) !important;
  }
  100% {
    transform: scale(1.01) translateY(-4px);
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.3), 0 12px 28px rgba(46, 125, 50, 0.22) !important;
  }
}

.pos-card.out-of-stock {
  filter: grayscale(0.85);
  opacity: 0.75;
  cursor: not-allowed;
}

.pos-card.out-of-stock:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-color);
}

.pos-card-img {
  width: 100%;
  height: 115px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  margin-bottom: 10px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pos-card:hover .pos-card-img {
  transform: scale(1.06);
}

.pos-card-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; color: var(--text-heading); margin-bottom: 4px; }
.pos-card-price { font-family: var(--font-heading); font-size: 0.92rem; font-weight: 800; color: var(--primary); margin-top: auto; transition: transform 0.25s ease; }
.pos-card:hover .pos-card-price { transform: translateX(2px); }

.stock-badge-low {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--warning);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-heading);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.stock-badge-out {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-heading);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

/* POS Cart Panel & Touch Target Buttons */
.pos-cart-panel { width: 410px; background-color: var(--bg-surface); border-left: 1px solid var(--border-color); display: flex; flex-direction: column; height: 100%; max-height: 100vh; overflow: hidden; position: relative; }
.cart-panel-header { padding: 14px 18px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.order-meta-form { padding: 12px 16px; background-color: var(--bg-subtle); border-bottom: 1px solid var(--border-color); display: grid; grid-template-columns: 1fr 1.1fr 0.85fr; gap: 8px; flex-shrink: 0; }
.form-group label { display: block; font-size: 0.72rem; font-weight: 800; font-family: var(--font-heading); text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.form-group input, .form-group select { width: 100%; padding: 9px 12px; font-size: 0.88rem; font-weight: 600; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background-color: var(--bg-surface); color: var(--text-heading); outline: none; }
.cart-items-scroll { flex: 1 1 0px; min-height: 90px; overflow-y: auto; padding: 12px 16px; }
.pos-cart-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; margin-bottom: 8px; border-bottom: 1px dashed var(--border-color); }
.pos-item-info { flex-grow: 1; padding-right: 8px; }
.pos-item-name { font-weight: 700; font-size: 0.9rem; color: var(--text-heading); margin-bottom: 2px; line-height: 1.3; }
.pos-item-price { font-size: 0.8rem; color: var(--text-muted); }

/* Enlarged Touch Target (+/- buttons 36px × 36px) */
.pos-qty-controls { display: flex; align-items: center; gap: 8px; }
.pos-qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-subtle);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
  touch-action: manipulation;
}

.pos-qty-btn:active {
  transform: scale(0.92);
  background-color: var(--primary-light);
  color: var(--primary);
}

/* Cart Summary & Cash Change Calculator Spacing */
.cart-summary { padding: 12px 16px 14px 16px; border-top: 1px solid var(--border-color); background-color: var(--bg-surface); flex-shrink: 0; max-height: 55vh; overflow-y: auto; position: relative; }
.summary-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; color: var(--text-muted); }
.summary-row.total { font-size: 1.2rem; font-weight: 800; font-family: var(--font-heading); color: var(--text-heading); border-top: 1px solid var(--border-color); padding-top: 8px; margin-top: 8px; margin-bottom: 8px; }

.cash-calc-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  margin: 8px 0;
}

.cash-pills-row {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.cash-pill-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  cursor: pointer;
  color: var(--text-body);
}

.cash-pill-btn:hover { background-color: var(--primary-light); color: var(--primary); }

.change-display-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.change-amount-text {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--success);
}

.discount-preset-box { display: flex; gap: 6px; margin: 6px 0 8px 0; flex-wrap: wrap; }
.discount-preset-btn { padding: 4px 10px; font-size: 0.72rem; font-weight: 700; border-radius: var(--radius-full); border: 1px solid var(--border-color); background-color: var(--bg-subtle); cursor: pointer; color: var(--text-body); transition: var(--transition); }
.discount-preset-btn.active { background-color: var(--warning-bg); color: var(--warning); border-color: var(--warning); }

.cart-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.cart-action-btn { padding: 8px; font-size: 0.8rem; font-weight: 700; font-family: var(--font-heading); border-radius: var(--radius-sm); border: 1px solid var(--border-color); background-color: var(--bg-subtle); color: var(--text-body); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cart-action-btn:hover { background-color: var(--primary-light); color: var(--primary); }

.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 8px 0; }
.pay-btn { padding: 8px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background-color: var(--bg-subtle); color: var(--text-body); font-size: 0.8rem; font-weight: 700; font-family: var(--font-heading); cursor: pointer; text-align: center; }
.pay-btn.active { background-color: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.process-order-btn { width: 100%; padding: 13px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); color: #FFFFFF; border: none; border-radius: var(--radius-md); font-size: 0.95rem; font-weight: 800; font-family: var(--font-heading); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--shadow-md); transition: var(--transition); position: sticky; bottom: 0; z-index: 20; margin-top: 8px; flex-shrink: 0; }
.process-order-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

/* 2. KITCHEN VIEW */
.kds-container { width: 100%; padding: 24px; display: flex; flex-direction: column; }
.kds-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.kds-filters { display: flex; gap: 10px; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; overflow-y: auto; flex-grow: 1; }
.ticket-card { background-color: var(--bg-surface); border-radius: var(--radius-md); border: 2px solid var(--border-color); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-sm); }
.ticket-card.status-pending { border-color: var(--warning); }
.ticket-card.status-preparing { border-color: var(--info); }
.ticket-card.status-ready { border-color: var(--success); }
.ticket-header { padding: 14px 18px; background-color: var(--bg-subtle); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.ticket-id { font-weight: 800; font-family: var(--font-heading); font-size: 1rem; color: var(--text-heading); }
.ticket-table { background-color: var(--primary-light); color: var(--primary); padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 800; font-family: var(--font-heading); }
.ticket-body { padding: 18px; flex-grow: 1; }
.ticket-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border-color); }
.ticket-item-qty { font-weight: 800; font-family: var(--font-heading); color: var(--primary); width: 28px; }
.ticket-item-name { font-weight: 700; font-size: 0.95rem; flex-grow: 1; color: var(--text-heading); }
.ticket-item-type { font-size: 0.75rem; padding: 2px 8px; border-radius: var(--radius-full); font-weight: 800; font-family: var(--font-heading); }
.type-drink { background-color: var(--info-bg); color: var(--info); }
.type-food { background-color: var(--warning-bg); color: var(--warning); }
.ticket-footer { padding: 14px 18px; border-top: 1px solid var(--border-color); display: flex; gap: 8px; }
.ticket-btn { flex: 1; padding: 11px; font-size: 0.88rem; font-weight: 800; font-family: var(--font-heading); border-radius: var(--radius-sm); border: none; cursor: pointer; transition: var(--transition); }
.btn-start { background-color: var(--info); color: #FFFFFF; }
.btn-ready { background-color: var(--success); color: #FFFFFF; }

/* 3. WAITERS VIEW */
.waiter-container { width: 100%; padding: 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; overflow-y: auto; }
.waiter-card { background-color: var(--bg-surface); border-radius: var(--radius-md); border: 1px solid var(--border-color); padding: 20px; box-shadow: var(--shadow-sm); }
.ready-orders-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.ready-order-item { background-color: var(--success-bg); border: 1px solid rgba(16, 185, 129, 0.3); border-radius: var(--radius-md); padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.tables-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; font-family: var(--font-digital); }
.table-box-card { font-family: var(--font-digital); background-color: var(--bg-subtle); border: 2px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.table-box-card.available { background-color: var(--success-bg); border-color: var(--success); }
.table-box-card.occupied { background-color: var(--warning-bg); border-color: var(--warning); }
.table-box-card.cleaning { background-color: var(--info-bg); border-color: var(--info); }
.table-box-card.reserved { background-color: var(--purple-bg); border-color: var(--purple); }
.table-box-title { font-weight: 800; font-family: var(--font-digital); font-size: 1.15rem; letter-spacing: 0.5px; color: var(--text-heading); }
.table-box-cap { font-size: 0.82rem; font-family: var(--font-digital); letter-spacing: 0.4px; color: var(--text-muted); margin-top: 2px; }
.table-status-pill { display: inline-block; font-size: 0.78rem; font-weight: 800; font-family: var(--font-digital); letter-spacing: 1px; text-transform: uppercase; padding: 5px 12px; border-radius: var(--radius-full); margin: 10px 0; cursor: pointer; text-align: center; }
.table-box-card.available .table-status-pill { background-color: var(--success); color: white; }
.table-box-card.occupied .table-status-pill { background-color: var(--warning); color: white; }
.table-box-card.cleaning .table-status-pill { background-color: var(--info); color: white; }
.table-box-card.reserved .table-status-pill { background-color: var(--purple); color: white; }
.table-actions { display: flex; gap: 6px; }
.tbl-action-btn { flex: 1; padding: 6px; font-size: 0.78rem; font-weight: 700; font-family: var(--font-digital); letter-spacing: 0.5px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background-color: var(--bg-surface); color: var(--text-body); cursor: pointer; }

/* 4. CUSTOMER TRACKER VIEW WITH ANIMATED RUNNING PROGRESS BAR */
.customer-container { max-width: 1100px; margin: 20px auto; padding: 24px; width: 100%; box-sizing: border-box; }
.tracker-card { background-color: var(--bg-surface); border-radius: var(--radius-lg); border: 1px solid var(--border-color); padding: 32px; box-shadow: var(--shadow-lg); text-align: center; }
.tracker-steps { display: flex; align-items: center; justify-content: space-between; margin: 36px 0; position: relative; }

.tracker-progress-bg {
  position: absolute;
  top: 20px;
  left: 30px;
  right: 30px;
  height: 5px;
  background-color: var(--border-color);
  z-index: 1;
  border-radius: 99px;
  overflow: hidden;
}

.tracker-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5B7065 0%, #10B981 50%, #8FA89B 100%);
  background-size: 200% 100%;
  animation: progressFlow 2s linear infinite;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

@keyframes progressFlow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.step-node { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.step-icon { width: 44px; height: 44px; border-radius: 50%; background-color: var(--bg-subtle); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; border: 2px solid var(--border-color); transition: all 0.4s ease; }
.step-node.completed .step-icon { background-color: var(--success); color: #FFFFFF; border-color: var(--success); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.step-node.active .step-icon { background-color: var(--primary); color: #FFFFFF; border-color: var(--primary); animation: activeStepPulse 1.8s ease-in-out infinite; }

@keyframes activeStepPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(91, 112, 101, 0.6), 0 4px 12px rgba(91, 112, 101, 0.3);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 12px rgba(91, 112, 101, 0), 0 8px 20px rgba(91, 112, 101, 0.5);
  }
}

.live-badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-right: 6px;
  animation: liveDotPulse 1.2s ease-in-out infinite;
}

@keyframes liveDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(91, 112, 101, 0.6); }
  50% { transform: scale(1.4); opacity: 0.8; box-shadow: 0 0 0 6px rgba(91, 112, 101, 0); }
}

/* 5. MANAGER CONTROL CENTER STYLES (Geometric Sans-Serif: Space Grotesk) */
#view-manager, .manager-container {
  font-family: 'Space Grotesk', 'Outfit', sans-serif !important;
}

#view-manager.role-view.active {
  flex-direction: column;
  width: 100%;
  height: 100%;
}

#view-manager *, .manager-container * {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
}

.manager-container { width: 100%; height: 100%; padding: 24px; overflow-y: auto; box-sizing: border-box; }
.manager-nav-tabs { display: flex; gap: 10px; border-bottom: 2px solid var(--border-color); padding-bottom: 12px; margin-bottom: 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mgr-nav-btn { padding: 10px 22px; font-size: 0.9rem; font-weight: 800; font-family: var(--font-heading); color: var(--text-muted); border-radius: var(--radius-full); border: 1px solid var(--border-color); background-color: var(--bg-surface); cursor: pointer; white-space: nowrap; transition: var(--transition); }
.mgr-nav-btn.active { background-color: var(--primary); color: #FFFFFF; border-color: var(--primary); box-shadow: var(--shadow-sm); }

.date-filter-box {
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 20px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 8px !important;
  scrollbar-width: none !important;
}

.date-filter-box::-webkit-scrollbar {
  display: none !important;
}

.date-filter-box span {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.date-filter-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  padding: 8px 16px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  font-family: var(--font-heading) !important;
  border-radius: var(--radius-full) !important;
  border: 1.5px solid var(--border-color) !important;
  background-color: var(--bg-surface) !important;
  cursor: pointer !important;
  color: var(--text-muted) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 38px !important;
  width: auto !important;
  min-width: fit-content !important;
  max-width: none !important;
  touch-action: manipulation !important;
  transition: var(--transition) !important;
}

.date-filter-btn.active {
  background-color: var(--primary) !important;
  color: #FFFFFF !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(91, 112, 101, 0.25) !important;
}

.custom-date-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Stat Cards Grid with Daily Revenue Highlight */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stats-overview-grid.stats-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.analytics-double-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.tables-double-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .stats-overview-grid,
  .stats-overview-grid.stats-grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .analytics-double-grid,
  .tables-double-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

@media (max-width: 600px) {
  .stats-overview-grid,
  .stats-overview-grid.stats-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ========================================================
   MODERN DIGITAL FINTECH MANAGER FINANCIAL DASHBOARD STYLES
   ======================================================== */

.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  padding: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-border);
}

.stat-card:hover::before {
  opacity: 0.9;
}

.stat-card.daily-highlight {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(16, 185, 129, 0.06) 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
}

.stat-card.omset-card {
  border: 1px solid rgba(6, 182, 212, 0.25);
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(6, 182, 212, 0.05) 100%);
}

.stat-card.expense-card {
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(244, 63, 94, 0.05) 100%);
}

.stat-card.profit-card {
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.fintech-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.fintech-icon-chip {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

.stat-card:hover .fintech-icon-chip {
  transform: scale(1.08);
}

.icon-emerald { background: rgba(16, 185, 129, 0.12); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.25); }
.icon-cyan { background: rgba(6, 182, 212, 0.12); color: #06B6D4; border: 1px solid rgba(6, 182, 212, 0.25); }
.icon-rose { background: rgba(244, 63, 94, 0.12); color: #F43F5E; border: 1px solid rgba(244, 63, 94, 0.25); }
.icon-indigo { background: rgba(99, 102, 241, 0.12); color: #6366F1; border: 1px solid rgba(99, 102, 241, 0.25); }
.icon-gold { background: rgba(245, 158, 11, 0.12); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.25); }

.fintech-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: liveDotPulse 1.8s infinite;
}

@keyframes liveDotPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.fintech-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-heading);
  padding: 4px 10px;
  border-radius: 8px;
}

.trend-up { background: rgba(16, 185, 129, 0.12); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.trend-down { background: rgba(244, 63, 94, 0.12); color: #F43F5E; border: 1px solid rgba(244, 63, 94, 0.2); }
.trend-neutral { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-color); }

.stat-title {
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-val {
  font-size: 1.65rem;
  font-weight: 900;
  font-family: var(--font-heading);
  color: var(--text-heading);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.stat-val.daily { color: #10B981; font-size: 1.75rem; }
.stat-val.profit { color: #10B981; }
.stat-val.expense { color: #F43F5E; }

.fintech-card-sub {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
}

/* Modern Date Filter Toolbar */
.date-filter-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.date-filter-pills-group {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.date-filter-btn {
  padding: 6px 14px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-filter-btn:hover {
  color: var(--text-heading);
}

.date-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(91, 112, 101, 0.35);
}

.custom-date-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mgr-date-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-heading);
  font-family: var(--font-heading);
  outline: none;
}

.mgr-date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.btn-filter-action {
  padding: 6px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-filter-action:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.btn-print-report {
  background: linear-gradient(135deg, #1f2923 0%, #2f3e35 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-heading);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(31, 41, 35, 0.25);
  transition: all 0.25s ease;
}

.btn-print-report:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 41, 35, 0.35);
  background: linear-gradient(135deg, #2a3a30 0%, #3a4d42 100%);
}

/* Modern Visual Sales Chart Card */
.sales-chart-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.chart-bars-flex {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 190px;
  padding-top: 36px;
  border-bottom: 1px solid var(--border-color);
}

.chart-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.chart-bar-nominal {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--primary);
  margin-bottom: 4px;
  white-space: nowrap;
  background-color: var(--primary-light);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.chart-bar-fill {
  width: 100%;
  max-width: 44px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: 6px 6px 0 0;
  transition: height 0.5s ease;
  position: relative;
}

.chart-bar-fill:hover {
  background-color: var(--primary-hover);
}

.chart-bar-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 800;
  font-family: var(--font-heading);
}

.btn-excel { background-color: #107C41; color: #FFFFFF; border: none; padding: 10px 20px; border-radius: var(--radius-full); font-size: 0.88rem; font-weight: 800; font-family: var(--font-heading); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(16, 124, 65, 0.2); transition: var(--transition); }
.btn-excel:hover { background-color: #0B5C30; transform: translateY(-2px); }

/* Table Responsive Wrapper */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.table-custom { width: 100%; border-collapse: collapse; background-color: var(--bg-surface); min-width: 500px; }
.table-custom th { background-color: var(--bg-subtle); padding: 12px 16px; text-align: left; font-size: 0.8rem; font-weight: 800; font-family: var(--font-heading); text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.table-custom td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: 0.88rem; color: var(--text-body); }

/* Image Upload Container */
.upload-image-container { background-color: var(--bg-subtle); border: 1px dashed var(--primary-border); border-radius: var(--radius-md); padding: 12px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px; }
.upload-file-btn { padding: 6px 14px; background-color: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }

/* Modals & Receipt Popup Layout */
.receipt-modal, .table-modal, .edit-modal {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(10, 14, 26, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 14px;
}

.receipt-modal.active, .table-modal.active, .edit-modal.active,
#myProfileModal.active, #myPayslipsModal.active, #previewPdfModal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ========================================================
   ANIMATED CUSTOM TOAST & ALERT MODAL NOTIFICATION SYSTEM
   ======================================================== */
.pos-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 40px);
}

.pos-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  color: var(--text-heading);
  animation: toastSpringIn 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .pos-toast {
  background: rgba(26, 36, 31, 0.95);
  border-color: rgba(143, 168, 155, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.pos-toast.toast-success { border-left: 5px solid var(--success); }
.pos-toast.toast-error { border-left: 5px solid var(--danger); }
.pos-toast.toast-warning { border-left: 5px solid var(--warning); }
.pos-toast.toast-info { border-left: 5px solid var(--primary); }

.toast-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-success .toast-icon-box { background: var(--success-bg); color: var(--success); }
.toast-error .toast-icon-box { background: var(--danger-bg); color: var(--danger); }
.toast-warning .toast-icon-box { background: var(--warning-bg); color: var(--warning); }
.toast-info .toast-icon-box { background: var(--primary-light); color: var(--primary); }

.toast-content { flex-grow: 1; }
.toast-title { font-weight: 800; font-size: 0.92rem; font-family: var(--font-heading); margin-bottom: 2px; }
.toast-msg { font-size: 0.82rem; color: var(--text-body); line-height: 1.35; }

.toast-close { background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; padding: 4px; line-height: 1; opacity: 0.7; transition: var(--transition); }
.toast-close:hover { opacity: 1; color: var(--text-heading); }

.pos-toast.toast-hiding {
  animation: toastSpringOut 0.28s ease-in forwards !important;
}

@keyframes toastSpringIn {
  0% { opacity: 0; transform: translateY(-20px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSpringOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* Animated Confirmation & Alert Modal System */
@keyframes confirmModalSpring {
  0% { opacity: 0; transform: scale(0.72) translateY(28px); }
  60% { opacity: 1; transform: scale(1.03) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes confirmIconPop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  70% { transform: scale(1.25) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.custom-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-alert-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-alert-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px 28px 28px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
  transform: scale(0.8) translateY(24px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.28s ease;
}

.custom-alert-overlay.active .custom-alert-card {
  transform: scale(1) translateY(0);
  opacity: 1;
  animation: confirmModalSpring 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.custom-alert-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  background: #FEF3C7;
  color: #D97706;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.15);
  transform: scale(0);
}

.custom-alert-overlay.active .custom-alert-icon {
  animation: confirmIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s forwards;
}

.custom-alert-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 2.2;
}

.custom-alert-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.custom-alert-message {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.confirm-btn-group {
  display: flex;
  gap: 14px;
  width: 100%;
}

.custom-alert-btn {
  flex: 1;
  padding: 13px 20px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 800;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  border: none;
}

.custom-alert-btn.btn-confirm-ok {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.custom-alert-btn.btn-confirm-ok:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.4);
}

.custom-alert-btn.btn-confirm-ok:active {
  transform: scale(0.96);
}

.custom-alert-btn.btn-confirm-cancel {
  background: var(--bg-subtle, #F1F5F9);
  color: var(--text-heading, #334155);
  border: 1px solid var(--border-color, #E2E8F0);
}

.custom-alert-btn.btn-confirm-cancel:hover {
  background: var(--border-color, #E2E8F0);
  transform: translateY(-2px) scale(1.02);
}

.custom-alert-btn.btn-confirm-cancel:active {
  transform: scale(0.96);
}

.modal-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Thermal Receipt Paper Styling (Optimized for 58mm / 80mm Print) */
.receipt-paper {
  background-color: #FFFFFF;
  color: #000000;
  font-family: 'Courier New', Courier, monospace;
  width: 320px;
  padding: 18px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}
.receipt-paper.paper-58mm {
  width: 230px !important;
  font-size: 11px !important;
  padding: 12px 10px !important;
}
.receipt-paper.paper-80mm {
  width: 320px !important;
  font-size: 12px !important;
}

.receipt-header {
  text-align: center;
  margin-bottom: 10px;
}
.receipt-title {
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.receipt-footer {
  text-align: center;
  margin-top: 12px;
  border-top: 1px dashed #000000;
  padding-top: 8px;
  font-size: 11px;
}

/* Printer Connection Buttons & Status Badge */
.printer-status-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-bt {
  padding: 8px 16px;
  background-color: #0082FC;
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-usb {
  padding: 8px 16px;
  background-color: #4B4B4B;
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-direct-print {
  padding: 10px 20px;
  background-color: var(--success);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.paper-size-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.paper-size-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Thermal Print Media Query */
@media print {
  body * { visibility: hidden; }
  .receipt-modal, .receipt-modal.active { position: absolute; left: 0; top: 0; width: 100%; height: auto; background: none; visibility: visible; }
  .receipt-paper, .receipt-paper * { visibility: visible; }
  .receipt-paper { position: absolute; left: 0; top: 0; box-shadow: none !important; margin: 0 !important; border: none !important; }
  .receipt-modal button, .receipt-paper-controls, #printerStatusBadge { display: none !important; }
}

/* ==========================================================================
   ULTRA-CLEAN RESPONSIVE MEDIA QUERIES (MOBILE HP, TABLET, DESKTOP)
   ========================================================================== */

/* 📱 HP SMARTPHONE & TABLET RESPONSIVE (max-width: 1024px) */
@media (max-width: 1024px) {
  body {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .pos-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 14px !important;
    width: 100% !important;
    background-color: var(--bg-surface) !important;
    box-sizing: border-box !important;
  }

  .pos-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex-shrink: 0 !important;
  }

  .pos-brand-title {
    font-size: 1rem !important;
    white-space: nowrap !important;
  }

  .header-right {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 54px !important;
  }

  .role-switcher {
    width: 100% !important;
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 5px !important;
    gap: 6px !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
  }

  .role-btn {
    padding: 7px 14px !important;
    font-size: 0.8rem !important;
    flex-shrink: 0 !important;
  }

  .theme-toggle-btn, .user-profile-badge, .live-clock, .back-to-web {
    font-size: 0.78rem !important;
    padding: 5px 10px !important;
  }

  .pos-body {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  .role-view {
    height: auto !important;
    overflow: visible !important;
    width: 100% !important;
  }

  .role-view.active {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    width: 100% !important;
  }

  /* 1. Kasir View Mobile HP */
  .pos-catalog-panel {
    padding: 12px !important;
    width: 100% !important;
    flex: none !important;
    box-sizing: border-box !important;
  }

  .catalog-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .category-pills {
    width: 100% !important;
    padding-bottom: 6px !important;
  }

  .pos-search {
    width: 100% !important;
  }

  .pos-menu-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .pos-card {
    padding: 10px !important;
  }

  .pos-card-img {
    height: 105px !important;
  }

  .pos-card-title {
    font-size: 0.88rem !important;
  }

  .pos-card-price {
    font-size: 0.85rem !important;
  }

  .pos-cart-panel {
    width: 100% !important;
    border-left: none !important;
    border-top: 3px solid var(--border-color) !important;
    margin-top: 14px !important;
    position: relative !important;
    box-sizing: border-box !important;
  }

  /* 2. Barista & Dapur KDS View Mobile HP */
  .kds-container {
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .kds-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .kds-filters {
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    display: flex !important;
    gap: 8px !important;
  }

  .kds-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* 3. Waiters View Mobile HP */
  .waiter-container {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tables-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* 4. Customer Tracker View Mobile HP */
  .customer-container {
    margin: 16px auto !important;
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tracker-card {
    padding: 20px 14px !important;
  }

  /* 5. Manager Center View Mobile HP */
  .manager-container {
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .manager-nav-tabs {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    padding-bottom: 8px !important;
  }

  .stats-overview-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .stat-card {
    padding: 14px !important;
  }

  .stat-val {
    font-size: 1.15rem !important;
  }

  .sales-chart-card {
    padding: 14px !important;
    overflow-x: auto !important;
  }

  .chart-bars-flex {
    gap: 6px !important;
    height: 160px !important;
    padding-top: 28px !important;
  }

  .modal-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* ==========================================================================
   CUSTOM ANIMATED DIALOG SYSTEM (Replaces Plain Native Browser Alert & Confirm)
   ========================================================================== */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 16px;
}
.custom-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px 22px 20px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: scale(0.85) translateY(25px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}
.custom-modal-overlay.active .custom-modal-box {
  transform: scale(1) translateY(0);
}

.custom-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.custom-modal-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.custom-modal-message {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.45;
  margin-bottom: 8px;
}

.custom-modal-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 18px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

.custom-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-modal-confirm {
  flex: 1;
  padding: 11px 16px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-modal-confirm:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-modal-cancel {
  flex: 1;
  padding: 11px 16px;
  background: var(--bg-subtle);
  color: var(--text-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-modal-cancel:hover {
  background: var(--border-color);
}

/* ==========================================================================
   SEMILIR SENJA POS - ELEGANT 2D CARDS & RESPONSIVE LAYOUT
   ========================================================================== */

.stat-card:hover, .kds-card:hover, .table-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -5px rgba(91, 112, 101, 0.22) !important;
  border-color: var(--primary) !important;
}

.login-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(91, 112, 101, 0.25) !important;
}

.role-btn.active, .pill-btn.active {
  box-shadow: 0 4px 14px rgba(91, 112, 101, 0.25) !important;
}

/* Instant View & Page Switching */
.role-view.active, .mgr-tab-content {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

@media (max-width: 900px) {
  .mgr-charts-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   HANDHELD ANDROID POS & COMPACT MOBILE VIEW SYSTEM (Sunmi / Axioo POS Mode)
   Features: 1-Column Thumb-Friendly Layout, Sticky Bottom Action Bar,
   Fast Cash Denomination Presets, and Mobile POS Cart Sheet.
   ========================================================================== */

/* Handheld POS Toggle Button */
.compact-toggle-btn {
  background: var(--bg-surface);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.compact-toggle-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(91, 112, 101, 0.3);
}

/* Quick Cash Presets Grid */
.cash-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 16px 0;
}

.btn-cash-preset {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-heading);
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-cash-preset:hover, .btn-cash-preset:active {
  border-color: var(--primary);
  background: var(--accent-light);
  color: var(--primary);
  transform: scale(0.98);
}

/* Sticky Bottom Cart Action Bar for Mobile / Handheld POS */
.mobile-pos-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  padding: 10px 16px;
  z-index: 1000;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .mobile-pos-bottom-bar {
  background: rgba(20, 29, 24, 0.96);
  border-top-color: rgba(255, 255, 255, 0.1);
}

.mobile-pos-cart-info {
  display: flex;
  flex-direction: column;
}

.mobile-pos-cart-count {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.mobile-pos-cart-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.mobile-pos-pay-btn {
  background: linear-gradient(135deg, #4c5f54 0%, #2f3d35 100%);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(47, 61, 53, 0.35);
  cursor: pointer;
}

/* Handheld Mobile Compact POS Overrides */
@media (max-width: 576px) {
  .mobile-pos-bottom-bar {
    display: flex !important;
  }

  body.has-mobile-bottom-bar {
    padding-bottom: 70px !important;
  }

  .compact-pos-mode .pos-layout {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .compact-pos-mode .pos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .compact-pos-mode .pos-card-img {
    height: 100px !important;
  }

  .compact-pos-mode .pos-card-title {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
  }

  .compact-pos-mode .pos-cart-section {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: 85vh;
    z-index: 1001;
    background: var(--bg-surface);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
  }

  .compact-pos-mode .pos-cart-section.mobile-open {
    bottom: 0 !important;
  }

  .mobile-cart-handle {
    display: block;
    width: 40px;
    height: 5px;
    background: var(--border-color);
    border-radius: 3px;
    margin: 8px auto;
  }
}

/* ==========================================================================
   NATIVE ANDROID MOBILE APP UI SYSTEM (@media max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Native App Top Bar */
  .pos-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    padding: 8px 14px !important;
    gap: 8px !important;
    min-height: 54px !important;
    height: 54px !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 100 !important;
  }

  .pos-brand {
    position: relative !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .pos-brand img {
    height: 34px !important;
    width: auto !important;
    max-width: 120px !important;
    object-fit: contain !important;
  }

  /* On HP Mobile, hide horizontal top header role switcher to prevent clutter & overlap */
  .role-switcher {
    display: none !important;
  }

  .header-right {
    position: relative !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding-right: 0 !important;
  }

  .live-clock {
    font-size: 0.72rem !important;
    padding: 3px 8px !important;
  }

  .bt-printer-status-badge, .printer-status-badge, .compact-toggle-btn, .pos-header .pos-settings-btn {
    display: none !important;
  }
}

/* Dedicated Native Android & iOS Mobile Settings Sheet Modal */
@keyframes mobileSheetBackdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes mobileSheetSlideUp {
  0% {
    transform: translateY(100%);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes mobileSheetSlideDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

.mobile-settings-sheet-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 999999;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
}

.mobile-settings-sheet-overlay.active {
  display: flex !important;
  animation: mobileSheetBackdropFadeIn 0.28s ease forwards;
}

.mobile-settings-sheet-overlay.closing {
  animation: mobileSheetBackdropFadeOut 0.25s ease forwards;
}

.mobile-settings-sheet-content {
  background: var(--bg-surface);
  border-radius: 28px 28px 0 0;
  width: 100vw;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  border-top: 1.5px solid rgba(255, 255, 255, 0.15);
  position: relative;
}

.mobile-settings-sheet-overlay.active .mobile-settings-sheet-content {
  animation: mobileSheetSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.mobile-settings-sheet-overlay.closing .mobile-settings-sheet-content {
  animation: mobileSheetSlideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* Grabber Pill / Drag Handle for Modern Native Feel */
.mobile-sheet-drag-handle {
  width: 44px;
  height: 4.5px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.45);
  margin: 10px auto 4px auto;
  cursor: grab;
}

.mobile-settings-header {
  padding: 16px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-settings-icon-header {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.mobile-sheet-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.mobile-settings-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-settings-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 10px;
  margin-bottom: 2px;
}

.mobile-setting-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.mobile-setting-tile:active {
  transform: scale(0.98);
  background: var(--primary-light);
}

.tile-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.tile-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-heading);
}

.tile-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Mobile Role List Tiles Grid */
.mobile-role-list-grid {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.mobile-role-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-heading);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.mobile-role-tile:active, .mobile-role-tile.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

body.compact-mobile-header .pos-header {
  padding: 4px 8px !important;
  min-height: 48px !important;
  max-height: 50px !important;
}

body.compact-mobile-header .role-btn:not(.active) {
  display: none !important;
}

body.compact-mobile-header .role-btn.active {
  padding: 4px 12px !important;
  font-size: 0.78rem !important;
}

/* ==========================================================================
   ADVANCED MANAGER DASHBOARD STYLES (Alerts, Leaderboard, Pie Chart, Print)
   ========================================================================== */

.mgr-alert-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.mgr-alert-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mgr-alert-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mgr-alert-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.mgr-date-input {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-heading);
  outline: none;
  transition: var(--transition);
}

.mgr-date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 112, 101, 0.15);
}

.top-selling-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top-selling-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.top-selling-item:hover {
  transform: translateX(4px);
  border-color: var(--primary);
}

.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-badge.rank-1 { background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); color: #000000; }
.rank-badge.rank-2 { background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%); color: #000000; }
.rank-badge.rank-3 { background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%); color: #FFFFFF; }

@media print {
  body * {
    visibility: hidden;
  }
  .pos-header, .role-switcher, .pos-settings-menu, .nav-panel {
    display: none !important;
  }
  #printReportContainer, #printReportContainer * {
    visibility: visible;
  }
  #printReportContainer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
  }
}

/* ==========================================================================
   LOGIN MODAL OVERLAY HIGH Z-INDEX SYSTEM (Always Accessible)
   ========================================================================== */
.login-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000000 !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-modal-overlay.active {
  display: flex !important;
}

/* Desktop POS Login Navbar Button */
.pos-login-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(47, 61, 53, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pos-login-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(47, 61, 53, 0.35);
  background: var(--primary-hover);
}

/* ==========================================================================
   MOBILE HP & ANDROID APK UNDERBAR CLEARANCE (Prevents Dock Overlapping)
   ========================================================================== */
@media (max-width: 992px) {
  body.pos-app-body, .pos-body, .pos-main-container, .role-view, main, .container, .mgr-dashboard-grid {
    padding-bottom: 120px !important;
  }

  .pos-body {
    padding-bottom: 130px !important;
  }
}

/* ==========================================================================
   LOGIN ERROR SHAKE & RED INPUT ANIMATION
   ========================================================================== */
.login-card.login-error-shake {
  animation: loginCardErrorShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

.input-error-red {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.07) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22) !important;
  color: #b91c1c !important;
  animation: pulseRedInput 0.3s ease !important;
}

@keyframes loginCardErrorShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-8px, 0, 0); }
  40%, 60% { transform: translate3d(8px, 0, 0); }
}

@keyframes pulseRedInput {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   MOBILE TOUCH TARGET OPTIMIZATIONS & COMFORTABLE 44PX HIT-BOXES
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal page drift & overflow */
  html, body.pos-app-body, .role-view, .manager-container, .pos-body, .pos-main-container {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Header & Role Switcher Responsive Handling */
  .pos-header {
    padding: 8px 12px !important;
    justify-content: space-between !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .pos-header .role-switcher {
    display: none !important; /* Managed via Mobile Underbar & Settings Sheet */
  }

  /* Manager Container Padding for Mobile */
  .manager-container {
    padding: 14px 12px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .kds-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  .kds-header > div:first-child h2 {
    font-size: 1.4rem !important;
  }

  /* Manager Navigation Tab Bar Horizontal Scroll with No Scrollbar Track */
  .manager-nav-tabs {
    display: flex !important;
    gap: 8px !important;
    padding-bottom: 10px !important;
    margin-bottom: 18px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .manager-nav-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .mgr-nav-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 16px !important;
    font-size: 0.82rem !important;
  }

  /* Stat Cards Sizing on Mobile */
  .stats-overview-grid,
  .stats-overview-grid.stats-grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .stat-card {
    padding: 14px 12px !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
  }

  .stat-title {
    font-size: 0.72rem !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
  }

  .stat-val {
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
  }

  .stat-val.daily {
    font-size: 1.3rem !important;
  }

  /* Sales Trend & Donut Chart Responsive Containers */
  .sales-chart-card,
  .waiter-card {
    padding: 14px 12px !important;
    margin-bottom: 16px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .chart-bars-flex {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 6px !important;
    gap: 10px !important;
  }

  .chart-bars-flex::-webkit-scrollbar {
    display: none !important;
  }

  /* Action buttons in tables, filters, and cards get comfortable touch targets */
  .table-custom button,
  .table-custom .btn-edit,
  .table-custom .btn-delete,
  .btn-excel,
  .btn-receipt-opt,
  .pos-settings-btn {
    min-height: 40px !important;
    min-width: 40px !important;
    padding: 8px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    touch-action: manipulation !important;
  }

  .table-custom td {
    padding: 12px 14px !important;
    font-size: 0.82rem !important;
  }

  .table-custom th {
    padding: 10px 14px !important;
    font-size: 0.78rem !important;
  }

  .table-responsive {
    border-radius: var(--radius-md) !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Active Touch Feedback for Mobile */
  button:active, .mobile-setting-tile:active, .mobile-role-tile:active, .snp-ub-btn:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease !important;
  }
}

/* ========================================================
   MY PROFILE & PAYSLIP SYSTEM STYLING (FINTECH & ACCESSIBLE)
   ======================================================== */

.header-user-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header-profile,
.btn-header-payslip {
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-heading);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.btn-header-profile:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-header-payslip:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: #06B6D4;
  transform: translateY(-1px);
}

.pdf-upload-zone {
  border: 2px dashed var(--primary-border);
  background: var(--bg-subtle);
  border-radius: var(--radius-lg, 14px);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.pdf-upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pdf-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.payslip-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.payslip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 14px);
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.payslip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(6, 182, 212, 0.4);
}

.payslip-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.payslip-badge {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-heading);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  color: #06B6D4;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.payslip-title {
  font-size: 1.1rem;
  font-weight: 900;
  font-family: var(--font-heading);
  color: var(--text-heading);
  margin-bottom: 4px;
}

.payslip-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.payslip-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}

