:root {
  --primary: #d4af37;
  --primary-dark: #b8942c;
  --secondary: #f5e6a8;
  --accent: #1a1a1a;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Login Page */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}

.login-body::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(212, 175, 55, 0.06) 0%, transparent 50%);
  animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(180deg); }
}

.floating-shapes span {
  position: absolute;
  border-radius: 50%;
  animation: float 7s ease-in-out infinite;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.floating-shapes span:nth-child(1) { top: 10%; left: 8%; width: 100px; height: 100px; background: rgba(212, 175, 55, 0.06); animation-delay: 0s; }
.floating-shapes span:nth-child(2) { top: 15%; right: 10%; width: 140px; height: 140px; background: rgba(212, 175, 55, 0.04); animation-delay: 1.5s; }
.floating-shapes span:nth-child(3) { bottom: 25%; left: 15%; width: 70px; height: 70px; background: rgba(212, 175, 55, 0.08); animation-delay: 3s; }
.floating-shapes span:nth-child(4) { bottom: 10%; right: 12%; width: 110px; height: 110px; background: rgba(212, 175, 55, 0.05); animation-delay: 4.5s; }
.floating-shapes span:nth-child(5) { top: 50%; left: 3%; width: 60px; height: 60px; background: rgba(212, 175, 55, 0.07); animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  33% { transform: translateY(-30px) scale(1.08) rotate(120deg); }
  66% { transform: translateY(15px) scale(0.95) rotate(240deg); }
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

.login-card {
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
  padding: 44px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.08) inset;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  border-radius: 20px 20px 0 0;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(50px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.logo-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 36px;
  color: #0a0a0a;
  box-shadow: 0 10px 40px rgba(212, 175, 55, 0.35), 0 0 0 6px rgba(212, 175, 55, 0.08);
  animation: logoPulse 2.5s ease-in-out infinite;
  position: relative;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  animation: ringExpand 2.5s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 40px rgba(212, 175, 55, 0.35), 0 0 0 6px rgba(212, 175, 55, 0.08); }
  50% { transform: scale(1.06); box-shadow: 0 12px 50px rgba(212, 175, 55, 0.5), 0 0 0 10px rgba(212, 175, 55, 0.04); }
}

@keyframes ringExpand {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.login-logo h1 {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.login-logo p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.login-form .form-group { margin-bottom: 22px; }

.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.3px;
}

.input-icon {
  position: relative;
}

.input-icon i:first-child {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(212, 175, 55, 0.6);
  transition: all 0.3s ease;
  font-size: 15px;
}

.input-icon input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.input-icon input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-icon input:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.input-icon input:focus + i,
.input-icon:focus-within i:first-child {
  color: #d4af37;
  transform: translateY(-50%) scale(1.1);
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.toggle-password:hover {
  color: #d4af37;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  color: #0a0a0a;
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.3);
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(212, 175, 55, 0.45);
}

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

.btn-block { width: 100%; }

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(10, 10, 10, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-ripple:active::after {
  width: 350px;
  height: 350px;
}

.login-message {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  min-height: 20px;
}

.login-message.error { color: #ef4444; }
.login-message.success { color: #10b981; }

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  padding-top: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.login-footer p {
  letter-spacing: 0.5px;
}

/* App Shell */
.app-body {
  min-height: 100vh;
  background: var(--bg);
}

.app-shell {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #141414 0%, #0a0a0a 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar.collapsed { transform: translateX(-240px); }

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-logo i {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  font-size: 18px;
  -webkit-text-fill-color: #0a0a0a;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.sidebar-close { display: none; background: none; border: none; font-size: 20px; color: rgba(255,255,255,0.7); cursor: pointer; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover, .nav-item.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  color: #d4af37;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  background: linear-gradient(180deg, #d4af37, #f5e6a8);
  border-radius: 0 4px 4px 0;
}

.nav-item.logout { margin-top: auto; color: #f87171; }
.nav-item.logout:hover { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

.main-content {
  width: calc(100% - 240px);
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  transition: margin-left 0.3s ease, width 0.3s ease;
}

.main-content.expanded {
  margin-left: 0;
  width: 100%;
}

.topbar {
  height: 70px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: flex;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.menu-toggle:hover { background: var(--bg); }

.topbar-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.topbar-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.topbar-search input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg);
  transition: var(--transition);
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

.topbar-actions { display: flex; align-items: center; gap: 16px; }

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-muted); }

.page-content {
  flex: 1;
  padding: 28px;
  animation: fadeIn 0.4s ease;
  min-width: 0;
  overflow: hidden;
}

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

/* Dashboard */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h2 { font-size: 24px; font-weight: 700; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4af37, #f5e6a8, #d4af37);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(212, 175, 55, 0.15); border-color: rgba(212, 175, 55, 0.4); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.stat-icon.pink { background: linear-gradient(135deg, #d4af37, #f5e6a8); color: #0a0a0a; }
.stat-icon.purple { background: linear-gradient(135deg, #1a1a1a, #3d3d3d); color: #d4af37; }
.stat-icon.cyan { background: linear-gradient(135deg, #b8942c, #d4af37); color: #0a0a0a; }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-icon.red { background: linear-gradient(135deg, #ef4444, #f87171); }

.stat-info h3 { font-size: 26px; font-weight: 700; margin-bottom: 2px; }
.stat-info p { font-size: 13px; color: var(--text-muted); }

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: fadeIn 0.5s ease;
}

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

.card-title { font-size: 16px; font-weight: 700; }

/* POS */
.pos-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  height: calc(100vh - 140px);
}

.pos-products {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  min-width: 0;
}

.pos-categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-chip {
  padding: 10px 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.category-chip:hover, .category-chip.active {
  background: linear-gradient(135deg, #d4af37, #c9a432);
  color: #0a0a0a;
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
  font-weight: 600;
}

.pos-search {
  position: relative;
}

.pos-search input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: white;
}

.pos-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  flex: 1;
  align-content: start;
  min-width: 0;
}

.product-card {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

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

.product-card .image {
  height: 80px;
  background: linear-gradient(135deg, #faf7ef, #f5f0e1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
  overflow: hidden;
}
.product-card .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-card .info { padding: 8px; }
.product-card .name {
  font-size: 12px; font-weight: 600; margin-bottom: 2px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .meta { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card .price { font-size: 13px; font-weight: 700; color: var(--primary); }
.product-card .stock { font-size: 10px; color: var(--success); }

.product-card.low-stock .stock { color: var(--warning); }
.product-card.out-stock { opacity: 0.6; pointer-events: none; }

.pos-cart {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
}

.cart-header h3 { font-size: 16px; font-weight: 700; }
.cart-header p { font-size: 12px; color: var(--text-muted); }

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

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: 10px;
  transition: var(--transition);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cart-item .thumb {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #faf7ef, #f5f0e1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.cart-item .details { flex: 1; min-width: 0; }
.cart-item .name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .price { font-size: 12px; color: var(--primary); font-weight: 600; }
.cart-item .price-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0 4px; }
.cart-item .price-row .badge { padding: 2px 6px; }

.cart-item .actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.cart-item .actions button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: var(--transition);
}

.cart-item .actions button:hover { background: var(--primary); color: #0a0a0a; border-color: var(--primary); }
.cart-item .actions .qty { font-size: 12px; font-weight: 600; min-width: 20px; text-align: center; }

.cart-summary {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}

.summary-row.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.cart-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.cart-actions .btn { flex: 1; font-size: 13px; }

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

.empty-cart i { font-size: 48px; margin-bottom: 12px; color: var(--border); }

/* Tables */
.table-responsive { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover { background: rgba(212, 175, 55, 0.05); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--info); }

/* Buttons */
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-info { background: var(--info); color: white; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 8px 14px; font-size: 12px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  transition: var(--transition);
  background: white;
}

.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12); }

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active { display: flex; opacity: 1; }

.modal {
  background: white;
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0,0,0,0.2);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

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

.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; }

.modal-body { padding: 24px; }
.modal-footer { padding: 20px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: toastIn 0.4s ease;
  border-left: 4px solid var(--success);
}

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-240px); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .main-content { margin-left: 0; width: 100%; }
  .menu-toggle { display: block; }
  .pos-container { grid-template-columns: 1fr; height: auto; }
  .pos-cart { min-height: 400px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .user-details { display: none; }
  .form-row { grid-template-columns: 1fr; }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 16px; }

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 8px;
}

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

/* Report Filters */
.report-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  align-items: flex-end;
}

.report-filters .form-group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.report-filters .form-control {
  padding: 10px 12px;
  font-size: 13px;
}

/* Print styles for reports */
@media print {
  .sidebar, .topbar, .page-header button, .report-filters, .stat-card { display: none !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none !important; border: none !important; page-break-inside: avoid; }
  body { background: white !important; }
}
