/* ─────────────────────────────────────
   SHARYN — BRAND TOKENS
───────────────────────────────────── */
:root {
  --red:        #97222B;
  --red-dark:   #7a1a22;
  --red-light:  #f5e6e7;
  --orange:     #E0552A;
  --cream:      #F8F7F4;
  --cream-dark: #ede9e1;
  --charcoal:   #1F1F1F;
  --charcoal-2: #3a3a3a;
  --mustard:    #C9A227;
  --mustard-lt: #faf3db;
  --green:      #3A5A40;
  --green-lt:   #e6ede7;
  --logo-green: #1E5A3A;
  --blue:       #5C7A8A;
  --blue-lt:    #e8eef1;
  --border:     #ddd8cf;
  --border-lt:  #ede9e1;
  --text-main:  #1F1F1F;
  --text-sub:   #6b6355;
  --text-muted: #a09880;
  --white:      #ffffff;
}

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

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--cream);
  color: var(--text-main);
  overflow-wrap: break-word;
}

/* Load fonts */

h1, h2, h3, .greeting-title, .section-title, .detail-name, .brand-name {
  font-family: 'Recoleta', Georgia, serif;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: 'Inter', Arial, sans-serif; }

/* Focus ring — ADA */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ─────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────── */
body.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--cream);
  padding: 1.5rem 1rem;
}

.login-container {
  background: var(--white);
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 2px 12px rgba(31,31,31,0.07);
}

.login-header { text-align: center; margin-bottom: 1.5rem; }

.app-logo {
  width: 48px;
  height: 48px;
  background: var(--red);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 0.5rem;
}

.app-logo-brand {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.login-header h1 {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.25rem;
}

.login-subtitle { font-size: 0.85rem; color: var(--text-sub); }

.form-group { margin-bottom: 1rem; }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--charcoal-2);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--cream);
  font-family: 'Inter', Arial, sans-serif;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(151,34,43,0.1);
  background: var(--white);
}

input::placeholder { color: var(--text-muted); }

.login-container button[type="button"],
.login-container button[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-family: inherit;
}

.login-container button[type="button"]:hover,
.login-container button[type="submit"]:hover { background: var(--red-dark); }
.login-container button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

.forgot-password { text-align: center; margin-top: 1rem; }
.forgot-password a {
  font-size: 0.85rem;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
}
.forgot-password a:hover { color: var(--red); border-bottom-color: var(--red); }

.login-divider {
  text-align: center;
  margin: 1.25rem 0 1rem;
  position: relative;
  color: var(--border);
  font-size: 0.8rem;
}
.login-divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px solid var(--border-lt);
}
.login-divider span {
  background: var(--white);
  padding: 0 0.75rem;
  position: relative;
}

.register-prompt { text-align: center; font-size: 0.85rem; color: var(--text-sub); }
.register-prompt a { color: var(--red); font-weight: 600; }

/* ─────────────────────────────────────
   DASHBOARD SHELL
───────────────────────────────────── */
body.dashboard-page {
  background: var(--cream);
  padding-bottom: 72px;
}

/* ─────────────────────────────────────
   TOP NAV
───────────────────────────────────── */

/* Desktop/tablet nav links — hidden on mobile, shown ≥640px */
.topnav-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  margin-left: 1.25rem;
  margin-right: auto;
}

.topnav-link {
  padding: 0.38rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-sub);
  border-radius: 3px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', Arial, sans-serif;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.topnav-link:hover { color: var(--charcoal); background: var(--cream-dark); }
.topnav-link--active { color: var(--charcoal); font-weight: 600; }
.topnav-link:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.topnav-action-btn { background: none; transition: background 0.15s; }
.topnav-action-btn:hover { background: var(--cream-dark); }

.feedback-fab {
  position: fixed;
  top: 64px;
  right: 14px;
  z-index: 15;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  color: var(--text-sub);
  transition: background 0.15s, transform 0.15s;
}
.feedback-fab:hover { background: var(--cream-dark); transform: scale(1.03); }

@media (max-width: 600px) {
  .feedback-fab { top: 58px; right: 10px; font-size: 0.7rem; padding: 0.42rem 0.7rem; }
}

