/* WALL UI — 2026 / coherent components shared by administration and public views.
   Intentional separate scope: .wm-app for pages, .wm-mode for live viewers.
   Upload's existing visual language is the reference. */

:root {
  --wall-bg: #101318;
  --wall-panel: #1a1f27;
  --wall-input: #121820;
  --wall-border: #364250;
  --wall-border-soft: #29333f;
  --wall-text: #edf3f9;
  --wall-muted: #aab9ca;
  --wall-accent: #84c0ff;
  --wall-accent-hover: #a5d2ff;
  --wall-radius: 12px;
}

/* Public Galerie / Polaroid are distinct live viewers with their own
   Socket.IO controllers. Keep normal navigation so neither player breaks,
   but soften supported same-origin full-document mode changes. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 140ms;
  animation-timing-function: ease-out;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* Keep the central column locked when a scrollbar appears/disappears. */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
@supports (scrollbar-gutter: stable both-edges) {
  html { scrollbar-gutter: stable both-edges; }
}

/* In-place admin navigation never hides the document between screens. */
body.wm-app .wm-nav-notice {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 200;
  max-width: min(90vw, 440px);
  padding: 10px 15px;
  border: 1px solid var(--wall-border);
  border-radius: 10px;
  background: var(--wall-panel);
  color: var(--wall-text);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  text-align: center;
  font-size: 13px;
}

