/* ===== CAMPUS CONNECT – Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Tokens --- */
:root {
  --bg-dark: #0a1628;
  --bg-dark-2: #121e33;
  --bg-dark-3: #1a2942;
  --bg-white: #ffffff;
  --bg-light: #f4f6fb;
  --bg-card: #ffffff;

  --text-primary: #0a1628;
  --text-secondary: #5a6a85;
  --text-muted: #8d99ae;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #a0b4d0;

  --accent-green: #00c853;
  --accent-green-dark: #00a844;
  --accent-green-light: #e8f9ef;
  --accent-blue: #2979ff;
  --accent-blue-light: #e8f0fe;
  --accent-red: #ff3d57;
  --accent-red-light: #fff0f2;
  --accent-orange: #ff9100;
  --accent-orange-light: #fff5e6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(10,22,40,.06);
  --shadow-md: 0 4px 12px rgba(10,22,40,.08);
  --shadow-lg: 0 8px 30px rgba(10,22,40,.12);
  --shadow-xl: 0 16px 48px rgba(10,22,40,.16);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background: var(--bg-light);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; }
input, select, textarea { font-family: var(--font); }

/* --- Screen container --- */
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeIn .35s ease;
}
.screen.active { display: flex; flex-direction: column; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.05); }
}
@keyframes checkmark {
  0%   { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* --- Top Bar / Header --- */
.top-bar {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-3) 100%);
  color: var(--text-on-dark);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.top-bar .back-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.top-bar .back-btn:hover { background: rgba(255,255,255,.2); }
.top-bar .back-btn svg { width: 20px; height: 20px; }
.top-bar h1 { font-size: 18px; font-weight: 700; flex: 1; }
.top-bar .subtitle { font-size: 12px; color: var(--text-on-dark-muted); font-weight: 400; }

/* --- Brand Logo --- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 40px; height: 40px;
  background: var(--accent-green);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--bg-dark);
  box-shadow: 0 2px 8px rgba(0,200,83,.3);
}
.brand-text { font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.brand-text span { color: var(--accent-green); }

/* --- Content Area --- */
.content { padding: 20px; flex: 1; }

/* --- Hero Section --- */
.hero-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-3) 100%);
  padding: 32px 20px 40px;
  text-align: center;
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 24px;
  background: var(--bg-light);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.hero-section h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.hero-section p { font-size: 14px; color: var(--text-on-dark-muted); }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* --- Form Elements --- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #dfe3eb;
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0,200,83,.12);
}
.form-input::placeholder { color: var(--text-muted); }

