/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES (Design System) ===== */
:root {
  /* Colors */
  --background: hsl(40, 20%, 98%);
  --foreground: hsl(220, 20%, 15%);
  
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(220, 20%, 15%);
  
  --primary: hsl(152, 55%, 40%);
  --primary-foreground: hsl(0, 0%, 100%);
  --primary-soft: hsl(152, 45%, 95%);
  
  --secondary: hsl(220, 15%, 94%);
  --secondary-foreground: hsl(220, 20%, 25%);
  
  --muted: hsl(220, 15%, 94%);
  --muted-foreground: hsl(220, 10%, 50%);
  
  --accent: hsl(152, 45%, 92%);
  --accent-foreground: hsl(152, 55%, 30%);
  
  --destructive: hsl(0, 72%, 55%);
  --destructive-foreground: hsl(0, 0%, 100%);
  --destructive-soft: hsl(0, 72%, 95%);
  
  --warning: hsl(38, 95%, 55%);
  --warning-foreground: hsl(38, 95%, 20%);
  --warning-soft: hsl(38, 80%, 92%);
  
  --success: hsl(152, 55%, 40%);
  --success-foreground: hsl(0, 0%, 100%);
  
  --border: hsl(220, 15%, 90%);
  --input: hsl(220, 15%, 90%);
  --ring: hsl(152, 55%, 40%);
  
  --radius: 0.75rem;
  
  /* Sidebar */
  --sidebar-background: hsl(220, 20%, 12%);
  --sidebar-foreground: hsl(220, 10%, 80%);
  --sidebar-primary: hsl(152, 55%, 45%);
  --sidebar-primary-foreground: hsl(0, 0%, 100%);
  --sidebar-accent: hsl(220, 15%, 18%);
  --sidebar-accent-foreground: hsl(0, 0%, 100%);
  --sidebar-border: hsl(220, 15%, 20%);
  
  /* Custom tokens */
  --profit: hsl(152, 55%, 40%);
  --profit-soft: hsl(152, 45%, 95%);
  --loss: hsl(0, 72%, 55%);
  --loss-soft: hsl(0, 72%, 95%);
  --low-stock: hsl(38, 95%, 55%);
  --low-stock-soft: hsl(38, 80%, 92%);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ===== LAYOUT ===== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--sidebar-background);
  color: var(--sidebar-foreground);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 2rem;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--sidebar-primary), hsl(152, 55%, 35%));
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-icon svg {
  color: var(--sidebar-primary-foreground);
}

.sidebar-logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sidebar-primary-foreground);
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sidebar-foreground);
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}

.nav-link.active {
  background-color: var(--sidebar-primary);
  color: var(--sidebar-primary-foreground);
}

.nav-link svg {
  width: 20px;
  height: 20px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
}

.page-header p {
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* ===== COMPONENTS ===== */

/* Cards */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-icon.primary {
  background-color: var(--primary-soft);
  color: var(--primary);
}

.stat-card-icon.warning {
  background-color: var(--warning-soft);
  color: var(--warning-foreground);
}

.stat-card-icon.destructive {
  background-color: var(--destructive-soft);
  color: var(--destructive);
}

.stat-card-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
}

.stat-card-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.stat-card-change.positive {
  background-color: var(--profit-soft);
  color: var(--profit);
}

.stat-card-change.negative {
  background-color: var(--loss-soft);
  color: var(--loss);
}

/* Grid Layouts */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* Product Card */
.product-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: scale(1.02);
}

.product-card-image {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--muted), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

.product-card-placeholder {
  width: 48px;
  height: 48px;
  color: var(--muted-foreground);
}

.stock-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.stock-badge.low {
  background-color: var(--warning-soft);
  color: var(--warning-foreground);
}

.stock-badge.out {
  background-color: var(--destructive-soft);
  color: var(--destructive);
}

.product-card-content {
  padding: 1rem;
}

.product-card-category {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.product-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.product-card-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.product-card-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
}

.product-card-meta {
  text-align: right;
}

.product-card-profit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--profit);
}

