/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #1A3C2E;
  --green-mid:   #2D5A42;
  --green-light: #EAF2EC;
  --gold:        #C8962E;
  --gold-light:  #FDF4E3;
  --gold-bright: #F5B93E;
  --cream:       #FAFAF5;
  --white:       #FFFFFF;
  --text:        #1C1917;
  --muted:       #6B7280;
  --border:      #E5E4DF;
  --red:         #DC2626;
  --blue:        #1D4ED8;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 2px 16px rgba(26,60,46,0.08);
  --shadow-md:   0 6px 32px rgba(26,60,46,0.12);
}

html { scroll-behavior: smooth; }
body { font-family: 'Cairo', sans-serif; background: var(--cream); color: var(--text); direction: rtl; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--green); color: white;
  padding: 12px 26px; border-radius: 50px; border: none;
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer; transition: all .22s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--green-mid); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,60,46,0.25); }

.btn-gold {
  background: var(--gold); color: white;
  padding: 13px 28px; border-radius: 50px; border: none;
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer; transition: all .22s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-gold:hover { background: #b8841f; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,150,46,0.35); }

.btn-outline {
  background: transparent; color: var(--green);
  padding: 11px 24px; border-radius: 50px; border: 2px solid var(--green);
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer; transition: all .22s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { background: var(--green-light); }

.btn-white {
  background: white; color: var(--green);
  padding: 13px 28px; border-radius: 50px; border: none;
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 15px;
  cursor: pointer; transition: all .22s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(250,250,245,0.95); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); height: 64px;
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 2px 24px rgba(26,60,46,0.1); }
.nav-inner { height: 64px; display: flex; align-items: center; gap: 14px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 38px; height: 38px; background: var(--green); color: white;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
}
.logo span { font-size: 21px; font-weight: 900; color: var(--green); }

.nav-search-wrap { flex: 1; max-width: 400px; position: relative; }
.nav-search-wrap input {
  width: 100%; padding: 9px 38px 9px 16px;
  border: 1.5px solid var(--border); border-radius: 50px;
  font-family: 'Cairo', sans-serif; font-size: 14px; background: white;
  transition: border-color .2s;
}
.nav-search-wrap input:focus { outline: none; border-color: var(--green); }
.nav-search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav-link { font-size: 14px; font-weight: 700; color: var(--muted); padding: 8px 12px; border-radius: 8px; transition: color .2s; }
.nav-link:hover { color: var(--green); }
.btn-nav-upload {
  background: var(--gold); color: white; padding: 9px 20px; border-radius: 50px;
  font-weight: 700; font-size: 14px; border: none; cursor: pointer;
  transition: all .2s; white-space: nowrap; display: flex; align-items: center; gap: 7px;
}
.btn-nav-upload:hover { background: #b8841f; transform: translateY(-1px); }
.btn-icon { background: none; border: 1.5px solid var(--border); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 16px; }

/* ===== DRAWER ===== */
.drawer {
  position: fixed; inset: 0; background: white; z-index: 2000;
  padding: 80px 28px 28px; display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%); transition: transform .35s cubic-bezier(0.4,0,0.2,1);
}
.drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; top: 18px; left: 18px; background: var(--cream); border: 1px solid var(--border); border-radius: 50%; width: 38px; height: 38px; cursor: pointer; font-size: 16px; }
.drawer a { padding: 14px 16px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--border); color: var(--text); }
.drawer input { padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 12px; font-family: 'Cairo', sans-serif; font-size: 15px; margin-bottom: 6px; }

/* ===== HERO ===== */
.hero {
  padding-top: 64px; min-height: 92vh;
  background: var(--green);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}

/* Islamic geometric pattern overlay */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(60deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 0, transparent 50%),
    repeating-linear-gradient(-60deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 0, transparent 50%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 0, transparent 50%);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-inner {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center; padding: 72px 22px 48px;
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto; width: 100%;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(200,150,46,0.2); border: 1px solid rgba(200,150,46,0.4);
  color: var(--gold-bright); padding: 7px 16px; border-radius: 50px;
  font-size: 13px; font-weight: 700; margin-bottom: 22px;
}
.live-badge {
  background: var(--gold-bright); color: var(--green);
  font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 50px;
}

