/* ============================================================
   VERA HERITAGE — Main Stylesheet
   Design System: Purple + Paperwhite
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  --purple-950: #1A0A35;
  --purple-900: #2D1058;
  --purple-800: #3D1878;
  --purple-700: #4A1F90;
  --purple-600: #6B35A8;
  --purple-500: #8B5BC7;
  --purple-400: #AB82DC;
  --purple-300: #C4A4E8;
  --purple-200: #DEC9F5;
  --purple-100: #EDE4F8;
  --purple-50:  #F8F4FD;

  --gold-700: #7A5A0A;
  --gold-600: #9A7220;
  --gold-500: #C9A84C;
  --gold-400: #DFC075;
  --gold-300: #EDD89E;
  --gold-100: #F8F0DC;

  --paper:   #FAF8F4;
  --paper-2: #F3EFE7;
  --paper-3: #EAE5D8;

  --ink:     #1C1225;
  --ink-700: #2E2040;
  --ink-500: #4A3D5C;
  --ink-300: #7A6E8A;
  --ink-100: #B8B0C4;

  --success: #1A7C4E;
  --warning: #C47B0A;
  --danger:  #B02A2A;
  --info:    #1A5FA8;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 4px rgba(28,18,37,.06);
  --shadow-sm: 0 2px 10px rgba(28,18,37,.09);
  --shadow-md: 0 8px 28px rgba(28,18,37,.12);
  --shadow-lg: 0 20px 56px rgba(28,18,37,.16);
  --shadow-purple: 0 8px 32px rgba(107,53,168,.28);
  --shadow-gold:   0 4px 20px rgba(201,168,76,.30);

  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(0,.6,.4,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast: 150ms var(--ease);
  --t-base: 300ms var(--ease);
  --t-slow: 600ms var(--ease);

  --nav-h: 80px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* --- Typography --- */
.serif   { font-family: var(--font-serif); }
.sans    { font-family: var(--font-sans); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.15;
  color: var(--ink);
}