.feedback-toast {
  position: fixed;
  top: 110px;
  right: 14px;
  z-index: 16;
  border: 1px solid #bfe3bf;
  border-radius: 20px;
  background: #eaf6ea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Inter', Arial, sans-serif;
  white-space: nowrap;
  padding: 0.5rem 0.85rem;
  color: #2e7d32;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 600px) {
  .feedback-toast { top: 96px; right: 10px; font-size: 0.7rem; padding: 0.42rem 0.7rem; }
}

@media (min-width: 640px) {
  .topnav-nav { display: flex; }
  .brand-icon { display: flex; }
  .bottom-nav { display: none !important; }
  body.dashboard-page { padding-bottom: 0; }
}
.topnav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topnav-inner {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--logo-green);
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--white);
  font-weight: 700;
  font-family: 'Recoleta', Georgia, serif;
}

.brand-name {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--logo-green);
  letter-spacing: -0.01em;
}

.add-item-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 3px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}

.add-item-btn:hover { background: var(--red-dark); }
.add-item-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ─────────────────────────────────────
   MAIN
───────────────────────────────────── */
.dashboard-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ─────────────────────────────────────
   GREETING
───────────────────────────────────── */
.greeting-title {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 0.2rem;
}

.greeting-sub { font-size: 0.9rem; color: var(--text-sub); }

/* ─────────────────────────────────────
   SEARCH
───────────────────────────────────── */
.search-wrap {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.6rem 1rem;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(31,31,31,0.05);
}

.search-icon { color: var(--text-muted); font-size: 0.9rem; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-main);
  background: transparent;
  font-family: 'Inter', Arial, sans-serif;
}

.search-input::placeholder { color: var(--text-muted); }

/* ─────────────────────────────────────
   STAT CARDS
───────────────────────────────────── */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .stats-section { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(151,34,43,0.1);
}

.stat-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.stat-card--active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}

.stat-card--active .stat-count,
.stat-card--active .stat-label {
  color: var(--white);
}

.stat-card--active .stat-sub { color: rgba(255,255,255,0.6); }

.stat-card--active .stat-icon--green,
.stat-card--active .stat-icon--blue,
.stat-card--active .stat-icon--amber,
.stat-card--active .stat-icon--purple {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.stat-icon--green  { background: var(--green-lt);   color: var(--green); }
.stat-icon--blue   { background: var(--blue-lt);    color: var(--blue); }
.stat-icon--amber  { background: var(--mustard-lt); color: var(--mustard); }
.stat-icon--purple { background: #f0ebe8;           color: var(--orange); }

.stat-count {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.stat-sub { font-size: 0.75rem; color: var(--text-sub); }

/* ─────────────────────────────────────
   STAT PANELS
───────────────────────────────────── */
.stat-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.stat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-lt);
}

.stat-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
}

.stat-panel-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--text-sub);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.stat-panel-close:hover { background: var(--border-lt); color: var(--charcoal); }
.stat-panel-close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.stat-panel-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-lt);
  cursor: pointer;
  transition: background 0.15s;
}

.stat-panel-item:last-child { border-bottom: none; }
.stat-panel-item:hover { background: var(--cream); }
.stat-panel-item:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

.stat-panel-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  flex-shrink: 0;
}

.stat-panel-thumb--outdoor     { background: var(--green-lt); }
.stat-panel-thumb--kitchen     { background: var(--mustard-lt); }
.stat-panel-thumb--tools       { background: var(--blue-lt); }
.stat-panel-thumb--electronics { background: #f0ebe8; }
.stat-panel-thumb--furniture   { background: var(--cream-dark); }
.stat-panel-thumb--sports      { background: var(--blue-lt); }

.stat-panel-info { flex: 1; min-width: 0; }

.stat-panel-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-panel-meta {
  font-size: 0.78rem;
  color: var(--text-sub);
  margin-top: 0.15rem;
}

.stat-panel-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.stat-panel-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ─────────────────────────────────────
   SECTION HEADERS
───────────────────────────────────── */
.content-section { display: flex; flex-direction: column; gap: 0.75rem; }

.section-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
}

.section-meta { font-size: 0.82rem; color: var(--text-sub); flex: 1; }

