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

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --border: #e0ddd6;
  --text: #1a1a18;
  --text-muted: #6b6860;
  --accent: #2d6a4f;
  --accent-hover: #245a42;
  --accent-light: #e8f5ee;
  --danger: #c0392b;
  --danger-hover: #a93226;
  --radius: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Auth screen ── */
#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1.5rem;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
.auth-logo {
  margin-bottom: 1.5rem;
  text-align: center;
}
.auth-wordmark {
  height: 40px;
  width: auto;
  display: inline-block;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-form { display: flex; flex-direction: column; gap: 0.85rem; }
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.auth-form label input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.auth-form label input:focus { border-color: var(--accent); }
.btn-full { width: 100%; padding: 0.6rem; font-size: 0.95rem; }
.auth-error {
  color: var(--danger);
  font-size: 0.83rem;
  background: #fdecea;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
}
.auth-hint {
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  padding: 0.4rem 0;
}
.auth-code-input {
  letter-spacing: 6px;
  font-size: 1.4rem !important;
  font-weight: 700;
  text-align: center;
}
.btn-text-subtle {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.25rem 0;
  text-align: center;
  width: 100%;
}
.btn-text-subtle:hover { color: var(--text); }

/* ── Offline banner ── */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #b45309;
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  letter-spacing: 0.01em;
}
.offline-banner:not(.hidden) ~ #auth-screen,
.offline-banner:not(.hidden) ~ #app { padding-top: 2rem; }

