body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #FAF7F2;
  color: #2C2C2C;
}

/* App Header */
.app-header {
  background: #3a3a3a;
  padding: 15px 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.app-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #D84315;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 600px) {
  .app-header h1 {
    font-size: 22px;
    gap: 6px;
  }

  .logo-icon {
    height: 44px !important;
  }

  .app-header {
    padding: 12px 16px;
  }
}

.logo-icon {
  height: 77px;
  width: auto;
}

.user-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-btn {
  background: #D84315;
  color: #3a3a3a;
  border: 1px solid #D84315;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 36px;
  width: 36px;
}

.icon-btn svg {
  display: block;
}

.icon-btn:hover {
  background: #BF360C;
  border-color: #BF360C;
}

/* Avatar Menu */
.avatar-menu-container {
  position: relative;
}

.avatar-btn {
  background: transparent !important;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
}

.avatar-btn:hover,
.avatar-btn:focus,
.avatar-btn:active {
  background: transparent !important;
  transform: none;
  outline: none;
  opacity: 1;
}

.avatar-btn img {
  width: 36px;
  height: 36px;
  pointer-events: none;
}

.avatar-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border: 2px solid #D84315;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 220px;
  z-index: 1000;
  overflow: hidden;
}

.avatar-email {
  padding: 12px 16px;
  background: #FAF7F2;
  color: #2C2C2C;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid #e0e0e0;
  word-break: break-word;
}

.dropdown-item {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: none;
  border-radius: 0;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #2C2C2C;
  cursor: pointer;
  transition: background 0.2s;
  text-transform: none;
  letter-spacing: normal;
}

.dropdown-item:hover {
  background: #FAF7F2;
  transform: none;
}

.logout-item {
  color: #D84315;
  border-top: 1px solid #e0e0e0;
}

/* Sort Menu */
.sort-menu-container {
  position: relative;
}

.sort-btn {
  background: transparent !important;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sort-btn:hover {
  background: transparent !important;
  opacity: 1 !important;
  transform: none;
}

.sort-btn img {
  display: block;
  width: 44px;
  height: 44px;
  pointer-events: none;
}

.sort-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border: 2px solid #D84315;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 240px;
  z-index: 1000;
  overflow: hidden;
}

.sort-option {
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  font-weight: 600;
  color: #2C2C2C;
  border-bottom: 1px solid #e8e5df;
}

.sort-option:last-child {
  border-bottom: none;
}

.sort-option:hover {
  background: #FAF7F2;
}

.sort-option.active {
  background: #D84315;
  color: white;
}

/* Auth Container Styling */
.login-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.login-header h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #D84315;
  text-transform: uppercase;
}

#login-container {
  max-width: 400px;
  margin: 40px auto;
  padding: 0 20px;
}

#login-form,
#signup-form,
#magic-link-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #e0e0e0;
}

#login-form h2,
#signup-form h2,
#magic-link-form h2 {
  margin-top: 0;
  text-align: center;
  color: #333;
}

#login-form input[type="email"],
#login-form input[type="password"],
#signup-form input[type="email"],
#signup-form input[type="password"],
#magic-link-form input[type="email"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

#login-form button,
#signup-form button,
#magic-link-form button {
  width: 100%;
  margin-bottom: 12px;
}

.auth-toggle {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

#login-container button {
  width: 100%;
  margin-bottom: 12px;
}

.auth-toggle {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: #666;
}

.auth-toggle a {
  color: #D84315;
  text-decoration: none;
  font-weight: 600;
}

.auth-toggle a:hover {
  text-decoration: underline;
  color: #BF360C;
}

/* Demo login */
.demo-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 8px 0 16px;
  color: #aaa;
  font-size: 13px;
}
.demo-divider::before,
.demo-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ddd;
}
.demo-divider span {
  padding: 0 10px;
}
#demo-login-btn {
  width: 100%;
  background: transparent !important;
  color: #D84315 !important;
  border: 2px solid #D84315 !important;
  font-weight: 700;
  margin-bottom: 0 !important;
}
#demo-login-btn:hover {
  background: #D84315 !important;
  color: white !important;
}

/* Main App Styling */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Settings Modal */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 44, 44, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 30px 40px;
  width: 450px;
  max-width: 90%;
  position: relative;
  border: 2px solid #C4A57B;
  box-sizing: border-box;
}

/* ── Settings Modal — Multi-panel Layout ─────────────────── */

.settings-modal-content {
  max-height: 88vh;
  overflow: hidden;
  width: 720px;
  max-width: 95vw;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Mobile top tabs (hidden on desktop) */
.settings-mobile-tabs {
  display: none;
  background: #FAF7F2;
  border-bottom: 2px solid #e8e5df;
  padding: 0 20px;
  gap: 0;
  flex-shrink: 0;
}

.settings-mobile-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  /* Reset global button defaults */
  box-shadow: none;
}

.settings-mobile-tab:hover {
  background: transparent;
  color: #2C2C2C;
  transform: none;
}

.settings-mobile-tab.active {
  background: transparent;
  color: #D84315;
  border-bottom-color: #D84315;
}

