@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Premium Palette */
  --primary: hsl(349, 90%, 55%); /* Muted TikTok Rose */
  --primary-glow: hsla(349, 90%, 55%, 0.15);
  --secondary: hsl(174, 85%, 40%); /* Premium Teal */
  --secondary-glow: hsla(174, 85%, 40%, 0.15);
  --dark-bg: hsl(222, 25%, 10%);
  --dark-card: hsl(222, 20%, 15%);
  --dark-border: hsl(222, 15%, 22%);
  --light-bg: hsl(220, 20%, 97%);
  --light-card: hsl(0, 0%, 100%);
  --light-border: hsl(220, 15%, 90%);
  --text-dark: hsl(222, 25%, 12%);
  --text-muted: hsl(220, 10%, 46%);
  --text-light: hsl(220, 20%, 97%);
  
  --success: hsl(142, 70%, 45%);
  --warning: hsl(38, 92%, 50%); /* Gold/Orange */
  --danger: hsl(354, 70%, 54%);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--light-bg);
  color: var(--text-dark);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Beautiful custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--light-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Auth Pages Container */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(circle at 10% 20%, hsl(220, 30%, 95%) 0%, hsl(220, 20%, 97%) 90%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--light-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--light-border);
  transition: var(--transition);
}

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

.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo h1 {
  font-weight: 700;
  font-size: 28px;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.auth-logo span {
  color: var(--primary);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-top: -24px;
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-main);
  font-size: 15px;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-sm);
  outline: none;
  background-color: var(--light-bg);
  color: var(--text-dark);
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: var(--light-card);
}

.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
  margin-top: 5px;
}

.btn-file {
  border: 2px dashed var(--light-border);
  color: var(--text-muted);
  background-color: var(--light-bg);
  padding: 15px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  display: block;
  transition: var(--transition);
}

.btn-file:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-glow);
}

.file-input-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
}

.file-name-preview {
  font-size: 12px;
  color: var(--secondary);
  margin-top: 5px;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background-color: hsl(349, 90%, 50%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

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

.btn-secondary {
  background-color: var(--secondary);
  color: var(--text-light);
  box-shadow: 0 4px 12px var(--secondary-glow);
}

.btn-secondary:hover {
  background-color: hsl(174, 85%, 35%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--secondary-glow);
}

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

.btn-outline:hover {
  background-color: var(--light-bg);
  border-color: var(--text-muted);
}

.btn-danger {
  background-color: var(--danger);
  color: var(--text-light);
}

.btn-danger:hover {
  background-color: hsl(354, 70%, 45%);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-full {
  width: 100%;
}

/* Page Layout Components */
.app-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--light-bg);
}

/* Sidebar navigation for PC */
.sidebar {
  width: 260px;
  background-color: var(--light-card);
  border-right: 1px solid var(--light-border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo-container {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--primary);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  gap: 12px;
}

.nav-item a:hover {
  background-color: var(--light-bg);
  color: var(--text-dark);
}

.nav-item.active a {
  background-color: var(--primary-glow);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--light-border);
  padding-top: 20px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--light-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-dark);
  border: 2px solid var(--primary);
}

.user-info {
  overflow: hidden;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* Header Component */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 40px;
  position: relative;
  min-height: 100vh;
}

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

.header-title h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

/* Language Switcher */
.lang-selector {
  display: flex;
  background: var(--light-border);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  font-family: var(--font-main);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  color: var(--text-muted);
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--light-card);
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}

/* Premium Wholesale Banner */
.premium-banner {
  background: linear-gradient(135deg, hsl(220, 25%, 15%) 0%, hsl(222, 20%, 8%) 100%);
  border-radius: var(--radius-md);
  padding: 40px;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--dark-border);
}

.premium-banner-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.premium-banner-badge {
  background-color: var(--primary);
  color: white;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
  display: inline-block;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.premium-banner h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

.premium-banner p {
  color: hsla(0, 0%, 100%, 0.7);
  font-size: 15px;
  margin-bottom: 20px;
}

.premium-banner-decor {
  position: absolute;
  top: -20%;
  right: -5%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.premium-banner-decor-2 {
  position: absolute;
  bottom: -30%;
  right: 15%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

/* Dashboard Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.analytics-card {
  background-color: var(--light-card);
  border: 1px solid var(--light-border);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.analytics-card-title {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.analytics-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
}

.analytics-card-desc {
  font-size: 12px;
  color: var(--success);
  margin-top: 5px;
  font-weight: 500;
}

.analytics-card-desc.neutral {
  color: var(--text-muted);
}

/* Wallet Card Styling */
.wallet-card-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.wallet-visual {
  background: linear-gradient(135deg, var(--primary) 0%, hsl(349, 90%, 45%) 100%);
  border-radius: var(--radius-md);
  padding: 30px;
  color: white;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.wallet-visual::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -20px;
  right: -20px;
}

.wallet-visual-logo {
  font-weight: 700;
  font-size: 16px;
  opacity: 0.8;
}

.wallet-visual-balance {
  font-size: 32px;
  font-weight: 700;
  margin-top: 15px;
}

.wallet-visual-label {
  font-size: 12px;
  opacity: 0.7;
  text-transform: uppercase;
}

.wallet-visual-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.9;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 15px;
  margin-top: auto;
}

/* Grid layout for catalog products */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 30px;
}

.product-card {
  background-color: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

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

.product-image-wrapper {
  position: relative;
  padding-top: 80%; /* Aspect ratio */
  background-color: #f0f0f0;
  overflow: hidden;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 30px;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}

.product-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 42px;
}

.product-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.product-card-store {
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.product-card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--light-border);
  padding-top: 15px;
}

