/* CSS Variables */
:root {
  --bg: #0F0D0A;
  --card: #1C1915;
  --elevated: #242018;
  --accent: #C87941;
  --accent-hover: #D68A52;
  --text: #EDE4D8;
  --text-secondary: #A89880;
  --text-muted: #6B5E50;
  --border: #2E2820;
  --red: #D96060;
  --green: #4D9E5A;
  --blue: #4A7FA5;
  --sidebar-width: 240px;
  --header-height: 56px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; cursor: pointer; }
a:hover { color: var(--accent-hover); }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============ LANDING PAGE ============ */
#landing-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); overflow-x: hidden; }

/* ── LP NAV ── */
.lp-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(15,13,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(46,40,32,0.8);
}
.lp-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 0;
  padding: 0 32px; height: 64px;
}
.lp-logo {
  font-size: 20px; font-weight: 700; color: var(--accent);
  letter-spacing: -0.5px; margin-right: 40px; flex-shrink: 0;
}
.beta-badge {
  display: inline-block;
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: #C87941;
  background: rgba(200, 121, 65, 0.14);
  border: 1px solid rgba(200, 121, 65, 0.3);
  padding: 2px 6px; border-radius: 5px;
  vertical-align: middle; margin-left: 7px;
  position: relative; top: -1.5px;
  font-family: inherit; line-height: 1.4;
}
.lp-navlinks { display: flex; gap: 4px; flex: 1; }
.lp-navlinks a {
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 8px; transition: color .15s, background .15s;
  cursor: pointer;
}
.lp-navlinks a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.lp-nav-btns { display: flex; gap: 10px; align-items: center; }

/* ── LP LANGUAGE PICKER ── */
.lp-lang-picker { position: relative; margin-right: 4px; }
.lp-lang-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: 8px;
  padding: 5px 10px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background .15s, color .15s;
}
.lp-lang-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.lp-lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--elevated); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; min-width: 148px;
  z-index: 9999; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: none;
}
.lp-lang-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 13.5px; color: var(--text-secondary);
  cursor: pointer; transition: background .12s, color .12s;
}
.lp-lang-menu-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.lp-lang-menu-item.lp-lang-active { color: var(--accent); }
.lp-hamburger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 24px; line-height: 1; padding: 4px;
  margin-left: 12px;
}

/* ── LP NOTICES BAR ── */
#lp-notices-bar {
  background: linear-gradient(180deg, rgba(200,121,65,0.07) 0%, rgba(15,13,10,0) 100%);
  border-bottom: 1px solid rgba(200,121,65,0.12);
  padding: 20px 32px 16px;
  flex-direction: column;
  gap: 10px;
}
#lp-notices-header {
  display: flex; align-items: center; gap: 8px;
  max-width: 860px; margin: 0 auto 4px; width: 100%;
}
#lp-notices-header span {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); opacity: 0.8;
}
#lp-notices-header::before {
  content: '';
  display: block; flex: 1;
  height: 1px; background: rgba(200,121,65,0.2);
}
#lp-notices-header::after {
  content: '';
  display: block; flex: 1;
  height: 1px; background: rgba(200,121,65,0.2);
}
.lp-notice-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 44px 16px 18px;
  border-radius: 14px;
  background: rgba(28,25,21,0.75);
  border: 1px solid rgba(200,121,65,0.16);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.04);
  max-width: 860px; margin: 0 auto; width: 100%;
  position: relative;
  backdrop-filter: blur(8px);
}
.lp-notice-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.lp-notice-body-wrap { flex: 1; min-width: 0; }
.lp-notice-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.lp-notice-body { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.lp-notice-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; font-size: 12px; font-weight: 600;
  color: var(--accent); text-decoration: none;
  background: rgba(200,121,65,0.1); border: 1px solid rgba(200,121,65,0.22);
  border-radius: 7px; padding: 5px 12px;
  transition: background .15s;
}
.lp-notice-link:hover { background: rgba(200,121,65,0.18); }
.lp-notice-dismiss {
  position: absolute; top: 10px; right: 10px;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 3px 6px;
  border-radius: 6px; transition: color .15s, background .15s;
}
.lp-notice-dismiss:hover { color: var(--text); background: rgba(255,255,255,0.07); }
@media (max-width: 640px) {
  #lp-notices-bar { padding: 14px 14px 12px; }
  .lp-notice-item { padding: 13px 38px 13px 14px; border-radius: 11px; }
  .lp-notice-title { font-size: 13px; }
  .lp-notice-body { font-size: 12px; }
}