/* Two-panel layout */
.settings-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Left nav */
.settings-nav {
  width: 160px;
  flex-shrink: 0;
  background: #f5f2ed;
  border-right: 1px solid #e8e5df;
  padding: 28px 0 20px 0;
  display: flex;
  flex-direction: column;
}

.settings-nav-title {
  font-size: 11px;
  font-weight: 800;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 20px 14px 20px;
}

.settings-nav-item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #5a5a5a;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  letter-spacing: -0.2px;
}

.settings-nav-item:hover {
  background: #ece8e2;
  color: #2C2C2C;
}

.settings-nav-item.active {
  color: #D84315;
  border-left-color: #D84315;
  background: #fff;
  font-weight: 700;
}

/* Right panels container */
.settings-panels {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 28px 30px 28px 28px;
}

/* Individual panel */
.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-panel-title {
  font-size: 18px;
  font-weight: 800;
  color: #2C2C2C;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
}

.settings-panel-desc {
  font-size: 13px;
  color: #888;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* Close button (positioned within modal) */
.settings-modal-content .close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
}

/* Setting rows */
.setting-row {
  margin-bottom: 22px;
}

.setting-row label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #2C2C2C;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 7px;
}

.setting-row input[type="text"],
.setting-row input[type="password"],
.setting-row input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  color: #2C2C2C;
  background: #fff;
  transition: border-color 0.2s;
}

.setting-row input:focus {
  outline: none;
  border-color: #D84315;
}

.settings-select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  color: #2C2C2C;
  background: #fff;
  cursor: pointer;
  appearance: auto;
  transition: border-color 0.2s;
}

.settings-select:focus {
  outline: none;
  border-color: #D84315;
}

.setting-row small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

/* Default view toggle buttons */
.settings-toggle-group {
  display: flex;
  gap: 0;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  overflow: hidden;
  width: fit-content;
}

.settings-toggle-btn {
  background: #fff;
  border: none;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: -0.2px;
}

.settings-toggle-btn:first-child {
  border-right: 1.5px solid #ddd;
}

.settings-toggle-btn.active {
  background: #D84315;
  color: #fff;
}

.settings-toggle-btn:hover:not(.active) {
  background: #f5f5f5;
  color: #2C2C2C;
}

/* Card label drag-reorder list */
.card-label-list {
  border: 1.5px solid #e0d5c5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.card-label-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f0ebe2;
  user-select: none;
  background: #fff;
  transition: background 0.1s;
}

.card-label-item:last-child {
  border-bottom: none;
}

.card-label-item.sortable-ghost {
  background: #fef3ee;
  opacity: 0.7;
}

.card-label-item.sortable-chosen {
  background: #fff8f5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-label-drag {
  cursor: grab;
  color: #ccc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 3px;
  transition: color 0.15s;
}

.card-label-drag:hover {
  color: #999;
}

.card-label-drag:active {
  cursor: grabbing;
}

.card-label-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #2C2C2C;
  letter-spacing: -0.2px;
}

.card-label-hint {
  font-size: 11px;
  color: #bbb;
  font-weight: 500;
}

/* Toggle switch for card labels */
.card-label-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.card-label-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.card-label-slider {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.card-label-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.card-label-toggle input:checked + .card-label-slider {
  background: #D84315;
}

.card-label-toggle input:checked + .card-label-slider::before {
  transform: translateX(16px);
}

.card-label-toggle input:disabled + .card-label-slider {
  opacity: 0.45;
  cursor: not-allowed;
}

.card-label-toggle input:disabled ~ * {
  cursor: not-allowed;
}

/* API Key panel */
.settings-api-info {
  background: #FBE9E7;
  border: 1px solid #FFCCBC;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 22px;
}

.settings-api-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #5a3020;
  line-height: 1.6;
}

.settings-api-info-row svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #D84315;
}

.settings-api-info-row a {
  color: #D84315;
  font-weight: 700;
  text-decoration: none;
}

.settings-api-input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.settings-api-input-row input {
  padding-right: 40px !important;
}

.settings-api-eye-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.settings-api-eye-btn:hover {
  color: #D84315;
  background: transparent;
  transform: none;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .settings-modal-content {
    width: 100vw;
    max-width: 100vw;
    /* Fixed height anchored from bottom — show full rounded rectangle */
    height: auto;
    max-height: calc(100svh - 80px);
    border-radius: 14px;
    margin: auto 20px;
    align-self: center;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .settings-mobile-tabs {
    display: flex;
    flex-shrink: 0;
  }

  /* Override any inherited button styles on mobile tabs */
  .settings-mobile-tab {
    background: transparent !important;
    color: #999 !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    padding: 14px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    margin-bottom: -2px !important;
    flex: 1;
  }

  .settings-mobile-tab.active {
    background: transparent !important;
    color: #D84315 !important;
    border-bottom: 3px solid #D84315 !important;
  }

  .settings-mobile-tab:hover {
    background: transparent !important;
    transform: none !important;
  }

  .settings-layout {
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .settings-nav {
    display: none;
  }

  .settings-panels {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }
}

.about-modal-content {
  width: 550px;
  max-width: 90%;
}

.add-shoe-modal-content {
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  width: 500px;
}

.add-shoe-modal-content h2 {
  margin-top: 0;
}

.add-shoe-modal-content form {
  max-width: 100%;
}

@media (max-width: 550px) {
  .add-shoe-modal-content {
    width: 90vw;
    max-width: 90vw;
  }
}

/* Shoe Detail Modal */
.shoe-detail-modal-content {
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  width: 500px;
  max-width: 90vw;
}

#shoe-detail-content,
#on-deck-detail-content {
  text-align: center;
}

#shoe-detail-content img,
#on-deck-detail-content img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  background: #FAF7F2;
  padding: 20px;
  box-sizing: border-box;
}