.product-card-stock {
  font-size: 0.625rem;
  color: var(--muted-foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  border: none;
}

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

.btn-primary:hover {
  background-color: hsl(152, 55%, 35%);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background-color: hsl(220, 15%, 88%);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background-color: var(--accent);
}

.btn-ghost {
  background-color: transparent;
  color: var(--muted-foreground);
}

.btn-ghost:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.btn-lg:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
  transform: scale(1.02);
}

/* Input */
.input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background-color: transparent;
  color: var(--foreground);
  transition: border-color 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px hsla(152, 55%, 40%, 0.2);
}

.input::placeholder {
  color: var(--muted-foreground);
}

/* Table */
.table-container {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  background-color: var(--muted);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.table th:hover {
  color: var(--foreground);
}

.table th.sortable {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table td {
  padding: 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background-color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background-color: var(--card);
  flex-wrap: wrap;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--card);
}

.table-search {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.table-search .input {
  min-width: 220px;
  flex: 1;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.pagination-btn.is-active {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: transparent;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-primary {
  background-color: var(--primary-soft);
  color: var(--primary);
}

.badge-success {
  background-color: var(--profit-soft);
  color: var(--profit);
}

.badge-warning {
  background-color: var(--warning-soft);
  color: var(--warning-foreground);
}

.badge-destructive {
  background-color: var(--destructive-soft);
  color: var(--destructive);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

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

.modal {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.25rem;
}

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

/* Shopping Cart */
.cart-panel {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

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

.cart-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.cart-count {
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: var(--muted);
  border-radius: 0.5rem;
}

.cart-item-info h4 {
  font-size: 0.875rem;
  font-weight: 500;
}

.cart-item-info p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-controls button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 1rem;
  color: var(--foreground);
}

.cart-item-controls span {
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 24px;
  text-align: center;
}

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

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.cart-summary-row.total {
  font-size: 1.125rem;
  font-weight: 700;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.cart-summary-row.profit {
  color: var(--profit);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 80px;
    padding: 1rem 0.5rem;
  }
  
  .sidebar-logo h1,
  .nav-link span {
    display: none;
  }
  
  .sidebar-logo {
    justify-content: center;
  }
  
  .nav-link {
    justify-content: center;
    padding: 0.75rem;
  }
  
  .main-content {
    margin-left: 80px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: flex;
    width: 72px;
    padding: 0.75rem 0.5rem;
  }

  .sidebar-logo h1,
  .nav-link span,
  .sidebar-footer .btn span {
    display: none;
  }

  .sidebar-logo {
    justify-content: center;
    margin-bottom: 1rem;
  }

  .nav-link {
    justify-content: center;
    padding: 0.65rem;
  }

  .sidebar-footer .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem;
  }

  .main-content {
    margin-left: 72px;
    padding: 1rem;
  }
  
  .has-cart-panel .cart-panel {
    left: 72px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-container {
    overflow-x: auto;
  }

  .table-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .pagination-controls {
    width: 100%;
    justify-content: space-between;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .has-cart-panel .cart-panel {
    position: static;
    max-height: none;
    border-radius: var(--radius);
  }

  .has-cart-panel .main-content {
    padding-bottom: 1rem;
  }

  .table--responsive thead {
    display: none;
  }

  .table--responsive tr {
    display: block;
    border-bottom: 1px solid var(--border);
  }

  .table--responsive td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: none;
  }

  .table--responsive td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
  }

  .table--responsive td[colspan] {
    display: block;
  }

  .table--responsive td[colspan]::before {
    content: none;
  }

  .table--responsive tr:last-child {
    border-bottom: none;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.4s ease-out;
}

/* ===== ADDITIONAL STYLES ===== */

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.modal-form {
  display: flex;
  flex-direction: column;
}

.modal-lg {
  max-width: 500px;
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group .input {
  flex: 1;
}

/* Filters Section */
.filters-section {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
}

.search-box .input {
  padding-left: 2.5rem;
}

.filter-group {
  display: flex;
  gap: 0.75rem;
}

.filter-select {
  min-width: 150px;
}

/* Section Styles */
.section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Page Header */
.page-header-content {
  flex: 1;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* Products Layout */
.products-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
}

.products-section {
  min-width: 0;
}

/* Cart Styles */
.cart-empty {
  text-align: center;
  padding: 2rem;
  color: var(--muted-foreground);
}

.cart-empty i {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
}

.cart-empty p {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.cart-empty span {
  font-size: 0.75rem;
}

.cart-qty-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

/* Category Manager */
.category-list-section {
  margin-top: 1.5rem;
}

.category-list-section h4 {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--muted-foreground);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: var(--muted);
  border-radius: 0.5rem;
}

/* Table Styles */
.product-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-icon {
  width: 36px;
  height: 36px;
  background-color: var(--muted);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-icon i {
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
}

.product-name {
  font-weight: 500;
}

.stock-value {
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 0.25rem;
}

.btn-sm {
  padding: 0.375rem;
}

.btn-sm i {
  width: 16px;
  height: 16px;
}

.text-destructive {
  color: var(--destructive);
}

.text-profit {
  color: var(--profit);
}

.text-muted {
  color: var(--muted-foreground);
}

/* Date Cells */
.date-primary {
  font-weight: 500;
}

.date-secondary {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Category Cell */
.category-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-icon {
  width: 32px;
  height: 32px;
  background-color: var(--muted);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon i {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.amount-negative {
  color: var(--destructive);
  font-weight: 500;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-foreground);
}

.empty-state i {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.empty-state-small {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted-foreground);
}

.empty-state-small i {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
}

/* Stock Modal */
.stock-info {
  background-color: var(--muted);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.stock-info p {
  margin-bottom: 0.25rem;
}

.stock-adjust-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stock-adjust-controls .input {
  width: 80px;
  text-align: center;
}

/* Reports Page */
.stats-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.report-card {
  padding: 1.5rem;
}

.report-card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

/* Profit Margin */
.profit-margin-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.profit-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.profit-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.profit-circle .bg {
  fill: none;
  stroke: var(--muted);
  stroke-width: 8;
}

.profit-circle .progress {
  fill: none;
  stroke: var(--profit);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.profit-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--profit);
}

.profit-legend {
  display: flex;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-color.profit {
  background-color: var(--profit);
}

.legend-color.cost {
  background-color: var(--muted);
}

/* Top Products */
.top-products {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.top-product-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-rank {
  width: 24px;
  height: 24px;
  background-color: var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.product-bar {
  height: 4px;
  background-color: var(--muted);
  border-radius: 2px;
  overflow: hidden;
}

.product-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 2px;
}

.product-revenue {
  font-weight: 600;
  flex-shrink: 0;
}

/* Expense Breakdown */
.expense-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.expense-category-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.category-amount {
  font-weight: 500;
}

.category-bar {
  height: 6px;
  background-color: var(--muted);
  border-radius: 3px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.category-percentage {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Summary Grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.summary-item {
  text-align: center;
}

.summary-label {
  display: block;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.summary-value {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Button Full Width */
.btn-full {
  width: 100%;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--sidebar-border);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
}

.toast {
  background-color: var(--foreground);
  color: var(--background);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  animation: slideUp 0.3s ease-out;
}

/* Sell Modal */
.sell-modal-product {
  text-align: center;
  margin-bottom: 1.5rem;
}

.product-image-placeholder {
  width: 80px;
  height: 80px;
  background-color: var(--muted);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.product-image-placeholder i {
  width: 32px;
  height: 32px;
  color: var(--muted-foreground);
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quantity-display {
  font-size: 1.5rem;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
}

.sell-summary {
  background-color: var(--muted);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-row.profit span:last-child {
  color: var(--profit);
  font-weight: 500;
}

/* Auth Pages */
.auth-page {
  background: linear-gradient(135deg, hsl(152, 45%, 95%), hsl(220, 20%, 96%));
}

.auth-container {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Auth Branding Panel */
.auth-branding {
  background: linear-gradient(135deg, var(--sidebar-background), hsl(220, 25%, 18%));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.1;
}

.auth-branding-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), hsl(152, 55%, 30%));
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-icon i {
  width: 28px;
  height: 28px;
  color: white;
}

.auth-logo h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.auth-branding h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.auth-branding > .auth-branding-content > p {
  font-size: 1.125rem;
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  opacity: 0.9;
}

.auth-feature i {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

/* Auth Form Panel */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background-color: var(--background);
}

.auth-form-container {
  width: 100%;
  max-width: 480px;
}

.auth-form-header {
  margin-bottom: 2rem;
}

.auth-form-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-form-header p {
  color: var(--muted-foreground);
}

/* Step Indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--muted);
  color: var(--muted-foreground);
  transition: all 0.3s ease;
}

.step.active .step-number {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px hsla(152, 55%, 40%, 0.3);
}

.step.completed .step-number {
  background-color: var(--primary);
  color: white;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.step.completed .step-label {
  color: var(--primary);
}

.step-line {
  width: 60px;
  height: 2px;
  background-color: var(--border);
  margin: 0 0.5rem;
  margin-bottom: 1.5rem;
}

/* Form Styling */
.auth-form {
  margin-bottom: 1.5rem;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
  pointer-events: none;
}

.input-with-icon .input {
  padding-left: 2.5rem;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.forgot-link {
  color: var(--primary);
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn-full {
  width: 100%;
}

.form-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-buttons .btn {
  flex: 1;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border);
}

.auth-divider span {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1.5rem;
}

.auth-footer p {
  margin-bottom: 0.75rem;
}

.auth-footer a,
.auth-footer .link {
  color: var(--primary);
  font-weight: 500;
}

.auth-footer a:hover,
.auth-footer .link:hover {
  text-decoration: underline;
}

/* Plan Options */
.plan-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.plan-option {
  cursor: pointer;
}

.plan-option input {
  display: none;
}

.plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.2s ease;
  position: relative;
}

.plan-card:hover {
  border-color: var(--primary);
}

.plan-option input:checked + .plan-card {
  border-color: var(--primary);
  background-color: var(--primary-soft);
}

.plan-card.popular {
  border-color: var(--primary);
}

.plan-badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  background-color: var(--primary);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.plan-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.plan-price {
  text-align: right;
}

.plan-price .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.plan-price .period {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.plan-features {
  list-style: none;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.plan-features li:last-child {
  margin-bottom: 0;
}

.plan-features li i {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* Payment Section */
.payment-section {
  margin-bottom: 1.5rem;
}

.payment-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.payment-methods {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-method {
  flex: 1;
  cursor: pointer;
}

.payment-method input {
  display: none;
}

.payment-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

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

.payment-method input:checked + .payment-method-card {
  border-color: var(--primary);
  background-color: var(--primary-soft);
}

.payment-method-card i {
  width: 24px;
  height: 24px;
  color: var(--muted-foreground);
}

.payment-method input:checked + .payment-method-card i {
  color: var(--primary);
}

.payment-method-card span {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Card Details */
.card-details,
.bank-details {
  background-color: var(--muted);
  padding: 1.25rem;
  border-radius: var(--radius);
}

.bank-info p {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.bank-info p:last-child {
  margin-bottom: 0;
}

.bank-info .note {
  color: var(--muted-foreground);
  font-style: italic;
  margin-top: 1rem;
}

/* Auth Page Responsive */
@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr;
  }
  
  .auth-branding {
    display: none;
  }
  
  .auth-form-panel {
    min-height: 100vh;
  }
}

@media (max-width: 640px) {
  .auth-form-panel {
    padding: 1.5rem;
  }
  
  .step-indicator {
    gap: 0;
  }
  
  .step-line {
    width: 40px;
  }
  
  .step-label {
    display: none;
  }
  
  .payment-methods {
    flex-direction: column;
  }
  
  .plan-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .plan-price {
    text-align: left;
  }
}

/* Responsive */
@media (max-width: 1280px) {
  .stats-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .reports-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: 1fr;
  }
  
  .has-cart-panel .cart-panel {
    position: fixed;
    bottom: 0;
    left: 80px;
    right: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 50vh;
    overflow-y: auto;
    z-index: 120;
  }

  .has-cart-panel .main-content {
    padding-bottom: 55vh;
  }
  
  .reports-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .filter-group {
    flex-direction: column;
    width: 100%;
  }
  
  .stats-grid-5 {
    grid-template-columns: 1fr;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== NRS TAX FILING STYLES ===== */

.tax-filing-section {
  margin-top: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--card), hsl(152, 30%, 97%));
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  box-shadow: 0 4px 20px hsla(152, 55%, 40%, 0.15);
}

.tax-filing-section.highlight-section {
  animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
  0%, 100% { box-shadow: 0 4px 20px hsla(152, 55%, 40%, 0.15); }
  50% { box-shadow: 0 4px 30px hsla(152, 55%, 40%, 0.4); }
}

.section-header-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-header-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), hsl(152, 60%, 30%));
  border-radius: var(--radius);
  box-shadow: 0 4px 12px hsla(152, 55%, 40%, 0.3);
  flex-shrink: 0;
}

.section-header-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.section-header-text h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.section-header-text p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Tax Tabs */
.tax-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tax-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tax-tab:hover {
  color: var(--foreground);
  background-color: var(--accent);
}

.tax-tab.active {
  color: var(--primary);
  background-color: var(--primary-soft);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -1px;
}

.tax-tab svg {
  width: 18px;
  height: 18px;
}

/* Tax Form Container */
.tax-form-container.hidden {
  display: none;
}

.tax-form-card {
  padding: 0;
  overflow: hidden;
}

.tax-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--sidebar-background), hsl(220, 20%, 18%));
  color: white;
}

.tax-form-title h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.tax-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--primary);
  color: white;
  border-radius: 9999px;
}

.tax-badge.vat {
  background-color: hsl(200, 70%, 50%);
}

.tax-period-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tax-period-selector label {
  font-size: 0.875rem;
  color: hsl(220, 10%, 70%);
}

.tax-period-selector .input {
  width: auto;
  background-color: hsl(220, 15%, 20%);
  border-color: hsl(220, 15%, 30%);
  color: white;
}

.tax-form-body {
  padding: 1.5rem;
}

/* Tax Sections */
.tax-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.tax-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.tax-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
}

.tax-section-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Tax Fields Grid */
.tax-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.tax-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tax-field.full-width {
  grid-column: 1 / -1;
}

.tax-field label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Tax Table */
.tax-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tax-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--background);
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
}

.tax-row:hover {
  background-color: hsl(220, 15%, 96%);
}

.tax-row.highlight {
  background-color: var(--secondary);
  font-weight: 500;
}

.tax-row.highlight.primary {
  background-color: var(--primary-soft);
}

.tax-label {
  font-size: 0.875rem;
  color: var(--foreground);
}

.tax-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.tax-value.negative {
  color: var(--destructive);
}

.tax-value.negative::before {
  content: '-';
}

.tax-value.large {
  font-size: 1.25rem;
  color: var(--primary);
}

.tax-value.refundable {
  color: hsl(200, 70%, 45%);
}

.tax-input {
  width: 150px;
  text-align: right;
  padding: 0.5rem 0.75rem;
}

/* Tax Declaration */
.tax-declaration {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.125rem;
  accent-color: var(--primary);
}

.checkbox-label span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.declaration-signature {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.signature-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.signature-field label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* Tax Form Footer */
.tax-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--background);
  border-top: 1px solid var(--border);
}

/* Responsive Tax Forms */
@media (max-width: 768px) {
  .tax-form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .tax-period-selector {
    width: 100%;
  }
  
  .tax-period-selector .input {
    flex: 1;
  }
  
  .tax-fields-grid {
    grid-template-columns: 1fr;
  }
  
  .tax-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .tax-input {
    width: 100%;
  }
  
  .declaration-signature {
    grid-template-columns: 1fr;
  }
  
  .tax-tabs {
    flex-direction: column;
  }
  
  .tax-tab {
    border-radius: var(--radius);
  }
  
  .tax-tab.active {
    border-bottom: none;
    margin-bottom: 0;
  }
}

@media print {
  .tax-filing-section {
    page-break-before: always;
  }
  
  .tax-tabs,
  .tax-form-footer {
    display: none !important;
  }
  
  .tax-form-container.hidden {
    display: block !important;
  }
  
  .tax-form-header {
    background: var(--foreground) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ===== MARKETPLACE STYLES ===== */

.marketplace-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.marketplace-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.marketplace-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  flex-shrink: 0;
}

.marketplace-logo .sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
}

.marketplace-search {
  flex: 1;
  max-width: 500px;
}

.marketplace-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.marketplace-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.marketplace-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.filter-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background-color: var(--accent);
}

.filter-btn.active {
  background-color: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-soft);
}

.filter-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  cursor: pointer;
}

.filter-list label:hover {
  color: var(--foreground);
}

.filter-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.marketplace-main {
  min-width: 0;
}

.marketplace-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.marketplace-results-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Shop List / Grid */
.shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.shop-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}

.shop-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.shop-card-image {
  position: relative;
  height: 132px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, hsl(152, 35%, 88%), hsl(220, 20%, 94%));
}

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

.shop-card-image-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, hsl(152, 35%, 88%), hsl(220, 20%, 94%));
}