.hero-text h1 {
  font-size: clamp(34px, 5vw, 60px); font-weight: 900;
  color: white; line-height: 1.18; margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.hero-text h1 em {
  font-style: normal; color: var(--gold-bright);
  border-bottom: 3px solid var(--gold-bright);
}
.hero-text p { color: rgba(255,255,255,0.68); font-size: 17px; line-height: 1.75; margin-bottom: 34px; }

.search-box {
  background: white; border-radius: 18px;
  padding: 6px 6px 6px 18px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  margin-bottom: 18px;
}
.search-ico { color: var(--muted); font-size: 15px; flex-shrink: 0; }
.search-box input {
  flex: 1; border: none; outline: none;
  font-family: 'Cairo', sans-serif; font-size: 15px;
  background: transparent; color: var(--text);
}
.search-box input::placeholder { color: #9ca3af; }
.search-go {
  background: var(--green); color: white; border: none;
  padding: 12px 22px; border-radius: 12px;
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.search-go:hover { background: var(--green-mid); }

.search-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.search-chips span {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.15); padding: 5px 14px;
  border-radius: 50px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.search-chips span:hover { background: var(--gold); color: white; border-color: var(--gold); }

/* Hero right — note preview stack */
.hero-right { display: flex; flex-direction: column; gap: 14px; }

.hero-note {
  background: white; border-radius: var(--radius);
  padding: 18px 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  position: relative;
}
.hn-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hn-emoji { font-size: 28px; }
.hn-meta { flex: 1; }
.hn-meta strong { display: block; font-size: 15px; font-weight: 700; }
.hn-meta span { font-size: 12px; color: var(--muted); }
.hn-price { font-size: 20px; font-weight: 900; color: var(--green); }
.hn-bar { height: 6px; background: var(--cream); border-radius: 50px; margin-bottom: 5px; }
.hn-bar-fill { height: 100%; border-radius: 50px; background: linear-gradient(90deg, var(--green), var(--gold)); }
.hn-footer { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }

.hero-alert {
  background: rgba(200,150,46,0.15); border: 1px solid rgba(200,150,46,0.3);
  border-radius: var(--radius-sm); padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; color: white; font-size: 13px; font-weight: 600;
}
.hero-alert i { color: var(--gold-bright); font-size: 16px; }
.hero-alert small { color: rgba(255,255,255,0.5); font-size: 11px; display: block; }

/* STATS BAR */
.stats-bar {
  background: rgba(0,0,0,0.2); border-top: 1px solid rgba(255,255,255,0.07);
  padding: 24px 0;
}
.stats-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0; }
.stat-item { text-align: center; padding: 0 40px; }
.stat-item strong { display: block; font-size: 30px; font-weight: 900; color: white; }
.stat-item span { font-size: 13px; color: rgba(255,255,255,0.45); }
.stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.1); }

/* ===== SECTIONS ===== */
.section { padding: 76px 0; }
.section-head { margin-bottom: 46px; }
.section-head h2 { font-size: 32px; font-weight: 900; margin-bottom: 8px; }
.section-head p { color: var(--muted); font-size: 16px; }
.section-head.centered { text-align: center; }
.section-head .eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
  background: var(--gold-light); padding: 4px 12px; border-radius: 50px;
}

/* ===== UNIVERSITY PILLS ===== */
.unis-section { background: white; padding: 48px 0; border-bottom: 1px solid var(--border); }
.unis-scroll { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.uni-btn {
  background: var(--cream); border: 1.5px solid var(--border); border-radius: 50px;
  padding: 10px 22px; font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .18s; color: var(--text);
}
.uni-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.uni-btn.active { background: var(--green); color: white; border-color: var(--green); }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 12px 0; position: sticky; top: 64px; z-index: 100;
}
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
  background: none; border: 1.5px solid var(--border); border-radius: 50px;
  padding: 8px 18px; font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: all .18s; display: flex; align-items: center; gap: 7px; color: var(--text);
}
.filter-btn:hover { border-color: var(--green); color: var(--green); }
.filter-btn.active { background: var(--green); color: white; border-color: var(--green); }

/* ===== RESULTS BAR ===== */
.results-bar { padding: 14px 0; background: var(--cream); border-bottom: 1px solid var(--border); }
.results-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
#results-count { font-size: 14px; font-weight: 600; color: var(--muted); }
.sort-wrap { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.sort-wrap select {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 7px 12px; font-family: 'Cairo', sans-serif; font-size: 13px; cursor: pointer; background: white;
}

/* ===== NOTES GRID ===== */
.browse-section { padding: 40px 0 72px; }
.notes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.note-card {
  background: white; border-radius: var(--radius);
  border: 1.5px solid var(--border); overflow: hidden;
  cursor: pointer; transition: all .22s; position: relative;
}
.note-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); transform: translateY(-3px); }