/* --- Password Toggle --- */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}
.password-toggle:hover {
  color: var(--accent-green);
  background: var(--accent-green-light);
}
.input-with-toggle {
  padding-right: 48px !important;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%238d99ae' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* --- File Upload --- */
.file-upload {
  border: 2px dashed #dfe3eb;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.file-upload:hover, .file-upload.dragover {
  border-color: var(--accent-green);
  background: var(--accent-green-light);
}
.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-upload .upload-icon {
  width: 40px; height: 40px;
  margin: 0 auto 8px;
  background: var(--accent-green-light);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}
.file-upload .upload-icon svg { width: 20px; height: 20px; color: var(--accent-green); }
.file-upload .upload-text { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.file-upload .upload-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.file-upload .preview-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  display: none;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: .2px;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,200,83,.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,200,83,.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.btn-secondary:hover { background: var(--bg-dark-2); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid #dfe3eb;
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: var(--accent-green-light);
}

.btn-danger {
  background: var(--accent-red);
  color: #fff;
}
.btn-danger:hover { background: #e6354e; }

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}
.btn-block { width: 100%; }
.btn-icon { padding: 10px; border-radius: var(--radius-full); }

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge-pending { background: var(--accent-orange-light); color: var(--accent-orange); }
.badge-approved { background: var(--accent-green-light); color: var(--accent-green-dark); }
.badge-rejected { background: var(--accent-red-light); color: var(--accent-red); }

/* --- College Cards --- */
.college-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.college-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}
.college-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.college-card .college-img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-dark-3), var(--accent-blue));
}
.college-card .college-info {
  padding: 12px;
}
.college-card .college-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}
.college-card .college-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- Business Cards --- */
.business-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 12px;
}
.business-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.business-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.business-info { flex: 1; min-width: 0; }
.business-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.business-category { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.business-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-orange);
}
.business-rating svg { width: 14px; height: 14px; fill: var(--accent-orange); }
.business-arrow { color: var(--text-muted); flex-shrink: 0; }

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card .product-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--bg-light);
  position: relative;
}
.product-card .product-img .discount-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--accent-red);
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
}
.product-card .product-details { padding: 12px; }
.product-card .product-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-price {
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-card .current-price { font-size: 16px; font-weight: 800; color: var(--accent-green-dark); }
.product-card .original-price {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* --- Product Detail --- */
.product-hero-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: var(--bg-light);
}
.product-detail-content { padding: 20px; }
.product-detail-content .product-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}
.product-detail-content .product-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.product-detail-content .price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}
.price-row .big-price { font-size: 28px; font-weight: 800; color: var(--accent-green-dark); }
.price-row .old-price { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.price-row .discount-tag {
  background: var(--accent-green-light);
  color: var(--accent-green-dark);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}
.product-description { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.bottom-action-bar {
  position: sticky;
  bottom: 0;
  background: var(--bg-white);
  padding: 14px 20px;
  display: flex;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(10,22,40,.08);
  z-index: 50;
}
.bottom-action-bar .btn { flex: 1; }

/* --- Admin Dashboard --- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card);
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-number { font-size: 24px; font-weight: 800; }
.stat-card .stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.stat-card.pending .stat-number { color: var(--accent-orange); }
.stat-card.approved .stat-number { color: var(--accent-green); }
.stat-card.rejected .stat-number { color: var(--accent-red); }

.verification-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  animation: slideUp .4s ease;
}
.verification-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.verification-avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-3));
  color: var(--text-on-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.verification-info { flex: 1; }
.verification-name { font-size: 15px; font-weight: 700; }
.verification-college { font-size: 12px; color: var(--text-muted); }
.verification-docs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.doc-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-light);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.doc-chip:hover { background: #e2e6ef; }
.doc-chip svg { width: 14px; height: 14px; }
.verification-actions { display: flex; gap: 10px; }
.verification-actions .btn { flex: 1; }

/* --- Seller Dashboard --- */
.seller-tab-bar {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.seller-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  transition: var(--transition);
}
.seller-tab.active {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-sm);
}

.seller-product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.seller-product-card:hover { box-shadow: var(--shadow-md); }
.seller-product-img {
  width: 70px; height: 70px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-light);
  flex-shrink: 0;
}
.seller-product-info { flex: 1; min-width: 0; }
.seller-product-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.seller-product-price { font-size: 14px; font-weight: 700; color: var(--accent-green-dark); margin-bottom: 4px; }
.seller-product-stock { font-size: 11px; color: var(--text-muted); }
.seller-product-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.seller-product-actions button {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-light);
  transition: var(--transition);
}
.seller-product-actions button:hover { background: #e2e6ef; }
.seller-product-actions button svg { width: 16px; height: 16px; }

/* --- Checkout --- */
.checkout-section { margin-bottom: 20px; }
.checkout-section .section-title {
  font-size: 15px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f6;
}
.checkout-item-img {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-light);
  flex-shrink: 0;
}
.checkout-item-info { flex: 1; }
.checkout-item-name { font-size: 14px; font-weight: 600; }
.checkout-item-qty { font-size: 12px; color: var(--text-muted); }
.checkout-item-price { font-size: 14px; font-weight: 700; }

.price-summary {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.price-row-checkout {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}
.price-row-checkout.total {
  border-top: 1.5px solid #eee;
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 800;
  font-size: 16px;
}
.price-row-checkout .savings { color: var(--accent-green-dark); }

.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #dfe3eb;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.payment-option.selected {
  border-color: var(--accent-green);
  background: var(--accent-green-light);
}
.payment-radio {
  width: 20px; height: 20px;
  border: 2px solid #dfe3eb;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.payment-option.selected .payment-radio {
  border-color: var(--accent-green);
}
.payment-option.selected .payment-radio::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  background: var(--accent-green);
}
.payment-label { font-size: 14px; font-weight: 600; }
.payment-sublabel { font-size: 11px; color: var(--text-muted); }

/* --- Order Confirmation --- */
.confirmation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-light) 0%, #e8f9ef 100%);
}
.success-circle {
  width: 100px; height: 100px;
  border-radius: var(--radius-full);
  background: var(--accent-green);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  animation: scaleIn .4s ease, pulse 2s ease 1.5s infinite;
  box-shadow: 0 8px 30px rgba(0,200,83,.25);
}
.success-circle svg { width: 48px; height: 48px; color: #fff; }
.confirmation-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.confirmation-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.order-detail-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 350px;
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
  animation: slideUp .5s ease .2s both;
}
.order-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.order-detail-row .label { color: var(--text-muted); }
.order-detail-row .value { font-weight: 600; }

/* --- Tab Nav (bottom) --- */
.bottom-nav {
  display: none; /* shown where needed */
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(10,22,40,.06);
  z-index: 100;
}
.bottom-nav-items {
  display: flex;
  justify-content: space-around;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  transition: var(--transition);
}
.bottom-nav-item.active { color: var(--accent-green); }
.bottom-nav-item svg { width: 22px; height: 22px; }
.cart-icon-wrap { position: relative; display: inline-flex; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent-red);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  opacity: 0;
  transition: .3s ease;
  box-shadow: var(--shadow-xl);
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e6ef;
}

