/* ============================================================
   T-life / OT-View — Thème partagé
   Source unique des tokens de design + composants transverses.
   Chargé par base.html et par les pages autonomes
   (lame_detail_annotation.html, slide.html).
   ============================================================ */

:root {
  /* Palette unique */
  --primary-color: #2c3e50;
  --secondary-color: #1f6fa8;
  --secondary-color-dark: #185783;
  --accent-color: #c63f35;
  --success-color: #147a4b;
  --warning-color: #984807;

  /* Neutres (contrastes AA sur fond blanc) */
  --text-color: #2c3e50;
  --text-muted: #5b6573;
  --border-color: #d8dee6;
  --bg-color: #ffffff;
  --bg-soft: #f4f7fb;
  --navbar-bg: #ffffff;
  --surface: #ffffff;           /* cartes, menus, champs */
  --surface-inverse: #2c3e50;   /* toasts, barre de sélection (texte --on-inverse) */
  --on-inverse: #ffffff;
  --app-bg: #f6f8fb;            /* fond des pages base.html */
  --border-subtle: #e3e8ef;
  --row-hover: #e7f1fb;
  --header-bg: #ffffff;   /* opaque: content scrolled under the sticky header must not show through (2026-09-22) */

  /* Badges de statut — contraste texte/fond ≥ 4.5:1 (AA) */
  --badge-ok-bg: #dcf3e6;   --badge-ok-fg: #0f5132;
  --badge-warn-bg: #fdecd3; --badge-warn-fg: #7a3a05;
  --badge-err-bg: #fbe0dd;  --badge-err-fg: #9b1c12;
  --badge-info-bg: #dcebf7; --badge-info-fg: #124a75;
  --badge-idle-bg: #e5e7eb; --badge-idle-fg: #374151;

  /* Typo / formes */
  --font-body: 'Segoe UI Variable Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Segoe UI Variable Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, .08);
  --shadow-float: 0 12px 32px rgba(15, 30, 60, .22);
  --transition-speed: 0.3s;
  /* Largeurs de contenu partagées (homogénéité des pages) */
  --container: 1200px;
  --container-narrow: 900px;
}

html { color-scheme: light; }

::selection {
  background: rgba(31, 111, 168, .22);
  color: var(--primary-color);
}

/* Shared application shell. The scope prevents these foundations from
   overriding Bootstrap on the standalone annotation/viewer pages. */
.app-shell {
  background: var(--app-bg);
  accent-color: var(--secondary-color);
}
.app-shell :where(button, input, select, textarea) { font: inherit; }
.app-shell :where(h1, h2, h3, h4) {
  color: var(--primary-color);
  font-family: var(--font-heading);
  line-height: 1.22;
  text-wrap: balance;
}
.app-shell :where(p, li) { text-wrap: pretty; }
.app-shell :where(a) { text-underline-offset: .16em; }
.app-shell :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 42px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-color);
}
.app-shell :where(input, select, textarea):hover:not(:disabled) {
  border-color: #a9b5c4;
}
.app-shell :where(input, select, textarea):disabled,
.app-shell :where(button, .btn):disabled {
  cursor: not-allowed;
  opacity: .62;
}
.app-shell :where(.btn, button) {
  touch-action: manipulation;
}
/* Buttons and form controls of the application shell (UI/UX review 2026-10-04, X4).
   The tool pages load Bootstrap; the shell pages do not, yet share its class
   names (btn-outline-*, form-control…): these rules give them the same
   vocabulary from the design tokens, in light and dark. */
