/* ─────────────────────────────────────────────────────────────
   MyZinky Design System
   Stack: Bootstrap 5.3.3 + Bootstrap Icons + custom (this file)
───────────────────────────────────────────────────────────── */

/* ── Design tokens ── */
:root {
  --mz-green:      #22c55e;
  --mz-green-dk:   #16a34a;
  --mz-green-lt:   #dcfce7;
  --mz-navy:       #111827;
  --mz-navy2:      #1f2937;
  --mz-text:       #111827;
  --mz-muted:      #6b7280;
  --mz-border:     #e5e7eb;
  --mz-bg:         #f3f4f6;
  --mz-surface:    #ffffff;
  --mz-sidebar-w:  220px;
  --mz-topnav-h:   60px;
  --mz-radius:     10px;
  --mz-radius-sm:  6px;
  --mz-shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --mz-shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --mz-shadow-lg:  0 10px 25px rgba(0,0,0,.12), 0 4px 6px rgba(0,0,0,.06);
}

/* ── Base reset ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--mz-bg);
  color: var(--mz-text);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ── Brand mark ── */
.mz-brand {
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -.5px;
  line-height: 1;
}
.mz-brand .mz-my     { color: #fff; }
.mz-brand .mz-zinky  { color: var(--mz-green); }

/* ── Top navigation bar ── */
.mz-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--mz-topnav-h);
  background: var(--mz-navy);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
}
.mz-topnav-links {
  display: flex;
  gap: .15rem;
  flex: 1;
  justify-content: center;
}
.mz-topnav-link {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: var(--mz-radius-sm);
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.mz-topnav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.mz-topnav-link.active { color: #fff; background: rgba(255,255,255,.12); }

.mz-topnav-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

.mz-topnav-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--mz-green);
  color: var(--mz-navy);
  font-size: .8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.mz-topnav-avatar:hover { background: var(--mz-green-dk); color: #fff; }

.mz-icon-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.65);
  font-size: 1.1rem;
  cursor: pointer;
  padding: .35rem .5rem;
  border-radius: var(--mz-radius-sm);
  transition: color .15s, background .15s;
  display: flex; align-items: center;
}
.mz-icon-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ── Buttons ── */
.btn-mz-primary {
  background: var(--mz-green);
  color: var(--mz-navy);
  border: none;
  border-radius: var(--mz-radius-sm);
  font-weight: 600;
  font-size: .875rem;
  padding: .5rem 1.1rem;
  cursor: pointer;
  transition: background .15s, transform .1s, color .15s;
  display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none;
  line-height: 1;
}
.btn-mz-primary:hover { background: var(--mz-green-dk); color: #fff; transform: translateY(-1px); }

.btn-mz-outline {
  background: transparent;
  color: var(--mz-text);
  border: 1.5px solid var(--mz-border);
  border-radius: var(--mz-radius-sm);
  font-weight: 500;
  font-size: .875rem;
  padding: .45rem 1rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none;
  line-height: 1;
}
.btn-mz-outline:hover { border-color: var(--mz-green); background: var(--mz-green-lt); color: var(--mz-green-dk); }

.btn-mz-danger {
  background: #dc2626; color: #fff;
  border: 1.5px solid #dc2626;
  border-radius: var(--mz-radius-sm);
  font-weight: 500; font-size: .875rem;
  padding: .45rem 1rem; cursor: pointer;
  transition: background .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none; line-height: 1;
}
.btn-mz-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-mz-danger:disabled { opacity: .6; cursor: not-allowed; }

/* ── Kebab button ── */
.mz-kebab-btn {
  background: none; border: none; padding: .15rem .3rem;
  cursor: pointer; color: var(--mz-muted);
  border-radius: 4px; line-height: 1; font-size: .95rem;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.mz-kebab-btn:hover { background: rgba(255,255,255,.1); color: var(--mz-fg); }

/* ── Floating kebab menu ── */
#mz-kebab-menu {
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: var(--mz-radius);
  box-shadow: var(--mz-shadow-lg);
  min-width: 164px;
  padding: .3rem 0;
}
.mz-kmenu-item {
  display: flex; align-items: center; gap: .55rem;
  width: 100%; background: none; border: none;
  padding: .45rem 1rem; cursor: pointer;
  font-size: .85rem; color: var(--mz-fg);
  text-align: left; white-space: nowrap;
  transition: background .12s;
}
.mz-kmenu-item:hover:not(:disabled) { background: rgba(255,255,255,.06); }
.mz-kmenu-item:disabled { opacity: .38; cursor: not-allowed; }
.mz-kmenu-danger { color: #f87171; }
.mz-kmenu-danger:hover:not(:disabled) { background: rgba(248,113,113,.1) !important; }
.mz-kmenu-divider { height: 1px; background: var(--mz-border); margin: .3rem 0; }

/* ── Delete confirmation modal ── */
#mz-delete-modal {
  display: none; position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,.65);
  align-items: center; justify-content: center;
  padding: 1rem;
}
#mz-delete-modal.is-open { display: flex; }
.mz-modal {
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: var(--mz-radius);
  box-shadow: var(--mz-shadow-lg);
  width: 100%; max-width: 460px;
  padding: 1.75rem;
  position: relative;
}
.mz-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  color: var(--mz-muted); font-size: 1.1rem; line-height: 1; padding: .25rem;
}
.mz-modal-close:hover { color: var(--mz-fg); }