/* ── LP HERO ── */
.lp-hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 64px);
  display: flex; align-items: center;
}
.lp-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.lp-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(200,121,65,0.18) 0%, transparent 70%);
  top: -200px; left: -100px;
  animation: orbFloat1 12s ease-in-out infinite;
}
.lp-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(74,127,165,0.12) 0%, transparent 70%);
  bottom: -150px; right: -80px;
  animation: orbFloat2 16s ease-in-out infinite;
}
.lp-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(200,121,65,0.08) 0%, transparent 70%);
  top: 50%; right: 30%;
  animation: orbFloat3 20s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0); }
  33% { transform: translate(60px, 40px); }
  66% { transform: translate(-30px, 80px); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0); }
  33% { transform: translate(-50px, -60px); }
  66% { transform: translate(40px, -30px); }
}
@keyframes orbFloat3 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-80px, 60px); }
}
.lp-hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
  padding: 80px 32px;
}
.lp-hero-text { position: relative; z-index: 1; }
.lp-badge {
  display: inline-block;
  background: rgba(200,121,65,0.12);
  color: var(--accent);
  border: 1px solid rgba(200,121,65,0.3);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 20px;
}
.lp-h1 {
  font-size: 64px; font-weight: 700;
  line-height: 1.08; letter-spacing: -2px;
  color: var(--text); margin-bottom: 20px;
}
.lp-accent-text {
  background: linear-gradient(135deg, #C87941, #E8A870, #C87941);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.lp-hero-sub {
  font-size: 18px; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: 36px;
  max-width: 480px;
}
.lp-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 12px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 500;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(200,121,65,0.05); }
.lp-trust {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.lp-trust span { display: flex; align-items: center; gap: 6px; }

/* Phone mockup */
.lp-hero-visual { position: relative; z-index: 1; display: flex; justify-content: center; }
.lp-phone-wrap {
  position: relative;
  filter: drop-shadow(0 40px 80px rgba(200,121,65,0.2)) drop-shadow(0 0 1px rgba(200,121,65,0.3));
}
.lp-phone-svg { width: 280px; max-width: 100%; }
.lp-phone-badge {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.lp-phone-badge-1 { top: 15%; right: -60px; }
.lp-phone-badge-2 { bottom: 22%; right: -52px; }
.lp-badge-icon { font-size: 20px; margin-bottom: 2px; }
.lp-badge-label { font-size: 11px; color: var(--text-muted); margin-bottom: 1px; }
.lp-badge-value { font-size: 14px; font-weight: 700; color: var(--text); }

/* ── LP CONTAINER ── */
.lp-container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ── LP STATS BAR ── */
.lp-stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.lp-stats-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; padding: 0;
}
.lp-stat {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.lp-stat:last-child { border-right: none; }
.lp-stat-num {
  font-size: 28px; font-weight: 700;
  color: var(--accent); letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.lp-stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ── LP SECTIONS ── */
.lp-section { padding: 96px 0; }
.lp-section-alt { background: var(--card); }
.lp-section-header { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.lp-section-header h2 {
  font-size: 40px; font-weight: 700;
  letter-spacing: -1px; margin: 12px 0 16px;
  color: var(--text);
}
.lp-section-header p { font-size: 17px; color: var(--text-secondary); line-height: 1.6; }

/* ── FEATURES GRID ── */
.lp-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.lp-feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: border-color .2s, transform .2s;
}
.lp-feature-card:hover { border-color: rgba(200,121,65,0.4); transform: translateY(-2px); }
.lp-feature-icon {
  width: 44px; height: 44px;
  background: rgba(200,121,65,0.12);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}
.lp-feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.lp-feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ── HOW IT WORKS ── */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; }
.lp-steps::before {
  content: '';
  position: absolute;
  top: 24px; left: calc(16.66% + 16px); right: calc(16.66% + 16px);
  height: 1px; background: linear-gradient(90deg, var(--accent), rgba(200,121,65,0.3), var(--accent));
  opacity: 0.4;
}
.lp-step { text-align: center; }
.lp-step-num {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), #E8A870);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #0F0D0A;
  margin: 0 auto 20px;
  position: relative; z-index: 1;
}
.lp-step h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.lp-step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ── GUIDES ── */
.lp-guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.lp-guide-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: border-color .2s, transform .2s, background .2s;
  display: flex; flex-direction: column; gap: 10px;
}
.lp-guide-card:hover { border-color: rgba(200,121,65,0.4); transform: translateY(-2px); background: var(--card); }
.lp-guide-num {
  font-size: 12px; font-weight: 700; color: var(--accent);
  letter-spacing: 1px; text-transform: uppercase;
}
.lp-guide-card h3 { font-size: 16px; font-weight: 600; color: var(--text); }
.lp-guide-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; flex: 1; }
.lp-guide-arrow { color: var(--accent); font-size: 18px; align-self: flex-end; opacity: 0.7; margin-top: 4px; }