#shoe-detail-content h2,
#on-deck-detail-content h2 {
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #2C2C2C;
  margin: 0 0 20px 0;
  font-size: 24px;
}

#shoe-detail-content .detail-row,
#on-deck-detail-content .detail-row {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid #e8e5df;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

#shoe-detail-content .detail-row-stacked,
#on-deck-detail-content .detail-row-stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

#shoe-detail-content .detail-row:last-child,
#on-deck-detail-content .detail-row:last-child {
  border-bottom: none;
}

#shoe-detail-content .detail-label,
#on-deck-detail-content .detail-label {
  font-weight: 700;
  color: #5a5a5a;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

#shoe-detail-content .detail-value,
#on-deck-detail-content .detail-value {
  font-weight: 500;
  color: #2C2C2C;
  font-size: 15px;
  text-align: right;
  word-break: break-word;
}

#shoe-detail-content .detail-row-stacked .detail-value {
  text-align: left;
}

#shoe-detail-content .detail-actions,
#on-deck-detail-content .detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  justify-content: center;
}

.detail-action-btn {
  width: 50px;
  height: 50px;
  padding: 12px;
}

@media (max-width: 480px) {
  .modal-content {
    min-width: unset;
    width: 90%;
    padding: 25px 20px;
    margin: 0 20px;
  }
}



.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.setting-row {
  margin-bottom: 20px;
}

.setting-row label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 15px;
  color: #333;
}

.setting-row input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 15px;
  transition: border-color 0.2s;
}

.setting-row input[type="text"]:focus {
  outline: none;
  border-color: #2d6cdf;
}

.setting-row input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 15px;
  transition: border-color 0.2s;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
}

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

.checkbox-label span {
  user-select: none;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .checkbox-group {
    grid-template-columns: 1fr;
  }
}

#set-password-section {
  max-width: 500px;
  margin: 20px auto;
}

.set-password-card {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.set-password-card h3 {
  margin-top: 0;
  color: #856404;
}

.set-password-card p {
  color: #856404;
  margin-bottom: 15px;
}

.set-password-card input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

.set-password-card button {
  margin-right: 10px;
  margin-bottom: 5px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
  margin: auto;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="url"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
  padding: 10px 12px;
  border: 1px solid #C4A57B;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  color: #2C2C2C;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: #D84315;
  box-shadow: 0 0 0 2px rgba(216, 67, 21, 0.1);
}

#closet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 20px;
  margin-bottom: 60px;
  padding-bottom: 20px;
}

.shoe-card {
  background: white;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(44, 44, 44, 0.1);
  text-align: center;
  border: 1px solid #e8e5df;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.shoe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 44, 44, 0.15);
}

.shoe-card h3 {
  color: #2C2C2C;
  font-weight: 700;
  font-size: 15px;
  margin: 8px 0;
}

.shoe-card p {
  color: #5a5a5a;
  font-size: 13px;
  margin: 4px 0;
}

.shoe-card img {
  width: 100%;
  border-radius: 6px;
  height: 150px;
  object-fit: contain;
  background: #FAF7F2;
}

/* Mobile: Two-column card image size */
@media (max-width: 600px) {
  .shoe-card img {
    height: 140px;
  }
}

.shoe-card-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.icon-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-action-btn:hover {
  background: #e8e5df;
}

.icon-action-btn svg {
  width: 20px;
  height: 20px;
  color: #5a5a5a;
}

.icon-action-btn:hover svg {
  color: #D84315;
}

button {
  background: #D84315;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s;
}

button:hover {
  background: #BF360C;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.secondary-btn {
  background: #3a3a3a;
  padding: 10px 18px;
  height: auto;
  border-radius: 6px;
  color: #FAF7F2;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.secondary-btn:hover {
  background: #2a2a2a;
}

.logout-btn {
  background: #D84315 !important;
  color: #3a3a3a !important;
}

.logout-btn:hover {
  background: #BF360C !important;
}

.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-suggestions.show {
  display: block;
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
}

.autocomplete-item:hover {
  background: #FAF7F2;
}

.autocomplete-item.selected {
  background: #C4A57B;
  color: white;
}

.autocomplete-item:last-child {
  border-radius: 0 0 6px 6px;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #e8e5df;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #5a5a5a;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  margin-bottom: -2px;
}

.tab-btn:hover {
  background: #FAF7F2;
  color: #2C2C2C;
  transform: none;
}

