/* ═══════════════════════════════════════════════════════════
   packLight Design System
   ═══════════════════════════════════════════════════════════ */

:root {
  --pl-green:        #588157;
  --pl-green-dark:   #3a5a40;
  --pl-green-light:  #a3b18a;
  --pl-green-bg:     #eef3ec;
  --pl-gray:         #6c757d;
  --pl-bg:           #f5f5f0;
  --pl-surface:      #ffffff;
  --pl-text:         #1a1a1a;
  --pl-text-muted:   #6c757d;
  --pl-border:       #e2e5df;
  --pl-red:          #d63031;
  --pl-red-light:    #fff5f5;
  --pl-amber:        #e17055;
  --pl-blue:         #0984e3;
  --pl-blue-light:   #e8f4fd;

  --pl-radius-sm:    8px;
  --pl-radius:       14px;
  --pl-radius-lg:    20px;

  --pl-shadow-sm:    0 1px 3px rgba(0,0,0,0.06);
  --pl-shadow:       0 2px 10px rgba(0,0,0,0.09);
  --pl-shadow-lg:    0 6px 24px rgba(0,0,0,0.14);

  --pl-transition:   0.18s ease;
  --pl-transition-fast: 0.10s ease;

  --navbar-height:   54px;
  --stats-bar-height: 80px;
  --bottom-bar-height: 72px;
}

/* ── Base ─────────────────────────────────────────────── */
body {
  background-color: var(--pl-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--pl-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.content-wrapper {
  padding-top: calc(var(--navbar-height) + 8px);
  padding-bottom: calc(var(--bottom-bar-height) + 16px);
}

/* ── Top Navbar ───────────────────────────────────────── */
.navbar {
  background: var(--pl-surface) !important;
  border-bottom: 1px solid var(--pl-border);
  box-shadow: var(--pl-shadow-sm);
  min-height: var(--navbar-height);
  padding: 4px 12px;
  flex-wrap: nowrap;
  transition: transform 0.22s ease-in-out;
}

.navbar-brand {
  font-weight: 700;
  color: var(--pl-green) !important;
  font-size: 1.05rem;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}

/* ── Cards ────────────────────────────────────────────── */
.pl-card {
  background: var(--pl-surface);
  border-radius: var(--pl-radius);
  box-shadow: var(--pl-shadow-sm);
  border: 1px solid var(--pl-border);
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow var(--pl-transition);
  cursor: pointer;
}
.pl-card:active { box-shadow: var(--pl-shadow); }
.pl-equipment-card,
.pl-packlist-card,
.pl-add-item-card {
  margin-bottom: 4px;
}

/* ── Item card row (dashboard) ────────────────────────── */
.item-card-inner {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
}
.item-thumb {
  width: 50px; height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--pl-border);
}
.item-thumb-placeholder {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #e8ebe5;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #b0b8ad; font-size: 16px;
}
.item-info { flex: 1; min-width: 0; }
.item-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.item-info .name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0 0 2px;
}
.item-info .meta {
  font-size: 12px; color: var(--pl-text-muted);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.item-unavailable .name  { color: var(--pl-text-muted); }
.item-unavailable .item-thumb,
.item-unavailable .item-thumb-placeholder { opacity: 0.35; }
.item-unavailable .meta { color: #9aa39a; }

/* ── Category management ─────────────────────────────── */
.category-manage-card {
  padding: 0;
}
.category-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.category-row-icon {
  color: var(--pl-green-light);
  font-size: 18px;
  flex-shrink: 0;
}
.category-row-actions {
  flex-shrink: 0;
  align-self: flex-start;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.category-sort-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.category-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-meta {
  font-size: 12px;
  color: var(--pl-text-muted);
  margin-top: 2px;
}
.category-edit-wrap {
  width: 100%;
}
.category-edit-input {
  min-height: 40px;
}
.category-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.category-inline-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--pl-border);
  background: var(--pl-surface);
  color: var(--pl-text-muted);
}
.category-inline-btn-save {
  background: var(--pl-green);
  color: white;
  border-color: var(--pl-green);
}
.category-edit-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--pl-text-muted);
}

