/* ============ TOKENS — MIDNIGHT NAVY DARK MODE ============ */
:root {
  --bg: #0B1D3F;
  --surface: #142B55;
  --surface2: #1A3668;
  --surface3: #21437A;
  --accent: #5B9BD5;
  --accent-strong: #90C0F0;
  --accent-light: rgba(91,155,213,0.15);
  --accent-mid: rgba(91,155,213,0.32);
  --text: #EEF4FF;
  --text2: rgba(238,244,255,0.65);
  --text3: rgba(238,244,255,0.35);
  --border: rgba(91,155,213,0.18);
  --border-strong: rgba(91,155,213,0.28);
  --shadow: 0 2px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
  --green: #5DBF8A;
  --blue: #6AABDF;
  --orange: #E8A84A;
  --red: #E07060;
  --r: 16px;
  --r-sm: 10px;
  --r-lg: 22px;
  --r-xl: 30px;
  --nav-h: 72px;
  --header-h: 56px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ============ APP SHELL ============ */
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ============ HEADER ============ */
#app-header {
  height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
#screen-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.header-actions { display: flex; gap: 8px; }
.header-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text2);
  border: 1px solid var(--border);
  transition: background 0.15s, transform 0.15s;
}
.header-btn:active { background: var(--surface3); transform: scale(0.93); }

/* ============ MAIN / SCREENS ============ */
#app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 8px);
  -webkit-overflow-scrolling: touch;
}
.screen { display: none; padding: 16px 16px 0; animation: fadeIn 0.2s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ BOTTOM NAV ============ */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 0 8px env(safe-area-inset-bottom, 8px);
  z-index: 10;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: var(--r-sm);
  color: var(--text3);
  transition: color 0.2s, background 0.2s;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.nav-btn .nav-icon { font-size: 22px; transition: transform 0.2s; }
.nav-btn.active { color: var(--accent-strong); }
.nav-btn.active .nav-icon { transform: scale(1.1); }
.nav-btn:active { background: var(--accent-light); }

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-pad { padding: 18px; }

/* ============ HOME SCREEN ============ */

/* Weather bar */
.weather-bar {
  background: var(--surface2);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.weather-info { display: flex; align-items: center; gap: 12px; }
.weather-icon { font-size: 32px; }
.weather-temp { font-size: 32px; font-weight: 800; letter-spacing: -1px; color: var(--text); }
.weather-details { display: flex; flex-direction: column; }
.weather-loc { font-size: 12px; font-weight: 700; color: var(--text2); }
.weather-desc { font-size: 11px; color: var(--text3); }
.weather-date { font-size: 11px; color: var(--text3); font-weight: 500; text-align: right; max-width: 80px; }

/* Vibe pills */
.vibe-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.vibe-row::-webkit-scrollbar { display: none; }
.vibe-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: var(--surface);
  color: var(--text2);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}
.vibe-pill.active {
  background: var(--accent-light);
  color: var(--accent-strong);
  border-color: var(--accent-mid);
  box-shadow: 0 0 0 1px var(--accent-mid);
}
.vibe-pill:active { transform: scale(0.96); }

/* Outfit card */
.outfit-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.outfit-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.outfit-card-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-strong);
  opacity: 0.5;
}
.outfit-swipe-hint { font-size: 10px; color: var(--text3); }

/* Outfit layers */
.outfit-layers { display: flex; flex-direction: column; gap: 8px; }
.layer-row { display: flex; gap: 8px; }
.outfit-item {
  flex: 1;
  background: var(--surface2);
  border-radius: var(--r);
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  position: relative;
  min-width: 0;
  border: 1.5px solid transparent;
}
.outfit-item:active { transform: scale(0.97); background: var(--surface3); }
.outfit-item.locked {
  background: var(--surface3);
  border-color: var(--accent-mid);
}
.outfit-item.locked::after {
  content: '🔒';
  position: absolute;
  top: 4px; right: 6px;
  font-size: 9px;
}
.outfit-item-photo {
  width: 38px; height: 38px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  overflow: hidden;
}
.outfit-item-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.outfit-item-info { flex: 1; min-width: 0; }
.outfit-item-cat {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-strong);
  opacity: 0.45;
  margin-bottom: 1px;
}
.outfit-item-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.outfit-item-sub { font-size: 10px; color: var(--text3); }
.outfit-item-empty { color: var(--text3); font-size: 11px; font-style: italic; }

