/* ==========================================================================
   GUDE FARM ERP POS - Modern Light Design System
   ========================================================================== */

:root {
  /* Brand Colors (Putih 50%, Biru 30%, Kuning 10%, Merah 10%) */
  --primary: #1c5ea9;      /* Deep Blue (30%) */
  --primary-hover: #144781;
  --secondary: #3b7dc7;    /* Secondary Blue */
  --accent-yellow: #ffca09;/* Accent Yellow (10%) */
  
  /* Semantic Colors */
  --bg-app: #ffffff;       /* White Background (50%) */
  --bg-surface: #f4f6f9;   /* Slate 50 background */
  --border-color: #E5E7EB; /* Gray 200 */
  
  --text-main: #1E293B;    /* Slate 800 */
  --text-muted: #64748B;   /* Slate 500 */
  --text-inverse: #FFFFFF;
  
  --success: #22C55E;      /* Emerald 500 */
  --danger: #cb1800;       /* Red Danger (10%) */
  --warning: #ffca09;      /* Accent Yellow (10%) */
  
  /* Card Visual Specs */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(28, 94, 169, 0.05), 0 4px 6px -2px rgba(28, 94, 169, 0.02);
  
  /* Fonts */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Poppins', var(--font-main);
  
  /* Layout Transitions */
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;
}

/* CSS Reset & Basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-surface);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

h1, h2, h3, h4, .store-name {
  font-family: var(--font-display);
  color: var(--text-main);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
  transition: all var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   APP SHELL LAYOUT (COLLAPSIBLE SIDEBAR)
   ========================================================================== */

#app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* 1. Sidebar Left */
aside.app-sidebar {
  width: 260px;
  background-color: var(--bg-app);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
  z-index: 100;
  transition: width var(--transition-normal);
  position: relative;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 20px 4px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.store-logo {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  box-shadow: 0 4px 10px rgba(28, 94, 169, 0.2);
  flex-shrink: 0;
}

.store-logo svg {
  width: 22px;
  height: 22px;
}

.store-info {
  display: flex;
  flex-direction: column;
  transition: opacity var(--transition-normal);
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
}

.store-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  color: var(--primary);
}

.app-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-yellow);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-toggle-btn {
  position: absolute;
  right: -26px;
  top: 15px;
  width: 22px;
  height: 22px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
  z-index: 101;
}

.sidebar-toggle-btn:hover {
  color: var(--primary);
  background-color: var(--bg-surface);
}

.sidebar-toggle-btn svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-normal);
}

/* Navigation Links */
nav.sidebar-nav {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
  flex-shrink: 0;
}

.nav-link:hover {
  background-color: var(--bg-surface);
  color: var(--primary);
}

.nav-link.active {
  background-color: rgba(28, 94, 169, 0.08);
  color: var(--primary);
  font-weight: 600;
}

/* Collapsed Sidebar overrides */
/* Sidebar Brand Logo responsive styling */
.brand-logo-img {
  display: block;
}
.brand-logo-collapsed-text {
  display: none;
}
#app-container.sidebar-collapsed .brand-logo-img {
  display: none !important;
}
#app-container.sidebar-collapsed .brand-logo-collapsed-text {
  display: block !important;
}
#app-container.sidebar-collapsed aside.app-sidebar {
  width: 78px;
  padding: 24px 14px;
}

#app-container.sidebar-collapsed .store-info,
#app-container.sidebar-collapsed .nav-text,
#app-container.sidebar-collapsed .sidebar-tagline-footer {
  opacity: 0;
  width: 0;
  pointer-events: none;
  display: none;
}

#app-container.sidebar-collapsed .sidebar-toggle-btn svg {
  transform: rotate(180deg);
}

#app-container.sidebar-collapsed .sidebar-header {
  padding-bottom: 12px;
  justify-content: center;
}

.sidebar-tagline-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  transition: opacity var(--transition-normal);
}

/* 2. Main Content Wrapper */
main.app-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-surface);
}

/* ==========================================================================
   TOPBAR HEADER MODULE
   ========================================================================== */