.display-xl { font-size: clamp(3.5rem, 8vw, 7rem);   font-weight: 600; letter-spacing: -.02em; }
.display-lg { font-size: clamp(2.8rem, 6vw, 5.5rem); font-weight: 600; letter-spacing: -.02em; }
.display-md { font-size: clamp(2rem,   4vw, 3.5rem); font-weight: 600; }
.h1  { font-size: clamp(2rem,   3.5vw, 3rem);   font-weight: 600; }
.h2  { font-size: clamp(1.6rem, 2.5vw, 2.2rem); font-weight: 600; }
.h3  { font-size: clamp(1.2rem, 2vw,   1.6rem); font-weight: 600; }
.h4  { font-size: 1.15rem; font-weight: 600; }
.body-lg { font-size: 1.125rem; font-weight: 300; line-height: 1.75; }
.body-md { font-size: 1rem;     font-weight: 400; line-height: 1.7; }
.body-sm { font-size: .875rem;  font-weight: 400; line-height: 1.6; }
.caption { font-size: .75rem;   font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.label   { font-size: .8rem;    font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.text-purple { color: var(--purple-600); }
.text-gold   { color: var(--gold-500); }
.text-muted  { color: var(--ink-300); }
.text-white  { color: #fff; }
.text-center { text-align: center; }

/* --- Layout --- */
.container   { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-sm { width: 100%; max-width: 860px;  margin: 0 auto; padding: 0 32px; }
.container-lg { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 40px; }

.section { padding: 100px 0; }
.section-sm { padding: 64px 0; }
.section-lg { padding: 140px 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--t-base), box-shadow var(--t-base), backdrop-filter var(--t-base);
}
.nav.scrolled {
  background: rgba(250,248,244,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(28,18,37,.08);
}
.nav.dark {
  background: rgba(29,16,56,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 52px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-500);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover { color: var(--purple-600); background: var(--purple-50); }
.nav-link.active { color: var(--purple-600); }
.nav.dark .nav-link { color: rgba(255,255,255,.7); }
.nav.dark .nav-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-mobile-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.nav-mobile-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--t-base);
}
.nav.dark .nav-mobile-toggle span { background: #fff; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  transition: all var(--t-base);
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm  { padding: 8px 18px; font-size: .8rem; }
.btn-lg  { padding: 16px 32px; font-size: 1rem; }
.btn-xl  { padding: 18px 40px; font-size: 1.05rem; }

.btn-primary {
  background: var(--purple-600);
  color: #fff;
  border-color: var(--purple-600);
  box-shadow: var(--shadow-purple);
}
.btn-primary:hover {
  background: var(--purple-700);
  border-color: var(--purple-700);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(107,53,168,.38);
}
.btn-primary:active { transform: translateY(0); }

.btn-gold {
  background: var(--gold-500);
  color: var(--ink);
  border-color: var(--gold-500);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  background: var(--gold-600);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(201,168,76,.4);
}

.btn-outline {
  background: transparent;
  color: var(--purple-600);
  border-color: var(--purple-300);
}
.btn-outline:hover {
  background: var(--purple-50);
  border-color: var(--purple-600);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.8);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-500);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--paper-3);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-sm { padding: 20px 24px; border-radius: var(--radius-md); }
.card-glass {
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.7);
}
.card-purple {
  background: linear-gradient(135deg, var(--purple-800), var(--purple-600));
  color: #fff;
  border: none;
}
.card-dark {
  background: var(--ink);
  color: #fff;
  border: none;
}

/* --- Tags / Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
}
.badge-purple { background: var(--purple-100); color: var(--purple-700); }
.badge-gold   { background: var(--gold-100);   color: var(--gold-700); }
.badge-success { background: #D6F4E8; color: var(--success); }
.badge-warning { background: #FEF0CE; color: var(--warning); }
.badge-danger  { background: #FDDEDE; color: var(--danger); }
.badge-info    { background: #D6E8F8; color: var(--info); }
.badge-dot::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* --- Section headers --- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: '';
  display: block;
  width: 32px; height: 2px;
  background: var(--gold-500);
  border-radius: 2px;
}
.section-title { margin-bottom: 20px; }
.section-subtitle { color: var(--ink-300); max-width: 560px; line-height: 1.75; }
.section-header { margin-bottom: 64px; }
.section-header.center { text-align: center; }
.section-header.center .section-eyebrow { justify-content: center; }
.section-header.center .section-subtitle { margin: 0 auto; }

/* --- Divider --- */
.divider { width: 100%; height: 1px; background: var(--paper-3); }
.divider-v { width: 1px; background: var(--paper-3); align-self: stretch; }
.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gold-400);
}
.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: .4;
}

/* --- Stat blocks --- */
.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--purple-600);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat-value .unit { font-size: .5em; font-weight: 500; color: var(--gold-500); }
.stat-label { font-size: .8rem; font-weight: 500; color: var(--ink-300); letter-spacing: .04em; margin-top: 6px; }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--purple-950);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1A0A35 0%, #2D1058 40%, #3D1878 70%, #2D1058 100%);
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: .06;
  background-image:
    radial-gradient(circle at 20% 50%, #C9A84C 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, #8B5BC7 0%, transparent 50%),
    radial-gradient(circle at 60% 80%, #C9A84C 0%, transparent 40%);
}
.hero-noise {
  position: absolute;
  inset: 0;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 2; }
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  pointer-events: none;
}
.hero-glow-1 {
  top: -100px; right: -100px;
  background: radial-gradient(circle, rgba(139,91,199,.2) 0%, transparent 70%);
}
.hero-glow-2 {
  bottom: -200px; left: 20%;
  background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
}

/* --- Floating particles --- */
.particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--gold-500);
  opacity: 0;
  animation: float-particle 8s infinite;
}
@keyframes float-particle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: .6; }
  90%  { opacity: .2; }
  100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