/* ── Header user area ── */
header {
  background: var(--accent);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo-img {
  height: 28px;
  width: auto;
  display: block;
}
@media (min-width: 640px) {
  .logo-img { height: 44px; }
}
.header-user {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* ── User menu button ── */
.user-menu { position: relative; }

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  padding: 0.3rem 0.55rem 0.3rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s;
  white-space: nowrap;
}
.user-menu-btn:hover { background: rgba(255,255,255,0.22); }

#header-username { color: inherit; }

.user-menu-chevron {
  opacity: 0.75;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.user-menu-btn[aria-expanded="true"] .user-menu-chevron { transform: rotate(180deg); }

/* ── Dropdown panel ── */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13), 0 1px 4px rgba(0,0,0,0.07);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownIn 0.15s ease;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-dropdown-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
}
.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d8f3dc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #2d6a4f;
  flex-shrink: 0;
}
.user-dropdown-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a1a1a;
}
.user-dropdown-role {
  font-size: 0.75rem;
  color: #2d6a4f;
  font-weight: 500;
  margin-top: 1px;
}
.user-dropdown-divider {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 0;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  color: #333;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.user-dropdown-item:hover { background: #f5f5f5; }
.user-dropdown-signout { color: #c0392b; }
.user-dropdown-signout:hover { background: #fff5f5; }

/* ── Settings modal ── */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
.settings-overlay.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.settings-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  animation: modalIn 0.18s ease;
  display: flex;
  flex-direction: column;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 1px solid #f0f0f0;
}
.settings-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.settings-close {
  background: #f5f5f5;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  transition: background 0.15s;
}
.settings-close:hover { background: #ebebeb; color: #333; }

.settings-body {
  flex: 1;
  padding: 0.5rem 0;
}

.settings-section {
  padding: 0.75rem 1.25rem;
}
.settings-section + .settings-section {
  border-top: 1px solid #f5f5f5;
}

.settings-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.settings-account-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.settings-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}
.settings-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.settings-email-display {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1px;
}
.settings-admin-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  margin-top: 2px;
}

.settings-field-row {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.settings-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-field-inline {
  display: flex;
  gap: 0.5rem;
}
.settings-field-input {
  flex: 1;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
.settings-field-input:focus {
  outline: none;
  border-color: var(--accent);
}
.settings-field-btn {
  padding: 0.4rem 0.85rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.settings-field-btn:hover { background: var(--accent-dark, #1e6b24); }
.settings-field-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.settings-field-btn--subtle {
  background: none;
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 500;
}
.settings-field-btn--subtle:hover { color: var(--text); border-color: #aaa; background: none; }
.settings-field-msg {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}
.settings-field-msg.success { color: var(--accent); background: var(--accent-light); }
.settings-field-msg.error   { color: var(--danger); background: #fdecea; }

.settings-support-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #fffbf5;
  border: 1px solid #fde8c3;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.settings-support-link:hover {
  background: #fff5e6;
  border-color: #f7c98a;
}
.settings-support-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.settings-support-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #7c4a00;
}
.settings-support-sub {
  font-size: 0.75rem;
  color: #a86a1a;
  margin-top: 1px;
}
.settings-support-arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: #c68a2a;
}
.settings-opensource-link {
  background: #f6f8fa;
  border-color: #d0d7de;
}
.settings-opensource-link:hover {
  background: #eef1f4;
  border-color: #b0bbc5;
}
.settings-opensource-link .settings-support-icon {
  color: #24292f;
}
.settings-opensource-title { color: #24292f; }
.settings-opensource-link .settings-support-sub { color: #57606a; }
.settings-opensource-link .settings-support-arrow { color: #57606a; }

.settings-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid #f0f0f0;
}
.settings-signout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.875rem;
  background: #fff5f5;
  border: 1px solid #fdd;
  border-radius: 8px;
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.settings-signout-btn:hover {
  background: #ffe8e8;
  border-color: #f5c2c2;
}

nav { display: flex; gap: 0.25rem; }
.nav-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.75);
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-btn.active { background: rgba(255,255,255,0.2); color: #fff; }

/* ── Main layout ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.view-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--bg); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-danger:hover { background: var(--danger-hover); }

.back-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.back-btn:hover { text-decoration: underline; }

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.filter-bar input,
.filter-bar select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.filter-bar input { flex: 1; }
.filter-bar input:focus,
.filter-bar select:focus { border-color: var(--accent); }

/* ── Gear blocks ── */
#gear-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
#catalog-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.gear-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gear-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
}
.gear-block-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.gear-block-count {
  font-size: 0.78rem;
  color: var(--accent);
  opacity: 0.7;
}

/* ── Gear table ── */
.gear-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
.gear-table th {
  background: #f0ede7;
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.gear-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.gear-table tr:last-child td { border-bottom: none; }
.gear-table tr:hover td { background: #faf9f6; }

.gear-table .col-actions { text-align: right; white-space: nowrap; }
.gear-table .col-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.gear-table .col-actions button:hover { color: var(--accent); background: var(--accent-light); }
.gear-table .col-actions button.del:hover { color: var(--danger); background: #fdecea; }

.category-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}
.note-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-name-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  text-decoration-color: var(--text-muted);
}
.item-name-link:hover { text-decoration-color: var(--accent); color: var(--accent); }
.item-brand {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.1rem;
}
.note-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.12s;
}
.note-icon-btn:hover { color: var(--accent); }
.note-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  padding: 1rem 1.25rem 1rem 1rem;
  max-width: min(340px, 92vw);
  width: max-content;
  min-width: 220px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
}
.note-popup-header {
  margin-bottom: 0.65rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-right: 1.25rem;
}
.note-popup-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.note-popup-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.note-popup-body { display: flex; flex-direction: column; gap: 0.65rem; }
.note-popup-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}
.note-popup-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.note-popup-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.note-popup-stat-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.note-popup-notes {
  font-size: 0.83rem;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.55;
}
.note-popup-notes:empty { display: none; }
.note-popup-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.note-popup-variant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--border);
}
.note-popup-variant-row:last-child { border-bottom: none; }
.note-popup-variant-weight { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.note-popup-close {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1;
  padding: 0.2rem;
}
.note-popup-close:hover { color: var(--text); }

/* ── Bundles ── */
.bundle-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.bundle-block-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  user-select: none;
}
.bundle-block:not(.expanded) .bundle-block-header {
  border-bottom: none;
  border-radius: var(--radius);
}
.bundle-block-header:hover { background: var(--accent-hover-light, color-mix(in srgb, var(--accent-light) 80%, var(--accent) 20%)); }
.bundle-chevron { font-size: 0.72rem; color: var(--accent); flex-shrink: 0; }
.bundle-block-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  flex: 1;
}
.bundle-block-count { font-size: 0.78rem; color: var(--accent); opacity: 0.7; }
.bundle-block-actions { display: flex; align-items: center; gap: 0.5rem; }
.bundle-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1;
  padding: 0;
}
.bundle-del:hover { color: var(--danger); }
.bundle-item-list {
  list-style: none;
  padding: 0 1rem;
}
.bundle-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.bundle-item:last-child { border-bottom: none; }
.bundle-item-info { flex: 1; min-width: 0; }
.bundle-item-name { font-size: 0.88rem; font-weight: 500; }
.bundle-item-meta { font-size: 0.75rem; color: var(--text-muted); }
.bundle-add-gear {
  padding: 0.65rem 1rem 0.75rem;
  border-top: 1px solid var(--border);
}
.bundle-search {
  width: 100%;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  margin-bottom: 0.35rem;
  transition: border-color 0.15s;
}
.bundle-search:focus { border-color: var(--accent); }
.bundle-search-results {
  list-style: none;
  display: flex;
  flex-direction: column;
  max-height: 200px;
  overflow-y: auto;
}
.bundle-result-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
}
.bundle-result-item:hover { background: var(--accent-light); }
.bundle-result-info { flex: 1; min-width: 0; }
.bundle-result-name { font-size: 0.85rem; font-weight: 500; }
.bundle-result-meta { font-size: 0.75rem; color: var(--text-muted); }

