/* ════════════════════════════════════════════════════════════
   Bücherregal – Stylesheet
   ════════════════════════════════════════════════════════════ */

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

/* ── Dark mode (default) ─── */
:root {
  --bg:        #0f0e13;
  --bg2:       #1a1825;
  --bg3:       #252336;
  --accent:    #c8974f;
  --accent2:   #e8b96f;
  --text:      #e8e4df;
  --text2:     #9d98a0;
  --danger:    #d9534f;
  --success:   #5cb85c;
  --radius:    12px;
  --shadow:    0 8px 32px rgba(0,0,0,.45);
  --auth-bg:   radial-gradient(ellipse at 30% 40%, #1e1a2e 0%, #0a090f 100%);
  --input-border: rgba(255,255,255,.08);
  --nav-border:   rgba(255,255,255,.06);
}

/* ── Light mode ─────────── */
body.light {
  --bg:        #f5f2ee;
  --bg2:       #ffffff;
  --bg3:       #ede9e3;
  --accent:    #a0682a;
  --accent2:   #b87d3a;
  --text:      #1a1612;
  --text2:     #6b6560;
  --danger:    #c0392b;
  --success:   #27ae60;
  --shadow:    0 8px 32px rgba(0,0,0,.12);
  --auth-bg:   radial-gradient(ellipse at 30% 40%, #e8e0d5 0%, #d4ccc0 100%);
  --input-border: rgba(0,0,0,.12);
  --nav-border:   rgba(0,0,0,.07);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

.hidden { display: none !important; }

/* ── AUTH OVERLAY ─────────────────────────────────────────── */
.auth-overlay {
  position: fixed; inset: 0;
  background: var(--auth-bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}

.auth-box {
  background: var(--bg2);
  border: 1px solid rgba(200,151,79,.25);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-logo { font-size: 3rem; margin-bottom: .5rem; }
.auth-box h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--accent2);
  margin-bottom: 1.5rem;
}

.auth-tabs {
  display: flex; gap: .5rem;
  background: var(--bg3);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1; padding: .5rem;
  border: none; border-radius: 6px;
  background: transparent; color: var(--text2);
  cursor: pointer; font-size: .9rem; transition: all .2s;
}
.auth-tab.active { background: var(--accent); color: #fff; font-weight: 600; }

.auth-form { display: flex; flex-direction: column; gap: .9rem; }

input[type=text], input[type=email], input[type=password],
input[type=number], select, textarea {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--bg3);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .95rem;
  transition: border-color .2s;
  font-family: 'Inter', sans-serif;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }

.btn-primary {
  padding: .75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; border-radius: var(--radius);
  color: #fff; font-weight: 600; font-size: .95rem;
  cursor: pointer; transition: opacity .2s;
}
.btn-primary:hover { opacity: .88; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  padding: .5rem 1rem;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer; font-size: .85rem; transition: all .2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  padding: .5rem 1rem;
  background: transparent;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  color: var(--danger);
  cursor: pointer; font-size: .85rem; transition: all .2s;
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-success {
  padding: .5rem 1rem;
  background: var(--success);
  border: none;
  border-radius: var(--radius);
  color: #fff; font-size: .85rem;
  cursor: pointer; transition: opacity .2s;
}
.btn-success:hover { opacity: .85; }

.auth-note { font-size: .8rem; color: var(--text2); margin-top: .25rem; }
.auth-note code { color: var(--accent2); }
.auth-msg { margin-top: 1rem; font-size: .9rem; min-height: 1.2rem; }
.auth-msg.err { color: #ff7070; }
.auth-msg.ok  { color: var(--success); }

/* ── APP SHELL ───────────────────────────────────────────── */
.app { display: flex; height: 100vh; }

.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--nav-border);
  display: flex; flex-direction: column;
  padding: 1.5rem 1rem;
  gap: .5rem;
}
.sidebar-logo { font-size: 2rem; text-align: center; margin-bottom: .5rem; }
.sidebar-user {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--nav-border);
  margin-bottom: .5rem;
}
.sidebar-user span { font-weight: 600; font-size: .95rem; display: block; }
.sidebar-user small { color: var(--accent); font-size: .75rem; }

.nav-btn {
  width: 100%; text-align: left;
  padding: .65rem .9rem;
  border: none; border-radius: var(--radius);
  background: transparent; color: var(--text2);
  cursor: pointer; font-size: .9rem; transition: all .2s;
}
.nav-btn:hover, .nav-btn.active {
  background: var(--bg3); color: var(--text);
}
.nav-btn.active { color: var(--accent2); font-weight: 600; }

.btn-logout {
  margin-top: auto;
  padding: .6rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  background: transparent; color: var(--text2);
  cursor: pointer; font-size: .85rem; transition: all .2s;
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); }

/* ── MAIN / VIEWS ─────────────────────────────────────────── */
.main { flex: 1; overflow-y: auto; padding: 2rem; }

.view { display: none; }
.view.active { display: block; }

.view-header {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 1rem; margin-bottom: 1.5rem;
}
.view-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; color: var(--accent2);
  flex: 1;
}