/* ── COMMUNITY SECTION ── */
.lp-community-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.lp-community-text h2 { font-size: 40px; font-weight: 700; letter-spacing: -1px; margin-bottom: 16px; color: var(--text); }
.lp-community-text p { font-size: 17px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 28px; }
.lp-community-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lp-comm-stat {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
}
.lp-comm-stat-num { font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.lp-comm-stat-label { font-size: 13px; color: var(--text-muted); }
.lp-comm-features { display: flex; flex-direction: column; gap: 16px; }
.lp-comm-feat {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; background: var(--elevated);
  border: 1px solid var(--border); border-radius: 14px;
}
.lp-comm-feat-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(200,121,65,0.12); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 16px;
}
.lp-comm-feat-text h4 { font-size: 14px; font-weight: 600; margin-bottom: 3px; color: var(--text); }
.lp-comm-feat-text p { font-size: 13px; color: var(--text-secondary); }

/* ── CTA BAND ── */
.lp-cta-band {
  padding: 100px 0;
  text-align: center;
  background: radial-gradient(ellipse at 50% 100%, rgba(200,121,65,0.12) 0%, transparent 70%);
  position: relative; overflow: hidden;
}
.lp-cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C87941' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.lp-cta-band h2 { font-size: 48px; font-weight: 700; letter-spacing: -1.5px; margin-bottom: 16px; color: var(--text); }
.lp-cta-band p { font-size: 18px; color: var(--text-secondary); margin-bottom: 36px; }
.lp-cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
.lp-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 48px 0 32px;
}
.lp-footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.lp-footer-brand .lp-logo { font-size: 18px; margin-bottom: 12px; display: block; }
.lp-footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 240px; }
.lp-footer-col h4 { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 14px; }
.lp-footer-col a { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; transition: color .15s; cursor: pointer; }
.lp-footer-col a:hover { color: var(--accent); }
.lp-footer-bottom {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}