/* ─────────────────────────────────────
   FILTER TABS
───────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.25rem;
}

.filter-tab {
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
  color: var(--text-sub);
  transition: all 0.15s;
}

.filter-tab:hover { border-color: var(--red); color: var(--red); }
.filter-tab.active { background: var(--red); color: var(--white); border-color: var(--red); }
.filter-tab:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ─────────────────────────────────────
   INVENTORY ROW (shared by dashboard list view + My Items)
───────────────────────────────────── */
.inv-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.1s;
}
.inv-row:last-child { border-bottom: none; }
.inv-row:active { background: #fafafa; }

/* ─────────────────────────────────────
   VIEW TOGGLE
───────────────────────────────────── */
.view-toggle { display: flex; gap: 0.25rem; }

.view-toggle-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--white);
  color: var(--text-muted);
  transition: all 0.15s;
  padding: 0;
  flex-shrink: 0;
}

.view-toggle-btn:hover { border-color: var(--charcoal); color: var(--charcoal); }
.view-toggle-btn--active { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.view-toggle-btn--active:hover { background: var(--charcoal-2); border-color: var(--charcoal-2); color: var(--white); }
.view-toggle-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ─────────────────────────────────────
   LIST VIEW
───────────────────────────────────── */
.items-grid.view-list {
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

.items-grid.view-list .grid-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.items-grid.view-list .grid-thumb {
  width: 72px;
  min-width: 72px;
  height: auto;
  aspect-ratio: unset;
  flex-shrink: 0;
}

.items-grid.view-list .grid-info {
  flex: 1;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.items-grid.view-list .grid-name { flex: 1; }
.items-grid.view-list .grid-category { flex-shrink: 0; }

.items-grid.view-list .grid-owner-row {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-shrink: 0;
}

.items-grid.view-list .grid-with { display: none; }

/* ─────────────────────────────────────
   ITEMS GRID
───────────────────────────────────── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 800px) { .items-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .items-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; } }

.grid-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.grid-card:hover {
  box-shadow: 0 3px 12px rgba(31,31,31,0.1);
  border-color: var(--border);
}

.grid-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.grid-card--unavailable { opacity: 0.5; }
.grid-card--unavailable:hover { opacity: 0.65; }

/* ─────────────────────────────────────
   GRID THUMBNAILS
───────────────────────────────────── */
.grid-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-thumb--kitchen     { background: var(--mustard-lt); }
.grid-thumb--tools       { background: var(--blue-lt); }
.grid-thumb--outdoor     { background: var(--green-lt); }
.grid-thumb--electronics { background: #f0ebe8; }
.grid-thumb--furniture   { background: var(--cream-dark); }
.grid-thumb--sports      { background: var(--blue-lt); }
.grid-thumb--other       { background: var(--cream-dark); }
.grid-thumb--home        { background: #ede8f5; }

/* ─────────────────────────────────────
   GRID BADGES
───────────────────────────────────── */
.grid-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.03em;
}

.grid-badge--available { background: var(--green);   color: var(--white); }
.grid-badge--loaned    { background: var(--red);     color: var(--white); }
.grid-badge--borrowed  { background: var(--orange);  color: var(--white); }

.grid-badge-mine {
  position: absolute;
  top: 7px;
  left: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--charcoal);
  color: var(--white);
  letter-spacing: 0.03em;
}

/* ─────────────────────────────────────
   GRID CARD INFO
───────────────────────────────────── */
.grid-info {
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.grid-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-category { font-size: 0.75rem; color: var(--text-sub); }

.grid-owner-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-lt);
}

.owner-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.grid-owner { font-size: 0.75rem; color: var(--text-sub); }
.grid-with  { font-size: 0.72rem; color: var(--text-sub); margin-top: 0.1rem; }
.grid-with--private { font-style: italic; color: var(--text-muted); }

/* Shared tab-bar pattern, originally from the Admin page's Feedback/Members tabs —
   reused anywhere a page needs a simple two-or-more-pane tab toggle. */
.admin-tab-bar {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-lt);
  margin: 0 1rem 1.25rem;
}
.admin-tab {
  position: relative;
  padding: 0.65rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: var(--charcoal); }
.admin-tab.active { color: var(--red); border-bottom-color: var(--red); }
.admin-tab-badge {
  position: absolute;
  top: 4px; right: -2px;
  background: var(--red);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ─────────────────────────────────────
   PENDING REQUEST CARD
───────────────────────────────────── */
.request-card {
  background: var(--white);
  border: 1px solid var(--blue);
  border-radius: 4px;
  padding: 1rem;
}

.request-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.request-info { display: flex; flex-direction: column; gap: 0.2rem; }
.request-who { font-size: 0.92rem; font-weight: 600; color: var(--charcoal); }
.request-item { font-size: 0.8rem; color: var(--text-sub); }

.request-note {
  font-size: 0.82rem;
  color: var(--text-sub);
  font-style: italic;
  padding: 0.5rem 0.65rem;
  background: var(--cream);
  border-left: 3px solid var(--border);
  margin-bottom: 0.75rem;
}

.request-actions { display: flex; gap: 0.5rem; }

.request-outcome {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 3px;
}

.request-outcome--approved { background: var(--green-lt); color: var(--green); }
.request-outcome--declined { background: var(--cream-dark); color: var(--text-sub); }

/* ─────────────────────────────────────
   BADGES
───────────────────────────────────── */
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.badge-available { background: var(--green-lt); color: var(--green); }
.badge-loaned    { background: var(--red-light); color: var(--red); }
.badge-pending   { background: var(--blue-lt);  color: var(--blue); }

/* ─────────────────────────────────────
   BUTTONS
───────────────────────────────────── */
.btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--white);
  color: var(--text-main);
  transition: all 0.15s;
  letter-spacing: 0.01em;
}

