/* ==========================================================================
   BMW M-TECH LUXURY DESIGN SYSTEM // MEMOS ARCHIVE
   ========================================================================== */

:root {
  /* DARK THEME (DEFAULT) - Deep Obsidian & BMW Electric Blue */
  --bg-canvas: #090b0e;
  --bg-surface: #11151c;
  --bg-surface-elevated: #181d27;
  --bg-input: #0d1016;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-active: #1c69d4;
  
  --text-primary: #ffffff;
  --text-secondary: #9aa2b1;
  --text-muted: #5e6677;
  
  --bmw-blue: #0066b1;
  --bmw-blue-glow: rgba(0, 102, 177, 0.35);
  --bmw-m-red: #e0001a;
  --bmw-m-cyan: #0099ff;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 12px 36px rgba(0, 0, 0, 0.55);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] {
  /* LIGHT THEME - Precision Pure Silver & Minimalist Chrome */
  --bg-canvas: #f3f5f8;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-input: #ffffff;
  --border-subtle: #e2e6ed;
  --border-strong: #cbd2df;
  --border-active: #0066b1;
  
  --text-primary: #0f141c;
  --text-secondary: #525c6e;
  --text-muted: #8b95a5;
  
  --bmw-blue: #0066b1;
  --bmw-blue-glow: rgba(0, 102, 177, 0.18);
  
  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 12px 30px rgba(0, 0, 0, 0.09);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.bmw-app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 80px 24px;
}

/* ==========================================================================
   PRECISION HEADER
   ========================================================================== */

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

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bmw-emblem {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(from 0deg, var(--bmw-blue) 0deg 90deg, #ffffff 90deg 180deg, var(--bmw-blue) 180deg 270deg, #ffffff 270deg 360deg);
  box-shadow: 0 0 16px var(--bmw-blue-glow);
}

.bmw-emblem.sm {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px auto;
}

.emblem-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.bmw-sub-badge {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--bmw-blue);
  text-transform: uppercase;
}

.bmw-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  line-height: 1.2;
}

.title-accent {
  color: var(--bmw-blue);
}

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

.bmw-btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.bmw-btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-surface-elevated);
}

.bmw-btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.bmw-btn-outline:hover {
  border-color: var(--bmw-blue);
  color: var(--bmw-blue);
}

/* ==========================================================================
   COCKPIT CAPTURE DOCK
   ========================================================================== */

.bmw-cockpit {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

/* ==========================================================================
   COCKPIT AUTH LOCK OVERLAY (GUEST / VIEW-ONLY MODE)
   ========================================================================== */

.cockpit-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 11, 14, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

html[data-theme="light"] .cockpit-lock-overlay {
  background: rgba(243, 245, 248, 0.85);
}

.cockpit-lock-overlay.active {
  display: flex;
}

.lock-overlay-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 440px;
  gap: 12px;
}

.lock-overlay-icon {
  font-size: 26px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.lock-overlay-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.lock-overlay-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}


.cockpit-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.cockpit-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: var(--transition);
}

.tab-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
}

.cockpit-tab-btn.active {
  color: var(--text-primary);
}

.cockpit-tab-btn.active .tab-indicator {
  background: var(--bmw-blue);
  box-shadow: 0 0 8px var(--bmw-blue);
}

.cockpit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cockpit-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.input-wrapper {
  position: relative;
  min-width: 220px;
}

.input-url-wrapper .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.input-url-wrapper input {
  padding-left: 40px !important;
}

.bmw-input, .bmw-select, .bmw-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.bmw-input:focus, .bmw-select:focus, .bmw-textarea:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--bmw-blue-glow);
}

.bmw-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%239aa2b1' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.bmw-textarea {
  min-height: 72px;
  resize: vertical;
}

.cockpit-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.bmw-btn-primary {
  background: var(--bmw-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.bmw-btn-primary:hover {
  background: #0077ce;
  box-shadow: 0 4px 16px var(--bmw-blue-glow);
  transform: translateY(-1px);
}

.bmw-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   REAL-TIME PREVIEW CARD
   ========================================================================== */

.bmw-preview-card {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 10px;
  align-items: center;
  gap: 14px;
  animation: fadeIn 0.25s ease;
}

.bmw-preview-card.active {
  display: flex;
}

.preview-thumb-wrap {
  width: 80px;
  height: 56px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

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

.preview-content {
  flex: 1;
  overflow: hidden;
}

.preview-site-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--bmw-blue);
  text-transform: uppercase;
}

.preview-h-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ==========================================================================
   SUB BAR (CATEGORIES & SEARCH)
   ========================================================================== */

.bmw-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.bmw-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.bmw-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.bmw-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.bmw-pill.active {
  background: var(--bmw-blue);
  border-color: var(--bmw-blue);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--bmw-blue-glow);
}

.bmw-search-wrap {
  position: relative;
  min-width: 240px;
}