.product-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.product-card-wholesale-cost {
  font-size: 12px;
  color: var(--text-muted);
}

/* Modern Tables styling for PC */
.table-card {
  background-color: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 40px;
}

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

.table-header h3 {
  font-size: 18px;
  font-weight: 600;
}

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

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

.custom-table th {
  padding: 16px 24px;
  background-color: var(--light-bg);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--light-border);
}

.custom-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--light-border);
  font-size: 14px;
  color: var(--text-dark);
}

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

.custom-table tr:hover td {
  background-color: hsla(220, 20%, 97%, 0.5);
}

/* Status Badge Components */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 30px;
  text-transform: uppercase;
}

.badge-pending {
  background-color: hsl(38, 92%, 93%);
  color: hsl(38, 92%, 40%);
}

.badge-processing {
  background-color: hsl(200, 85%, 93%);
  color: hsl(200, 85%, 40%);
}

.badge-shipped {
  background-color: hsl(270, 85%, 93%);
  color: hsl(270, 85%, 40%);
}

.badge-completed {
  background-color: hsl(142, 70%, 90%);
  color: hsl(142, 70%, 30%);
}

.badge-danger {
  background-color: hsl(354, 70%, 90%);
  color: hsl(354, 70%, 40%);
}

/* Overlay / Modals */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

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

.modal {
  background-color: var(--light-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--light-border);
  width: 90%;
  max-width: 500px;
  overflow: hidden;
  transform: scale(0.9);
  transition: var(--transition);
}

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

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

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

/* Chat Module Layout */
.chat-window {
  display: grid;
  grid-template-columns: 280px 1fr;
  background-color: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  height: 600px !important;
  max-height: 600px !important;
  overflow: hidden !important;
  margin-bottom: 40px;
}

.chat-contacts {
  border-right: 1px solid var(--light-border);
  display: flex;
  flex-direction: column;
  background-color: var(--light-bg);
}

.chat-contacts-header {
  padding: 20px;
  border-bottom: 1px solid var(--light-border);
  background-color: var(--light-card);
}

.chat-contacts-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.contacts-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

.contact-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--light-border);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-item:hover {
  background-color: hsla(220, 20%, 97%, 0.8);
}

.contact-item.active {
  background-color: var(--primary-glow);
  border-left: 4px solid var(--primary);
}

.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--light-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dark);
}

.contact-info {
  flex: 1;
  overflow: hidden;
}