/* --- Animated text --- */
.text-reveal { overflow: hidden; }
.text-reveal span { display: block; transform: translateY(110%); opacity: 0; }
.text-reveal.in-view span {
  animation: slide-up .9s var(--ease-out) forwards;
}
@keyframes slide-up {
  to { transform: translateY(0); opacity: 1; }
}
.char-animate .char {
  display: inline-block;
  transform: translateY(40px);
  opacity: 0;
  transition: transform .6s var(--ease-spring), opacity .6s ease;
}
.char-animate.in-view .char {
  transform: translateY(0);
  opacity: 1;
}
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.fade-up.in-view { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger > * { opacity: 0; transform: translateY(24px); }
.stagger.in-view > *:nth-child(1) { animation: fade-up-child .6s .1s var(--ease) forwards; }
.stagger.in-view > *:nth-child(2) { animation: fade-up-child .6s .2s var(--ease) forwards; }
.stagger.in-view > *:nth-child(3) { animation: fade-up-child .6s .3s var(--ease) forwards; }
.stagger.in-view > *:nth-child(4) { animation: fade-up-child .6s .4s var(--ease) forwards; }
.stagger.in-view > *:nth-child(5) { animation: fade-up-child .6s .5s var(--ease) forwards; }
.stagger.in-view > *:nth-child(6) { animation: fade-up-child .6s .6s var(--ease) forwards; }
@keyframes fade-up-child {
  to { opacity: 1; transform: translateY(0); }
}

/* Scale in */
.scale-in { opacity: 0; transform: scale(.92); }
.scale-in.in-view { animation: scale-in-anim .8s var(--ease-spring) forwards; }
@keyframes scale-in-anim { to { opacity: 1; transform: scale(1); } }

/* --- Gold accent line --- */
.gold-line {
  display: inline-block;
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  border-radius: 2px;
}

/* --- Stats bar --- */
.stats-bar {
  background: linear-gradient(135deg, var(--purple-900), var(--purple-800));
  padding: 56px 0;
  overflow: hidden;
}
.stats-bar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stats-bar-item {
  padding: 24px 32px;
  text-align: center;
  position: relative;
}
.stats-bar-item + .stats-bar-item::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,.12);
}
.stats-bar-item .stat-value { color: #fff; justify-content: center; }
.stats-bar-item .stat-value .unit { color: var(--gold-400); }
.stats-bar-item .stat-label { color: rgba(255,255,255,.5); }

/* --- Product cards --- */
.product-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--paper-3);
  transition: all var(--t-base);
  cursor: pointer;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card-visual {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}
.product-card-body { padding: 24px 28px; }
.product-card-tag {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 8px;
}
.product-card-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.product-card-desc { font-size: .875rem; color: var(--ink-300); line-height: 1.65; }
.product-card-footer {
  padding: 16px 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--paper-2);
}

/* --- Timeline --- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 10px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--purple-300), var(--gold-300));
  border-radius: 2px;
}
.timeline-item { position: relative; padding-bottom: 36px; }
.timeline-dot {
  position: absolute;
  left: -28px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--purple-600);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--purple-300);
}
.timeline-dot.gold {
  background: var(--gold-500);
  box-shadow: 0 0 0 2px var(--gold-300);
}
.timeline-dot.success {
  background: var(--success);
  box-shadow: 0 0 0 2px #A8DFC8;
}
.timeline-date { font-size: .75rem; color: var(--ink-300); font-weight: 500; margin-bottom: 4px; }
.timeline-title { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.timeline-body { font-size: .875rem; color: var(--ink-300); }

/* --- Progress bars --- */
.progress-wrap { margin-bottom: 16px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .8rem; font-weight: 500; }
.progress-track {
  height: 6px;
  background: var(--paper-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--purple-600), var(--purple-400));
  transition: width 1.2s var(--ease-out);
}
.progress-fill.gold {
  background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
}