.search-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.bmw-search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 7px 12px 7px 34px;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.bmw-search-input:focus {
  border-color: var(--border-active);
}

/* ==========================================================================
   CARDS GRID & CARDS
   ========================================================================== */

.bmw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.bmw-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-subtle);
}

.bmw-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-elevated);
}

.bmw-card.pinned {
  border-color: var(--bmw-blue);
}

.bmw-card.pinned::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bmw-blue);
}

/* Card Media */
.card-media-box {
  position: relative;
  width: 100%;
  height: 190px;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-media-box:hover .card-img {
  transform: scale(1.04);
}

.media-badge-domain {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.media-open-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
}

.media-open-btn:hover {
  background: var(--bmw-blue);
  border-color: var(--bmw-blue);
}

/* Card Body */
.card-content-box {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-cat-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 13px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.tool-btn:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.tool-btn.pinned-on {
  color: var(--bmw-blue);
}

.tool-btn.delete:hover {
  color: var(--bmw-m-red);
}

.card-h-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.card-h-title:hover {
  color: var(--bmw-blue);
}

.card-p-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  white-space: pre-wrap;
}

.card-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.card-time-span {
  font-size: 11px;
  color: var(--text-muted);
}

.card-direct-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bmw-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-direct-link:hover {
  text-decoration: underline;
}

/* Memo Card Type */
.bmw-card.memo-card {
  border-left: 3px solid var(--bmw-m-cyan);
}

/* ==========================================================================
   MODAL & CATEGORY MANAGEMENT
   ========================================================================== */

.bmw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.bmw-modal-backdrop.active {
  display: flex;
}

.bmw-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: var(--shadow-elevated);
  animation: slideUp 0.2s ease;
}

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

.modal-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

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

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

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.cat-create-box {
  background: var(--bg-surface-elevated);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.cat-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bmw-color-picker {
  width: 38px;
  height: 38px;
  padding: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.cat-list {
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}

.cat-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cat-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.cat-del-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.cat-del-btn:hover {
  color: var(--bmw-m-red);
  background: rgba(224, 0, 26, 0.1);
}

/* Login Modal Specific */
.login-box {
  max-width: 380px;
  text-align: center;
}

.login-brand {
  margin-bottom: 24px;
}

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

.text-center {
  text-align: center;
  letter-spacing: 2px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.25s ease;
}

.toast.success { border-left: 3px solid var(--bmw-blue); }
.toast.error { border-left: 3px solid var(--bmw-m-red); }

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

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .bmw-app {
    padding: 16px 12px 60px 12px;
  }
  .cockpit-row {
    flex-direction: column;
  }
  .bmw-grid {
    grid-template-columns: 1fr;
  }
  .bmw-search-wrap {
    width: 100%;
  }
}
/* ==========================================================================
   LUXURY CONFIRM MODAL (NO BROWSER ALERTS)
   ========================================================================== */

.confirm-box {
  max-width: 400px;
  text-align: center;
  padding: 28px 24px;
}

.confirm-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(224, 0, 26, 0.1);
  border: 1px solid rgba(224, 0, 26, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  font-size: 24px;
}

.confirm-icon-box.info-mode {
  background: var(--bmw-blue-glow);
  border-color: rgba(0, 102, 177, 0.35);
}

.confirm-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  white-space: pre-line;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.bmw-btn-secondary {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.bmw-btn-secondary:hover {
  background: var(--border-subtle);
}

.bmw-btn-danger {
  flex: 1;
  background: var(--bmw-m-red);
  border: none;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(224, 0, 26, 0.3);
}

.bmw-btn-danger:hover {
  background: #ff1a35;
  transform: translateY(-1px);
}

.bmw-btn-danger.primary-mode {
  background: var(--bmw-blue);
  box-shadow: 0 4px 14px var(--bmw-blue-glow);
}

.bmw-btn-danger.primary-mode:hover {
  background: #0077ce;
}
/* ==========================================================================
   PASTED CLIPBOARD IMAGE PREVIEW & HIGH-RES LIGHTBOX
   ========================================================================== */

.pasted-image-wrap {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px dashed var(--bmw-blue);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.25s ease;
}

.pasted-image-wrap.active {
  display: flex;
}

.pasted-thumb-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

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

.pasted-thumb-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pasted-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--bmw-blue);
  text-transform: uppercase;
}

.pasted-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.pasted-remove-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: var(--transition);
}

.pasted-remove-btn:hover {
  color: var(--bmw-m-red);
  border-color: var(--bmw-m-red);
  background: rgba(224, 0, 26, 0.1);
}

/* Lightbox Modal */
.image-lightbox-backdrop {
  z-index: 2500;
}

.lightbox-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  animation: slideUp 0.2s ease;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.lightbox-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  padding: 12px;
  max-height: calc(90vh - 60px);
  overflow: auto;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-xs);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* Memo card with image */
.bmw-card.memo-with-image .card-media-box {
  height: 180px;
}