/* ==========================================================================
   STYLE – Digitaler Kleiderschrank & Intelligenter Outfit-Stylist
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,900;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-main: #0a0c10;
  --bg-surface: rgba(18, 21, 28, 0.82);
  --bg-card: rgba(26, 30, 40, 0.76);
  --bg-card-hover: rgba(35, 40, 52, 0.9);
  --bg-glass: rgba(22, 26, 36, 0.78);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.18);
  --border-accent: rgba(226, 199, 153, 0.45);

  --accent-gold: #e2c799;
  --accent-gold-soft: rgba(226, 199, 153, 0.14);
  --accent-gold-hover: #edd9b4;
  --accent-coral: #e07a5f;
  
  --text-main: #f5f6f8;
  --text-secondary: #9aa0a9;
  --text-muted: #656b75;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(226, 199, 153, 0.15);

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ==========================================================================
   IMMERSIVE PROCEDURAL BACKGROUND
   - Active Silk & Stardust Flow Field Canvas
   - Giant Haute-Couture Watermark Typography ("STYLE")
   - Atelier Lighting & Tailored Suiting Fabric Grain
   ========================================================================== */
.bg-immersive {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #08090d;
}

#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.9;
  pointer-events: none;
}

.bg-watermark-container {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  user-select: none;
  pointer-events: none;
  text-align: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.bg-watermark-text {
  font-family: var(--font-serif);
  font-size: clamp(140px, 24vw, 380px);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 0.82;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(226, 199, 153, 0.055);
  background: linear-gradient(180deg, rgba(226, 199, 153, 0.075) 0%, rgba(255, 255, 255, 0.015) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-transform: uppercase;
  margin-left: 0.14em; /* offset letter-spacing */
}

.bg-watermark-details {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(10px, 1.2vw, 14px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(226, 199, 153, 0.12);
  font-weight: 500;
  margin-top: 14px;
}

.bg-ambient-glows {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.glow-top {
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 600px;
  background: radial-gradient(circle, rgba(226, 199, 153, 0.13) 0%, transparent 70%);
}

.glow-left {
  top: 25%;
  left: -150px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(224, 122, 95, 0.07) 0%, transparent 65%);
}

.glow-right {
  bottom: 5%;
  right: -150px;
  width: 850px;
  height: 850px;
  background: radial-gradient(circle, rgba(45, 68, 105, 0.15) 0%, transparent 70%);
}

.bg-fabric-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.85;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M0 7L7 0M0 21L21 0M7 28L28 7M21 28L28 21' stroke='rgba(255,255,255,0.024)' stroke-width='0.75' stroke-linecap='round'/%3E%3Cpath d='M0 14L14 0M14 28L28 14' stroke='rgba(226,199,153,0.022)' stroke-width='0.75' stroke-linecap='round'/%3E%3Ccircle cx='14' cy='14' r='0.6' fill='rgba(255,255,255,0.025)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 25%, #131622 0%, #0d0f15 45%, #07080b 100%);
  background-size: 28px 28px, auto;
  background-repeat: repeat, no-repeat;
  mix-blend-mode: screen;
}

/* Haute-Couture Hairline Top Accent */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 199, 153, 0.4) 50%, transparent);
  pointer-events: none;
  z-index: 101;
}

/* Typography */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Container */
.app-container {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 80px;
  flex: 1;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 12, 17, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  margin-bottom: 24px;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2b303d 0%, #161820 100%);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(226, 199, 153, 0.15);
  letter-spacing: -0.02em;
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.brand-text span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  display: block;
}

.nav-tabs {
  display: flex;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  color: var(--text-main);
}

.nav-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-active);
}

.nav-btn .badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.nav-btn.active .badge {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gold);
  color: #121316;
  border-color: var(--accent-gold);
  box-shadow: 0 2px 10px rgba(226, 199, 153, 0.25);
}

.btn-primary:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(226, 199, 153, 0.35);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-pinterest {
  background: #E60023;
  color: #fff;
  border-color: #E60023;
}

.btn-pinterest:hover {
  background: #b8001c;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(230, 0, 35, 0.35);
}

/* ==========================================================================
   Views & View Switching
   ========================================================================== */
.view-section {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   VIEW 1: STYLIST (Outfit Generator)
   ========================================================================== */
.stylist-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}

/* Left sidebar: Controls */
.stylist-controls {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Occasion Pills */
.occasion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.occasion-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.occasion-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-active);
}