/* Bundle picker in trip sidebar */
.picker-bundle-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}
.picker-bundle-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  transition: background 0.12s;
}
.picker-bundle-item:hover { background: var(--accent-light); }
.picker-bundle-info { flex: 1; min-width: 0; }
.picker-bundle-name { font-size: 0.88rem; font-weight: 500; display: block; }
.picker-bundle-count { font-size: 0.75rem; color: var(--text-muted); }
.picker-bundle-add {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.picker-bundle-add:hover { background: var(--accent-hover); }
.picker-bundle-add.in-pack { background: #aaa; cursor: default; }
.picker-section-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0 0.85rem;
}

/* ── Empty message ── */
.empty-msg {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
  text-align: center;
}

/* ── Catalog ── */
.btn-add-from-catalog {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.btn-add-from-catalog:hover   { background: var(--accent-hover); }
.btn-add-from-catalog:disabled { background: #aaa; cursor: default; }

.admin-panel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.pending-count-badge {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}
#admin-pending-panel {
  background: #fff8f7;
  border: 1px solid #f5c6c2;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
#pending-list .gear-table { margin-top: 0.5rem; }

/* ── Trip list ── */
.trip-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
/* Section headers inside trip list */
.trip-section-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.5rem 0 0.25rem;
  list-style: none;
}
.trip-section-header:first-child { padding-top: 0; }
.trip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.trip-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.1); border-color: var(--accent); }
.trip-card-archived { opacity: 0.72; }
.trip-archived-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  color: var(--text-muted);
  vertical-align: middle;
  margin-left: 0.35rem;
}
.trip-archived-banner {
  background: var(--text-muted);
  color: #fff;
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}
.trip-card-info h4 { font-size: 1rem; font-weight: 600; }
.trip-card-info .meta { font-size: 0.83rem; color: var(--text-muted); margin-top: 0.15rem; }
.trip-detail-notes { font-size: 0.88rem; color: var(--text-muted); margin-top: -0.75rem; margin-bottom: 1.5rem; font-style: italic; }
.trip-card-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
}

