/* ============================================================
   RecyclePoints — main stylesheet
   Palette: forest green / leaf / marigold gold / mint / ink
   Type:    Bricolage Grotesque (display) + Inter (body)
   ============================================================ */

:root {
  --forest:   #0A3A2A;
  --forest-2: #0E4A36;
  --leaf:     #2FB463;
  --gold:     #FFB020;
  --gold-2:   #E69A00;
  --mint:     #ECF5EE;
  --ink:      #12251C;
  --grey:     #5B6B62;
  --line:     #DCE8DF;
  --paper:    #FFFFFF;
  --red:      #D64545;
  --radius:   14px;
  --shadow:   0 10px 30px rgba(10, 58, 42, .10);
  --display:  'Bricolage Grotesque', system-ui, sans-serif;
  --body:     'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem);  font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

.container { width: min(1120px, 92%); margin: 0 auto; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--leaf);
  margin-bottom: .9rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .72rem 1.4rem;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.02rem; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 18px rgba(255,176,32,.35); }
.btn-gold:hover { background: var(--gold-2); }
.btn-green { background: var(--forest); color: #fff; }
.btn-green:hover { background: var(--forest-2); }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-outline { border-color: var(--forest); color: var(--forest); }
.btn-outline:hover { background: var(--mint); }
.btn-sm { padding: .38rem .9rem; font-size: .82rem; }
.btn-danger { background: var(--red); color: #fff; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: .9rem 0;
  transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
}
.nav.scrolled {
  background: rgba(10, 58, 42, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
  padding: .55rem 0;
}
.nav-inner {
  width: min(1120px, 92%); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--display);
  font-weight: 800; font-size: 1.25rem; color: #fff;
}
.logo span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: #fff; font-weight: 500; font-size: .95rem; opacity: .92; }
.nav-links a:hover { opacity: 1; }

.hamburger {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  z-index: 60;
}
.hamburger span {
  width: 26px; height: 3px; border-radius: 2px;
  background: #fff;
  transition: transform .3s ease, opacity .3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ============================================================
   HERO — bg image with overlay
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 7rem 0 5rem;
  background:
    linear-gradient(160deg, rgba(7,42,30,.93) 0%, rgba(10,58,42,.82) 45%, rgba(7,32,23,.9) 100%),
    url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?auto=format&fit=crop&w=1800&q=70')
    center / cover no-repeat fixed;
  color: #fff;
}
.hero-content { width: min(1120px, 92%); margin: 0 auto; max-width: 760px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-sub { font-size: 1.15rem; opacity: .92; margin: 1.3rem 0 2.1rem; max-width: 560px; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }
.hero-chips { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 2.6rem; }
.chip {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: .45rem 1.05rem;
  font-size: .88rem;
}
.chip strong { color: var(--gold); margin-right: .3rem; }

/* ============================================================
   PRICE TICKER (signature element)
   ============================================================ */
.ticker {
  background: var(--ink);
  overflow: hidden;
  padding: .85rem 0;
  border-top: 3px solid var(--gold);
}
.ticker-track {
  display: inline-flex; gap: 2.8rem;
  white-space: nowrap;
  animation: ticker 38s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick { color: #C9DCCF; font-size: .92rem; display: inline-flex; align-items: center; gap: .45rem; }
.tick strong { color: var(--gold); margin-left: .2rem; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 5.5rem 0; }
.section-mint { background: var(--mint); }
.section-sub { color: var(--grey); max-width: 560px; margin-top: .8rem; }

.steps {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 3rem;
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--forest); color: var(--gold);
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  display: grid; place-items: center;
  margin-bottom: 1.1rem;
}
.step p { color: var(--grey); font-size: .93rem; margin-top: .5rem; }

.price-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 2.8rem;
}
.price-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.7rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.price-card:hover { transform: translateY(-5px) scale(1.01); }
.price-icon { font-size: 2.1rem; margin-bottom: .7rem; }
.price-tag {
  font-family: var(--display); font-weight: 800;
  font-size: 1.45rem; color: var(--forest);
  margin-top: .5rem;
}
.price-tag span { font-size: .85rem; color: var(--grey); font-weight: 600; }

/* Impact — second photo band */
.section-photo {
  background:
    linear-gradient(120deg, rgba(10,58,42,.92), rgba(10,58,42,.72)),
    url('https://images.unsplash.com/photo-1611284446314-60a58ac0deb9?auto=format&fit=crop&w=1600&q=70')
    center / cover no-repeat;
}
.impact-card { max-width: 640px; color: #fff; }
.impact-card p { opacity: .92; margin: 1rem 0 1.8rem; }
.impact-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-bottom: 2.2rem; }
.impact-stats strong {
  display: block;
  font-family: var(--display); font-size: 1.9rem; font-weight: 800;
  color: var(--gold);
}
.impact-stats span { font-size: .84rem; opacity: .85; }

.cta-band { background: var(--forest); color: #fff; text-align: center; padding: 4.5rem 0; }
.cta-band p { opacity: .9; margin: .8rem 0 1.8rem; }

.footer { background: var(--ink); color: #AFC4B6; padding: 3rem 0; }
.footer-inner { display: grid; gap: .5rem; }
.footer .muted { font-size: .82rem; opacity: .6; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
}

/* ============================================================
   AUTH + APP PAGES
   ============================================================ */
.auth-body {
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 2rem 1rem;
  background:
    linear-gradient(150deg, rgba(7,42,30,.94), rgba(10,58,42,.86)),
    url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?auto=format&fit=crop&w=1600&q=60')
    center / cover no-repeat;
}
.auth-card {
  background: var(--paper);
  width: min(440px, 100%);
  border-radius: 18px;
  padding: 2.4rem 2.1rem;
  box-shadow: 0 25px 60px rgba(0,0,0,.35);
}
.auth-card .logo { color: var(--forest); display: inline-block; margin-bottom: 1.2rem; }
.auth-card .logo span { color: var(--gold-2); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.auth-card .sub { color: var(--grey); font-size: .92rem; margin-bottom: 1.4rem; }
.auth-foot { margin-top: 1.3rem; font-size: .9rem; color: var(--grey); text-align: center; }
.auth-foot a { color: var(--forest); font-weight: 600; }

.field { margin-bottom: 1.05rem; }
.field label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .72rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47,180,99,.18);
}
.field .hint { font-size: .78rem; color: var(--grey); margin-top: .3rem; }

.flash { padding: .8rem 1rem; border-radius: 10px; font-size: .9rem; margin-bottom: 1rem; }
.flash-success { background: #E4F6EA; color: #14683A; border: 1px solid #BEE7CC; }
.flash-error   { background: #FBE9E9; color: #92312F; border: 1px solid #F1C7C6; }
.flash-info    { background: #EAF1FB; color: #2B4E82; border: 1px solid #C9DBF3; }

/* ============================================================
   PRELOADER — shown on every page (user + admin) until load
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 1rem;
  background: var(--forest);
  transition: opacity .35s ease, visibility .35s ease;
}
.preloader .spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.25);
  border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
.preloader .preloader-label { color: #fff; font-size: .85rem; letter-spacing: .05em; opacity: .85; }
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ICONS — inline SVG helper (includes/icons.php); no emoji anywhere
   ============================================================ */
.icon { display: inline-block; vertical-align: -4px; color: currentColor; }
.icon-lg { width: 32px; height: 32px; vertical-align: -8px; }
.icon-xl { width: 48px; height: 48px; }

/* ============================================================
   APP SHELL — sidebar layout used by the user app + admin app
   ============================================================ */
.app-body { background: #F4F8F5; min-height: 100svh; }
.app-shell { display: flex; min-height: 100svh; }

.sidebar {
  width: 264px; flex-shrink: 0;
  background: var(--forest);
  color: #fff;
  display: flex; flex-direction: column;
  padding: 1.4rem 1.1rem;
  position: fixed; inset: 0 auto 0 0; z-index: 70;
  overflow-y: auto;
  transition: transform .3s ease;
}
.sidebar-logo { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: #fff; padding: .4rem .6rem 1.4rem; display: flex; align-items: center; gap: .5rem; }
.sidebar-logo span { color: var(--gold); }
.sidebar-role { margin: 0 .6rem 1rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.55); }
.sidebar-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .68rem .8rem; border-radius: 10px;
  color: rgba(255,255,255,.82); font-weight: 500; font-size: .93rem;
  transition: background .16s ease, color .16s ease;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-nav a.active .icon { color: var(--gold); }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.14); margin-top: .8rem; padding-top: .8rem; }
.sidebar-foot a {
  display: flex; align-items: center; gap: .7rem;
  padding: .68rem .8rem; border-radius: 10px;
  color: rgba(255,255,255,.82); font-weight: 500; font-size: .93rem;
}
.sidebar-foot a:hover { background: rgba(255,255,255,.08); color: #fff; }

.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 65;
  background: rgba(7,20,14,.55);
}

.app-content { flex: 1; min-width: 0; margin-left: 264px; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem min(4%, 2rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--forest); flex: 1; }
.topbar-user { display: flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--grey); font-weight: 600; }
.topbar .hamburger { display: none; }

.app-main { width: min(1120px, 94%); margin: 0 auto; padding: 2.2rem 0 4rem; flex: 1; width: 100%; max-width: 1120px; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.6rem; }
.page-head h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); display: flex; align-items: center; gap: .55rem; }

/* ============================================================
   PIPELINE STEPPER / TIMELINE — the transparent process view
   ============================================================ */
.stepper { display: flex; flex-wrap: wrap; gap: 0; margin: 1rem 0 1.6rem; }
.stepper .step-item {
  flex: 1; min-width: 110px; text-align: center; position: relative;
  padding: 0 .4rem;
}
.stepper .step-item::before {
  content: ''; position: absolute; top: 19px; left: -50%; width: 100%; height: 2px;
  background: var(--line); z-index: 0;
}
.stepper .step-item:first-child::before { display: none; }
.stepper .step-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line); color: var(--grey);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .5rem; position: relative; z-index: 1;
}
.stepper .step-item.done .step-circle { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.stepper .step-item.done::before { background: var(--leaf); }
.stepper .step-item.current .step-circle { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 0 0 0 4px rgba(255,176,32,.25); }
.stepper .step-label { font-size: .74rem; font-weight: 700; color: var(--ink); }
.stepper .step-item:not(.done):not(.current) .step-label { color: var(--grey); font-weight: 500; }
.stepper.stepper-cancelled .step-circle { background: #FBE9E9 !important; border-color: var(--red) !important; color: var(--red) !important; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex; gap: .8rem; padding: 0 0 1.2rem 0; position: relative;
}
.timeline li::before {
  content: ''; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline .t-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--mint); color: var(--leaf);
  display: flex; align-items: center; justify-content: center;
}
.timeline .t-body strong { display: block; font-size: .92rem; }
.timeline .t-body span { font-size: .78rem; color: var(--grey); }

.cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 2rem; }
.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.card .label { font-size: .8rem; font-weight: 600; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; }
.card .value { font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--forest); margin-top: .3rem; }
.card.gold  .value { color: var(--gold-2); }

.panel { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; margin-bottom: 1.6rem; }
.panel h2 { font-size: 1.2rem; margin-bottom: 1rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 620px; }
th, td { text-align: left; padding: .75rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grey); }
tr:hover td { background: #FAFDFB; }

.badge {
  display: inline-block;
  padding: .22rem .68rem;
  border-radius: 999px;
  font-size: .74rem; font-weight: 700;
}
.badge-amber { background: #FFF3D6; color: #8A5B00; }
.badge-blue  { background: #E3EEFF; color: #2455A4; }
.badge-teal  { background: #DDF4F1; color: #0F6E64; }
.badge-green { background: #E4F6EA; color: #14683A; }
.badge-red   { background: #FBE9E9; color: #92312F; }
.badge-grey  { background: #EEF1EF; color: #55635B; }

.empty { text-align: center; color: var(--grey); padding: 2.5rem 1rem; }
.empty .big { font-size: 2.4rem; margin-bottom: .5rem; }

.inline-form { display: inline-flex; gap: .4rem; align-items: center; }
.inline-form input { width: 90px; padding: .4rem .5rem; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .steps, .price-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Sidebar becomes an off-canvas drawer below 1080px */
@media (max-width: 1080px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar-overlay.open { display: block; }
  .app-content { margin-left: 0; }
  .topbar .hamburger { display: flex; position: static; width: 38px; height: 38px; }
  .topbar .hamburger span { background: var(--forest); }
}

@media (max-width: 720px) {
  .hero { background-attachment: scroll; }
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; inset: 0;
    background: var(--forest);
    flex-direction: column; justify-content: center;
    gap: 2rem;
    font-size: 1.15rem;
    transform: translateX(100%);
    transition: transform .32s ease;
    z-index: 55;
  }
  .nav-links.open { transform: translateX(0); }
  .impact-stats { grid-template-columns: 1fr; gap: 1rem; }
  .topbar-user span.user-name-full { display: none; }
  .stepper { flex-direction: column; align-items: stretch; }
  .stepper .step-item { display: flex; align-items: center; gap: .8rem; text-align: left; padding: .5rem 0; }
  .stepper .step-item::before { display: none; }
  .stepper .step-circle { margin: 0; }
}

@media (max-width: 520px) {
  .steps, .price-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .topbar { padding: .85rem 4%; }
}