/* Thin scrollbars, with Firefox and WebKit implementations */
html { scrollbar-width: thin; scrollbar-color: #53697d #101318; }
body.wm-app *, body.wm-mode * { scrollbar-width: thin; scrollbar-color: #53697d transparent; }
body.wm-app ::-webkit-scrollbar, body.wm-mode ::-webkit-scrollbar { width: 5px; height: 5px; }
body.wm-app ::-webkit-scrollbar-track, body.wm-mode ::-webkit-scrollbar-track { background: transparent; }
body.wm-app ::-webkit-scrollbar-thumb, body.wm-mode ::-webkit-scrollbar-thumb {
  background: #526a7f; border-radius: 100px;
}
body.wm-app ::-webkit-scrollbar-thumb:hover, body.wm-mode ::-webkit-scrollbar-thumb:hover { background: #7893aa; }

body.wm-app {
  margin: 0;
  background: var(--wall-bg);
  color: var(--wall-text);
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.wm-app *, .wm-mode * { box-sizing: border-box; }
.wm-app .container { max-width: 1120px; margin: 0 auto; padding: 26px 20px 65px; min-width: 0; }
.wm-app h1, .wm-app h2, .wm-app h3 { font-family: inherit; color: var(--wall-text); }
.wm-app h1, .wm-app h2 { font-size: clamp(25px,3.5vw,34px); line-height: 1.16; letter-spacing: -.04em; font-weight: 740; margin: 0 0 12px; }
.wm-app h3 { margin: 0 0 16px; font-size: 16px; line-height: 1.3; letter-spacing: -.014em; font-weight: 700; }
.wm-app p { line-height: 1.6; }
.wm-app .spacer { height: 14px; }
.wm-app .row { gap: 9px; min-width: 0; }
.wm-app .badge { color: var(--wall-muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.wm-app .card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--wall-border);
  border-radius: var(--wall-radius);
  background: var(--wall-panel);
  box-shadow: none;
}
.wm-app .card > :first-child { margin-top: 0; }
.wm-app .card > :last-child { margin-bottom: 0; }
.wm-app .form { display: grid; gap: 15px; }
.wm-app .label { display: block; margin: 0 0 7px; font-family: inherit; font-size: 12px; font-weight: 650; color: #c2d1df; }
.wm-app :is(.input,.file,textarea,select) {
  max-width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #445263;
  border-radius: 9px;
  background: var(--wall-input);
  color: #eef5fc;
  font-family: inherit;
  font-size: 14px;
  box-shadow: none;
}
.wm-app :is(.input,.file,textarea,select):focus-visible { outline: 2px solid var(--wall-accent); outline-offset: 2px; }
.wm-app :is(.input,.file,textarea,select)::placeholder { color: #91a1b1; }

/* Replace legacy .button AND a.button[href] resets, at the same specificity. */
body.wm-app :is(a.button[href],button.button,.button) {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  min-height: 39px;
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--wall-accent);
  color: #101924;
  font: 700 13px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}
body.wm-app :is(a.button[href],button.button,.button):hover {
  background: var(--wall-accent-hover);
  text-decoration: none;
  transform: none;
  filter: none;
}
body.wm-app :is(a.button[href],button.button,.button):is(.secondary) {
  background: #263241;
  border-color: #45576a;
  color: #e0ecf7;
}
body.wm-app :is(a.button[href],button.button,.button).secondary:hover { background: #314254; }
body.wm-app :is(a.button[href],button.button,.button).danger {
  background: #502d35;
  border-color: #8a515e;
  color: #ffe2e4;
}
body.wm-app :is(a.button[href],button.button,.button).danger:hover { background: #693741; }
body.wm-app :is(a.button[href],button.button,.button):focus-visible {
  outline: 2px solid #b4daff;
  outline-offset: 3px;
}
body.wm-app button:disabled { cursor: not-allowed; opacity: .55; }
.wm-app code { display: inline; font-family: ui-monospace,Consolas,monospace; font-size: 12px; color: #bddafa; overflow-wrap: anywhere; }
.wm-app a:not(.button):focus-visible { outline: 2px solid var(--wall-accent); outline-offset: 3px; }

/* Shared typographic scale and simple header */
.wm-kicker { margin: 0 0 9px; font-size: 11px; font-weight: 750; color: #92c7fa; letter-spacing: .13em; text-transform: uppercase; }
.wm-subhead { margin: 0 0 23px; font-size: 13px; line-height: 1.65; color: #aabacb; }
.wm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 0 0 16px;
  margin: 0 0 29px;
  border-bottom: 1px solid var(--wall-border-soft);
}
/* Compact editorial wordmark without a decorative initial badge. */
.wm-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--wall-text);
  text-decoration: none;
  white-space: nowrap;
  font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
  line-height: 1.15;
}
.wm-brand:hover { text-decoration: none; }
.wm-wordmark { font-size: 19px; font-weight: 820; letter-spacing: -.055em; }
.wm-brand small { color: var(--wall-muted); font-size: 10px; font-weight: 730; letter-spacing: .16em; }
.wm-header-nav { display: flex; flex-wrap: wrap; gap: 8px 17px; align-items: center; }
.wm-header-nav a { color: #b9d5ef; font: 650 12px/1.4 system-ui,sans-serif; text-decoration: none; }
.wm-header-nav a:hover { text-decoration: underline; }
.wm-header-nav a[aria-current="page"] { color: #91cbff; }

/* The logout action lives in the shared header, after the theme switch. */
.wm-header-logout { display: inline-flex; margin: 0; align-items: center; }
body.wm-app .wm-header-logout .wm-logout-icon {
  display: inline-grid; place-items: center;
  width: 35px; height: 35px;
  padding: 0; border-radius: 9px;
  border: 1px solid var(--wall-border);
  background: var(--wall-panel);
  color: var(--wall-muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
body.wm-app .wm-header-logout .wm-logout-icon:hover {
  border-color: var(--wall-accent);
  color: var(--wall-text);
}
body.wm-app .wm-header-logout .wm-logout-icon:focus-visible {
  outline: 2px solid var(--wall-accent);
  outline-offset: 2px;
}

/* Dashboard actions have a single purpose; avoid a second navigation card. */
.wm-dashboard-action {
  display: flex;
  justify-content: flex-start;
  margin: 4px 0 18px;
}
.wm-album-summary .wm-album-title { margin-top: 0; }

/* Shared confirmation window: no browser-native confirm popups. */
body.wm-app dialog.wm-action-dialog {
  width: min(470px, calc(100vw - 36px));
  max-height: min(85vh, 650px);
  overflow-y: auto;
  margin: auto;
  padding: 24px;
  border: 1px solid var(--wall-border);
  border-radius: 14px;
  color: var(--wall-text);
  background: var(--wall-panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.40);
}
body.wm-app .wm-action-dialog::backdrop { background: rgba(0,0,0,.74); }
body.wm-app .wm-action-dialog h2 {
  margin: 0 0 13px;
  font-size: clamp(21px,3vw,26px);
  line-height: 1.2;
}
body.wm-app .wm-action-dialog p:not(.wm-kicker) {
  margin: 0;
  color: var(--wall-muted);
  line-height: 1.6;
}
body.wm-app .wm-action-dialog-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
}
@media (max-width: 480px) {
  body.wm-app dialog.wm-action-dialog { padding: 19px; }
  body.wm-app .wm-action-dialog-buttons > button { flex: 1 1 auto; }
}

/* One deliberate confirmation for irreversible account removal. */
body.wm-app .wm-user-delete-dialog {
  width: min(480px, calc(100% - 32px));
  max-height: min(85vh, 650px);
  border: 1px solid var(--wall-border);
  border-radius: 14px;
  padding: 24px;
  background: var(--wall-panel);
  color: var(--wall-text);
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
body.wm-app .wm-user-delete-dialog::backdrop { background: rgba(0,0,0,.72); }
body.wm-app .wm-user-delete-dialog h2 { margin: 0 0 10px; }
body.wm-app .wm-user-delete-dialog .input { display: block; width: 100%; margin-top: 8px; }
body.wm-app .wm-user-delete-dialog .wm-delete-actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: 8px; margin-top: 22px;
}
body.wm-app .wm-user-remove { align-self: flex-end; }

/* Only the album-section bar sticks; the brand header scrolls naturally. */
body.wm-app .wm-section-nav {
  position: sticky;
  top: 8px;
  z-index: 70;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 0 19px;
  padding: 6px;
  border: 1px solid #425366;
  border-radius: 12px;
  background: rgba(18,24,32,.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  scrollbar-width: none;
}
.wm-section-nav::-webkit-scrollbar { display: none; }
.wm-section-nav a {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #b8c8d8;
  font: 650 12px/1.25 system-ui,sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s ease,color .12s ease;
}
.wm-section-nav a:hover { background: #293748; color: white; text-decoration: none; }
.wm-section-nav a[aria-current="location"], .wm-section-nav a.wm-active {
  color: #111d29;
  background: #94c8ff;
}
/* Room below the last album card lets Modérateurs and Fichiers actually
   reach the top below the sticky menu, even on a short browser viewport.
   This space is editor-only; normal admin/dashboard pages stay compact. */
body.wm-album-editor .container::after {
  content: "";
  display: block;
  height: clamp(320px, 74vh, 950px);
  pointer-events: none;
}
.wm-app [id]:is(#info,#stats,#polaroid,#pin,#approval,#modpin,#privacy,#share,#moderators,#export) {
  scroll-margin-top: 17px;
}
.wm-app .wm-itemlist { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.wm-album-title { font-size: 15px; font-weight: 750; }
.wm-app .wm-session-meta { display:flex; flex-wrap:wrap; gap: 4px 11px; margin-top:7px; }
.wm-app .wm-session-meta .badge { display:block; }
.wm-app .wm-page-actions { display:flex; gap: 7px; flex-wrap: wrap; }
.wm-app #info { padding: 19px; }
.wm-app #info > .row { justify-content: space-between; align-items: center; gap: 14px 22px; }
.wm-app #info .badge { line-height: 1.55; }
.wm-app #stats .row { gap: 8px; }
.wm-app #stats .badge {
  display: inline-flex;
  padding: 5px 10px;
  border: 1px solid #3c4c5d;
  border-radius: 8px;
  background: #131b25;
  color: #c5d4e4;
}
.wm-app #stats .badge:nth-child(3) { border-color: #6d5540; }
.wm-app #moderators .card { background: #131920; }
.wm-app .wm-danger-zone {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px 16px;
  margin-top: 15px;
  border: 1px solid #69424a;
  border-radius: 12px;
  padding: 16px 19px;
  background: #211b21;
}
.wm-danger-zone h3 { margin: 0 0 4px; font-size: 14px; }
.wm-danger-zone p { margin:0; font-size:12px; color: #d5b5be; }

/* Admin batch importer uses the same density and scrollbars */
.wm-app .batch-modal { z-index: 10000; }
.wm-app .batch-dialog {
  max-height: min(88dvh,900px);
  background: var(--wall-panel);
  border: 1px solid #49596c;
  border-radius: 14px;
  padding: 22px;
  scrollbar-width: thin;
}
.wm-app .batch-drop {
  background: #131d28;
  border: 1px dashed #617f9c;
  border-radius: 11px;
  font-size: 13px;
  padding: 14px;
}
.wm-app .batch-drop:hover { border-color: #9ecbfc; }
.wm-app .batch-list { max-height: 38dvh; overflow-y: auto; }
.wm-app .batch-item { background: #121821; border: 1px solid #364552; }
.wm-app .state-badge { font: 700 11px/1.3 system-ui,sans-serif; border-radius: 7px; }
.wm-app .batch-toolbar { gap: 7px; }

/* Moderator rows inherit the new component sizing */
.wm-app .section h3 { margin-bottom: 13px; padding-bottom: 9px; border-bottom: 1px solid var(--wall-border-soft); }
.wm-app .row-photo { background: #151c24; border: 1px solid #384653; border-radius: 11px; }
.wm-app .row-photo img { border-radius: 8px; border-color: #405062; }
.wm-app .meta { gap: 7px; min-width: 0; }
.wm-app .meta .badge2 { background: #263242; border: 1px solid #405268; border-radius: 7px; color: #c1d5e7; }
.wm-app .actions { gap: 7px; }

/* Gallery/Polaroid HUD: one coherent button, label and input system */
body.wm-mode { background: #101318; color: #eff4fa; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; }
.wm-mode .hud {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 7px;
  background: rgba(22,29,38,.95);
  border: 1px solid #425365;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
}
.wm-mode :is(.hud a.button[href],.hud button.button) {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: 650 12px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  color: #dae9f7;
  background: transparent;
}
.wm-mode :is(.hud a.button[href],.hud button.button):hover {
  background: #334559;
  transform: none;
  filter: none;
  text-decoration: none;
}
.wm-mode :is(.hud a.button[href],.hud button.button).secondary {
  background: transparent;
  color: #dae9f7;
  border-color: transparent;
}
.wm-mode :is(.hud a.button[href],.hud button.button).secondary:hover { background: #334559; }
.wm-mode .hud #btnShuffle { color: #111b29; background: #84c0ff; border-color: transparent; }
.wm-mode .hud #btnShuffle:hover { background: #a3d2ff; }
.wm-mode .hud .mode-control {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap;
  gap: 7px !important;
  margin: 0;
  color: #cbdbea !important;
  font: 600 12px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
}
.wm-mode .hud .mode-control .badge { margin: 0; color: #cbdbea; font-size:12px; white-space:nowrap; }
.wm-mode .hud #delaySel {
  display: inline-block;
  flex: none;
  width: 84px;
  min-width: 84px !important;
  height: 36px;
  padding: 6px 9px;
  margin: 0;
  border: 1px solid #405166;
  border-radius: 8px;
  font: 650 12px/1.2 system-ui,sans-serif;
  background: #101720;
  color: #f2f7ff;
}
.wm-mode .hud #autoChk { margin:0 4px 0 0; width:16px; height:16px; accent-color:#85c0ff; }
.wm-mode .hud #btnFull { border: 1px solid #405166; }
.wm-mode .hud #btnFull:hover { border-color:#6d94b8; }
.wm-mode .hud .wm-toolbar-divider { width:1px; height:22px; background:#3c4c60; margin:0 4px; }
.wm-mode .wm-viewer-kicker { display:block; color:#8fbce6; margin:0 0 7px; font-size:11px; letter-spacing:.14em; text-transform:uppercase; font-weight:750; }
/* Identical toolbar origin for the two viewing modes.
   Galerie reserves room below the fixed toolbar; Polaroid remains fullscreen. */
.wm-mode--gallery .hud,
.wm-mode--polaroid .hud {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 28px;
  right: auto;
  margin: 0;
}
.wm-mode--gallery .wm-viewer-header { margin: 0 20px 14px; padding-top: 83px; }
.wm-mode--gallery .mode-title { padding: 0 !important; margin:0; text-align:left; font-size:clamp(24px,4vw,33px); letter-spacing:-.035em; }
.wm-mode--gallery .mode-grid { padding: 10px 20px 30px; gap: 10px; }
.wm-mode--gallery .mode-grid button { border-radius: 10px; border: 1px solid #354452; }

.wm-mode--polaroid #stage { overflow: hidden; }

/* QR, auth and documentation */
.wm-app .wm-auth { max-width: 480px; margin: 20px auto; }
.wm-app .wm-auth .card { padding: 24px; }
.wm-app .wm-qr-card { flex: 1 1 320px; min-width: 0; }
.wm-app .wm-qr-card img { display:block; max-width:min(100%,280px); height:auto; margin:12px auto; }
.wm-app .wm-qr-card a.button { overflow-wrap:anywhere; }
.wm-app pre { overflow: auto; }

@media (max-width: 760px) {
  .wm-app .container { padding: 18px 14px 44px; }
  .wm-app .card { padding: 16px; }
  .wm-header { margin-bottom: 23px; padding-bottom: 13px; }
  .wm-app h1,.wm-app h2 { font-size: 26px; }
  .wm-section-nav { top: 4px !important; }
  .wm-app .row > div[style*="min-width:260px"] { min-width:0 !important; flex:1 1 100%; }
  .wm-app .batch-dialog { padding: 15px; }
  .wm-app .batch-item { grid-template-columns: 1fr; }
  .wm-app .row-photo { grid-template-columns:90px minmax(0,1fr); gap: 10px; padding: 9px; }
  .wm-app .row-photo img { width:90px; height:90px; }
  .wm-mode--gallery .mode-grid { padding:8px 12px; }
  .wm-mode--gallery .wm-viewer-header { margin:0 14px 12px; padding-top: 88px; }
  .wm-mode--gallery .hud, .wm-mode--polaroid .hud { left: 12px; }
}
@media (max-width: 450px) {
  .wm-app .wm-page-actions > .button { flex: 1 1 auto; }
  .wm-app .row-photo { grid-template-columns: 1fr; }
  .wm-app .row-photo img { width: 100%; height:auto; max-height:235px; object-fit:cover; }
  .wm-mode .hud { gap:3px; padding:5px; }
  .wm-mode :is(.hud a.button[href],.hud button.button) { padding:7px 8px; min-height:33px; font-size:11px; }
  .wm-mode--gallery .hud, .wm-mode--polaroid .hud { top: 7px; left: 7px; max-width: calc(100vw - 14px); }
  .wm-mode--gallery .wm-viewer-header { padding-top: 92px; }
}
@media (prefers-reduced-motion: reduce) { .wm-section-nav a { transition:none; } }

/* Cohesive compact session overview */
.wm-app .wm-overview-details {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px 23px;
  flex: 1 1 470px;
  min-width: 0;
}
.wm-app .wm-overview-item { display:grid; gap:4px; min-width:0; }
.wm-app .wm-overview-item span { color:#8ea5ba; font:650 11px/1.2 system-ui,sans-serif; }
.wm-app .wm-overview-item strong { color:#e7f1fb; font:670 13px/1.35 system-ui,sans-serif; overflow-wrap:anywhere; }
.wm-app #info .wm-page-actions { flex:0 1 430px; justify-content:flex-end; }
.wm-app .wm-danger-zone form { margin:0; }

/* Album viewers: no nested giant full-width toolbar or mixed controls */
.wm-mode .hud .wm-mode-links, .wm-mode .hud .wm-mode-tools {
  display:inline-flex; align-items:center; flex-wrap:wrap; gap:3px; min-width:0;
}
.wm-mode .hud .wm-mode-links > a[aria-current="page"] {
  background:#344b62 !important;
  color:#eaf4ff !important;
  border-color:#6282a0 !important;
}
.wm-mode .hud .wm-mode-tools { gap:9px; }
.wm-mode .hud .wm-auto { padding: 6px 1px; }
.wm-mode .hud #btnFull { padding:7px 11px; }
.wm-mode .hud :is(button,a) { font-family:system-ui,-apple-system,"Segoe UI",sans-serif !important; }
.wm-mode--gallery .hud, .wm-mode--polaroid .hud { right:auto !important; width:max-content !important; }
.wm-mode--gallery .mode-title { color:#edf3f9; }
@media (max-width:760px){
  .wm-app .wm-overview-details { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wm-app #info .wm-page-actions { flex:1 1 100%; justify-content:flex-start; }
  .wm-mode .hud .wm-toolbar-divider { display:none; }
  .wm-mode .hud .wm-mode-tools { flex-wrap:wrap; }
}
@media (max-width:440px){
  .wm-app .wm-overview-details { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wm-mode .hud .wm-mode-links,.wm-mode .hud .wm-mode-tools { gap:2px; }
}

/* Album dashboard: important information first, actions second */
.wm-app .wm-album-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:15px 24px;
}
.wm-app .wm-album-summary { min-width:0; flex:1 1 250px; }
.wm-app .wm-album-summary .wm-kicker { margin:0 0 6px; }
.wm-app .wm-album-summary .wm-album-title {
  margin:0;
  color:#ecf4fc;
  font:750 17px/1.3 system-ui,sans-serif;
  letter-spacing:-.018em;
  overflow-wrap:anywhere;
}
.wm-app .wm-album-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:7px;
  flex:1 1 340px;
}
@media(max-width:760px){
  .wm-app .wm-album-actions { justify-content:flex-start; }
}

/* Shared admin widgets moved out of dynamic HTML so in-place navigation
   works from any starting page without missing head styles. */
#notify {
    position:fixed;top:20px;right:20px;z-index:10000;
    background:#222;color:#fff;padding:12px 18px;
    border-radius:8px;opacity:0;pointer-events:none;
    transition:opacity .35s ease, transform .35s ease;
    transform:translateY(-10px);
    box-shadow:0 8px 25px rgba(0,0,0,.4);
  }
  #notify.show {opacity:1;transform:translateY(0);}
  .batch-modal {
    position:fixed; top:0; right:0; bottom:0; left:0; z-index:20000; display:flex;
    align-items:center; justify-content:center; padding:20px;
    background:rgba(0,0,0,.72);
    opacity:0; visibility:hidden; pointer-events:none;
  }
  .batch-modal.open,
  .batch-modal[aria-hidden="false"] {
    opacity:1; visibility:visible; pointer-events:auto;
  }
  .batch-dialog {
    width:min(920px, 100%); max-height:90vh; overflow:auto;
    background:#151821; border:1px solid rgba(255,255,255,.08);
    border-radius:14px; box-shadow:0 18px 50px rgba(0,0,0,.5); padding:20px;
  }
  #openBatchImport { font:inherit; line-height:normal; }
  .batch-drop {
    display:grid; place-items:center; min-height:130px; text-align:center;
    border:2px dashed rgba(105,180,255,.45); border-radius:12px;
    background:#0d0f14; color:#c9d1e2; cursor:pointer;
  }
  .batch-drop.drag { border-color:var(--accent); background:#121926; }
  .batch-toolbar, .batch-counts { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
  .batch-counts .badge { background:#0d0f14; border:1px solid rgba(255,255,255,.06); border-radius:999px; padding:5px 10px; }
  .batch-progress { height:10px; background:#0d0f14; border:1px solid rgba(255,255,255,.08); border-radius:999px; overflow:hidden; }
  .batch-progress span { display:block; width:0%; height:100%; background:var(--accent); transition:width .2s ease; }
  .batch-list { display:grid; gap:8px; margin-top:12px; }
  .batch-item {
    display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:center;
    background:#0d0f14; border:1px solid rgba(255,255,255,.06); border-radius:10px; padding:10px;
  }
  .batch-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .state-badge { border-radius:999px; padding:5px 10px; font-size:12px; font-weight:700; color:#0b0d12; background:#c9d1e2; }
  .state-pending { background:#c9d1e2; }
  .state-uploading { background:#69b4ff; }
  .state-optimizing { background:#f6d365; }
  .state-done { background:#8ee3a1; }
  .state-error { background:#ff9a9a; }
  .state-canceled { background:#b2a7ff; }
  .batch-spinner {
    display:inline-block; width:12px; height:12px; margin-left:6px;
    border:2px solid rgba(11,13,18,.25); border-top-color:#0b0d12; border-radius:50%;
    animation:batchspin .8s linear infinite; vertical-align:-2px;
  }
  @keyframes batchspin { to { transform:rotate(360deg); } }
  @media (max-width: 760px) {
    .batch-dialog { padding:14px; }
    .batch-item { grid-template-columns:1fr; }
    .batch-item .button { width:fit-content; }
  }