.app-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 38px;
  padding: .35rem .9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-color);
  font-weight: 650;
  font-size: .92rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.app-shell .btn:hover:not(:disabled):not(.disabled) { background: var(--bg-soft); border-color: #a9b5c4; }
.app-shell .btn:focus-visible { outline: 3px solid var(--secondary-color); outline-offset: 2px; }
.app-shell .btn-sm { min-height: 34px; padding: .25rem .7rem; font-size: .86rem; }
.app-shell .btn-primary { background: var(--secondary-color); border-color: var(--secondary-color); color: #fff; }
.app-shell .btn-primary:hover:not(:disabled) { background: var(--secondary-color-dark); border-color: var(--secondary-color-dark); color: #fff; }
.app-shell .btn-outline-primary { color: var(--secondary-color); border-color: var(--secondary-color); }
.app-shell .btn-outline-primary:hover:not(:disabled) { background: var(--secondary-color); border-color: var(--secondary-color); color: #fff; }
.app-shell .btn-outline-secondary { color: var(--text-color); border-color: var(--border-color); }
.app-shell .btn-danger { background: var(--accent-color); border-color: var(--accent-color); color: #fff; }
.app-shell .btn-outline-danger { color: var(--accent-color); border-color: var(--accent-color); }
.app-shell .btn-danger:hover:not(:disabled),
.app-shell .btn-outline-danger:hover:not(:disabled) { background: var(--accent-color); border-color: var(--accent-color); color: #fff; }
.app-shell .btn.disabled,
.app-shell .btn[aria-disabled="true"] { opacity: .62; pointer-events: none; }
.app-shell .form-label { display: block; margin-bottom: .3rem; font-size: .88rem; font-weight: 600; }
.app-shell .form-control,
.app-shell .form-select { display: block; width: 100%; padding: .4rem .6rem; }
.app-shell .form-check { display: flex; align-items: center; gap: .45rem; }
.app-shell .form-check-input { width: 1rem; height: 1rem; margin: 0; }
.app-shell .mt-4 { margin-top: 1.5rem; }
.app-shell .mt-5 { margin-top: 3rem; }
.app-shell .mb-0 { margin-bottom: 0; }
.app-shell .text-muted { color: var(--text-muted) !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (pointer: coarse) {
  .app-shell :where(button, .btn, input, select) { min-height: 44px; }
}

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

/* ===== Focus clavier visible partout ===== */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Texte secondaire (contraste relevé) ===== */
.text-muted-theme { color: var(--text-muted); }

/* ============================================================
   Toasts (notifications non bloquantes)
   Utilisés via window.showToast(message, type) — ui-toast.js
   ============================================================ */
/* Anchor: bottom-right by default. A page whose work sits there (the viewer's
   slide, the console's status bar) moves the stack through these variables on
   <body> (UI/UX review 2026-10-04, X7): e.g. --toast-top / --toast-left: 50% /
   --toast-transform: translateX(-50%) for a top-centre stack. */
#toast-region {
  position: fixed;
  top: var(--toast-top, auto);
  bottom: var(--toast-bottom, 24px);
  left: var(--toast-left, auto);
  right: var(--toast-right, 24px);
  transform: var(--toast-transform, none);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 48px));
  pointer-events: none;
}
.toast-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-inverse);
  color: var(--on-inverse);
  font-family: var(--font-body);
  font-size: .92rem;
  line-height: 1.45;
  box-shadow: var(--shadow-float);
  border-left: 4px solid var(--secondary-color);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: auto;
}
.toast-item.toast-visible { opacity: 1; transform: translateY(0); }
.toast-item.toast-success { border-left-color: #34d399; }
.toast-item.toast-error   { border-left-color: var(--accent-color); }
.toast-item.toast-info    { border-left-color: var(--secondary-color); }
.toast-item .toast-icon { flex-shrink: 0; font-size: 1rem; line-height: 1.45; }
.toast-item .toast-close {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .75);
  font-size: 1rem;
  line-height: 1.45;
  cursor: pointer;
  padding: 0 0 0 6px;
}
.toast-item .toast-close:hover { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .toast-item { transition: opacity .25s ease; transform: none; }
}

/* ============================================================
   Spinner discret (chargements inline)
   ============================================================ */
.spinner-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-color);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spinner-dot-rotate .7s linear infinite;
  vertical-align: middle;
}
@keyframes spinner-dot-rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner-dot { animation-duration: 1.4s; }
}

/* ============================================================
   Badges de statut
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.status-badge.reviewed   { background: var(--badge-ok-bg);   color: var(--badge-ok-fg); }
.status-badge.unreviewed { background: var(--badge-warn-bg); color: var(--badge-warn-fg); }
.status-badge.pending    { background: var(--badge-idle-bg); color: var(--badge-idle-fg); }

/* ============================================================
   Carte de surface partagée + badge sémantique
   --------------------------------------------------------------
   Noms PRÉFIXÉS `ot-` volontairement : theme.css est aussi chargé par les
   pages autonomes sous Bootstrap (après Bootstrap). Un `.card`/`.badge`
   générique écraserait les composants Bootstrap. À utiliser sur les pages
   basées sur base.html pour homogénéiser cartes & badges (tokens partagés).
   ============================================================ */
.ot-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-card);
}
.ot-card--flat { box-shadow: none; }
/* Carte « stat » : libellé discret + grande valeur */
.ot-card .ot-card-label { font-size: .85rem; color: var(--text-muted); }
.ot-card .ot-card-value { display: block; font-size: 2rem; margin-top: .35rem; font-weight: 700; }