.tab-btn.active {
  color: #D84315;
  border-bottom-color: #D84315;
  background: transparent;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* API Search Container */
.api-search-container {
  padding: 0;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

#api-search-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #C4A57B;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 15px;
  transition: border-color 0.2s;
  box-sizing: border-box;
  max-width: 100%;
}

#api-search-input:focus {
  outline: none;
  border-color: #D84315;
}

#api-search-results {
  display: grid;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 15px;
}

.api-result-card {
  display: flex;
  gap: 15px;
  padding: 12px;
  background: white;
  border: 2px solid #e8e5df;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.api-result-card:hover {
  border-color: #D84315;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(216, 67, 21, 0.15);
}

.api-result-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #FAF7F2;
  border-radius: 6px;
  flex-shrink: 0;
}

.api-result-info {
  flex: 1;
  min-width: 0;
}

.api-result-name {
  font-weight: 700;
  font-size: 15px;
  color: #2C2C2C;
  margin: 0 0 4px 0;
}

.api-result-details {
  font-size: 13px;
  color: #5a5a5a;
  margin: 2px 0;
}

.api-loading {
  text-align: center;
  padding: 20px;
  color: #5a5a5a;
  font-size: 14px;
}

.api-error {
  padding: 12px;
  background: #ffe6e6;
  border: 1px solid #ff4444;
  border-radius: 8px;
  color: #cc0000;
  font-size: 13px;
  margin-top: 10px;
}

.api-no-results {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

/* Public View Banner */
#public-view-banner {
  background: linear-gradient(135deg, #D84315 0%, #BF360C 100%);
  border-radius: 8px;
  padding: 20px 25px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(216, 67, 21, 0.2);
}

.public-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

#signup-from-public {
  background: white;
  color: #D84315;
  flex-shrink: 0;
}

#signup-from-public:hover {
  background: #FAF7F2;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .public-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  #signup-from-public {
    width: 100%;
  }
}
/* ============================================
   DASHBOARD STYLES
   ============================================ */

.dash-icon-btn.active {
  background: #FAF7F2;
  color: #D84315;
  border-color: #FAF7F2;
}

#dashboard-view {
  padding-bottom: 60px;
}


.dashboard-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #2C2C2C;
  text-transform: uppercase;
  line-height: 1;
}

.dashboard-subtitle {
  color: #5a5a5a;
  font-size: 13px;
  margin-top: 5px;
  font-weight: 500;
}

/* Stat Cards */
.dash-stat-card {
  background: white;
  border-radius: 10px;
  padding: 20px 22px;
  border: 1px solid #e8e5df;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

.dash-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: #D84315;
}

.dash-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5a5a5a;
  margin-bottom: 8px;
}

.dash-stat-value {
  font-size: 48px;
  font-weight: 800;
  color: #2C2C2C;
  line-height: 1;
  letter-spacing: -2px;
}

.dash-stat-value--brand {
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1.1;
  padding-top: 4px;
}

.dash-stat-value--latest {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  padding-top: 4px;
  color: #2C2C2C;
}

.dash-stat-sub {
  font-size: 11px;
  color: #5a5a5a;
  margin-top: 5px;
  font-weight: 500;
}

/* Charts Row */
.dash-charts-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  margin-bottom: 16px;
}

.dash-chart-card {
  background: white;
  border-radius: 10px;
  padding: 24px;
  border: 1px solid #e8e5df;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.dash-spending-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.dash-spending-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dash-spending-stat {
  background: #FAF7F2;
  border-radius: 8px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.dash-spending-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: #D84315;
}

@media (max-width: 600px) {
  .dash-spending-stats {
    grid-template-columns: 1fr;
  }
  .dash-spending-header {
    flex-direction: column;
  }
}

.dash-chart-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #2C2C2C;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.dash-chart-subtitle {
  font-size: 12px;
  color: #5a5a5a;
  margin-bottom: 20px;
  font-weight: 500;
}

/* Brand Bars */
.dash-brand-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-brand-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dash-brand-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.dash-brand-name {
  font-size: 13px;
  font-weight: 700;
  color: #2C2C2C;
}

.dash-brand-count {
  font-size: 12px;
  color: #5a5a5a;
  font-weight: 600;
}

.dash-brand-track {
  width: 100%;
  height: 7px;
  background: #e8e5df;
  border-radius: 99px;
  overflow: hidden;
}

.dash-brand-fill {
  height: 100%;
  border-radius: 99px;
  background: #D84315;
  transform-origin: left;
  animation: dashGrowBar 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform: scaleX(0);
}

@keyframes dashGrowBar {
  to { transform: scaleX(1); }
}

/* Timeline */
.dash-timeline-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.dash-timeline-btn {
  background: transparent;
  border: 1.5px solid #e8e5df;
  color: #5a5a5a;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-timeline-btn:hover {
  border-color: #D84315;
  color: #D84315;
  background: transparent;
  transform: none;
}

.dash-timeline-btn.active {
  background: #D84315;
  border-color: #D84315;
  color: white;
}

.dash-chart-area {
  position: relative;
  height: 220px;
}

