/* Aura POS - Premium Light Theme Styling System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* HSL Color Tokens for Light Mode */
  --bg-main: #f3f4f6;          /* Soft grey-white background */
  --bg-sidebar: #ffffff;       /* Pure white sidebar */
  --bg-panel: #ffffff;         /* Pure white cards */
  --bg-panel-solid: #ffffff;
  --bg-panel-hover: #f9fafb;   /* Off-white hover */
  --border-color: #e5e7eb;     /* Light grey borders */
  --border-focus: #f97316;     /* Orange focus */
  
  --primary: #f97316;          /* Warm Orange Primary */
  --primary-glow: rgba(249, 115, 22, 0.15);
  --secondary: #0f172a;        /* Dark Slate Blue Secondary */
  --secondary-glow: rgba(15, 23, 42, 0.1);
  
  --success: #10b981;          /* Green Success */
  --success-glow: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;          /* Amber Warning */
  --warning-glow: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;           /* Red Danger */
  --danger-glow: rgba(239, 68, 68, 0.15);
  
  --text-main: #1f2937;        /* Dark slate text */
  --text-muted: #6b7280;       /* Medium grey text */
  --text-dark: #111827;
  
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.03);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 64px;
  --navbar-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ============================================================
   GLOBAL ANIMATIONS & KEYFRAMES
   ============================================================ */
@keyframes navbarSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes sidebarSlideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes fadeInUp {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeInLeft {
  from { transform: translateX(-14px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
  50%       { box-shadow: 0 0 0 6px rgba(249,115,22,0.12); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes sidebarItemIn {
  from { transform: translateX(-10px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* Page-level entrance — applied to main-content on load */
.main-content {
  animation: fadeInUp 0.35s cubic-bezier(0.4,0,0.2,1) both;
}

/* ============================================================
   FIXED TOP NAVBAR
   ============================================================ */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 200;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  transition: padding-left 0.3s cubic-bezier(0.4,0,0.2,1);
  animation: navbarSlideDown 0.35s cubic-bezier(0.4,0,0.2,1) both;
}

.top-navbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  background: #f3f4f6;
  color: var(--primary);
}
.sidebar-toggle-btn i,
.sidebar-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* Brand in Navbar */
.top-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.navbar-brand-icon {
  width: 30px;
  height: 30px;
  background: var(--primary);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 3px 8px var(--primary-glow);
  flex-shrink: 0;
}
.navbar-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
}

/* Profile Button in Navbar */
.nav-profile-container {
  position: relative;
}
.nav-profile-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 5px 14px 5px 5px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  outline: none;
}
.nav-profile-trigger:hover {
  border-color: var(--primary);
  background: #fff6ed;
  box-shadow: 0 4px 12px rgba(249,115,22,0.10);
}
.nav-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary);
}
.nav-avatar-initials {
  width: 32px;
  height: 32px;
  background: #fff6ed;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-size: 13px;
  flex-shrink: 0;
}
.nav-profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}
.nav-profile-role {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: capitalize;
  margin-top: 2px;
}
.nav-profile-caret {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  margin-left: 2px;
  transition: transform 0.2s ease;
}
.nav-profile-trigger:hover .nav-profile-caret {
  color: var(--primary);
}

/* Profile Dropdown */
.nav-profile-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 12px 28px -4px rgba(0,0,0,0.12), 0 4px 10px -2px rgba(0,0,0,0.06);
  min-width: 200px;
  padding: 6px;
  z-index: 1000;
  animation: dropdownIn 0.15s ease;
}
.nav-profile-dropdown.open {
  display: block;
}

.nav-dropdown-header {
  padding: 10px 14px 8px;
}
.nav-dropdown-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
}
.nav-dropdown-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
  margin-top: 2px;
}
.nav-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-dark);
  border-radius: 8px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.nav-dropdown-item:hover {
  background: #fff6ed;
  color: var(--primary);
}
.nav-dropdown-item:hover i,
.nav-dropdown-item:hover svg {
  color: var(--primary);
}
.nav-dropdown-item i,
.nav-dropdown-item svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.nav-dropdown-item--danger { color: var(--danger); }
.nav-dropdown-item--danger i,
.nav-dropdown-item--danger svg { color: var(--danger); }
.nav-dropdown-item--danger:hover { background: var(--danger-glow); color: var(--danger); }

/* ============================================================
   APP LAYOUT (below navbar)
   ============================================================ */