/* --- Search Bar --- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.search-bar svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 64px; height: 64px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 13px; }

/* --- Auth form (login) --- */
.auth-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.auth-header {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-3) 100%);
  padding: 48px 20px 56px;
  text-align: center;
  color: var(--text-on-dark);
  position: relative;
}
.auth-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 28px;
  background: var(--bg-light);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.auth-body { padding: 20px; flex: 1; margin-top: -8px; }

/* --- Responsive --- */
@media (min-width: 600px) {
  .college-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .screen.active { max-width: 480px; margin: 0 auto; box-shadow: var(--shadow-xl); }
  .college-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Quantity Selector --- */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-light);
  border-radius: var(--radius-full);
  padding: 2px;
}
.qty-selector button {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.qty-selector button:hover { background: #eee; }
.qty-selector .qty-val {
  min-width: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* Add Product Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,.5);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .2s ease;
}
.modal-overlay.show { display: flex; }
.modal-sheet {
  background: var(--bg-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px;
  animation: slideUp .3s ease;
}
.modal-handle {
  width: 40px; height: 4px;
  background: #dfe3eb;
  border-radius: 2px;
  margin: 0 auto 16px;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* --- Section heading --- */
.section-heading {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading .see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-green);
  cursor: pointer;
}

/* --- Filter chips --- */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1.5px solid #e2e6ef;
  cursor: pointer;
  transition: var(--transition);
}
.filter-chip.active {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-color: var(--bg-dark);
}
.filter-chip:hover:not(.active) { border-color: var(--accent-green); }

/* Links */
.link-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-green);
  cursor: pointer;
}
.link-text:hover { text-decoration: underline; }

/* Registration nav links */
.auth-footer {
  text-align: center;
  padding: 16px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-footer a, .auth-footer span.link-text {
  color: var(--accent-green);
  font-weight: 600;
  cursor: pointer;
}

/* --- Profile Section --- */
.profile-header {
  text-align: center;
  padding: 24px 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-3));
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  color: #fff;
  border: 4px solid var(--bg-white);
  box-shadow: var(--shadow-md);
  position: relative;
}
.profile-avatar .edit-badge {
  position: absolute;
  bottom: 0; right: 0;
  width: 32px; height: 32px;
  background: var(--accent-green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--bg-white);
  color: #fff;
}
.profile-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.profile-email { font-size: 13px; color: var(--text-muted); }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.stat-card-v2 {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-v2-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.stat-v2-value { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.stat-v2-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* --- Settings List --- */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}
.settings-item:hover { background: var(--bg-light); }
.settings-info { flex: 1; }
.settings-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.settings-hint { font-size: 11px; color: var(--text-muted); }

/* --- Simple Chart --- */
.chart-container {
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  color: #fff;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100px;
  gap: 8px;
}
.chart-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.chart-bar {
  width: 100%;
  background: var(--accent-green);
  border-radius: 4px 4px 0 0;
  transition: height 1s ease-out;
}
.chart-label { font-size: 9px; color: var(--text-on-dark-muted); }

/* ===========================
   LUXURY ADDITIONS
   =========================== */

/* Skeleton shimmer */
@keyframes shimmer {
  0%   { background-position: -400% 0; }
  100% { background-position:  400% 0; }
}
.skeleton {
  background: linear-gradient(90deg,#edf0f7 25%,#e0e4ef 50%,#edf0f7 75%);
  background-size: 400% 100%;
  animation: shimmer 1.6s infinite ease-in-out;
  border-radius: var(--radius-md);
}

/* Ripple on button click */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transform: translate(-50%,-50%) scale(0);
  animation: ripple-anim .55s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: translate(-50%,-50%) scale(6); opacity: 0; }
}

/* Wishlist heart button */
.wish-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  transition: var(--transition);
  z-index: 5;
}
.wish-btn:hover { transform: scale(1.15); background: #fff0f2; }
.wish-btn svg { width: 17px; height: 17px; transition: var(--transition); stroke: var(--accent-red); }
.wish-btn.liked svg { fill: var(--accent-red); }
.wish-btn.liked { background: #fff0f2; }

/* Product labels (Hot / New) */
.product-label {
  position: absolute;
  bottom: 8px; left: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  z-index: 5;
  line-height: 1.4;
}
.label-hot  { background: linear-gradient(135deg,#ff6b35,#ff3d57); color:#fff; }
.label-new  { background: linear-gradient(135deg,#2979ff,#651fff); color:#fff; }

/* Cart qty controls in checkout */
.cart-qty-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-light);
  border-radius: var(--radius-full);
  padding: 2px;
  margin-top: 4px;
  width: fit-content;
}
.cqb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-card);
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  color: var(--text-primary);
  line-height: 1;
}
.cqb:hover { color: var(--accent-green); background: var(--accent-green-light); }
.cqn { font-size: 13px; font-weight: 700; min-width: 26px; text-align: center; }

/* Qty selector on product detail */
.detail-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.detail-qty-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.detail-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-light);
  border-radius: var(--radius-full);
  padding: 4px 8px;
}
.dqb {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  color: var(--text-primary);
}
.dqb:hover { color: var(--accent-green); }
#detail-qty { font-size: 18px; font-weight: 800; min-width: 24px; text-align: center; }