.nc-thumb {
  height: 110px; display: flex; align-items: center; justify-content: center;
  font-size: 46px; position: relative;
}
.nc-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 50px;
}
.nc-badge.hot  { background: #fef2f2; color: var(--red); }
.nc-badge.new  { background: #f0fdf4; color: #15803d; }
.nc-badge.top  { background: var(--gold-light); color: #92400e; }

.nc-body { padding: 14px; }
.nc-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.nc-tag {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 50px;
  background: var(--green-light); color: var(--green);
}
.nc-tag.uni { background: var(--gold-light); color: #92400e; }
.nc-body h3 { font-size: 14px; font-weight: 700; margin-bottom: 5px; line-height: 1.4; }
.nc-stars { color: #f59e0b; font-size: 12px; margin-bottom: 10px; }
.nc-stars small { color: var(--muted); font-size: 11px; margin-right: 4px; }
.nc-footer { display: flex; align-items: center; justify-content: space-between; }
.nc-stats { display: flex; gap: 10px; }
.nc-stat { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.nc-price { font-size: 17px; font-weight: 900; color: var(--green); }

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state i { font-size: 52px; color: var(--border); display: block; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

.load-more-wrap { text-align: center; margin-top: 36px; }
.btn-load {
  background: white; border: 1.5px solid var(--border); border-radius: 50px;
  padding: 12px 32px; font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-load:hover { border-color: var(--green); color: var(--green); }

/* ===== HOW IT WORKS ===== */
.how-section {
  background: var(--green);
  padding: 80px 0; position: relative; overflow: hidden;
}
.how-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(30deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 0, transparent 50%),
    repeating-linear-gradient(-30deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 0, transparent 50%);
  background-size: 50px 50px;
  pointer-events: none;
}
.how-inner { position: relative; z-index: 1; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 48px; }
.how-step {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 32px 28px; text-align: center; color: white;
}
.how-step-num {
  width: 48px; height: 48px; border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: var(--gold);
  margin: 0 auto 20px;
}
.how-step i { font-size: 32px; color: rgba(255,255,255,0.7); display: block; margin-bottom: 14px; }
.how-step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.how-step p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.65; }

.earn-banner {
  background: rgba(200,150,46,0.15); border: 1px solid rgba(200,150,46,0.35);
  border-radius: var(--radius); padding: 28px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.earn-banner-text { color: white; }
.earn-banner-text strong { font-size: 20px; display: block; margin-bottom: 4px; }
.earn-banner-text span { font-size: 14px; color: rgba(255,255,255,0.6); }
.earn-num { color: var(--gold-bright); }

/* ===== ACTIVITY FEED ===== */
.activity-section { background: white; padding: 72px 0; }
.activity-section .section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-head .live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fef2f2; color: var(--red); font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 50px; border: 1px solid #fecaca;
}
.live-dot { width: 8px; height: 8px; background: var(--red); border-radius: 50%; animation: livePulse 1.5s ease infinite; }
@keyframes livePulse { 0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.5)} 50%{box-shadow:0 0 0 5px rgba(220,38,38,0)} }

.activity-feed { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; max-width: 680px; margin: 0 auto; }
.activity-item {
  display: flex; align-items: center; gap: 14px; padding: 15px 20px;
  border-bottom: 1px solid var(--border); transition: background .15s;
  animation: fadeSlide .4s ease;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--cream); }
@keyframes fadeSlide { from {opacity:0; transform:translateY(-8px)} to {opacity:1; transform:translateY(0)} }
.act-av { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: white; flex-shrink: 0; }
.act-text { flex: 1; }
.act-text strong { font-size: 13px; display: block; }
.act-text span { font-size: 12px; color: var(--muted); }
.act-time { font-size: 11px; color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.act-type { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 50px; flex-shrink: 0; }
.act-type.buy { background: #f0fdf4; color: #15803d; }
.act-type.upload { background: var(--green-light); color: var(--green); }

/* ===== REVIEWS ===== */
.reviews-section { background: var(--cream); padding: 72px 0; overflow: hidden; }
.reviews-wrap { overflow: hidden; }
.reviews-row { display: flex; gap: 18px; transition: transform .4s cubic-bezier(0.4,0,0.2,1); }
.review-card {
  min-width: 330px; background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px; flex-shrink: 0;
}
.rev-stars { color: #f59e0b; font-size: 16px; margin-bottom: 10px; }
.review-card p { font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 18px; }
.rev-author { display: flex; align-items: center; gap: 12px; }
.rev-av { width: 40px; height: 40px; border-radius: 50%; color: white; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rev-author div { display: flex; flex-direction: column; }
.rev-author strong { font-size: 14px; font-weight: 700; }
.rev-author span { font-size: 12px; color: var(--muted); }
.reviews-controls { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }
.reviews-controls button { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--border); background: white; cursor: pointer; font-size: 15px; transition: all .2s; }
.reviews-controls button:hover { border-color: var(--green); color: var(--green); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: 24px; padding: 0; max-width: 500px; width: 100%;
  position: relative; animation: modalIn .3s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90vh; overflow-y: auto;
}
@keyframes modalIn { from {opacity:0;transform:scale(0.92)} to {opacity:1;transform:scale(1)} }
.modal-close { position: absolute; top: 14px; left: 14px; background: rgba(0,0,0,0.1); border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; z-index: 5; color: white; }
.modal-thumb { height: 130px; display: flex; align-items: center; justify-content: center; font-size: 56px; border-radius: 24px 24px 0 0; }
.modal-body { padding: 24px; }
.modal-body h2 { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.modal-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.modal-meta span { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.modal-desc { font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 22px; border-top: 1px solid var(--border); padding-top: 16px; }
.modal-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-price { font-size: 34px; font-weight: 900; color: var(--green); }
.modal-price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.btn-buy {
  background: var(--green); color: white; padding: 13px 28px; border-radius: 50px;
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 15px; border: none; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; gap: 8px;
}
.btn-buy:hover { background: var(--green-mid); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,60,46,.3); }

/* ===== HALAL BADGE ===== */
.halal-section { background: var(--gold-light); border-top: 1px solid #fde68a; border-bottom: 1px solid #fde68a; padding: 28px 0; }
.halal-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; text-align: center; }
.halal-icon { font-size: 38px; }
.halal-text strong { display: block; font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.halal-text p { font-size: 14px; color: var(--muted); max-width: 600px; }

/* ===== UPLOAD PAGE ===== */
.upload-hero {
  background: var(--green); padding: 100px 0 60px; text-align: center; position: relative; overflow: hidden;
}
.upload-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(60deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 0, transparent 50%), repeating-linear-gradient(-60deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 0, transparent 50%);
  background-size: 40px 40px; pointer-events: none;
}
.upload-hero h1 { font-size: 38px; font-weight: 900; color: white; margin-bottom: 10px; position: relative; }
.upload-hero p { color: rgba(255,255,255,0.7); font-size: 16px; position: relative; }

.upload-section { padding: 60px 0; }
.upload-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }

.form-card { background: white; border-radius: var(--radius); padding: 32px; border: 1.5px solid var(--border); }
.form-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 26px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 7px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--border); border-radius: 12px;
  font-family: 'Cairo', sans-serif; font-size: 14px; background: var(--cream); transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--green); background: white; }
.form-group textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.drop-zone {
  border: 2px dashed var(--green); border-radius: var(--radius); padding: 44px 24px;
  text-align: center; cursor: pointer; transition: all .2s; background: var(--green-light);
}
.drop-zone:hover, .drop-zone.drag-over { background: #d4eada; border-color: var(--green-mid); }
.drop-zone i { font-size: 36px; color: var(--green); margin-bottom: 10px; display: block; }
.drop-zone p { font-size: 15px; font-weight: 700; color: var(--green); margin-bottom: 5px; }
.drop-zone small { font-size: 12px; color: var(--muted); }
.drop-zone input { display: none; }

/* AI Scanner */
.ai-scanner {
  background: #f0f9ff; border: 1.5px solid #bae6fd;
  border-radius: var(--radius); padding: 20px 24px; margin-top: 16px; display: none;
}
.ai-scanner h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--blue); display: flex; align-items: center; gap: 8px; }
.scan-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e0f2fe; }
.scan-step:last-child { border-bottom: none; }
.scan-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.scan-icon.pending { background: #e5e7eb; color: var(--muted); }
.scan-icon.running { background: #dbeafe; color: var(--blue); animation: spin .8s linear infinite; }
.scan-icon.pass { background: #dcfce7; color: #15803d; }
.scan-icon.fail { background: #fee2e2; color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-label { flex: 1; font-size: 13px; font-weight: 600; }
.scan-result { font-size: 12px; font-weight: 700; }
.scan-result.pass { color: #15803d; }
.scan-result.fail { color: var(--red); }
.scan-result.running { color: var(--blue); }

/* Price slider */
.price-slider-wrap { margin-bottom: 8px; }
.price-slider-wrap input[type=range] { width: 100%; accent-color: var(--green); margin: 10px 0; }
.price-row-display { display: flex; justify-content: space-between; align-items: center; background: var(--cream); border-radius: 12px; padding: 14px 18px; }
.price-row-display div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.price-row-display span { font-size: 12px; color: var(--muted); }
.price-row-display strong { font-size: 20px; font-weight: 900; }

/* Upload sidebar */
.upload-sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }
.sidebar-card { background: white; border-radius: var(--radius); padding: 22px; border: 1.5px solid var(--border); }
.sidebar-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

.calc-card { background: var(--green); border-color: var(--green); }
.calc-card h4 { color: white; }
.calc-card input[type=range] { width: 100%; accent-color: var(--gold-bright); margin: 8px 0; }
.calc-label { font-size: 12px; color: rgba(255,255,255,0.55); margin-bottom: 4px; }
.calc-result { font-size: 34px; font-weight: 900; color: var(--gold-bright); line-height: 1; margin: 10px 0 4px; }
.calc-sub { font-size: 12px; color: rgba(255,255,255,0.5); }
.calc-row { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); }

.tip-list { display: flex; flex-direction: column; gap: 10px; }
.tip-item { display: flex; align-items: flex-start; gap: 10px; }
.tip-item i { color: var(--gold); margin-top: 2px; flex-shrink: 0; font-size: 13px; }
.tip-item span { font-size: 13px; line-height: 1.5; color: var(--text); }

/* ===== SIGNUP PAGE ===== */
.signup-page { min-height: 100vh; background: var(--cream); display: flex; flex-direction: column; }
.signup-hero { background: var(--green); padding: 90px 0 48px; text-align: center; position: relative; overflow: hidden; }
.signup-hero::before { content:''; position:absolute; inset:0; background-image:repeating-linear-gradient(60deg,rgba(255,255,255,.03) 0,rgba(255,255,255,.03) 1px,transparent 0,transparent 50%),repeating-linear-gradient(-60deg,rgba(255,255,255,.03) 0,rgba(255,255,255,.03) 1px,transparent 0,transparent 50%); background-size:40px 40px; pointer-events:none; }
.signup-hero h1 { font-size: 34px; font-weight: 900; color: white; margin-bottom: 8px; position: relative; }
.signup-hero p { color: rgba(255,255,255,0.7); position: relative; }

.progress-bar-wrap { background: rgba(255,255,255,0.1); border-radius: 50px; height: 6px; max-width: 300px; margin: 20px auto 0; position: relative; }
.progress-bar-fill { background: var(--gold-bright); border-radius: 50px; height: 100%; transition: width .4s ease; }
.progress-label { color: rgba(255,255,255,0.6); font-size: 13px; margin-top: 8px; }

.signup-body { flex: 1; padding: 48px 0; }
.signup-card { background: white; border-radius: 24px; border: 1.5px solid var(--border); max-width: 580px; margin: 0 auto; overflow: hidden; }
.step-panel { padding: 36px; display: none; }
.step-panel.active { display: block; animation: stepIn .3s ease; }
@keyframes stepIn { from{opacity:0;transform:translateX(16px)} to{opacity:1;transform:translateX(0)} }
.step-panel h2 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.step-panel .step-desc { font-size: 15px; color: var(--muted); margin-bottom: 28px; line-height: 1.6; }

/* Choice cards */
.choice-grid { display: grid; gap: 14px; }
.choice-card {
  border: 2px solid var(--border); border-radius: var(--radius); padding: 20px 22px;
  cursor: pointer; transition: all .18s; display: flex; align-items: center; gap: 16px;
  position: relative;
}
.choice-card:hover { border-color: var(--green); background: var(--green-light); }
.choice-card.selected { border-color: var(--green); background: var(--green-light); }
.choice-card.selected::after { content:'✓'; position:absolute; left:16px; top:50%; transform:translateY(-50%); width:24px; height:24px; background:var(--green); color:white; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; }
.cc-icon { font-size: 28px; flex-shrink: 0; }
.cc-text h3 { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.cc-text p { font-size: 13px; color: var(--muted); }

/* Multi select chips */
.chip-select { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1.5px solid var(--border); border-radius: 50px;
  padding: 9px 18px; cursor: pointer; transition: all .15s;
  font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 700;
  background: white; color: var(--text);
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip.selected { background: var(--green); color: white; border-color: var(--green); }

/* Signup form inputs */
.signup-form .form-group { margin-bottom: 16px; }
.signup-form label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.signup-form input, .signup-form select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 12px;
  font-family: 'Cairo', sans-serif; font-size: 15px; background: var(--cream); transition: border-color .2s;
}
.signup-form input:focus, .signup-form select:focus { outline: none; border-color: var(--green); background: white; }

/* Step nav */
.step-nav { display: flex; gap: 12px; justify-content: space-between; padding: 20px 36px; border-top: 1px solid var(--border); }
.btn-back { background: none; border: 1.5px solid var(--border); border-radius: 50px; padding: 12px 24px; font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; transition: all .2s; color: var(--muted); }
.btn-back:hover { border-color: var(--green); color: var(--green); }
.btn-next { background: var(--green); color: white; border: none; border-radius: 50px; padding: 12px 32px; font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; transition: all .2s; }
.btn-next:hover { background: var(--green-mid); }

/* Result card */
.result-card { background: var(--green-light); border: 1.5px solid var(--green); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.result-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--green); color: white; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 50px; margin-bottom: 10px; }
.result-note { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(26,60,46,0.1); }
.result-note:last-child { border-bottom: none; }
.result-note-emoji { font-size: 22px; }
.result-note h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.result-note span { font-size: 12px; color: var(--muted); }
.result-note-price { font-weight: 900; color: var(--green); font-size: 16px; margin-right: auto; }

/* ===== FOOTER ===== */
.footer { background: #0d1f18; padding: 56px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-inner h4 { color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-inner ul li { margin-bottom: 10px; }
.footer-inner ul li a { color: #4b7c62; font-size: 14px; transition: color .2s; display: flex; align-items: center; gap: 7px; }
.footer-inner ul li a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 20px 22px; max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { color: #4b7c62; font-size: 13px; }
.pay-tag { background: rgba(255,255,255,0.06); color: #4b7c62; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; font-family:'Inter',sans-serif; }

/* ===== PLEDGE MODAL ===== */
.pledge-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px 16px; cursor: pointer;
  transition: all .18s;
}
.pledge-item:has(input:checked) {
  background: var(--green-light); border-color: var(--green);
}
.pledge-item input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--green);
  flex-shrink: 0; margin-top: 2px; cursor: pointer;
}
.pledge-item span { font-size: 13px; line-height: 1.6; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
  padding: 13px 22px; border-radius: 50px; font-size: 14px; font-weight: 700;
  z-index: 9999; transition: transform .35s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); color: white; }
.toast.gold { background: var(--gold); color: white; }
.toast.error { background: var(--red); color: white; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .notes-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-search-wrap { display: none; }
  .btn-icon { display: flex; }
  .hero-inner { grid-template-columns: 1fr; padding: 48px 22px 32px; text-align: center; }
  .hero-right { display: none; }
  .search-chips { justify-content: center; }
  .stats-inner { gap: 0; }
  .stat-item { padding: 0 18px; }
  .stat-item strong { font-size: 24px; }
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: 1fr; }
  .earn-banner { flex-direction: column; text-align: center; align-items: center; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .activity-section .section-head { flex-direction: column; gap: 10px; align-items: flex-start; }
  .signup-card { margin: 0 12px; }
}
@media (max-width: 480px) {
  .notes-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stat-divider { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   NAV AUTH — user chip, purchases button, dropdown
═══════════════════════════════════════════════════════════ */
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; overflow: hidden; flex-shrink: 0;
}

.nav-user-chip {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 10px 4px 4px;
  border-radius: 50px; border: 1.5px solid var(--border);
  background: white; transition: border-color .2s;
  position: relative;
}
.nav-user-chip:hover { border-color: var(--green); }

.user-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  min-width: 180px; z-index: 1100;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .2s;
}
.user-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown button {
  width: 100%; padding: 12px 16px; background: none; border: none;
  font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; text-align: right; display: flex; align-items: center; gap: 10px;
  color: var(--text); transition: background .15s;
}
.user-dropdown button:hover { background: var(--cream); }
.user-dropdown button i { color: var(--muted); width: 16px; }

/* Purchases nav button */
.purchases-nav-btn {
  display: flex; align-items: center; gap: 7px;
  background: var(--green-light); border: 1.5px solid #b6d9bf;
  border-radius: 50px; padding: 7px 14px;
  font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 700;
  color: var(--green); cursor: pointer; transition: all .2s;
  position: relative;
}
.purchases-nav-btn:hover { background: var(--green); color: white; border-color: var(--green); }
.purchases-badge {
  background: var(--red); color: white; border-radius: 50%;
  width: 18px; height: 18px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
@keyframes purchasesFlash {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
.purchases-flash { animation: purchasesFlash .4s ease 3; }

/* ═══════════════════════════════════════════════════════════
   AUTH MODAL
═══════════════════════════════════════════════════════════ */
.auth-modal {
  max-width: 440px; padding: 0; overflow: visible;
  border-radius: 24px;
}

.auth-modal-header {
  background: linear-gradient(135deg, var(--green) 0%, #2D5A42 100%);
  border-radius: 24px 24px 0 0; padding: 28px 28px 22px;
  text-align: center;
}
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.auth-logo span { color: white; font-size: 22px; font-weight: 900; }
.auth-subtitle { color: rgba(255,255,255,0.7); font-size: 13px; margin-bottom: 14px; }
.auth-trust {
  display: inline-flex; gap: 12px; background: rgba(255,255,255,0.1);
  border-radius: 50px; padding: 7px 16px;
}
.auth-trust span { color: rgba(255,255,255,0.85); font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.auth-trust i { color: var(--gold-bright); }

/* Tabs */
.auth-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  background: white;
}
.auth-tab {
  flex: 1; padding: 14px; background: none; border: none;
  font-family: 'Cairo', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent;
  transition: all .2s;
}
.auth-tab.active { color: var(--green); border-bottom-color: var(--green); }

/* Panels */
.auth-panel { padding: 22px 28px 10px; background: white; }

/* Google button */
.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 13px 20px; border-radius: 50px;
  border: 1.5px solid #dadce0; background: white;
  font-family: 'Cairo', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .2s; color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.btn-google:hover { border-color: #4285F4; box-shadow: 0 2px 12px rgba(66,133,244,0.15); }

/* Divider */
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background:var(--border); }
.auth-divider span { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Fields */
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--text); }
.auth-input-wrap { position: relative; }
.auth-input-wrap i:first-child { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.auth-input-wrap input {
  width: 100%; padding: 12px 40px 12px 40px; border: 1.5px solid var(--border);
  border-radius: 12px; font-family: 'Cairo', sans-serif; font-size: 14px;
  background: var(--cream); transition: border-color .2s; direction: rtl;
}
.auth-input-wrap input:focus { outline: none; border-color: var(--green); background: white; }
.auth-input-wrap input[dir="ltr"] { direction: ltr; text-align: left; padding-right: 40px; padding-left: 40px; }
.toggle-pw {
  position: absolute;
  left: 10px;           /* symmetric with lock icon at right:14px — sits flush inside field */
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.toggle-pw:hover { color: var(--green); background: rgba(26,60,46,0.06); }

/* Auth-gated modal — sign-in required, cannot be dismissed */
.auth-modal-overlay.auth-gated { cursor: default; }
.auth-modal-overlay.auth-gated::before {
  content: "";
  position: fixed; inset: 0;
  backdrop-filter: blur(6px) brightness(0.55);
  -webkit-backdrop-filter: blur(6px) brightness(0.55);
  z-index: -1;
}
/* Hide any explicit close button when gated */
.auth-modal-overlay.auth-gated .auth-modal-close { display: none !important; }

/* Official GSI button container */
.gsi-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin-bottom: 16px;
  /* GSI iframe is LTR — force LTR inside so the button renders correctly */
  direction: ltr;
}
.gsi-btn-wrap iframe { border-radius: 8px !important; }

/* Error */
.auth-error {
  background: #fef2f2; border: 1px solid #fecaca; color: var(--red);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}

/* Submit */
.btn-auth-submit {
  width: 100%; padding: 14px; border: none; border-radius: 50px;
  background: var(--green); color: white;
  font-family: 'Cairo', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .2s; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-auth-submit:hover { background: var(--green-mid); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,60,46,.25); }
.btn-auth-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* Switch & TOS */
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin: 14px 0 4px; }
.auth-link-btn { background: none; border: none; color: var(--green); font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; }
.auth-tos { text-align: center; font-size: 11px; color: var(--muted); padding: 12px 28px 20px; }
.auth-tos a { color: var(--green); }

/* ═══════════════════════════════════════════════════════════
   PURCHASES PANEL (side drawer)
═══════════════════════════════════════════════════════════ */
.purchases-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px); z-index: 2800;
  opacity: 0; visibility: hidden; transition: all .3s;
}
.purchases-overlay.open { opacity: 1; visibility: visible; }

.purchases-panel {
  position: fixed; top: 0; right: -460px; width: min(450px, 100vw);
  height: 100vh; background: white; z-index: 2900;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  transition: right .35s cubic-bezier(0.4,0,0.2,1);
}
.purchases-panel.open { right: 0; }

.purchases-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--border);
  background: var(--green);
}
.purchases-panel-header h3 { color: white; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.pp-close {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15);
  border: none; color: white; font-size: 16px; cursor: pointer; transition: background .2s;
}
.pp-close:hover { background: rgba(255,255,255,0.25); }

.purchases-summary {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
}
.ps-stat {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-left: 1px solid var(--border);
}
.ps-stat:last-child { border-left: none; }
.ps-stat i { font-size: 20px; color: var(--green); }
.ps-stat div { display: flex; flex-direction: column; gap: 2px; }
.ps-stat strong { font-size: 16px; font-weight: 900; color: var(--text); }
.ps-stat span { font-size: 11px; color: var(--muted); }

.purchases-list { flex: 1; overflow-y: auto; padding: 14px; }

/* Empty state */
.purchases-empty { text-align: center; padding: 60px 24px; }
.pe-icon { font-size: 56px; margin-bottom: 16px; }
.purchases-empty h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.purchases-empty p { color: var(--muted); font-size: 14px; }

/* Folder */
.purchase-folder { background: var(--cream); border: 1.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }

.folder-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; transition: background .15s;
}
.folder-header:hover { background: var(--green-light); }

.folder-icon-wrap { font-size: 20px; color: var(--gold); position: relative; width: 22px; }
.folder-closed   { display: block; }
.folder-open-icon { display: none; }
.purchase-folder.open .folder-closed   { display: none; }
.purchase-folder.open .folder-open-icon { display: block; }

.folder-info { flex: 1; }
.folder-info strong { display: block; font-size: 14px; font-weight: 700; }
.folder-info span { font-size: 12px; color: var(--muted); }

.folder-chevron { color: var(--muted); font-size: 12px; transition: transform .25s; }
.purchase-folder.open .folder-chevron { transform: rotate(180deg); }

.folder-items { display: none; border-top: 1px solid var(--border); }
.purchase-folder.open .folder-items { display: block; }

.purchase-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer; transition: background .15s;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.purchase-item:last-child { border-bottom: none; }
.purchase-item:hover { background: white; }

.pi-thumb {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.pi-info { flex: 1; min-width: 0; }
.pi-info strong { font-size: 13px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-info span { font-size: 11px; color: var(--muted); display: block; margin-top: 1px; }
.pi-date { color: var(--muted); font-size: 10px; display: flex !important; align-items: center; gap: 4px; margin-top: 3px; }
.pi-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.pi-price { font-size: 13px; font-weight: 900; color: var(--green); }
.pi-dl { color: var(--muted); font-size: 13px; }
.pi-dl:hover { color: var(--green); }

/* ═══════════════════════════════════════════════════════════
   SELLER PROFILE CARD (inside note modal)
═══════════════════════════════════════════════════════════ */
.seller-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  margin-bottom: 14px; margin-top: 4px;
}
.seller-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: white; flex-shrink: 0;
}
.seller-info { flex: 1; }
.seller-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.seller-name-row strong { font-size: 15px; font-weight: 700; }
.seller-verified { font-size: 11px; color: #15803d; font-weight: 700; display: flex; align-items: center; gap: 3px; }
.seller-bio { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.seller-stats { display: flex; gap: 14px; }
.seller-stats span { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; font-weight: 600; }

/* Seller video */
.seller-video-wrap { margin-bottom: 14px; }
.seller-video-label {
  font-size: 13px; font-weight: 700; color: var(--green);
  margin-bottom: 8px; display: flex; align-items: center; gap: 7px;
}
.seller-video-frame { border-radius: 12px; overflow: hidden; }

/* Seller socials */
.seller-socials { margin-bottom: 16px; }
.seller-socials-label { font-size: 12px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 8px; }
.seller-socials-row { display: flex; gap: 8px; flex-wrap: wrap; }
.seller-social {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 50px; font-size: 12px; font-weight: 700;
  text-decoration: none; transition: all .18s; border: 1.5px solid transparent;
}
.seller-social.twitter   { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.seller-social.instagram { background: #fdf2f8; color: #9d174d; border-color: #f9a8d4; }
.seller-social.snapchat  { background: #fefce8; color: #92400e; border-color: #fde68a; }
.seller-social.tiktok    { background: #f0fdf4; color: #064e3b; border-color: #a7f3d0; }
.seller-social:hover { opacity: 0.8; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════
   UPLOAD PAGE — seller profile section
═══════════════════════════════════════════════════════════ */
.seller-profile-section {
  margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--border);
}
.seller-profile-section h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.seller-profile-section .section-note { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.social-inputs { display: flex; flex-direction: column; gap: 10px; }
.social-input-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 0 14px; transition: border-color .2s;
}
.social-input-row:focus-within { border-color: var(--green); background: white; }
.social-input-row .social-platform-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.social-input-row .social-prefix { font-size: 13px; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.social-input-row input {
  flex: 1; border: none; background: transparent; padding: 11px 0;
  font-family: 'Cairo', sans-serif; font-size: 14px; direction: ltr;
}
.social-input-row input:focus { outline: none; }

/* SIGNUP page improvements */
.auth-page-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--cream); padding-top: 64px;
}
.auth-page-inner {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.auth-page-card {
  background: white; border-radius: 24px; border: 1.5px solid var(--border);
  max-width: 480px; width: 100%; overflow: hidden;
  box-shadow: 0 12px 48px rgba(26,60,46,0.12);
}

/* Responsive additions */
@media (max-width: 640px) {
  .purchases-panel { width: 100vw; }
  .auth-panel { padding: 18px 18px 8px; }
  .nav-user-chip span:not(.purchases-badge) { display: none; }
  .purchases-nav-btn span { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   REQUIRED STAR + SELLER OATH
═══════════════════════════════════════════════════════════ */
.req-star { color: #dc2626; font-weight: 900; margin-right: 2px; }

.seller-oath-section {
  background: #fef9f0;
  border: 2px solid #fde68a;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 20px 0 16px;
}
.oath-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.oath-header i { color: var(--gold); font-size: 20px; }
.oath-header h3 { font-size: 17px; font-weight: 800; color: var(--text); }
.oath-intro { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.oath-items { display: flex; flex-direction: column; gap: 12px; }
.oath-item {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; padding: 12px 14px;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); transition: border-color .18s, background .18s;
}
.oath-item:has(input:checked) {
  border-color: #86efac; background: #f0fdf4;
}
.oath-item input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0;
  accent-color: #15803d; cursor: pointer;
}
.oath-item span { font-size: 13px; color: var(--text); line-height: 1.6; }
.oath-item strong { color: var(--green); }

/* Review modal */
.review-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 2000; display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.review-modal-overlay.open { display: flex; }
.review-modal {
  background: white; border-radius: 20px; padding: 28px 28px 24px;
  max-width: 480px; width: 100%; box-shadow: 0 12px 48px rgba(26,60,46,0.18);
}
.review-modal h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.review-modal p.sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.star-rating { display: flex; gap: 6px; margin-bottom: 16px; }
.star-btn {
  font-size: 28px; background: none; border: none; cursor: pointer;
  color: #d1d5db; transition: color .15s, transform .15s;
  padding: 0; line-height: 1;
}
.star-btn.active, .star-btn:hover { color: #f59e0b; transform: scale(1.15); }
.review-textarea {
  width: 100%; min-height: 100px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif; font-size: 14px; resize: vertical;
  transition: border-color .18s;
}
.review-textarea:focus { outline: none; border-color: var(--green); }
.review-modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn-review-submit {
  flex: 1; padding: 12px; background: var(--green); color: white;
  border: none; border-radius: var(--radius-sm); font-family: 'Cairo', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: background .18s;
}
.btn-review-submit:hover { background: var(--green-mid); }
.btn-review-cancel {
  padding: 12px 18px; background: var(--cream); color: var(--muted);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif; font-size: 14px; cursor: pointer;
}

/* Loading skeleton for notes grid */
.skeleton-card {
  border-radius: var(--radius); background: white; overflow: hidden;
  border: 1.5px solid var(--border); padding: 0;
}
.skeleton-thumb {
  height: 100px; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
.skeleton-body { padding: 14px; }
.skeleton-line {
  height: 12px; border-radius: 6px; margin-bottom: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