.btn:hover { background: var(--cream); }
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.btn-approve { border-color: var(--green); color: var(--green); }
.btn-approve:hover { background: var(--green-lt); }

.btn-decline { border-color: var(--border); color: var(--text-sub); }
.btn-decline:hover { background: var(--cream-dark); }

/* ─────────────────────────────────────
   BOTTOM NAV
───────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 10;
}

.bottom-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.6rem 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  transition: color 0.15s;
}

.bottom-nav-btn--active { color: var(--red); }
.bottom-nav-btn:hover:not(.bottom-nav-btn--active) { color: var(--text-sub); }
.bottom-nav-btn:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

.bottom-nav-icon {
  font-size: 1.2rem;
  line-height: 1;
  height: 1.2rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-dot {
  position: absolute;
  top: -4px; right: -8px;
  background: var(--red);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────
   MODALS
───────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31,31,31,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

@media (min-width: 480px) { .modal-backdrop { align-items: center; } }

.modal {
  background: var(--white);
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 8px 8px 0 0;
  outline: none;
}

@media (min-width: 480px) { .modal { border-radius: 4px; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-lt);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.modal-title {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
}

.modal-close {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--text-sub);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover { background: var(--border-lt); color: var(--charcoal); }
.modal-close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.modal-thumb {
  width: 100%;
  height: 140px;
  border-bottom: 1px solid var(--border-lt);
}

.modal-thumb--outdoor     { background: var(--green-lt); }
.modal-thumb--tools       { background: var(--blue-lt); }
.modal-thumb--kitchen     { background: var(--mustard-lt); }
.modal-thumb--electronics { background: #f0ebe8; }
.modal-thumb--furniture   { background: var(--cream-dark); }
.modal-thumb--sports      { background: var(--blue-lt); }
.modal-thumb--other       { background: var(--cream-dark); }

.modal-body {
  padding: 1rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-lt);
}

.modal-label { font-size: 0.8rem; color: var(--text-muted); }
.modal-value { font-size: 0.9rem; font-weight: 600; color: var(--charcoal); }
.modal-value--muted { font-weight: normal; color: var(--text-muted); font-style: italic; }

.modal-divider { height: 1px; background: var(--border-lt); margin: 0.75rem 0; }

.modal-note-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.modal-note {
  font-size: 0.85rem;
  color: var(--text-sub);
  font-style: italic;
  padding: 0.5rem 0.65rem;
  background: var(--cream);
  border-left: 3px solid var(--border);
  margin-bottom: 0.25rem;
}

.modal-unavail-notice {
  font-size: 0.875rem;
  color: var(--text-sub);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  line-height: 1.5;
}

/* ─────────────────────────────────────
   ADD ITEM FORM
───────────────────────────────────── */
.add-field { margin-bottom: 1.25rem; }

.add-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--charcoal-2);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.add-required { color: var(--text-muted); font-weight: normal; }
.add-hint { font-size: 0.8rem; color: var(--text-sub); margin-bottom: 0.5rem; }

.add-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--cream);
  font-family: 'Inter', Arial, sans-serif;
}