/* ── IN-APP GUIDES ── */
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.guide-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.guide-card:hover { border-color: rgba(200,121,65,0.4); transform: translateY(-1px); }
.guide-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.guide-card-icon {
  width: 40px; height: 40px;
  background: rgba(200,121,65,0.12); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.guide-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.guide-card-meta { font-size: 12px; color: var(--text-muted); }
.guide-card-body { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.guide-detail { max-width: 760px; }
.guide-step { display: flex; gap: 16px; margin-bottom: 24px; }
.guide-step-num {
  width: 28px; height: 28px; flex-shrink: 0;
  background: rgba(200,121,65,0.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 2px;
}
.guide-step-body h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.guide-step-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ── LP RESPONSIVE ── */
@media (max-width: 960px) {
  .lp-hero-inner { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .lp-hero-text { order: 1; }
  .lp-hero-visual { order: 2; }
  .lp-hero-sub { margin-left: auto; margin-right: auto; }
  .lp-h1 { font-size: 48px; }
  .lp-trust { justify-content: center; }
  .lp-hero-btns { justify-content: center; }
  .lp-phone-badge-1, .lp-phone-badge-2 { display: none; }
  .lp-features-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-guides-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .lp-stat:nth-child(2) { border-right: none; }
  .lp-community-inner { grid-template-columns: 1fr; }
  .lp-footer-inner { grid-template-columns: 1fr 1fr; }
  .lp-footer-brand { grid-column: 1/-1; }
}
@media (max-width: 640px) {
  .lp-navlinks { display: none; }
  .lp-h1 { font-size: 34px; letter-spacing: -0.5px; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
  .lp-hero-inner { padding: 48px 20px; }
  .lp-hero-sub { font-size: 15px; }
  .lp-features-grid { grid-template-columns: 1fr; }
  .lp-guides-grid { grid-template-columns: 1fr; }
  .lp-steps { grid-template-columns: 1fr; gap: 32px; }
  .lp-steps::before { display: none; }
  .lp-stats-inner { grid-template-columns: 1fr 1fr; }
  .lp-cta-band h2 { font-size: 28px; }
  .lp-footer-inner { grid-template-columns: 1fr; }
  .lp-container { padding: 0 16px; }
  .lp-nav-inner { padding: 0 14px; height: 56px; }
  .lp-section { padding: 56px 0; }
  .lp-section-header h2 { font-size: 26px; }
  /* Compact nav buttons on mobile */
  .lp-logo { font-size: 17px; margin-right: 8px; }
  .beta-badge { display: none; }
  .lp-lang-btn { padding: 4px 7px; font-size: 12px; gap: 3px; }
  .lp-lang-btn svg { display: none; }
  .lp-nav-btns { gap: 6px; }
  .lp-nav-btns .btn { padding: 6px 12px !important; font-size: 12px !important; }
}
@media (max-width: 400px) {
  .lp-h1 { font-size: 28px; }
  .lp-lang-picker { display: none; }
  .lp-nav-btns .btn { padding: 6px 10px !important; font-size: 11px !important; }
}
#landing-page { overflow-x: hidden; }

/* ============ AUTH ============ */
#auth-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
#auth-view::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,121,65,0.08) 0%, transparent 70%);
  top: -100px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.auth-container { width: 100%; max-width: 440px; position: relative; z-index: 1; }
.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}
.auth-brand-logo {
  font-size: 28px; font-weight: 700; color: var(--accent);
  letter-spacing: -1px; display: block; margin-bottom: 8px;
}
.auth-brand-tagline {
  font-size: 14px; color: var(--text-muted);
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}
.auth-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 9px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--elevated);
  color: var(--text);
}
.auth-error {
  background: rgba(217,96,96,0.12);
  border: 1px solid rgba(217,96,96,0.3);
  color: var(--red);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.auth-back { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }

/* ============ APP SHELL ============ */
#app { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

/* ── TOP NAVIGATION ── */
#app-topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(15,13,10,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  display: flex; align-items: center;
  max-width: 1640px; margin: 0 auto;
  padding: 0 24px; height: 60px; gap: 4px;
}
.topnav-logo {
  font-size: 18px; font-weight: 700;
  color: var(--accent); letter-spacing: -0.5px;
  cursor: pointer; flex-shrink: 0; margin-right: 20px;
}
.topnav-links {
  display: flex; align-items: center; flex: 1; gap: 2px; overflow: hidden;
}
.topnav-right {
  display: flex; align-items: center; gap: 2px; flex-shrink: 0; margin-left: 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .15s;
  white-space: nowrap; user-select: none;
  background: none; border: none; font-family: inherit;
  position: relative; text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { color: var(--accent); background: rgba(200,121,65,0.1); }
.topnav-secondary { font-size: 13px; color: var(--text-muted); }
.topnav-secondary:hover { color: var(--text-secondary); }
.nav-badge {
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 10px; padding: 1px 6px;
  min-width: 18px; text-align: center;
}
.topnav-icon-btn {
  position: relative; background: none; border: none;
  color: var(--text-muted); width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.topnav-icon-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.topnav-icon-btn.active { color: var(--accent); }
.topnav-user-wrap { position: relative; margin-left: 4px; }
.topnav-user-btn {
  background: none; border: none; cursor: pointer;
  padding: 2px; border-radius: 50%; display: flex;
  transition: opacity .15s;
}
.topnav-user-btn:hover { opacity: 0.8; }
.topnav-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; min-width: 200px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden; z-index: 300;
}
.topnav-dropdown-info {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.topnav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; color: var(--text-secondary); font-size: 14px;
  cursor: pointer; transition: background .15s; user-select: none;
}
.topnav-dropdown-item:hover { background: var(--elevated); color: var(--text); }
.topnav-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.topnav-signout { color: var(--red) !important; }
.topnav-signout:hover { background: rgba(217,96,96,0.08) !important; }
.topnav-hamburger {
  display: none; background: none; border: none;
  color: var(--text); padding: 8px; border-radius: 8px;
  cursor: pointer; margin-left: 4px;
}
.topnav-hamburger:hover { background: var(--elevated); }
.topnav-mobile-menu {
  border-top: 1px solid var(--border);
  padding: 8px 12px 12px; background: var(--card);
  display: flex; flex-direction: column; gap: 2px;
  max-height: calc(100vh - 60px); overflow-y: auto;
}
.topnav-mobile-menu .nav-item { padding: 10px 12px; font-size: 15px; }

/* ── APP BODY (main content + right sidebar) ── */
#app-body {
  display: flex; flex-direction: row;
  margin-top: 60px; flex: 1; overflow: hidden;
}

/* Main content */
#main-content {
  flex: 1; min-width: 0;
  overflow-y: auto; overflow-x: hidden;
  background: var(--bg);
}
.section { display: none; padding: 36px 40px; max-width: 1100px; margin: 0 auto; }
.section.active { display: block; }

/* ── RIGHT SIDEBAR ── */
#right-sidebar {
  width: 280px; flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--card);
  overflow-y: auto;
  height: 100%;
  padding: 20px 0;
  display: flex; flex-direction: column; gap: 0;
}
.rsb-widget {
  padding: 0 16px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.rsb-widget:last-child { border-bottom: none; }
.rsb-widget-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.rsb-widget-header span {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px;
}
.rsb-see-all {
  font-size: 12px; color: var(--accent); cursor: pointer;
  font-weight: 500;
}
.rsb-see-all:hover { color: var(--accent-hover); }
.rsb-content { display: flex; flex-direction: column; gap: 2px; }
.rsb-empty { font-size: 13px; color: var(--text-muted); padding: 4px 0; }

/* Chat messages in right sidebar */
.rsb-chat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.rsb-chat-item:hover { background: var(--elevated); }
.rsb-chat-info { flex: 1; min-width: 0; }
.rsb-chat-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.rsb-chat-preview {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rsb-chat-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.rsb-chat-unread {
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 8px;
  padding: 1px 5px; flex-shrink: 0;
}

/* Community posts in right sidebar */
.rsb-post-item {
  padding: 8px; border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.rsb-post-item:hover { background: var(--elevated); }
.rsb-post-author { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.rsb-post-title {
  font-size: 13px; font-weight: 500; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.rsb-post-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Stats in right sidebar */
.rsb-stat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px solid rgba(46,40,32,0.5);
}
.rsb-stat-row:last-child { border-bottom: none; }
.rsb-stat-label { font-size: 13px; color: var(--text-secondary); }
.rsb-stat-val { font-size: 14px; font-weight: 700; color: var(--accent); }

/* Sidebar notice items */
.rsb-notice-item {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--elevated);
  margin-bottom: 8px;
  word-break: break-word;
}
.rsb-notice-item:last-child { margin-bottom: 0; }
.rsb-notice-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.35; margin-bottom: 4px; }
.rsb-notice-body  { font-size: 12px; color: var(--text-secondary); line-height: 1.5; white-space: pre-wrap; }

/* Hide right sidebar on admin/advertiser (full-width layouts) */
#app-body.rsb-hidden #right-sidebar { display: none; }
#app-body.rsb-hidden #main-content .section { max-width: 1440px; }

/* ── MOBILE NOTICES BANNER ── */
#mobile-notices-banner {
  display: none;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 60px;
  z-index: 190;
}
.mob-notice-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--elevated);
  border-left: 3px solid var(--accent);
}
.mob-notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.mob-notice-title { font-size: 13px; font-weight: 600; color: var(--text); }
.mob-notice-body { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mob-notice-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; }
.mob-notice-dismiss {
  flex-shrink: 0;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 16px; line-height: 1;
  padding: 2px 4px; border-radius: 4px;
  transition: color .15s, background .15s;
  margin-left: 4px; margin-top: -2px;
  align-self: flex-start;
}
.mob-notice-dismiss:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ── MOBILE BOTTOM NAV ── */
#mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 58px;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 150;
  flex-direction: row;
  align-items: stretch;
}
.mbn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-decoration: none;
  transition: color .15s;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.mbn-item:hover, .mbn-item.active { color: var(--accent); }