.occasion-btn.active {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border-color: var(--border-accent);
  font-weight: 600;
}

/* Weather controls */
.weather-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.temp-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.temp-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  min-width: 54px;
}

input[type="range"] {
  flex: 1;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.weather-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.weather-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-active);
}

.preset-chip.active {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  font-weight: 600;
}

.btn-live-weather {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-live-weather:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}
.btn-live-weather.active {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border-color: var(--border-accent);
  box-shadow: 0 0 12px rgba(226, 199, 153, 0.22);
  font-weight: 600;
}

/* Outfit Results */
.outfit-display-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.outfit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
}

.outfit-counter {
  font-size: 14px;
  color: var(--text-secondary);
}

.outfit-pagination {
  display: flex;
  gap: 8px;
}

.outfit-card-main {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.outfit-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.outfit-title-group h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.outfit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
}

.tag-pill.gold {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border-color: var(--border-accent);
}

/* Pieces Grid */
.outfit-pieces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.piece-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all var(--transition-fast);
  min-width: 0;
}

.piece-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.piece-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.piece-slot-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: center;
  margin: 0;
}

.piece-visual {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
}

.piece-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.piece-visual svg.sil {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.piece-info {
  width: 100%;
  margin-bottom: 8px;
}

.piece-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
  margin-bottom: 4px;
  min-height: 2.6em;
}

.piece-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dedicated Piece Card Actions toolbar */
.piece-card-actions,
.piece-card-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.btn-lock-piece,
.btn-swap-piece {
  position: static;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 12px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.piece-card:hover .btn-lock-piece,
.piece-card:hover .btn-swap-piece {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-lock-piece:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

.btn-lock-piece.is-locked {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.btn-swap-piece:hover {
  background: var(--accent-gold);
  color: #121316;
  border-color: var(--accent-gold);
  transform: rotate(180deg) scale(1.1);
}

/* Outfit Actions Footer */
.outfit-actions-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  flex-wrap: wrap;
}

.outfit-reasons-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  border-left: 3px solid var(--accent-gold);
}

.outfit-reasons-box h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.outfit-reasons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.outfit-reasons-list li {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.outfit-reasons-list li::before {
  content: '✓';
  color: var(--accent-gold);
  font-size: 12px;
}

/* ==========================================================================
   VIEW 2: WARDROBE (Digitaler Kleiderschrank)
   ========================================================================== */
.wardrobe-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.category-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cat-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.cat-pill:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.cat-pill.active {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
  font-weight: 600;
}

.wardrobe-stats {
  font-size: 13px;
  color: var(--text-muted);
}

/* Wardrobe Grid */
.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.wardrobe-item-card {
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.wardrobe-item-card:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.wardrobe-item-thumb {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.wardrobe-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.wardrobe-item-thumb svg.sil {
  width: 100px;
  height: 100px;
}

.item-badge-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(18, 19, 22, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.item-badge-fav.is-fav {
  color: #ff5e7e;
  border-color: rgba(255, 94, 126, 0.3);
}

.item-badge-fav:hover {
  transform: scale(1.1);
}

.item-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
  margin-bottom: 8px;
  min-height: 2.7em;
}

.item-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: auto;
}

.item-card-meta > span:last-child {
  white-space: nowrap;
}

.item-card-color {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   VIEW 3: HISTORY & FAVORITES
   ========================================================================== */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.history-pieces-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.history-thumb-mini {
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.history-thumb-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-thumb-mini svg.sil {
  width: 38px;
  height: 38px;
}

/* ==========================================================================
   MODAL: Add / Upload Item
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 20px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed var(--border-active);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 20px;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-soft);
}

.dropzone-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.dropzone-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.dropzone-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.upload-preview-container {
  display: none;
  margin-bottom: 20px;
  position: relative;
  text-align: center;
}

.upload-preview-container.active {
  display: block;
}

.preview-img-box {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-active);
  background: var(--bg-card);
  position: relative;
}

.preview-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-accent);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

/* Form controls in modal */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group-full {
  grid-column: span 2;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-gold);
}

/* Palette Color Picker Grid */
.color-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.color-option-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-fast);
}

.color-option-btn:hover {
  transform: scale(1.15);
}

.color-option-btn.selected {
  border-color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .stylist-layout {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .app-container {
    padding: 0 12px 60px;
  }
  .outfit-pieces-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wardrobe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group-full {
    grid-column: span 1;
  }
}

/* ==========================================================================
   Laundry Tracker Styles
   ========================================================================== */
.laundry-notice-bar {
  background: rgba(226, 199, 153, 0.07);
  border: 1px solid rgba(226, 199, 153, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.laundry-notice-btn {
  background: rgba(226, 199, 153, 0.15);
  border: 1px solid rgba(226, 199, 153, 0.3);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.laundry-notice-btn:hover {
  background: rgba(226, 199, 153, 0.25);
}

.item-badge-laundry {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(18, 19, 22, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition-fast);
  z-index: 2;
}
.item-badge-laundry:hover {
  transform: scale(1.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.item-badge-laundry.is-in-laundry {
  background: rgba(210, 75, 75, 0.35);
  border-color: rgba(225, 95, 95, 0.6);
  color: #ff9999;
}

.wardrobe-item-card.is-in-laundry {
  opacity: 0.72;
  border-color: rgba(225, 95, 95, 0.3);
  background: rgba(255, 60, 60, 0.02);
}
.wardrobe-item-card.is-in-laundry:hover {
  opacity: 0.95;
}

.laundry-overlay-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(25, 10, 10, 0.88);
  border: 1px solid rgba(225, 95, 95, 0.45);
  color: #ff8b8b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  pointer-events: none;
  white-space: nowrap;
}

/* ==========================================================================
   Stylist-Check & Schrank-Diagnose Dashboard
   ========================================================================== */
.insights-dashboard {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.insights-hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.score-radial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--accent-gold);
  background: radial-gradient(circle, rgba(226, 199, 153, 0.12) 0%, transparent 70%);
  text-align: center;
}
.score-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}
.score-max {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-text h2 {
  font-size: 22px;
  margin-bottom: 6px;
}
.hero-text p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 600px;
}

.hero-stats-row {
  display: flex;
  gap: 20px;
  text-align: center;
}
.hero-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  min-width: 100px;
}
.hero-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}
.hero-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.insights-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gap-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.gap-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  border-left: 4px solid #e07a2e;
}
.gap-card.high {
  border-left-color: #e04545;
}
.gap-card.medium {
  border-left-color: #e0a52e;
}

.gap-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.gap-card-icon {
  font-size: 24px;
}
.gap-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.gap-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.gap-recommendation {
  background: rgba(226, 199, 153, 0.08);
  border: 1px solid rgba(226, 199, 153, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--accent-gold);
  line-height: 1.5;
}
.gap-recommendation strong {
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.strength-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  border-left: 4px solid #2f7d50;
}
.strength-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.strength-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}
.strength-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .insights-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 20px;
  }
  .hero-stats-row {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Vibe Selector Chips & Anchor Notice Banner
   ========================================================================== */
.vibe-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.vibe-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}
.vibe-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-active);
}
.vibe-chip.active {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  font-weight: 600;
}

