/* ═══════════════════════════════════════════════════
   main.css — Pennd unified styles (Bootstrap 5)
   Topbar + sidebar layout, dark mode, shelf carousel,
   trailer carousel, book popup, discussions, footer
   ═══════════════════════════════════════════════════ */

/* == CSS Variables == */
:root {
  --bg:            #FAF7F2;
  --bg-card:       #FFFFFF;
  --bg-dark:       #1A1A1A;
  --text:          #2C2C2C;
  --muted:         #6F6F6F;
  --accent:        #26211c;
  --accent-hover:  #A87B55;
  --border:        #E8E2D9;
  --nav-line:      #E8E2D9;
  --card:          #FFFFFF;
  --hero-fade:     250,247,242;
  --nav-link:      #4A3F35;
  --nav-link-hover:#2C2C2C;
  --nav-active:    #7A4F2A;
  --topbar-h:      64px;
  --sidebar-w:     240px;
  --grain-opacity: 0.04;
  --font-sans:     'DM Sans', system-ui, sans-serif;
  --font-serif:    'Libre Baskerville', Georgia, serif;
  --font-mono:     'DM Mono', monospace;
  --pcc-activity-text:#074f16;
}

body.dark-mode {
  --bg:            #14120f;
  --bg-card:       #1e1b16;
  --text:          #e8e2d9;
  --muted:         #e2d5bf;
  --border:        #2e2a22;
  --nav-line:      #2e2a22;
  --card:          #1e1b16;
  --hero-fade:     20,18,15;
  --nav-link:      #c8c0b0;
  --nav-link-hover:#e8e2d9;
  --nav-active:    #C4956A;
  --accent:        #C4956A;
  --accent-hover:  #d4a87a;
  --grain-opacity: 0.06;
  --pcc-activity-text:#5aab6a;
}

/* == Base == */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  padding-top: var(--topbar-h);
  line-height: 1.6;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

.page, footer { position: relative; z-index: 1; }

/* == Topbar == */
.topbar {
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--nav-line);
}
.topbar-inner {
  height: 100%; width: 100%;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-left  { display:flex; align-items:center; gap:16px; }
.topbar-center { flex:1; display:flex; justify-content:center; }
.topbar-right { display:flex; align-items:center; gap:16px; }

.icon-btn {
  width:36px; height:36px; border:none; border-radius:50%;
  background:transparent; color:var(--text);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.icon-btn:hover { background:rgba(127,127,127,.12); }

.brand {
  display:inline-flex; align-items:center; gap:10px;
  color:var(--text); text-decoration:none; font-weight:800;
}
.brand img { height:28px; }
body.dark-mode .brand img { filter:brightness(0) invert(1); }

.topbar-search {
  flex:1; display:flex; align-items:center; max-width:560px;
  border:1px solid var(--nav-line); border-radius:999px; overflow:hidden;
  background:var(--card); backdrop-filter:blur(10px);
}
.topbar-search-input {
  flex:1; border:none; outline:none;
  padding:.5rem .9rem; background:transparent; color:var(--text);
}
.topbar-search-btn {
  border:none; width:44px; height:38px;
  background:transparent; color:var(--text); cursor:pointer;
}

.topbar-link { color:var(--nav-link); text-decoration:none; font-weight:600; font-size:.85rem; font-family:var(--font-mono); text-transform:uppercase; letter-spacing:0.05em; }
.topbar-link:hover { color:var(--nav-link-hover); text-decoration:none; }
.topbar-sep  { opacity:.5; }

/* Flash alerts positioned below topbar */
.flash-alert {
  position:fixed; top:calc(var(--topbar-h) + 8px);
  left:50%; transform:translateX(-50%);
  z-index:1200; min-width:320px; max-width:90vw;
}

/* == Theme toggle == */
.theme-toggle {
  background:none; border:none; cursor:pointer;
  padding:.25rem .4rem; font-size:1.25rem; color:var(--nav-link);
}
body.dark-mode .theme-toggle i.fa-sun  { color:#ffd86b; }
body:not(.dark-mode) .theme-toggle i.fa-moon { color:#6c8cff; }

/* == Sidebar == */
.sidebar {
  position:fixed; top:var(--topbar-h); left:0;
  height:calc(100vh - var(--topbar-h)); width:var(--sidebar-w);
  background:var(--bg); border-right:1px solid var(--nav-line);
  padding:12px 10px; overflow-y:auto;
  transition:transform .25s ease;
}
.sidebar-nav { display:flex; flex-direction:column; gap:4px; }

.sidebar-link {
  display:flex; align-items:center; gap:12px;
  padding:10px 12px; border-radius:8px;
  color:var(--nav-link); text-decoration:none; font-weight:500;
  font-family:var(--font-sans); font-size:.9rem;
  transition:background .15s, color .15s;
}
.sidebar-link i { width:20px; text-align:center; }
.sidebar-link:hover { background:rgba(127,127,127,.10); color:var(--nav-link-hover); }
.sidebar-link.active { background:rgba(122,79,42,.12); color:var(--nav-active); }

/* ── Admin submenu ── */
.sidebar-submenu { padding-left:8px; }
.sidebar-sublink {
  padding:7px 12px; font-size:.85rem;
  border-left:2px solid var(--nav-line);
  border-radius:0 6px 6px 0; margin-bottom:2px;
}
.sidebar-sublink:hover { border-left-color:var(--accent); }
.sidebar-dropdown-toggle { display:flex; align-items:center; gap:12px; }

.sidebar.is-collapsed { transform:translateX(calc(-1 * var(--sidebar-w))); }

/* == Page wrapper (pushes content right of sidebar) == */
.page {
  margin-left:var(--sidebar-w);
  transition:margin-left .25s ease;
  min-height:calc(100vh - var(--topbar-h));
  display:flex; flex-direction:column;
}
.page main,
.page > .container-fluid,
.page > .content-wrap { flex:1; }
.page.is-expanded { margin-left:0; }

.content-wrap { width:min(1200px, 92vw); margin:0 auto; }


/* ── MOBILE SIDEBAR FIX ── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    height: calc(100vh - var(--topbar-h));
    z-index: 1040;
    transform: translateX(0);
    transition: transform .25s ease;
    overflow-y: auto;
  }

  /* Collapsed = hidden off screen */
  .sidebar.is-collapsed {
    transform: translateX(-100%);
  }

  /* Content always full width on mobile */
  .page {
    margin-left: 0 !important;
    padding-top: var(--topbar-h);
  }

  /* Override is-expanded doing nothing on mobile */
  .page.is-expanded {
    margin-left: 0 !important;
  }

  /* Backdrop */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--topbar-h);
    background: rgba(0,0,0,.45);
    z-index: 1039;
  }
  .sidebar-backdrop.is-open {
    display: block;
  }
}

@media (min-width: 769px) {
  .page {
    padding-top: var(--topbar-h);
  }
}

/* == Three.js hero canvas == */
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 2;
  display: block;
  pointer-events: none;
}