/* --- Table --- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--paper-3); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--paper-2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-300);
  padding: 14px 20px;
  text-align: left;
  white-space: nowrap;
}
tbody td {
  padding: 14px 20px;
  font-size: .875rem;
  border-top: 1px solid var(--paper-2);
  vertical-align: middle;
}
tbody tr { transition: background var(--t-fast); }
tbody tr:hover { background: var(--purple-50); }
.td-strong { font-weight: 600; }

/* --- Forms --- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-500); margin-bottom: 6px; letter-spacing: .04em; }
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--paper);
  border: 1.5px solid var(--paper-3);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-input:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(107,53,168,.12);
  background: #fff;
}
.form-input::placeholder { color: var(--ink-100); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234A3D5C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
.form-hint { font-size: .75rem; color: var(--ink-300); margin-top: 4px; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 4px; }

/* --- Sidebar (Dashboard) --- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--paper);
}
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--ink);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--t-base);
}
.sidebar-logo {
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo img { height: 44px; width: auto; }
.sidebar-nav { padding: 20px 16px; flex: 1; }
.sidebar-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 8px 8px 6px;
  margin-top: 16px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  transition: all var(--t-fast);
  margin-bottom: 2px;
}
.sidebar-link:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); }
.sidebar-link.active { background: var(--purple-700); color: #fff; }
.sidebar-link .icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }
.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--purple-500);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}
.sidebar-user:hover { background: rgba(255,255,255,.07); }
.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-500), var(--gold-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: .8rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .7rem; color: rgba(255,255,255,.4); }

/* Dashboard main */
.dashboard-main {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.dashboard-header {
  background: #fff;
  border-bottom: 1px solid var(--paper-3);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.dashboard-content { padding: 32px; flex: 1; }
.dashboard-title { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; }
.dashboard-subtitle { font-size: .85rem; color: var(--ink-300); }

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.kpi-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  border: 1px solid var(--paper-3);
  transition: box-shadow var(--t-base);
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.kpi-icon.purple { background: var(--purple-100); }
.kpi-icon.gold   { background: var(--gold-100); }
.kpi-icon.green  { background: #D6F4E8; }
.kpi-icon.blue   { background: #D6E8F8; }
.kpi-number {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.kpi-label { font-size: .78rem; color: var(--ink-300); font-weight: 500; }
.kpi-delta {
  font-size: .75rem;
  font-weight: 600;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* --- Chatbot --- */
.chatbot-trigger {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 9000;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-purple), 0 0 0 4px rgba(107,53,168,.2);
  transition: all var(--t-base);
  animation: pulse-chat 3s ease infinite;
}
.chatbot-trigger:hover { transform: scale(1.08); }
.chatbot-trigger svg { width: 26px; height: 26px; }
@keyframes pulse-chat {
  0%, 100% { box-shadow: var(--shadow-purple), 0 0 0 4px rgba(107,53,168,.2); }
  50%       { box-shadow: var(--shadow-purple), 0 0 0 10px rgba(107,53,168,.0); }
}
.chatbot-window {
  position: fixed;
  bottom: 100px; right: 28px;
  z-index: 9000;
  width: 380px;
  max-height: 580px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(28,18,37,.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all .3s var(--ease-spring);
}
.chatbot-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}
.chatbot-head {
  background: linear-gradient(135deg, var(--purple-800), var(--purple-600));
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chatbot-head-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.chatbot-head-info .name { font-size: .9rem; font-weight: 600; color: #fff; }
.chatbot-head-info .status { font-size: .72rem; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 5px; }
.chatbot-head-info .status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; display: inline-block; }
.chatbot-head-close { margin-left: auto; background: rgba(255,255,255,.15); border: none; color: #fff; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--t-fast); }
.chatbot-head-close:hover { background: rgba(255,255,255,.28); }
.chatbot-messages { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.chat-msg { display: flex; gap: 8px; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .875rem;
  line-height: 1.55;
}
.chat-msg.bot .chat-bubble { background: var(--paper-2); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-msg.user .chat-bubble { background: var(--purple-600); color: #fff; border-bottom-right-radius: 4px; }
.chat-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--purple-600), var(--gold-500)); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.chat-typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }
.chat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-100); animation: typing 1.4s infinite; }
.chat-dot:nth-child(2) { animation-delay: .2s; }
.chat-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
.chatbot-quick { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--paper-2); }
.quick-reply {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--purple-200);
  font-size: .78rem;
  font-weight: 500;
  color: var(--purple-700);
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--purple-50);
}
.quick-reply:hover { background: var(--purple-100); border-color: var(--purple-400); }
.chatbot-input-row {
  padding: 12px 16px 16px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--paper-2);
}
.chatbot-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  background: var(--paper);
  border: 1.5px solid var(--paper-3);
  font-size: .875rem;
  transition: border-color var(--t-fast);
}
.chatbot-input:focus { border-color: var(--purple-400); background: #fff; }
.chatbot-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--purple-600);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.chatbot-send:hover { background: var(--purple-700); transform: scale(1.05); }
.chatbot-send svg { width: 16px; height: 16px; color: #fff; }

/* --- Map (Philippines) --- */
.map-container { position: relative; }
.ph-map { width: 100%; max-width: 420px; margin: 0 auto; }
.ph-map svg { width: 100%; height: auto; }
.map-region { fill: var(--purple-200); stroke: #fff; stroke-width: 1.5; transition: fill var(--t-fast), filter var(--t-fast); cursor: pointer; }
.map-region:hover { fill: var(--purple-400); filter: drop-shadow(0 4px 8px rgba(107,53,168,.3)); }
.map-region.active { fill: var(--purple-600); }
.farmer-marker {
  cursor: pointer;
  transition: all var(--t-fast);
}
.farmer-marker:hover .marker-circle { r: 12; }
.marker-circle { fill: var(--gold-500); stroke: #fff; stroke-width: 2; r: 9; transition: r var(--t-fast); }
.marker-label { font-size: 9px; font-weight: 700; fill: var(--ink); font-family: var(--font-sans); }

/* --- Supply Chain Flow --- */
.chain-flow { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 24px 0; }
.chain-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 120px;
  flex-shrink: 0;
}
.chain-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 12px;
  position: relative;
  border: 2px solid var(--paper-3);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-base);
}
.chain-icon.active { border-color: var(--purple-400); background: var(--purple-50); box-shadow: var(--shadow-purple); }
.chain-icon.done { border-color: var(--success); background: #EAF8F2; }
.chain-arrow { flex: 1; display: flex; align-items: flex-start; padding-top: 30px; min-width: 40px; }
.chain-arrow-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--purple-300), var(--gold-300));
  position: relative;
}
.chain-arrow-head {
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--gold-300);
}
.chain-label { font-size: .75rem; font-weight: 600; color: var(--ink-500); margin-bottom: 4px; }
.chain-sub { font-size: .65rem; color: var(--ink-100); }
.chain-status { font-size: .65rem; font-weight: 700; }
.chain-status.done { color: var(--success); }
.chain-status.active { color: var(--purple-600); }
.chain-status.pending { color: var(--ink-100); }

