/* ═══════════════════════════════════════════════════════════════
   Meine Möbel — Eigenes CSS
   ═══════════════════════════════════════════════════════════════ */

/* ── Panel Wrapper ────────────────────────────────────────────── */
#my-furniture-content {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #F7F5F2;
}

.mmb-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────── */
.mmb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  background: #fff;
  border-bottom: 1px solid #E8E4DF;
  flex-shrink: 0;
}

.mmb-header-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.02em;
  margin: 0;
}

.mmb-header-count {
  font-size: 0.72rem;
  color: #9a9590;
  font-weight: 500;
  margin-left: 6px;
}

.mmb-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: linear-gradient(135deg, #2C3E7A 0%, #1a2a5e 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(44,62,122,0.3);
  letter-spacing: 0.01em;
}
.mmb-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(44,62,122,0.35);
}
.mmb-add-btn:active { transform: translateY(0); }
.mmb-add-btn svg { flex-shrink: 0; }

/* ── Grid ────────────────────────────────────────────────────── */
.mmb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

/* ── Empty State ─────────────────────────────────────────────── */
.mmb-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  gap: 14px;
  text-align: center;
}
.mmb-empty-icon {
  width: 64px;
  height: 64px;
  background: #EDE9E3;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mmb-empty-icon svg { color: #b0ab9f; }
.mmb-empty h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #3a3730;
  margin: 0;
}
.mmb-empty p {
  font-size: 0.78rem;
  color: #9a9590;
  margin: 0;
  line-height: 1.5;
}

/* ── Karte ───────────────────────────────────────────────────── */
.mmb-card {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #E8E4DF;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mmb-card:hover {
  border-color: #2C3E7A;
  box-shadow: 0 8px 24px rgba(44,62,122,0.14);
  transform: translateY(-3px);
}

/* Bild-Bereich */
.mmb-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #F0EDE8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.mmb-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.mmb-card:hover .mmb-card-img img {
  transform: scale(1.04);
}
.mmb-card-color-dot {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Info-Bereich */
.mmb-card-info {
  padding: 9px 10px 10px;
}
.mmb-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mmb-card-dims {
  font-size: 0.68rem;
  color: #9a9590;
  font-weight: 500;
}

/* Delete-Button oben rechts */
.mmb-card-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border: none;
  color: #9a9590;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.mmb-card:hover .mmb-card-del {
  opacity: 1;
  transform: scale(1);
}
.mmb-card-del:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.35);
}

/* ═══════════════════════════════════════════════════════════════
   Detail-Overlay
   ═══════════════════════════════════════════════════════════════ */
.mmb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 25, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: mmb-fade-in 0.2s ease;
}
@keyframes mmb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.mmb-detail-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  animation: mmb-slide-up 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes mmb-slide-up {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Bild-Header des Detail-Cards */
.mmb-detail-hero {
  position: relative;
  width: 100%;
  height: 220px;
  background: #F0EDE8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mmb-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mmb-detail-hero-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.mmb-detail-color-preview {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.mmb-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a2e;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: all 0.18s;
}
.mmb-detail-close:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Body */
.mmb-detail-body {
  padding: 22px 22px 0;
}
.mmb-detail-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 4px;
  letter-spacing: -0.03em;
}
.mmb-detail-date {
  font-size: 0.72rem;
  color: #b0ab9f;
  margin: 0 0 18px;
}

/* Maß-Grid */
.mmb-detail-dims {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.mmb-dim-chip {
  background: #F7F5F2;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #E8E4DF;
}
.mmb-dim-chip-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b0ab9f;
  display: block;
  margin-bottom: 4px;
}
.mmb-dim-chip-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
}

/* Farb-Zeile */
.mmb-detail-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #F7F5F2;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid #E8E4DF;
}
.mmb-detail-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 2px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.mmb-detail-color-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #3a3730;
}

/* Actions */
.mmb-detail-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 0 22px 22px;
}
.mmb-place-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #2C3E7A 0%, #1a2a5e 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(44,62,122,0.3);
  letter-spacing: 0.01em;
}
.mmb-place-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(44,62,122,0.38);
}
.mmb-del-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid #E8E4DF;
  background: #fff;
  color: #9a9590;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}
.mmb-del-btn:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════
   Erstellen-Modal
   ═══════════════════════════════════════════════════════════════ */
.mmb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 25, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: mmb-fade-in 0.2s ease;
}

.mmb-modal-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  animation: mmb-slide-up 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