.dash-chart-area canvas {
  width: 100% !important;
}

.dash-chart-tooltip {
  position: absolute;
  background: #2C2C2C;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  transform: translate(-50%, -100%) translateY(-8px);
}

.dash-chart-tooltip.visible { opacity: 1; }

/* Recent Pickups */
.dash-recent-card {
  background: white;
  border-radius: 10px;
  padding: 24px;
  border: 1px solid #e8e5df;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.dash-recent-list {
  display: flex;
  flex-direction: column;
}

.dash-recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e8e5df;
}

.dash-recent-item:last-child { border-bottom: none; }

.dash-recent-rank {
  font-size: 20px;
  font-weight: 800;
  color: #C4A57B;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  letter-spacing: -1px;
}

.dash-recent-img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #FAF7F2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.dash-recent-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dash-recent-info { flex: 1; min-width: 0; }

.dash-recent-name {
  font-size: 14px;
  font-weight: 700;
  color: #2C2C2C;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-recent-brand {
  font-size: 12px;
  color: #5a5a5a;
  font-weight: 500;
  margin-top: 2px;
}

.dash-recent-date {
  font-size: 12px;
  color: #5a5a5a;
  font-weight: 600;
  flex-shrink: 0;
}

.dash-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 700px) {
  .dash-charts-row { grid-template-columns: 1fr; }
  .dashboard-title { font-size: 28px; }
}

/* Condition Breakdown */

.dash-condition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.dash-condition-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dash-condition-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.dash-condition-ring svg {
  transform: rotate(-90deg);
}

.dash-condition-ring .ring-track {
  fill: none;
  stroke: #e8e5df;
  stroke-width: 7;
}

.dash-condition-ring .ring-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-condition-pct {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: 800;
  color: #2C2C2C;
  letter-spacing: -0.5px;
}

.dash-condition-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5a5a5a;
  text-align: center;
}

.dash-condition-count {
  font-size: 11px;
  color: #999;
  font-weight: 500;
  margin-top: -6px;
}

@media (max-width: 500px) {
  .dash-condition-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 8px 0;
  }
}

/* Color Breakdown */

.dash-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.dash-color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 56px;
}

.dash-color-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.dash-color-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5a5a5a;
  text-align: center;
}

.dash-color-count {
  font-size: 11px;
  color: #999;
  font-weight: 500;
  margin-top: -3px;
}

.dash-color-empty {
  color: #999;
  font-size: 13px;
  padding: 10px 0;
}

/* Info icon tooltip */
.dash-info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8e5df;
  color: #5a5a5a;
  font-size: 11px;
  font-weight: 800;
  font-style: italic;
  cursor: default;
  flex-shrink: 0;
  user-select: none;
  transition: background 0.2s;
}

.dash-info-icon:hover,
.dash-info-icon:focus {
  background: #C4A57B;
  color: white;
  outline: none;
}

.dash-info-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #2C2C2C;
  color: white;
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  width: 260px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 100;
  pointer-events: none;
}

/* Little arrow pointing down */
.dash-info-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2C2C2C;
}

.dash-info-icon:hover .dash-info-tooltip,
.dash-info-icon:focus .dash-info-tooltip {
  display: block;
}

/* On mobile, pin tooltip to left so it doesn't clip off screen */
@media (max-width: 500px) {
  .dash-info-tooltip {
    left: auto;
    right: 0;
    transform: none;
    width: 220px;
  }

  .dash-info-tooltip::after {
    left: auto;
    right: 8px;
    transform: none;
  }
}

/* ── Dashboard Customization ───────────────────────────── */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 12px;
}

.dash-customize-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid #e8e5df;
  color: #5a5a5a;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-top: 4px;
}

.dash-customize-btn:hover {
  border-color: #D84315;
  color: #D84315;
  background: transparent;
  transform: none;
}

.dash-customize-btn.active {
  background: #D84315;
  border-color: #D84315;
  color: white;
}

.dash-customize-btn svg {
  flex-shrink: 0;
}

/* Edit mode banner */
.dash-edit-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #2C2C2C;
  color: white;
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.dash-edit-done-btn {
  background: #D84315;
  border: none;
  color: white;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.dash-edit-done-btn:hover {
  background: #BF360C;
  transform: none;
}

/* Section wrappers */
.dash-section {
  position: relative;
  transition: opacity 0.25s;
  width: 100%;
}

.dash-section-inner > * {
  margin-top: 0;
}

/* Stat sections sit side-by-side on wider screens */
#dash-sections-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

/* Stat row: stretch cards to equal height */
.dash-section--stat {
  display: flex;
  flex-direction: column;
  flex: 1 1 180px;
  max-width: 280px;
  min-width: 160px;
}

.dash-section--stat .dash-section-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dash-section--stat .dash-stat-card {
  flex: 1;
}

/* Full-width sections always take the whole row */
.dash-section:not(.dash-section--stat) {
  flex: 0 0 100%;
}

.dash-section--hidden {
  display: none;
}

.dash-section--faded {
  opacity: 0.35;
}

/* Drag handle — hidden normally, shown in edit mode */
.dash-drag-handle {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: -28px;
  transform: translateY(-50%);
  width: 24px;
  height: 40px;
  cursor: grab;
  color: #bbb;
  border-radius: 4px;
  transition: color 0.2s;
  z-index: 10;
}

.dash-drag-handle:active {
  cursor: grabbing;
}

.dash-drag-handle:hover {
  color: #D84315;
}

.dash-editing .dash-drag-handle {
  display: flex;
}

.dash-editing .dash-section {
  border-radius: 10px;
  outline: 2px dashed transparent;
  transition: outline-color 0.2s, opacity 0.25s;
}

.dash-editing .dash-section:hover {
  outline-color: #C4A57B;
}

/* Toggle visibility button — shown in edit mode */
.dash-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: white;
  border: 1.5px solid #e8e5df;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s;
  padding: 0;
}

