/* ==========================================================
   gear_imports.css  —  CSV import wizard styles
   All colours use design tokens from application.css :root.
   ========================================================== */

/* ---------------------------------------------------------
   Shared: instruction cards
   --------------------------------------------------------- */
.instructions-card {
  background: var(--info-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  border-left: 4px solid var(--info);
}

.instructions-card h3 {
  margin-top: 0;
  color: var(--info);
}

.instructions-card ul {
  margin: 0.5rem 0 0 1.2rem;
}

/* Warning variant (yellow) */
.instructions-card--warn {
  background: var(--warning-light);
  border-left: 4px solid var(--warning);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.instructions-card--warn h3 {
  margin-top: 0;
  color: var(--warning);
}

/* ---------------------------------------------------------
   Import index / history
   --------------------------------------------------------- */
/* .data-table is now in application.css */

/* ---------------------------------------------------------
   Preview page
   --------------------------------------------------------- */
.preview-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.summary-card {
  flex: 1;
  min-width: 120px;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.summary-card--new  { background: var(--success-light); border-color: rgba(22,163,74,0.3); }
.summary-card--dup  { background: var(--warning-light);  border-color: rgba(251,191,36,0.3); }
.summary-card--skip { background: var(--surface-sunken); }

.summary-number { font-size: 2rem; font-weight: 700; }
.summary-label  { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* Duplicate handling options */
.dup-options { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }

.dup-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.dup-option:has(input:checked) {
  border-color: var(--warning);
  background: var(--warning-light);
}

.dup-option div   { display: flex; flex-direction: column; gap: 0.2rem; }
.dup-option strong { font-size: 0.95rem; }
.dup-option span   { font-size: 0.85rem; color: var(--text-secondary); }

/* Preview sections */
.preview-section {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.preview-section h3 { margin-top: 0; }
.preview-section--dup { border-left: 4px solid var(--warning); }

.preview-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.preview-table th,
.preview-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.preview-table th {
  background: var(--surface-sunken);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
}

.preview-table tr:nth-child(even) { background: var(--surface-sunken); }

/* ---------------------------------------------------------
   Column–field mapping pages (map & resolve_categories)
   --------------------------------------------------------- */
.mapping-container { max-width: 1000px; margin: 0 auto; }

.categories-reference {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.categories-reference h4 { margin-top: 0; }

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.category-chip {
  background: var(--surface);
  padding: 0.4rem 0.85rem;
  border-radius: 0;
  border: 1px solid var(--border);
  font-size: 0.875rem;
}

.mapping-form {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.mapping-header {
  display: grid;
  grid-template-columns: 1fr 50px 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 600;
  text-align: center;
}

.mapping-grid { margin-bottom: 2rem; }

.mapping-row {
  display: grid;
  grid-template-columns: 1fr 50px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.mapping-row:hover { background: var(--surface-raised); }

.column-name  { display: flex; flex-direction: column; gap: 0.25rem; }
.sample-value { font-size: 0.85rem; color: var(--text-secondary); font-style: italic; }

.required-badge {
  font-size: 0.78rem;
  color: #fff;
  background: var(--danger);
  padding: 0.1rem 0.45rem;
  border-radius: 0;
  font-weight: 600;
}

.arrow {
  text-align: center;
  font-size: 1.5rem;
  color: var(--primary);
}

.field-select { display: flex; flex-direction: column; }

.mapping-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.mapping-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 768px) {
  .mapping-row,
  .mapping-header {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .arrow { transform: rotate(90deg); }
  .preview-summary { flex-direction: column; }
}

/* ---------------------------------------------------------
   Misc
   --------------------------------------------------------- */
.header-row-section {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
/* ==========================================================
   subscriptions.css  —  Pricing, Billing & Profile pages
   All colours use design tokens from application.css :root.
   ========================================================== */

/* ---------------------------------------------------------
   Pricing Page
   --------------------------------------------------------- */
.pricing-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.pricing-header {
  text-align: center;
  margin-bottom: 3rem;
}

.pricing-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }

.pricing-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.pricing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pricing-card--featured {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: 0 4px 20px rgba(46, 125, 50, 0.18);
}

.pricing-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 0.25rem 1.1rem;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pricing-card__header h2 { font-size: 1.4rem; margin: 0 0 0.5rem; }

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.pricing-card__price .price { font-size: 2.5rem; font-weight: 700; }
.pricing-card__price .interval { color: var(--text-secondary); }

.pricing-card__annual {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.savings {
  background: var(--success-light);
  color: var(--success);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.pricing-card__features .feature {
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.feature--included::before { content: '✓ '; color: var(--success); font-weight: 700; }
.feature--excluded::before { content: '✗ '; color: var(--text-muted); }
.feature--note::before     { content: '• '; color: var(--warning); }

.coming-soon {
  font-size: 0.7rem;
  background: var(--warning-light);
  color: var(--warning);
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
}

.pricing-card__cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn--current {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface-sunken);
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

.btn--sm { font-size: 0.85rem; padding: 0.4rem 1rem; }

/* ---------------------------------------------------------
   Billing Page
   --------------------------------------------------------- */
.billing-page {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.plan-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 0;
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

.plan-badge--free { background: var(--surface-sunken); color: var(--text-secondary); }
.plan-badge--pro  { background: var(--info-light);     color: var(--info); }
.plan-badge--team { background: var(--success-light);  color: var(--success); }

.billing-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.billing-upgrade {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0;
}

.billing-upgrade strong {
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.billing-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* ---------------------------------------------------------
   Ad slot placeholder
   --------------------------------------------------------- */
.ad-slot {
  text-align: center;
  padding: 0.5rem;
  margin: 1rem 0;
}

.ad-placeholder {
  border: 1px dashed var(--border);
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-radius: var(--radius);
}

/* ---------------------------------------------------------
   Profile Page
   --------------------------------------------------------- */
.profile-page {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--surface-sunken);
}

.profile-field:last-child { border-bottom: none; }

.profile-label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.profile-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  flex: 1;
  text-align: center;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.stat__value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.profile-actions { display: flex; gap: 0.75rem; }

/* ---------------------------------------------------------
   Profile Edit Form
   --------------------------------------------------------- */
.profile-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.form-section legend {
  font-weight: 600;
  padding: 0 0.5rem;
  font-size: 0.95rem;
}

.form-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* form-actions deferred to application.css */

/* ---------------------------------------------------------
   Theme Toggle Button  (profile page appearance row)
   --------------------------------------------------------- */
.theme-card { margin-top: 1rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-sunken);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-primary);
  transition: background var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}
/* ==========================================================
   admin.css  —  u-hike Admin Panel Styles
   All colours and spacing use the design tokens defined in
   application.css (:root).  Do NOT add hardcoded hex values.
   ========================================================== */

/* ---------------------------------------------------------
   Admin Dashboard
   --------------------------------------------------------- */
.admin-dashboard h1 { margin-bottom: 1.5rem; }

.admin-nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.admin-nav-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.admin-nav-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.admin-nav-icon {
  font-size: 2rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.admin-nav-card h3 { margin: 0.25rem 0; font-size: 1rem; font-weight: 600; }
.admin-nav-card p  { color: var(--text-secondary); font-size: 0.875rem; margin: 0; }

/* ---------------------------------------------------------
   Admin Tables  (.admin-table wraps standard HTML tables)
   --------------------------------------------------------- */
.table-scroll { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--surface-sunken);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tbody tr:hover td {
  background: var(--surface-raised);
}

/* Column helpers */
.col-num     { text-align: right; }
.col-actions { text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------
   Admin Detail / Show pages
   --------------------------------------------------------- */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 520px;
}

.detail-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.6rem 1rem;
}

.detail-list dt {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-list dd { margin: 0; }

/* ---------------------------------------------------------
   Admin Form card  (wraps forms, narrows max width)
   --------------------------------------------------------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 520px;
}

/* ---------------------------------------------------------
   Specialised inputs
   --------------------------------------------------------- */
.icon-input {
  max-width: 80px;
  text-align: center;
  font-size: 1.5rem;
}

/* ---------------------------------------------------------
   Admin-scoped small buttons
   (supplements main .btn-sm / .btn-danger in application.css)
   --------------------------------------------------------- */
.btn-danger:disabled,
.btn-danger[disabled] {
  background: var(--text-disabled);
  color: #fff;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ---------------------------------------------------------
   Admin badge (in the header nav brand)
   --------------------------------------------------------- */
.admin-badge {
  background: #e65100;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  vertical-align: middle;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 0.3rem;
}

/* ---------------------------------------------------------
   Responsive admin layout
   --------------------------------------------------------- */
@media (max-width: 768px) {
  .admin-nav-cards { grid-template-columns: 1fr; }
  .detail-list     { grid-template-columns: 1fr; }
  .form-card       { padding: 1rem; max-width: 100%; }
}
/* =========================================================
   Design Options Mockup – designs.css
   Visual mockup page showcasing 10 UI design options
   ========================================================= */

/* ── Page layout ─────────────────────────────────────────── */
.designs-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.designs-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ── Outdoor hero backdrop ───────────────────────────────── */
.designs-hero--outdoor {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 2.5rem;
}

.designs-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.designs-hero__mountains {
  width: 100%;
  height: 100%;
  display: block;
}

html[data-theme="dark"] .designs-hero__backdrop {
  filter: brightness(0.55) saturate(0.8);
}

.designs-hero__content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.5rem 0.75rem;
}

.designs-hero--outdoor h1 {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.designs-hero--outdoor p {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.designs-hero--outdoor .designs-filter-bar {
  position: relative;
  z-index: 1;
  padding: 0 1.5rem 1.25rem;
}

.designs-hero--outdoor .designs-filter-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.6);
  color: #374151;
  backdrop-filter: blur(4px);
}

.designs-hero--outdoor .designs-filter-btn:hover,
.designs-hero--outdoor .designs-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.designs-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.designs-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 1.25rem;
}

.designs-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.designs-filter-btn {
  padding: 0.35rem 0.9rem;
  border-radius: 0;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
}

.designs-filter-btn:hover,
.designs-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Grid ────────────────────────────────────────────────── */
.designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.75rem;
}

/* ── Design card ─────────────────────────────────────────── */
.design-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid transparent;
  transition: box-shadow var(--transition-slow), border-color var(--transition-slow), transform var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.design-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.design-card.is-current {
  border-color: var(--primary);
}

/* ── Mockup preview window ───────────────────────────────── */
.mockup-window {
  position: relative;
  height: 240px;
  overflow: hidden;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

/* Browser chrome bar */
.mockup-chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: #e0e0e0;
  border-bottom: 1px solid #c8c8c8;
}

html[data-theme="dark"] .mockup-chrome { background: #2a2a2a; border-color: #3a3a3a; }

.mockup-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #febc2e; }
.mockup-dot:nth-child(3) { background: #28c840; }

.mockup-url {
  flex: 1;
  height: 16px;
  background: #fff;
  border-radius: 0;
  margin-left: 8px;
  font-size: 9px;
  color: #777;
  padding: 0 6px;
  line-height: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

html[data-theme="dark"] .mockup-url { background: #1a1a1a; color: #666; }

/* The rendered UI inside the chrome */
.mockup-body {
  position: relative;
  height: calc(100% - 31px);
  overflow: hidden;
  font-size: 0;  /* reset so children scale correctly */
}

/* ── Mini UI templates (scale: 0.45) ─────────────────────── */
.mockup-ui {
  position: absolute;
  inset: 0;
  transform-origin: top left;
  transform: scale(0.45);
  width: 222.22%;   /* 100% / 0.45 = 222.22% — counteracts the scale so content fills the container */
  height: 222.22%;
  font-size: 14px;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

/* ── Shared mini-UI primitives ───────────────────────────── */
.mu-topbar {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 44px;
  gap: 16px;
  font-weight: 600;
  font-size: 13px;
}

.mu-logo { font-weight: 800; font-size: 14px; letter-spacing: -0.3px; }

.mu-topbar-links {
  display: flex;
  gap: 14px;
  font-size: 11px;
  opacity: 0.85;
}

.mu-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.mu-btn {
  padding: 4px 10px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 600;
  border: none;
  cursor: default;
}

.mu-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff40;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* Sidebar layout */
.mu-layout {
  display: flex;
  height: calc(100% - 44px);
}

.mu-sidebar {
  width: 160px;
  flex-shrink: 0;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mu-nav-item {
  padding: 7px 10px;
  border-radius: 0;
  font-size: 11px;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mu-nav-item.active { font-weight: 700; }

.mu-content {
  flex: 1;
  padding: 14px;
  overflow: hidden;
}

/* Grid / card grid inside content */
.mu-stats-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.mu-stat {
  flex: 1;
  border-radius: 0;
  padding: 8px 10px;
}

.mu-stat-num {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

.mu-stat-label {
  font-size: 9px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mu-table {
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  font-size: 10px;
}

.mu-table-head {
  display: flex;
  padding: 5px 8px;
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  gap: 6px;
}

.mu-table-row {
  display: flex;
  padding: 5px 8px;
  align-items: center;
  gap: 6px;
  border-top: 1px solid transparent;
}

.mu-checkbox {
  width: 11px;
  height: 11px;
  border-radius: 0;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
}

.mu-bulk-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 0;
  font-size: 9px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Gradient nav */
.mu-gradient-top { background: var(--mu-gradient, linear-gradient(135deg,#7c3aed,#db2777)); }

/* ── Card body (info below mockup) ───────────────────────── */
.design-card-body {
  padding: 1.1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.design-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.design-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.design-current-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.15rem 0.55rem;
  border-radius: 0;
  white-space: nowrap;
  border: 1px solid var(--primary);
  flex-shrink: 0;
}

.design-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.design-card-highlight {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.85rem;
  flex: 1;
}

.design-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.design-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0;
  background: var(--surface-sunken);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-weight: 500;
}

.design-card-actions {
  display: flex;
  gap: 0.6rem;
}

.design-preview-btn {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.design-preview-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.design-apply-btn {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.design-apply-btn:hover { background: var(--primary-dark); }
.design-apply-btn:disabled { background: var(--text-disabled); cursor: default; }

/* ── Full-screen preview overlay ─────────────────────────── */
.design-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.design-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.design-overlay-inner {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: min(90vw, 960px);
  max-height: 88vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.design-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-shrink: 0;
}

.design-overlay-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.design-overlay-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 0 0.25rem;
}

.design-overlay-close:hover { color: var(--text-primary); }

/* Large mockup inside overlay */
.design-overlay-mockup {
  position: relative;
  overflow: hidden;
  background: #d0d0d0;
  min-height: 480px;
  flex-shrink: 0;
}

html[data-theme="dark"] .design-overlay-mockup { background: #222; }

.design-overlay-mockup .mockup-ui {
  transform: scale(0.75);
  width: 133.33%;
  height: 133.33%;
}

.design-overlay-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 1rem;
}

.design-overlay-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.design-overlay-meta strong {
  color: var(--text-primary);
}

/* ── Notification toast ──────────────────────────────────── */
.designs-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  color: var(--text-primary);
  max-width: 320px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.designs-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* ── Colour swatch strip ─────────────────────────────────── */
.design-swatches {
  display: flex;
  gap: 4px;
  margin-bottom: 0.7rem;
}

.design-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .designs-grid {
    grid-template-columns: 1fr;
  }

  .designs-hero h1 { font-size: 1.5rem; }

  .design-overlay-mockup { min-height: 300px; }

  .design-overlay-mockup .mockup-ui {
    transform: scale(0.45);
    width: 222.22%;
    height: 222.22%;
  }
}
/*





 */

/* =========================================================
   PackLite – Application Styles
   Outdoor-inspired, light + dark mode, no frameworks
   ========================================================= */

/* ---------------------------------------------------------
   Design Tokens – Light Mode
   --------------------------------------------------------- */
:root {
  /* Brand */
  --primary:        #374151;
  --primary-dark:   #1f2937;
  --primary-light:  #f3f4f6;
  --secondary:      #6b7280;
  --secondary-dark: #4b5563;

  /* Semantic colours */
  --danger:         #dc2626;
  --danger-light:   #fee2e2;
  --warning:        #d97706;
  --warning-light:  #fef3c7;
  --success:        #16a34a;
  --success-light:  #dcfce7;
  --info:           #0284c7;
  --info-light:     #e0f2fe;

  /* Surfaces */
  --nav-bg:         #f9fafb;
  --bg:             #ffffff;
  --surface:        #ffffff;
  --surface-raised: #f9fafb;
  --surface-sunken: #f3f4f6;

  /* Text */
  --text-primary:   #111827;
  --text-secondary: #374151;
  --text-muted:     #6b7280;
  --text-disabled:  #9ca3af;

  /* Borders */
  --border:         #e5e7eb;
  --border-focus:   #374151;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 8px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 16px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.06);

  /* Radius */
  --radius-sm: 0;
  --radius:    0;
  --radius-md: 0;
  --radius-lg: 0;

  /* Transitions */
  --transition:      150ms ease;
  --transition-slow: 250ms ease;

  /* Legacy aliases – keep old markup working */
  --primary-color:   var(--primary);
  --secondary-color: var(--secondary);
  --danger-color:    var(--danger);
  --success-color:   var(--success);
  --warning-color:   var(--warning);
  --light-gray:      var(--surface-sunken);
  --border-color:    var(--border);
  --text-color:      var(--text-primary);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
  background-color: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Typography scale */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: 1.875rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem;   letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
p  { color: var(--text-secondary); }

.container {
  padding: 1.5rem 1rem;
}

/* ---------------------------------------------------------
   Header & Nav
   --------------------------------------------------------- */
.header {
  background: var(--nav-bg);
  color: var(--text-primary);
  padding: 0;
  box-shadow: 0 1px 0 var(--border), 0 2px 6px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--primary);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
  min-height: 58px;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand h1,
.nav-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav-logo {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.nav-logo svg {
  width: 100%;
  height: 100%;
}

.nav-brand-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
}

.nav-brand-link:hover { opacity: 0.9; text-decoration: none; }

.admin-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-sm);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: stretch;
}

.nav-menu li {
  display: flex;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  height: 100%;
}

.nav-link:hover {
  color: var(--primary-dark);
  background: rgba(55,65,81,0.08);
  border-bottom-color: var(--primary);
  text-decoration: none;
}

.nav-link--active {
  background: var(--text-primary);
  color: #fff;
  border-bottom-color: transparent;
  border-radius: var(--radius-sm);
  margin: auto 0.25rem;
  padding: 0.25rem 0.75rem;
  height: auto;
  font-weight: 700;
}

.nav-link--active:hover {
  background: var(--primary-dark);
  color: #fff;
  border-bottom-color: transparent;
}

.nav-link--admin {
  font-size: 0.8rem;
  color: var(--primary-dark);
  background: rgba(55,65,81,0.1);
  border-radius: var(--radius-sm);
  margin: auto 0.5rem;
  padding: 0.2rem 0.6rem;
  height: auto;
  border-bottom: none;
}

.nav-link--admin:hover {
  background: rgba(55,65,81,0.18);
  color: var(--primary-dark);
  border-bottom: none;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-username,
.nav-user__name {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
}

.nav-user__name:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Logout button */
.btn-logout {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary-dark);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background var(--transition);
  white-space: nowrap;
}
.btn-logout:hover { background: var(--primary-dark); }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-small,
.btn-warning,
.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  user-select: none;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-success:hover {
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-dark);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-sunken); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { filter: brightness(0.88); }

.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover { filter: brightness(0.88); }

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { filter: brightness(0.88); }

.btn-small {
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
}

button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */
.form-container {
  max-width: 600px;
  margin: 2rem auto;
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.15);
}

.form-control::placeholder { color: var(--text-disabled); }

textarea.form-control { resize: vertical; min-height: 90px; }

input[type="file"].form-control {
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  color: var(--text-primary);
  background: var(--surface);
  border-color: var(--border);
}

input[type="file"].form-control::file-selector-button {
  background: var(--surface-sunken);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.75rem;
  margin-right: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition);
}

input[type="file"].form-control::file-selector-button:hover {
  background: var(--border);
}

.form-control-small {
  width: 80px;
  padding: 0.4rem 0.5rem;
  font-size: 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-primary);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.form-inline {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.form-section legend {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.form-errors {
  background: var(--danger-light);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.form-errors ul {
  list-style-position: inside;
  color: var(--danger);
  font-size: 0.875rem;
}

.profile-form {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--primary);
}

.form-check-label {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ---------------------------------------------------------
   Flash Messages
   --------------------------------------------------------- */
.flash-messages {
  margin-bottom: 1rem;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* ---------------------------------------------------------
   Announcement Banner
   --------------------------------------------------------- */
.announcement-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  margin: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.announcement-banner.announcement-info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.announcement-banner.announcement-warning {
  background: #fefce8;
  color: #854d0e;
  border-color: #fde68a;
}

.announcement-banner.announcement-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.announcement-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
  color: inherit;
  opacity: 0.6;
  flex-shrink: 0;
}

.announcement-dismiss:hover {
  opacity: 1;
}

.alert-notice {
  background: var(--success-light);
  color: var(--success);
  border-color: rgba(22, 163, 74, 0.2);
}

.alert-alert {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.2);
}

/* ---------------------------------------------------------
   Error Messages
   --------------------------------------------------------- */
.error-messages {
  background: var(--danger-light);
  border: 1px solid rgba(220, 38, 38, 0.25);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.error-messages h4 {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--danger);
}

.error-messages ul { margin-left: 1.5rem; }
.error-messages li { font-size: 0.875rem; color: var(--danger); }

/* ---------------------------------------------------------
   Auth Pages
   --------------------------------------------------------- */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   Dashboard Hero Photo Banner
   --------------------------------------------------------- */
.dashboard-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(180deg, #87CEEB 0%, #B0D4E8 38%, #6B8E5A 38%, #4A7A3D 52%, #3B6B2E 52%, #2D5A22 68%, #e8e0d4 68%, #d4c9b8 100%);
}

.dashboard-hero__svg {
  position: absolute;
  bottom: 36%;
  left: 0;
  width: 100%;
  height: 65%;
  opacity: 0.6;
}

.dashboard-hero__hiker {
  position: absolute;
  bottom: 30%;
  right: 12%;
  height: 22%;
  opacity: 0.75;
}

.dashboard-hero__text {
  position: absolute;
  bottom: 1rem;
  left: 1.25rem;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}

.dashboard-hero__title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dashboard-hero__subtitle {
  font-size: 0.825rem;
  opacity: 0.9;
  margin-top: 0.2rem;
}

/* ---------------------------------------------------------
   Dashboard
   --------------------------------------------------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  padding: 1.1rem 1.25rem;
  border-radius: 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  text-align: left;
  transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0.3rem 0;
}

.stat-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.stat-link:hover { text-decoration: underline; }

.dashboard-section {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

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

/* ---------------------------------------------------------
   Page Headers
   --------------------------------------------------------- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: var(--surface);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-header h1 { font-size: 1.5rem; }

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

/* ---------------------------------------------------------
   Trips
   --------------------------------------------------------- */
.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

.trip-card {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  text-decoration: none;
  color: var(--text-primary);
  display: block;
  transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}

.trip-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
}

.trip-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }

.trip-card.status-over  { border-left-color: var(--danger); }
.trip-card.status-close { border-left-color: var(--warning); }
.trip-card.status-under { border-left-color: var(--success); }

.trip-location, .trip-dates, .trip-items-count {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.weight-bar {
  background: var(--border);
  height: 6px;
  border-radius: 0;
  overflow: hidden;
  margin-top: 0.75rem;
}

.weight-progress {
  background: var(--primary);
  height: 100%;
  border-radius: 0;
  transition: width 0.4s ease;
}

/* Gear */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.gear-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  background: var(--surface-sunken);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

a.gear-card:hover,
.gear-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.gear-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.75rem;
}

.gear-category {
  background: var(--light-gray);
  padding: 0.25rem 0.75rem;
  border-radius: 0;
  font-size: 0.875rem;
}

.gear-weight {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
}

.gear-total-weight {
  color: #666;
  font-size: 0.875rem;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

/* ---------------------------------------------------------
   Tables
   --------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.gear-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.9rem;
}

.gear-table th,
.gear-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.gear-table th {
  background: var(--surface-sunken);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.gear-table tr:last-child td { border-bottom: none; }
.gear-table tr:hover td { background: var(--surface-sunken); }

/* ---------------------------------------------------------
   Gear Items Index — filter bar, view toggles, bulk actions
   --------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.filter-group   { display: flex; align-items: center; gap: 0.25rem; }
.filter-search  { flex: 1 1 200px; }
.filter-weight  { gap: 0.3rem; }

.filter-input {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--surface);
  width: 100%;
}
.filter-input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.filter-input--sm { width: 70px; }

.filter-select {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
}

.btn-search { padding: 0.45rem 0.9rem; }
.btn-clear  {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.3rem;
}
.btn-clear:hover { text-decoration: underline; }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* View controls: summary + grid/table toggle */
.view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.gear-summary { color: var(--text-secondary); font-size: 0.9rem; }
.view-toggle  { display: flex; gap: 0.25rem; }

.view-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  background: var(--surface);
  transition: background var(--transition), color var(--transition);
}
.view-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Bulk selection bar */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--warning-light);
  border: 1px solid var(--warning);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}
.bulk-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* Extra gear-item card helpers */
.gear-card-wrap       { position: relative; display: flex; }

.card-checkbox-label {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  line-height: 0;
}

.card-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

/* Title needs right-padding so long names don't slide under the checkbox */
.gear-card-title {
  font-size: 1rem;
  font-weight: 700;
  padding-right: 1.5rem;
  color: var(--text-primary);
}

/* Selected card state */
.gear-card-wrap:has(.item-checkbox:checked) .gear-card {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary);
  padding-bottom: 2.4rem;
}

.col-check   { width: 36px; }
.col-num     { text-align: right; white-space: nowrap; }
.col-actions { white-space: nowrap; width: 1%; }

/* Edit button — hidden until row is selected */
.btn-edit { display: none; }

.gear-row:has(.item-checkbox:checked) .btn-edit,
.gear-card-wrap:has(.item-checkbox:checked) .btn-edit {
  display: inline-flex;
}

/* Edit button on grid cards — sits below the card */
.gear-card-edit {
  position: absolute;
  bottom: 0.55rem;
  left: 0.55rem;
  z-index: 2;
}
.item-link   { color: var(--primary-dark); text-decoration: none; font-weight: 500; }
.item-link:hover { text-decoration: underline; }
.category-badge { background: var(--primary-light); color: var(--primary-dark); padding: 0.15rem 0.5rem; border-radius: 0; font-size: 0.78rem; white-space: nowrap; }

.gear-brand,
.gear-total-weight,
.gear-trips { margin: 0.2rem 0; font-size: 0.85rem; color: var(--text-secondary); }

/* data-table – used in gear_imports list (mirrors admin-table styling) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--surface-sunken);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-raised); }

/* ---------------------------------------------------------
   Badges
   --------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.badge-admin    { background: #fff3e0; color: #e65100; }
.badge-user     { background: var(--success-light); color: var(--success); }
.badge-active   { background: var(--success-light); color: var(--success); }
.badge-inactive { background: var(--danger-light);  color: var(--danger); }
.badge-you      { background: var(--info-light);    color: var(--info); }

/* Breadcrumb */
.breadcrumb-link {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 0.2rem;
}
.breadcrumb-link:hover { color: var(--primary); text-decoration: underline; }

/* Utility */
.text-muted   { color: var(--text-muted); font-size: 0.85rem; }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-center  { text-align: center; }

/* ---------------------------------------------------------
   Empty State
   --------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------
   Detail / Show Pages
   --------------------------------------------------------- */
.trip-show, .gear-show {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Table container for admin tables */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

.trip-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.trip-gear-section, .add-gear-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 0;
}

/* Detail Pages */
.gear-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.detail-group {
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: 0;
}

.detail-group dl {
  margin-top: 1rem;
}

.detail-group dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

.detail-group dd {
  margin-left: 1rem;
  color: #666;
}

.gear-usage {
  margin: 2rem 0;
}

.trip-list {
  list-style: none;
  padding-left: 0;
}

.trip-list li {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.trip-list a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.trip-list a:hover {
  text-decoration: underline;
}

/* Gear Tags */
.gear-tag {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.15rem 0.6rem;
  border-radius: 0;
  font-size: 0.8rem;
  margin: 0.1rem 0.25rem 0.1rem 0;
}

/* Responsive */
@media (max-width: 900px) {
  .drag-drop-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
    min-height: auto;
    gap: 0.5rem;
  }

  .nav-menu { flex-wrap: wrap; gap: 0; }
  .nav-link { padding: 0.5rem 0.75rem; font-size: 0.8rem; }

  .page-header { flex-direction: column; align-items: flex-start; }
  .form-row   { grid-template-columns: 1fr; }
  .stats-row  { grid-template-columns: 1fr 1fr; }
  .container  { padding: 1rem 0.75rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .stats-row  { grid-template-columns: 1fr; }
  .trips-grid { grid-template-columns: 1fr; }
  .filter-bar      { flex-direction: column; align-items: stretch; }
  .view-controls   { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .view-toggle     { width: 100%; }
  .view-btn        { flex: 1; text-align: center; }
}

/* ---------------------------------------------------------
   Drag and Drop Planner
   --------------------------------------------------------- */
.drag-drop-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}

.available-gear-panel,
.trip-gear-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Give the available panel a max-height so it scrolls on large lists */
.available-gear-panel {
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.available-gear-panel h2,
.trip-gear-panel h2 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.help-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Planner available-gear list (flex column of category groups) */
.planner-gear-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gear-category-group h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gear-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

/* Drag-and-drop gear card (inside planner – slightly different than list .gear-card) */
.available-gear-panel .gear-card {
  background: var(--surface-sunken);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.gear-card.draggable { cursor: grab; }
.gear-card.draggable:active { cursor: grabbing; }

.gear-card.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.gear-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.12);
  transform: translateY(-2px);
}

.gear-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.gear-card-header strong {
  font-size: 0.9rem;
}

.available-gear-panel .gear-weight {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--surface);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.gear-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Filter bar */
.gear-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.gear-search-input {
  flex: 1;
  min-width: 120px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-size: 0.9rem;
}

.gear-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(55, 65, 81, 0.15);
}

.gear-category-filter {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
}

.gear-category-filter:focus {
  outline: none;
  border-color: var(--primary-color);
}

.gear-no-results {
  color: #888;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.95rem;
}

/* Selected state */
.gear-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.2);
}

/* Multiselect action bar */
.gear-multiselect-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 2px solid var(--primary);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  border-radius: 0;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}

.multiselect-count {
  font-size: 0.9rem;
  color: #444;
}

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

.trip-gear-drop-zone {
  min-height: 380px;
  border: 2px dashed transparent;
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.trip-gear-drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.empty-drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #999;
  font-size: 1.1rem;
  text-align: center;
}

.trip-gear-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.trip-category-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-header {
  font-size: 1rem;
  color: var(--secondary-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.trip-gear-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  transition: box-shadow var(--transition);
}

.trip-gear-item:hover { box-shadow: var(--shadow); }
.trip-gear-item.packed { background: var(--success-light); border-color: rgba(22,163,74,0.3); }

.trip-gear-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trip-gear-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.packed-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  flex: 1;
}

.packed-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.packed-checkbox input[type="checkbox"]:checked + .gear-name {
  text-decoration: line-through;
  opacity: 0.7;
}

.gear-name {
  font-weight: 500;
  font-size: 1rem;
}

.gear-quantity {
  font-size: 0.9rem;
  color: #666;
  background: var(--light-gray);
  padding: 0.25rem 0.75rem;
  border-radius: 0;
}

.trip-gear-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: #666;
}

.gear-weight-each,
.gear-weight-total {
  padding: 0.25rem 0.5rem;
  background: var(--light-gray);
  border-radius: 0;
}

.gear-weight-total {
  font-weight: 500;
  color: var(--primary-color);
}

.btn-remove {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0;
  transition: all 0.2s;
}

.btn-remove:hover {
  background: var(--danger-light);
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .drag-drop-container { grid-template-columns: 1fr; }
  .gear-items { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   Profile Page
   --------------------------------------------------------- */
.profile-page {
  max-width: 800px;
  margin: 0 auto;
}

.profile-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.profile-field:last-child {
  border-bottom: none;
}

.profile-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.profile-value {
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.plan-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-badge--free {
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.plan-badge--pro {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.plan-badge--premium {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
}

.stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.theme-card {
  margin-top: 1.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-sunken);
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .profile-stats {
    grid-template-columns: 1fr;
  }
  
  .profile-actions {
    flex-direction: column;
  }
}

/* =========================================================
   Dark Mode
   =========================================================
   Applied automatically via OS preference (unless manually
   overridden with data-theme="light") OR manually via
   data-theme="dark" set by the theme Stimulus controller.
   ========================================================= */

/* Shared dark-mode variable values (used twice below) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary:        #4caf50;
    --primary-dark:   #388e3c;
    --primary-light:  #1a2e1a;
    --secondary:      #90a4ae;

    --danger:         #f87171;
    --danger-light:   #2d1515;
    --warning:        #fbbf24;
    --warning-light:  #2d2000;
    --success:        #4ade80;
    --success-light:  #052e16;
    --info:           #38bdf8;
    --info-light:     #062030;

    --nav-bg:         #162916;
    --bg:             #111215;
    --surface:        #1a1d21;
    --surface-raised: #22262b;
    --surface-sunken: #0e1012;

    --text-primary:   #e6f0e6;
    --text-secondary: #a8bba8;
    --text-muted:     #798b79;
    --text-disabled:  #4b5e4b;

    --border:         #2a3d2a;
    --border-focus:   #4caf50;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow:    0 4px 8px rgba(0,0,0,0.5);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.6);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.7);

    /* Legacy aliases */
    --primary-color:   var(--primary);
    --secondary-color: var(--secondary);
    --danger-color:    var(--danger);
    --success-color:   var(--success);
    --warning-color:   var(--warning);
    --light-gray:      var(--surface-sunken);
    --border-color:    var(--border);
    --text-color:      var(--text-primary);
  }

  /* Form controls */
  :root:not([data-theme="light"]) .form-control,
  :root:not([data-theme="light"]) .form-control-small,
  :root:not([data-theme="light"]) .gear-search-input,
  :root:not([data-theme="light"]) .gear-category-filter { background: var(--surface-sunken); color: var(--text-primary); border-color: var(--border); }

  :root:not([data-theme="light"]) .btn-logout { background: var(--primary); border-color: var(--primary-dark); }
  :root:not([data-theme="light"]) .savings    { background: var(--success-light); color: var(--success); }
}

/* Manual dark override — same variables, no media query needed */
html[data-theme="dark"] {
  --primary:        #4caf50;
  --primary-dark:   #388e3c;
  --primary-light:  #1a2e1a;
  --secondary:      #90a4ae;

  --danger:         #f87171;
  --danger-light:   #2d1515;
  --warning:        #fbbf24;
  --warning-light:  #2d2000;
  --success:        #4ade80;
  --success-light:  #052e16;
  --info:           #38bdf8;
  --info-light:     #062030;

  --nav-bg:         #162916;
  --bg:             #111215;
  --surface:        #1a1d21;
  --surface-raised: #22262b;
  --surface-sunken: #0e1012;

  --text-primary:   #e6f0e6;
  --text-secondary: #a8bba8;
  --text-muted:     #798b79;
  --text-disabled:  #4b5e4b;

  --border:         #2a3d2a;
  --border-focus:   #4caf50;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow:    0 4px 8px rgba(0,0,0,0.5);
  --shadow-md: 0 8px 16px rgba(0,0,0,0.6);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.7);

  --primary-color:   var(--primary);
  --secondary-color: var(--secondary);
  --danger-color:    var(--danger);
  --success-color:   var(--success);
  --warning-color:   var(--warning);
  --light-gray:      var(--surface-sunken);
  --border-color:    var(--border);
  --text-color:      var(--text-primary);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-control-small,
html[data-theme="dark"] .gear-search-input,
html[data-theme="dark"] .gear-category-filter { background: var(--surface-sunken); color: var(--text-primary); border-color: var(--border); }

html[data-theme="dark"] .btn-logout { background: var(--primary); border-color: var(--primary-dark); }
html[data-theme="dark"] .savings    { background: var(--success-light); color: var(--success); }