.ot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: var(--bg-soft);
  color: var(--text-color);
}
/* Couleurs de badge : définies UNE fois (tokens --badge-*), contraste ≥ 4.5:1
   en clair comme en sombre (vérifié par labeller/tests/test_frontend_theme.py). */
.ot-badge--ok,   .badge.ok,   .mgmt-status-badge                { background: var(--badge-ok-bg);   color: var(--badge-ok-fg); }
.ot-badge--warn, .badge.warn, .badge.busy, .mgmt-status-badge.busy { background: var(--badge-warn-bg); color: var(--badge-warn-fg); }
.ot-badge--err,  .badge.err,  .mgmt-status-badge.err            { background: var(--badge-err-bg);  color: var(--badge-err-fg); }
.ot-badge--info, .badge.info                                    { background: var(--badge-info-bg); color: var(--badge-info-fg); }
.ot-badge--idle, .badge.idle                                    { background: var(--badge-idle-bg); color: var(--badge-idle-fg); }

/* ============================================================
   Barre flottante de sélection (page annotation)
   ============================================================ */
.selection-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 120%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: var(--surface-inverse);
  color: var(--on-inverse);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  font-family: var(--font-body);
  font-size: .92rem;
  z-index: 1500;
  transition: transform .25s ease;
}
.selection-bar.visible { transform: translate(-50%, 0); }
.selection-bar .selection-count { font-weight: 700; white-space: nowrap; }
.selection-bar button {
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.selection-bar .selection-affect {
  background: var(--secondary-color);
  color: #fff;
}
.selection-bar .selection-affect:hover { background: var(--secondary-color-dark); }
.selection-bar .selection-clear {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.selection-bar .selection-clear:hover { background: rgba(255, 255, 255, .26); }
@media (prefers-reduced-motion: reduce) {
  .selection-bar { transition: none; }
}

/* ============================================================
   Aide raccourcis clavier (page annotation)
   ============================================================ */
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 1rem;
}
.shortcuts-overlay.open { display: flex; }
.shortcuts-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  padding: 1.5rem 1.75rem;
  max-width: 420px;
  width: 100%;
  font-family: var(--font-body);
  color: var(--text-color);
}
.shortcuts-card h2 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}
.shortcuts-card table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.shortcuts-card td { padding: 6px 4px; border-bottom: 1px solid var(--border-subtle); }
.shortcuts-card tr:last-child td { border-bottom: none; }
.shortcuts-card kbd {
  display: inline-block;
  min-width: 26px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  background: var(--bg-soft);
  font-size: .82rem;
  font-family: inherit;
  font-weight: 600;
}
.shortcuts-card .shortcuts-close {
  margin-top: 1rem;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--secondary-color);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.shortcuts-card .shortcuts-close:hover { background: var(--secondary-color-dark); }

/* ============================================================
   Tables : système responsive partagé
   --------------------------------------------------------------
   Markup attendu :
     <div class="table-scroll">
       <table class="data-table [table--center] [table--divided]"
              style="--table-min-width: 760px;">…</table>
     </div>

   - .table-scroll : défile horizontalement + porte la bordure et les coins
     arrondis. C'est le conteneur (overflow) qui rogne les coins de façon
     cohérente sur TOUS les navigateurs ; overflow:hidden posé sur une
     <table> en border-collapse est ignoré par Firefox/Safari.
   - .data-table   : cellules unifiées + min-width (--table-min-width). Sous
     ce seuil, le conteneur défile au lieu d'écraser les colonnes.
   - th/td.col-actions : colonne épinglée à droite → les boutons d'action
     restent visibles même quand le tableau défile (cause des boutons coupés).
   ============================================================ */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: var(--table-min-width, 640px);
}
.data-table thead th {
  background: var(--bg-soft);
  color: var(--primary-color);
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}
.data-table tbody th,
.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }

/* Lignes alternées (zebra) + survol : séparation nette des lignes.
   Chaque ligne porte un fond opaque pour que la colonne épinglée
   (background: inherit) reste lisible pendant le défilement. */
.data-table tbody tr { background: var(--surface); }
.data-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.data-table tbody tr.row-clickable:hover { background: var(--row-hover); }

/* Modificateurs optionnels */
.data-table.table--center th,
.data-table.table--center td { text-align: center; }
.data-table.table--divided thead th + th,
.data-table.table--divided tbody th + th,
.data-table.table--divided tbody td + td { border-left: 1px solid var(--border-subtle); }