/* Action buttons */
.outfit-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.btn-primary {
  flex: 1.2;
  padding: 14px;
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(91,155,213,0.25);
}
.btn-primary:active { opacity: 0.85; transform: scale(0.98); }
.btn-secondary {
  flex: 1;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface2);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  transition: background 0.15s, transform 0.15s;
}
.btn-secondary:active { background: var(--surface3); transform: scale(0.98); }
.btn-ghost {
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface2);
  color: var(--text2);
  font-size: 16px;
  border: 1px solid var(--border);
}
.btn-ghost:active { background: var(--surface3); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text3);
}
.empty-state .empty-emoji { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.empty-state p { font-size: 13px; line-height: 1.5; }

/* Section header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  margin-top: 18px;
}
.section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-strong);
  opacity: 0.6;
}
.section-action {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
}

/* ============ WARDROBE SCREEN ============ */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
  padding-bottom: 2px;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border-strong);
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-chip.active {
  background: var(--accent-light);
  color: var(--accent-strong);
  border-color: var(--accent-mid);
}
.filter-chip:active { transform: scale(0.96); }

/* Wardrobe grid */
.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-bottom: 80px;
}
.wardrobe-item {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}
.wardrobe-item:active { transform: scale(0.97); box-shadow: none; }
.wardrobe-item-photo {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  overflow: hidden;
}
.wardrobe-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.wardrobe-item-info { padding: 10px 12px 12px; }
.wardrobe-item-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.wardrobe-item-brand { font-size: 11px; color: var(--text3); margin-bottom: 6px; }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.status-clean { background: rgba(61,139,94,0.12); color: var(--green); }
.status-wash { background: rgba(58,114,184,0.12); color: var(--blue); }
.status-can-use { background: rgba(201,125,32,0.12); color: var(--orange); }
.status-archived { background: var(--border); color: var(--text3); }

/* Last worn chip */
.last-worn-chip {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--surface3);
  color: var(--text);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  opacity: 0.85;
}

/* FAB */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 18px);
  right: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 4px 20px rgba(91,155,213,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fab.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.fab:active { transform: scale(0.92) !important; }

/* ============ STATS SCREEN ============ */
.stat-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.stat-card-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 12px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.stat-item:last-child { border-bottom: none; padding-bottom: 0; }
.stat-item-photo {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  overflow: hidden;
  flex-shrink: 0;
}
.stat-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.stat-item-info { flex: 1; min-width: 0; }
.stat-item-name { font-size: 13px; font-weight: 700; color: var(--text); }
.stat-item-sub { font-size: 11px; color: var(--text3); }
.stat-item-value { font-size: 14px; font-weight: 800; color: var(--accent-strong); }
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.stat-box {
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
}
.stat-box-val { font-size: 26px; font-weight: 800; color: var(--accent-strong); }
.stat-box-label { font-size: 11px; color: var(--text3); font-weight: 600; margin-top: 2px; }

/* Cleanup */
.cleanup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cleanup-item:last-child { border-bottom: none; }
.cleanup-actions { display: flex; gap: 6px; }
.cleanup-btn {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  background: var(--bg);
  color: var(--text2);
  border: 1px solid var(--border);
}
.cleanup-btn.danger {
  background: rgba(27,46,75,0.08);
  color: var(--accent-strong);
  border-color: var(--accent-mid);
}

/* ============ SAVED SCREEN ============ */
.saved-outfit-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s;
}
.saved-outfit-card:active { transform: scale(0.98); }
.saved-outfit-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.saved-outfit-items { display: flex; gap: 6px; flex-wrap: wrap; }
.saved-outfit-emoji {
  width: 40px; height: 40px;
  background: var(--bg);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.saved-outfit-emoji img { width: 100%; height: 100%; object-fit: cover; }
.saved-outfit-meta { font-size: 11px; color: var(--text3); margin-top: 6px; }

/* Wishlist */
.wishlist-item {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wishlist-photo {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.wishlist-photo img { width: 100%; height: 100%; object-fit: cover; }
.wishlist-info { flex: 1; min-width: 0; }
.wishlist-name { font-size: 14px; font-weight: 700; color: var(--text); }
.wishlist-brand { font-size: 11px; color: var(--text3); }
.wishlist-price { font-size: 13px; font-weight: 700; color: var(--accent-strong); margin-top: 2px; }
.wishlist-compat {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  margin-top: 4px;
  display: inline-block;
}
.compat-good { background: rgba(61,139,94,0.1); color: var(--green); }
.compat-warn { background: rgba(201,125,32,0.1); color: var(--orange); }

/* ============ PACKING SCREEN ============ */
.packing-header {
  background: var(--surface2);
  border-radius: var(--r-lg);
  padding: 28px 20px 24px;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text);
  border: 1px solid var(--border);
}
.packing-emoji { font-size: 48px; margin-bottom: 8px; }
.packing-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.packing-layer-row {
  background: var(--surface);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.packing-layer-emoji { font-size: 22px; flex-shrink: 0; }
.packing-layer-info { flex: 1; }
.packing-layer-cat { font-size: 10px; font-weight: 800; color: var(--accent-strong); opacity: 0.45; text-transform: uppercase; letter-spacing: 0.5px; }
.packing-layer-name { font-size: 13px; font-weight: 700; color: var(--text); }

/* ============ MODALS ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5,10,18,0.75);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; animation: overlayIn 0.2s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  width: 100%; max-width: 430px;
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  max-height: 92dvh;
  overflow-y: auto;
  animation: sheetUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 17px; font-weight: 800; color: var(--text); }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text2);
}
.modal-body { padding: 16px 20px; }

/* Form fields */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-strong);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.6;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface2);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Photo upload */
.photo-upload {
  width: 100%;
  aspect-ratio: 1.2;
  background: var(--surface2);
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}
.photo-upload:active { border-color: var(--accent); background: var(--accent-light); }
.photo-upload-icon { font-size: 36px; }
.photo-upload-text { font-size: 13px; font-weight: 600; color: var(--text2); }
.photo-upload img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-remove {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.6);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  display: none;
  align-items: center; justify-content: center;
}
.photo-upload.has-photo .photo-remove { display: flex; }