/* ── Packlist card row (dashboard) ───────────────────── */
.pl-card-inner {
  display: flex; align-items: center;
  padding: 11px 14px; gap: 10px;
}
.pl-card-info { flex: 1; min-width: 0; }
.pl-card-info .name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0 0 4px;
}
.pl-card-info .meta {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.pl-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--pl-green-bg); color: var(--pl-green-dark);
  border-radius: 6px; padding: 2px 7px;
  font-size: 11px; font-weight: 600;
}
.pl-badge-gray { background: #f0f0ec; color: var(--pl-text-muted); }

/* ── Category group headers ───────────────────────────── */
.cat-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 4px 5px;
}
.cat-header-text {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.7px;
  text-transform: uppercase; color: var(--pl-text-muted); white-space: nowrap;
}
.cat-header-line { flex: 1; height: 1px; background: var(--pl-border); }
.cat-count {
  font-size: 10px; color: var(--pl-text-muted); font-weight: 600;
  background: #f0f0ec; border-radius: 10px; padding: 1px 7px;
}

/* ── Category filter chips (horizontal scroll) ────────── */
.filter-chips-bar {
  display: flex; gap: 7px; overflow-x: auto;
  padding: 8px 16px 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  border-bottom: 1px solid var(--pl-border);
  background: var(--pl-surface);
  position: sticky;
  top: var(--navbar-offset, var(--navbar-height));
  z-index: 80;
  transition: top 0.22s ease-in-out;
}
.filter-chips-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; height: 30px; padding: 0 13px;
  border-radius: 15px; border: 1.5px solid var(--pl-border);
  background: white; color: var(--pl-text-muted);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all var(--pl-transition); white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.filter-chip.active {
  border-color: var(--pl-green); background: var(--pl-green-bg); color: var(--pl-green-dark);
}

@media (max-width: 575.98px) {
  .category-row {
    align-items: flex-start;
    gap: 10px;
  }
  .category-row-actions {
    gap: 8px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .filter-chips-bar {
    scrollbar-width: thin;
    scrollbar-color: var(--pl-green-light) transparent;
    cursor: ew-resize;
  }

  .filter-chips-bar::-webkit-scrollbar {
    display: block;
    height: 8px;
  }

  .filter-chips-bar::-webkit-scrollbar-thumb {
    background: var(--pl-green-light);
    border-radius: 999px;
  }

  .filter-chips-bar::-webkit-scrollbar-track {
    background: transparent;
  }
}

/* ── Bottom Tab Bar (mobile) ──────────────────────────── */
.pl-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom));
  background: var(--pl-surface);
  border-top: 1px solid var(--pl-border);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.07);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
}
.pl-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--pl-text-muted); cursor: pointer;
  font-size: 11px; font-weight: 500; padding: 8px 0;
  border: none; background: none; outline: none;
  transition: color var(--pl-transition);
  -webkit-tap-highlight-color: transparent;
}
.pl-tab.active { color: var(--pl-green); }
.pl-tab i { font-size: 21px; transition: transform var(--pl-transition); }
.pl-tab.active i { transform: scale(1.07); }
.pl-tab-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--pl-green); opacity: 0;
  transition: opacity var(--pl-transition);
}
.pl-tab.active .pl-tab-dot { opacity: 1; }

/* ── FAB ─────────────────────────────────────────────── */
.pl-fab {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--pl-green); color: white;
  border: none; box-shadow: var(--pl-shadow-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer;
  transition: transform var(--pl-transition), background var(--pl-transition);
  -webkit-tap-highlight-color: transparent;
}
.pl-fab:hover { background: var(--pl-green-dark); }
.pl-fab:active { transform: scale(0.93); }