/* ── Trip detail ── */
.trip-actions { display: flex; gap: 0.5rem; }
.trip-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.pack-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.pack-weights {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.pack-weight-row {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
}
.pack-weight-label {
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.item-type-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.item-type-btn {
  background: none;
  border: none;
  padding: 0.2rem 0.35rem;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.1s, background 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-type-btn + .item-type-btn { border-left: 1px solid var(--border); }
.item-type-btn:hover { background: var(--bg); opacity: 0.7; }
.item-type-btn.active { background: var(--accent-light); opacity: 1; }

.pack-chart-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  transition: color 0.12s;
  margin-left: auto;
}
.pack-chart-btn:hover { color: var(--accent); }

.weight-chart-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  padding: 1.25rem 1.25rem 1rem;
  width: 220px;
}
.weight-chart-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-align: center;
}
.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.chart-legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.chart-legend-label { flex: 1; color: var(--text); }
.chart-legend-value { color: var(--text-muted); }
.pack-weight-row {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
}
.pack-weight-label {
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}


.pack-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 720px) {
  .pack-layout { grid-template-columns: 1fr; }
}

.pack-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.pack-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.pack-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pack-tab-new {
  background: transparent;
  color: var(--text-muted);
  border-style: dashed;
}
.pack-tab-del {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.6;
  margin-left: 0.1rem;
}
.pack-tab-del:hover { opacity: 1; }
.pack-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.pack-name-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
}
.btn-link:hover { color: var(--text); }

.pack-column h3,
.gear-picker-column h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.cube-block {
  margin-bottom: 1.1rem;
}
.cube-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.3rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.cube-name {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.cube-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1;
  padding: 0;
}
.cube-del:hover { color: var(--text); }
.cube-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  font-style: italic;
}
.cube-block.drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
  background: var(--accent-light);
}
.cube-block.drag-over .cube-empty { color: var(--accent); }

/* ── Pack bundle groups ── */
.pack-bundle-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.pack-bundle-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  background: var(--surface-alt);
  user-select: none;
}
.pack-bundle-header:hover { background: var(--accent-light); }
.pack-bundle-chevron { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }
.pack-bundle-name { font-weight: 600; font-size: 0.88rem; flex: 1; }
.pack-bundle-stats { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.pack-bundle-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0 0.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.pack-bundle-remove:hover { color: var(--danger); }
.pack-bundle-items {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}
.pack-bundle-items .pack-item {
  border-bottom: 1px solid var(--border);
  padding-left: 1rem;
}
.pack-bundle-items .pack-item:last-child { border-bottom: none; }
.pack-bundle-qty {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0 0.35rem;
  flex-shrink: 0;
}

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0 0.15rem;
  flex-shrink: 0;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }
.pack-item.dragging {
  opacity: 0.4;
}

.btn-new-cube {
  margin-top: 0.5rem;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 100%;
}
.btn-new-cube:hover { color: var(--text); border-color: var(--text-muted); }

.pack-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.pack-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.pack-item-info { flex: 1; min-width: 0; }
.pack-item-name { font-size: 0.9rem; font-weight: 500; }
.pack-item-meta { font-size: 0.78rem; color: var(--text-muted); }
.pack-item-qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.pack-item-qty button {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.12s;
}
.pack-item-qty button:hover { background: var(--border); }
.pack-item-qty span { font-size: 0.85rem; font-weight: 600; min-width: 16px; text-align: center; }
.pack-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.15rem;
  border-radius: 4px;
  transition: color 0.12s;
  line-height: 1;
}
.pack-item-remove:hover { color: var(--danger); }

.pack-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.pack-item-checked .pack-item-name {
  text-decoration: line-through;
  color: var(--text-muted);
}
.pack-item-checked {
  opacity: 0.6;
}