.app-container {
  display: flex;
  width: 100%;
  min-width: 0;
  position: relative;
  padding-top: var(--navbar-height);
}

/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  height: calc(100vh - var(--navbar-height));
  position: fixed;
  left: 0;
  top: var(--navbar-height);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 2px 0 10px rgba(0,0,0,0.02);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Collapsed state (desktop) */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}
.sidebar.collapsed .sidebar-brand-label,
.sidebar.collapsed .sidebar-menu span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 16px 0;
}
.sidebar.collapsed .sidebar-menu {
  padding: 14px 8px;
}
.sidebar.collapsed .sidebar-item a {
  justify-content: center;
  padding: 11px;
  gap: 0;
  border-left: none !important;
  position: relative;
}
.sidebar.collapsed .sidebar-item a:hover::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--secondary);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 999;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-logo {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  min-height: 58px;
  flex-shrink: 0;
  transition: padding 0.3s ease;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 10px var(--primary-glow);
  flex-shrink: 0;
}

.logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  transition: opacity 0.2s ease, width 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  transition: var(--transition);
}
.sidebar-item a i,
.sidebar-item a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-item.active a, .sidebar-item a:hover {
  background-color: #f3f4f6;
  color: var(--primary);
}

.sidebar-item.active a {
  background-color: #fff6ed;
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

/* Transition for text labels */
.sidebar-brand-label,
.sidebar-menu span {
  transition: opacity 0.2s ease;
}

/* Collapsed sidebar → shift main content */
.app-container.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-width);
  max-width: calc(100vw - var(--sidebar-collapsed-width));
}
.top-navbar.sidebar-collapsed {
  /* no change needed, navbar is always full width */
}

/* Sidebar footer (keep for legacy) */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-color);
}

/* Main Content Workspace */
.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-width: 0;
  max-width: calc(100vw - var(--sidebar-width));
  padding: 28px 30px;
  min-height: calc(100vh - var(--navbar-height));
  background-color: var(--bg-main);
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Navbar Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-title h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Card Panel */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  max-width: 100%;
  min-width: 0;
}

/* Flash Alerts */
.alert {
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideIn 0.3s ease-out;
}

.alert-success {
  background-color: var(--success-glow);
  border: 1px solid var(--success);
  color: #065f46;
}

.alert-danger {
  background-color: var(--danger-glow);
  border: 1px solid var(--danger);
  color: #991b1b;
}

.alert-close {
  cursor: pointer;
  opacity: 0.7;
}

.alert-close:hover {
  opacity: 1;
}

/* Forms & Input Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 8px;
  transition: var(--transition);
  font-family: var(--font-family);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 8px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background-color: #ea580c;
  box-shadow: 0 5px 12px var(--primary-glow);
}

.btn-secondary {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #f9fafb;
}

.btn-success {
  background-color: var(--success);
  color: #fff;
  box-shadow: 0 3px 8px var(--success-glow);
}

.btn-success:hover {
  transform: translateY(-1px);
  background-color: #059669;
  box-shadow: 0 5px 12px var(--success-glow);
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
  box-shadow: 0 3px 8px var(--danger-glow);
}

.btn-danger:hover {
  transform: translateY(-1px);
  background-color: #dc2626;
  box-shadow: 0 5px 12px var(--danger-glow);
}

.btn-icon {
  padding: 8px 10px;
  border-radius: 6px;
}

/* Dashboard Metrics & KPI Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--accent-color);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
}

.kpi-info {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-dark);
}

.kpi-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--icon-bg);
  color: var(--icon-color);
}

/* KPI Variants styling */
.kpi-sales {
  --icon-bg: #fff6ed;
  --icon-color: var(--primary);
  border-left: 4px solid var(--primary);
}

.kpi-orders {
  --icon-bg: #fdf2f8;
  --icon-color: var(--secondary);
  border-left: 4px solid var(--secondary);
}

.kpi-products {
  --icon-bg: #ecfdf5;
  --icon-color: var(--success);
  border-left: 4px solid var(--success);
}

.kpi-stock {
  --icon-bg: #fef3c7;
  --icon-color: var(--warning);
  border-left: 4px solid var(--warning);
}

/* Dashboard Analytics Grid */
.dashboard-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.chart-panel h3, .recent-panel h3 {
  margin-bottom: 16px;
  font-size: 16.5px;
}