.mbn-item svg { flex-shrink: 0; }
.mbn-more { position: relative; }
.mbn-more-badge {
  position: absolute;
  top: 8px; right: calc(50% - 18px);
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: 10px; padding: 1px 5px;
  min-width: 16px; text-align: center;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 1200px) {
  #right-sidebar { display: none; }
  .topnav-hamburger { display: flex; }
  #mobile-notices-banner { display: flex; }
}
@media (min-width: 1201px) {
  #mobile-notices-banner { display: none !important; }
  #mobile-bottom-nav { display: none !important; }
}
@media (max-width: 768px) {
  #mobile-bottom-nav { display: flex; }
  #app-body { padding-bottom: 58px; }
  .topnav-hamburger { display: none; }
  .app-footer { display: none; }
  .section { padding: 20px 14px; }
  .tab-bar {
    max-width: 100%;
    mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c04040; }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--elevated); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--elevated); color: var(--text); }

/* ============ FORMS ============ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select { appearance: none; cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.form-check-label { font-size: 14px; color: var(--text-secondary); }

/* ============ MODAL ============ */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#modal-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.modal-close-btn:hover { color: var(--text); background: var(--elevated); }
#modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
#modal-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ============ TOAST ============ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  pointer-events: all;
  animation: toastIn 0.2s ease;
  max-width: 320px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============ IMAGE VIEWER ============ */
#image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-viewer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
#image-viewer-img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }

/* ============ CARDS ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.card-elevated {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

/* ============ PAGE LAYOUT ============ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ STATS ROW ============ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.stat-num { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* ============ TABS ============ */
.tab-bar {
  display: flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  width: 100%;
  max-width: fit-content;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--elevated);
  color: var(--text);
}
.tab-btn:hover:not(.active) { color: var(--text-secondary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-accent { background: rgba(200,121,65,0.2); color: var(--accent); }
.badge-green { background: rgba(77,158,90,0.2); color: var(--green); }
.badge-red { background: rgba(217,96,96,0.2); color: var(--red); }
.badge-blue { background: rgba(74,127,165,0.2); color: var(--blue); }
.badge-muted { background: var(--elevated); color: var(--text-muted); }
.badge-admin { background: rgba(217,96,96,0.2); color: var(--red); }
.badge-moderator { background: rgba(74,127,165,0.2); color: var(--blue); }
.badge-advertiser { background: rgba(200,121,65,0.2); color: var(--accent); }

/* ============ AVATAR ============ */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-initials {
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state-title { font-size: 18px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-text { font-size: 14px; line-height: 1.5; }

/* ============ SPINNER ============ */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center {
  display: flex;
  justify-content: center;
  padding: 48px;
}

/* ============ LIST ============ */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }

/* ============ TOOLBAR ============ */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar .form-input { flex: 1; min-width: 200px; max-width: 320px; }
.toolbar .form-select { min-width: 140px; width: auto; }

/* ============ GRID LAYOUTS ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ============ ADMIN ============ */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

/* ============ FINDS GRID ============ */
.finds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.find-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.find-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.find-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}
.find-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.find-info { padding: 14px; }
.find-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.find-date { font-size: 12px; color: var(--text-muted); }
.find-card-actions { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ============ SESSION CARD ============ */
.session-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.session-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  gap: 16px;
}
.session-card-header:hover { background: var(--elevated); }
.session-name { font-size: 15px; font-weight: 600; color: var(--text); }
.session-meta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.session-meta-item { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.session-chevron { color: var(--text-muted); font-size: 18px; flex-shrink: 0; transition: transform 0.2s; }
.session-chevron.open { transform: rotate(90deg); }
.session-detail { padding: 0 20px 20px; border-top: 1px solid var(--border); }

/* ============ GROUP CARD ============ */
.group-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
}
.group-card:hover { border-color: var(--accent); }
.group-cover { height: 100px; background: var(--elevated); overflow: hidden; }
.group-cover img { width: 100%; height: 100%; object-fit: cover; }
.group-card-body { padding: 16px; }
.group-card-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.group-card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.group-card-footer { display: flex; align-items: center; justify-content: space-between; }
.group-member-count { font-size: 12px; color: var(--text-muted); }

/* ============ CHAT ============ */
.chat-layout { display: flex; height: calc(100vh - 60px); gap: 0; margin: -36px -40px; }
.chat-sidebar { width: 300px; border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; background: var(--card); }
.chat-sidebar-header { padding: 16px; border-bottom: 1px solid var(--border); }
.chat-convo-list { flex: 1; overflow-y: auto; }
.chat-convo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(46,40,32,0.5);
  transition: background 0.15s;
}
.chat-convo-item:hover { background: var(--elevated); }
.chat-convo-item.active { background: rgba(200,121,65,0.1); border-left: 2px solid var(--accent); }
.chat-convo-info { flex: 1; min-width: 0; }
.chat-convo-name { font-size: 14px; font-weight: 600; color: var(--text); }
.chat-convo-preview { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-convo-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-convo-time { font-size: 11px; color: var(--text-muted); }

.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; background: var(--card); flex-shrink: 0; }
.chat-header-name { font-size: 15px; font-weight: 700; color: var(--text); }

/* Messages scroll area */
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 20px 20px 8px;
  display: flex; flex-direction: column;
  gap: 0;
  background: var(--bg);
}

/* Message row wrapper */
.chat-msg-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}
.chat-msg-row.gap-top { margin-top: 12px; }

/* Avatar + bubble row */
.chat-msg-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.chat-msg-row.own .chat-msg-inner { flex-direction: row-reverse; }

/* Avatar placeholder (keeps spacing for grouped messages) */
.chat-avatar-slot { width: 28px; flex-shrink: 0; }

/* Sender name (group/project chats) */
.chat-sender-label {
  font-size: 11px; font-weight: 700;
  color: var(--accent);
  margin-left: 36px;
  margin-bottom: 3px;
}

/* The bubble itself */
.chat-bubble {
  padding: 9px 13px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 420px;
  word-break: break-word;
  position: relative;
}
.chat-msg-row.own .chat-bubble {
  background: var(--accent);
  color: #fff;
}
.chat-msg-row.other .chat-bubble {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
/* Radius per position in group */
.chat-bubble.r-solo-own    { border-radius: 18px 18px 4px 18px; }
.chat-bubble.r-solo-other  { border-radius: 18px 18px 18px 4px; }
.chat-bubble.r-top-own     { border-radius: 18px 18px 4px 4px; }
.chat-bubble.r-top-other   { border-radius: 18px 18px 4px 4px; }
.chat-bubble.r-mid-own     { border-radius: 4px 18px 4px 4px; }
.chat-bubble.r-mid-other   { border-radius: 18px 4px 4px 4px; }
.chat-bubble.r-bot-own     { border-radius: 4px 18px 4px 18px; }
.chat-bubble.r-bot-other   { border-radius: 18px 4px 18px 4px; }

.chat-bubble.deleted {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted); font-style: italic;
  border-radius: 10px !important;
}

