/* MyStuff design primitives: a collector's desk, not a generic dashboard. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --canvas: #f6f8fb;
  --surface: #ffffff;
  --surface-muted: #eef2f6;
  --ink: #14213a;
  --muted: #5f718d;
  --line: #d9e2ec;
  --radius-control: 0.625rem;
  --radius-surface: 1rem;
  --radius-feature: 1.25rem;
  --ease-ui: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

html.dark {
  --canvas: #090d16;
  --surface: #111827;
  --surface-muted: #182235;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --line: #263448;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--canvas);
  color: var(--ink);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms var(--ease-ui), color 180ms var(--ease-ui);
}

html:not(.dark) body { background-color: var(--canvas); color: var(--ink); }

/* Custom Sleek Scrollbars for WebKit & W3C Standard */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(51, 65, 85, 0.7) transparent;
}

html:not(.dark) * {
  scrollbar-color: rgba(148, 163, 184, 0.7) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.6);
  border-radius: 9999px;
  border: 1px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.8);
}

html:not(.dark) ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
}

html:not(.dark) ::-webkit-scrollbar-thumb:hover {
  background: rgba(8, 145, 178, 0.8);
}

/* Utility to completely hide scrollbars */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* Primary surfaces stay architectural: one clean edge, restrained elevation. */
.card-glass {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.32);
  border-radius: var(--radius-surface);
  transition: border-color 180ms var(--ease-ui), box-shadow 180ms var(--ease-ui), transform 180ms var(--ease-ui);
}

html.dark .card-glass {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(51, 65, 85, 0.82);
  box-shadow: 0 12px 26px -18px rgba(0, 0, 0, 0.72);
}

.card-glass:hover {
  box-shadow: 0 16px 28px -20px rgba(15, 23, 42, 0.36);
  border-color: #b9c7d8;
}

/* Collection atmosphere: one semantic accent is inherited by the active
   browsing context. It is deliberately a material treatment, not a glow. */
.collection-showcase {
  --collection-rgb: 6 182 212;
}

.collection-spotlight {
  display: grid;
  grid-template-columns: auto auto minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgb(var(--collection-rgb) / 0.28);
  border-left: 3px solid rgb(var(--collection-rgb));
  border-radius: 0.75rem;
  background: linear-gradient(90deg, rgb(var(--collection-rgb) / 0.11), rgb(15 23 42 / 0.72) 38%, rgb(15 23 42 / 0.72));
}

.collection-spotlight-logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.32));
}