/* Tables styling */
.table-responsive {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.table-custom {
  width: 100%;
  min-width: max(760px, 100%);
  border-collapse: collapse;
  text-align: left;
}

.table-custom th {
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.table-custom td {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  background-color: transparent;
  transition: var(--transition);
}

.table-custom tr:hover td {
  background-color: #f9fafb;
}

.badge {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background-color: var(--success-glow);
  color: #065f46;
  border: 1px solid var(--success);
}

.badge-warning {
  background-color: var(--warning-glow);
  color: #92400e;
  border: 1px solid var(--warning);
}

.badge-danger {
  background-color: var(--danger-glow);
  color: #991b1b;
  border: 1px solid var(--danger);
}

/* POS Terminal Dual-Panel Layout */
.pos-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  height: calc(100vh - 120px);
}

.pos-catalog {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}

.catalog-actions {
  display: flex;
  gap: 12px;
}

.catalog-search-wrapper {
  flex-grow: 1;
  position: relative;
}

.catalog-search-wrapper i,
.catalog-search-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.catalog-search-wrapper .form-control {
  padding-left: 38px;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.category-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-filter-btn {
  padding: 6px 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-size: 12.5px;
  color: #4b5563;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-weight: 500;
}

.category-filter-btn.active, .category-filter-btn:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px var(--primary-glow);
}

/* Product Catalog Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 4px;
  align-content: start;
}

.product-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.product-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.12);
}

.product-item.highlighted {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.12) !important;
  transform: translateY(-2px);
}

.product-item-img {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--text-muted);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.product-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 34px;
}

.product-item-sku {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: auto;
}

.product-item-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
}

.product-item-stock {
  font-size: 10px;
  padding: 1px 5px;
  background-color: #f3f4f6;
  border-radius: 4px;
  color: var(--text-muted);
}

.product-item-stock.low-stock {
  background-color: var(--danger-glow);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* POS Cart Register */
.pos-cart {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #ffffff;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-header span {
  font-size: 11px;
  background-color: var(--secondary);
  color: #fff;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.cart-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 10px;
}

.cart-empty i,
.cart-empty svg {
  font-size: 36px;
  width: 36px;
  height: 36px;
  opacity: 0.4;
}

/* Cart Item Row */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  animation: slideIn 0.2s ease-out;
}

.cart-item-details {
  flex-grow: 1;
  padding-right: 6px;
}

.cart-item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 11px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: var(--transition);
}

.qty-btn:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.qty-input {
  width: 50px;
  text-align: center;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-dark);
  border-radius: 4px;
  padding: 3px 2px;
  font-weight: 700;
  font-size: 11.5px;
}

.cart-item-subtotal {
  font-weight: 700;
  color: var(--primary);
  font-size: 12.5px;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  transition: var(--transition);
}

.cart-item-remove:hover {
  color: var(--danger);
}

/* Cart Summary & Checkout Footer */
.cart-summary {
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
}

.summary-row.grand-total {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  border-top: 1px dotted var(--border-color);
  padding-top: 6px;
  margin-top: 2px;
}

.summary-row.grand-total span {
  color: var(--primary);
}

.cart-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 12px;
}

/* Modals Overlay & Design */
.modal-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
  transform: scale(0.95);
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-box form {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  min-height: 0;
  flex-grow: 1;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
}

.modal-close {
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  font-size: 16px;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Payment Checkout Details */
.checkout-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.payment-method-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.method-btn {
  background-color: #f9fafb;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11.5px;
  gap: 4px;
  transition: var(--transition);
}

.method-btn.active, .method-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: #fff6ed;
}

.change-highlight {
  background-color: var(--success-glow);
  border: 1px solid var(--success);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  margin-top: 12px;
}

.change-highlight p {
  font-size: 11px;
  color: #065f46;
}

.change-highlight h4 {
  font-size: 22px;
  color: #047857;
  font-weight: 700;
  margin-top: 2px;
}

/* Auth Login Screen */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.05), transparent),
              var(--bg-main);
}

.login-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 380px;
  min-width: 0;
  padding: 28px 20px;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--card-shadow);
  animation: fadeInUp 0.4s ease-out;
  margin: auto;
  box-sizing: border-box;
  overflow: hidden;
  word-break: break-word;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 4px 10px var(--primary-glow);
  margin-bottom: 16px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Product list image previews */
.product-thumbnail {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background-color: #f3f4f6;
  border: 1px solid var(--border-color);
  object-fit: cover;
}

.no-thumbnail {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background-color: #f3f4f6;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
}