/* --- Footer --- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.6);
  padding: 80px 0 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 64px; }
.footer-brand-desc { font-size: .875rem; line-height: 1.75; margin-top: 20px; max-width: 280px; }
.footer-heading { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: .875rem; transition: color var(--t-fast); }
.footer-link:hover { color: var(--gold-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  color: rgba(255,255,255,.5);
  font-size: .85rem;
}
.footer-social a:hover { background: var(--purple-700); color: #fff; }

/* --- Loading screen --- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--purple-950);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity .6s ease, visibility .6s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo { width: 80px; animation: loader-pulse 1.5s ease infinite; }
@keyframes loader-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .7; transform: scale(.96); } }
.loader-bar { width: 180px; height: 2px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
.loader-fill { height: 100%; background: linear-gradient(90deg, var(--purple-400), var(--gold-400)); border-radius: 2px; animation: loader-sweep 1.8s ease infinite; }
@keyframes loader-sweep { 0% { width: 0; margin-left: 0; } 50% { width: 100%; margin-left: 0; } 100% { width: 0; margin-left: 100%; } }

/* --- Scroll indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.4);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  animation: bob 2s ease infinite;
}
.scroll-mouse {
  width: 22px; height: 34px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel { width: 2px; height: 6px; background: rgba(255,255,255,.5); border-radius: 2px; animation: scroll-wheel 2s ease infinite; }
@keyframes scroll-wheel { 0%,100% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }

/* --- Miscellaneous utilities --- */
.rounded { border-radius: var(--radius-md); }
.rounded-full { border-radius: var(--radius-full); }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.z-10 { z-index: 10; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.p-24 { padding: 24px; }
.p-32 { padding: 32px; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-600 { max-width: 600px; }
.max-w-800 { max-width: 800px; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.object-cover { object-fit: cover; }
.opacity-0 { opacity: 0; }
.transition-all { transition: all var(--t-base); }

/* --- Responsive --- */
@media (max-width: 1199px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}
@media (max-width: 767px) {
  :root { --nav-h: 64px; }
  .container, .container-sm, .container-lg { padding: 0 20px; }
  .section { padding: 64px 0; }
  .section-lg { padding: 80px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links, .nav-actions { display: none; }
  .nav-mobile-toggle { display: flex; }
  .chain-flow { gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .chatbot-window { width: calc(100vw - 32px); right: 16px; }
  .display-xl { font-size: 2.8rem; }
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--purple-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-400); }

/* --- Selection --- */
::selection { background: var(--purple-200); color: var(--purple-900); }

/* --- Focus ring --- */
:focus-visible { outline: 2px solid var(--purple-400); outline-offset: 3px; border-radius: 4px; }