.dash-toggle-btn:hover {
  border-color: #D84315;
  color: #D84315;
  transform: none;
  background: white;
}

.dash-toggle-btn svg {
  color: #5a5a5a;
  pointer-events: none;
  transition: color 0.2s;
}

.dash-toggle-btn:hover svg {
  color: #D84315;
}

/* SortableJS drag states */
.dash-section--ghost {
  opacity: 0.4;
  background: #FAF7F2;
  border-radius: 10px;
}

.dash-section--chosen {
  outline: 2px solid #D84315 !important;
}

.dash-section--drag {
  opacity: 0.95;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

@media (max-width: 700px) {
  .dash-drag-handle {
    left: -22px;
    width: 20px;
  }

  #dash-sections-wrapper {
    padding-left: 0;
    gap: 10px;
  }

  .dash-section--stat {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 701px) {
  #dash-sections-wrapper {
    padding-left: 0;
  }

  .dash-editing #dash-sections-wrapper {
    padding-left: 32px;
  }
}


/* ── Share Collection Button ──────────────────────────── */

.share-collection-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid #D84315;
  color: #D84315;
  padding: 8px 14px;
  height: 38px;
  box-sizing: border-box;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.3px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.share-collection-btn:hover {
  background: #D84315;
  color: white;
  transform: translateY(-1px);
}

#toggle-add-shoe-btn {
  height: 38px;
  box-sizing: border-box;
  padding: 0 14px;
  white-space: nowrap;
}

#collection-heading {
  font-size: 22px;
}

@media (max-width: 600px) {
  #collection-heading {
    font-size: 18px;
  }
}

.share-collection-btn svg {
  flex-shrink: 0;
}

/* ── Share Modal ──────────────────────────────────────── */

.share-modal-content {
  width: 480px;
  max-width: 92vw;
  padding: 32px 36px 36px;
  box-sizing: border-box;
}

.share-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.share-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #FBE9E7;
  color: #D84315;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.share-modal-title {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #2C2C2C;
  text-transform: uppercase;
}

.share-modal-subtitle {
  margin: 0;
  font-size: 13px;
  color: #777;
  font-weight: 500;
  line-height: 1.4;
}

/* Toggle row */
.share-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #FAF7F2;
  border: 1px solid #e8e5df;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.share-toggle-labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-toggle-primary {
  font-size: 14px;
  font-weight: 700;
  color: #2C2C2C;
}

.share-toggle-secondary {
  font-size: 12px;
  color: #777;
  font-weight: 500;
}

/* iOS-style switch */
.share-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.share-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.share-switch-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  transition: background 0.2s;
}

.share-switch-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.share-switch input:checked + .share-switch-slider {
  background: #D84315;
}

.share-switch input:checked + .share-switch-slider::before {
  transform: translateX(20px);
}

/* Link row */
.share-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
}

.share-link-input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #e8e5df;
  border-radius: 8px;
  font-size: 13px;
  color: #555;
  background: #f9f9f9;
  font-family: 'SF Mono', 'Fira Code', monospace;
  cursor: text;
  min-width: 0;
}

.share-link-input:focus {
  outline: none;
  border-color: #D84315;
}

.share-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #2C2C2C;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.3px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}

.share-copy-btn:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
}

.share-copy-btn--copied {
  background: #2E7D32 !important;
}

/* Divider */
.share-divider {
  height: 1px;
  background: #e8e5df;
  margin: 20px 0;
}

/* Field toggles */
.share-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #999;
  margin-bottom: 12px;
}

.share-fields-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.share-field-toggle {
  cursor: pointer;
}

.share-field-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.share-field-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1.5px solid #e8e5df;
  font-size: 13px;
  font-weight: 600;
  color: #5a5a5a;
  background: white;
  transition: all 0.15s;
  user-select: none;
  cursor: pointer;
}

.share-field-toggle input:checked + .share-field-pill {
  background: #D84315;
  border-color: #D84315;
  color: white;
}

.share-field-toggle:hover .share-field-pill {
  border-color: #D84315;
  color: #D84315;
}

.share-field-toggle input:checked + .share-field-pill:hover {
  background: #BF360C;
  border-color: #BF360C;
  color: white;
}

/* Show name row */
.share-name-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #444;
  font-weight: 500;
}