/* Buyer order history */
.order-hist-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.order-hist-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.order-hist-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-green-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.order-hist-info { flex: 1; min-width: 0; }
.order-hist-id { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.order-hist-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.order-hist-right { text-align: right; flex-shrink: 0; }
.order-hist-amt { font-size: 16px; font-weight: 800; color: var(--accent-green-dark); }

/* Confetti particles */
@keyframes confetti-fall {
  0%   { transform: translateY(-40px) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg) scale(.4); opacity: 0; }
}
.cc-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall linear forwards;
}

/* Search screen */
.search-results-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Wishlist screen */
.wishlist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
}
.wishlist-empty svg { width: 64px; height: 64px; opacity: .3; margin-bottom: 12px; }
.wishlist-empty h3 { font-size: 18px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.wishlist-empty p { font-size: 13px; color: var(--text-muted); }

/* Seller store banner on product list */
.store-banner {
  background: linear-gradient(135deg,var(--bg-dark) 0%,var(--bg-dark-3) 100%);
  padding: 14px 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.store-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 50%,rgba(0,200,83,.14) 0%,transparent 70%);
  pointer-events: none;
}
.store-banner-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  position: relative; z-index: 1;
  border: 1.5px solid rgba(255,255,255,.2);
}
.store-banner-info { position: relative; z-index: 1; flex: 1; }
.store-banner-name { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.store-banner-meta { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }
.store-banner-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  color: #ffd600;
  margin-top: 5px;
}

/* ===========================
   CHAT
   =========================== */

/* Make the chat screen a fixed viewport — prevents keyboard push */
#screen-chat {
  height: 100dvh;       /* dynamic viewport height — shrinks when keyboard opens */
  height: 100vh;        /* fallback for browsers without dvh */
  overflow: hidden;
}
#screen-chat .chat-messages {
  min-height: 0;        /* allows flex child to shrink below content size */
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-light);
}
.chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  animation: fadeIn .2s ease;
}
.chat-bubble.sent {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.chat-bubble.received {
  background: var(--bg-card);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}
.chat-bubble.system {
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  align-self: center;
  text-align: center;
  padding: 4px 12px;
  max-width: 90%;
}
.chat-time {
  font-size: 10px;
  opacity: .65;
  margin-top: 3px;
  display: block;
  text-align: right;
}
.chat-bubble.received .chat-time { text-align: left; }
.chat-date-sep {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-date-sep::before, .chat-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dfe3eb;
}
.chat-input-bar {
  padding: 10px 14px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -2px 12px rgba(10,22,40,.06);
  border-top: 1px solid #f0f2f6;
}
.chat-text-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid #dfe3eb;
  border-radius: var(--radius-full);
  font-size: 14px;
  outline: none;
  background: var(--bg-light);
  font-family: var(--font);
  transition: var(--transition);
}
.chat-text-input:focus { border-color: var(--accent-green); background: #fff; }
.chat-send-btn {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,200,83,.3);
}
.chat-send-btn:hover { transform: scale(1.08); }
.chat-send-btn svg { width: 18px; height: 18px; }
.chat-closed-bar {
  padding: 10px 20px;
  background: var(--accent-green-light);
  text-align: center;
  font-size: 13px;
  color: var(--accent-green-dark);
  font-weight: 600;
  border-top: 1px solid #c8f0d8;
}
.chat-order-info-bar {
  padding: 10px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid #f0f2f6;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-order-info-bar .order-mini-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-green-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.chat-order-info-bar .order-mini-text { font-size: 12px; color: var(--text-muted); flex: 1; }
.chat-order-info-bar .order-mini-text strong { color: var(--text-primary); font-size: 13px; }
.deliver-bar {
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid #f0f2f6;
}

/* Chat bubble in order confirm */
.chat-cta-card {
  background: linear-gradient(135deg,#e8f9ef,#f0f7ff);
  border: 1.5px solid #c8f0d8;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 350px;
  cursor: pointer;
  transition: var(--transition);
}
.chat-cta-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.chat-cta-icon {
  width: 44px; height: 44px;
  background: var(--accent-green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-cta-info h4 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.chat-cta-info p { font-size: 12px; color: var(--text-muted); }