/* ── Dropdown ── */
.mz-dropdown { position: relative; }
.mz-dropdown-menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  background: var(--mz-surface);
  border: 1px solid var(--mz-border);
  border-radius: var(--mz-radius);
  box-shadow: var(--mz-shadow-lg);
  min-width: 185px;
  z-index: 1100;
  display: none;
  padding: .3rem 0;
}
.mz-dropdown-menu.show { display: block; }
.mz-dropdown-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  color: var(--mz-text);
  text-decoration: none;
  transition: background .1s;
  cursor: pointer;
  background: none; border: none; width: 100%; text-align: left;
}
.mz-dropdown-item:hover { background: var(--mz-bg); color: var(--mz-text); }
.mz-dropdown-divider { height: 1px; background: var(--mz-border); margin: .3rem 0; }
.mz-dropdown-header { padding: .6rem 1rem .4rem; }
.mz-dropdown-header .fw-semibold { font-size: .875rem; }
.mz-dropdown-header .text-muted { font-size: .75rem; }

/* ── App layout (top-nav + sidebar + content) ── */
.mz-app-layout {
  display: flex;
  padding-top: var(--mz-topnav-h);
  min-height: 100vh;
}

.mz-sidebar {
  width: var(--mz-sidebar-w);
  flex-shrink: 0;
  background: var(--mz-surface);
  border-right: 1px solid var(--mz-border);
  position: fixed;
  top: var(--mz-topnav-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.mz-sidebar-nav { flex: 1; padding: .75rem 0; }

.mz-sidebar-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--mz-muted);
  text-decoration: none;
  transition: color .15s, background .15s;
  border-left: 3px solid transparent;
  margin: .05rem 0;
}
.mz-sidebar-link:hover { color: var(--mz-text); background: var(--mz-bg); }
.mz-sidebar-link.active {
  color: var(--mz-green-dk);
  background: var(--mz-green-lt);
  border-left-color: var(--mz-green);
  font-weight: 600;
}
.mz-sidebar-link.disabled {
  pointer-events: none;
  opacity: .4;
  cursor: default;
}
.mz-sidebar-section-label {
  padding: 1rem 1.25rem .25rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mz-muted);
  opacity: .6;
}