/* Tag / category selectors */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-btn {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface2);
  color: var(--text2);
  border: 1.5px solid var(--border);
  transition: all 0.15s;
}
.tag-btn.active {
  background: var(--accent-light);
  color: var(--accent-strong);
  border-color: var(--accent-mid);
}

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-btn {
  padding: 12px 8px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  border: 1.5px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--text2);
  transition: all 0.15s;
  cursor: pointer;
}
.cat-btn .cat-emoji { font-size: 24px; }
.cat-btn.active {
  background: var(--accent-light);
  color: var(--accent-strong);
  border-color: var(--accent-mid);
}

/* Status selectors */
.status-row { display: flex; gap: 8px; }
.status-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1.5px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--text2);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.status-btn.active-clean { background: rgba(61,139,94,0.1); color: var(--green); border-color: rgba(61,139,94,0.3); }
.status-btn.active-wash { background: rgba(58,114,184,0.1); color: var(--blue); border-color: rgba(58,114,184,0.3); }
.status-btn.active-can-use { background: rgba(201,125,32,0.1); color: var(--orange); border-color: rgba(201,125,32,0.3); }

/* Item detail modal */
.detail-photo {
  width: 100%;
  height: 220px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-name { font-size: 22px; font-weight: 800; margin-bottom: 2px; color: var(--text); }
.detail-brand { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail-chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text2);
  border: 1px solid var(--border);
}
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.detail-stat {
  text-align: center;
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 12px 8px;
  border: 1px solid var(--border);
}
.detail-stat-val { font-size: 20px; font-weight: 800; color: var(--accent-strong); }
.detail-stat-label { font-size: 10px; color: var(--text3); font-weight: 600; margin-top: 2px; }
.detail-actions { display: flex; flex-direction: column; gap: 8px; }

.btn-danger { background: rgba(184,74,58,0.08); color: var(--red); border: 1.5px solid rgba(184,74,58,0.2); }
.btn-full {
  width: 100%;
  padding: 14px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-full:active { opacity: 0.8; transform: scale(0.98); }

/* Compare modal */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.compare-col { display: flex; flex-direction: column; gap: 6px; }
.compare-col-label { font-size: 11px; font-weight: 800; color: var(--accent-strong); opacity: 0.5; text-align: center; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.compare-item {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 8px;
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border);
}
.compare-item-emoji { font-size: 18px; }
.compare-item-name { font-size: 11px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Settings */
.settings-section { margin-bottom: 24px; }
.settings-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-strong);
  opacity: 0.5;
  margin-bottom: 10px;
}
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.settings-item:last-child { border-bottom: none; }
.settings-label { font-size: 14px; font-weight: 600; color: var(--text); }
.settings-sub { font-size: 11px; color: var(--text3); }

/* Toggle */
.toggle {
  width: 44px; height: 26px;
  background: var(--border);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--accent); }
.toggle::after {
  content: '';
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle.on::after { transform: translateX(18px); }

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%; transform: translateX(-50%);
  background: var(--surface2);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(27,46,75,0.3);
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.toast.out { animation: toastOut 0.25s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(8px); } }

/* Save outfit preview */
.save-outfit-preview { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

/* ============ UTILS ============ */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-accent { color: var(--accent-strong); }
.text-muted { color: var(--text3); }
.text-sm { font-size: 12px; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.justify-between { justify-content: space-between; }