/* ── Gear picker ── */
.gear-picker-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: sticky;
  top: 70px;
}
.gear-picker-column input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  outline: none;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}
.gear-picker-column input:focus { border-color: var(--accent); }
.picker-list { list-style: none; max-height: 420px; overflow-y: auto; }
.picker-category-group { margin-bottom: 0.5rem; }
.picker-category-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding: 0.4rem 0.6rem 0.2rem;
}
.picker-category-items { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  gap: 0.5rem;
}
.picker-item:hover { background: var(--accent-light); }
.picker-item-name { font-size: 0.88rem; font-weight: 500; flex: 1; min-width: 0; }
.picker-item-meta { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.picker-item-add {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.12s;
  white-space: nowrap;
}
.picker-item-add:hover { background: var(--accent-hover); }
.picker-item-add.in-pack { background: #aaa; cursor: default; }

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  position: static;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }
.modal form { display: flex; flex-direction: column; gap: 0.85rem; }
.modal label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.modal label input,
.modal label textarea,
.modal label select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.modal label input:focus,
.modal label textarea:focus { border-color: var(--accent); }
.modal label textarea { resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.25rem; }

/* ── Mobile / small screens ── */
@media (max-width: 600px) {
  /* Header */
  .header-inner { padding: 0 0.75rem; gap: 0.5rem; }
  .logo-img { height: 28px; }
  .nav-btn { padding: 0.3rem 0.55rem; font-size: 0.82rem; }
  #header-username { display: none; }

  /* Main */
  main { padding: 1rem 0.75rem; }

  /* Filter bar — wrap onto two lines */
  .filter-bar { flex-wrap: wrap; }
  .filter-bar input { min-width: 100%; }
  .filter-bar select { flex: 1; }

  /* Gear locker table — hide Brand + Qty; keep Name + Weight + Notes + Actions */
  #gear-container .gear-table th:nth-child(2),
  #gear-container .gear-table td:nth-child(2),
  #gear-container .gear-table th:nth-child(4),
  #gear-container .gear-table td:nth-child(4) { display: none; }

  /* Catalog table — hide Weight; keep Name + Brand + Notes + button */
  #catalog-container .gear-table th:nth-child(3),
  #catalog-container .gear-table td:nth-child(3) { display: none; }

  /* Pack item — stack qty controls and cube select */
  .pack-item { flex-wrap: wrap; gap: 0.4rem; }
  .cube-select { max-width: none; flex: 1; }

  /* Trip actions */
  .trip-actions { gap: 0.4rem; }
  .trip-actions button { padding: 0.35rem 0.6rem; font-size: 0.82rem; }

  /* Modal */
  .modal { width: calc(100vw - 2rem); max-height: 90vh; overflow-y: auto; }

  /* View header */
  .view-header h2 { font-size: 1.15rem; }
}

/* ═══════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════ */

/* ── Header ── */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.lp-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-logo { display: flex; align-items: center; text-decoration: none; }
.lp-wordmark { height: 26px; width: auto; }
.lp-nav { display: flex; align-items: center; gap: 1.25rem; }
.lp-nav-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.lp-nav-link:hover { color: var(--text); }
.lp-btn-signin {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.lp-btn-signin:hover { background: var(--accent-hover); }

/* ── Main ── */
.lp-main { overflow: hidden; }

/* ── Hero ── */
.lp-hero {
  background: linear-gradient(160deg, #f0f9f4 0%, #f5f4f0 60%, #eef4fb 100%);
  padding: 5rem 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  min-height: 80vh;
}
.lp-hero-inner {
  max-width: 520px;
  flex: 1 1 320px;
}
.lp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}
.lp-hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.lp-hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 440px;
}
.lp-hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.lp-cta-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.lp-cta-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.lp-cta-primary:active { transform: translateY(0); }
.lp-cta-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.lp-cta-secondary:hover { background: var(--accent-light); }

/* ── Hero visual cards ── */
.lp-hero-visual {
  position: relative;
  flex: 0 0 auto;
  width: 300px;
  height: 280px;
}
.lp-visual-card {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1), 0 1px 4px rgba(0,0,0,0.06);
  font-size: 0.82rem;
}
.lp-vc1 {
  width: 200px;
  top: 0; left: 0;
  animation: lp-float 4s ease-in-out infinite;
}
.lp-vc2 {
  width: 210px;
  bottom: 0; right: 0;
  animation: lp-float 4s ease-in-out infinite 2s;
}
@keyframes lp-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.lp-vc-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.35rem; }
.lp-vc-value { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.5rem; }
.lp-vc-bar { height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden; margin-bottom: 0.65rem; }
.lp-vc-bar-fill { height: 100%; border-radius: 3px; }
.lp-vc-row { display: flex; align-items: center; gap: 0.4rem; color: var(--text-muted); margin-top: 0.2rem; }
.lp-vc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.lp-vc-num { margin-left: auto; font-weight: 600; color: var(--text); }
.lp-vc-item { display: flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0; border-bottom: 1px solid #f5f5f5; color: var(--text); }
.lp-vc-item:last-child { border-bottom: none; }
.lp-vc-item-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.lp-vc-item-w { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ── Features ── */
.lp-features {
  padding: 5rem 1.5rem;
  background: #fff;
}
.lp-section-inner { max-width: 1100px; margin: 0 auto; }
.lp-section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text);
}
.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.lp-feature-card {
  background: var(--bg);
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
}
.lp-feature-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.lp-feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.lp-feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.lp-feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── CTA strip ── */
.lp-cta-strip {
  background: linear-gradient(135deg, #1a4731 0%, var(--accent) 100%);
  padding: 4rem 1.5rem;
}
.lp-cta-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.lp-cta-strip h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.35rem;
}
.lp-cta-strip p { color: rgba(255,255,255,0.72); font-size: 0.95rem; }
.lp-cta-strip-btn {
  background: #fff;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 1rem;
  padding: 0.8rem 1.75rem;
}
.lp-cta-strip-btn:hover { background: #f0f9f4; transform: translateY(-1px); }

/* ── Footer ── */
.lp-footer {
  background: var(--text);
  padding: 1.5rem;
}
.lp-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.lp-footer-copy { color: rgba(255,255,255,0.45); font-size: 0.82rem; }
.lp-footer-links { display: flex; gap: 1.25rem; }
.lp-footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s;
}
.lp-footer-links a:hover { color: rgba(255,255,255,0.9); }

