@font-face {
  font-family: 'AlviNastaleeq';
  src: url('../../css/alvi_nastaleeq_regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* --- GENERAL ROOT & THEME VARIABLES --- */
:root {
  --primary: #005DA7;
  --accent: #2EAD33;
  --navy: #0A2E5C;
  --bg-app: #F5F7FA;
  --card-bg: #FFFFFF;
  --text-primary: #1A202C;
  --text-secondary: #64748B;
  --success: #16A34A;
  --danger: #DC2626;
  --warning: #F59E0B;
  --border-color: #E2E8F0;
  
  --poppins: 'Poppins', 'AlviNastaleeq', 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --inter: 'Inter', 'AlviNastaleeq', 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', system-ui, -apple-system, sans-serif;
  
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 70px;
  --header-height: 70px;
  --border-radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --transition: all 0.25s ease;
}

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

body {
  font-family: var(--inter);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--poppins);
  font-weight: 600;
  color: var(--navy);
}

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

/* --- UTILITIES --- */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-secondary { color: var(--text-secondary); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-grey { background-color: #E2E8F0; color: #4A5568; }
.badge-blue { background-color: #EBF8FF; color: var(--primary); }
.badge-gold { background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%); color: #92400E; border: 1px solid #FCD34D; box-shadow: 0 1px 3px rgba(180, 83, 9, 0.1); }
.badge-green { background-color: #DEF7EC; color: #03543F; }
.badge-red { background-color: #FDE8E8; color: #9B1C1C; }

/* --- LOGIN PAGE STYLES --- */
.login-body {
  background: linear-gradient(135deg, var(--navy) 0%, var(--primary) 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-logo {
  height: 60px;
  object-fit: contain;
}

.login-title {
  font-size: 1.5rem;
  text-align: center;
  color: var(--navy);
  margin-bottom: 6px;
  font-weight: 700;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 28px;
}

.login-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  margin-top: 20px;
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--inter);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background-color: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 93, 167, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
  font-size: 0.925rem;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--inter);
}

/* Button & Action Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-family: var(--inter);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}

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

.btn-primary:hover {
  background-color: #004D8C;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #E2E8F0;
  color: #334155;
}

.btn-secondary:hover {
  background-color: #CBD5E1;
}

.btn-accent {
  background-color: var(--accent);
  color: #FFFFFF;
}

.btn-accent:hover {
  background-color: #248D28;
}

.btn-danger {
  background-color: var(--danger);
  color: #FFFFFF;
}

.btn-danger:hover {
  background-color: #B91C1C;
}

.btn-warning {
  background-color: var(--warning);
  color: #FFFFFF;
}

.btn-warning:hover {
  background-color: #D97706;
}

.btn-block {
  width: 100%;
  display: flex;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* Spinner & Button loading state */
.btn-loading-container {
  position: relative;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.spinner-dark {
  border-color: rgba(10,46,92,0.2);
  border-top-color: var(--navy);
}

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

/* Alert Boxes */
.alert-box {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-danger {
  background-color: #FDE8E8;
  color: #9B1C1C;
  border: 1px solid #F8B4B4;
}

.alert-success {
  background-color: #DEF7EC;
  color: #03543F;
  border: 1px solid #84E1BC;
}

.demo-bypass-card {
  margin-top: 24px;
  background-color: #F0F9FF;
  border: 1px dashed #7DD3FC;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.demo-bypass-card h4 {
  font-size: 0.8125rem;
  color: #0369A1;
  margin-bottom: 4px;
}

.demo-bypass-card p {
  font-size: 0.75rem;
  color: #0284C7;
}

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

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--navy);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  height: 36px;
  width: 36px;
  border-radius: 6px;
  background-color: white;
  padding: 2px;
  object-fit: contain;
}

.sidebar-title {
  font-family: var(--poppins);
  font-weight: 700;
  font-size: 1rem;
  color: #FFFFFF;
  white-space: nowrap;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 0;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-item {
  margin: 4px 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-link i {
  font-size: 1.125rem;
  width: 24px;
  display: flex;
  justify-content: center;
  margin-right: 12px;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.sidebar-item.active .sidebar-link {
  background: linear-gradient(135deg, var(--primary) 0%, #00457c 100%);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 93, 167, 0.35);
  position: relative;
}

.sidebar-item.active .sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background-color: var(--accent);
  border-radius: 0 4px 4px 0;
}

/* Sidebar Footer (User Info) */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #072245;
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-details {
  flex-grow: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Main Panel Layout */
.main-panel {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* Header Styles */
.header {
  height: var(--header-height);
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-title-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--navy);
  display: none; /* Block on tablet/mobile */
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}

.sidebar-toggle-btn:hover {
  background-color: #F1F5F9;
}

.header-search {
  max-width: 320px;
  position: relative;
}

.header-search input {
  padding-left: 36px;
  font-size: 0.875rem;
}

.header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

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

.header-badge-live {
  background-color: #DEF7EC;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 50px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(46, 173, 51, 0.4);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 173, 51, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(46, 173, 51, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 173, 51, 0);
  }
}

/* Content Area Layout */
.content-area {
  padding: 24px;
  flex-grow: 1;
}

/* Breadcrumbs navigation style */
.breadcrumb-wrap {
  margin-bottom: 20px;
}

.breadcrumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.breadcrumb-item {
  color: var(--text-secondary);
}

.breadcrumb-item a {
  color: var(--primary);
  font-weight: 600;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Section Containers for Pages */
.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

/* Screen Title and Subtitle */
.screen-title-bar {
  margin-bottom: 24px;
}

.screen-title {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.screen-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* --- CARDS & GRID LAYOUTS --- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

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

/* Stats Cards */
.stat-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 93, 167, 0.2);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-trend-up { color: var(--accent); }
.stat-trend-down { color: var(--danger); }

.stat-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(0, 93, 167, 0.08);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon-green {
  background-color: rgba(46, 173, 51, 0.08);
  color: var(--accent);
}

.stat-icon-warning {
  background-color: rgba(245, 158, 11, 0.08);
  color: var(--warning);
}

/* Main Dashboard Charts */
.chart-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  min-height: 320px;
}

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

/* Card General Wrapper */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 24px;
  transition: box-shadow 0.25s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02);
}

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

.card-title {
  font-size: 1.125rem;
  color: var(--navy);
}

/* --- TABLES & DATA GRIIDS --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th {
  background-color: #F8FAFC;
  color: var(--navy);
  font-family: var(--poppins);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-color);
  white-space: normal !important;
  line-height: 1.25 !important;
  word-wrap: break-word !important;
  font-size: 0.78rem !important;
  text-overflow: clip !important;
  overflow: visible !important;
}

.data-table td .input-inline-prod-price,
.data-table td .input-inline-prod-prev-price,
.price-cell, .model-price, .price-badge {
  white-space: nowrap !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:nth-child(even) {
  background-color: #F8FAFC;
}

.data-table tbody tr:hover {
  background-color: rgba(0, 93, 167, 0.02);
}

/* Action items inside a table cell */
.actions-cell {
  display: flex;
  gap: 8px;
}

.btn-action {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.btn-action-edit:hover {
  background-color: #EBF8FF;
  color: var(--primary);
}

.btn-action-delete:hover {
  background-color: #FDE8E8;
  color: var(--danger);
}

.btn-action-nav:hover {
  background-color: rgba(46, 173, 51, 0.1);
  color: var(--accent);
}

/* --- COMPONENT STYLES --- */

/* Horizontal Scrolling Category Tabs */
.tabs-scroll-container {
  display: flex;
  overflow-x: auto;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: thin;
}

.tab-btn {
  background-color: #E2E8F0;
  color: #475569;
  border: none;
  border-radius: 50px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn:hover {
  background-color: #CBD5E1;
}

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

/* Filters & Search Bars inside sections */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-left, .filter-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Pagination Control Panel */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

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

/* Toast Notifications Container */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  width: 100%;
}

.toast {
  background-color: #FFFFFF;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 4px solid var(--primary);
  transform: translateX(120%);
  animation: slideIn 0.3s forwards ease-out;
}

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

.toast-icon {
  font-size: 1.25rem;
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--navy);
  margin-bottom: 2px;
}

.toast-body {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

/* --- MODAL WINDOWS --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 46, 92, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.modal-overlay.open .modal-container {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 1.125rem;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.modal-close:hover {
  background-color: #E2E8F0;
  color: var(--navy);
}

.modal-body {
  padding: 24px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

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

/* --- ADAPTIVE PRICE INPUTS (Update Prices Screen) --- */
.price-input-cell {
  position: relative;
  display: flex;
  align-items: center;
}

.price-input-currency {
  position: absolute;
  left: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.price-input {
  padding-left: 28px;
  font-weight: 600;
}

.price-input-changed {
  background-color: #DEF7EC !important;
  border-color: #84E1BC !important;
  color: #03543F !important;
}

/* --- RESPONSIVENESS AND COLLAPSIBILITY --- */

/* Sidebar Collapse on Tablet/Desktop Toggle */
body.sidebar-collapsed .sidebar {
  width: var(--sidebar-width-collapsed);
}

body.sidebar-collapsed .sidebar-title {
  display: none;
}

body.sidebar-collapsed .sidebar-link span {
  display: none;
}

body.sidebar-collapsed .sidebar-footer {
  padding: 12px 0;
  display: flex;
  justify-content: center;
}

body.sidebar-collapsed .user-profile-widget {
  justify-content: center;
}

body.sidebar-collapsed .user-details {
  display: none;
}

body.sidebar-collapsed .main-panel {
  margin-left: var(--sidebar-width-collapsed);
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2-1 {
    grid-template-columns: 1fr;
  }
}

/* Mobile & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
  --sidebar-width: 260px;
  
  .sidebar {
    left: calc(-1 * var(--sidebar-width));
  }
  
  body.sidebar-open .sidebar {
    left: 0;
  }
  
  .main-panel {
    margin-left: 0 !important;
  }
  
  .sidebar-toggle-btn {
    display: block;
  }
  
  /* Overlay to tap and close sidebar on mobile */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.4);
    z-index: 95;
  }
  
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-left, .filter-right {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Custom Emoji / Color helper selectors */
.emoji-picker-input {
  font-size: 1.25rem;
  width: 50px;
  text-align: center;
}

/* Mandi Price Change indicators */
.price-change-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.price-change-pill.up {
  background-color: #DEF7EC;
  color: #03543F;
}

.price-change-pill.down {
  background-color: #FDE8E8;
  color: #9B1C1C;
}

.price-change-pill.neutral {
  background-color: #F1F5F9;
  color: #475569;
}