/* Receipts Layout (Standalone & Printable) */
.receipt-wrapper {
  max-width: 320px;
  margin: 0 auto;
  background: #fff;
  color: #000;
  padding: 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.receipt-header {
  text-align: center;
  margin-bottom: 15px;
  border-bottom: 1px dashed #000;
  padding-bottom: 10px;
}

.receipt-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.receipt-divider {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.receipt-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.receipt-table th {
  text-align: left;
  border-bottom: 1px dashed #000;
  padding: 4px 0;
}

.receipt-table td {
  padding: 6px 0;
  vertical-align: top;
}

.receipt-table .text-right {
  text-align: right;
}

.receipt-totals {
  margin-top: 10px;
  border-top: 1px dashed #000;
  padding-top: 8px;
}

.receipt-footer {
  text-align: center;
  margin-top: 20px;
  border-top: 1px dashed #000;
  padding-top: 10px;
  font-size: 10px;
}

/* ============================================================
   SIDEBAR BACKDROP (mobile overlay)
   ============================================================ */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar item staggered entrance (desktop) */
.sidebar-item {
  animation: sidebarItemIn 0.3s cubic-bezier(0.4,0,0.2,1) both;
}
.sidebar-item:nth-child(1)  { animation-delay: 0.04s; }
.sidebar-item:nth-child(2)  { animation-delay: 0.08s; }
.sidebar-item:nth-child(3)  { animation-delay: 0.12s; }
.sidebar-item:nth-child(4)  { animation-delay: 0.16s; }
.sidebar-item:nth-child(5)  { animation-delay: 0.20s; }
.sidebar-item:nth-child(6)  { animation-delay: 0.24s; }
.sidebar-item:nth-child(7)  { animation-delay: 0.28s; }
.sidebar-item:nth-child(8)  { animation-delay: 0.32s; }
.sidebar-item:nth-child(9)  { animation-delay: 0.36s; }
.sidebar-item:nth-child(10) { animation-delay: 0.40s; }

/* Active sidebar item glowing indicator */
.sidebar-item.active a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  animation: scaleIn 0.25s ease;
}
.sidebar-item a { position: relative; }

/* Sidebar hover ripple effect */
.sidebar-item a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: var(--primary);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: -1;
}
.sidebar-item a:hover::after {
  opacity: 0.06;
  transform: scale(1);
}

/* KPI / Card hover lift animation */
.kpi-card,
.glass-panel,
.card {
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.22s cubic-bezier(0.4,0,0.2,1);
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px -4px rgba(0,0,0,0.10), 0 4px 10px -2px rgba(249,115,22,0.08);
}