/* Colonne d'actions épinglée à droite (boutons toujours accessibles).
   background: inherit => suit la couleur de la ligne (zebra / survol). */
.data-table th.col-actions,
.data-table td.col-actions {
  position: sticky;
  right: 0;
  z-index: 1;
  background: inherit;
  box-shadow: -6px 0 6px -6px rgba(0, 0, 0, .15);
}
.data-table thead th.col-actions { background: var(--bg-soft); z-index: 2; }
.data-table td[colspan] { position: static; box-shadow: none; }

@media (max-width: 768px) {
  .data-table thead th,
  .data-table tbody th,
  .data-table tbody td { padding: 8px; }
}

/* ============================================================
   Modal dialogs — OT.ui.confirm / OT.ui.prompt (core/ui-dialog.js): the
   application's own questions instead of the browser's confirm() / prompt()
   (UI/UX review 2026-10-04, X5). The buttons are the page's .btn system.
   ============================================================ */
.ot-dialog {
  width: min(32rem, 92vw);
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-color);
  box-shadow: var(--shadow-float);
  font-family: var(--font-body);
}
.ot-dialog::backdrop { background: rgba(15, 30, 60, .45); }
.ot-dialog-title { margin: 0 0 .6rem; font-family: var(--font-heading); font-size: 1.1rem; color: var(--primary-color); }
.ot-dialog--danger .ot-dialog-title { color: var(--accent-color); }
.ot-dialog-message { margin: 0; font-size: .95rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ot-dialog-field { position: relative; margin: .9rem 0 0; }
.ot-dialog-field .form-control { width: 100%; padding-right: 4.5rem; }
.ot-dialog-reveal {
  position: absolute;
  right: .4rem;
  top: 1.95rem;
  padding: .2rem .55rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--secondary-color);
  font: inherit;
  font-size: .8rem;
  font-weight: 650;
  cursor: pointer;
}
.ot-dialog-error { margin: .4rem 0 0; color: var(--badge-err-fg); font-size: .85rem; }
.ot-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.ot-dialog .btn-danger { background: var(--accent-color); border-color: var(--accent-color); color: #fff; }

/* Pages built for a monitor (camera console, live view): say so on a phone
   instead of reflowing them (UI/UX review 2026-10-04, X22). */
.desktop-only-note { display: none; }
@media (max-width: 768px) {
  .desktop-only-note {
    display: block;
    margin: .5rem .75rem;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    background: var(--badge-warn-bg);
    color: var(--badge-warn-fg);
    font-size: .85rem;
  }
}

/* ============================================================
   Groupe d'actions en ligne (icônes d'un tableau)
   ============================================================ */
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.row-actions a,
.row-actions span.action-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.row-actions a:hover { background: var(--row-hover); }
.row-actions span.action-disabled { opacity: .38; cursor: not-allowed; }

/* Ligne de tableau cliquable */
tr.row-clickable { cursor: pointer; transition: background .12s ease; }
tr.row-clickable:hover { background: var(--row-hover); }

/* ============================================================
   Navbar « T-life » des pages autonomes (slide, annotation,
   comparaison, embeddings). Source unique — auparavant dupliquée
   (et désynchronisée) dans chacune des 4 pages.
   ============================================================ */
.navbar-tlife {
  background: var(--navbar-bg) !important;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none !important;
  border-radius: 0 !important;
}
.navbar, .navbar .container, .navbar .container-fluid { border-radius: 0 !important; }
.navbar-tlife .navbar-brand,
.navbar-tlife .nav-link,
.navbar-tlife .navbar-text { color: var(--primary-color) !important; }
.navbar-tlife .nav-link:hover,
.navbar-tlife .nav-link:focus { color: var(--secondary-color) !important; }
.navbar-tlife .nav-link.active,
.navbar-tlife .dropdown-toggle.show { color: var(--secondary-color) !important; position: relative; }
/* Underline accent only on plain nav-links — NOT on .dropdown-toggle, whose
   ::after is Bootstrap's caret triangle (overriding it would hide the caret). */
.navbar-tlife .nav-link.active:not(.dropdown-toggle)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 3px; background: var(--accent-color); border-radius: 2px;
}
.navbar-tlife .navbar-toggler { border-color: rgba(44, 62, 80, .25); }
.navbar-tlife .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(44,62,80,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Rangée d'actions de la navbar lame : passe proprement à la ligne au lieu
   de comprimer les boutons (qui sinon affichent leur texte sur 2 lignes et
   prennent des hauteurs inégales). Espacement horizontal via les marges
   Bootstrap (me-*) des boutons, vertical via row-gap quand ça enroule. */
.navbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: .5rem;
  min-width: 0;
}
.navbar-actions .btn { white-space: nowrap; }