/* shelf-controls kept for compatibility but unused */

.shelf-stats {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.stat-badge {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: .6rem 1.2rem;
  font-size: .85rem; color: var(--text2);
}
.stat-badge strong { color: var(--accent2); font-size: 1.2rem; display: block; }

/* ── BOOK GRID ────────────────────────────────────────────── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.book-card {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.book-cover {
  width: 100%; aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg3);
}
.book-cover-placeholder {
  width: 100%; aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--bg3), #2a2540);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}

.book-info { padding: .7rem; }
.book-title {
  font-size: .85rem; font-weight: 600;
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-author {
  font-size: .75rem; color: var(--text2); margin-top: .2rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.book-status-badge {
  position: absolute; top: .4rem; right: .4rem;
  font-size: .7rem; padding: .25rem .6rem;
  border-radius: 20px; font-weight: 700;
  letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.status-unread  { background: rgba(60,60,60,.82);   color: #d0d0d0; border: 1px solid rgba(180,180,180,.25); }
.status-want    { background: rgba(140,90,20,.88);   color: #ffe0a0; border: 1px solid rgba(255,200,80,.3); }
.status-reading { background: rgba(20,110,40,.88);   color: #a0ffb0; border: 1px solid rgba(80,220,100,.3); }
.status-read    { background: rgba(30,80,200,.88);   color: #c0d8ff; border: 1px solid rgba(100,160,255,.3); }
.status-cellar  { background: rgba(80,55,30,.88);    color: #d4b896; border: 1px solid rgba(180,130,70,.3); }
.status-junk    { background: rgba(90,30,30,.88);    color: #ffaaaa; border: 1px solid rgba(220,80,80,.3); }

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-bar { display: flex; gap: .75rem; margin-bottom: 1.5rem; }
.search-bar input { flex: 1; }

/* ── MODAL ──────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 900; padding: 1rem;
}
.modal-box {
  background: var(--bg2);
  border: 1px solid rgba(200,151,79,.2);
  border-radius: 20px;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  padding: 2rem;
  position: relative;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--bg3); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--text); cursor: pointer; font-size: 1rem;
  transition: background .2s;
}
.modal-close:hover { background: var(--danger); }

.modal-book { display: flex; gap: 1.5rem; }
.modal-cover { width: 130px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.modal-cover img { width: 100%; }
.modal-cover-placeholder {
  width: 100%; aspect-ratio: 2/3;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; border-radius: 8px;
}
.modal-meta h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--accent2); margin-bottom: .3rem; }
.modal-meta p  { font-size: .85rem; color: var(--text2); margin-bottom: .25rem; }
.modal-meta .desc {
  font-size: .82rem; color: var(--text2);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: .5rem;
}

.modal-actions { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.modal-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.modal-label { font-size: .8rem; color: var(--text2); width: 70px; }

.stars { display: flex; gap: .2rem; }
.star { font-size: 1.2rem; cursor: pointer; color: var(--bg3); transition: color .1s; }
.star.on { color: var(--accent); }

/* ── ADD BOOK (search result) ───────────────────────────── */
.book-card .add-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
  flex-direction: column; gap: .5rem;
}
.book-card:hover .add-overlay { opacity: 1; }
.add-overlay span { font-size: 2rem; }
.add-overlay small { font-size: .8rem; color: #fff; }

/* ── ADMIN ──────────────────────────────────────────────── */
.admin-stats { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.admin-stat {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 1rem 1.5rem; text-align: center;
}
.admin-stat strong { font-size: 2rem; color: var(--accent2); display: block; }
.admin-stat small  { color: var(--text2); font-size: .8rem; }

.admin-section h3 { margin-bottom: 1rem; color: var(--accent2); }
.user-table { width: 100%; border-collapse: collapse; }
.user-table th, .user-table td {
  text-align: left; padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .88rem;
}
.user-table th { color: var(--text2); font-weight: 500; }
.user-table td .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.badge-pending  { background: rgba(255,140,0,.2); color: #ffaa40; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; }
.badge-approved { background: rgba(92,184,92,.2);  color: #7dd87d; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; }
.badge-admin    { background: rgba(200,151,79,.3);  color: var(--accent2); padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; }

/* ── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: .75rem 1.25rem;
  font-size: .9rem;
  z-index: 9999;
  animation: fadein .3s;
}
.toast.err { border-color: var(--danger); }
@keyframes fadein { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:none } }

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  grid-column: 1/-1;
  text-align: center; padding: 4rem 2rem;
  color: var(--text2);
}
.empty-state span { font-size: 3.5rem; display: block; margin-bottom: 1rem; }

/* ── LOADING ────────────────────────────────────────────── */
.spinner {
  grid-column: 1/-1;
  text-align: center; padding: 3rem;
  color: var(--text2);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 700px) {
  .sidebar { width: 60px; padding: 1rem .5rem; }
  .sidebar-user, .nav-btn span, .sidebar-logo { display: none; }
  .nav-btn { font-size: 1.2rem; text-align: center; }
  .main { padding: 1rem; }
  .modal-book { flex-direction: column; }
}

/* ── CATEGORY TAG ON CARD ────────────────────────────────────── */
.book-cat-tag {
  display: inline-block;
  margin-top: .3rem;
  font-size: .7rem;
  background: rgba(200,151,79,.18);
  color: var(--accent2);
  border-radius: 20px;
  padding: .15rem .55rem;
  font-weight: 500;
}

/* ── COMMUNITY LIST ──────────────────────────────────────────── */
.community-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 560px;
}

.community-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.community-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.community-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.community-info {
  flex: 1;
}
.community-info strong { display: block; font-size: .95rem; }
.community-info small  { color: var(--text2); font-size: .8rem; }

.community-arrow {
  color: var(--accent);
  font-size: 1.2rem;
}

/* ── THEME TOGGLE ────────────────────────────────────────────── */
.theme-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .6rem 0;
  margin-bottom: .25rem;
}
.theme-icon { font-size: 1rem; user-select: none; }

.theme-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }

.theme-slider {
  position: absolute; inset: 0;
  background: var(--bg3);
  border: 1px solid var(--nav-border);
  border-radius: 24px;
  cursor: pointer;
  transition: background .3s;
}
.theme-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--accent2);
  border-radius: 50%;
  transition: transform .3s, background .3s;
}
.theme-switch input:checked + .theme-slider { background: var(--bg3); }
.theme-switch input:checked + .theme-slider::before { transform: translateX(20px); }

