/* Inventário — design tokens from design_handoff_inventario/README.md */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #000000;
  color: #eceae8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0;
}
a { color: rgb(56, 97, 149); text-decoration: none; }
a:hover { color: rgb(86, 132, 190); }
::selection { background: rgba(56, 97, 149, 0.35); }

/* Top bar */
.topbar { height: 64px; background: #222020; border-bottom: 1px solid #3a3736; display: flex; align-items: center; padding: 0 32px; gap: 24px; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: #ffffff; font-weight: 600; font-size: 1rem; white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; background: rgb(56, 97, 149); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; }
.topbar-search { flex: 1; max-width: 560px; display: flex; align-items: center; background: #373433; border: 1px solid #3a3736; padding: 9px 14px; transition: border-color 120ms; }
.topbar-search:focus-within { border-color: rgb(56, 97, 149); box-shadow: 0 0 0 .25rem rgba(56, 97, 149, 0.25); }
.topbar-search input { background: none; border: none; color: #eceae8; flex: 1; font-size: 0.9rem; outline: none; }
.topbar-search input::placeholder { color: #6e6b69; }
.topbar-search i { color: rgb(56, 97, 149); margin-right: 10px; }
.btn-post { background: rgb(56, 97, 149); color: #fff; border: none; padding: 10px 20px; font-size: 0.875rem; font-weight: 600; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: background 120ms; white-space: nowrap; }
.btn-post:hover { background: rgb(46, 82, 128); color: #fff; }
.topbar-link { color: #9a9694; font-size: 0.875rem; font-weight: 500; flex-shrink: 0; white-space: nowrap; }
.topbar-link:hover { color: #a9c1df; }
.user-menu { position: relative; margin-left: auto; flex-shrink: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; background: none; border: none; padding: 0; }
.user-chip:hover .user-name { color: #a9c1df; }
.user-name { color: #eceae8; font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgb(56, 97, 149); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; }
.user-menu-dropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; min-width: 200px;
  background: #222020; border: 1px solid #3a3736; z-index: 20; flex-direction: column; padding: 6px;
}
.user-menu.open .user-menu-dropdown { display: flex; }
.user-menu-dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #eceae8; font-size: 0.875rem; white-space: nowrap; }
.user-menu-dropdown a:hover { background: #373433; color: #eceae8; }
.user-menu-dropdown i { color: rgb(56, 97, 149); width: 16px; text-align: center; }

.layout { margin: 0 auto; padding: 32px; display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }

/* Sidebar filters */
.sidebar { background: #222020; border: 1px solid #3a3736; padding: 24px; position: sticky; top: 96px; overflow: hidden; }
.sidebar-toggle { display: none; width: 100%; align-items: center; justify-content: space-between; background: none; border: none; color: #eceae8; font-size: 0.875rem; font-weight: 600; padding: 0; cursor: pointer; }
.sidebar-toggle-radius { display: flex; align-items: center; gap: 6px; color: #9a9694; font-size: 0.8125rem; font-weight: 400; }
.sidebar-toggle-radius strong { color: #eceae8; font-weight: 600; }
.sidebar-toggle-radius i { transition: transform 120ms; }
.sidebar.expanded .sidebar-toggle-radius i { transform: rotate(180deg); }
.sidebar-section { margin-bottom: 28px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-eyebrow { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: #9a9694; font-weight: 600; margin-bottom: 14px; }
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: #eceae8; background: none; border: none; text-align: left; font-size: 0.875rem; cursor: pointer; transition: all 120ms; width: 100%; }
.cat-item i { color: rgb(56, 97, 149); width: 16px; text-align: center; }
.cat-item:hover { background: #373433; color: #eceae8; }
.cat-item.active { background: rgba(56, 97, 149, 0.18); color: #ffffff; border-left: 3px solid rgb(56, 97, 149); padding-left: 7px; }

.city-select { width: 100%; background: #373433; border: 1px solid #3a3736; color: #eceae8; padding: 9px 10px; font-size: 0.875rem; }
.city-select:focus { border-color: rgb(56, 97, 149); outline: none; box-shadow: 0 0 0 .25rem rgba(56, 97, 149, 0.25); }

.slider-row { display: flex; flex-direction: column; gap: 10px; }
.dist-slider { width: 100%; height: 32px; accent-color: rgb(56, 97, 149); background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.dist-slider::-webkit-slider-runnable-track { height: 6px; background: #373433; border: 1px solid #3a3736; }
.dist-slider::-moz-range-track { height: 6px; background: #373433; border: 1px solid #3a3736; }
.dist-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: rgb(56, 97, 149); border: 2px solid #eceae8; margin-top: -7px; cursor: pointer; }
.dist-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: rgb(56, 97, 149); border: 2px solid #eceae8; cursor: pointer; }
.slider-value { font-size: 0.8125rem; color: #9a9694; }
.slider-value strong { color: #eceae8; }

.legend-list { display: flex; flex-direction: column; gap: 8px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: #eceae8; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.map-wrapper { width: 100%; aspect-ratio: 2 / 3; border: 1px solid #3a3736; overflow: hidden; background: #373433; }
.map-frame { width: 100%; height: 100%; border: 0; background: #1a1a1a; }
/* OSM ships light tiles; invert only the tile pane (not markers, controls or
   the attribution) so the map reads as dark. The hue-rotate undoes the colour
   flip that a plain invert causes, so water stays blue instead of going orange. */
.map-frame .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.85) saturate(0.7);
}
.leaflet-control-attribution { background: rgba(34, 32, 32, 0.75) !important; color: #9a9694 !important; font-size: 0.625rem !important; }
.leaflet-control-attribution a { color: rgb(86, 132, 190) !important; }

/* Main content */
.content-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 1.75rem; font-weight: 300; color: #ffffff; margin: 0 0 4px 0; }
.page-subtitle { color: #9a9694; font-size: 0.875rem; margin: 0; }
.result-count { color: #9a9694; font-size: 0.8125rem; }
.result-count strong { color: #eceae8; }

.sort-row { display: flex; align-items: center; gap: 8px; }
.sort-select { background: #373433; border: 1px solid #3a3736; color: #eceae8; padding: 7px 10px; font-size: 0.8125rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

.item-card { background: #222020; border: 1px solid #3a3736; overflow: hidden; cursor: pointer; transition: border-color 120ms, transform 120ms; display: block; color: inherit; }
.item-card:hover { border-color: rgb(56, 97, 149); transform: translateY(-2px); color: inherit; }

.item-image-wrapper { width: 100%; padding-bottom: 92%; position: relative; background: #373433; overflow: hidden; }
.item-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.image-placeholder { position: absolute; inset: 0; background: #373433; display: flex; align-items: center; justify-content: center; color: #6e6b69; font-size: 1.75rem; }

.item-badge { position: absolute; top: 8px; left: 8px; background: rgba(34,32,32,0.85); backdrop-filter: blur(2px); border: 1px solid #3a3736; color: #a9c1df; padding: 3px 8px; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; }
.item-condition { position: absolute; top: 8px; right: 8px; padding: 3px 8px; font-size: 0.6875rem; font-weight: 600; }

.item-content { padding: 14px; }
.item-title { font-size: 0.9rem; font-weight: 600; color: #ffffff; margin: 0 0 8px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item-location { display: flex; align-items: center; gap: 5px; color: #9a9694; font-size: 0.78125rem; min-width: 0; }
.item-location span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-location i { color: rgb(56, 97, 149); flex-shrink: 0; }
.item-distance { color: #6e6b69; font-size: 0.75rem; flex-shrink: 0; }

.empty-state { text-align: center; padding: 80px 32px; color: #9a9694; grid-column: 1 / -1; }
.empty-state i { font-size: 2.5rem; color: rgb(56, 97, 149); margin-bottom: 16px; display: block; }
.empty-state-title { font-size: 1.0625rem; color: #eceae8; margin-bottom: 6px; }

.footer { margin: 0 auto; padding: 24px 32px; border-top: 1px solid #3a3736; display: flex; justify-content: space-between; align-items: center; color: #6e6b69; font-size: 0.8125rem; flex-wrap: wrap; gap: 8px; }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid #3a3736; color: #eceae8; background: #222020; }
.pagination a:hover { border-color: rgb(56, 97, 149); color: #eceae8; }
.pagination .current { background: rgb(56, 97, 149); border-color: rgb(56, 97, 149); color: #fff; }

/* Forms (item create/edit) */
.form-card { background: #222020; border: 1px solid #3a3736; padding: 32px; max-width: 640px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.8125rem; color: #9a9694; margin-bottom: 8px; font-weight: 600; }
.form-control, select.form-control, textarea.form-control {
  width: 100%; background: #373433; border: 1px solid #3a3736; color: #eceae8;
  padding: 10px 12px; font-size: 0.875rem; font-family: inherit;
}
.form-control:focus { border-color: rgb(56, 97, 149); outline: none; box-shadow: 0 0 0 .25rem rgba(56, 97, 149, 0.25); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-errors { color: #ff8f8f; font-size: 0.8125rem; margin-top: 6px; }
.form-hint { color: #9a9694; font-size: 0.78125rem; margin-top: 6px; }

.autocomplete { position: relative; }
.autocomplete-suggestions {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: #222020; border: 1px solid #3a3736; max-height: 220px; overflow-y: auto;
}
.autocomplete-item { padding: 9px 12px; font-size: 0.875rem; color: #eceae8; cursor: pointer; }
.autocomplete-item:hover { background: #373433; }
.form-actions { display: flex; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1.5; border: 1px solid #3a3736; cursor: pointer; background: #373433; color: #eceae8; transition: all 120ms; }
.btn:hover { background: #454140; color: #eceae8; }
.btn-primary { background: rgb(56, 97, 149); border-color: rgb(56, 97, 149); color: #fff; }
.btn-primary:hover { background: rgb(46, 82, 128); color: #fff; }
.btn-danger { background: #dc3545; border-color: #dc3545; color: #fff; }
.btn-danger:hover { background: #b02a37; color: #fff; }

.page-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }

.form-row-2 { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }

/* Photo manager (item create/edit) */
.photo-manager { display: flex; flex-direction: column; gap: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.photo-thumb { position: relative; aspect-ratio: 1; border: 1px solid #3a3736; overflow: hidden; cursor: grab; background: #373433; }
.photo-thumb.dragging { opacity: 0.4; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.photo-thumb-cover {
  position: absolute; bottom: 4px; left: 4px; background: rgba(0, 0, 0, 0.65); border: 1px solid #3a3736;
  color: #eceae8; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 2px 6px;
}
.photo-thumb-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.65); border: 1px solid #3a3736; color: #eceae8;
  display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; cursor: pointer; padding: 0;
}
.photo-thumb-remove:hover { background: #dc3545; border-color: #dc3545; }
.photo-slot-add {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #222020; border: 1px dashed #3a3736; color: #6e6b69; font-size: 0.6875rem; text-align: center;
  cursor: pointer; padding: 4px; transition: all 120ms;
}
.photo-slot-add i { font-size: 1.125rem; color: rgb(56, 97, 149); }
.photo-slot-add:hover { border-color: rgb(56, 97, 149); color: #9a9694; }

/* Condition chips */
.condition-options { display: flex; flex-wrap: wrap; gap: 8px; }
.condition-chip {
  display: flex; align-items: center; gap: 8px; background: #373433; border: 1px solid #3a3736;
  color: #eceae8; padding: 8px 14px; font-size: 0.8125rem; cursor: pointer; transition: all 120ms;
}
.condition-chip:hover { background: #3f3c3b; }
.condition-chip:has(.condition-radio-input:checked) {
  border-color: var(--chip-color); background: rgba(56, 97, 149, 0.18); color: #ffffff;
}
.condition-radio-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.condition-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* Item detail (Item Listing) */
.back-row { margin: 0 auto; padding: 24px 32px 0 32px; }
.item-detail-layout { margin: 0 auto; padding: 24px 32px 64px 32px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }

.gallery-main { width: 100%; aspect-ratio: 1 / 1; background: #222020; border: 1px solid #3a3736; position: relative; overflow: hidden; margin-bottom: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6e6b69; font-size: 3rem; }
.gallery-condition { position: absolute; top: 12px; right: 12px; padding: 5px 12px; font-size: 0.75rem; font-weight: 600; }
.gallery-thumbs { display: flex; gap: 10px; }
.gallery-thumb { width: 72px; height: 72px; background: #373433; border: 1px solid #3a3736; cursor: pointer; flex-shrink: 0; overflow: hidden; transition: border-color 120ms; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: rgb(56, 97, 149); }

.detail-title-eyebrow { color: rgb(56, 97, 149); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 8px; }
.detail-title { font-size: 1.625rem; font-weight: 300; color: #ffffff; margin: 0 0 16px 0; }

.info-card { background: #222020; border: 1px solid #3a3736; padding: 20px; margin-bottom: 16px; }
.info-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #3a3736; }
.info-row:last-child { border-bottom: none; }
.info-row i { color: rgb(56, 97, 149); width: 18px; text-align: center; flex-shrink: 0; }
.info-label { color: #9a9694; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; display: block; }
.info-value { color: #eceae8; font-size: 0.9375rem; }
.info-value-faded { color: #6e6b69; font-size: 0.8125rem; }

.btn-primary-lg { width: 100%; background: rgb(56, 97, 149); color: #fff; border: none; padding: 14px 20px; font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.5; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: background 120ms; margin-bottom: 12px; }
.btn-primary-lg:hover { background: rgb(46, 82, 128); color: #fff; }
.btn-secondary-lg { width: 100%; background: #222020; color: rgb(56, 97, 149); border: 1px solid #3a3736; padding: 14px 20px; font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.5; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: background 120ms; }
.btn-secondary-lg:hover { background: #373433; color: rgb(86, 132, 190); }

.donor-card { background: #222020; border: 1px solid #3a3736; padding: 20px; display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.donor-avatar { width: 48px; height: 48px; border-radius: 50%; background: rgb(56, 97, 149); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 600; flex-shrink: 0; }
.donor-name { color: #ffffff; font-weight: 600; font-size: 0.9375rem; margin: 0 0 2px 0; }
.donor-meta { color: #9a9694; font-size: 0.8125rem; margin: 0; }

.section-eyebrow { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: #9a9694; font-weight: 600; margin-bottom: 12px; }
.description { color: #eceae8; font-size: 0.9375rem; line-height: 1.7; margin: 0 0 8px 0; }

.detail-map-wrapper { width: 100%; aspect-ratio: 16 / 7; border: 1px solid #3a3736; overflow: hidden; background: #373433; margin-top: 12px; }

.owner-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .item-detail-layout { grid-template-columns: 1fr; padding: 16px; gap: 24px; }
  .back-row { padding: 16px 16px 0 16px; }
  .detail-title { font-size: 1.375rem; }
  .gallery-thumb { width: 60px; height: 60px; }
  .info-card, .donor-card { padding: 16px; }
  .btn-primary-lg { padding: 13px 16px; font-size: 0.875rem; }
  .donor-avatar { width: 42px; height: 42px; font-size: 0.875rem; }
}
@media (max-width: 480px) {
  .gallery-thumbs { overflow-x: auto; padding-bottom: 4px; }
  .detail-title { font-size: 1.1875rem; }
  .info-row { padding: 8px 0; }
  .info-value { font-size: 0.875rem; }
  .description { font-size: 0.875rem; }
}
.alert { padding: 12px 16px; margin-bottom: 20px; border: 1px solid #3a3736; background: #373433; color: #eceae8; }
.alert-success { border-color: #198754; }
.alert-error { border-color: #dc3545; }

/* Toasts — floating flash messages, bottom right, self-dismissing */
.toast-container {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 40px));
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: #222020; border: 1px solid #3a3736; border-left: 3px solid #9a9694;
  padding: 12px 14px; color: #eceae8; font-size: 0.875rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  animation: toast-in 160ms ease-out;
}
.toast-success { border-left-color: #198754; }
.toast-error { border-left-color: #dc3545; }
.toast-icon { flex-shrink: 0; color: #9a9694; }
.toast-success .toast-icon { color: #39d25f; }
.toast-error .toast-icon { color: #e77b84; }
.toast-text { flex: 1; min-width: 0; }
.toast-close {
  flex-shrink: 0; background: none; border: none; color: #6e6b69;
  font: inherit; font-size: 0.875rem; line-height: 1; padding: 0; cursor: pointer;
}
.toast-close:hover { color: #eceae8; }
.toast-leaving { opacity: 0; transform: translateX(16px); transition: opacity 180ms, transform 180ms; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .toast-container { right: 12px; left: 12px; bottom: 12px; width: auto; } }

/* Login card (allauth override) */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; background: #222020; border: 1px solid #3a3736; padding: 40px 36px; }
.brand-block { text-align: center; margin-bottom: 32px; }
.brand-title { color: #ffffff; font-size: 1.25rem; font-weight: 600; margin: 0 0 6px 0; }
.brand-subtitle { color: #9a9694; font-size: 0.8125rem; margin: 0; }
.divider-text { text-align: center; color: #6e6b69; font-size: 0.8125rem; margin: 4px 0 24px 0; }
.btn-google { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; background: #ffffff; color: #212529; border: 1px solid #3a3736; padding: 12px 16px; font-size: 0.9375rem; font-weight: 500; cursor: pointer; transition: background 120ms; }
.btn-google:hover { background: #ececec; color: #212529; }
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }
.fine-print { text-align: center; color: #6e6b69; font-size: 0.75rem; margin-top: 24px; line-height: 1.6; }
.fine-print a { color: rgb(56, 97, 149); }
.back-link { display: flex; align-items: center; gap: 6px; color: #9a9694; font-size: 0.8125rem; margin-bottom: 28px; }
.back-link:hover { color: #a9c1df; }
.back-link i { font-size: 0.9rem; }

/* Allauth pages we don't template by hand — see templates/allauth/layouts/base.html.
   Allauth emits bare h1/p/form/input/button markup, so give those a house style. */
.allauth-page h1 { color: #ffffff; font-size: 1.25rem; font-weight: 600; margin: 0 0 12px 0; }
.allauth-page p { color: #9a9694; font-size: 0.875rem; margin: 0 0 12px 0; }
.allauth-page label { display: block; font-size: 0.8125rem; color: #9a9694; margin-bottom: 8px; font-weight: 600; }
.allauth-page input[type="text"], .allauth-page input[type="email"], .allauth-page input[type="password"] {
  width: 100%; background: #373433; border: 1px solid #3a3736; color: #eceae8;
  padding: 10px 12px; font: inherit; font-size: 0.875rem; margin-bottom: 12px;
}
.allauth-page button, .allauth-page input[type="submit"] {
  background: rgb(56, 97, 149); color: #fff; border: none; padding: 10px 20px;
  font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
.allauth-page button:hover, .allauth-page input[type="submit"]:hover { background: rgb(46, 82, 128); }
.allauth-page ul { list-style: none; padding: 0; margin: 0 0 12px 0; }
.allauth-page li { padding: 6px 0; font-size: 0.875rem; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .sidebar { position: static; padding: 18px; }
  .sidebar-toggle { display: flex; }
  .sidebar-body { display: none; margin-top: 18px; }
  .sidebar.expanded .sidebar-body { display: block; }
  .map-wrapper { aspect-ratio: 1 / 1; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; height: auto; row-gap: 10px; }
  .topbar-search { order: 3; max-width: none; flex-basis: 100%; }
  .btn-post { padding: 10px 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .content-header { flex-direction: column; align-items: flex-start; }
  .sort-row { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 1.375rem; }
  .brand span { font-size: 0.9375rem; }
  .user-name { display: none; }
  .topbar-link { display: none; }
}

/* Admin panel */
.panel-layout { margin: 0 auto; padding: 32px; display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.panel-sidebar { background: #222020; border: 1px solid #3a3736; padding: 16px; position: sticky; top: 96px; }
.panel-nav { display: flex; flex-direction: column; gap: 2px; }
.panel-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: #eceae8; font-size: 0.875rem; transition: all 120ms; }
.panel-nav-item i { color: rgb(56, 97, 149); width: 16px; text-align: center; }
.panel-nav-item:hover { background: #373433; color: #eceae8; }
.panel-nav-item.active { background: rgba(56, 97, 149, 0.18); color: #ffffff; border-left: 3px solid rgb(56, 97, 149); padding-left: 7px; }
.panel-nav-badge { margin-left: auto; background: #dc3545; color: #fff; font-size: 0.6875rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }

.panel-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-top: 20px; }
.panel-stat-card { background: #222020; border: 1px solid #3a3736; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.panel-stat-card-alert { border-color: #dc3545; }
.panel-stat-card-alert .panel-stat-value { color: #e77b84; }
.panel-stat-value { font-size: 1.75rem; font-weight: 300; color: #ffffff; }
.panel-stat-label { color: #9a9694; font-size: 0.8125rem; }

.panel-grid-2 { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.panel-card { background: #222020; border: 1px solid #3a3736; padding: 20px; margin-bottom: 20px; }

/* Two equal columns whose cards match in height (reservation emails) */
.panel-grid-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.panel-grid-even .panel-card { display: flex; flex-direction: column; margin-bottom: 0; }
.panel-grid-even .panel-card textarea { flex: 1; min-height: 260px; resize: vertical; }
.panel-grid-even .form-actions { margin-top: auto; }

.panel-search-form { display: flex; gap: 8px; margin: 20px 0; max-width: 420px; }
.panel-search-form .form-control { flex: 1; }

.panel-table { width: 100%; border-collapse: collapse; background: #222020; border: 1px solid #3a3736; font-size: 0.8125rem; }
.panel-table th, .panel-table td { padding: 10px 14px; border-bottom: 1px solid #3a3736; text-align: left; }
.panel-table th { color: #9a9694; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
.panel-table tr:last-child td { border-bottom: none; }
.panel-table-actions { display: flex; gap: 8px; }

.btn-sm { padding: 5px 10px; font-size: 0.75rem; }

.panel-badge { display: inline-block; padding: 2px 8px; font-size: 0.75rem; background: #373433; border: 1px solid #3a3736; color: #9a9694; }

/* Reservations inbox */
.inbox { background: #222020; border: 1px solid #3a3736; }
.inbox-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #3a3736; transition: background 120ms; }
.inbox-row:last-child { border-bottom: none; }
.inbox-row:hover { background: #262323; }
.inbox-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgb(56, 97, 149); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; }
.inbox-main { flex: 1; min-width: 0; color: inherit; display: block; }
.inbox-main:hover { color: inherit; }
.inbox-line1 { color: #eceae8; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-line1 strong { color: #ffffff; font-weight: 600; }
.inbox-line2 { color: #9a9694; font-size: 0.78125rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-meta { flex-shrink: 0; }
.inbox-days { display: inline-block; padding: 3px 10px; font-size: 0.75rem; background: #373433; border: 1px solid #3a3736; color: #9a9694; white-space: nowrap; }
.inbox-days-urgent { border-color: #dc3545; color: #e77b84; }
.inbox-actions { display: flex; gap: 6px; flex-shrink: 0; }
.inbox-action-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: #373433; border: 1px solid #3a3736; color: #eceae8; cursor: pointer; transition: all 120ms;
  font-size: 0.875rem;
}
.inbox-action-btn:hover { background: #3f3c3b; color: #eceae8; }
.inbox-action-btn-danger:hover { background: rgba(220, 53, 69, 0.18); color: #e77b84; border-color: #dc3545; }

@media (max-width: 640px) {
  .inbox-row { flex-wrap: wrap; }
  .inbox-line1, .inbox-line2 { white-space: normal; }
}
.panel-badge-on { background: rgba(56, 97, 149, 0.18); border-color: rgb(56, 97, 149); color: #a9c1df; }

@media (max-width: 860px) {
  .panel-layout { grid-template-columns: 1fr; padding: 16px; }
  .panel-sidebar { position: static; }
  .panel-nav { flex-direction: row; flex-wrap: wrap; }
  .panel-grid-2 { grid-template-columns: 1fr; }
  .panel-grid-even { grid-template-columns: 1fr; }
  .panel-table { display: block; overflow-x: auto; }
}

/* My Items */
.myitems-layout { max-width: 1400px; margin: 0 auto; padding: 32px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid #3a3736; margin-bottom: 24px; }
.tab-btn { background: none; border: none; color: #9a9694; padding: 10px 16px; font-size: 0.875rem; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; transition: all 120ms; }
.tab-btn:hover { color: #eceae8; }
.tab-btn.active { color: #ffffff; border-bottom-color: rgb(56, 97, 149); }
.tab-count { color: #6e6b69; margin-left: 4px; }

.myitem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.myitem-card { background: #222020; border: 1px solid #3a3736; overflow: hidden; transition: border-color 120ms; }
.myitem-card:hover { border-color: rgb(56, 97, 149); }

.myitem-image-wrapper { display: block; width: 100%; padding-bottom: 75%; position: relative; background: #373433; overflow: hidden; }
.myitem-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.status-badge { position: absolute; top: 8px; left: 8px; padding: 3px 10px; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.status-active { background: rgba(56, 97, 149, 0.92); color: #fff; }
.status-donated { background: #373433; color: #9a9694; border: 1px solid #3a3736; }

.myitem-content { padding: 14px; }
.myitem-title { font-size: 0.9rem; font-weight: 600; color: #ffffff; margin: 0 0 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.myitem-title a { color: #ffffff; }
.myitem-title a:hover { color: #a9c1df; }
.item-meta { display: flex; align-items: center; gap: 6px; color: #9a9694; font-size: 0.78125rem; margin-bottom: 12px; }
.item-meta i { color: rgb(56, 97, 149); }

.item-actions { display: flex; gap: 8px; }
.action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; background: #373433; border: 1px solid #3a3736; color: #eceae8; padding: 7px 10px; font-size: 0.78125rem; cursor: pointer; transition: background 120ms; }
.action-btn:hover { background: #3f3c3b; color: #eceae8; }
.action-btn.danger { color: #e77b84; }
.action-btn.danger:hover { background: rgba(220, 53, 69, 0.12); color: #e77b84; }

@media (max-width: 640px) {
  .myitems-layout { padding: 16px; }
  .content-header { flex-direction: column; }
  .btn-post { width: 100%; justify-content: center; }
  .myitem-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .item-actions { flex-direction: column; }
}