/* ── Stats bar ────────────────────────────────────────── */
.pl-stats-bar {
  position: sticky; top: var(--navbar-offset, var(--navbar-height)); z-index: 90;
  background: var(--pl-surface);
  border-bottom: 1px solid var(--pl-border);
  padding: 10px 16px 8px;
  box-shadow: var(--pl-shadow-sm);
  transition: top 0.22s ease-in-out;
}
.pl-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  align-items: start;
  gap: 4px;
  margin-bottom: 7px;
}
.pl-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-width: 0;
  width: 100%;
}
.pl-stat-value {
  font-size: 14px; font-weight: 700; color: var(--pl-text); white-space: nowrap;
}
.pl-stat-label {
  font-size: 9.5px; color: var(--pl-text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500;
}
.pl-progress-row { display: flex; align-items: center; gap: 8px; }
.pl-progress-track {
  flex: 1; height: 5px; background: var(--pl-border);
  border-radius: 3px; overflow: hidden;
}
.pl-progress-fill {
  height: 100%; background: var(--pl-green);
  border-radius: 3px; transition: width 0.3s ease;
}
.pl-progress-label {
  font-size: 11px; color: var(--pl-text-muted); white-space: nowrap; font-weight: 600;
}
.pl-stats-summary {
  cursor: pointer;
}
.pl-stats-expandable {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  padding-top: 0;
  transform: translateY(-6px);
  transition:
    max-height 0.26s ease,
    opacity 0.18s ease,
    padding-top 0.22s ease,
    transform 0.22s ease;
}
.pl-nutrient-stats {
  margin: 0 0 16px;
  padding: 0 0 2px;
}
.pl-stats-bar.is-expanded {
  max-height: calc(100vh - var(--navbar-offset, var(--navbar-height)) - 8px);
  overflow-y: auto;
}
.pl-stats-bar.is-expanded .pl-stats-expandable {
  max-height: 1200px;
  opacity: 1;
  pointer-events: auto;
  padding-top: 12px;
  transform: translateY(0);
  padding-right: 4px;
}
.pl-offcanvas-close i {
  transition: transform 0.2s ease;
}
.pl-stats-bar.is-expanded .pl-offcanvas-close i {
  transform: translateY(-1px);
}

/* ── Flash banners ───────────────────────────────────── */
.pl-flash-stack {
  position: fixed;
  top: calc(var(--navbar-offset, var(--navbar-height)) + 8px);
  left: 12px;
  right: 12px;
  z-index: 260;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.pl-flash-toast {
  width: min(100%, 560px);
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  box-shadow: var(--pl-shadow);
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}
.pl-flash-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 575.98px) {
  .pl-flash-stack {
    left: 10px;
    right: 10px;
  }
}

/* ── Packlist item card ───────────────────────────────── */
.pl-item-card {
  background: var(--pl-surface);
  border-radius: var(--pl-radius);
  box-shadow: var(--pl-shadow-sm);
  border: 1px solid var(--pl-border);
  margin-bottom: 4px; overflow: hidden;
  transition: border-color var(--pl-transition), background var(--pl-transition);
}
.pl-item-card.is-packed {
  background: var(--pl-green-bg); border-color: #c2d9ba;
}
.pl-item-card.is-unavailable .pl-item-name {
  color: var(--pl-text-muted);
}
.pl-item-card.is-unavailable .pl-item-thumb,
.pl-item-card.is-unavailable .pl-item-thumb-placeholder { opacity: 0.4; }
.pl-item-card.is-unavailable .pl-item-stats,
.pl-item-card.is-unavailable .pl-item-cat { color: #9aa39a; }

.pl-item-top {
  display: flex; align-items: flex-start;
  padding: 10px 12px 0; gap: 10px;
}
.pl-item-thumb {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; background: var(--pl-border);
}
.pl-item-thumb-placeholder {
  width: 48px; height: 48px; border-radius: 50%;
  background: #e8ebe5; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #b0b8ad; font-size: 15px;
}
.pl-item-body { flex: 1; min-width: 0; }
.pl-item-name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0 0 1px;
}
.pl-item-cat {
  font-size: 10.5px; color: var(--pl-text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.pl-item-stats {
  font-size: 12px; color: var(--pl-text-muted); margin-top: 3px;
}
.pl-group-summary {
  margin: -2px 0 8px;
  padding: 0 6px;
  font-size: 11px;
  color: var(--pl-text-muted);
}

/* Pack button */
.pl-pack-btn {
  flex-shrink: 0; min-width: 78px; height: 30px;
  border-radius: 15px; border: 1.5px solid var(--pl-border);
  background: white; color: var(--pl-text-muted);
  font-size: 11px; font-weight: 700; cursor: pointer;
  transition: all var(--pl-transition);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.2px;
}
.pl-pack-btn.packed {
  border-color: var(--pl-green); background: var(--pl-green); color: white;
}

/* Bottom controls */
.pl-item-bottom {
  display: flex; align-items: center;
  padding: 6px 12px 10px; gap: 8px;
}

/* Stepper */
.pl-stepper {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--pl-border); border-radius: 10px; overflow: hidden;
}
.pl-stepper-btn {
  width: 36px; height: 32px;
  border: none; background: none; color: var(--pl-green);
  font-size: 17px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--pl-transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.pl-stepper-btn:active { background: var(--pl-green-bg); }
.pl-stepper-val {
  min-width: 28px; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--pl-text);
  border-left: 1.5px solid var(--pl-border); border-right: 1.5px solid var(--pl-border);
  padding: 0 4px; line-height: 32px;
}

/* Status chips */
.pl-chip-row { display: flex; gap: 5px; flex-wrap: nowrap; margin-left: auto; }
.pl-chip {
  height: 26px; padding: 0 9px;
  border-radius: 13px; border: 1.5px solid var(--pl-border);
  background: white; color: var(--pl-text-muted);
  font-size: 10.5px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 3px;
  transition: all var(--pl-transition);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.pl-chip.active-body  { border-color: var(--pl-blue);  background: var(--pl-blue-light);  color: var(--pl-blue); }
.pl-chip.active-ext   { border-color: var(--pl-amber); background: #fef3e2; color: var(--pl-amber); }

/* ── Action bar (packlist detail floating) ───────────── */
.pl-action-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 0 20px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 150; display: flex; justify-content: flex-end; gap: 12px;
  pointer-events: none;
}
.pl-action-bar > * { pointer-events: all; }
.pl-action-btn {
  width: 54px; height: 54px; border-radius: 50%; border: none; color: white;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--pl-shadow-lg);
  transition: transform var(--pl-transition), opacity var(--pl-transition);
  -webkit-tap-highlight-color: transparent;
}
.pl-action-btn:active { transform: scale(0.91); }
.pl-action-btn-add      { background: var(--pl-green); }
.pl-action-btn-settings { background: #636e72; }

/* ── Offcanvas (settings bottom sheet) ───────────────── */
.pl-offcanvas {
  border-radius: var(--pl-radius-lg) var(--pl-radius-lg) 0 0;
  max-height: 88vh;
}
.pl-offcanvas-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--pl-border); margin: 10px auto 14px;
}
.pl-offcanvas-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--pl-border);
  background: var(--pl-surface);
  color: var(--pl-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pl-offcanvas-close:hover {
  background: var(--pl-bg);
  color: var(--pl-text);
}

.pl-add-item-card {
  width: 100%;
}
.pl-add-item-inner {
  width: 100%;
  min-width: 0;
}
.pl-add-item-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-add-item-meta {
  font-size: 12px;
  color: var(--pl-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-add-item-card.item-unavailable .pl-add-item-name {
  color: var(--pl-text-muted);
}
.pl-add-item-card.item-unavailable .pl-add-item-meta {
  color: #9aa39a;
}
.pl-add-item-card.item-unavailable .item-thumb,
.pl-add-item-card.item-unavailable i,
.pl-add-item-card.item-unavailable div[style*="width:42px"] {
  opacity: 0.45;
}
.pl-gear-detail-card.item-unavailable #itemImage,
.pl-gear-detail-card.item-unavailable #itemImagePlaceholder {
  opacity: 0.45;
}
.pl-gear-item-title-unavailable {
  color: var(--pl-text-muted);
}

/* ── Modal delete confirm ─────────────────────────────── */
.pl-modal-delete-btn {
  background: var(--pl-red); color: white; border: none;
  border-radius: 8px; padding: 10px 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  width: 100%; transition: opacity var(--pl-transition);
}
.pl-modal-delete-btn:hover { opacity: 0.88; }

/* ── Empty state ─────────────────────────────────────── */
.pl-empty {
  text-align: center; padding: 48px 24px; color: var(--pl-text-muted);
}
.pl-empty i { font-size: 44px; opacity: 0.25; display: block; margin-bottom: 12px; }
.pl-empty p { font-size: 15px; margin: 0; }
.pl-empty .pl-empty-action {
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; background: var(--pl-green); color: white;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background var(--pl-transition);
  -webkit-tap-highlight-color: transparent;
}
.pl-empty .pl-empty-action:hover { background: var(--pl-green-dark); }

/* ── Form styles ─────────────────────────────────────── */
.pl-form-section { margin-bottom: 20px; }
.pl-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--pl-text-muted); margin-bottom: 6px; display: block;
}
.pl-input {
  width: 100%; padding: 10px 13px; font-size: 15px;
  border: 1.5px solid var(--pl-border); border-radius: 10px;
  background: var(--pl-surface); color: var(--pl-text);
  transition: border-color var(--pl-transition), box-shadow var(--pl-transition);
  outline: none;
}
.pl-input:focus {
  border-color: var(--pl-green);
  box-shadow: 0 0 0 3px rgba(88,129,87,0.12);
}
.pl-input-danger { border-color: var(--pl-red) !important; }
.pl-collapse-toggle {
  width: 100%;
  border: 1.5px solid var(--pl-border);
  border-radius: 10px;
  background: var(--pl-surface);
  color: var(--pl-text);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}