/* Timestamp — hidden, revealed on row hover */
.chat-bubble-time {
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 4px 0;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.chat-msg-row.own  .chat-bubble-time { text-align: right; }
.chat-msg-row.other .chat-bubble-time { text-align: left; margin-left: 36px; }
.chat-msg-row:hover .chat-bubble-time { opacity: 1; }

/* Timestamp divider (date change) */
.chat-date-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin: 16px 0 10px;
  position: relative;
}
.chat-date-divider::before, .chat-date-divider::after {
  content: '';
  position: absolute;
  top: 50%; width: calc(50% - 60px);
  height: 1px;
  background: var(--border);
}
.chat-date-divider::before { left: 0; }
.chat-date-divider::after { right: 0; }

/* Admin three-dot message action button */
.msg-admin-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.3;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  align-self: center;
  flex-shrink: 0;
}
.chat-msg-row:hover .msg-admin-btn { opacity: 1; }
.msg-admin-btn:hover { background: var(--elevated); color: var(--text-primary); }

/* Admin chat viewer sidebar items */
.admin-cv-item {
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.admin-cv-item:hover { background: var(--elevated); }
.admin-cv-item.active { background: var(--elevated); border-color: var(--accent); }

/* Input bar */
.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-end;
  background: var(--card); flex-shrink: 0;
}
.chat-input-bar .form-textarea { min-height: 40px; max-height: 120px; resize: none; flex: 1; }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 14px; }

/* legacy classes kept for compat */
.chat-msg { display: none; }
.chat-msg-meta { display: none; }
.chat-sender-name { display: none; }

/* ============ COMMUNITY POST ============ */
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-author { font-size: 14px; font-weight: 700; color: var(--text); }
.post-username { font-size: 12px; color: var(--text-muted); }
.post-time { font-size: 12px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }
.post-content { font-size: 15px; color: var(--text); line-height: 1.6; margin-bottom: 12px; white-space: pre-wrap; word-break: break-word; }
.post-image { border-radius: 8px; overflow: hidden; margin-bottom: 12px; cursor: pointer; }
.post-image img { width: 100%; max-height: 400px; object-fit: cover; }
.post-actions { display: flex; gap: 12px; align-items: center; }
.post-vote-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.post-vote-btn:hover { border-color: var(--accent); color: var(--text); }
.post-vote-btn.active-like { background: rgba(77,158,90,0.15); border-color: var(--green); color: var(--green); }
.post-vote-btn.active-dislike { background: rgba(217,96,96,0.15); border-color: var(--red); color: var(--red); }
.post-hidden { background: var(--elevated); border-radius: 8px; padding: 12px 16px; color: var(--text-muted); font-size: 13px; display: flex; align-items: center; justify-content: space-between; }

/* ============ PROFILE ============ */
.profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.profile-info { flex: 1; }
.profile-name { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.profile-username { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.profile-bio { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.profile-meta { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.profile-meta-item { font-size: 13px; color: var(--text-muted); }

/* ============ EQUIPMENT CARD ============ */
.equipment-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.equipment-info { flex: 1; }
.equipment-name { font-size: 15px; font-weight: 600; color: var(--text); }
.equipment-meta { font-size: 13px; color: var(--text-muted); }
.equipment-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ============ NOTIFICATION ============ */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s;
}
.notif-item:hover { opacity: 0.8; }
.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 16px;
}
.notif-content { flex: 1; }
.notif-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-body { font-size: 13px; color: var(--text-muted); }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 4px; }

/* ============ DETAIL GRID ============ */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-item label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; display: block; margin-bottom: 4px; }
.detail-item span { font-size: 15px; color: var(--text); }

/* ============ TABLE ============ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px 14px; font-size: 14px; color: var(--text); border-bottom: 1px solid rgba(46,40,32,0.5); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--elevated); }

/* ============ MAP CONTAINER ============ */
.leaflet-map { border-radius: 10px; overflow: hidden; }
.leaflet-container { background: #1a1a1a; }

/* ============ SECTION HEADER ============ */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 16px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-size: 12px; }

/* ============ PROGRESS BAR ============ */
.progress-bar { background: var(--elevated); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; }

