/* TSENA - Styles principaux */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --primary: #2D6A4F;
  --primary-light: #40916C;
  --primary-dark: #1B4332;
  --secondary: #52B788;
  --accent: #F77F00;
  --accent-light: #FCBF49;
  --dark: #1B1B2F;
  --dark2: #2D2D44;
  --surface: #F8FAF9;
  --surface2: #EEF4F0;
  --white: #FFFFFF;
  --text: #1B1B2F;
  --text-muted: #6B7280;
  --danger: #E63946;
  --success: #2D6A4F;
  --warning: #F77F00;
  --info: #3A86FF;
  --border: #D1E8DC;
  --shadow: 0 2px 12px rgba(45,106,79,0.12);
  --shadow-lg: 0 8px 32px rgba(45,106,79,0.18);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-body: 'Nunito', sans-serif;
  --font-head: 'Space Grotesk', sans-serif;
  --nav-h: 64px;
  --bottom-h: 72px;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

/* ========== LAYOUT ========== */
.app-container {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.1);
}

@media (min-width: 900px) {
  .app-container { max-width: 100%; display: flex; }
  .sidebar { width: 260px; flex-shrink: 0; }
  .main-content { flex: 1; max-width: calc(100% - 260px); }
}

/* ========== NAVBAR ========== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: white;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}

.nav-logo-mark {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(247,127,0,0.4);
}

.nav-title { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.nav-subtitle { font-size: 0.68rem; opacity: 0.8; }

.nav-user {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}

.nav-avatar {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem;
  color: white;
}

/* ========== BOTTOM NAV (mobile) ========== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  height: var(--bottom-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; cursor: pointer;
  padding: 8px 4px;
  color: var(--text-muted);
  transition: color 0.2s;
  text-decoration: none;
}

.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item .nav-icon { font-size: 1.4rem; }
.bottom-nav-item .nav-label { font-size: 0.63rem; font-weight: 600; white-space: nowrap; }

.bottom-nav-item.active .nav-icon {
  transform: translateY(-2px);
  transition: transform 0.2s;
}

/* ========== PAGES ========== */
.page { display: none; padding-bottom: calc(var(--bottom-h) + 16px); }
.page.active { display: block; }

.page-header {
  padding: 1.2rem 1rem 0.8rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
}

.page-header h2 { color: white; margin-bottom: 4px; }
.page-header p { opacity: 0.85; font-size: 0.85rem; }

.page-body { padding: 1rem; }

/* ========== CARDS ========== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1rem;
}

.card-header {
  padding: 1rem 1.1rem 0.7rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}

.card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.card-body { padding: 1rem 1.1rem; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.75rem 1.4rem;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700; font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(45,106,79,0.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface2); color: var(--primary); border: 2px solid var(--border); }
.btn-accent { background: var(--accent); color: white; box-shadow: 0 2px 8px rgba(247,127,0,0.35); }
.btn-danger { background: var(--danger); color: white; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 0.6rem; border-radius: 8px; }

/* ========== QUANTITY SELECTOR ========== */
.qty-selector {
  display: flex; gap: 8px; align-items: center;
}

.qty-btn {
  flex: 1; padding: 0.7rem 0.3rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all 0.15s;
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
}

.qty-btn span.qty-icon { font-size: 1.1rem; }
.qty-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(45,106,79,0.35);
}

/* ========== PRODUCT ITEM ========== */
.product-item {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  margin-bottom: 0.7rem;
  background: var(--white);
  position: relative;
}

.product-item-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.6rem;
}

.product-item-name {
  font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; gap: 6px;
}

.product-item-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}

.remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--danger); font-size: 1.1rem; padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}
.remove-btn:hover { background: #fee2e2; }

/* ========== SURVEY LIST ========== */
.survey-item {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.survey-item:hover { background: var(--surface2); }
.survey-item:last-child { border-bottom: none; }

.survey-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}

.survey-info { flex: 1; min-width: 0; }
.survey-title { font-weight: 700; font-size: 0.92rem; }
.survey-meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 50px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
}
.badge-draft { background: #FEF3C7; color: #92400E; }
.badge-submitted { background: #D1FAE5; color: #065F46; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-info { background: #DBEAFE; color: #1E40AF; }

/* ========== CHARTS ========== */
.chart-container {
  position: relative; width: 100%;
  background: var(--white);
}

/* ========== STATS ========== */
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.8rem; margin-bottom: 1rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-value {
  font-family: var(--font-head);
  font-size: 1.8rem; font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem; color: var(--text-muted);
  margin-top: 6px; font-weight: 600;
}

/* ========== LOGIN ========== */
.login-screen {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.login-top {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 1.5rem 1rem;
  color: white;
}

.login-logo {
  width: 80px; height: 80px;
  background: var(--accent);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 900; font-size: 2rem; color: white;
  box-shadow: 0 8px 24px rgba(247,127,0,0.5);
  margin-bottom: 1rem;
}

.login-card {
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 2rem 1.5rem;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
}

/* ========== ALERTS ========== */
.alert {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.9rem;
}
.alert-success { background: #D1FAE5; color: #065F46; border-left: 4px solid #10B981; }
.alert-error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid #EF4444; }
.alert-warning { background: #FEF3C7; color: #92400E; border-left: 4px solid #F59E0B; }
.alert-info    { background: #DBEAFE; color: #1E40AF; border-left: 4px solid #3B82F6; }

/* ========== TABLE ========== */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  background: var(--surface2);
  padding: 0.6rem 0.8rem;
  text-align: left; font-weight: 700;
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }

/* ========== TABS ========== */
.tabs {
  display: flex; gap: 4px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1rem;
}
.tab-btn {
  flex: 1; padding: 0.6rem 0.5rem;
  border: none; border-radius: 6px;
  cursor: pointer; background: transparent;
  font-family: var(--font-body); font-weight: 700;
  font-size: 0.78rem; color: var(--text-muted);
  transition: all 0.2s;
}
.tab-btn.active {
  background: white; color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ========== PRICE TABLE ========== */
.price-row {
  display: flex; align-items: center; padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.price-row:last-child { border-bottom: none; }
.price-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-right: 10px; flex-shrink: 0;
}

.qty-bar {
  height: 6px; border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}
.qty-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.3s;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: white; border-radius: 24px 24px 0 0;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  padding: 1.5rem;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 0 auto 1.2rem;
}
.modal-title { font-size: 1.2rem; margin-bottom: 1.2rem; }

/* ========== SEARCH BAR ========== */
.search-bar {
  position: relative; margin-bottom: 1rem;
}
.search-bar input { padding-left: 2.8rem; }
.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem; pointer-events: none;
}

/* ========== LOADER ========== */
.loader {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; color: var(--text-muted);
  flex-direction: column; gap: 12px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center; padding: 2.5rem 1rem; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 0.8rem; }
.empty-state p { font-size: 0.9rem; }

/* ========== FLOAT ACTION BUTTON ========== */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-h) + 16px); right: 16px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(247,127,0,0.5);
  z-index: 90;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fab:active { transform: scale(0.93); }

/* ========== TOAST ========== */
#toast-container {
  position: fixed; bottom: calc(var(--bottom-h) + 16px); left: 50%;
  transform: translateX(-50%);
  z-index: 300; width: calc(100% - 2rem); max-width: 400px;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600;
  margin-bottom: 8px;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
}
.toast-success { background: var(--primary); color: white; }
.toast-error   { background: var(--danger); color: white; }
.toast-info    { background: var(--info); color: white; }

@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ========== SIDEBAR (desktop) ========== */
@media (min-width: 900px) {
  .bottom-nav { display: none; }
  .fab { right: calc(50% - 260px + 16px); }
  
  .sidebar {
    background: var(--dark);
    min-height: 100vh;
    padding: 0;
    position: sticky; top: 0; align-self: flex-start; height: 100vh;
    overflow-y: auto;
    color: white;
  }

  .sidebar-logo {
    padding: 1.5rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; gap: 10px;
  }

  .sidebar-nav { padding: 1rem 0.8rem; }
  
  .sidebar-item {
    display: flex; align-items: center; gap: 12px;
    padding: 0.8rem 1rem; border-radius: 10px;
    cursor: pointer; color: rgba(255,255,255,0.7);
    font-weight: 600; margin-bottom: 4px;
    transition: all 0.15s; text-decoration: none; font-size: 0.9rem;
  }

  .sidebar-item:hover { background: rgba(255,255,255,0.08); color: white; }
  .sidebar-item.active { background: var(--primary); color: white; }
  .sidebar-icon { font-size: 1.1rem; width: 20px; text-align: center; }
  
  .page { padding-bottom: 1rem; }
  .top-nav { display: none; }
  
  #toast-container { left: 50%; transform: translateX(-50%); }
}

/* ========== COLLECTOR SPECIFIC ========== */
.product-search-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: white; border: 2px solid var(--primary);
  border-top: none; border-radius: 0 0 10px 10px;
  max-height: 220px; overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-search-item {
  padding: 0.65rem 1rem;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background 0.12s; font-size: 0.9rem;
}
.product-search-item:hover { background: var(--surface2); }

.location-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.location-badge.got { border-color: var(--primary); color: var(--primary); background: #D1FAE5; }
.location-badge:active { transform: scale(0.97); }

/* ========== FILTER PANEL ========== */
.filter-bar {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 0 1rem 0.5rem; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 50px;
  background: var(--surface2); border: 2px solid var(--border);
  font-size: 0.8rem; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: all 0.15s;
  color: var(--text-muted);
}
.filter-chip.active {
  background: var(--primary); border-color: var(--primary);
  color: white;
}

/* ========== RANK INDICATOR ========== */
.rank-1 { color: #F77F00; }
.rank-2 { color: #6B7280; }
.rank-medal { font-size: 1.1rem; }

/* ========== ADMIN SPECIFIC ========== */
.admin-stat-row {
  display: flex; align-items: center;
  padding: 0.8rem 0; border-bottom: 1px solid var(--border);
  gap: 12px;
}
.admin-stat-row:last-child { border-bottom: none; }
.collector-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem; flex-shrink: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 380px) {
  :root { --nav-h: 56px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .stat-value { font-size: 1.5rem; }
}

/* ========== ANIMATIONS ========== */
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.slide-up { animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ========== SCROLL REVEAL ========== */
.page-body > * { animation: fadeIn 0.3s ease both; }
.page-body > *:nth-child(2) { animation-delay: 0.05s; }
.page-body > *:nth-child(3) { animation-delay: 0.1s; }
.page-body > *:nth-child(4) { animation-delay: 0.15s; }

/* ========== USER PROFILE BLOCK (sidebar) ========== */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.2rem;
  margin: 0.5rem 0.8rem;
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(247,127,0,0.4);
}

.sidebar-user-name {
  font-weight: 700; font-size: 0.88rem;
  color: white; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 2px;
  padding: 2px 8px; border-radius: 50px;
  display: inline-block;
}
.role-admin     { background: #E63946; color: white; }
.role-collector { background: #3A86FF; color: white; }
.role-vendor    { background: #2D6A4F; color: white; }

.sidebar-section-label {
  font-size: 0.65rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
  padding: 0.5rem 1rem 0.2rem;
}

/* ========== USER INFO IN TOP NAV (mobile) ========== */
.nav-user-inline {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem;
}

.nav-role-badge {
  padding: 2px 7px; border-radius: 50px;
  font-size: 0.62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.3px;
  background: var(--accent); color: white;
}

/* ========== EXPORT BAR ========== */
.export-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 0;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.export-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-export {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.15s;
}

.btn-export:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ========== EMAIL MODAL ========== */
.modal-lg { max-height: 85vh; }

/* ========== PDF PRINT STYLES ========== */
@media print {
  .bottom-nav, .top-nav, .sidebar, .export-bar,
  .btn, .card-header .btn, #toast-container { display: none !important; }
  body { background: white; }
  .page { display: block !important; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .page-header { background: var(--primary) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