.mz-sidebar-storage {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--mz-border);
}
.mz-storage-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mz-muted); margin-bottom: .35rem; }
.mz-storage-bar { height: 5px; background: var(--mz-border); border-radius: 999px; overflow: hidden; }
.mz-storage-fill { height: 100%; background: var(--mz-green); border-radius: 999px; }
.mz-storage-text { font-size: .72rem; color: var(--mz-muted); margin-top: .3rem; }

/* ── Main content area ── */
.mz-main {
  margin-left: var(--mz-sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 1.75rem 1.75rem 3rem;
}

/* ── Flash alerts ── */
.mz-alert {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--mz-radius-sm);
  font-size: .875rem;
  margin-bottom: .5rem;
}
.mz-alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.mz-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.mz-alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Dashboard home ── */
.mz-welcome-banner {
  background: linear-gradient(120deg, var(--mz-navy) 0%, var(--mz-navy2) 100%);
  color: #fff;
  border-radius: var(--mz-radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}
.mz-welcome-banner h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 .25rem; }
.mz-welcome-banner p  { margin: 0; opacity: .7; font-size: .95rem; }

.mz-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .875rem; }
.mz-section-title  { font-size: 1rem; font-weight: 700; margin: 0; }
.mz-view-all { font-size: .8rem; color: var(--mz-green-dk); text-decoration: none; font-weight: 600; }
.mz-view-all:hover { text-decoration: underline; }

.mz-hero-feature {
  border-radius: var(--mz-radius);
  overflow: hidden;
  position: relative;
  background: #1a1a2e;
  aspect-ratio: 16/6.5;
  display: flex; align-items: flex-end;
  margin-bottom: 1.5rem;
}
.mz-hero-eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mz-green); margin-bottom: .4rem; }
.mz-hero-title    { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: .35rem; }
.mz-hero-desc     { color: rgba(255,255,255,.78); font-size: .875rem; margin-bottom: .875rem; }
.mz-hero-content  {
  position: relative;
  padding: 1.5rem 2rem;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
  width: 100%;
}

.mz-media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .875rem; }
@media (max-width: 1100px) { .mz-media-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .mz-media-grid { grid-template-columns: repeat(2, 1fr); } }