.contact-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.contact-role-tag {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.chat-area {
  display: flex !important;
  flex-direction: column !important;
  background-color: var(--light-card);
  position: relative;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.chat-area-header {
  padding: 20px;
  border-bottom: 1px solid var(--light-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-messages-container {
  padding: 24px;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px;
  background-color: hsl(220, 20%, 98%);
  height: calc(100% - 140px) !important;
  min-height: 0 !important;
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

.chat-bubble-sent {
  align-self: flex-end;
  background-color: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-bubble-received {
  align-self: flex-start;
  background-color: var(--light-card);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
}

.chat-bubble-time {
  font-size: 9px;
  margin-top: 4px;
  text-align: right;
  opacity: 0.7;
}

.chat-input-bar {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background-color: var(--light-card) !important;
  border-top: 1px solid var(--light-border) !important;
  height: 75px !important;
  padding: 0 20px !important;
  z-index: 10 !important;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--light-border);
  border-radius: 30px;
  outline: none;
  font-family: var(--font-main);
  font-size: 14px;
  transition: var(--transition);
  background-color: var(--light-bg);
}

.chat-input:focus {
  border-color: var(--primary);
  background-color: var(--light-card);
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-send:hover {
  background-color: hsl(349, 90%, 50%);
  transform: scale(1.05);
}

.chat-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-muted);
  gap: 15px;
}

.chat-placeholder-icon {
  font-size: 48px;
  opacity: 0.3;
}

/* -------------------------------------------------------------
   MOBILE-SPECIFIC LAYOUT OPTIMIZATION (THE CRITICAL REQUIREMENT)
   ------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    padding-bottom: 70px; /* Space for fixed bottom bar on mobile */
  }

  /* Hide sidebar on mobile */
  .sidebar {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 20px 16px !important;
  }

  /* Fixed Bottom Navigation Bar for Mobile (Native experience) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--light-border);
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
    flex: 1;
    height: 100%;
    transition: var(--transition);
  }

  .mobile-nav-item.active {
    color: var(--primary);
    font-weight: 600;
  }

  .mobile-nav-icon {
    font-size: 20px;
  }

  /* Headers on mobile */
  .header-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  /* Wallet styling on mobile */
  .wallet-card-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .wallet-visual {
    width: 100%;
    height: 170px;
    padding: 20px;
  }

  .wallet-visual-balance {
    font-size: 28px;
    margin-top: 10px;
  }

  /* Catalog grid on mobile */
  .catalog-grid {
    grid-template-columns: 1fr 1fr; /* Two items per row on mobile instead of full width card */
    gap: 12px;
  }

  .product-card-body {
    padding: 12px;
  }

  .product-card-title {
    font-size: 13px;
    height: 34px;
    margin-bottom: 4px;
  }

  .product-card-desc {
    display: none; /* Hide descriptions to fit UI nicely */
  }

  .product-card-store {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .product-card-price {
    font-size: 15px;
  }

  .product-card-price-row {
    padding-top: 8px;
  }

  .product-image-wrapper {
    padding-top: 100%; /* Square images on mobile */
  }

  /* Modals as bottom sheets on mobile */
  .overlay {
    align-items: flex-end;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transform: translateY(100%);
    border-bottom: none;
  }

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

  /* Table transformations for mobile (cards instead of wide tables) */
  .custom-table {
    display: block;
  }

  .custom-table thead {
    display: none; /* Hide headers */
  }

  .custom-table tbody, .custom-table tr, .custom-table td {
    display: block;
    width: 100%;
  }

  .custom-table tr {
    background-color: var(--light-card);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
  }

  .custom-table td {
    border-bottom: none;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
  }

  .custom-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: capitalize;
  }

  .table-header {
    padding: 15px;
  }

  /* Chat transformations for mobile */
  .chat-window {
    grid-template-columns: 1fr;
    height: calc(100vh - 160px); /* Fill screen space minus footer and header */
  }

  .chat-contacts {
    display: flex;
  }

  .chat-contacts.hidden-mobile {
    display: none !important;
  }

  .chat-area {
    display: none;
  }

  .chat-area.active-mobile {
    display: flex !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
  }

  .btn-back-chat {
    display: block !important;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-dark);
  }

  .premium-banner {
    padding: 24px;
    margin-bottom: 24px;
  }

  .premium-banner h3 {
    font-size: 22px;
  }

  .premium-banner p {
    font-size: 13px;
  }

  .auth-card {
    padding: 24px 20px;
  }
}

/* Helper elements hidden on PC but visible on mobile */
.mobile-bottom-nav {
  display: none;
}

.btn-back-chat {
  display: none;
}

/* GORGEOUS PREMIUM TOAST NOTIFICATION STYLES */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10000;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  min-width: 320px;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 8px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--text-dark);
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0;
}

.toast-message.active {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  font-size: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

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

.toast-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 3px;
  text-transform: capitalize;
}

/* Toast Color Variations */
.toast-success {
  border-left: 5px solid var(--success);
}
.toast-success .toast-icon {
  color: var(--success);
}
.toast-success .toast-title {
  color: var(--success);
}

.toast-danger {
  border-left: 5px solid var(--danger);
}
.toast-danger .toast-icon {
  color: var(--danger);
}
.toast-danger .toast-title {
  color: var(--danger);
}

.toast-warning {
  border-left: 5px solid var(--warning);
}
.toast-warning .toast-icon {
  color: var(--warning);
}
.toast-warning .toast-title {
  color: var(--warning);
}

.toast-info {
  border-left: 5px solid var(--secondary);
}
.toast-info .toast-icon {
  color: var(--secondary);
}
.toast-info .toast-title {
  color: var(--secondary);
}

/* Responsive adjustment for Mobile */
@media (max-width: 576px) {
  #toast-container {
    top: auto;
    bottom: 24px;
    right: 16px;
    left: 16px;
    align-items: center;
  }
  .toast-message {
    width: 100%;
    min-width: 0;
    transform: translateY(120%);
  }
  .toast-message.active {
    transform: translateY(0);
  }
}

/* Premium Ringing Bell Animations */
@keyframes ring-bell {
  0% { transform: rotate(0); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-15deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-10deg); }
  50% { transform: rotate(5deg); }
  60% { transform: rotate(-5deg); }
  70% { transform: rotate(0); }
  100% { transform: rotate(0); }
}

.bell-ring-active {
  animation: ring-bell 0.8s ease-in-out infinite;
  transform-origin: top center;
  color: var(--warning) !important;
}