.collection-spotlight-kicker {
  color: rgb(var(--collection-rgb));
  font-size: 0.625rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.collection-spotlight strong {
  color: #f8fafc;
  font-size: 0.875rem;
}

.collection-spotlight span:last-child {
  color: #94a3b8;
  font-size: 0.75rem;
  text-align: right;
}

.collection-showcase .collection-item-card:hover {
  border-color: rgb(var(--collection-rgb) / 0.65) !important;
  box-shadow: 0 16px 28px -18px rgb(var(--collection-rgb) / 0.35), 0 15px 30px -5px rgba(0, 0, 0, 0.42);
  transform: translateY(-2px);
}

.collection-showcase .item-view-indicator {
  background: rgb(var(--collection-rgb)) !important;
  box-shadow: none !important;
}

.collection-showcase .collection-context-tile:hover {
  border-color: rgb(var(--collection-rgb) / 0.62);
}

.collection-showcase .collection-context-tile:hover .collection-context-title,
.collection-showcase .collection-context-label {
  color: rgb(var(--collection-rgb));
}

.collection-showcase .collection-context-selected {
  border-color: rgb(var(--collection-rgb) / 0.75) !important;
  background: rgb(var(--collection-rgb) / 0.08) !important;
  box-shadow: inset 0 0 0 1px rgb(var(--collection-rgb) / 0.16);
}

html:not(.dark) .collection-spotlight {
  background: linear-gradient(90deg, rgb(var(--collection-rgb) / 0.1), #ffffff 42%, #ffffff);
}

html:not(.dark) .collection-spotlight strong { color: #0f172a; }
html:not(.dark) .collection-spotlight span:last-child { color: #475569; }

@media (max-width: 640px) {
  .collection-spotlight { grid-template-columns: 1fr; gap: 0.35rem; }
  .collection-spotlight span:last-child { text-align: left; }
}

/* Light Mode Text Overrides */
html:not(.dark) .text-white {
  color: #0f172a !important;
}
html:not(.dark) .text-slate-100 {
  color: #1e293b !important;
}
html:not(.dark) .text-slate-200 {
  color: #334155 !important;
}
html:not(.dark) .text-slate-300 {
  color: #334155 !important;
}
html:not(.dark) .text-slate-400 {
  color: #64748b !important;
}
html:not(.dark) .text-slate-500 {
  color: #64748b !important;
}
html:not(.dark) .bg-slate-900\/90,
html:not(.dark) .bg-slate-900\/80,
html:not(.dark) .bg-slate-900\/60,
html:not(.dark) .bg-slate-900,
html:not(.dark) .bg-slate-800\/90,
html:not(.dark) .bg-slate-800\/80,
html:not(.dark) .bg-slate-800\/60,
html:not(.dark) .bg-slate-800,
html:not(.dark) .bg-slate-700 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html:not(.dark) .bg-slate-950\/90,
html:not(.dark) .bg-slate-950\/85,
html:not(.dark) .bg-slate-950\/80,
html:not(.dark) .bg-slate-950\/60,
html:not(.dark) .bg-slate-950 {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html:not(.dark) .hover\:bg-slate-800:hover,
html:not(.dark) .hover\:bg-slate-700:hover,
html:not(.dark) .hover\:bg-slate-900:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html:not(.dark) .border-slate-800,
html:not(.dark) .border-slate-700 {
  border-color: #e2e8f0 !important;
}
html:not(.dark) .desktop-sidebar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}
html:not(.dark) .mobile-nav-bar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-top-color: #e2e8f0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
}
html:not(.dark) .mobile-nav-bar a:not([aria-current="page"]) {
  color: #64748b;
}

/* Authentication is a compact extension of the collector's desk: one calm,
   durable surface with the same semantic controls used in the application. */
[x-cloak] { display: none !important; }

.auth-shell {
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
}

.auth-frame {
  box-sizing: border-box;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.5rem;
}

.auth-panel {
  position: relative;
  width: min(100%, 31rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-feature);
  box-shadow: 0 20px 42px -30px rgba(15, 23, 42, 0.34);
}

.auth-panel--narrow { width: min(100%, 28rem); }

.auth-panel__topline {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #06b6d4;
}

.auth-header,
.auth-brand,
.auth-field__label-row,
.auth-footer {
  display: flex;
  align-items: center;
}

.auth-header { justify-content: space-between; gap: 1rem; }

.auth-brand {
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
}

.auth-brand__mark { width: 2.25rem; height: 2.25rem; }

.auth-brand strong,
.auth-brand small { display: block; }
.auth-brand strong { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.025em; }
.auth-brand small { margin-top: 0.1rem; color: var(--muted); font-size: 0.65rem; font-weight: 600; }

.theme-switcher {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.2rem;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

.theme-switcher button {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0.45rem;
  cursor: pointer;
  transition: color 160ms var(--ease-ui), background-color 160ms var(--ease-ui), box-shadow 160ms var(--ease-ui);
}

.theme-switcher button:hover { color: var(--ink); }
.theme-switcher button.is-active { color: #0891b2; background: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.13); }
.theme-switcher svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.auth-intro { margin: 2.4rem 0 1.75rem; }
.auth-eyebrow { margin: 0 0 0.45rem; color: #0891b2; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.auth-intro h1,
.auth-modal h2 { margin: 0; color: var(--ink); font-size: clamp(1.65rem, 5vw, 2rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.08; }
.auth-intro > p:last-child,
.auth-modal > p:not(.auth-eyebrow) { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.55; }

.auth-notice {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid;
  border-radius: var(--radius-control);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

.auth-notice svg { flex: 0 0 auto; width: 1rem; height: 1rem; margin-top: 0.05rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.auth-notice--error { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.auth-notice--success { color: #067647; background: #ecfdf3; border-color: #abefc6; }

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem;
  margin: 0 0 1.5rem;
  padding: 0.2rem;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

.auth-tabs button {
  min-height: 2.45rem;
  padding: 0.4rem 0.65rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0.45rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 160ms var(--ease-ui), background-color 160ms var(--ease-ui), box-shadow 160ms var(--ease-ui);
}

.auth-tabs button.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.auth-form { display: grid; gap: 1.1rem; }
.auth-field label { display: block; margin: 0 0 0.45rem; color: var(--ink); font-size: 0.73rem; font-weight: 750; }
.auth-field label span { color: var(--muted); font-weight: 500; }
.auth-field__label-row { justify-content: space-between; gap: 0.5rem; }
.auth-field__label-row label { margin-bottom: 0.45rem; }

.auth-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.8rem;
  padding: 0.65rem 0.8rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 160ms var(--ease-ui), box-shadow 160ms var(--ease-ui);
}

.auth-field input::placeholder { color: #94a3b8; }
.auth-field input:focus { border-color: #06b6d4; box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16); }
.auth-password-field { position: relative; }
.auth-password-field input { padding-right: 4rem; }
.auth-password-toggle { position: absolute; top: 50%; right: 0.35rem; padding: 0.4rem 0.5rem; color: #0891b2; background: transparent; border: 0; border-radius: 0.4rem; cursor: pointer; font-size: 0.7rem; font-weight: 800; transform: translateY(-50%); }
.auth-password-toggle:hover, .auth-link:hover { color: #0e7490; text-decoration: underline; }
.auth-link { padding: 0; color: #0891b2; background: transparent; border: 0; cursor: pointer; font-size: 0.72rem; font-weight: 700; }

.auth-primary-button,
.auth-secondary-button,
.auth-sso-button,
.auth-google-button {
  display: inline-flex;
  box-sizing: border-box;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms var(--ease-ui), background-color 160ms var(--ease-ui), border-color 160ms var(--ease-ui), box-shadow 160ms var(--ease-ui);
}

.auth-primary-button { color: #fff; background: #0891b2; border: 1px solid #0891b2; box-shadow: 0 8px 16px -12px rgba(8, 145, 178, 0.8); }
.auth-primary-button:hover { background: #0e7490; border-color: #0e7490; transform: translateY(-1px); }
.auth-sso-button, .auth-secondary-button { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.auth-sso-button:hover, .auth-secondary-button:hover { border-color: #67e8f9; background: var(--surface-muted); }
.auth-sso-button svg { width: 1rem; height: 1rem; fill: none; stroke: #0891b2; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.auth-google-button { color: #1f1f1f; background: #fff; border: 1px solid #747775; font-family: Roboto, Arial, sans-serif; font-size: 0.875rem; font-weight: 500; }
.auth-google-button:hover { background: #f8faff; border-color: #747775; box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3); }
.auth-google-button__mark { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; }
.auth-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.25rem 0; color: var(--muted); font-size: 0.68rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-registry-note { margin: 1.5rem 0 0; padding: 0.8rem 0.9rem; color: var(--muted); background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius-control); font-size: 0.78rem; line-height: 1.5; }
.auth-footer { justify-content: center; gap: 0.45rem; margin-top: 2rem; color: var(--muted); font-size: 0.65rem; font-weight: 650; }

.auth-modal-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; padding: 1.5rem; place-items: center; background: rgba(9, 13, 22, 0.5); }
.auth-modal { width: min(100%, 25rem); padding: 1.5rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-surface); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.5); }
.auth-modal h2 { font-size: 1.35rem; }
.auth-modal__close { float: right; width: 2rem; height: 2rem; color: var(--muted); background: transparent; border: 0; border-radius: 0.4rem; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.auth-modal__close:hover { color: var(--ink); background: var(--surface-muted); }
.auth-modal .auth-secondary-button { margin-top: 1.35rem; }

html.dark .auth-panel { box-shadow: 0 22px 42px -30px rgba(0, 0, 0, 0.82); }
html.dark .theme-switcher button.is-active,
html.dark .auth-tabs button.is-active { background: #1e293b; box-shadow: none; }
html.dark .auth-notice--error { color: #fda29b; background: rgba(127, 29, 29, 0.28); border-color: rgba(248, 113, 113, 0.38); }
html.dark .auth-notice--success { color: #6ce9a6; background: rgba(6, 78, 59, 0.33); border-color: rgba(52, 211, 153, 0.35); }
html.dark .auth-primary-button { color: #062b35; background: #67e8f9; border-color: #67e8f9; }
html.dark .auth-primary-button:hover { background: #a5f3fc; border-color: #a5f3fc; }
html.dark .auth-sso-button:hover, html.dark .auth-secondary-button:hover { border-color: #155e75; background: #182235; }
html.dark .auth-google-button { color: #e3e3e3; background: #131314; border-color: #8e918f; }
html.dark .auth-google-button:hover { background: #2d2f31; border-color: #8e918f; }
html.dark .auth-field input { background: #0d1523; }
html.dark .auth-password-toggle, html.dark .auth-link, html.dark .theme-switcher button.is-active { color: #67e8f9; }

@media (max-width: 420px) {
  .auth-frame { padding: 0.9rem; }
  .auth-panel { padding: 1.35rem; }
  .auth-intro { margin-top: 2rem; }
  .auth-footer { flex-wrap: wrap; }
}

/* High Contrast Light Mode Nav Links, Badges & Form Controls */
html:not(.dark) .text-amber-300,
html:not(.dark) .text-amber-400,
html:not(.dark) .text-amber-500 {
  color: #92400e !important;
}
html:not(.dark) .text-cyan-300,
html:not(.dark) .text-cyan-400,
html:not(.dark) .text-cyan-500 {
  color: #0e7490 !important;
}
html:not(.dark) .text-purple-300,
html:not(.dark) .text-purple-400,
html:not(.dark) .text-purple-500,
html:not(.dark) .text-violet-300,
html:not(.dark) .text-violet-400,
html:not(.dark) .text-violet-500 {
  color: #6b21a8 !important;
}
html:not(.dark) .text-emerald-300,
html:not(.dark) .text-emerald-400,
html:not(.dark) .text-emerald-500 {
  color: #065f46 !important;
}
html:not(.dark) .text-blue-300,
html:not(.dark) .text-blue-400,
html:not(.dark) .text-blue-500 {
  color: #1e40af !important;
}
html:not(.dark) .text-orange-300,
html:not(.dark) .text-orange-400,
html:not(.dark) .text-orange-500 {
  color: #9a3412 !important;
}

html:not(.dark) select,
html:not(.dark) input[type="text"],
html:not(.dark) input[type="number"],
html:not(.dark) input[type="url"],
html:not(.dark) textarea {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}
html:not(.dark) select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

html:not(.dark) input:disabled {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
  opacity: 1 !important;
}

/* Light Mode Hover Overrides (Prevents Dark Mode Hover Styles in Light Mode) */
html:not(.dark) .card-glass:hover {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .hover\:bg-slate-950:hover,
html:not(.dark) .hover\:bg-slate-900:hover,
html:not(.dark) .hover\:bg-slate-800:hover,
html:not(.dark) .hover\:bg-slate-700:hover,
html:not(.dark) .hover\:bg-slate-900\/80:hover,
html:not(.dark) .hover\:bg-slate-900\/60:hover,
html:not(.dark) .hover\:bg-slate-800\/80:hover,
html:not(.dark) .hover\:bg-slate-800\/60:hover,
html:not(.dark) .hover\:bg-slate-800\/40:hover {
  background-color: #e2e8f0 !important;
}

html:not(.dark) .hover\:border-slate-800:hover,
html:not(.dark) .hover\:border-slate-700:hover,
html:not(.dark) .hover\:border-slate-600:hover {
  border-color: #cbd5e1 !important;
}

html:not(.dark) .hover\:border-cyan-500\/40:hover,
html:not(.dark) .hover\:border-cyan-500\/50:hover,
html:not(.dark) .hover\:border-cyan-500\/60:hover,
html:not(.dark) .hover\:border-cyan-400:hover {
  border-color: #0891b2 !important;
}

html:not(.dark) .hover\:text-white:hover,
html:not(.dark) .hover\:text-slate-100:hover,
html:not(.dark) .hover\:text-slate-200:hover {
  color: #0f172a !important;
}

html:not(.dark) .hover\:text-slate-300:hover,
html:not(.dark) .hover\:text-slate-400:hover {
  color: #1e293b !important;
}

html:not(.dark) .group:hover .group-hover\:text-white {
  color: #0f172a !important;
}
html:not(.dark) .group:hover .group-hover\:text-cyan-400 {
  color: #0891b2 !important;
}
html:not(.dark) .group:hover .group-hover\:text-amber-300 {
  color: #b45309 !important;
}
html:not(.dark) .group:hover .group-hover\:text-slate-300 {
  color: #1e293b !important;
}

/* 100% Opaque Mobile Profile Menu Drawer */
.mobile-drawer-overlay {
  background-color: #030712 !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

html:not(.dark) .mobile-drawer-overlay {
  background-color: rgba(15, 23, 42, 0.85) !important;
}

.mobile-account-drawer {
  background-color: #0b0f19 !important;
  background: #0b0f19 !important;
  border-left: 1px solid #1e293b !important;
  opacity: 1 !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8) !important;
}

html:not(.dark) .mobile-account-drawer {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-left: 1px solid #e2e8f0 !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15) !important;
}

.mobile-account-drawer .drawer-card {
  background-color: #0f172a !important;
  border: 1px solid #1e293b !important;
}

html:not(.dark) .mobile-account-drawer .drawer-card {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

/* Autofill Fixes to prevent white boxes in Chrome/Safari */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: #f8fafc !important;
  -webkit-box-shadow: 0 0 0px 1000px #090d16 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Light Mode autofill override — prevents invisible white-on-white text */
html:not(.dark) input:-webkit-autofill,
html:not(.dark) input:-webkit-autofill:hover,
html:not(.dark) input:-webkit-autofill:focus,
html:not(.dark) select:-webkit-autofill,
html:not(.dark) select:-webkit-autofill:hover,
html:not(.dark) select:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a !important;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}

/* Dark Inputs & Controls */
.input-dark {
  width: 100%;
  background: rgba(9, 13, 22, 0.95) !important;
  border: 1px solid rgba(51, 65, 85, 0.8) !important;
  color: #f8fafc !important;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3) !important;
}

.input-dark:focus {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25), inset 0 2px 4px 0 rgba(0, 0, 0, 0.3) !important;
}

#inventory-search-input,
.input-search {
  width: 100% !important;
  background-color: rgba(9, 13, 22, 0.95) !important;
  color: #f8fafc !important;
  padding-left: 2.75rem !important;
  padding-right: 2.5rem !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
  border-radius: 0.75rem !important;
  border: 1px solid rgba(51, 65, 85, 0.8) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#inventory-search-input::placeholder,
.input-search::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

#inventory-search-input:focus,
.input-search:focus {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25), inset 0 2px 4px 0 rgba(0, 0, 0, 0.3) !important;
}

html:not(.dark) #inventory-search-input,
html:not(.dark) .input-search,
html:not(.dark) .input-dark {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) #inventory-search-input::placeholder,
html:not(.dark) .input-search::placeholder,
html:not(.dark) .input-dark::placeholder {
  color: #64748b !important;
}

/* Category admin: subcategories are an editable list, not a stack of cards.
   Keeping the controls on a common baseline makes a dense taxonomy legible
   without the nested borders and excess interior padding. */
.taxonomy-category-card {
  min-width: 0;
}

.taxonomy-subcategory-list {
  scrollbar-gutter: stable;
}

.taxonomy-subcategory-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.64);
  transition: border-color 180ms var(--ease-ui), background-color 180ms var(--ease-ui);
}

.taxonomy-subcategory-row:first-child {
  border-top: 1px solid rgba(51, 65, 85, 0.64);
}

.taxonomy-subcategory-row:hover {
  border-color: rgba(6, 182, 212, 0.36);
}

.taxonomy-subcategory-input {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid transparent !important;
  border-radius: 0.375rem;
  background: transparent !important;
  color: #e2e8f0;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25rem;
  outline: none;
  transition: border-color 180ms var(--ease-ui), background-color 180ms var(--ease-ui), color 180ms var(--ease-ui);
}

.taxonomy-subcategory-input:hover {
  background: rgba(30, 41, 59, 0.38) !important;
}

.taxonomy-subcategory-input:focus {
  border-color: rgba(6, 182, 212, 0.65) !important;
  background: rgba(2, 6, 23, 0.6) !important;
  color: #a5f3fc;
}

.taxonomy-subcategory-items {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.375rem;
  color: #67e8f9;
  padding: 0.375rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  transition: color 180ms var(--ease-ui), background-color 180ms var(--ease-ui);
}

.taxonomy-subcategory-items:hover {
  background: rgba(6, 182, 212, 0.12);
  color: #cffafe;
}

.taxonomy-subcategory-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.375rem;
  color: #64748b;
  opacity: 0;
  transition: color 180ms var(--ease-ui), background-color 180ms var(--ease-ui), opacity 180ms var(--ease-ui);
}

.taxonomy-subcategory-row:hover .taxonomy-subcategory-delete,
.taxonomy-subcategory-delete:focus-visible {
  opacity: 1;
}

.taxonomy-subcategory-delete:hover {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
}

.taxonomy-subcategory-create {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
}

.input-dark.taxonomy-subcategory-create-input {
  min-width: 0;
  padding: 0.5625rem 0.75rem;
  border-radius: var(--radius-control) !important;
  font-size: 0.8125rem !important;
}

.taxonomy-subcategory-create-button {
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: var(--radius-control);
  background: rgba(30, 41, 59, 0.86);
  color: #e2e8f0;
  padding: 0.5625rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25rem;
  transition: border-color 180ms var(--ease-ui), background-color 180ms var(--ease-ui), color 180ms var(--ease-ui);
}

.taxonomy-subcategory-create-button:hover {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.12);
  color: #a5f3fc;
}

html:not(.dark) .taxonomy-subcategory-row,
html:not(.dark) .taxonomy-subcategory-row:first-child,
html:not(.dark) .taxonomy-subcategory-create {
  border-color: #d9e2ec;
}

html:not(.dark) input.taxonomy-subcategory-input {
  border-color: transparent !important;
  background: transparent !important;
  color: #14213a;
}
html:not(.dark) input.taxonomy-subcategory-input:hover { background: #f6f8fb !important; }
html:not(.dark) input.taxonomy-subcategory-input:focus {
  border-color: rgba(6, 182, 212, 0.65) !important;
  background: #fff !important;
  color: #0e7490;
}
html:not(.dark) .taxonomy-subcategory-items { color: #0e7490; }
html:not(.dark) .taxonomy-subcategory-items:hover { background: #ecfeff; color: #155e75; }
html:not(.dark) .taxonomy-subcategory-delete { color: #64748b; }
html:not(.dark) .taxonomy-subcategory-delete:hover { background: #fff1f2; color: #e11d48; }
html:not(.dark) .taxonomy-subcategory-create-button {
  border-color: #d9e2ec;
  background: #f1f5f9;
  color: #14213a;
}
html:not(.dark) .taxonomy-subcategory-create-button:hover { background: #ecfeff; color: #155e75; }

@media (hover: none) {
  .taxonomy-subcategory-delete { opacity: 1; }
}

/* Buttons */
.btn-primary, .btn-cyan {
  background: #06b6d4 !important;
  color: #082f49 !important;
  font-weight: 700 !important;
  padding: 0.625rem 1.25rem !important;
  border-radius: var(--radius-control) !important;
  border: 1px solid #06b6d4 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  transition: background-color 180ms var(--ease-ui), border-color 180ms var(--ease-ui), transform 180ms var(--ease-ui) !important;
  box-shadow: 0 3px 8px -5px rgba(8, 47, 73, 0.45) !important;
}

.btn-primary:hover, .btn-cyan:hover {
  background: #22d3ee !important;
  color: #082f49 !important;
  border-color: #22d3ee !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 14px -8px rgba(8, 47, 73, 0.48) !important;
}

.btn-primary:active, .btn-cyan:active {
  transform: scale(0.98) !important;
}

.btn-primary svg, .btn-cyan svg, .btn-secondary svg, .btn-ai svg {
  color: inherit !important;
  stroke: currentColor !important;
}

.btn-ai {
  background: rgba(139, 92, 246, 0.1) !important;
  color: #7c3aed !important;
  font-weight: 700 !important;
  padding: 0.625rem 1.25rem !important;
  border-radius: var(--radius-control) !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  transition: background-color 180ms var(--ease-ui), border-color 180ms var(--ease-ui), transform 180ms var(--ease-ui) !important;
  box-shadow: none !important;
}

.btn-ai:hover {
  background: #8b5cf6 !important;
  color: #ffffff !important;
  border-color: #8b5cf6 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px 0 rgba(139, 92, 246, 0.35) !important;
}

.btn-secondary {
  background: var(--surface-muted) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  font-weight: 600 !important;
  padding: 0.625rem 1.25rem !important;
  border-radius: var(--radius-control) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  transition: background-color 180ms var(--ease-ui), border-color 180ms var(--ease-ui), color 180ms var(--ease-ui) !important;
}

.btn-secondary:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #b9c7d8 !important;
}

html.dark .btn-secondary {
  background: rgba(30, 41, 59, 0.88) !important;
  color: #f1f5f9 !important;
  border-color: rgba(71, 85, 105, 0.88) !important;
}

html.dark .btn-secondary:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  color: #ffffff !important;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  font-weight: 600 !important;
  padding: 0.625rem 1.25rem !important;
  border-radius: 0.75rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  transition: all 0.2s ease !important;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #ef4444 !important;
}

html:not(.dark) .btn-danger {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
}

html:not(.dark) .btn-danger:hover {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #f87171 !important;
}

html:not(.dark) tr:hover {
  background-color: rgba(241, 245, 249, 0.9) !important;
}

/* Badges */
.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Mobile & Desktop Responsive Views */
.main-content {
  padding: 1rem 1.25rem 5rem 1.25rem;
}

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 50;
  }
}

@media (min-width: 769px) {
  .mobile-only { display: none !important; }
  .desktop-sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(51, 65, 85, 0.8);
    padding: 1.25rem;
    z-index: 40;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  }
  .desktop-sidebar.is-collapsed {
    width: 76px;
    padding: 1.25rem 0.5rem;
  }
  .main-content {
    margin-left: 260px;
    padding: 2rem;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .main-content.sidebar-collapsed {
    margin-left: 76px;
  }
}

/* Capture Inbox is Field Mode: focused and fast, while still unmistakably MyStuff. */
.capture-inbox {
  background: var(--canvas);
  color: var(--ink);
}

.capture-inbox-header,
.capture-inbox-footer {
  background: #0f172a !important;
  border-color: #263448 !important;
}

@media (max-width: 767px) {
  .capture-inbox-footer {
    /* Keep the final action clear of iOS/Android browser chrome and home indicators. */
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }
}

.capture-inbox-header .text-white,
.capture-inbox-footer .text-white {
  color: #f8fafc !important;
}

.capture-inbox-header .text-slate-400,
.capture-inbox-footer .text-slate-500 {
  color: #94a3b8 !important;
}

.capture-inbox .capture-panel {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.34);
  border-radius: var(--radius-surface);
}

.capture-inbox .capture-action-grid {
  border-color: var(--line);
  background: var(--line);
  border-radius: var(--radius-surface);
}

html:not(.dark) .capture-inbox .capture-action-grid > * {
  background: var(--surface) !important;
}

html:not(.dark) .capture-inbox .text-white { color: #14213a !important; }
html:not(.dark) .capture-inbox .text-slate-300 { color: #334155 !important; }
html:not(.dark) .capture-inbox .text-slate-400,
html:not(.dark) .capture-inbox .text-slate-500 { color: #60708a !important; }
html:not(.dark) .capture-inbox .bg-slate-900,
html:not(.dark) .capture-inbox .bg-slate-900\/90,
html:not(.dark) .capture-inbox .bg-slate-950 { background-color: var(--surface) !important; }

/* Capture keeps its header and save bar dark in every theme. Reassert their
   foreground colors after the global light-mode utility overrides above. */
html:not(.dark) .capture-inbox-header .text-white,
html:not(.dark) .capture-inbox-footer .text-white {
  color: #f8fafc !important;
}

html:not(.dark) .capture-inbox-footer .text-slate-500 {
  color: #cbd5e1 !important;
}

/* A duplicate review is a decision surface. Keep the amber context without
   sacrificing text or action contrast on the light collector canvas. */
.capture-duplicate-review {
  background: #fffbeb;
  border-color: #fbbf24;
}

.capture-duplicate-review-icon,
.capture-duplicate-review-message {
  color: #78350f;
}

.capture-duplicate-badge {
  border: 1px solid;
}

.capture-duplicate-badge-review {
  background: #fffbeb;
  border-color: #d97706;
  color: #78350f;
}

.capture-duplicate-badge-copy {
  background: #ecfdf5;
  border-color: #059669;
  color: #065f46;
}

.capture-duplicate-badge-skip {
  background: #fff1f2;
  border-color: #e11d48;
  color: #9f1239;
}

.capture-duplicate-keep,
.capture-duplicate-skip {
  border: 1px solid;
  background: #ffffff;
}

.capture-duplicate-keep {
  border-color: #059669;
  color: #065f46;
}

.capture-duplicate-skip {
  border-color: #e11d48;
  color: #9f1239;
}

.capture-duplicate-keep:hover { background: #ecfdf5; }
.capture-duplicate-skip:hover { background: #fff1f2; }

html.dark .capture-duplicate-review {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(245, 158, 11, 0.58);
}

html.dark .capture-duplicate-review-icon,
html.dark .capture-duplicate-review-message { color: #fde68a; }

html.dark .capture-duplicate-badge-review {
  background: rgba(120, 53, 15, 0.36);
  border-color: rgba(245, 158, 11, 0.68);
  color: #fde68a;
}

html.dark .capture-duplicate-badge-copy {
  background: rgba(6, 95, 70, 0.32);
  border-color: rgba(52, 211, 153, 0.72);
  color: #a7f3d0;
}

html.dark .capture-duplicate-badge-skip {
  background: rgba(159, 18, 57, 0.3);
  border-color: rgba(251, 113, 133, 0.72);
  color: #fecdd3;
}

html.dark .capture-duplicate-keep {
  border-color: rgba(52, 211, 153, 0.72);
  background: rgba(6, 95, 70, 0.28);
  color: #a7f3d0;
}

html.dark .capture-duplicate-skip {
  border-color: rgba(251, 113, 133, 0.72);
  background: rgba(159, 18, 57, 0.25);
  color: #fecdd3;
}

.item-view-selector {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-muted);
}

html.dark .item-view-selector { background: #0b1220; border-color: #334155; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* Printable Thermal QR Code Label Stylesheet (1"x1" and 2"x1" sticker sizes) */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .desktop-sidebar, .mobile-nav-bar, .mobile-only, header, .no-print {
    display: none !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  .qr-label-sticker {
    width: 2in;
    height: 1in;
    border: 1px solid #000;
    padding: 0.1in;
    display: flex;
    align-items: center;
    justify-content: space-between;
    page-break-inside: avoid;
    font-family: sans-serif;
  }
  .qr-label-sticker img {
    width: 0.8in;
    height: 0.8in;
  }
  .qr-label-details {
    flex: 1;
    margin-left: 0.1in;
    font-size: 8pt;
    line-height: 1.1;
  }
  .qr-label-title {
    font-weight: bold;
    font-size: 9pt;
    margin-bottom: 2px;
  }
}

/* HTMX Progress Indicators & Overlay Modals */
.htmx-indicator {
  display: none !important;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: flex !important;
}
.htmx-request .htmx-hide-on-request,
.htmx-request.htmx-hide-on-request,
form.htmx-request .htmx-hide-on-request,
button.htmx-request .htmx-hide-on-request,
form.htmx-request .action-image-idle,
button.htmx-request .action-image-idle {
  display: none !important;
}

/* ============================================
   Respect OS-level Reduce Motion preference
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Keep critical HTMX spinner visible but instant */
  .animate-spin {
    animation: none !important;
  }
  .animate-pulse {
    animation: none !important;
  }

  /* Disable sidebar slide transition */
  .desktop-sidebar {
    transition: none !important;
  }
  .main-content {
    transition: none !important;
  }

  /* Disable button lift effect */
  .btn-primary:hover,
  .btn-cyan:hover {
    transform: none !important;
  }

  /* Disable card-glass hover transform */
  .card-glass {
    transition: none !important;
  }
}

/* Markdown Content Styles for Item Notes, Details & AI Advisor */
.markdown-content {
  color: #cbd5e1;
  line-height: 1.625;
}
.markdown-content p {
  margin-bottom: 0.65rem;
}
.markdown-content p:last-child {
  margin-bottom: 0;
}

/* Headings */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}
.markdown-content h1 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  letter-spacing: -0.01em;
}
.markdown-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0.85rem;
  margin-bottom: 0.4rem;
  color: #f1f5f9;
}
.markdown-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  color: #e2e8f0;
}
.markdown-content h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.65rem;
  margin-bottom: 0.3rem;
  color: #94a3b8;
}

/* Lists */
.markdown-content ul:not(.admonition ul) {
  list-style-type: disc;
  padding-left: 1.35rem;
  margin-top: 0.35rem;
  margin-bottom: 0.65rem;
}
.markdown-content ol:not(.admonition ol) {
  list-style-type: decimal;
  padding-left: 1.35rem;
  margin-top: 0.35rem;
  margin-bottom: 0.65rem;
}
.markdown-content li {
  margin-bottom: 0.25rem;
}
.markdown-content li::marker {
  color: #06b6d4;
}

/* Task Checklists */
.markdown-content .task-list-item {
  list-style: none !important;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-left: 0;
  margin-bottom: 0.35rem;
}
.markdown-content .task-list-item input[type="checkbox"] {
  accent-color: #06b6d4;
  cursor: default;
  margin-top: 0.25rem;
  border-radius: 0.25rem;
}

/* Blockquotes */
.markdown-content blockquote {
  border-left: 3px solid #06b6d4;
  background-color: rgba(15, 23, 42, 0.6);
  padding: 0.6rem 1rem;
  margin: 0.75rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
  color: #cbd5e1;
  font-style: italic;
}
.markdown-content blockquote p {
  margin-bottom: 0;
}

/* Admonitions / Callout Boxes */
.admonition {
  border-radius: 0.75rem;
  margin: 0.75rem 0;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.7);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}
.admonition-note {
  border-color: rgba(56, 189, 248, 0.4);
  border-left: 4px solid #38bdf8;
  background: rgba(12, 74, 110, 0.15);
}
.admonition-note .admonition-title {
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.85);
}
.admonition-tip {
  border-color: rgba(16, 185, 129, 0.4);
  border-left: 4px solid #10b981;
  background: rgba(6, 78, 59, 0.15);
}
.admonition-tip .admonition-title {
  color: #10b981;
  background: rgba(15, 23, 42, 0.85);
}
.admonition-warning {
  border-color: rgba(245, 158, 11, 0.4);
  border-left: 4px solid #f59e0b;
  background: rgba(120, 53, 15, 0.15);
}
.admonition-warning .admonition-title {
  color: #f59e0b;
  background: rgba(15, 23, 42, 0.85);
}
.admonition-danger {
  border-color: rgba(244, 63, 94, 0.4);
  border-left: 4px solid #f43f5e;
  background: rgba(136, 19, 55, 0.15);
}
.admonition-danger .admonition-title {
  color: #f43f5e;
  background: rgba(15, 23, 42, 0.85);
}
.admonition-important {
  border-color: rgba(168, 85, 247, 0.4);
  border-left: 4px solid #a855f7;
  background: rgba(88, 28, 135, 0.15);
}
.admonition-important .admonition-title {
  color: #a855f7;
  background: rgba(15, 23, 42, 0.85);
}
.admonition-quote {
  border-color: rgba(6, 182, 212, 0.4);
  border-left: 4px solid #06b6d4;
  background: rgba(8, 51, 68, 0.15);
}
.admonition-quote .admonition-title {
  color: #06b6d4;
  background: rgba(15, 23, 42, 0.85);
}
.admonition-example {
  border-color: rgba(20, 184, 166, 0.4);
  border-left: 4px solid #14b8a6;
  background: rgba(19, 78, 74, 0.15);
}
.admonition-example .admonition-title {
  color: #14b8a6;
  background: rgba(15, 23, 42, 0.85);
}
.admonition-collapsible summary {
  cursor: pointer;
  list-style: none;
}
.admonition-collapsible summary::-webkit-details-marker {
  display: none;
}
.admonition-collapsible[open] .admonition-arrow {
  transform: rotate(180deg);
}
.admonition-content {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}
.admonition-content p:last-child {
  margin-bottom: 0;
}

/* Tables */
.markdown-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.markdown-table th {
  background-color: rgba(15, 23, 42, 0.9);
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.markdown-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  color: #cbd5e1;
  font-size: 0.825rem;
}
.markdown-table tr:hover td {
  background-color: rgba(51, 65, 85, 0.2);
}

/* Divider */
.markdown-content hr {
  border: 0;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  margin-top: 0.85rem;
  margin-bottom: 0.85rem;
}
.markdown-content strong {
  font-weight: 700;
  color: #f1f5f9;
}
.markdown-content em {
  font-style: italic;
  color: #e2e8f0;
}
.markdown-content del {
  text-decoration: line-through;
  color: #64748b;
}

/* Code & Pre */
.markdown-content pre {
  background-color: #030712;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.825rem;
  color: #f1f5f9;
}
.markdown-content code {
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #38bdf8;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.markdown-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Links */
.markdown-content a {
  color: #06b6d4;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.markdown-content a:hover {
  color: #38bdf8;
}

/* Images */
.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.6);
  margin: 0.5rem 0;
}

/* Video Embeds */
.video-embed-container {
  position: relative;
  width: 100%;
  margin: 0.85rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background-color: #020617;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}
.video-embed-container.aspect-video {
  aspect-ratio: 16 / 9;
}

/* ==============================================================================
   3D Coverflow Carousel Control Styling
   ============================================================================== */
.coverflow-root {
  user-select: none;
  -webkit-user-select: none;
}

.coverflow-stage {
  perspective: 1100px;
  -webkit-perspective: 1100px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  touch-action: none;
}

.coverflow-track {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.coverflow-card {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity, z-index;
  box-shadow: none !important;
  background: transparent !important;
}

.coverflow-card-active {
  box-shadow: none !important;
}

.coverflow-card-active .flyer-photo-frame {
  border-color: rgba(6, 182, 212, 0.9) !important;
  box-shadow: 0 20px 48px -6px rgba(0, 0, 0, 0.95), 0 0 32px rgba(6, 182, 212, 0.4) !important;
}

.coverflow-card-active h3 {
  color: #0891b2 !important; /* cyan-600 in light mode */
}

.dark .coverflow-card-active h3 {
  color: #67e8f9 !important; /* cyan-300 in dark mode */
}

.coverflow-stage-immersive {
  height: clamp(400px, calc(100vh - 7.5rem), 780px);
  flex: 0 0 clamp(400px, calc(100vh - 7.5rem), 780px);
}

.coverflow-card-immersive {
  width: min(80vw, clamp(260px, calc(100vh - 14rem), 480px));
  height: auto;
}

@media (min-width: 769px) {
  .coverflow-root--viewport-fit .coverflow-stage-immersive {
    height: var(--coverflow-stage-height, clamp(400px, calc(100vh - 7.5rem), 780px));
    flex-basis: var(--coverflow-stage-height, clamp(400px, calc(100vh - 7.5rem), 780px));
  }

  .coverflow-root--viewport-fit .coverflow-card-immersive {
    width: min(80vw, var(--coverflow-card-size, clamp(260px, calc(100vh - 14rem), 480px)));
  }
}

.flyer-photo-frame {
  background-color: #020617 !important;
  border-color: rgba(30, 41, 59, 0.8) !important;
}

.coverflow-nav-btn {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #1e293b !important;
  border-color: rgba(203, 213, 225, 0.8) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.coverflow-nav-btn:hover:not(:disabled) {
  color: #0891b2 !important;
  border-color: rgba(6, 182, 212, 0.6) !important;
  transform: translateY(-50%) scale(1.08);
}

.coverflow-nav-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.95);
}

.dark .coverflow-nav-btn {
  background: rgba(15, 23, 42, 0.9) !important;
  color: #cbd5e1 !important;
  border-color: rgba(51, 65, 85, 0.8) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
}

.dark .coverflow-nav-btn:hover:not(:disabled) {
  color: #22d3ee !important;
  border-color: rgba(6, 182, 212, 0.6) !important;
}