header.app-header {
  height: 70px;
  background-color: var(--bg-app);
  border-bottom: 1px solid var(--border-color);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-left h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

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

/* Global Realtime Search */
.global-search-container {
  position: relative;
  width: 280px;
}

.global-search-container input {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 16px 8px 38px;
  font-size: 13px;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.global-search-container input:focus {
  border-color: var(--primary);
  background-color: var(--bg-app);
  box-shadow: 0 0 0 3px rgba(28, 94, 169, 0.1);
}

.global-search-container .search-icon {
  position: absolute;
  left: 14px;
  top: 9px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.search-results-dropdown {
  position: absolute;
  top: 42px;
  left: 0;
  width: 100%;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 250px;
  overflow-y: auto;
  z-index: 150;
  padding: 6px 0;
}

.search-result-item {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-result-item:hover {
  background-color: var(--bg-surface);
}

.search-result-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.search-result-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* Notification Bell */
.header-notification-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-notification-bell:hover {
  color: var(--primary);
  background-color: rgba(28, 94, 169, 0.05);
}

.header-notification-bell svg {
  width: 20px;
  height: 20px;
}

.notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  background-color: var(--danger);
  border: 2px solid var(--bg-app);
  border-radius: 50%;
  font-size: 9px;
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 300px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}

.notif-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.notif-dropdown-header button {
  color: var(--primary);
  font-size: 11px;
}

.notif-dropdown-list {
  max-height: 220px;
  overflow-y: auto;
}

.notif-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.notif-item:hover {
  background-color: var(--bg-surface);
}

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

.notif-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.notif-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-desc {
  font-weight: 500;
  color: var(--text-main);
}

.notif-time {
  font-size: 10px;
  color: var(--text-muted);
}

.notif-empty-state {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* User Profile Info */
.header-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid var(--border-color);
}

.header-user-profile .user-avatar {
  width: 36px;
  height: 36px;
  background-color: rgba(28, 94, 169, 0.1);
  color: var(--primary);
  border-radius: 50%;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-profile-details {
  display: flex;
  flex-direction: column;
}

.profile-username {
  font-size: 13px;
  font-weight: 600;
}

.profile-userrole {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.small-logout-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
}

.small-logout-btn:hover {
  background-color: rgba(203, 24, 0, 0.1);
  color: var(--danger);
  border-color: rgba(203, 24, 0, 0.15);
}

.small-logout-btn svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   APP VIEWS GENERAL CONFIG
   ========================================================================== */

.app-view {
  display: none;
  flex-grow: 1;
  padding: 28px;
  overflow-y: auto;
  height: calc(100vh - 70px);
}

.app-view.active-view {
  display: block;
}

/* ==========================================================================
   VIEW A: DASHBOARD VIEW
   ========================================================================== */

/* 6-Column Grid for Stats */
.dashboard-grid-six {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card-six {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.metric-card-six:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-six-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.metric-six-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.metric-six-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-six-icon svg {
  width: 16px;
  height: 16px;
}

/* Icon backgrounds */
.blue-bg { background-color: rgba(28, 94, 169, 0.08); color: var(--primary); }
.green-bg { background-color: rgba(34, 197, 94, 0.08); color: var(--success); }
.purple-bg { background-color: rgba(168, 85, 247, 0.08); color: #a855f7; }
.orange-bg { background-color: rgba(255, 202, 9, 0.08); color: var(--warning); }
.red-bg { background-color: rgba(203, 24, 0, 0.08); color: var(--danger); }
.yellow-bg { background-color: rgba(251, 192, 45, 0.08); color: var(--accent-yellow); }

.metric-six-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.metric-six-trend {
  font-size: 11px;
  font-weight: 500;
}

.metric-six-trend.positive { color: var(--success); }
.metric-six-trend.negative { color: var(--danger); }
.metric-six-trend.neutral { color: var(--text-muted); }

.trend-arrow {
  font-size: 9px;
  margin-right: 2px;
}

.dashboard-details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Settings Grid Layout */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.settings-grid .dashboard-panel {
  border-top: 4px solid var(--primary);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.settings-grid .dashboard-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.settings-grid #settings-maintenance-panel {
  border-top-color: var(--danger);
}

.dashboard-panel {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.chart-wrapper {
  position: relative;
  height: 280px;
  width: 100%;
}

.panel-split-list {
  gap: 0;
  padding: 16px;
}

.list-section {
  display: flex;
  flex-direction: column;
}

.compact-header {
  margin-bottom: 10px;
}

.font-small {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.warning-badge {
  background-color: rgba(255, 202, 9, 0.1);
  color: var(--warning);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.scroll-list {
  max-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-item-custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 12px;
}

.item-custom-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-custom-name {
  font-weight: 600;
  color: var(--text-main);
}

.item-custom-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.item-custom-right {
  display: flex;
  align-items: center;
}

.badge {
  display: inline-block;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.success-badge { background-color: rgba(34, 197, 94, 0.1); color: var(--success); }
.warning-badge-stock { background-color: rgba(255, 202, 9, 0.1); color: var(--warning); }
.danger-badge { background-color: rgba(203, 24, 0, 0.1); color: var(--danger); }
.info-badge { background-color: rgba(28, 94, 169, 0.1); color: var(--primary); }

/* ==========================================================================
   VIEW B: POINT OF SALE (POS) VIEW
   ========================================================================== */

#pos-view {
  padding: 12px;
  overflow: hidden;
}

#pos-view .pos-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 12px;
  height: calc(100vh - 94px); /* 70px header + 24px padding = 94px */
  overflow: hidden;
}

#pos-view .pos-products-container {
  padding: 12px;
  gap: 12px;
}

#pos-view .pos-categories-sidebar {
  padding: 10px;
  gap: 8px;
}

#pos-view .pos-main-layout {
  grid-template-columns: 160px 1fr;
  gap: 12px;
}

.pos-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  height: calc(100vh - 126px); /* 100vh - header - padding */
  overflow: hidden;
}

.pos-products-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

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

.pos-search-bar input {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px 12px 42px;
  font-size: 14px;
  box-shadow: none;
  transition: all var(--transition-fast);
}

.pos-search-bar input:focus {
  background-color: var(--bg-app);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 94, 169, 0.1);
}

.pos-view-switcher {
  box-shadow: none !important;
}

.pos-view-switcher .btn {
  transform: none !important;
  box-shadow: none !important;
  transition: background-color var(--transition-fast) ease, color var(--transition-fast) ease !important;
}

.pos-view-switcher .btn:hover {
  transform: none !important;
  box-shadow: none !important;
}

.pos-view-switcher .btn:not(.active):hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: var(--text-main) !important;
}

.pos-view-switcher .btn.active:hover {
  background-color: var(--primary-hover) !important;
}

.pos-search-bar svg {
  position: absolute;
  left: 16px;
  top: 13px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* POS main layout categories + catalog */
.pos-main-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  flex-grow: 1;
  overflow: hidden;
}

.pos-categories-sidebar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  box-shadow: none;
}

.pos-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.pos-category-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-pill {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.category-pill:hover {
  background-color: var(--bg-app);
  color: var(--primary);
}

.category-pill.active {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.pos-catalog-wrapper {
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pos-product-table-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
  overflow: hidden;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 4px;
}

/* POS product card */
.pos-prod-card {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  height: 160px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.pos-prod-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.pos-prod-img-box {
  width: 100%;
  height: 100%;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.pos-prod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.pos-prod-icon-fallback {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  opacity: 0.4;
}

.pos-prod-stock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  z-index: 4;
}

.pos-prod-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(28, 94, 169, 0.95) 0%, rgba(28, 94, 169, 0.5) 70%, rgba(28, 94, 169, 0) 100%);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 3;
  pointer-events: none;
}

.pos-prod-name {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 30px;
}

.pos-prod-sku {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  font-family: monospace;
}

.pos-prod-price {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--warning) !important;
  margin-top: 1px;
}

/* POS Cart Container (Right Column) */
.pos-cart-container {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cart-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-title {
  font-size: 14px;
  font-weight: 700;
}

.clear-cart-btn {
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
}

.clear-cart-btn:hover {
  text-decoration: underline;
}

.cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.cart-item-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

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

.cart-item-price {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 28px;
}

.cart-qty-btn {
  width: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.cart-qty-btn:hover {
  background-color: var(--bg-surface);
  color: var(--primary);
}

.cart-qty-val {
  width: 28px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.cart-item-remove-btn {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-remove-btn:hover {
  color: var(--danger);
}

.cart-item-remove-btn svg {
  width: 16px;
  height: 16px;
}

.cart-summary {
  border-top: 2px solid var(--border-color);
  padding: 12px 16px;
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.summary-row span:first-child {
  color: var(--text-muted);
}

.summary-row #cart-total-qty {
  font-size: 16px;
  font-weight: 600;
}

.discount-inputs-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.discount-percentage-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.discount-percentage-wrapper input {
  width: 95px !important;
  padding-right: 16px !important;
  text-align: right;
}

.discount-percentage-wrapper::after {
  content: "%";
  position: absolute;
  right: 6px;
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

.discount-nominal-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.discount-nominal-wrapper input {
  width: 150px !important;
  padding-left: 20px !important;
  text-align: right;
}

.discount-nominal-wrapper::before {
  content: "Rp";
  position: absolute;
  left: 6px;
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

.discount-input-field {
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-main);
  transition: border-color var(--transition-fast);
}

/* Hide number input spinners for cleaner input spacing */
.discount-input-field::-webkit-outer-spin-button,
.discount-input-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.discount-input-field {
  -moz-appearance: textfield;
}

.discount-input-field:focus {
  border-color: var(--primary);
  outline: none;
}

.discount-input-field[readonly] {
  background-color: var(--bg-body);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.8;
}

.summary-row.total-row {
  border-top: 2px solid var(--border-color);
  padding-top: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-display);
}

.summary-row.total-row span:last-child {
  font-size: 20px;
  color: var(--primary);
  font-weight: 800;
}


.tempo-toggle-row {
  padding: 4px 0;
  border-top: 1px dashed var(--border-color);
  margin-top: 4px;
}

.checkout-btn {
  width: 100%;
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(28, 94, 169, 0.15);
  margin-top: 8px;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
}

.checkout-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(28, 94, 169, 0.25);
}

/* Checkbox alignment helper */
.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 22px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 1px;
  left: 0;
  height: 15px;
  width: 15px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: var(--bg-surface);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 3px;
  height: 7px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ==========================================================================
   VIEW C: PRODUCTS & INVENTORY VIEW
   ========================================================================== */

.inventory-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 16px;
}

.search-and-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

.search-input-wrapper input.search-input-field {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input-wrapper input.search-input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 94, 169, 0.1);
  outline: none;
}

.table-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Form input standard styling */
.form-input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
  background-color: var(--bg-app);
}

/* View switcher tab button */
.view-mode-tabs {
  display: flex;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.view-tab-btn {
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-tab-btn svg {
  width: 16px;
  height: 16px;
}

.view-tab-btn.active {
  background-color: var(--bg-app);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Dropdowns Trigger */
.dropdown-wrapper {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
}

.column-customizer-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  width: 180px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 120;
}

.column-customizer-dropdown label {
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(28, 94, 169, 0.2);
}
.btn-success {
  background-color: var(--success);
  color: var(--text-inverse);
}
.btn-success:hover {
  background-color: #16a34a;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.2);
  transform: translateY(-1px);
}
.btn-outline-primary {
  background-color: var(--bg-app);
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 10px rgba(28, 94, 169, 0.2);
}

.btn-secondary {
  background-color: var(--bg-app);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--bg-surface);
  color: var(--primary);
}

.btn-danger {
  background-color: rgba(203, 24, 0, 0.1);
  color: var(--danger);
  border-color: rgba(203, 24, 0, 0.15);
}

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

/* Data Tables */
.table-wrapper {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  max-height: 480px;
}

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

table.data-table th, table.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

table.data-table th {
  background-color: var(--bg-surface);
  font-weight: 600;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 10;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.3px;
}

table.data-table tbody tr:hover {
  background-color: rgba(66, 165, 245, 0.03);
}

table.data-table td.hidden-col, table.data-table th.hidden-col {
  display: none;
}

/* Pagination Footers */
.pagination-footer {
  padding: 12px 16px;
  background-color: var(--bg-app);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-btns {
  display: flex;
  gap: 8px;
}

.pagination-btns button {
  padding: 6px 12px;
  font-size: 12px;
}

/* Card Mode Grid in Inventory */
.inventory-card-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.inv-card {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.inv-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.inv-card-img-box {
  width: 100%;
  height: 140px;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.inv-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inv-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.inv-card-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-card-category {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.inv-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.inv-card-sku {
  font-size: 10px;
  color: var(--text-muted);
}

.inv-card-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 6px;
  margin-top: 4px;
}

.inv-card-price {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.inv-card-actions {
  padding: 10px 14px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ==========================================================================
   VIEW D: REPORTS VIEW
   ========================================================================== */

.reports-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
  margin-bottom: 24px;
}

.report-tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.report-tab-btn:hover {
  color: var(--primary);
}

.report-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.report-tab-content {
  display: none;
}

.report-summary-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

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

.table-filter-group {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.analytics-charts-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

.chart-panel {
  padding: 24px;
}

.text-small-table table.data-table td, 
.text-small-table table.data-table th {
  padding: 10px 12px;
  font-size: 12px;
}

/* ==========================================================================
   MODALS AND INTERACTIVE POPUPS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.modal-content {
  background-color: var(--bg-app);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid var(--border-color);
  animation: modalIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content.modal-large {
  max-width: 780px;
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.modal-close-btn {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-surface);
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Form layouts */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.form-grid.two-cols {
  grid-template-columns: repeat(2, 1fr);
}

.form-grid.three-cols {
  grid-template-columns: repeat(3, 1fr);
}

.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.span-full { grid-column: 1 / -1; }

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

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
}

.category-specific-section {
  border-top: 1px dashed var(--border-color);
  margin-top: 8px;
  padding-top: 16px;
}

.category-specific-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

/* ==========================================================================
   CHECKOUT CALC PANEL & QRIS
   ========================================================================== */

.checkout-modal-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.checkout-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--border-color);
  padding-right: 20px;
  max-height: 380px;
  overflow-y: auto;
}

.payment-methods-header-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.payment-method-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.payment-method-card:hover {
  background-color: var(--bg-app);
  border-color: var(--primary);
}

.payment-method-card.active {
  background-color: rgba(28, 94, 169, 0.05);
  border-color: var(--primary);
  color: var(--primary);
}

.payment-method-icon svg {
  width: 24px;
  height: 24px;
}

.payment-method-title {
  font-size: 13px;
  font-weight: 600;
}

.checkout-calc-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-total {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: right;
}

.calc-total span:nth-child(2) {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.fast-cash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.fast-cash-grid button {
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
}

.calc-change-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
}

.qris-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.qris-footer {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   RECEIPT VIEW / PRINTING MODULE
   ========================================================================== */

.receipt-wrapper {
  background-color: white;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', Courier, monospace;
  color: black;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

.receipt-title {
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  text-transform: uppercase;
}

.receipt-divider {
  border-top: 1px dashed black;
  margin: 10px 0;
}

.receipt-item-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.receipt-summary-row {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-top: 4px;
}

/* ==========================================================================
   AUTHENTICATION OVERLAY MODULES
   ========================================================================== */

.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.force-pin-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-surface);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.login-card, .force-pin-card {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.login-logo {
  width: 48px;
  height: 48px;
  background-color: var(--primary);
  border-radius: var(--radius-md);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(28, 94, 169, 0.25);
}

.login-logo svg {
  width: 26px;
  height: 26px;
}

.login-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.login-tagline {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
  font-weight: 500;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

.role-selector-container {
  width: 100%;
  margin-bottom: 16px;
}

.login-role-select {
  width: 100%;
  text-align: center;
  font-weight: 600;
  border-color: var(--border-color);
  height: 42px;
}

.pin-dots-container {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  transition: all var(--transition-fast);
}

.pin-dot.active {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.pin-dot.error {
  background-color: var(--danger);
  border-color: var(--danger);
  animation: shake 0.2s ease-in-out;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.keypad-btn {
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.keypad-btn:hover {
  background-color: rgba(28, 94, 169, 0.05);
  border-color: var(--primary);
  color: var(--primary);
}

.keypad-btn.action-delete svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.keypad-btn.action-delete:hover svg {
  color: var(--danger);
}

.keypad-btn:active {
  transform: scale(0.95);
}

/* Force PIN update details */
.force-pin-card {
  max-width: 380px;
  text-align: center;
}

.force-pin-icon {
  width: 44px;
  height: 44px;
  color: var(--primary);
  margin-bottom: 12px;
}

.force-pin-icon svg {
  width: 100%;
  height: 100%;
}

.force-pin-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.force-pin-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.4;
}

.pin-input-group {
  width: 100%;
  margin-bottom: 16px;
  text-align: left;
}

.pin-input-group label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.pin-field {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
}

.pin-field:focus {
  border-color: var(--primary);
  background-color: white;
}

.force-pin-submit {
  width: 100%;
  background-color: var(--primary);
  color: white;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  margin-top: 8px;
}

.force-pin-submit:hover {
  background-color: var(--primary-hover);
}

/* Toast System */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
  max-width: 90%;
  width: 400px;
}

.toast {
  pointer-events: auto;
  background-color: white;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastInCenter 0.25s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--primary); }

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

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

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */

@media (max-width: 1366px) {
  /* 1. Header Layout Adaptations */
  header.app-header {
    padding: 0 16px;
  }
  .header-right {
    gap: 12px;
  }
  .global-search-container {
    width: 200px;
  }
  .header-user-profile {
    padding-left: 12px;
    gap: 8px;
  }
  .profile-userrole {
    display: none; /* Hide subtitle role to prevent clutter */
  }

  /* 2. Main Page Container Density */
  .app-view {
    padding: 16px;
  }

  /* 3. Dashboard Grid Adjustment */
  .dashboard-grid-six {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 4. POS Cart Sidebar width adjustment & height correction */
  #pos-view .pos-grid,
  .pos-grid {
    grid-template-columns: 1fr 340px; /* Reduce from 380px to 340px */
    gap: 16px;
    height: calc(100vh - 102px); /* 100vh - 70px header - 32px vertical padding */
  }
}

@media (max-width: 1200px) {
  /* Stack multi-column dashboard details, settings and analytics grids */
  .dashboard-details-grid,
  .settings-grid,
  .analytics-charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 1024px) {
  /* Tablet views */
  .dashboard-grid-six {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .dashboard-details-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .pos-grid {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
  
  .pos-cart-container {
    height: 400px;
  }
  
  .pos-main-layout {
    grid-template-columns: 1fr;
  }
  
  .pos-categories-sidebar {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .pos-category-vertical-list {
    flex-direction: row;
  }
}

@media (max-width: 1024px) {
  .report-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  /* Mobile views */
  .dashboard-grid-six {
    grid-template-columns: repeat(2, 1fr);
  }
  
  header.app-header {
    padding: 0 16px;
  }
  
  .global-search-container {
    width: 140px;
  }
  
  .header-user-profile {
    padding-left: 0;
    border-left: none;
  }
  
  .profile-username, .profile-userrole {
    display: none;
  }
  
  #app-container.sidebar-expanded aside.app-sidebar {
    width: 78px;
    padding: 24px 14px;
  }
  
  #app-container.sidebar-expanded .store-info,
  #app-container.sidebar-expanded .nav-text,
  #app-container.sidebar-expanded .sidebar-tagline-footer {
    display: none;
  }
  
  .checkout-modal-body {
    grid-template-columns: 1fr;
  }
  
  .checkout-payment-methods {
    border-right: none;
    padding-right: 0;
    margin-bottom: 16px;
    max-height: 240px;
  }
  
  .inventory-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .table-action-buttons {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .table-action-buttons > button,
  .table-action-buttons > .dropdown-wrapper {
    flex: 1 1 calc(50% - 8px);
    min-width: 110px;
  }
  
  .table-action-buttons > .dropdown-wrapper button {
    width: 100%;
  }
  
  .search-and-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrapper {
    max-width: none;
    width: 100%;
  }
  
  /* Modal responsive margin and paddings */
  .modal-content {
    width: 94%;
    margin: 10px auto;
    max-height: 95vh;
  }
  
  .modal-header, .modal-body, .modal-footer {
    padding: 12px 16px;
  }
  
  /* Stacking forms on mobile */
  .form-grid.two-cols,
  .form-grid.three-cols {
    grid-template-columns: 1fr;
  }
  
  .col-span-2,
  .col-span-3 {
    grid-column: span 1;
  }
  
  /* Stacking table controls and filter group */
  .table-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .table-filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  #report-custom-dates {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  #report-custom-dates input {
    width: 100% !important;
  }
  
  .report-summary-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==========================================================================
   MOBILE & DRAWER LAYOUT OVERRIDES (iPhone 17, Mobile, Desktop responsive)
   ========================================================================== */

/* Menu button styling in header */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px;
}

/* Tab switcher for mobile POS */
.pos-mobile-tabs {
  display: none;
}

@media (min-width: 901px) {
  .pos-products-container {
    display: flex !important;
  }
  .pos-cart-container {
    display: flex !important;
  }
}

@media (max-width: 900px) {
  /* Mobile Sidebar as slide-out Drawer overlay */
  aside.app-sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* Hidden offscreen */
    height: 100vh;
    width: 260px !important;
    transition: left var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
  }
  
  #app-container.sidebar-expanded aside.app-sidebar {
    left: 0 !important;
    width: 260px !important;
    padding: 24px 16px !important;
  }
  
  #app-container.sidebar-expanded .store-info,
  #app-container.sidebar-expanded .nav-text,
  #app-container.sidebar-expanded .sidebar-tagline-footer {
    display: flex !important;
    opacity: 1 !important;
    width: auto !important;
  }
  
  #app-container.sidebar-collapsed aside.app-sidebar {
    left: -260px !important;
    width: 260px !important;
  }
  
  #app-container.sidebar-expanded::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    z-index: 999;
    backdrop-filter: blur(1px);
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* POS View mobile improvements */
  .pos-mobile-tabs {
    display: flex;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
  }
  
  .mobile-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
  }
  
  .mobile-tab-btn:hover {
    color: var(--primary);
  }
  
  .mobile-tab-btn.active {
    background-color: var(--primary);
    color: var(--text-inverse);
  }
  
  .mobile-cart-badge {
    background-color: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    margin-left: 6px;
    font-weight: 700;
    display: inline-block;
  }

  .pos-grid {
    grid-template-columns: 1fr;
    height: calc(100vh - 180px); /* Contained viewport layout */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .pos-products-container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    flex-direction: column;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  
  .pos-main-layout {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    gap: 10px;
  }

  .pos-sidebar-title {
    display: none;
  }

  .pos-categories-sidebar {
    padding: 6px 10px;
    border: none;
    box-shadow: none;
    background: transparent;
    flex-direction: row;
    overflow-x: auto;
    flex-shrink: 0;
  }

  .pos-category-vertical-list {
    flex-direction: row;
    gap: 8px;
  }

  .category-pill {
    width: auto;
    padding: 8px 14px;
    font-size: 11px;
  }

  .pos-catalog-wrapper {
    flex-grow: 1;
    overflow-y: auto;
  }

  .pos-cart-container {
    display: none; /* controlled by js switchMobilePosTab */
    flex-grow: 1;
    overflow: hidden;
    flex-direction: column;
    height: 100% !important;
  }

  .cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
  }
  
  .cart-summary {
    padding: 12px;
  }
}

@media (max-width: 600px) {
  .pos-product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }
  
  .pos-prod-card {
    border-radius: var(--radius-sm);
  }
  
  .pos-prod-img-box {
    height: 100px;
  }
}

/* ==========================================================================
   THERMAL PRINTER STYLING OVERRIDES (58mm/80mm roll support)
   ========================================================================== */
@media print {
  /* Hide main application shell components completely to prevent empty page generation */
  #app-container {
    display: none !important;
  }

  .modal-backdrop:not(#receipt-modal),
  .modal-header,
  .modal-footer,
  .btn,
  button {
    display: none !important;
  }

  /* Reset receipt modal backdrop for static printing layout */
  #receipt-modal.modal-backdrop {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    background: white !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Make modal content behave as a plain paper block */
  #receipt-modal .modal-content {
    position: static !important;
    width: 100% !important;
    max-width: 80mm !important;
    border: none !important;
    box-shadow: none !important;
    background: white !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #receipt-modal .modal-body {
    padding: 0 !important;
    background: white !important;
  }

  /* Receipt wrapper printing styling rules */
  #receipt-print-area.receipt-wrapper {
    width: 100% !important;
    max-width: 80mm !important;
    border: none !important;
    box-shadow: none !important;
    padding: 8px !important;
    margin: 0 auto !important;
    background-color: white !important;
    box-sizing: border-box !important;
  }

  /* Hide receipt modal buttons */
  #receipt-modal .modal-footer,
  #receipt-modal .modal-close-btn {
    display: none !important;
  }

  /* Force monochrome high-contrast styles on elements inside printing area */
  #receipt-print-area,
  #receipt-print-area * {
    color: black !important;
    background-color: transparent !important;
    border-color: black !important;
    text-shadow: none !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    font-family: 'Courier New', Courier, monospace !important;
  }

  /* Force print font scaling for clean monochrome rendering */
  #receipt-print-area {
    font-size: 12px !important;
  }

  #receipt-print-area .receipt-title {
    font-size: 14px !important;
    font-weight: bold !important;
  }

  #receipt-print-area div,
  #receipt-print-area span,
  #receipt-print-area strong {
    font-size: 11px !important;
  }

  #receipt-print-area .receipt-divider {
    border-top: 1px dashed black !important;
    margin: 8px 0 !important;
    height: 0 !important;
    display: block !important;
  }

  #receipt-print-area img {
    filter: grayscale(100%) contrast(200%) !important;
    max-width: 100% !important;
  }

  /* Reset page layout to strip browser headers/footers completely */
  @page {
    size: auto;
    margin: 0;
  }

  body, html {
    background-color: white !important;
    color: black !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* ==========================================================================
   POS TABLE & AUDIT LOG UI UPGRADES
   ========================================================================== */

/* Barcode Pulse Indicator */
@keyframes pulse-barcode {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Active Category Filter Pill */
.filter-pill.active {
  background-color: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

/* POS Table Layout customization */
table.pos-product-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

table.pos-product-table th {
  background-color: var(--bg-surface) !important;
  color: var(--text-muted) !important;
  font-weight: bold !important;
  text-transform: uppercase;
  font-size: 10px !important;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 12px !important;
}

table.pos-product-table td {
  padding: 10px 12px !important;
  font-size: 12px !important;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

table.pos-product-table tbody tr {
  transition: background-color var(--transition-fast) ease;
}

table.pos-product-table tbody tr:hover {
  background-color: rgba(28, 94, 169, 0.04) !important;
}

/* ==========================================================================
   GUDE MEMBER CARD & QR CODE STYLING
   ========================================================================== */

#gude-member-card {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

#gude-member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(21, 101, 192, 0.35) !important;
}

#gude-member-card canvas {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#gude-member-card canvas:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* POS Customer Panel Custom Adjustments */
#pos-selected-member-card {
  transition: transform var(--transition-fast) ease, box-shadow var(--transition-fast) ease, border-color var(--transition-fast) ease;
}

#pos-selected-member-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary) !important;
}

.badge.info-badge {
  background-color: rgba(28, 94, 169, 0.1);
  color: var(--primary);
  border: 1px solid rgba(28, 94, 169, 0.2);
}

/* Responsive adjustments for receipt modal actions */
@media (max-width: 480px) {
  #receipt-modal .receipt-modal-footer .footer-action-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
}