.shop-card-logo {
  position: absolute;
  left: 0.875rem;
  bottom: -18px;
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  border: 2px solid var(--card);
  object-fit: cover;
  background: var(--card);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.shop-card-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-card-logo-fallback i {
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
}

.shop-card-content {
  padding: 1.25rem;
  padding-top: 1.5rem;
}

.shop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0;
}

.shop-card-header h3 {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--foreground);
}

.shop-card-desc {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  line-height: 1.45;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card-products {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.shop-product-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.275rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: hsl(220, 15%, 97%);
  color: var(--secondary-foreground);
  font-size: 0.72rem;
}

.shop-product-pill img {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  object-fit: cover;
}

.shop-product-pill i {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

.shop-product-pill span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.shop-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.76rem;
  color: var(--muted-foreground);
}

.shop-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.shop-card-meta i {
  width: 13px;
  height: 13px;
}

.shop-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), hsl(152, 55%, 30%));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.shop-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-info {
  flex: 1;
  min-width: 0;
}

.shop-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-name .verified-badge {
  width: 18px;
  height: 18px;
  color: hsl(200, 70%, 50%);
}

.shop-username {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.shop-card-body {
  padding: 0 1.25rem 1.25rem;
}

.shop-category {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--primary-soft);
  color: var(--primary);
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.shop-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.shop-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.shop-meta-item i {
  width: 14px;
  height: 14px;
}

.shop-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--warning);
}