.anchor-notice-bar {
  background: rgba(226, 199, 153, 0.12);
  border: 1px solid rgba(226, 199, 153, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease-out;
}
.anchor-notice-btn {
  background: transparent;
  border: 1px solid rgba(226, 199, 153, 0.4);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.anchor-notice-btn:hover {
  background: rgba(226, 199, 153, 0.2);
}

/* ==========================================================================
   Piece Lock & Wardrobe "Stylen" Button
   ========================================================================== */
.piece-card.is-locked {
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(226, 199, 153, 0.15);
}

.btn-style-item {
  width: 100%;
  margin-top: 6px;
  font-size: 12px;
  padding: 6px 10px;
  background: rgba(226, 199, 153, 0.08);
  border: 1px solid rgba(226, 199, 153, 0.25);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}
.btn-style-item:hover {
  background: var(--accent-gold);
  color: #121316;
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

/* ==========================================================================
   Wochenplaner (5-Tage-Rotation)
   ========================================================================== */
.week-plan-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.week-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.week-plan-header h3 {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 2px;
}
.week-plan-header p {
  font-size: 13px;
  color: var(--text-secondary);
}
.week-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.week-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-fast);
}
.week-day-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}
.week-day-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.week-day-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold);
}
.week-day-occ {
  font-size: 11px;
  color: var(--text-muted);
}
.week-pieces-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px;
  border-radius: var(--radius-sm);
}
.week-piece-thumb {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
}
.week-piece-thumb svg.sil {
  width: 34px;
  height: 34px;
}
.week-piece-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.week-outfit-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  flex: 1;
}
.week-card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  display: flex;
  justify-content: flex-end;
}