/* Light mode extra tweaks */
body.light .auth-box          { box-shadow: 0 8px 40px rgba(0,0,0,.15); }
body.light .book-card         { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
body.light .modal-box         { box-shadow: 0 12px 48px rgba(0,0,0,.18); }
body.light .btn-secondary     { background: #fff; }
body.light .nav-btn:hover,
body.light .nav-btn.active    { background: var(--bg3); }
body.light input,
body.light select,
body.light textarea           { background: var(--bg3); border-color: var(--input-border); }

/* ── PROFILE CARD ────────────────────────────────────────────── */
.profile-card {
  background: var(--bg2);
  border: 1px solid var(--nav-border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 440px;
}
.profile-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--accent2);
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
}
.profile-form {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.profile-form label {
  font-size: .8rem;
  color: var(--text2);
  margin-bottom: -.2rem;
  margin-top: .25rem;
}

/* ── RECOMMEND STAR ──────────────────────────────────────────── */
.rec-star {
  position: absolute;
  top: .4rem; left: .4rem;
  background: rgba(0,0,0,.5);
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: .85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: .4;
  transition: opacity .15s, transform .15s;
  z-index: 2;
  padding: 0;
}
.rec-star.static { cursor: default; }
.book-card:hover .rec-star { opacity: 1; }
.rec-star.on { opacity: 1; }
.rec-star:not(.static):hover { transform: scale(1.2); }

/* shelf-tabs replaced by filter-pill system */

/* ── RECOMMENDATION HEADER ────────────────────────────────────── */
.rec-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .75rem;
  background: linear-gradient(135deg, rgba(200,151,79,.15), rgba(200,151,79,.05));
  border: 1px solid rgba(200,151,79,.25);
  border-radius: var(--radius);
  padding: .9rem 1.25rem;
  margin-bottom: .25rem;
  font-size: .9rem;
  color: var(--accent2);
}
.rec-header span { font-size: 1.4rem; }

/* ── COMMUNITY CARD ACTIONS ──────────────────────────────────── */
.community-card {
  cursor: default;
}
.community-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}
.btn-rec-quick {
  padding: .45rem .9rem;
  background: linear-gradient(135deg, rgba(200,151,79,.25), rgba(200,151,79,.15));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent2);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.btn-rec-quick:hover { background: var(--accent); color: #fff; }

/* ── CATEGORY CHIP PICKER ────────────────────────────────────── */
.cat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  width: 100%;
}