/* == Hero == */
.home-wrap {
  position:relative; width:100%;
  height:min(90vh,700px); min-height:480px; overflow:hidden;
  background: transparent;
}
.home-inner { display:none; }
.home-wrap::before { display:none; }
.home-wrap::after  { display:none; }
.caption {
  position:absolute; inset:0; z-index:10;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; color:#fff; padding:0 1rem;
}
.caption h1 { font-family: var(--font-serif); font-size:3.2rem; font-weight:700; font-style:italic; margin-bottom:.5rem; color:var(--text); text-shadow:none; }
.caption h3 { font-family: var(--font-sans); font-size:1.1rem; font-weight:500; letter-spacing:0.06em; text-transform:uppercase; margin-bottom:1rem; color:var(--muted); text-shadow:none; }
.caption p  { max-width:780px; font-size:1rem; opacity:.75; color:var(--text); font-family:var(--font-sans); }

.caption-eyebrow {
  font-family: var(--font-mono); font-size:.75rem; font-weight:500;
  text-transform:uppercase; letter-spacing:.12em; color:var(--accent);
  margin-bottom:1rem; opacity:1 !important;
}
.caption-sub {
  font-family: var(--font-sans); font-size:1rem; color:var(--muted);
  opacity:1 !important; max-width:540px; margin:0 auto .25rem; line-height:1.7;
}