.share-name-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #D84315;
}

/* Inline display name prompt */
.sm-display-name-prompt {
  background: #FAF7F2;
  border: 1.5px solid #e8e5df;
  border-radius: 8px;
  padding: 14px;
  animation: smFadeIn 0.18s ease;
}

@keyframes smFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sm-display-name-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #D84315;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.sm-display-name-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sm-display-name-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #e8e5df;
  border-radius: 6px;
  font-size: 14px;
  color: #2C2C2C;
  background: white;
  transition: border-color 0.2s;
  min-width: 0;
}

.sm-display-name-input:focus {
  outline: none;
  border-color: #D84315;
}

.sm-display-name-save {
  background: #D84315;
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.3px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.sm-display-name-save:hover {
  background: #BF360C;
  transform: none;
}

/* Confirmation state */
.sm-display-name-set {
  font-size: 13px;
  color: #5a5a5a;
  font-weight: 500;
  animation: smFadeIn 0.18s ease;
}

.sm-display-name-set strong {
  color: #2C2C2C;
  font-weight: 700;
}

.sm-display-name-edit-btn {
  background: none;
  border: none;
  padding: 0;
  color: #D84315;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-transform: none;
  letter-spacing: normal;
}

.sm-display-name-edit-btn:hover {
  color: #BF360C;
  background: none;
  transform: none;
}

@media (max-width: 480px) {
  .share-modal-content {
    padding: 24px 20px 28px;
  }
}

.collection-footer {
  text-align: center;
  padding: 30px 0 10px;
}

.version-link {
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
  text-transform: none;
}

.version-link:hover {
  color: #D84315;
  background: transparent;
  transform: none;
}

/* Changelog Modal */
.changelog-modal-content {
  max-height: 85vh;
  overflow-y: hidden;
  overflow-x: hidden;
  width: 540px;
  max-width: calc(100vw - 40px);
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  box-sizing: border-box;
  background: #2C2C2C;
  display: flex;
  flex-direction: column;
}

.changelog-header {
  background: #2C2C2C;
  padding: 28px 36px 22px;
  border-radius: 6px 6px 0 0;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.changelog-modal-content .close-btn {
  color: rgba(255,255,255,0.6);
  top: 12px;
  right: 14px;
}

.changelog-modal-content .close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.changelog-wordmark {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #D84315;
  text-transform: uppercase;
  line-height: 1;
}

.changelog-subtitle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-top: 4px;
}

.changelog-entries {
  padding: 8px 0 20px;
  overflow-y: auto;
  overflow-x: hidden;
  background: white;
  border-radius: 0 0 6px 6px;
  flex: 1;
  min-height: 0;
}

.changelog-entry {
  padding: 22px 36px;
  border-bottom: 1px solid #e8e5df;
}

.changelog-entry:last-child {
  border-bottom: none;
}

.changelog-entry-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.changelog-version {
  font-size: 20px;
  font-weight: 800;
  color: #2C2C2C;
  letter-spacing: -0.5px;
}

.changelog-date {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.changelog-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.tag-feature  { background: #FBE9E7; color: #D84315; }
.tag-ux       { background: #E8F5E9; color: #2E7D32; }
.tag-infra    { background: #E3F2FD; color: #1565C0; }
.tag-release  { background: #F3E5F5; color: #6A1B9A; }

.changelog-entry-title {
  font-size: 15px;
  font-weight: 700;
  color: #2C2C2C;
  margin: 0 0 10px 0;
  letter-spacing: -0.3px;
}

.changelog-list {
  margin: 0;
  padding-left: 18px;
  list-style: none;
}

.changelog-list li {
  font-size: 13px;
  color: #5a5a5a;
  line-height: 1.6;
  padding: 2px 0;
  position: relative;
}

.changelog-list li::before {
  content: '—';
  position: absolute;
  left: -18px;
  color: #D84315;
  font-weight: 700;
}

@media (max-width: 480px) {
  .changelog-entry {
    padding: 18px 20px;
  }
  .changelog-header {
    padding: 22px 20px 18px;
  }
}

/* ── Collection Loading Placeholder ─────────────────────── */

.collection-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.collection-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e8e5df;
  border-top: 4px solid #D84315;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.collection-loading-text {
  margin: 0;
  color: #999;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── API Key Info Button & Tooltip ───────────────────────── */

.info-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 15px;
  color: #999;
  line-height: 1;
  transition: color 0.2s;
  text-transform: none;
  letter-spacing: normal;
  font-weight: normal;
  display: inline-flex;
  align-items: center;
}

.info-btn:hover {
  color: #D84315;
  background: transparent;
  transform: none;
}

.info-tooltip {
  background: #FAF7F2;
  border: 1px solid #e0d5c5;
  border-left: 3px solid #D84315;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #444;
  line-height: 1.6;
}

.info-tooltip p {
  margin: 0 0 8px 0;
}

.info-tooltip p:last-child {
  margin-bottom: 0;
}

.info-tooltip a {
  color: #D84315;
  font-weight: 600;
  text-decoration: none;
}

.info-tooltip a:hover {
  text-decoration: underline;
}

/* ============================================
   ON DECK VIEW
   ============================================ */

/* View Tab Bar */
#view-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid #E5E5E5;
}

.view-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-tab:hover {
  color: #2C2C2C;
  background: none;
  transform: none;
}

.view-tab.active:hover {
  color: #D84315;
  background: none;
}

.view-tab.active {
  color: #D84315;
  border-bottom-color: #D84315;
}

.view-tab-beta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #2C2C2C;
  color: white !important;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

.view-tab.active .view-tab-beta {
  background: #2C2C2C;
}

#view-tabs.hidden {
  display: none;
}

@media (max-width: 600px) {
  #view-tabs {
    justify-content: center;
  }

  #closet {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  #on-deck-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 0 40px 0;
  }
}

.on-deck-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.on-deck-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #2C2C2C;
  text-transform: uppercase;
}