/* User menu on the standalone tool bars (UI/UX review 2026-10-04, X11): the
   markup of core/includes/standalone_user_menu.html, driven by core/main.js
   (click, Escape, one menu open at a time). Scoped to the bar: Bootstrap's
   .dropdown is something else on these pages. */
.navbar-tlife .user-menu { position: relative; margin-left: .25rem; }
.navbar-tlife .user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 38px;
  padding: .3rem .75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary-color);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.navbar-tlife .user-menu-trigger::after { content: '▾'; font-size: .8em; }
.navbar-tlife .user-menu-trigger:hover,
.navbar-tlife .user-menu.is-open .user-menu-trigger { border-color: var(--secondary-color); color: var(--secondary-color); }
.navbar-tlife .user-menu .user-role { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.navbar-tlife .user-menu > .dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  min-width: 220px;
  margin: 0;
  padding: .4rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-float);
  display: none;
  z-index: 1100;
}
.navbar-tlife .user-menu.is-open > .dropdown { display: block; }
.navbar-tlife .user-menu .dropdown li { margin: 0; padding: 0; }
.navbar-tlife .user-menu .dropdown a,
.navbar-tlife .user-menu .dropdown button {
  display: block;
  width: 100%;
  padding: .55rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font: inherit;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.navbar-tlife .user-menu .dropdown a:hover,
.navbar-tlife .user-menu .dropdown button:hover,
.navbar-tlife .user-menu .dropdown a:focus-visible,
.navbar-tlife .user-menu .dropdown button:focus-visible { background: var(--secondary-color); color: #fff; }
.navbar-tlife .user-menu .dropdown form { margin: 0; }
/* Product menu of the standalone tool bars (includes/product_menus.html, compact):
   next to the logo, its list opens to the right; one heading per product above its
   pages (2026-10-13). */
.navbar-tlife .product-switcher { margin: 0 .5rem 0 .25rem; flex: 0 0 auto; }
.navbar-tlife .product-switcher > .dropdown { left: 0; right: auto; }
.navbar-tlife .product-switcher .dropdown-heading {
  padding: .45rem .9rem .2rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.navbar-tlife .product-switcher .dropdown-heading:not(:first-child) {
  margin-top: .25rem;
  border-top: 1px solid var(--border-subtle, var(--border-color));
}
.navbar-tlife .product-switcher .dropdown a.active { font-weight: 700; color: var(--secondary-color); }
.navbar-tlife .product-switcher .dropdown a.active:hover,
.navbar-tlife .product-switcher .dropdown a.active:focus-visible { color: #fff; }

/* ============================================================
   Navbar — barre d'outils GROUPÉE + icônes (slide / annotation)
   --------------------------------------------------------------
   Source unique pour les pages autonomes : au lieu d'une rangée
   plate de boutons identiques, les contrôles sont regroupés en
   clusters (View · Edit), les actions rares passent dans un menu
   « More ▾ », et les actions primaires (Save / Affect) ressortent.
   ============================================================ */

/* Marque + fil d'Ariane à gauche */
.nav-brand-wrap { display: flex; align-items: center; gap: .85rem; min-width: 0; flex-wrap: wrap; }
.nav-brand-wrap .navbar-brand { display: inline-flex; align-items: center; padding: 0; }

/* First row of the slide pages, the same on the viewer and the grid (owner, 2026-10-20):
   logo · Menu · Slides › slide › view · WSI / Grid · More · user menu. */
.navbar-tlife .view-switch {
  display: inline-flex; margin-left: .25rem; overflow: hidden;
  border: 1px solid var(--border-color); border-radius: .5rem; background: var(--white);
}
.navbar-tlife .view-switch a,
.navbar-tlife .view-switch button,
.navbar-tlife .view-switch span {
  display: inline-block; padding: .35rem .6rem; border: 0; background: var(--white); color: var(--primary-color);
  font-weight: 600; font-size: .9rem; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.navbar-tlife .view-switch > * + * { border-left: 1px solid var(--border-color); }
.navbar-tlife .view-switch a:hover { background: var(--secondary-color); color: #fff; }
.navbar-tlife .view-switch .active { background: var(--secondary-color); color: #fff; cursor: default; }
.navbar-tlife .view-switch .is-disabled { opacity: .5; cursor: not-allowed; }
.navbar-tlife .nav-top-actions { display: flex; align-items: center; gap: .4rem; }

/* Fil d'Ariane dans la navbar (slide / annotation) */
.navbar-breadcrumb { --bs-breadcrumb-divider: '›'; font-size: .95rem; margin-bottom: 0; }
.navbar-breadcrumb a { color: var(--secondary-color); text-decoration: none; }
.navbar-breadcrumb a:hover { text-decoration: underline; }
.navbar-breadcrumb .breadcrumb-item.active { color: var(--primary-color); font-weight: 600; }

/* Conteneur des actions (droite) : enroule au lieu de déborder */
.nav-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-width: 0; }

/* Cluster segmenté : regroupe des toggles liés (fond doux + bord) */
.nav-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
/* Boutons internes du cluster : pas de bord (segmenté) + teinte plus foncée
   pour le contraste sur le fond doux du groupe. On cible aussi le toggle d'un
   dropdown imbriqué directement, SANS toucher les boutons du menu déroulant
   (Select all / Deselect all) qui restent normaux. */
.nav-group > .btn,
.nav-group > .dropdown > .btn {
  --bs-btn-border-width: 0;
  --bs-btn-color: var(--secondary-color-dark);
}
.nav-group-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 .15rem 0 .4rem;
  user-select: none;
}

/* Séparateur vertical entre clusters */
.nav-divider {
  align-self: stretch;
  width: 1px;
  min-height: 26px;
  background: var(--border-color);
  margin: 0 .2rem;
}

/* Bouton « icône + libellé » */
.btn-ico { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }

/* État actif / enfoncé des toggles dans la navbar (vue, grille, labels…) */
.navbar-tlife .btn.active,
.navbar-tlife .btn[aria-pressed="true"] {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}

/* Action primaire mise en avant : ombre légère => hiérarchie visible */
.navbar-tlife .btn-primary { box-shadow: 0 1px 2px rgba(15, 30, 60, .16); }

/* Menu « More ▾ » : items confortables, icônes alignées, état on/off */
.nav-more-menu {
  min-width: 15rem;
  padding: .35rem;
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.nav-more-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem;
  border-radius: var(--radius-sm);
  color: var(--text-color);
  font-weight: 500;
}
.nav-more-menu .dropdown-item.active,
.nav-more-menu .dropdown-item:hover,
.nav-more-menu .dropdown-item:focus { background: var(--secondary-color); color: #fff; }
.nav-more-menu .dropdown-item.is-on { color: var(--secondary-color); font-weight: 600; }
.nav-more-menu .dropdown-item.is-on:hover,
.nav-more-menu .dropdown-item.is-on:focus { color: #fff; }
.nav-more-menu .dropdown-item .ico { color: var(--text-muted); }
.nav-more-menu .dropdown-item:hover .ico,
.nav-more-menu .dropdown-item:focus .ico,
.nav-more-menu .dropdown-item.active .ico { color: #fff; }
.nav-more-menu .dropdown-item.is-on .ico { color: var(--secondary-color); }
.nav-more-divider { margin: .35rem .2rem; border-top: 1px solid var(--border-color); }
.nav-more-status { padding: .3rem .6rem .15rem; font-size: .76rem; color: var(--text-muted); }

/* ============================================================
   Jeu d'icônes partagé (mask + currentColor)
   Usage : <span class="ico ico-grid"></span>  (hérite la couleur
   du bouton : bleu au repos, blanc au survol/actif).
   ============================================================ */
.ico {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: -2px;
  background-color: currentColor;
  -webkit-mask: var(--ico) no-repeat center / contain;
          mask: var(--ico) no-repeat center / contain;
}
.ico-lg { width: 18px; height: 18px; }
.ico-grid    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='18' height='18' rx='2'/><path d='M3 9h18M3 15h18M9 3v18M15 3v18'/></svg>"); }
.ico-eye     { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z'/><circle cx='12' cy='12' r='3'/></svg>"); }
.ico-pencil  { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/></svg>"); }
.ico-plus    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 5v14M5 12h14'/></svg>"); }
.ico-trash   { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/><path d='M10 11v6M14 11v6'/></svg>"); }
.ico-save    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2Z'/><path d='M17 21v-8H7v8M7 3v5h8'/></svg>"); }
.ico-check   { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>"); }
.ico-list    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/></svg>"); }
.ico-filter  { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 3H2l8 9.46V19l4 2v-8.54L22 3Z'/></svg>"); }
.ico-more    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><circle cx='12' cy='5' r='1.7'/><circle cx='12' cy='12' r='1.7'/><circle cx='12' cy='19' r='1.7'/></svg>"); }
.ico-prev    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m15 18-6-6 6-6'/></svg>"); }
.ico-next    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m9 18 6-6-6-6'/></svg>"); }
.ico-refresh { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 12a9 9 0 1 1-3-6.71L21 8'/><path d='M21 3v5h-5'/></svg>"); }
.ico-sort    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7 4v16M3 8l4-4 4 4M17 20V4M21 16l-4 4-4-4'/></svg>"); }
.ico-user    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='m16 11 2 2 4-4'/></svg>"); }
.ico-scatter { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 3v18h18'/><circle cx='8' cy='15' r='1.6' fill='black'/><circle cx='13' cy='9' r='1.6' fill='black'/><circle cx='17.5' cy='13' r='1.6' fill='black'/></svg>"); }
.ico-scan    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2'/><circle cx='12' cy='12' r='3'/></svg>"); }
.ico-help    { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3'/><path d='M12 17h.01'/></svg>"); }
.ico-burger  { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M4 6h16M4 12h16M4 18h16'/></svg>"); }
.ico-sliders { --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6'/></svg>"); }
.ico-download{ --ico: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/></svg>"); }

/* ============================================================
   Mode sombre (U15)
   --------------------------------------------------------------
   - Sans choix explicite : suit prefers-color-scheme.
   - Choix explicite (page Parameters, radios [data-theme-choice], theme.js) : attribut
     data-theme="dark|light" sur <html>, persisté dans localStorage.
   - Spécificité (0,2,0) : gagne sur les :root { … } redéfinis inline par les
     pages autonomes (--white, --bg-color, …) quel que soit l'ordre de chargement.
   - Bootstrap 5.3 suit via data-bs-theme (posé par theme.js).
   Les deux blocs ci-dessous DOIVENT rester identiques.
   ============================================================ */
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary-color: #dbe6f2;
  --secondary-color: #4b9fe0;
  --secondary-color-dark: #7ab8ea;
  --accent-color: #ff8a80;
  --success-color: #6fd6a0;
  --warning-color: #f5b86b;
  --text-color: #e3e9f0;
  --text-muted: #a9b6c5;
  --border-color: #3a4a5e;
  --border-subtle: #2c3a4b;
  --bg-color: #111922;
  --bg-soft: #1b2632;
  --navbar-bg: #16202b;
  --surface: #16202b;
  --surface-inverse: #2f4257;
  --on-inverse: #ffffff;
  --app-bg: #0e151d;
  --row-hover: #213247;
  --header-bg: #16202b;
  --white: #16202b;
  --selected-bg: #1f4466;
  --selected-text: #e3f0ff;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, .45);
  --badge-ok-bg: #123d2a;   --badge-ok-fg: #8fe3b6;
  --badge-warn-bg: #45300f; --badge-warn-fg: #f8cc8a;
  --badge-err-bg: #4a1a17;  --badge-err-fg: #ffb4ab;
  --badge-info-bg: #15324a; --badge-info-fg: #a6d2f5;
  --badge-idle-bg: #2a3441; --badge-idle-fg: #d3dae3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --primary-color: #dbe6f2;
    --secondary-color: #4b9fe0;
    --secondary-color-dark: #7ab8ea;
    --accent-color: #ff8a80;
    --success-color: #6fd6a0;
    --warning-color: #f5b86b;
    --text-color: #e3e9f0;
    --text-muted: #a9b6c5;
    --border-color: #3a4a5e;
    --border-subtle: #2c3a4b;
    --bg-color: #111922;
    --bg-soft: #1b2632;
    --navbar-bg: #16202b;
    --surface: #16202b;
    --surface-inverse: #2f4257;
    --on-inverse: #ffffff;
    --app-bg: #0e151d;
    --row-hover: #213247;
    --header-bg: #16202b;
    --white: #16202b;
    --selected-bg: #1f4466;
    --selected-text: #e3f0ff;
    --shadow-card: 0 8px 24px rgba(0, 0, 0, .45);
    --badge-ok-bg: #123d2a;   --badge-ok-fg: #8fe3b6;
    --badge-warn-bg: #45300f; --badge-warn-fg: #f8cc8a;
    --badge-err-bg: #4a1a17;  --badge-err-fg: #ffb4ab;
    --badge-info-bg: #15324a; --badge-info-fg: #a6d2f5;
    --badge-idle-bg: #2a3441; --badge-idle-fg: #d3dae3;
  }
}

/* Corrections ciblées en sombre : éléments qui gardaient un blanc codé en dur
   (pages autonomes Bootstrap, images de navbar, textes #111/#333). */
:root[data-bs-theme="dark"] body { background-color: var(--bg-color); color: var(--text-color); }
:root[data-bs-theme="dark"] .navbar-tlife .navbar-toggler-icon { filter: invert(1) brightness(1.4); }
:root[data-bs-theme="dark"] .navbar-tlife .navbar-toggler { border-color: var(--border-color); }
:root[data-bs-theme="dark"] .modal-content { background-color: var(--surface); color: var(--text-color); }
:root[data-bs-theme="dark"] .dropdown-menu { background-color: var(--surface); }
:root[data-bs-theme="dark"] img[src$="logo.png"] { background: #fff; border-radius: 6px; padding: 2px 4px; }
/* Icônes SVG monochromes (noires) servies en <img> : inversées pour rester
   visibles sur fond sombre (actions de la liste des lames, loupes, etc.). */
:root[data-bs-theme="dark"] img[src*="/icons/"] { filter: invert(1) brightness(.92); }


/* ============================================================
   Bandeau de conflit de version (409) — OT.api.showConflictBanner
   ============================================================ */
.version-conflict-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  background: #b71c1c;
  color: #fff;
  font: 14px var(--font-body);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.version-conflict-banner[hidden] { display: none; }
.version-conflict-banner button {
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}
.version-conflict-banner .vcb-reload { background: #fff; color: #b71c1c; border: 0; font-weight: 600; }
.version-conflict-banner .vcb-keep { background: transparent; color: #fff; border: 1px solid #fff; }

/* ============================================================
   Journal opérateur (OT.logPanel) : une ligne = un élément,
   plafonné, lignes identiques consécutives fusionnées (×N).
   ============================================================ */
.ot-log { overflow-y: auto; }
.ot-log .ot-log-line { white-space: pre-wrap; word-break: break-word; }
.ot-log .ot-log-count { font-weight: 700; opacity: .8; }
.ot-log .ot-log-error { color: #ff9b91; }
.ot-log .ot-log-warning { color: #f8cc8a; }

/* Indicateur de progression d'un job (role=progressbar) */
.job-progress {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-variant-numeric: tabular-nums;
}
.job-progress .job-progress-elapsed { opacity: .85; font-weight: 500; }

/* ============================================================
   Impression (G.13) : pas de navigation, menus latéraux, journaux ni
   barres d'outils ; hauteurs fixes libérées pour que tout s'imprime.
   ============================================================ */
@media print {
  :root { color-scheme: light; }
  html, body {
    background: #fff !important;
    color: #000 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding-top: 0 !important;
  }
  /* body > header/footer: the site chrome only, a page's own <header> (its
     title) still prints (2026-10-20). */
  body > header, nav, body > footer, .navbar, .skip-link, .standalone-skip-link,
  .side-menu, .selection-bar, #toast-region, .version-conflict-banner,
  .shortcuts-overlay, .nav-toolbar, .navbar-actions, .toolbar, [role="toolbar"],
  .ot-log, .status-log, .action-log, .log-panel, pre[id$="log"], [data-print="hide"],
  .btn, button {
    display: none !important;
  }
  main, .container, .page-container, .left-gallery, .left-gallery.shrink {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .annotation-list, .table-scroll, .stats-body, [style*="height"] {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .data-table { min-width: 0 !important; }
  .data-table th.col-actions, .data-table td.col-actions { display: none !important; }
  a[href]::after { content: none !important; }
  .tile, .ot-card, tr, img { break-inside: avoid; }
  .ot-card, .tile { box-shadow: none !important; }
}

/* Notifications (2026-10-03): warnings coloured like the badges, sticky errors
   keep a visible close button, long messages are clamped (full text in title),
   optional action button ("Details", "Copy"). */
.toast-item.toast-warning { border-left-color: var(--warning-color); }
.toast-item .toast-text { max-height: 9.5em; overflow: auto; overflow-wrap: anywhere; }
.toast-item .toast-count { font-size: .78rem; opacity: .75; margin-left: .25rem; }
.toast-item .toast-count:empty { display: none; }
.toast-item .toast-action {
  margin-left: .5rem;
  padding: .15rem .55rem;
  border: 1px solid currentColor;
  border-radius: .35rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  white-space: nowrap;
}
.toast-item .toast-action:hover,
.toast-item .toast-action:focus-visible { background: rgba(255, 255, 255, .12); }
.toast-item.toast-sticky .toast-close { opacity: 1; }