/* ============ PROJECT CREATION WIZARD ============ */
.wizard-container { max-width: 900px; margin: 0 auto; }
.wizard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.wizard-steps-bar { display: flex; align-items: center; gap: 4px; }
.wizard-step-item { display: flex; align-items: center; gap: 10px; }
.wizard-step-item span { font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.wizard-step-item.active span { color: var(--text); font-weight: 600; }
.wizard-step-item.done span { color: var(--text-secondary); }
.wizard-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--elevated); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.wizard-step-item.active .wizard-step-num { background: var(--accent); color: #0F0D0A; }
.wizard-step-item.done .wizard-step-num { background: rgba(200,121,65,0.2); color: var(--accent); }
.wizard-step-line { width: 40px; height: 1px; background: var(--border); margin: 0 4px; }
.wizard-step-header { margin-bottom: 32px; }
.wizard-form { max-width: 600px; }
.wizard-accordion summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); list-style: none; padding: 12px 0; border-top: 1px solid var(--border); }
.wizard-accordion summary::-webkit-details-marker { display: none; }
.wizard-accordion[open] summary { padding-bottom: 0; }
.wizard-accordion-body { padding: 16px 0 4px; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
/* Zone step layout */
.wizard-zone-layout { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.wizard-zone-map-wrap { min-height: 460px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.wizard-draw-hint { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: rgba(200,121,65,0.07); border: 1px solid rgba(200,121,65,0.2); border-radius: 10px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-top: 20px; }
/* Add Zone combined modal */
.zone-add-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.zone-add-form { overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 0; }
@media (max-width: 900px) {
  .wizard-zone-layout { grid-template-columns: 1fr; }
  .wizard-steps-bar { display: none; }
  .zone-add-layout { grid-template-columns: 1fr; }
  .wizard-zone-map-wrap { min-height: 320px; }
}

/* ============ MAP FULLSCREEN ============ */
.map-fullscreen {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100vw !important; height: 100vh !important;
  z-index: 9000; border-radius: 0 !important;
}
.leaflet-fullscreen-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px !important; height: 30px !important;
  font-size: 16px; cursor: pointer;
  background: #fff; border: none;
}
.leaflet-fullscreen-btn:hover { background: #f4f4f4; }
.leaflet-clear-btn {
  font-size: 12px !important; padding: 0 8px !important;
  white-space: nowrap; cursor: pointer; line-height: 26px !important;
  background: #fff; border: none; color: #c00; font-weight: 600;
}
.leaflet-clear-btn:hover { background: #fff0f0; }
.zone-other-legend { display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted);margin-top:8px; }
.zone-other-legend input { cursor:pointer; }
/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .topnav-links { display: none; }
  .topnav-secondary { display: none; }
  .topnav-hamburger { display: none !important; }
  .topnav-right { margin-left: auto; }
  .section { padding: 24px 16px; }
  .chat-layout { flex-direction: column; height: auto; margin: -24px -16px; }
  .chat-sidebar { width: 100%; height: 260px; border-right: none; border-bottom: 1px solid var(--border); }
  .chat-main { height: 500px; }
  .finds-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .profile-hero { flex-direction: column; }
  #modal-box { max-height: 95vh; }
}
@media (max-width: 480px) {
  .finds-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .section { padding: 16px 14px; }
  .topnav-inner { padding: 0 14px; }
}

/* ============ MISC UTILS ============ */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.danger-zone { border: 1px solid rgba(217,96,96,0.3); border-radius: 12px; padding: 20px; margin-top: 24px; }
.danger-zone-title { font-size: 14px; font-weight: 700; color: var(--red); margin-bottom: 12px; }
.create-post-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.image-upload-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.image-preview-item { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; }
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-remove { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,0.7); border: none; color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.invite-code-box { background: var(--elevated); border: 1px dashed var(--border); border-radius: 8px; padding: 12px 16px; font-family: monospace; font-size: 16px; letter-spacing: 2px; color: var(--accent); display: flex; align-items: center; justify-content: space-between; }
.answers-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.answer-card { background: var(--elevated); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.answer-card.accepted { border-color: var(--green); background: rgba(77,158,90,0.08); }

/* ============ APP FOOTER (logged-in) ============ */
.app-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  flex-shrink: 0;
}
.app-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}
.app-footer-logo {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-footer-links {
  display: flex;
  gap: 20px;
}
.app-footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.app-footer-links a:hover { color: var(--accent); }
.app-footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ CHAT UNREAD DIVIDER ============ */
.chat-unread-divider {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  margin: 16px 0 10px;
  position: relative;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.chat-unread-divider::before, .chat-unread-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 64px);
  height: 1px;
  background: var(--blue);
  opacity: 0.3;
}
.chat-unread-divider::before { left: 0; }
.chat-unread-divider::after { right: 0; }