.shop-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.shop-location i {
  width: 14px;
  height: 14px;
}

/* Marketplace Responsive */
@media (max-width: 1024px) {
  .marketplace-container {
    grid-template-columns: 1fr;
  }

  .marketplace-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .marketplace-sidebar .filter-section {
    flex: 1;
    min-width: 150px;
  }
}

@media (max-width: 768px) {
  .marketplace-header-inner {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .marketplace-search {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  .marketplace-container {
    padding: 1rem;
  }

  .shop-list {
    grid-template-columns: 1fr;
  }
}

/* ===== MARKETPLACE SHOP STYLES ===== */

.marketplace-shop-layout {
  align-items: start;
}

.marketplace-shop-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.marketplace-shop-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.marketplace-shop-cover {
  height: 120px;
  background: linear-gradient(135deg, hsl(152, 35%, 86%), hsl(152, 25%, 95%));
}

.marketplace-shop-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-shop-cover-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, hsl(152, 35%, 86%), hsl(152, 25%, 95%));
}

.marketplace-shop-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem 0;
}

.marketplace-shop-logo {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.marketplace-shop-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
}

.marketplace-shop-identity h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.marketplace-shop-identity p {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin: 0.125rem 0 0;
}

.marketplace-shop-description {
  padding: 0.75rem 1rem 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.marketplace-shop-meta {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.marketplace-shop-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.marketplace-shop-meta i {
  width: 13px;
  height: 13px;
}

.marketplace-shop-card {
  padding: 1rem;
}

.marketplace-shop-card h4 {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.marketplace-selected-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.marketplace-empty-selection {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.marketplace-selected-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.marketplace-selected-row span {
  color: var(--muted-foreground);
}

.marketplace-selected-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
}

.marketplace-selected-total span:last-child {
  color: var(--primary);
}

.marketplace-shop-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.marketplace-product-card {
  cursor: default;
}

.marketplace-product-card:hover {
  transform: translateY(-2px);
}

.marketplace-qty-controls {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 0.5rem;
  align-items: center;
}

.qty-btn {
  height: 36px;
  padding: 0;
}

.qty-btn i {
  width: 14px;
  height: 14px;
}

.qty-input {
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.add-to-cart-btn {
  margin-top: 0.625rem;
}

.product-media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-type-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: hsla(220, 20%, 15%, 0.85);
  color: hsl(0, 0%, 100%);
  font-size: 0.65rem;
  font-weight: 600;
}

.media-type-badge i {
  width: 12px;
  height: 12px;
}

@media (max-width: 1024px) {
  .marketplace-shop-layout {
    grid-template-columns: 1fr;
  }

  .marketplace-shop-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .marketplace-shop-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ORDER CHAT STYLES ===== */

.order-chat-title {
  flex: 1;
  min-width: 0;
}

.order-chat-title h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.order-chat-title span {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.order-chat-layout {
  align-items: start;
}

.order-chat-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-chat-card {
  padding: 1rem;
}

.order-chat-card-title {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-chat-item-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
}

.order-chat-item-name {
  color: var(--muted-foreground);
}

.order-chat-item-price {
  font-weight: 500;
  color: var(--foreground);
}

.order-chat-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.order-chat-total span:last-child {
  color: var(--primary);
}

.order-chat-note {
  border-color: var(--primary);
  background: hsla(152, 55%, 40%, 0.05);
}

.order-chat-main {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 180px);
}

.order-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: linear-gradient(180deg, hsl(152, 28%, 97%), var(--background));
}

.chat-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  max-width: 80%;
}

.chat-bubble-row.own {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-avatar i {
  width: 14px;
  height: 14px;
}

.chat-bubble {
  border-radius: 0.875rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-bubble p {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble-own {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.chat-bubble-other {
  background: var(--card);
  color: var(--foreground);
}

.chat-time {
  margin-top: 0.25rem;
  display: block;
  font-size: 0.7rem;
  color: var(--muted-foreground);
}

.chat-bubble-own .chat-time {
  color: hsla(0, 0%, 100%, 0.9);
}

.order-chat-input-area {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 0.875rem;
}

.order-chat-input-row {
  display: flex;
  gap: 0.625rem;
}

.order-chat-input-row .input {
  flex: 1;
}

@media (max-width: 1024px) {
  .order-chat-main {
    min-height: 70vh;
  }
}

@media (max-width: 768px) {
  .order-chat-title {
    order: 3;
    width: 100%;
  }

  .order-chat-main {
    min-height: 65vh;
  }

  .chat-bubble-row {
    max-width: 92%;
  }

  .chat-avatar {
    width: 28px;
    height: 28px;
  }
}

/* ===== FORGOT PASSWORD STYLES ===== */

.forgot-password-page {
  min-height: 100vh;
  background: linear-gradient(135deg, hsl(152, 45%, 95%), var(--background));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.forgot-password-container {
  width: 100%;
  max-width: 420px;
}

.forgot-password-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.forgot-password-logo .auth-logo-icon {
  margin: 0 auto 1rem;
}

.forgot-password-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.forgot-password-logo p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.forgot-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.forgot-card-header {
  padding: 1.5rem 1.5rem 0;
}

.forgot-card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.forgot-card-header p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.forgot-card-body {
  padding: 1.5rem;
}

.otp-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  transition: border-color 0.2s ease;
}

.otp-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.15);
}

.check-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.check-icon-circle i {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.forgot-back-link {
  text-align: center;
  margin-top: 1.5rem;
}

.forgot-back-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.forgot-back-link a:hover {
  text-decoration: underline;
  color: var(--foreground);
}

.forgot-back-link a i {
  width: 16px;
  height: 16px;
}

.hidden {
    display: none;
}

.tax-tab.active {
    background: #2563eb;
    color: white;
}