.mmb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #F0EDE8;
  flex-shrink: 0;
}
.mmb-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0;
  letter-spacing: -0.02em;
}
.mmb-modal-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #F7F5F2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b6860;
  transition: all 0.15s;
}
.mmb-modal-x:hover { background: #E8E4DF; color: #1a1a2e; }

.mmb-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Upload Zone */
.mmb-upload-zone {
  border: 2px dashed #C8C3BC;
  border-radius: 14px;
  background: #FAFAF8;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}
.mmb-upload-zone:hover,
.mmb-upload-zone.drag-over {
  border-color: #2C3E7A;
  background: rgba(44,62,122,0.04);
}
.mmb-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.mmb-upload-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #EDE9E3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9590;
  transition: all 0.2s;
}
.mmb-upload-zone:hover .mmb-upload-icon,
.mmb-upload-zone.drag-over .mmb-upload-icon {
  background: rgba(44,62,122,0.12);
  color: #2C3E7A;
}
.mmb-upload-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #3a3730;
  margin: 0;
  text-align: center;
}
.mmb-upload-hint {
  font-size: 0.7rem;
  color: #b0ab9f;
  margin: 0;
  text-align: center;
}

/* Vorschau im Upload-Zone */
.mmb-upload-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0EDE8;
}
.mmb-upload-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.mmb-upload-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15,12,25,0.55);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}
.mmb-upload-clear:hover { background: #ef4444; }
.mmb-upload-status {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,12,25,0.7);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 2;
  animation: mmb-fade-in 0.2s ease;
}

/* Formular Felder */
.mmb-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9a9590;
  margin-bottom: 7px;
}
.mmb-input {
  width: 100%;
  height: 40px;
  border: 1.5px solid #E8E4DF;
  border-radius: 9px;
  padding: 0 12px;
  font-size: 0.88rem;
  font-family: inherit;
  color: #1a1a2e;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.mmb-input:focus {
  outline: none;
  border-color: #2C3E7A;
  box-shadow: 0 0 0 3px rgba(44,62,122,0.1);
}
.mmb-input::placeholder { color: #c8c3bc; }

.mmb-dims-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

/* Mode Toggle Button */
.mmb-mode-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #E8E4DF;
  background: #F7F5F2;
  color: #6b6860;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.mmb-mode-toggle:hover {
  background: #EDE9E3;
  color: #2C3E7A;
  border-color: #C8C3BC;
}
.mmb-mode-toggle:active { transform: scale(0.96); }
.mmb-mode-toggle svg { flex-shrink: 0; }

/* Color Presets */
.mmb-color-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.mmb-color-preset {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 2px solid transparent;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.mmb-color-preset:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}
.mmb-color-preset.active {
  border-color: #1a1a2e;
  transform: scale(1.12);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2C3E7A;
}

/* Custom Color Row */
.mmb-color-custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #F7F5F2;
  border-radius: 10px;
  border: 1px solid #E8E4DF;
}
.mmb-color-swatch-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.mmb-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid #E8E4DF;
  pointer-events: none;
}
.mmb-color-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}
.mmb-color-hex {
  font-size: 0.82rem;
  font-weight: 600;
  color: #3a3730;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.mmb-color-label {
  font-size: 0.72rem;
  color: #9a9590;
  margin-left: auto;
}

.mmb-modal-footer {
  display: flex;
  gap: 8px;
  padding: 14px 22px 20px;
  flex-shrink: 0;
  border-top: 1px solid #F0EDE8;
}
.mmb-cancel-btn {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid #E8E4DF;
  background: #fff;
  color: #6b6860;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.mmb-cancel-btn:hover { background: #F7F5F2; color: #1a1a2e; }
.mmb-save-btn {
  flex: 2;
  height: 42px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2C3E7A 0%, #1a2a5e 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(44,62,122,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  letter-spacing: 0.01em;
}
.mmb-save-btn:hover {
  box-shadow: 0 8px 20px rgba(44,62,122,0.4);
  transform: translateY(-1px);
}
.mmb-save-btn:active { transform: translateY(0); }
.mmb-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════
   Drum-Roller Picker — iPhone Wecker Style
   ═══════════════════════════════════════════════════════════════ */
.wdrum {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #F0EDE8;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.wdrum-wrap {
  height: 100%;
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.wdrum-wrap::-webkit-scrollbar { display: none; }
.wdrum-spacer { flex-shrink: 0; }
.wdrum-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #9a9590;
  transition: font-size 0.08s, font-weight 0.08s, color 0.08s;
  cursor: grab;
  padding-right: 20px;
}
.wdrum-bar {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 8px;
  background: rgba(44,62,122,0.08);
  border-top: 1px solid rgba(44,62,122,0.12);
  border-bottom: 1px solid rgba(44,62,122,0.12);
  pointer-events: none;
  z-index: 1;
}
.wdrum-fade {
  position: absolute;
  left: 0; right: 0;
  height: 38%;
  pointer-events: none;
  z-index: 2;
}
.wdrum-fade-t {
  top: 0;
  background: linear-gradient(to bottom, rgba(240,237,232,1) 0%, rgba(240,237,232,0) 100%);
}
.wdrum-fade-b {
  bottom: 0;
  background: linear-gradient(to top, rgba(240,237,232,1) 0%, rgba(240,237,232,0) 100%);
}
.wdrum-unit {
  position: absolute;
  right: 10px;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  color: #2C3E7A;
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.02em;
}

/* 3-column layout */
.mmb-wheels-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.mmb-wheel-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mmb-wheel-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9a9590;
  text-align: center;
}