.on-deck-beta-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #e8e5df;
  color: #888;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.on-deck-subtitle {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

#on-deck-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 0 20px 40px 20px;
}

.on-deck-card {
  background: white;
  border-radius: 8px;
  border: 1px solid #e8e5df;
  box-shadow: 0 2px 8px rgba(44,44,44,0.08);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.on-deck-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(44,44,44,0.15);
}

.on-deck-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #D84315;
  color: white;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 1;
}

.on-deck-card-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #FAF7F2;
  display: block;
  flex-shrink: 0;
}

.on-deck-card-img-placeholder {
  width: 100%;
  height: 140px;
  background: #FAF7F2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.on-deck-card-body {
  padding: 10px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.on-deck-card-name {
  font-weight: 700;
  font-size: 14px;
  color: #2C2C2C;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.on-deck-card-sub {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.on-deck-card-price {
  font-size: 12px;
  font-weight: 700;
  color: #D84315;
  margin-top: 4px;
  min-height: 1em;
}

.on-deck-card-price.price-empty {
  color: #bbb;
  font-weight: 400;
  display: block;
  visibility: visible;
}

.on-deck-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.on-deck-shop-btns {
  display: flex;
  gap: 6px;
}

.on-deck-shop-btn {
  flex: 1;
  background: transparent;
  color: #2C2C2C !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 5px;
  border: 1.5px solid #2C2C2C;
  cursor: pointer;
  text-decoration: none;
  display: block;
  text-align: center;
  transition: background 0.2s, color 0.2s;
  line-height: normal;
}

.on-deck-shop-btn:hover {
  background: #2C2C2C;
  color: #FAF7F2 !important;
  transform: none;
}

.on-deck-move-btn {
  width: 100%;
  background: #D84315;
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.on-deck-move-btn:hover {
  background: #BF360C;
  transform: none;
}

.on-deck-card-icon-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 6px;
}

.on-deck-modal-content {
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.on-deck-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.on-deck-empty-icon {
  margin-bottom: 12px;
  opacity: 0.25;
}

.on-deck-empty-title {
  font-weight: 700;
  font-size: 16px;
  color: #2C2C2C;
  margin-bottom: 6px;
}

.on-deck-empty-sub {
  font-size: 13px;
  color: #aaa;
}

@media (max-width: 768px) {
  #on-deck-list {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 0 40px 0;
  }
  .on-deck-header {
    padding: 16px 0 8px 0;
  }
}

/* ── Undo Toast ───────────────────────────────────────── */

.undo-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2C2C2C;
  color: #FAF7F2;
  padding: 6px 6px 6px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}

.undo-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.undo-toast-btn {
  background: #D84315;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.undo-toast-btn:hover {
  background: #BF360C;
  transform: none;
}

/* ── Google Image Search Button ───────────────────────── */

.google-img-search-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid #e8e5df;
  color: #5a5a5a;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  width: 100%;
  justify-content: center;
  text-transform: none;
  letter-spacing: 0;
  margin-top: -4px;
}

.google-img-search-btn:hover {
  border-color: #D84315;
  color: #D84315;
  background: transparent;
  transform: none;
}

/* ── Recently Deleted Modal ───────────────────────────── */

.recently-deleted-modal-content {
  max-width: 540px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.recently-deleted-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e8e5df;
}

.recently-deleted-row:last-child {
  border-bottom: none;
}

.recently-deleted-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #FAF7F2;
  flex-shrink: 0;
  border: 1px solid #e8e5df;
}

.recently-deleted-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAF7F2;
  border: 1px solid #e8e5df;
}

.recently-deleted-info {
  flex: 1;
  min-width: 0;
}

.recently-deleted-name {
  font-size: 14px;
  font-weight: 700;
  color: #2C2C2C;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recently-deleted-date {
  font-size: 12px;
  color: #5a5a5a;
  margin-top: 2px;
}

.recently-deleted-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.restore-btn {
  background: #D84315;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s;
}

.restore-btn:hover {
  background: #BF360C;
  transform: none;
}

.perm-delete-btn {
  background: transparent;
  color: #9e9e9e;
  border: 1.5px solid #e8e5df;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s;
}

.perm-delete-btn:hover {
  border-color: #9e9e9e;
  color: #2C2C2C;
  transform: none;
}