.pl-collapse-toggle i {
  color: var(--pl-text-muted);
}
.pl-collapse-panel {
  margin-top: 12px;
}

.category-sort-btn,
.category-delete-btn {
  border-radius: 8px;
  font-size: 12px;
  padding: 4px 10px;
}

.category-sort-btn {
  color: var(--pl-green-dark);
  border: 1.5px solid var(--pl-green-light);
  background: var(--pl-green-bg);
}

.category-sort-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.category-delete-btn {
  color: var(--pl-red);
  border: 1.5px solid var(--pl-red);
  background: white;
}

.pl-modal-dialog-compact {
  width: min(100% - 24px, 360px);
  margin-left: auto;
  margin-right: auto;
}

.pl-modal-dialog-compact .modal-content {
  width: 100%;
}

/* ── Bottom action bar (forms) ───────────────────────── */
.fixed-bottom-bar {
  position: fixed; bottom: 0; width: 100%;
  background: transparent; padding: 8px 0;
  z-index: 1000; display: flex; justify-content: center;
  left: 50%; transform: translateX(-50%);
}
.fixed-height.submit, .fixed-height.back, .fixed-height.info, .fixed-height.delete {
  height: 56px; width: 56px; border-radius: 50%;
  margin-bottom: 18px; margin-right: 12px;
  border: none; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: var(--pl-shadow-lg);
  transition: transform var(--pl-transition), opacity var(--pl-transition);
  -webkit-tap-highlight-color: transparent;
}
.fixed-height.submit { background: var(--pl-green); }
.fixed-height.back   { background: var(--pl-gray); }
.fixed-height.info   { background: #74b9ff; }
.fixed-height.delete { background: var(--pl-red); }
.fixed-height.submit:active,
.fixed-height.back:active,
.fixed-height.info:active,
.fixed-height.delete:active { transform: scale(0.92); }
.fixed-height.submit:hover { background: var(--pl-green-dark); }
.fixed-height.back:hover   { background: #5a6268; }
.fixed-height.delete:hover { background: #b42324; }

/* ── Thumbnail compat ─────────────────────────────────── */
.thumbnail-img {
  border-radius: 50%; width: 50px; height: 50px;
  object-fit: cover; min-width: 50px; min-height: 50px;
  background: var(--pl-border); flex-shrink: 0; padding: 0;
}

/* ── Desktop ──────────────────────────────────────────── */
@media (min-width: 768px) {
  .content-wrapper {
    padding-top: calc(var(--navbar-height) + 16px);
    padding-bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom) + 16px);
  }

  /* Dashboard two-column */
  .pl-desktop-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px; max-width: 1120px; margin: 0 auto;
    padding: 0 16px;
  }
  .pl-desktop-sidebar {
    position: sticky; top: calc(var(--navbar-height) + 16px); height: fit-content;
  }

  /* Desktop tab bar replaces mobile bottom bar */
  .pl-desktop-tabs {
    display: flex; gap: 2px;
    border-bottom: 2px solid var(--pl-border); margin-bottom: 16px;
  }
  .pl-desktop-tab {
    padding: 10px 22px; border: none; background: none;
    font-size: 14px; font-weight: 600; color: var(--pl-text-muted);
    cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all var(--pl-transition);
  }
  .pl-desktop-tab.active { color: var(--pl-green); border-bottom-color: var(--pl-green); }

  /* Desktop add button */
  .pl-desktop-add-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; background: var(--pl-green); color: white;
    border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background var(--pl-transition);
    -webkit-tap-highlight-color: transparent;
  }
  .pl-desktop-add-btn:hover { background: var(--pl-green-dark); }

  /* Stats bar becomes a card */
  .pl-stats-bar {
    position: static; border-radius: var(--pl-radius);
    border: 1px solid var(--pl-border); margin-bottom: 16px;
    box-shadow: var(--pl-shadow-sm);
  }

  /* Action bar in-flow on desktop */
  .pl-action-bar {
    position: static; padding: 0 0 16px;
    justify-content: flex-start; pointer-events: all;
  }

  /* Card hover on desktop */
  .pl-card:hover, .pl-item-card:hover { box-shadow: var(--pl-shadow); }

  /* Filter chips not sticky on desktop */
  .filter-chips-bar { position: static; }
}

@media (min-width: 1024px) {
  .pl-desktop-layout { grid-template-columns: 1fr 380px; }
}