/* ── Landing responsive ── */
@media (max-width: 640px) {
  .lp-hero { padding: 3rem 1.25rem 2.5rem; min-height: auto; gap: 2.5rem; }
  .lp-hero-visual { width: 100%; height: 260px; }
  .lp-vc1 { left: 0; top: 0; }
  .lp-vc2 { right: 0; bottom: 0; }
  .lp-features { padding: 3rem 1.25rem; }
  .lp-cta-strip { padding: 2.5rem 1.25rem; }
  .lp-cta-strip-inner { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════
   VARIANTS
   ═══════════════════════════════════════════════════════ */

/* Badge in catalog row */
.variant-count-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* Variant picker overlay */
.variant-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
.variant-overlay.hidden { display: none; }

.variant-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  animation: modalIn 0.18s ease;
}
.variant-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 0.6rem;
}
.variant-modal-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2px;
}
.variant-modal-brand {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.variant-modal-close {
  background: #f5f5f5;
  border: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #666; flex-shrink: 0;
  transition: background 0.15s;
}
.variant-modal-close:hover { background: #ebebeb; }
.variant-modal-sub {
  padding: 0 1.25rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.variant-list {
  padding: 0 0.75rem;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.variant-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.variant-option input[type="radio"] { accent-color: var(--accent); flex-shrink: 0; }
.variant-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}
.variant-option-name { flex: 1; font-size: 0.9rem; font-weight: 500; }
.variant-option-weight { font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.variant-modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #f0f0f0;
  margin-top: 0.75rem;
}
.variant-add-btn { width: 100%; justify-content: center; }

/* Admin: variants section in edit modal */
.variants-section {
  margin: 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.variants-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.variants-label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.variants-hint { font-weight: 400; color: var(--text-muted); margin-left: 0.3rem; }
.btn-add-variant {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-add-variant:hover { background: #d0ecdb; }

#form-variants-list { padding: 0.4rem 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.variant-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.variant-row-name {
  flex: 1;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
}
.variant-row-weight {
  width: 90px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
}
.variant-row-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.variant-row-remove:hover { color: var(--danger); background: #fff0f0; }