.add-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(151,34,43,0.1);
  background: var(--white);
}

.add-input::placeholder { color: var(--text-muted); }

.add-char-count { font-size: 0.75rem; color: var(--text-muted); text-align: right; margin-top: 0.25rem; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.category-btn {
  padding: 0.6rem 0.25rem;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--cream);
  color: var(--text-sub);
  text-align: center;
  transition: all 0.15s;
}

.category-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }
.category-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.category-btn--selected { border-color: var(--red); background: var(--red); color: var(--white); }

.group-select-list { display: flex; flex-direction: column; gap: 0.5rem; }

.group-select-btn {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--cream);
  text-align: left;
  gap: 0.5rem;
  transition: all 0.15s;
}

.group-select-btn:hover { border-color: var(--red); }
.group-select-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.group-select-btn--selected { border-color: var(--red); background: var(--red-light); }

.group-select-name { font-size: 0.9rem; font-weight: 600; color: var(--charcoal); flex: 1; }
.group-select-count { font-size: 0.78rem; color: var(--text-muted); }

.group-select-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: transparent;
}

.group-select-btn--selected .group-select-check {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.group-select-btn--selected .group-select-check::after { content: '✓'; }

.add-error {
  font-size: 0.85rem;
  color: var(--red);
  background: var(--red-light);
  border: 1px solid #e8b4b7;
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* ─────────────────────────────────────
   ITEM DETAIL PAGE
───────────────────────────────────── */
.detail-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 5rem;
}

.detail-back-link {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--text-sub);
  margin-bottom: 1.25rem;
  text-decoration: none;
}

.detail-back-link:hover { color: var(--red); }
.detail-back-link:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.detail-hero {
  width: 100%;
  height: 280px;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.detail-hero--outdoor     { background: var(--green-lt); }
.detail-hero--kitchen     { background: var(--mustard-lt); }
.detail-hero--tools       { background: var(--blue-lt); }
.detail-hero--electronics { background: #f0ebe8; }
.detail-hero--furniture   { background: var(--cream-dark); }
.detail-hero--sports      { background: var(--blue-lt); }
.detail-hero--other       { background: var(--cream-dark); }

.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.detail-name {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.2;
}

.detail-status-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  background: var(--mustard-lt);
  color: var(--mustard);
  border: 1px solid #e8d49a;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.detail-category-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-sub);
  letter-spacing: 0.02em;
}

.detail-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: -0.25rem;
}

.detail-description {
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin: 0;
}

.detail-heirloom-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  background: var(--red-light);
  border: 1px solid #e8b4b7;
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
}

.detail-care-box {
  background: var(--red-light);
  border: 1px solid #e8b4b7;
  border-radius: 4px;
  padding: 0.85rem 1rem;
}

.detail-care-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.35rem;
}

.detail-care-body {
  font-size: 0.84rem;
  color: var(--red-dark);
  line-height: 1.5;
  margin: 0;
}

.detail-divider { height: 1px; background: var(--border-lt); margin: 0.25rem 0; }

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.5rem;
}

.detail-info-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.detail-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.detail-info-icon--gray  { background: var(--cream-dark); color: var(--text-sub); }
.detail-info-icon--blue  { background: var(--blue-lt);    color: var(--blue); }
.detail-info-icon--green { background: var(--green-lt);   color: var(--green); }
.detail-info-icon--amber { background: var(--mustard-lt); color: var(--mustard); }

.detail-info-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.15rem; text-transform: uppercase; letter-spacing: 0.04em; }
.detail-info-value { font-size: 0.92rem; font-weight: 700; color: var(--charcoal); }

.detail-visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.detail-visibility-group { color: var(--text-sub); font-weight: 500; }
.detail-visibility-value { color: var(--text-muted); font-style: italic; }

.detail-success-msg {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-lt);
  border-radius: 3px;
  padding: 0.65rem 0.85rem;
}

.detail-primary-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', Arial, sans-serif;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}

.detail-primary-btn:hover { background: var(--red-dark); }
.detail-primary-btn:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }
.detail-primary-btn:disabled { opacity: 0.4; cursor: default; }

.detail-secondary-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--white);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', Arial, sans-serif;
  transition: background 0.15s;
}

.detail-secondary-btn:hover { background: var(--cream); }
.detail-secondary-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