.cat-chip {
  padding: .3rem .75rem;
  border-radius: 20px;
  border: 1px solid var(--nav-border);
  background: var(--bg3);
  color: var(--text2);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  user-select: none;
}
.cat-chip:hover { border-color: var(--accent); color: var(--text); }
.cat-chip.on {
  background: rgba(200,151,79,.25);
  border-color: var(--accent);
  color: var(--accent2);
}

/* ── MULTIPLE CAT TAGS ON CARD ───────────────────────────────── */
.book-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  margin-top: .3rem;
}
.book-cat-tag {
  display: inline-block;
  font-size: .68rem;
  background: rgba(200,151,79,.18);
  color: var(--accent2);
  border-radius: 20px;
  padding: .12rem .45rem;
  font-weight: 500;
}

/* ── SHELF HEADER ────────────────────────────────────────────── */
.shelf-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.shelf-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--accent2);
  flex: 1;
}

/* ── SHELF FILTER BAR ────────────────────────────────────────── */
.shelf-filterbar {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.25rem;
}

.shelf-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.filter-pill {
  padding: .38rem .9rem;
  border-radius: 20px;
  border: 1px solid var(--nav-border);
  background: var(--bg3);
  color: var(--text2);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  user-select: none;
}
.filter-pill:hover { border-color: var(--accent); color: var(--text); }
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filter-pill.rec-pill.active {
  background: linear-gradient(135deg, #c8974f, #e8b96f);
}

/* Category pills slightly smaller */
.cat-filter-pill {
  font-size: .78rem;
  padding: .3rem .75rem;
  background: var(--bg2);
}
.cat-filter-pill.active {
  background: rgba(200,151,79,.25);
  border-color: var(--accent);
  color: var(--accent2);
}

.shelf-search-input {
  width: 100%;
  max-width: 340px;
  padding: .55rem 1rem;
  background: var(--bg3);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .9rem;
}

/* ── SEARCH SECTION LABEL ────────────────────────────────────── */
.search-section-label {
  grid-column: 1 / -1;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .5rem .25rem .2rem;
  border-bottom: 1px solid var(--nav-border);
  margin-bottom: .25rem;
}

/* ── SORT PILLS ──────────────────────────────────────────────── */
.sort-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.sort-label {
  font-size: .78rem;
  color: var(--text2);
  margin-right: .15rem;
}

.status-archived {
  background: rgba(80,50,20,.85);
  color: #d4a96a;
  border: 1px solid rgba(180,120,50,.3);
}
.keller-pill.active {
  background: linear-gradient(135deg, #5c3d1a, #8b5e2a);
  border-color: #8b5e2a;
  color: #f0d0a0;
}
/* Archived cards get a subtle sepia overlay */
.book-card.archived-card {
  opacity: .72;
  filter: sepia(.35);
}
.book-card.archived-card:hover { opacity: 1; filter: none; }

/* ── LOCATION BADGE ON CARD ──────────────────────────────────── */
.book-loc-badge {
  position: absolute; top: 2rem; right: .4rem;
  font-size: .7rem; padding: .25rem .6rem;
  border-radius: 20px; font-weight: 700;
  letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.loc-cellar { background: rgba(80,55,30,.88);  color: #d4b896; border: 1px solid rgba(180,130,70,.3); }
.loc-junk   { background: rgba(90,30,30,.88);  color: #ffaaaa; border: 1px solid rgba(220,80,80,.3); }
.loc-ebook  { background: rgba(20,70,120,.88);  color: #a0d0ff; border: 1px solid rgba(80,160,255,.3); }

/* Loc stat badge variant */
.stat-badge.loc-stat { border-color: rgba(200,151,79,.2); }