.hero-btn {
  display:inline-block; padding:.75rem 1.8rem; border-radius:4px;
  font-weight:500; font-size:.85rem; font-family:var(--font-mono);
  text-transform:uppercase; letter-spacing:0.06em;
  border:none;
  background: #7A4F2A;
  color:#fff;
  box-shadow:0 4px 16px rgba(196,149,106,.35);
  transition:all .25s ease; text-decoration:none;
}
.hero-btn:hover { transform:translateY(-3px); color:#fff; background: #5C3A1E; box-shadow:0 10px 30px rgba(196,149,106,.45); }

/* == Shelf section == */
.shelf-section { padding:2.5rem 0; }
.shelf-header {
  display:flex; justify-content:space-between; align-items:center;
  padding-bottom:.75rem; border-bottom:1px solid var(--nav-line); margin-bottom:1.5rem;
}
.shelf-title {
  font-family: var(--font-serif);
  font-style:italic; font-weight:700; font-size:1.6rem; margin:0;
}
.shelf-seeall { color:var(--text); text-decoration:underline; font-size:.9rem; }

.shelf-wrap { position:relative; }
.shelf-wrap::before, .shelf-wrap::after {
  content:''; position:absolute; top:0; bottom:0; width:56px;
  pointer-events:none; z-index:4;
}
.shelf-wrap::before { left:0;  background:linear-gradient(to right, var(--bg), transparent); }
.shelf-wrap::after  { right:0; background:linear-gradient(to left,  var(--bg), transparent); }

.shelf {
  display:grid; grid-auto-flow:column;
  grid-auto-columns:clamp(140px,18vw,180px);
  gap:clamp(14px,2.4vw,28px);
  overflow-x:auto; overflow-y:visible;
  padding:20px clamp(40px,6vw,60px);
  scroll-behavior:smooth; scrollbar-width:none;
}
.shelf::-webkit-scrollbar { display:none; }

/* == Book card == */
.book-card { text-align:center; cursor:pointer; transition:transform .3s ease; position:relative; }
.book-cover {
  width:clamp(110px,14vw,150px); height:clamp(170px,20vw,220px);
  object-fit:cover; box-shadow:0 10px 25px rgba(0,0,0,.18);
  transition:transform .35s ease, box-shadow .35s ease, filter .35s ease;
}
.book-title  { font-size:.95rem; font-weight:700; margin:14px 0 6px; line-height:1.2; }
.book-author { display:inline-block; font-size:.9rem; color:var(--muted); text-decoration:underline; }

.book-card:hover             { transform:translateY(-6px); }
.book-card:hover .book-cover { transform:scale(1.03); filter:brightness(1.06) saturate(1.05); }
body:not(.dark-mode) .book-card:hover .book-cover { box-shadow:0 10px 25px rgba(78,11,11,.4); }
body.dark-mode       .book-card:hover .book-cover { box-shadow:0 12px 30px rgba(255,255,255,.6); }

/* == Shelf arrows == */
.shelf-arrow {
  position:absolute; top:50%; transform:translateY(-50%);
  width:42px; height:42px; border:none; border-radius:999px;
  background:var(--card); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:5; opacity:.6; transition:all .25s ease;
}
.shelf-arrow.left  { left:8px; }
.shelf-arrow.right { right:8px; }
.shelf-arrow i { font-size:1.2rem; color:var(--text); }
.shelf-arrow:hover { opacity:1; transform:translateY(-50%) translateY(-3px); box-shadow:0 8px 20px rgba(0,0,0,.25); }
.shelf-arrow[disabled] { opacity:0; pointer-events:none; }

/* == Genre badges == */
.genre-badge {
  border-radius:999px; font-size:.85rem;
  border-color:var(--nav-line); color:var(--text);
}
.genre-badge:hover { background:var(--accent); border-color:var(--accent); color:#fff; }

/* == Book-to-Screen carousel (Bootstrap 5) == */
/* == Book to Screen - card style == */
.trailer-carousel { max-width:100%; }
.trailer-item {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 4px 20px rgba(0,0,0,.06);
  transition:box-shadow .2s;
}
.trailer-item:hover { box-shadow:0 8px 28px rgba(0,0,0,.1); }
.trailer-grid {
  display:grid; grid-template-columns:280px 1fr;
  min-height:360px;
}
/* Left - book poster */
.trailer-player {
  position:relative; overflow:hidden;
  background:#1a1410;
}
/* Right - info panel */
.trailer-side {
  padding:1.75rem 1.75rem 1.5rem;
  display:flex; flex-direction:column; gap:0;
  background:var(--bg-card);
}
.trailer-info { display:flex; flex-direction:column; gap:0.65rem; height:100%; }
.trailer-title {
  font-family:var(--font-serif); font-size:1.4rem; font-weight:700;
  color:var(--text); margin:0; line-height:1.25;
}
.trailer-meta { display:flex; gap:0.4rem; flex-wrap:wrap; }
.chip {
  font-size:0.72rem; padding:0.2rem 0.65rem; border-radius:999px;
  border:1px solid var(--border); color:var(--text-muted);
  background:transparent; font-family:var(--font-mono);
}
.trailer-director {
  font-size:0.82rem; color:var(--text-muted);
  display:flex; align-items:center; gap:0.4rem;
}
.trailer-desc {
  font-size:0.9rem; line-height:1.6; color:var(--text);
  margin:0; flex:1;
  display:-webkit-box; -webkit-line-clamp:3; line-clamp:3;
  -webkit-box-orient:vertical; overflow:hidden;
}
.trailer-book-ref {
  font-size:0.8rem; color:var(--text-muted);
  display:flex; align-items:center; gap:0.4rem; flex-wrap:wrap;
  padding-top:0.65rem; border-top:1px solid var(--border);
}
.trailer-book-ref em { font-style:italic; color:var(--text); }
.trailer-cta {
  display:inline-flex; align-items:center;
  padding:0.5rem 1.1rem; border-radius:8px;
  border:1px solid var(--border); background:transparent;
  color:var(--text); font-size:0.82rem; font-family:var(--font-mono);
  text-decoration:none; transition:all 0.15s; align-self:flex-start;
  margin-top:auto;
}
.trailer-cta:hover {
  background:var(--accent-hover); border-color:var(--accent); color:#14120f; text-decoration:none;
}
/* carousel nav arrows */
.trailer-carousel .carousel-control-prev,
.trailer-carousel .carousel-control-next {
  width:40px; height:40px; top:50%; transform:translateY(-50%);
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:50%; opacity:1;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.trailer-carousel .carousel-control-prev { left:-20px; }
.trailer-carousel .carousel-control-next { right:-20px; }
.trailer-carousel .carousel-control-prev-icon,
.trailer-carousel .carousel-control-next-icon { filter:invert(0.5); }
.trailer-carousel .carousel-indicators { bottom:-28px; }
.trailer-carousel .carousel-indicators [data-bs-target] {
  background-color:var(--accent); opacity:0.4; width:6px; height:6px; border-radius:50%; border:none;
}
.trailer-carousel .carousel-indicators .active { opacity:1; }
/* Responsive */
@media (max-width:768px) {
  .trailer-grid { grid-template-columns:1fr; }
  .trailer-player { height:220px; position:relative; }
  .trailer-side { padding:1.25rem; }
}

/* == Quick-add popup (bestsellers) == */
.quick-add-btn {
  position:absolute; top:10px; right:10px; z-index:2;
  padding:6px 10px; font-size:.82rem; border-radius:10px;
  border:1px solid rgba(255,255,255,.20); background:rgba(0,0,0,.45);
  color:#fff; backdrop-filter:blur(8px);
  opacity:0; transform:translateY(-2px);
  transition:opacity .18s ease, transform .18s ease;
}
.book-card:hover .quick-add-btn,
.book-card:focus-within .quick-add-btn { opacity:1; transform:translateY(0); }

.img-popup-container {
  position:fixed; inset:0; z-index:2000;
  display:flex; align-items:center; justify-content:center;
  padding:22px; background:rgba(0,0,0,.55);
}
.book-popup {
  position:relative; width:min(860px,94vw);
  border-radius:18px; padding:18px;
  display:grid; grid-template-columns:240px 1fr; gap:18px;
  background:rgba(15,20,24,.78); border:1px solid rgba(255,255,255,.10);
  box-shadow:0 24px 80px rgba(0,0,0,.55); backdrop-filter:blur(14px); color:#fff;
}
body:not(.dark-mode) .book-popup {
  background:rgba(255,255,255,.92); border:1px solid rgba(0,0,0,.12);
  box-shadow:0 24px 70px rgba(0,0,0,.22); color:var(--text);
}
.book-popup-close {
  position:absolute; top:12px; right:12px;
  width:38px; height:38px; border-radius:12px;
  border:1px solid rgba(255,255,255,.18); background:rgba(0,0,0,.35);
  color:#fff; font-size:24px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
body:not(.dark-mode) .book-popup-close { border-color:rgba(0,0,0,.12); background:rgba(0,0,0,.06); color:var(--text); }
.book-popup-left { display:flex; flex-direction:column; gap:12px; }
.book-popup-cover img { width:100%; aspect-ratio:2/3; object-fit:cover; border-radius:14px; }
.book-popup-right { min-width:0; display:flex; flex-direction:column; gap:8px; padding-right:6px; }
.book-popup-title  { font-size:1.25rem; font-weight:800; }
.book-popup-author { opacity:.85; }
.book-popup-genre  { display:inline-block; margin-top:6px; padding:2px 10px; border-radius:99px; font-size:.75rem; font-weight:600; letter-spacing:.04em; background:var(--accent-light,rgba(120,80,40,.1)); color:var(--accent); }
.book-popup-price  { font-weight:800; margin-top:4px; }
.book-popup-desc   { margin-top:4px; line-height:1.35; opacity:.9; font-size:0.85rem;
  display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
/* Status section */
.book-popup-controls { margin-top:auto; display:flex; flex-direction:column; gap:10px; }
.book-popup-label { font-size:0.7rem; text-transform:uppercase; letter-spacing:0.07em; opacity:0.6; margin-bottom:2px; }
.book-popup-status-section, .book-popup-lists-section { display:flex; flex-direction:column; gap:4px; }
.book-popup-status-row { display:flex; gap:6px; flex-wrap:wrap; }
.book-popup-status-btn {
  padding:5px 12px; border-radius:999px; font-size:0.78rem; cursor:pointer;
  border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.06);
  color:inherit; transition:all 0.15s;
}
.book-popup-status-btn:hover { background:rgba(255,255,255,.14); }
.book-popup-status-btn.active { background:var(--accent); border-color:var(--accent); color:#14120f; font-weight:600; }
body:not(.dark-mode) .book-popup-status-btn { border-color:rgba(0,0,0,.15); background:rgba(0,0,0,.04); }
body:not(.dark-mode) .book-popup-status-btn:hover { background:rgba(0,0,0,.08); }
/* Custom list rows */
.book-popup-list-row { display:flex; align-items:center; justify-content:space-between; gap:8px;
  font-size:0.82rem; padding:3px 0; border-bottom:1px solid rgba(127,127,127,.1); }
.book-popup-list-row:last-child { border-bottom:none; }
.book-popup-list-add {
  flex-shrink:0; padding:3px 10px; border-radius:6px; font-size:0.72rem; cursor:pointer;
  border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.06); color:inherit;
  transition:all 0.15s;
}
.book-popup-list-add:hover { background:rgba(255,255,255,.14); }
.book-popup-list-add.added { background:var(--accent); border-color:var(--accent); color:#14120f; cursor:default; }
body:not(.dark-mode) .book-popup-list-add { border-color:rgba(0,0,0,.15); background:rgba(0,0,0,.04); }
/* Action buttons */
.book-popup-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:2px; }
.book-popup-btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:9px 14px; border-radius:10px;
  border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06);
  color:inherit; text-decoration:none; cursor:pointer; font-size:0.85rem;
}
.book-popup-btn.primary { background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.22); }
body:not(.dark-mode) .book-popup-btn { border-color:rgba(0,0,0,.12); background:rgba(0,0,0,.04); }
@media (max-width:820px) {
  .book-popup { grid-template-columns:1fr; }
  .book-popup-left { flex-direction:row; align-items:flex-start; }
  .book-popup-cover img { width:130px; }
}

/* == Recent Reviews == */
.reviews-section { margin-top:2.5rem; padding-bottom:3rem; }
.reviews-grid-home {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));
  gap:1.25rem; margin-top:1.5rem;
}
.review-card-home {
  background:var(--bg-card); border:1px solid var(--border); border-radius:8px;
  padding:1.25rem; transition:box-shadow .2s, transform .2s;
  display:flex; flex-direction:column; gap:.75rem;
}
.review-card-home:hover { box-shadow:0 8px 28px rgba(0,0,0,.08); transform:translateY(-3px); }
.review-card-book {
  font-family:var(--font-serif); font-style:italic;
  color:#7A4F2A; font-size:.9rem; font-weight:400;
  text-decoration:none;
}
.review-card-book:hover { color:#7A4F2A; }
.review-card-comment { font-size:.95rem; line-height:1.65; color:var(--text); flex:1; }
.review-card-meta {
  display:flex; align-items:center; justify-content:space-between;
  padding-top:.75rem; border-top:1px solid var(--border);
}
.review-card-user { font-weight:600; font-size:.85rem; }
.review-card-date { font-family:var(--font-mono); font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
.review-card-stars i { color:var(--accent); font-size:.78rem; }

/* == About: hero == */
.about-hero {
  padding: 3.5rem 2.5rem;
  max-width: 680px;
}
.about-logo { height: 200px; margin-bottom: 1.5rem; display: block; }
body.dark-mode .about-logo { filter: brightness(0) invert(1); }
.about-headline {
  font-family: var(--font-serif); font-style: italic;
  font-size: 2.4rem; font-weight: 700; color: var(--text);
  margin-bottom: 1rem; line-height: 1.2;
}
.about-lead { font-size: 1rem; line-height: 1.75; color: var(--text); margin-bottom: .8rem; }
.about-body { font-size: .93rem; line-height: 1.75; color: var(--muted); margin-bottom: 1.75rem; }
.about-ctas { display: flex; gap: .75rem; flex-wrap: wrap; }
.about-btn-primary {
  display: inline-block; padding: .55rem 1.4rem;
  background: #7A4F2A; color: #fff;
  border-radius: 6px; font-size: .88rem; font-weight: 500;
  text-decoration: none; transition: background .15s;
}
.about-btn-primary:hover { background: #5C3A1E; color: #fff; }
.about-btn-secondary {
  display: inline-block; padding: .55rem 1.4rem;
  background: transparent; color:  #7A4F2A;
  border: 1.5px solid  #7A4F2A; border-radius: 6px;
  font-size: .88rem; font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s;
}
.about-btn-secondary:hover { background: var(--accent); color: #fff; }

/* == About: feature items == */
.about-features-inner { max-width:1100px; margin:0 auto; padding:0 1.5rem; }

@media(max-width:860px) {
  .about-hero-inner { flex-direction:column; gap:2rem; }
  .about-hero-aside { flex:none; width:100%; }
  .about-values-grid { grid-template-columns:1fr; }
}

/* == Footer == */
.site-footer {
  background: var(--bg-dark); color:#cbd5dc;
  border-top:1px solid rgba(255,255,255,.08);
}
.footer-inner {
  display:flex !important; align-items:flex-start; justify-content:space-between;
  gap:2rem; padding:1.6rem 1rem 1rem; flex-wrap:nowrap;
}
.footer-brand { flex:0 0 220px; }
.footer-brand img { display:block; margin-bottom:.6rem; }
.footer-tagline { font-size:.8rem; color:#7a93a3; line-height:1.55; margin:0; }
.footer-col { flex:1; min-width:120px; }
.footer-heading { color:#fff; font-weight:600; font-size:.75rem; letter-spacing:.07em; text-transform:uppercase; margin-bottom:.55rem; }
.footer-text    { font-size:.8rem; color:#7a93a3; margin-bottom:.25rem; }
.footer-links   { list-style:none; padding:0; margin:0; }
.footer-links li { margin-bottom:.3rem; }
.footer-links a  { color:#7a93a3; text-decoration:none; font-size:.8rem; transition:color .15s; }
.footer-links a:hover { color:#fff; }
.footer-bottom  { border-top:1px solid rgba(255,255,255,.07); padding:.6rem 0; text-align:center; font-size:.75rem; color:#8aabb8; }
@media(max-width:640px) {
  .footer-inner { flex-wrap:wrap; }
  .footer-brand { flex:0 0 100%; }
}

/* == Pennd features grid (index.php) == */
.features-grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:0;
  border:1px solid var(--border); border-radius:8px; overflow:hidden;
  margin-top:.25rem;
}
.feature-tile,
a.feature-tile,
a.feature-tile:link,
a.feature-tile:visited {
  display:flex; align-items:flex-start; gap:.85rem;
  padding:1.1rem 1.25rem; background:var(--card);
  color:var(--text); text-decoration:none;
  border-right:1px solid var(--border);
  border-bottom:1px solid var(--border);
  transition:background .15s, color .15s;
}
.feature-tile:nth-child(3n) { border-right:none; }
.feature-tile:nth-last-child(-n+3) { border-bottom:none; }
.feature-tile:hover,
a.feature-tile:hover { background:var(--bg); color:var(--accent); text-decoration:none; }
.feature-tile i { font-size:1.2rem; opacity:.55; flex-shrink:0; margin-top:2px; }
.feature-tile span { font-size:.875rem; line-height:1.45; }
@media(max-width:768px) {
  .features-grid { grid-template-columns:1fr; }
  .feature-tile { border-right:none; }
  .feature-tile:nth-last-child(-n+3) { border-bottom:1px solid var(--border); }
  .feature-tile:last-child { border-bottom:none; }
}

/* == About: feature detail items == */
.about-features { border-top:1px solid var(--border); }
.about-features-title {
  font-size:1.4rem; font-weight:700; margin-bottom:1rem;
  font-family:var(--font-serif); color:var(--text);
  margin-top: 0.5rem;
}
.about-feature-item {
  display:flex; gap:1.25rem; align-items:flex-start;
  padding:1.25rem 0; border-bottom:1px solid var(--border);
}
.about-feature-item:last-child { border-bottom:none; }
.about-feature-icon {
  width:44px; height:44px; border-radius:10px; flex-shrink:0;
  background:var(--bg); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
}
body.dark-mode .about-feature-icon { background:rgba(255,255,255,.07); }
.about-feature-icon i { font-size:1.1rem; color:var(--accent); }
.about-feature-item h5 { font-size:1rem; font-weight:600; margin-bottom:.3rem; }
.about-feature-item p  { font-size:.88rem; color:var(--text-muted); margin:0; line-height:1.6; }

/* == Login prompt button centering fix == */
.login-prompt-modal .btn { display:inline-flex; align-items:center; justify-content:center; }

/* == Mobile == */
@media (max-width:768px) {
  .page { margin-left:0; }
  .sidebar { transform:translateX(-105%); }
  .sidebar:not(.is-collapsed) { transform:translateX(0); }
  .topbar-center { display:none; }
  .shelf-arrow { width:36px; height:36px; }
}

/* == Dark mode contrast fixes == */
body.dark-mode .review-card-book {
    color: #f0a050;
}
body.dark-mode .review-card-book:hover {
    color: #f0a050;
}
body.dark-mode .review-card-date {
    color: #a09880;
}
body.dark-mode .hero-btn {
    background: var(--accent);
    color: #14120f;
}
body.dark-mode .hero-btn:hover {
    background: var(--accent-hover);
    color: #14120f;
}
body.dark-mode .about-btn-secondary {
    color: #f0a050;
    border-color: #f0a050;
}
body.dark-mode .about-btn-secondary:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
body.dark-mode .about-feature-item p {
    color: #f8e4a6;
}
body.dark-mode .shelf-em {
    color: #f0a050;
}
.shelf-em {
    color: #7A4F2A;
}
body.dark-mode .tab-btn.active {
    color: #f0a050;
}
body.dark-mode .text-muted {
    color: #a09880 !important;
}

@media (prefers-reduced-motion: reduce) {
  .book-card, .book-cover, .value-reveal, .value-card { transition:none !important; animation:none !important; }
}
/* Our Catalogue */
#ourCatalogue { padding-bottom: 1rem; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem 1rem;
  padding: 0.5rem 0 2.5rem;
}

.cat-book-card {
  position: relative;
}

/* Carousel nav buttons */
.cat-carousel-btn {
  position: static;
  width: 38px; height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); opacity: 1;
  margin: 0 0.4rem;
  transition: background 0.2s;
}
.cat-carousel-btn:hover { background: var(--accent); color: #14120f; }
.cat-carousel-btn i { font-size: 0.8rem; }

/* Controls row below the grid */
.cat-carousel-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; margin-top: 0.25rem;
}

/* Indicators */
.cat-carousel-indicators {
  position: static;
  display: flex; justify-content: center;
  gap: 6px; margin: 0.5rem 0 0;
}
.cat-carousel-indicators button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none; padding: 0; opacity: 1;
  transition: background 0.2s;
}
.cat-carousel-indicators button.active { background: var(--accent); }

/* Prev/next positioned below grid, not overlapping */
#catalogueCarousel { position: relative; }
#catalogueCarousel .cat-carousel-btn.carousel-control-prev,
#catalogueCarousel .cat-carousel-btn.carousel-control-next {
  position: absolute;
  top: auto; bottom: -2.8rem;
  width: 36px; height: 36px;
  left: auto; right: auto;
}
#catalogueCarousel .cat-carousel-btn.carousel-control-prev { left: calc(50% - 50px); }
#catalogueCarousel .cat-carousel-btn.carousel-control-next { left: calc(50% + 14px); }

@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 650px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Trending Lists */
.trending-lists-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.trending-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.trending-list-card:hover {
  border-color: rgba(196,149,106,0.45);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  color: var(--text);
  text-decoration: none;
}

/* 4-book cover mosaic */
.tlc-covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 2 / 1;
  background: var(--border);
}
.tlc-cover {
  overflow: hidden;
}
.tlc-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.trending-list-card:hover .tlc-cover img { transform: scale(1.04); }
.tlc-cover-empty {
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--border);
  font-size: 1.4rem;
}

/* Text body */
.tlc-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tlc-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.tlc-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.tlc-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.tlc-meta i { color: var(--accent); margin-right: 0.3rem; }
.tlc-badge {
  font-size:0.62rem; padding:0.15rem 0.45rem; border-radius:999px;
  background:rgba(196,149,106,0.15); border:1px solid rgba(196,149,106,0.3);
  color:var(--accent); font-family:var(--font-mono); text-transform:uppercase;
  letter-spacing:0.05em; margin-left:auto;
}

@media (max-width: 768px) {
  .trending-lists-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) and (min-width: 769px) {
  .trending-lists-grid { grid-template-columns: repeat(2, 1fr); }
}

/* POPULAR BOOK CLUBS SECTION */
.popular-clubs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.popular-club-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--bs-heading-color);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.popular-club-card:hover {
  border-color: rgba(196,149,106,0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
  color: var(--text);
  text-decoration: none;
}

/* Gradient thumbnail */
.pcc-thumb {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: rgba(255,255,255,0.92);
  flex-shrink: 0;
}

/* Body */
.pcc-body {
  padding: 0.9rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pcc-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.pcc-genre {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}
.pcc-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.pcc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}
.pcc-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(196,149,106,0.12);
  border: 1px solid rgba(196,149,106,0.25);
  color: var(--accent);
  font-family: var(--font-mono);
}
.pcc-meta {
  display: flex;
  gap: 0.9rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.pcc-meta i { color: var(--accent); margin-right: 0.25rem; }
.pcc-activity {
  margin-left: auto;
  color: var(--pcc-activity-text);
  font-size: 0.65rem;
}
.pcc-reading {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: normal;
  padding: 0.4rem 0.6rem;
  background: rgba(196,149,106,0.07);
  border-radius: 6px;
  border-left: 2px solid var(--accent);
  margin-top: 0.35rem;
}
.pcc-reading em { color: var(--text); font-style: italic; }

/* Join badge */
.pcc-join {
  margin: 0 1rem 0.9rem;
  padding: 0.45rem;
  text-align: center;
  border-radius: 6px;
  background: var(--accent);
  color: var(--card);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s;
}
.popular-club-card:hover .pcc-join { background: var(--accent-hover); }

@media (max-width: 1024px) {
  .popular-clubs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .popular-clubs-grid { grid-template-columns: 1fr; }
}
/* Book to Screen: video player and poster layouts */
.trailer-video-wrap {
  border-radius:4px; overflow:hidden;
  background:#000;
  margin-top:8px;
  margin-bottom:8px;
  height:180px;
  box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
}
.trailer-video {
  width:100%; height:100%;
  object-fit:cover; display:block;
}
.trailer-poster-large {
  position:absolute; inset:0;
  overflow:hidden;
  background:rgba(0,0,0,.35);
  box-shadow:inset 0 0 8px rgba(0,0,0,0.3);
}
.trailer-poster-large img {
  width:100%; height:100%; object-fit:cover; object-position:center top;
  display:block;
}
.trailer-poster-overlay {
  position:absolute; inset:0; border-radius:4px;
  background:linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 40%);
  display:flex; align-items:flex-start; justify-content:flex-start; padding:0.75rem;
}
.trailer-adaptation-badge {
  background:rgba(196,149,106,0.9); color:#14120f;
  font-size:0.75rem; font-weight:600; font-family:var(--font-mono);
  text-transform:uppercase; letter-spacing:0.06em;
  padding:0.35rem 0.8rem; border-radius:999px;
  display:inline-flex; align-items:center; gap:0.4rem;
}
.trailer-director i { color:var(--accent); }
.trailer-book-ref i { color:var(--accent); }
/* - Cart toggle button in topbar */
.cart-toggle-btn {
  position:relative; background:none; border:none; cursor:pointer;
  color:var(--nav-link); font-size:1.1rem; padding:6px;
  display:flex; align-items:center; justify-content:center;
  border-radius:8px; transition:color 0.2s, background 0.2s;
}
.cart-toggle-btn:hover { color:var(--nav-link-hover); background:rgba(127,127,127,.1); }
.cart-badge {
  position:absolute; top:-4px; right:-4px;
  background:var(--accent); color:var(--card);
  font-size:0.6rem; font-weight:700; font-family:var(--font-mono);
  min-width:16px; height:16px; border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  padding:0 3px; line-height:1;
}

/* - Cart slide-in panel */
.cart-panel {
  position:fixed; top:var(--topbar-h); right:0; bottom:0;
  width:360px; max-width:90vw;
  background:var(--bg-card); border-left:1px solid var(--border);
  z-index:1200; display:flex; flex-direction:column;
  transform:translateX(100%);
  transition:transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow:-4px 0 24px rgba(0,0,0,0.15);
}
.cart-panel.open { transform:translateX(0); }

.cart-panel-overlay {
  position:fixed; inset:0; z-index:1199;
  background:rgba(0,0,0,0.35);
  opacity:0; pointer-events:none;
  transition:opacity 0.3s;
}
.cart-panel-overlay.open { opacity:1; pointer-events:all; }

.cart-panel-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:1rem 1.25rem; border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.cart-panel-title {
  font-family:var(--font-serif); font-size:1rem; font-weight:600;
  margin:0; display:flex; align-items:center; gap:0.5rem;
}
.cart-panel-close {
  background:none; border:none; cursor:pointer; font-size:1.4rem;
  color:var(--text-muted); line-height:1; padding:4px 8px;
  border-radius:6px; transition:background 0.15s;
  position:relative; z-index:11;
}
.cart-panel-close:hover { background:rgba(127,127,127,.1); color:var(--text); }

.cart-panel-body {
  flex:1; overflow-y:auto; padding:1rem 1.25rem;
  display:flex; flex-direction:column; gap:1rem;
  scrollbar-width:thin; scrollbar-color:var(--border) transparent;
}
.cart-panel-loading {
  text-align:center; color:var(--text-muted); padding:2rem 0;
  font-size:0.9rem;
}
.cart-panel-empty {
  text-align:center; color:var(--text-muted); padding:3rem 0;
  font-size:0.9rem; display:flex; flex-direction:column;
  align-items:center; gap:0.75rem;
}
.cart-panel-empty i { font-size:2.5rem; color:var(--border); }

/* Cart item row */
.cart-panel-item {
  display:flex; gap:0.85rem; align-items:flex-start;
  padding-bottom:1rem; border-bottom:1px solid var(--border);
}
.cart-panel-item:last-child { border-bottom:none; padding-bottom:0; }
.cart-panel-item-cover {
  width:48px; flex-shrink:0; border-radius:4px; overflow:hidden;
  border:1px solid var(--border); background:var(--bg-card);
  display:flex; align-items:center; justify-content:center;
  font-size:1.2rem; aspect-ratio:2/3;
}
.cart-panel-item-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.cart-panel-item-info { flex:1; min-width:0; }
.cart-panel-item-title {
  font-size:0.85rem; font-weight:600; color:var(--text);
  line-height:1.3; margin-bottom:0.15rem;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.cart-panel-item-author { font-size:0.75rem; color:var(--text-muted); margin-bottom:0.35rem; }
.cart-panel-item-price { font-size:0.85rem; font-weight:700; color:var(--text); font-family:var(--font-mono); }
.cart-panel-item-qty { font-size:0.72rem; color:var(--text-muted); margin-top:0.2rem; }

/* Footer */
.cart-panel-footer {
  padding:1rem 1.25rem; border-top:1px solid var(--border);
  flex-shrink:0; display:flex; flex-direction:column; gap:0.75rem;
}
.cart-panel-subtotal {
  display:flex; justify-content:space-between; align-items:center;
  font-size:0.9rem; font-weight:600;
}
.cart-panel-subtotal span:last-child { font-family:var(--font-mono); color:var(--text); font-size:1rem; }
.cart-panel-checkout {
  display:block; text-align:center;
  padding:0.75rem; border-radius:8px;
  background:var(--accent); color:var(--card);
  font-weight:700; font-size:0.85rem; font-family:var(--font-mono);
  text-transform:uppercase; letter-spacing:0.05em;
  text-decoration:none; transition:background 0.2s;
}
.cart-panel-checkout:hover { background:var(--accent-hover); color:#14120f; text-decoration:none; }

/* - User dropdown in topbar */
.user-dropdown {
  position:relative;
}
.user-dropdown-toggle {
  display:flex; align-items:center; gap:8px;
  background:none; border:none; cursor:pointer;
  color:var(--nav-link); font-weight:600; font-size:.85rem;
  font-family:var(--font-mono); text-transform:uppercase; letter-spacing:0.05em;
  padding:4px 6px; border-radius:8px;
  transition:color 0.2s, background 0.2s;
}
.user-dropdown-toggle:hover { color:var(--nav-link-hover); background:rgba(127,127,127,.08); }
.user-dropdown-chevron {
  font-size:0.6rem; transition:transform 0.2s; opacity:0.6;
}
.user-dropdown:hover .user-dropdown-chevron,
.user-dropdown.open .user-dropdown-chevron { transform:rotate(180deg); }

.user-dropdown-menu {
  position:absolute; top:calc(100% + 8px); right:0;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:10px; min-width:170px;
  box-shadow:0 8px 24px rgba(0,0,0,0.15);
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index:1300; overflow:hidden;
}
.user-dropdown:hover .user-dropdown-menu,
.user-dropdown.open .user-dropdown-menu {
  opacity:1; visibility:visible; transform:translateY(0);
}
.user-dropdown-item {
  display:flex; align-items:center; gap:0.6rem;
  padding:0.65rem 1rem; font-size:0.83rem;
  color:var(--text); text-decoration:none;
  transition:background 0.15s;
  font-family:var(--font-sans);
}
.user-dropdown-item:hover {
  background:rgba(127,127,127,.08); color:var(--accent);
  text-decoration:none;
}
.user-dropdown-item i { width:14px; text-align:center; color:var(--text-muted); }
.user-dropdown-item:hover i { color:var(--accent); }
.user-dropdown-item:not(:last-child) { border-bottom:1px solid var(--border); }
/* - Cart panel qty controls */
.cart-panel-item-controls {
  display:flex; align-items:center; gap:0.5rem; margin-top:0.4rem;
}
.cart-qty-btn {
  width:24px; height:24px; border-radius:50%;
  border:1px solid var(--border); background:var(--bg-card);
  color:var(--text); cursor:pointer; font-size:0.9rem; line-height:1;
  display:flex; align-items:center; justify-content:center;
  transition:background 0.15s, border-color 0.15s;
  flex-shrink:0;
}
.cart-qty-btn:hover { background:var(--accent); border-color:var(--accent); color:#14120f; }
.cart-qty-num {
  font-size:0.82rem; font-family:var(--font-mono);
  min-width:20px; text-align:center; font-weight:600;
}
.cart-remove-btn {
  margin-left:auto; background:none; border:none; cursor:pointer;
  color:var(--text-muted); font-size:0.72rem; font-family:var(--font-mono);
  text-transform:uppercase; letter-spacing:0.04em; padding:2px 4px;
  transition:color 0.15s;
}
.cart-remove-btn:hover { color:#e85555; }


/* ════════════════════════════════════════════
   AUTH INPUTS  (login + register)
   ════════════════════════════════════════════ */
.auth-input {
  background: #e8e2d9;
  color: #2a1f14;
  border: 1px solid #d4cdc4;
  border-radius: 10px;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.auth-input::placeholder {
  color: #9a9088;
}
.auth-input:focus {
  background: #ede8e1;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196,149,106,.18);
  outline: none;
}

/* Dark mode — warm brown family */
body.dark-mode .auth-input {
  background: #2a2218;
  color: #f0ece6;
  border-color: #3d3028;
}
body.dark-mode .auth-input::placeholder {
  color: #7a706a;
}
body.dark-mode .auth-input:focus {
  background: #332a1e;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196,149,106,.18);
}

/* ════════════════════════════════════════════
   PASSWORD STRENGTH RULES
   ════════════════════════════════════════════ */
.pw-rules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .75rem;
}
.pw-rules .rule {
  font-family: var(--font-mono, monospace);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .18rem .55rem;
  border-radius: 20px;
  border: 1px solid var(--border, #ddd);
  color: var(--muted, #888);
  background: transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.pw-rules .rule.pass {
  color: #287040;
  border-color: rgba(40,140,75,.35);
  background: rgba(40,140,75,.08);
}
body.dark-mode .pw-rules .rule.pass {
  color: #70c090;
  border-color: rgba(40,140,75,.4);
  background: rgba(40,140,75,.12);
}