.mz-media-card {
  border-radius: var(--mz-radius-sm);
  overflow: hidden;
  background: var(--mz-surface);
  box-shadow: var(--mz-shadow);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  display: block;
  text-decoration: none;
  color: inherit;
}
.mz-media-card:hover { transform: translateY(-3px); box-shadow: var(--mz-shadow-lg); color: inherit; }
.mz-media-card-thumb {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block;
  background: #1a1a2e;
}
.mz-media-card-ph {
  width: 100%; aspect-ratio: 16/9;
  background: #1a1a2e;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.2); font-size: 2rem;
}
.mz-media-card-body { padding: .65rem .875rem; }
.mz-media-card-title { font-size: .85rem; font-weight: 600; margin-bottom: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mz-media-card-meta  { font-size: .75rem; color: var(--mz-muted); }

/* ── Right panel (dashboard) ── */
.mz-right-panel { width: 270px; flex-shrink: 0; }
.mz-panel-card {
  background: var(--mz-surface);
  border-radius: var(--mz-radius);
  box-shadow: var(--mz-shadow);
  padding: 1rem 1.1rem;
  margin-bottom: .875rem;
}
.mz-panel-title { font-size: .875rem; font-weight: 700; margin-bottom: .75rem; }

.mz-recent-item { display: flex; gap: .65rem; align-items: center; padding: .5rem 0; }
.mz-recent-item + .mz-recent-item { border-top: 1px solid var(--mz-border); }
.mz-recent-thumb {
  width: 58px; height: 38px;
  object-fit: cover; border-radius: 4px;
  background: #1a1a2e; flex-shrink: 0;
}
.mz-recent-thumb-ph {
  width: 58px; height: 38px;
  background: #1a1a2e; border-radius: 4px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.25); font-size: .9rem;
}
.mz-recent-title { font-size: .8rem; font-weight: 600; line-height: 1.3; margin-bottom: .1rem; }
.mz-recent-meta  { font-size: .72rem; color: var(--mz-muted); }

.mz-quick-search {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem;
  border: 1.5px solid var(--mz-border);
  border-radius: var(--mz-radius-sm);
  font-size: .875rem; color: var(--mz-muted);
  cursor: text;
  transition: border-color .15s;
}
.mz-quick-search:focus-within { border-color: var(--mz-green); }
.mz-quick-search input { border: none; outline: none; flex: 1; font-size: .875rem; color: var(--mz-text); background: transparent; font-family: inherit; }
.mz-quick-search input::placeholder { color: var(--mz-muted); }

.mz-tag {
  display: inline-block;
  background: var(--mz-bg);
  border: 1px solid var(--mz-border);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .775rem;
  font-weight: 500;
  color: var(--mz-green-dk);
  cursor: pointer;
  margin: .15rem;
  transition: background .15s, border-color .15s;
  text-decoration: none;
}
.mz-tag:hover { background: var(--mz-green-lt); border-color: var(--mz-green); color: var(--mz-green-dk); }

/* ── My Videos page ── */
.mz-page-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.mz-page-title  { font-size: 1.4rem; font-weight: 800; margin: 0; }
.mz-count-badge {
  background: var(--mz-bg);
  border: 1px solid var(--mz-border);
  border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  padding: .15rem .55rem;
  color: var(--mz-muted);
}
.mz-view-toggles { display: flex; gap: .25rem; margin-left: auto; }
.mz-view-toggle-main {
  font-size: .95rem;
  gap: .25rem;
  padding: .4rem .8rem;
}
.mz-view-toggle-main #icon-tile,
.mz-view-toggle-main #icon-list { transition: opacity .15s; }
.mz-view-count {
  border-left: 1px solid var(--mz-border);
  margin-left: .25rem;
  padding-left: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--mz-muted);
}
.mz-view-toggle {
  background: none;
  border: 1px solid var(--mz-border);
  border-radius: var(--mz-radius-sm);
  padding: .375rem .65rem;
  font-size: .8rem;
  cursor: pointer;
  color: var(--mz-muted);
  transition: all .15s;
  display: flex; align-items: center; gap: .3rem;
}
.mz-view-toggle:hover { background: var(--mz-bg); color: var(--mz-text); }
.mz-view-toggle.active { background: var(--mz-green-lt); border-color: var(--mz-green); color: var(--mz-green-dk); }

/* Video tile card */
.mz-video-card {
  background: var(--mz-surface);
  border-radius: var(--mz-radius);
  overflow: hidden;
  box-shadow: var(--mz-shadow);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .15s, box-shadow .15s;
}
.mz-video-card:hover { transform: translateY(-3px); box-shadow: var(--mz-shadow-lg); color: inherit; }
.mz-video-card-thumb {
  width: 100%; aspect-ratio: 16/9;
  object-fit: contain; display: block;
  background: #1a1a2e;
}
.mz-video-card-ph {
  width: 100%; aspect-ratio: 16/9;
  background: #1a1a2e;
  display: flex; align-items: center; justify-content: center;
}
.mz-video-card-body { padding: .7rem 1rem; }
.mz-video-card-title {
  font-size: .875rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .35rem;
}
.mz-video-card-meta { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }

/* Badges */
.mz-badge {
  display: inline-flex; align-items: center;
  padding: .15rem .45rem;
  border-radius: 4px;
  font-size: .68rem; font-weight: 600;
  line-height: 1.4;
}
.mz-badge-dark   { background: #111827; color: #e5e7eb; }
.mz-badge-green  { background: #dcfce7; color: #166534; }
.mz-badge-blue   { background: #dbeafe; color: #1e40af; }
.mz-badge-yellow { background: #fef9c3; color: #713f12; }
.mz-badge-gray   { background: var(--mz-bg); color: var(--mz-muted); border: 1px solid var(--mz-border); }
.mz-badge-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Job pills — temporary debug display */
.mz-job-pills { display: inline-flex; align-items: center; gap: .2rem; }
.mz-job-pill {
  display: inline-block;
  padding: .1rem .3rem;
  border-radius: 3px;
  font-size: .65rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .01em;
  cursor: default;
}
.mz-job-complete { background: #dcfce7; color: #166534; }
.mz-job-running  { background: #fef9c3; color: #713f12; }
.mz-job-pending  { background: #1f2937; color: #9ca3af; border: 1px solid #374151; }
.mz-job-failed   { background: #fee2e2; color: #991b1b; }

/* Video list item */
.mz-video-list-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .75rem 1rem;
  background: var(--mz-surface);
  border-radius: var(--mz-radius);
  box-shadow: var(--mz-shadow);
  margin-bottom: .5rem;
  transition: box-shadow .15s;
}
.mz-video-list-item:hover { box-shadow: var(--mz-shadow-md); }
.mz-video-list-thumb {
  flex-shrink: 0; width: 112px; height: 63px;
  object-fit: cover; border-radius: var(--mz-radius-sm);
  background: #1a1a2e;
}
.mz-video-list-thumb-ph {
  flex-shrink: 0; width: 112px; height: 63px;
  background: #1a1a2e; border-radius: var(--mz-radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.mz-processing-label {
  font-size: .6rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: rgba(255,255,255,.3);
}
.mz-video-list-info { flex: 1; min-width: 0; }
.mz-video-list-title {
  font-size: .9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .25rem;
}
.mz-video-list-meta { font-size: .775rem; color: var(--mz-muted); display: flex; flex-wrap: wrap; gap: .5rem; }
.mz-video-list-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* ── Inline title editing ── */
.editable-title { border-radius: 4px; padding: 1px 4px; margin: -1px -4px; cursor: text; outline: none; }
.editable-title:hover { background: rgba(34,197,94,.08); }
.editable-title:focus  { background: #fff; box-shadow: 0 0 0 2px rgba(34,197,94,.3); }
.editable-title.title-saved { background: rgba(34,197,94,.15); transition: background .6s ease-out; }

/* ── Video player ── */
.mz-player-wrap { position: relative; }
.mz-player-video { width: 100%; max-height: 70vh; background: #000; border-radius: var(--mz-radius); display: block; }

/* ── Timeline scrubbing preview ── */
.mz-timeline-preview {
  position: absolute;
  bottom: 60px;  /* sits above native video controls + play/pause bar */
  left: 0;
  width: 190px;
  background: rgba(15, 20, 30, 0.88);
  border-radius: var(--mz-radius-sm);
  box-shadow: var(--mz-shadow-lg);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease, visibility .12s ease;
  z-index: 20;
}
.mz-timeline-preview--visible {
  opacity: 1;
  visibility: visible;
}
.mz-timeline-preview img {
  display: block;
  width: 190px;
  height: auto;
  border-radius: var(--mz-radius-sm) var(--mz-radius-sm) 0 0;
}
.mz-timeline-preview-time {
  padding: 3px 8px 4px;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: .02em;
}
.mz-timeline-add-btn {
  display: block;
  width: 100%;
  background: var(--mz-green);
  color: #000;
  border: none;
  padding: 5px 8px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  letter-spacing: .02em;
}
.mz-timeline-add-btn:hover {
  background: #16a34a;
  color: #fff;
}

/* ── Add Scene sidebar panel ── */
.mz-add-scene-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease, margin-bottom .3s ease;
  margin-bottom: 0;
}
.mz-add-scene-panel--open {
  max-height: 800px;
  margin-bottom: 1.25rem;
}
.mz-add-scene-panel .mz-panel-inner {
  background: var(--mz-surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--mz-radius);
  padding: 1rem;
}
.mz-add-scene-panel .mz-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}
.mz-add-scene-panel .mz-panel-header h6 {
  margin: 0;
  font-size: .9rem;
  font-weight: 700;
  color: var(--mz-green);
}

.mz-thumb-strip {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 6px 0; scroll-snap-type: x mandatory;
}
.mz-thumb-strip img {
  height: 54px; width: 80px;
  object-fit: cover; border-radius: 4px;
  cursor: pointer; flex-shrink: 0;
  scroll-snap-align: start;
  opacity: .7;
  transition: opacity .15s, outline .15s;
}
.mz-thumb-strip img:hover { opacity: 1; outline: 2px solid var(--mz-green); }

/* ── Scene detection test panel (admin/temporary) ── */
.mz-scene-detect-panel {
  background: var(--mz-surface);
  border-radius: var(--mz-radius);
  border: 1px dashed var(--mz-border);
}
.mz-scene-test-strip {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 4px 0; scroll-snap-type: x mandatory;
}
.mz-scene-test-thumb {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; flex-shrink: 0;
  scroll-snap-align: start;
}
.mz-scene-test-thumb img {
  height: 54px; width: 80px;
  object-fit: cover; border-radius: 4px;
  opacity: .75;
  transition: opacity .15s, outline .15s;
}
.mz-scene-test-thumb:hover img { opacity: 1; outline: 2px solid var(--mz-green); }
.mz-scene-test-label {
  font-size: .65rem; color: var(--mz-muted);
  margin-top: 2px; font-weight: 600; text-align: center;
}

.mz-scene-list { max-height: calc(100vh - 260px); overflow-y: auto; }
.mz-scene-item {
  padding: .75rem;
  border-radius: var(--mz-radius-sm);
  background: var(--mz-surface);
  border-left: 3px solid transparent;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: .5rem;
  box-shadow: var(--mz-shadow);
}
.mz-scene-item:hover { border-left-color: var(--mz-green); }
.mz-scene-time { font-size: .75rem; font-weight: 700; color: var(--mz-green-dk); cursor: pointer; }
.mz-scene-time:hover { text-decoration: underline; }

/* ── Auth pages ── */
.mz-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--mz-navy) 0%, #1a2f50 55%, #0a2210 100%);
  padding: 2rem;
}
.mz-auth-card {
  background: var(--mz-surface);
  border-radius: 16px;
  box-shadow: var(--mz-shadow-lg);
  width: 100%; max-width: 430px;
  padding: 2.5rem;
}
.mz-auth-brand { text-align: center; margin-bottom: 1.5rem; }
.mz-auth-brand .mz-brand { font-size: 1.9rem; }
.mz-auth-title    { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: .35rem; }
.mz-auth-subtitle { font-size: .875rem; color: var(--mz-muted); text-align: center; margin-bottom: 1.75rem; line-height: 1.5; }

.mz-form-group  { margin-bottom: 1rem; }
.mz-form-label  {
  font-size: .75rem; font-weight: 700; display: block;
  margin-bottom: .35rem; color: var(--mz-text);
  letter-spacing: .04em; text-transform: uppercase;
}
.mz-form-control {
  width: 100%; padding: .65rem .9rem;
  border: 1.5px solid var(--mz-border);
  border-radius: var(--mz-radius-sm);
  font-size: .9375rem; font-family: inherit;
  color: var(--mz-text); background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.mz-form-control:focus { border-color: var(--mz-green); box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.mz-form-control::placeholder { color: #9ca3af; }

.mz-btn-block { width: 100%; justify-content: center; padding: .75rem; font-size: 1rem; border-radius: var(--mz-radius-sm); }

.mz-auth-alt { text-align: center; font-size: .875rem; color: var(--mz-muted); margin-top: 1.25rem; }
.mz-auth-alt a { color: var(--mz-green-dk); font-weight: 600; text-decoration: none; }
.mz-auth-alt a:hover { text-decoration: underline; }

.mz-auth-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
  border-radius: var(--mz-radius-sm); padding: .65rem .9rem;
  font-size: .875rem; margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.mz-auth-notice {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: var(--mz-radius-sm); padding: .75rem .9rem;
  font-size: .875rem; margin-bottom: 1.25rem;
  display: flex; gap: .5rem; align-items: flex-start; line-height: 1.5;
}

/* ── Landing page ── */
.mz-landing-nav {
  background: var(--mz-navy);
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.mz-landing-nav-links { display: flex; gap: .5rem; }
.mz-landing-nav-link {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .875rem; font-weight: 500;
  padding: .4rem .75rem;
  border-radius: var(--mz-radius-sm);
  transition: color .15s, background .15s;
}
.mz-landing-nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }

.mz-hero {
  background: linear-gradient(135deg, var(--mz-navy) 0%, #1a2f50 50%, #0c2210 100%);
  color: #fff;
  padding: 7rem 0 6rem;
  text-align: center;
}
.mz-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
}
.mz-hero-title span { color: var(--mz-green); }
.mz-hero-sub {
  font-size: clamp(.95rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,.72);
  max-width: 540px; margin: 0 auto 2.5rem;
  line-height: 1.65;
}
.mz-hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.mz-hero-cta-primary {
  background: var(--mz-green); color: var(--mz-navy); font-weight: 700;
  padding: .875rem 2rem; border-radius: var(--mz-radius-sm);
  text-decoration: none; font-size: 1rem;
  transition: background .15s, transform .1s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.mz-hero-cta-primary:hover { background: var(--mz-green-dk); color: #fff; transform: translateY(-2px); }
.mz-hero-cta-secondary {
  background: rgba(255,255,255,.1); color: #fff; font-weight: 600;
  padding: .875rem 2rem; border-radius: var(--mz-radius-sm);
  border: 1.5px solid rgba(255,255,255,.25);
  text-decoration: none; font-size: 1rem;
  transition: background .15s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.mz-hero-cta-secondary:hover { background: rgba(255,255,255,.18); color: #fff; }

.mz-features { padding: 5rem 0; background: var(--mz-surface); }
.mz-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem; }
.mz-feature-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--mz-green-lt);
  color: var(--mz-green-dk);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.mz-feature-title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.mz-feature-desc  { font-size: .9rem; color: var(--mz-muted); line-height: 1.6; }

.mz-footer {
  background: var(--mz-navy);
  color: rgba(255,255,255,.55);
  padding: 2.5rem 0;
  text-align: center;
  font-size: .875rem;
}
.mz-footer a { color: rgba(255,255,255,.55); text-decoration: none; }
.mz-footer a:hover { color: #fff; }
.mz-footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: .75rem; flex-wrap: wrap; }

/* ── Empty state ── */
.mz-empty { text-align: center; padding: 3.5rem 2rem; color: var(--mz-muted); }
.mz-empty i { font-size: 3rem; opacity: .3; display: block; margin-bottom: .75rem; }
.mz-empty-title { font-size: 1.05rem; font-weight: 600; color: var(--mz-text); margin-bottom: .35rem; }

/* ── Responsive overrides ── */
@media (max-width: 991px) {
  .mz-topnav-links { display: none !important; }
}
@media (max-width: 768px) {
  .mz-sidebar { transform: translateX(-100%); transition: transform .25s; }
  .mz-sidebar.open { transform: translateX(0); }
  .mz-main { margin-left: 0; padding: 1rem 1rem 3rem; }
  .mz-right-panel { display: none; }
  .mz-hero-feature { aspect-ratio: 16/9; }
}

/* ── Utility ── */
.mz-section-mb { margin-bottom: 2rem; }
.text-green { color: var(--mz-green-dk); }