/* Button micro-press */
.btn {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:active {
  transform: scale(0.97);
}

/* Toggle button spin on collapse */
.sidebar-toggle-btn i,
.sidebar-toggle-btn svg {
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar.collapsed ~ * .sidebar-toggle-btn i {
  transform: rotate(180deg);
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 992px)
   ============================================================ */
@media (max-width: 992px) {
  .sidebar-backdrop {
    display: block;
  }

  /* Sidebar slides in from left as overlay */
  .sidebar {
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.32s ease;
    z-index: 160;
    box-shadow: none;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 6px 0 30px rgba(0,0,0,0.15);
  }

  /* Safety override: on mobile, always show sidebar text labels and full layout
     even if the desktop 'collapsed' class was still present */
  .sidebar.mobile-open .sidebar-brand-label,
  .sidebar.mobile-open .sidebar-menu span {
    opacity: 1 !important;
    width: auto !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
  .sidebar.mobile-open .sidebar-menu {
    padding: 16px 12px !important;
  }
  .sidebar.mobile-open .sidebar-item a {
    justify-content: flex-start !important;
    padding: 10px 14px !important;
    gap: 12px !important;
  }

  /* Stagger sidebar items when mobile opens */
  .sidebar.mobile-open .sidebar-item {
    animation: sidebarItemIn 0.28s cubic-bezier(0.4,0,0.2,1) both;
  }
  .sidebar.mobile-open .sidebar-item:nth-child(1)  { animation-delay: 0.06s; }
  .sidebar.mobile-open .sidebar-item:nth-child(2)  { animation-delay: 0.10s; }
  .sidebar.mobile-open .sidebar-item:nth-child(3)  { animation-delay: 0.14s; }
  .sidebar.mobile-open .sidebar-item:nth-child(4)  { animation-delay: 0.18s; }
  .sidebar.mobile-open .sidebar-item:nth-child(5)  { animation-delay: 0.22s; }
  .sidebar.mobile-open .sidebar-item:nth-child(6)  { animation-delay: 0.26s; }
  .sidebar.mobile-open .sidebar-item:nth-child(7)  { animation-delay: 0.30s; }
  .sidebar.mobile-open .sidebar-item:nth-child(8)  { animation-delay: 0.34s; }
  .sidebar.mobile-open .sidebar-item:nth-child(9)  { animation-delay: 0.38s; }
  .sidebar.mobile-open .sidebar-item:nth-child(10) { animation-delay: 0.42s; }

  /* Navbar: hide profile text, show only avatar */
  .nav-profile-info {
    display: none;
  }
  .nav-profile-trigger {
    padding: 4px;
    gap: 0;
  }
  .nav-profile-caret { display: none; }
  .navbar-brand-name {
    font-size: 14px;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100%;
    max-width: 100vw !important;
    padding: 18px 16px;
    overflow-x: hidden;
    animation: fadeInUp 0.3s cubic-bezier(0.4,0,0.2,1) both;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  .pos-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .kpi-card {
    padding: 16px;
  }
  .kpi-card:hover {
    transform: none; /* disable hover lift on touch */
  }

  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .page-title,
  .page-title h1 {
    max-width: 100%;
  }

  .page-title h1 {
    font-size: 21px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  
  .top-header .page-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .top-header .page-actions .btn {
    flex: 1;
    min-width: 160px;
    width: auto;
  }
  
  .glass-panel {
    padding: 16px;
    border-radius: 12px;
  }

  .premium-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .premium-kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .glass-panel > div[style*="max-width: 350px"],
  .glass-panel > div[style*="max-width:350px"] {
    width: 100%;
    max-width: 100% !important;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }

  .table-custom {
    min-width: 720px;
  }

  .table-custom th,
  .table-custom td {
    padding: 10px 12px;
  }

  .category-filter-bar {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .category-filter-bar::-webkit-scrollbar { display: none; }

  .category-filter-bar .category-filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .catalog-grid {
    max-height: 450px;
  }
  .cart-body {
    max-height: 300px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 576px)
   ============================================================ */
@media (max-width: 576px) {
  .main-content {
    padding: 14px 12px;
    animation: fadeInUp 0.28s cubic-bezier(0.4,0,0.2,1) both;
  }

  .top-navbar {
    padding: 0 12px;
    height: 56px;
  }
  :root {
    --navbar-height: 56px;
  }
  .navbar-brand-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }
  .navbar-brand-icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .page-title h1 {
    font-size: 16px;
  }

  .top-header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }

  /* Page title row on mobile: back button + title side by side */
  .top-header .page-title {
    width: 100%;
  }

  /* Action buttons on mobile: stack vertically, full width */
  .top-header .page-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .top-header .page-actions .btn {
    flex: none !important;
    width: 100%;
    height: auto !important;
    min-height: 44px;
    justify-content: center;
    font-size: 14px;
    border-radius: 10px;
  }

  .glass-panel {
    border-radius: 10px;
    padding: 14px 12px;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .kpi-card {
    min-height: 0;
    padding: 14px;
  }

  .kpi-value {
    font-size: 17px;
    line-height: 1.15;
    word-break: break-word;
  }

  .kpi-label {
    font-size: 10px;
  }

  .kpi-icon-wrapper {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .table-responsive {
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
  }

  .table-custom {
    min-width: 620px;
  }

  .table-custom th,
  .table-custom td {
    padding: 9px 10px;
    font-size: 12px;
  }

  .table-custom th {
    font-size: 9.5px;
    letter-spacing: 0.04em;
  }

  .checkout-details-grid {
    grid-template-columns: 1fr;
  }

  /* Bottom sheet style dropdowns */
  .nav-profile-dropdown {
    position: fixed;
    right: 8px;
    top: calc(var(--navbar-height) + 6px);
    min-width: 190px;
    border-radius: 14px;
  }

  /* ── Ledger page: info + KPI top grid → stack to single column ── */
  .ledger-top-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Customer / Supplier info card on mobile */
  .ledger-info-card h3 {
    font-size: 16px !important;
    flex-wrap: wrap;
  }

  .ledger-info-details {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    font-size: 13px !important;
  }

  .ledger-info-footer {
    flex-direction: column;
    gap: 4px;
  }

  /* Outstanding KPI card on mobile */
  .ledger-kpi-card {
    padding: 16px 12px !important;
    min-height: 100px;
  }

  .ledger-kpi-card h2 {
    font-size: 26px !important;
  }

  /* Financial stats 3-col grid → single column */
  .ledger-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 14px 16px !important;
  }

  .ledger-stats-grid > div {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--border-color);
    padding-top: 12px !important;
    margin-top: 12px;
  }

  .ledger-stats-grid > div:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }

  .ledger-stats-grid h4 {
    font-size: 17px !important;
  }
}

/* PRINT MEDIA MEDIA STYLING */
@media print {
  body * {
    visibility: hidden;
  }
  .receipt-wrapper, .receipt-wrapper * {
    visibility: visible;
  }
  .receipt-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    padding: 0;
  }
}

/* ============================================================
   TOAST NOTIFICATION SYSTEM
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 300px;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid #10b981;
  animation: toastIn 0.38s cubic-bezier(0.34,1.56,0.64,1) both;
  position: relative;
  overflow: hidden;
}

.toast.toast-error   { border-left-color: #ef4444; }
.toast.toast-warning { border-left-color: #f59e0b; }
.toast.toast-info    { border-left-color: #3b82f6; }

.toast.toast-hide {
  animation: toastOut 0.3s cubic-bezier(0.4,0,1,1) both;
}

/* Progress bar */
.toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #10b981;
  border-radius: 0 0 0 14px;
  width: 100%;
  animation: toastProgress var(--toast-duration, 3.5s) linear forwards;
  transform-origin: left;
}
.toast.toast-error::after   { background: #ef4444; }
.toast.toast-warning::after { background: #f59e0b; }
.toast.toast-info::after    { background: #3b82f6; }

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #ecfdf5;
  color: #10b981;
  font-size: 18px;
}
.toast.toast-error   .toast-icon { background: #fef2f2; color: #ef4444; }
.toast.toast-warning .toast-icon { background: #fffbeb; color: #f59e0b; }
.toast.toast-info    .toast-icon { background: #eff6ff; color: #3b82f6; }

.toast-body {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 3px;
  line-height: 1.3;
}
.toast-msg {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.4;
  word-break: break-word;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s;
  margin-top: -2px;
}
.toast-close:hover { color: #374151; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0)   scale(1);    }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0)   scale(1); max-height: 120px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(60px) scale(0.9); max-height: 0;   margin-bottom: -12px; }
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@media (max-width: 576px) {
  #toast-container {
    bottom: 16px;
    right: 10px;
    left: 10px;
  }
  .toast {
    min-width: unset;
    max-width: 100%;
  }
}
/* Premium KPI Cards */
.premium-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
.premium-kpi-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
.premium-kpi-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.premium-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.premium-kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}
.premium-kpi-card:hover::before {
    opacity: 1;
}
.premium-kpi-card > * {
    position: relative;
    z-index: 2;
}
.kpi-title {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.kpi-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
}
.kpi-desc {
    font-size: 11.5px;
    color: var(--text-muted);
}
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}
.premium-kpi-card, .glass-panel, .sa-table-wrap, .sa-form-card {
    animation: slideUpFade 0.5s ease backwards;
}
.premium-kpi-grid > :nth-child(1), .premium-kpi-grid-4 > :nth-child(1) { animation-delay: 0.05s; }
.premium-kpi-grid > :nth-child(2), .premium-kpi-grid-4 > :nth-child(2) { animation-delay: 0.1s; }
.premium-kpi-grid > :nth-child(3), .premium-kpi-grid-4 > :nth-child(3) { animation-delay: 0.15s; }
.premium-kpi-grid > :nth-child(4), .premium-kpi-grid-4 > :nth-child(4) { animation-delay: 0.2s; }
.premium-kpi-grid > :nth-child(5) { animation-delay: 0.25s; }

@media (max-width: 1200px) {
    .premium-kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .premium-kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .premium-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .premium-kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .premium-kpi-grid { grid-template-columns: 1fr; }
    .premium-kpi-grid-4 { grid-template-columns: 1fr; }
}

/* Subscription Badge Responsive */
@media (max-width: 576px) {
    #nav-sub-trigger span {
        display: none;
    }
    #nav-sub-trigger {
        padding: 6px !important;
        border-radius: 50% !important;
    }
    #nav-sub-dropdown {
        width: 100vw !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: 60px !important;
        border-radius: 0 0 12px 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    }
}

