* {
  box-sizing: border-box;
}
.invitation-result {
  max-width: 640px;
  margin: 24px auto;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
}
.invitation-result form {
  display: grid;
  gap: 10px;
}
.invitation-result input {
  width: 100%;
  padding: 10px;
}
.invitation-link {
  font-family: monospace;
}
.invitation-qr {
  margin: 1.25rem 0;
}
.invitation-qr > div {
  display: inline-block;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.invitation-qr img,
.invitation-qr canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.invitation-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.button-link {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  background: #e2e8f0;
  color: #1e293b;
  text-decoration: none;
}
.button-link:hover,
.button-link:focus-visible {
  background: #bfdbfe;
  color: #1d4ed8;
}
.form-error {
  color: #a40000;
  font-weight: bold;
}
.friends-panel {
  max-width: 640px;
  margin: 24px auto;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
}
.friends-panel li {
  margin: 0.5rem 0;
}
.welcome-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.message-notification {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.85rem;
  text-decoration: none;
}
.message-notification:hover {
  background: #b91c1c;
}
.home-message {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid #f0c36d;
  border-radius: 0.5rem;
  background: #fff8e7;
  color: #684b00;
}
.friend-unread {
  color: #dc2626;
  font-weight: bold;
}
.user-invitation {
  padding: 0.35rem 0;
}
.user-invitation > summary {
  cursor: pointer;
  font-weight: 700;
}
.user-invitation form {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.user-invitation label {
  font-size: 0.82rem;
}
.user-invitation input {
  width: 100%;
  min-width: 220px;
  padding: 0.45rem;
}
.user-invitation button {
  width: 100%;
}
.chat-page {
  max-width: 760px;
  margin: 2rem auto;
  padding: 1rem;
}
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}
.chat-message {
  max-width: 78%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #e5e7eb;
}
.chat-message.mine {
  align-self: flex-end;
  background: #dbeafe;
}
.chat-message.theirs {
  align-self: flex-start;
}
.chat-message p {
  margin: 0.35rem 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.chat-message time {
  color: #64748b;
  font-size: 0.8rem;
}
.chat-compose {
  display: grid;
  gap: 0.6rem;
}
.chat-compose textarea {
  min-height: 7rem;
  padding: 0.7rem;
  resize: vertical;
}
body {
  font-family: Arial;
  padding: 0px;
  margin-top: 0px;
}
.listLine {
  display: ruby-base;
}

#toolbar {
  position: sticky;
  top: 0;
  background: #eee;
  padding: 8px;
  display: block;
  align-items: center;
  gap: 0px;
  z-index: 1000;
  flex-wrap: wrap;
  width: 100%;
  min-height: 40px;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
}
/*#toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #eee;
    z-index: 1000;
    transform: translate3d(0,0,0);
    will-change: transform;
}*/

#toolbar a {
  text-decoration: none;
  font-size: 18px;
  padding-right: 5px;
}

#toolbar select {
  font-size: 10px;
}
.toolbar-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.app-version {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.18rem 0.42rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}
.user-menu-version {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.user-menu {
  position: relative;
}
.user-menu summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #b8b8b8;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.user-menu summary::-webkit-details-marker {
  display: none;
}
.user-menu summary:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.user-menu-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 1100;
  display: grid;
  min-width: 240px;
  padding: 0.55rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
#toolbar .user-menu-panel a {
  display: block;
  padding: 0.55rem;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #111;
}
#toolbar .user-menu-panel a:hover {
  background: #f1f5f9;
}
.user-menu-heading {
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}
.user-menu-empty {
  margin: 0;
  padding: 0.55rem;
  color: #64748b;
  font-size: 0.85rem;
}
.user-menu-panel hr {
  width: 100%;
  margin: 0.35rem 0;
  border: 0;
  border-top: 1px solid #e2e8f0;
}
.user-menu-panel form {
  margin: 0;
}
.user-menu-panel button {
  width: 100%;
  padding: 0.55rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
}
.user-menu-panel button:hover {
  background: #fef2f2;
  color: #b91c1c;
}
.toolbar-reminders {
  display: grid;
  max-height: 18rem;
  overflow-y: auto;
}
#toolbar .toolbar-reminders a {
  display: grid;
  gap: 0.1rem;
  border-left: 3px solid #93c5fd;
}
#toolbar .toolbar-reminders a.is-due {
  border-left-color: #dc2626;
  background: #fef2f2;
}
.toolbar-reminders time,
.toolbar-reminders small {
  color: #64748b;
  font-size: 0.78rem;
}
.reminder-toast-region {
  position: fixed;
  top: 4.5rem;
  right: 1rem;
  z-index: 2000;
  display: grid;
  gap: 0.6rem;
  width: min(24rem, calc(100vw - 2rem));
}
.reminder-toast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px #0f172a38;
}
.reminder-toast a {
  overflow-wrap: anywhere;
  font-weight: 700;
}
.reminder-toast time {
  color: #64748b;
  font-size: 0.82rem;
}
.reminder-toast button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  padding: 0.1rem 0.35rem;
}
.reminders-page {
  width: min(70rem, calc(100% - 2rem));
  margin: 1.5rem auto;
}
.reminders-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}
.reminder-card {
  display: grid;
  grid-template-columns: minmax(10rem, auto) 1fr auto;
  align-items: center;
  gap: 0.35rem 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #fff;
}
.reminder-card.is-due {
  border-left-color: #dc2626;
  background: #fff7f7;
}
.reminder-card time {
  font-weight: 700;
}
.reminder-card-status {
  justify-self: end;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
}
.reminder-card.is-due .reminder-card-status {
  color: #991b1b;
  background: #fee2e2;
}
.reminder-card small {
  grid-column: 2 / -1;
  color: #64748b;
}
.reminder-edit-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(13rem, 1.2fr) 1fr 1fr;
  gap: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e2e8f0;
}
.reminder-edit-form label,
.reminder-edit-form fieldset {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.reminder-edit-form label input {
  width: 100%;
}
.reminder-edit-form fieldset input {
  width: 5rem;
}
.reminder-edit-form fieldset small {
  grid-column: auto;
  width: 100%;
}
.reminder-edit-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.reminder-edit-actions .danger {
  color: #b91c1c;
}
@media (max-width: 650px) {
  .reminder-card {
    grid-template-columns: 1fr auto;
  }
  .reminder-card a,
  .reminder-card small {
    grid-column: 1 / -1;
  }
  .reminder-edit-form {
    grid-template-columns: 1fr;
  }
}
.topbar,
.subbar {
  display: flex;
}
.centrer {
  width: fit-content;
  margin: auto;
}
.nav {
  width: fit-content;
  margin: auto;
}
.project {
  display: block;
  padding: 15px;
  margin: 10px 0;
  background: #f2f2f2;
  border-radius: 8px;
  text-decoration: none;
  color: black;
  font-size: 18px;
  width: 80%;
}

/*img {
    cursor: pointer;
    transition: 0.2s;
}
img:hover {
    transform: scale(1.05);
}
*/
#viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
}
#viewer img {
  max-width: 90%;
  max-height: 90%;
}
.loginForm {
  margin-bottom: 20px;
  position: relative;
}

.loginForm input {
  width: 100%;
  padding: 8px;
  font-size: 16px;
}

.history {
  display: none;
  background: #f5f5f5;
  padding: 6px;
  margin-top: 5px;
  border-radius: 6px;
}
.field-history > summary {
  width: max-content;
  max-width: 100%;
  cursor: pointer;
  list-style: none;
}
.field-history > summary::-webkit-details-marker {
  display: none;
}
.field-history > summary b::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.35rem;
  color: #64748b;
  transition: transform 0.15s ease;
}
.field-history[open] > summary b::before {
  transform: rotate(90deg);
}
.field-history[open] > .history {
  display: block;
}

.suggestions {
  position: absolute;
  background: white;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  max-height: 13rem;
  overflow: auto;
  z-index: 20;
  box-shadow: 0 8px 20px #0f172a24;
}
.suggestions[hidden] {
  display: none;
}
.suggestions button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
}
.suggestions button:hover,
.suggestions button.active {
  background: #e0f2fe;
}
.value-combobox {
  position: relative;
  width: 100%;
}
.value-combobox-control {
  display: flex;
  width: 100%;
}
.value-combobox-control .fieldInput {
  flex: 1;
  min-width: 0;
}
.value-combobox-toggle {
  flex: 0 0 auto;
  min-width: 2.5rem;
  margin-left: -1px;
}
.password-field-editor,
.password-field-unlock,
.vault-unlock-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.password-field-editor .password-field-input { flex: 1 1 16rem; }
.password-field-editor label { display: inline-flex; align-items: center; gap: 0.35rem; }
.password-field-length { width: 5rem; }

.photo {
  width: 110px;
  margin: 5px;
  border: 1px solid #ccc;
  cursor: pointer;
}

/*ELEMENTS*/

/* Fond sombre */
#filters {
  position: fixed; /* reste collé à l'écran */
  top: 8%; /* centré verticalement */
  left: 2%; /* centré horizontalement */
  width: 96vw; /* 90% largeur écran */
  height: 90dvh; /* 90% hauteur écran */

  background: white;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);

  overflow-y: auto;
  overflow-x: auto;

  display: none; /* caché par défaut */
  z-index: 1000;
  box-sizing: border-box;
  padding: 0.8rem;
}
/*
#filters{
display:none;
border:1px solid #ccc;
padding:10px;
margin-bottom:10px;
border-radius:6px;

position:sticky;
    top:50px;
    background:#eee;
    padding:8px;
   
    align-items:center;
    gap:8px;
    z-index:1001;
    flex-wrap:wrap;
    width: 100%;
}
*/
.element {
  border: 1px solid #ccc;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 6px;
}

.attribute {
  margin-left: 10px;
}
.quick-edit-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 10px 0.8rem;
  padding: 0.45rem;
  border-radius: 6px;
  background: #f1f5f9;
}
.quick-edit-field input:not([type="checkbox"]),
.quick-edit-field select,
.quick-edit-field textarea {
  min-width: 180px;
  max-width: 100%;
  padding: 0.4rem 0.5rem;
}
.quick-edit-field textarea {
  width: 100%;
  min-height: 4rem;
  resize: vertical;
}
.quick-edit-status {
  color: #475569;
  font-size: 0.8rem;
}
.typed-list-field {
  flex-wrap: wrap;
}
.typed-list-field .typed-checkbox {
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  cursor: pointer;
}
.typed-list-field.is-readonly {
  color: #64748b;
  background: #e5e7eb;
  opacity: 0.75;
}
.typed-list-field.is-readonly label {
  cursor: not-allowed;
}
.typed-list-field .typed-rating {
  padding: 0;
}

img.photo {
  max-width: 100px;
  margin: 5px;
}
.image-attribute {
  margin-top: 0.45rem;
}
.version-gallery {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.4rem 0;
  overflow-x: auto;
}
.version-thumbnail {
  position: relative;
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #e2e8f0;
  overflow: hidden;
  cursor: pointer;
}
.version-thumbnail:first-child {
  border-color: #3b82f6;
}
.version-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.version-thumbnail span {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 0.7rem;
}
.version-thumbnail:hover,
.version-thumbnail:focus-visible {
  border-color: #1d4ed8;
  transform: translateY(-1px);
}
.image-editor {
  width: min(96vw, 1100px);
  max-height: 94dvh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.45);
}
.image-editor::backdrop {
  background: rgba(15, 23, 42, 0.72);
}
.image-editor-header,
.image-editor-footer,
.image-editor-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}
.image-editor-header {
  justify-content: space-between;
  border-bottom: 1px solid #cbd5e1;
}
.image-editor-header button {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
}
.image-editor-tools {
  flex-wrap: wrap;
  border-bottom: 1px solid #cbd5e1;
}
.image-editor-tools label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.image-editor-tools input[type="number"] {
  width: 6.5rem;
  padding: 0.35rem;
}
.image-editor-tools input[type="text"] {
  width: 12rem;
  padding: 0.35rem;
}
.image-editor-tools button,
.image-editor-footer button {
  padding: 0.5rem 0.7rem;
}
.image-editor-tools button.active {
  border-color: #1d4ed8;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}
.image-editor-stage {
  display: grid;
  place-items: center;
  max-height: 65dvh;
  padding: 1rem;
  overflow: auto;
  background: #334155;
}
.image-editor-stage canvas {
  display: block;
  max-width: none;
  max-height: none;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  cursor: crosshair;
  touch-action: none;
}
.image-editor-footer {
  justify-content: flex-end;
  border-top: 1px solid #cbd5e1;
}
.image-editor-footer span {
  margin-right: auto;
  color: #475569;
}
@media (max-width: 600px) {
  .version-thumbnail {
    width: 76px;
    height: 76px;
  }
  .image-editor-tools {
    align-items: flex-start;
  }
  .image-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }
}
.filterRow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
  padding: 5px;
  background: white;
}

/* .filterRow label {
  flex: 0 0 220px;
  min-width: 220px;
  overflow-wrap: anywhere;
} */
.filterRow .filterOperator {
  width: 3.25rem;
  min-width: 3.25rem;
  padding: 0.35rem;
  font-weight: 700;
  text-align: center;
}
.filterExtraConditions,
.filterExtraCondition,
.filterAddConditions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.filterExtraCondition {
  padding-left: 0.35rem;
  border-left: 2px solid #94a3b8;
}
.filterExtraCondition strong {
  color: #334155;
  font-size: 0.8rem;
}
.filterAddCondition,
.filterRemoveCondition {
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
}
.filterRemoveCondition {
  color: #b91c1c;
}
.filter-values-prefilter {
  position: sticky;
  top: -0.8rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.7rem 0;
  padding: 0.65rem;
  border-bottom: 1px solid #cbd5e1;
  background: #fff;
  font-weight: 700;
}
.filter-values-prefilter input {
  flex: 1;
  min-width: 10rem;
  padding: 0.55rem;
}
.active-filter-tags {
  position: sticky;
  top: var(--toolbar-height, 3.5rem);
  z-index: 900;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0;
  padding: 0.65rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  box-shadow: 0 2px 8px #0f172a14;
}
.active-sort-field {
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.85rem;
  font-weight: 700;
}
.active-sort-direction {
  padding: 0.32rem 0.55rem;
  border: 1px solid #a78bfa;
  border-radius: 999px;
  background: #fff;
  color: #5b21b6;
}
.active-sort-recent,
.active-sort-modified {
  padding: 0.32rem 0.55rem;
  border: 1px solid #64748b;
  border-radius: 999px;
  background: #fff;
  color: #334155;
}
.filter-sort-none {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0;
  padding: 0.45rem;
  font-weight: 700;
}
.filter-sort-radio {
  display: grid;
  place-items: center;
  min-width: 1.8rem;
  min-height: 1.8rem;
  border-radius: 50%;
  /*  background: #ede9fe; */
}
.filter-sort-radio input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}
.active-filter-tag {
  padding: 0.32rem 0.55rem;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 0.85rem;
}
.active-filter-tag span {
  margin-left: 0.25rem;
  color: #b91c1c;
  font-weight: 700;
}
@media (max-width: 700px) {
  #filters {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    padding: 0.65rem;
  }
  #filters form {
    width: 100%;
  }
  #fieldsContainer {
    max-height: none;
    overflow: visible;
  }
  .filterRow {
    display: grid;
    grid-template-columns: auto 3.25rem minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.65rem 0.25rem;
    border-bottom: 1px solid #e2e8f0;
  }
  .filter-values-prefilter {
    top: -0.65rem;
    align-items: stretch;
    flex-direction: column;
  }
  .filter-values-prefilter input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
  .filterRow label {
    grid-column: 2 / -1;
    min-width: 0;
    width: 100%;
    flex-basis: auto;
    overflow-wrap: anywhere;
  }
  .filterRow > .filter-sort-radio {
    grid-column: 2;
    grid-row: 1;
    width: auto;
  }
  .filterRow > .filter-field-toggle {
    grid-column: 3;
    grid-row: 1;
  }
  .filterRow > .dragHandle {
    grid-row: 1 / 3;
  }
  .filterRow > .filterOperator {
    grid-column: 2;
  }
  .filterRow > select:not(.filterOperator) {
    grid-column: 3;
    width: 100%;
    min-width: 0;
  }
  .filterExtraConditions,
  .filterAddConditions {
    grid-column: 2 / -1;
  }
  .filterExtraCondition {
    width: 100%;
  }
  .filterExtraCondition select:not(.filterOperator) {
    flex: 1;
    min-width: 7rem;
  }
  .active-filter-tags {
    align-items: flex-start;
  }
}
/*Element*/

.field {
  margin-bottom: 20px;
  position: relative;
}

.field input {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  box-sizing: border-box;
}
.field-description {
  margin: 0.35rem 0;
  color: #64748b;
  font-size: 0.9rem;
}
.field-long-text {
  width: 100%;
  min-height: 8rem;
  padding: 0.65rem;
  resize: vertical;
}
.typed-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0;
}
.typed-checkbox input {
  width: 1.2rem;
  height: 1.2rem;
}
.typed-rating {
  display: flex;
  gap: 0.15rem;
  padding: 0.35rem 0;
}
.rating-star {
  padding: 0.1rem;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.rating-star.selected {
  color: #f59e0b;
}
.rating-star:hover,
.rating-star:focus-visible {
  color: #fbbf24;
  transform: scale(1.08);
}
.rating-star:disabled {
  cursor: default;
}
.gps-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 0.75rem;
}
.gps-inputs label {
  font-size: 0.85rem;
  color: #475569;
}
.gps-inputs input {
  margin-top: 0.25rem;
}
.gps-actions {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.gps-actions button {
  padding: 0.55rem 0.75rem;
}
.gps-status {
  color: #475569;
  font-size: 0.85rem;
}
.gps-map {
  grid-column: 1/-1;
  width: 100%;
  height: 320px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #e2e8f0;
}
@media (max-width: 600px) {
  .gps-inputs {
    grid-template-columns: 1fr;
  }
  .gps-map {
    height: 260px;
  }
}
.project-link-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.project-link-inputs label {
  display: grid;
  gap: 0.3rem;
  color: #475569;
  font-size: 0.85rem;
}
.project-link-inputs select {
  width: 100%;
  padding: 0.55rem;
}
.project-link-open,
.project-link-open-list {
  grid-column: 1/-1;
}
.project-link-open-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}
.project-link-display {
  font-weight: 600;
}
.element-quick-add {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}
.element-quick-add > strong {
  flex-basis: 100%;
}
.element-quick-new-options {
  max-width: 100%;
  font-size: 0.85rem;
  padding: 0.45rem 0;
}
.element-quick-new-options summary { cursor: pointer; color: #475569; }
.element-quick-new-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding-top: 0.5rem;
}
.element-quick-new-controls label { display: flex; align-items: center; }
.element-quick-new-controls input[type="checkbox"] {
  min-height: 0;
  width: auto;
  margin: 0;
  padding: 0;
}
.debug-element-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.filter-schema-group {
  margin: 0.5rem 0;
  border-top: 1px solid #cbd5e1;
}
.filter-schema-group > summary {
  padding: 0.6rem 0;
  cursor: pointer;
  font-weight: 600;
}
.element-title-id { font-weight: normal; color: #64748b; overflow-wrap: anywhere; }
.element-quick-schema-control {
  display: flex;
  align-items: end;
  gap: 0.4rem;
}
.element-quick-schema-control label { flex: 1; }
.element-quick-add label {
  display: grid;
  gap: 0.3rem;
  color: #475569;
  font-size: 0.85rem;
}
.element-quick-field-combobox {
  min-width: min(20rem, 100%);
}
.element-quick-field-combobox > label {
  margin-bottom: 0.3rem;
}
.element-quick-add select,
.element-quick-add input {
  min-height: 2.4rem;
  padding: 0.45rem 0.55rem;
}
.element-quick-add-value {
  flex: 1;
  min-width: min(16rem, 100%);
}
.element-quick-add-value input {
  width: 100%;
  box-sizing: border-box;
}
.plan-field-editor {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.plan-field-editor label {
  display: grid;
  gap: 0.3rem;
  min-width: min(100%, 280px);
  font-weight: 700;
}
.plan-field-editor select {
  width: 100%;
  padding: 0.55rem;
}
.plan-field-editor p {
  margin: 0;
  width: 100%;
  color: #475569;
}
@media (max-width: 600px) {
  .project-link-inputs {
    grid-template-columns: 1fr;
  }
  .project-link-open {
    grid-column: 1;
  }
}
.typed-images {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}
.typed-images .photo {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
}
.typed-image-upload {
  display: inline-block;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: #eef2f7;
  cursor: pointer;
}
.typed-image-upload input {
  display: block;
  margin-top: 0.4rem;
}
.typed-camera-button {
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  cursor: pointer;
}
.typed-camera-button:hover,
.typed-camera-button:focus-visible {
  background: #bfdbfe;
}

/* Timeline des dernières versions */
.timeline {
  margin: 16px 10px 24px;
  padding: 14px 16px 10px;
  border: 1px solid #d8e0e8;
  border-radius: 10px;
  background: #f8fafc;
  overflow-x: auto;
}
.timeline-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.timeline-heading h2 {
  margin: 0;
  font-size: 17px;
}
.timeline-heading span {
  color: #64748b;
  font-size: 13px;
}
.timeline-track {
  position: relative;
  height: 92px;
  min-width: 520px;
  margin: 12px 12px 0;
}
.timeline-track::before {
  content: "";
  position: absolute;
  top: 37px;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 3px;
  background: #cbd5e1;
}
.timeline-item {
  position: absolute;
  left: var(--position);
  top: 0;
  width: 100px;
  margin-left: -50px;
  color: #1e3a5f;
  font-size: 12px;
  text-align: center;
  text-decoration: none;
  transform: translateX(0);
}
.timeline-dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 29px auto 7px;
  border: 3px solid #f8fafc;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 2px #2563eb;
}
.timeline-item:hover .timeline-dot,
.timeline-item:focus .timeline-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px #f59e0b;
}
.timeline-date,
.timeline-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-date {
  color: #64748b;
}
.timeline-label {
  margin-top: 2px;
  font-weight: bold;
}

/*gallery*/
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.card {
  border: 1px solid #ccc;
  padding: 10px;
  width: 200px;
  border-radius: 8px;
}
.card img {
  width: 100%;
}
.meta {
  font-size: 12px;
}

/**/
/* --- ELEMENT --- */
.element {
  border: 1px solid #ccc;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 10px;
  background: white;
  transition: 0.2s;
  position: relative;
}

/* sélection visuelle */
.element.selected {
  background: #d0ebff;
  border-color: #339af0;
}

/* Seule la case de sélection de la fiche est placée dans l'angle. */
.element > label:first-child > input[name="selected_ids[]"] {
  position: absolute;
  top: 10px;
  right: 10px;
  transform: scale(1.3);
}

/* --- bouton flottant --- */
#bulkBar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #222;
  color: white;
  padding: 10px;
  display: block;
  /*    display:flex;
    gap:10px;
    align-items:center;
    justify-content:space-between;*/
  z-index: 999;
}

/* caché si rien sélectionné */
#bulkBar.hidden {
  display: none;
}

#bulkBar select,
#bulkBar button {
  font-size: 10px;
  padding: 6px;
}
#renameBuilder {
  display: none;
  transition: all 0.2s ease;
}
#fieldsContainer {
  max-height: 80%;
  overflow-y: auto;
  position: relative; /* 🔥 IMPORTANT */
}

.dragHandle {
  padding: 0.55rem;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: grab;
  touch-action: none;
}

.filterRow.is-dragging {
  opacity: 0.35;
}
.filterRow.filter-drop-before {
  border-top: 4px solid #2563eb;
}
.filterRow.filter-drop-after {
  border-bottom: 4px solid #2563eb;
}
#countSelected {
  margin-right: auto;
}
.sharing-page {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.sharing-form,
.sharing-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
  padding: 1rem;
  margin: 0.75rem 0;
  border-radius: 8px;
}
.sharing-row strong {
  min-width: 10rem;
}

.sharing-user-group {
    margin: 1rem 0;
    padding: .75rem;
    border: 1px solid var(--border, #ccc);
    border-radius: .5rem;
}

.sharing-user-group > h4 {
    margin: 0 0 .75rem;
}

.qrcode-page { max-width: 1200px; margin: 1rem auto; padding: 0 1rem; }
.qrcode-controls form, .qrcode-reader form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.qrcode-sheet { display: grid; grid-template-columns: repeat(6, var(--qr-cell-width)); grid-template-rows: repeat(8, var(--qr-cell-height)); gap: 0; width: max-content; margin: 1rem 0; background: white; color: black; }
.qrcode-label { display: flex; flex-direction: column; align-items: center; justify-content: start; width: var(--qr-cell-width); height: var(--qr-cell-height); padding: 1mm; box-sizing: border-box; margin: 0; break-inside: avoid; }
.qrcode-label small { display: block; width: var(--qr-mm); height: 5mm; margin: 0; font: 6pt/2.4mm monospace; overflow-wrap: anywhere; text-align: center; }
.qrcode-canvas { flex: none; width: var(--qr-mm); height: var(--qr-mm); box-sizing: border-box; padding: 2mm; background: white; }
.qrcode-canvas img, .qrcode-canvas canvas { width: 100% !important; height: 100% !important; max-width: none !important; image-rendering: pixelated; }
.qrcode-reader video { display: block; width: min(100%, 560px); margin: .75rem 0; border-radius: .5rem; }
.qrcode-reader video[hidden] { display: none; }
.qrcode-registry { overflow-x: auto; }
.qrcode-registry table { width: 100%; border-collapse: collapse; }
.qrcode-registry th, .qrcode-registry td { padding: .55rem; border-bottom: 1px solid #cbd5e1; text-align: left; }
.qrcode-selection-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; margin-bottom: .75rem; }
.qrcode-field-editor { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.qrcode-scanner-dialog { width: min(92vw, 620px); border: 0; border-radius: .75rem; }
.qrcode-scanner-dialog::backdrop { background: #0f172a99; }
.qrcode-scanner-dialog video { display: block; width: 100%; margin: .75rem 0; background: #111827; border-radius: .5rem; }
.qrcode-scanner-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
@media print {
  body > :not(.qrcode-page), .qrcode-page > :not(.qrcode-sheet) { display: none !important; }
  .qrcode-page { max-width: none; margin: 0; padding: 0; }
  html, body { margin: 0 !important; padding: 0 !important; }
  .qrcode-sheet { display: grid !important; margin: 0; break-inside: avoid; }
  .qrcode-sheet + .qrcode-sheet { break-before: page; }
  @page { size: A4; margin: 10mm; }
}
.schema-card {
  background: #fff;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
}
.schema-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}
.schema-fields > div {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.4rem;
  border-bottom: 1px solid #ddd;
}
.share-elements {
  max-height: 22rem;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.4rem;
  width: 100%;
}
.share-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  grid-column: 1/-1;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.35rem 0;
  background: #fff;
}
.share-selection-actions button {
  padding: 0.35rem 0.6rem;
}
.schema-collapse > summary {
  padding: 0.65rem 0.75rem;
  border-radius: 7px;
  background: #eef2f7;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}
.schema-collapse > summary:hover,
.schema-collapse > summary:focus-visible {
  background: #dbeafe;
  color: #1d4ed8;
}
.schema-collapse-content {
  padding-top: 1rem;
}
.schema-global-merge {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
}
.schema-project-filter {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 8px;
  background: #fff;
}
.schema-project-filter label {
  font-weight: 700;
}
.schema-project-filter select {
  min-width: 240px;
  padding: 0.5rem;
}
.schema-global-merge > summary {
  cursor: pointer;
  font-weight: 700;
}
.schema-global-merge-form {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  margin-top: 1rem;
}
.schema-global-merge-form label {
  display: grid;
  flex: 1;
  gap: 0.35rem;
  font-weight: 700;
}
.schema-global-merge-form select {
  width: 100%;
  padding: 0.5rem;
}
@media (max-width: 700px) {
  .schema-project-filter,
  .schema-global-merge-form {
    align-items: stretch;
    flex-direction: column;
  }
  .schema-global-merge-form > span {
    transform: rotate(90deg);
    align-self: center;
  }
}
.schema-add-attribute {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
}
.schema-name-row {
  display: flex;
  align-items: end;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.schema-name-row label {
  display: grid;
  flex: 1;
  gap: 0.3rem;
}
.schema-name-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
}
.schema-add-attribute label {
  display: grid;
  flex: 1;
  gap: 0.35rem;
  font-weight: 700;
}
.schema-add-attribute input {
  width: 100%;
  padding: 0.5rem 0.6rem;
}
.field-add-combobox {
  min-width: min(22rem, 100%);
}
.schema-add-attribute .field-add-combobox,
.schema-add-attribute .quick-field-control {
  display: block;
  width: 100%;
}
.schema-add-attribute .quick-field-control {
  display: flex;
}
@media (max-width: 600px) {
  .schema-add-attribute,
  .schema-name-row {
    align-items: stretch;
    flex-direction: column;
  }
}
.schema-fields-table {
  margin: 1rem 0;
  overflow-x: auto;
  border: 1px solid #d8dee6;
  border-radius: 8px;
}
.schema-default-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #d8dee6;
  font-weight: 700;
}
.schema-field-header,
.schema-field-row {
  display: grid;
  grid-template-columns:
    44px minmax(140px, 1fr) 70px minmax(145px, 1fr)
    80px 90px 80px 105px minmax(260px, 2fr);
  align-items: center;
  min-width: 1139px;
}
.schema-permissions-help {
  padding: 0.75rem 1rem;
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
  color: #334155;
}
.schema-field-header {
  background: #eef2f7;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.schema-field-header span,
.schema-field-row > * {
  padding: 0.65rem 0.75rem;
}
.schema-column-toggle {
  padding: 0.65rem 0.25rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.schema-column-toggle:hover,
.schema-column-toggle:focus-visible {
  background: #dbeafe;
  color: #1d4ed8;
}
.schema-field-header span:not(:first-child):not(:last-child),
.schema-field-row > label:not(:last-child) {
  text-align: center;
}
.schema-toggle-cell {
  display: grid;
  align-self: stretch;
  place-items: center;
  cursor: pointer;
}
.schema-toggle-cell:hover {
  background: #e0f2fe;
}
.schema-toggle-cell input {
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}
.schema-field-row:nth-child(odd) {
  background: #f8fafc;
}
.schema-field-row + .schema-field-row {
  border-top: 1px solid #e2e8f0;
}
.schema-drag-handle {
  align-self: stretch;
  width: 44px;
  padding: 0;
  border-radius: 0;
  touch-action: none;
}
.schema-field-row.is-dragging {
  opacity: 0.55;
}
.schema-field-row.schema-drop-before {
  border-top: 4px solid #2563eb;
}
.schema-field-row.schema-drop-after {
  border-bottom: 4px solid #2563eb;
}
.schema-field-name {
  position: relative;
  padding: 0.65rem 0.75rem;
}
.schema-field-name > strong {
  display: flex;
  align-items: center;
}
.schema-field-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  margin-right: 0.5rem;
  padding: 0.12rem 0.4rem;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.schema-field-count:hover,
.schema-field-count:focus-visible,
.schema-field-count[aria-expanded="true"] {
  background: #bfdbfe;
  color: #1d4ed8;
}
.schema-field-occurrences {
  position: absolute;
  z-index: 20;
  width: min(32rem, 75vw);
  max-height: 22rem;
  overflow-y: auto;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-weight: 400;
}
.schema-field-occurrences ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.schema-field-occurrences li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0;
}
.schema-occurrence-project + .schema-occurrence-project {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e2e8f0;
}
.schema-occurrence-project > strong {
  display: block;
  margin-bottom: 0.25rem;
}
.schema-field-occurrences li a {
  overflow-wrap: anywhere;
}
.schema-field-occurrences li small {
  flex: 0 0 auto;
  color: #64748b;
}
.schema-field-description {
  width: 100%;
  min-width: 220px;
  padding: 0.45rem 0.55rem;
}
.schema-field-row select {
  width: 100%;
  padding: 0.4rem;
}
.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;
}
.schema-manager {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid #bbb;
  border-radius: 8px;
}
.schema-manager summary {
  cursor: pointer;
  font-weight: 700;
}
.toolbar-schema-table-wrap {
  width: 100%;
  margin: 1rem 0;
  overflow-x: auto;
  border: 1px solid #d8dee6;
  border-radius: 8px;
}
.toolbar-schema-table {
  width: 100%;
  min-width: 570px;
  border-collapse: collapse;
  background: #fff;
}
.toolbar-schema-table th,
.toolbar-schema-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}
.toolbar-schema-table thead th {
  position: sticky;
  top: 0;
  background: #eef2f7;
  color: #334155;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.toolbar-schema-table tbody th {
  text-align: left;
}
.toolbar-schema-table td {
  text-align: center;
}
.toolbar-schema-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.toolbar-schema-table tbody tr:last-child > * {
  border-bottom: 0;
}
.toolbar-schema-table label {
  display: grid;
  min-height: 1.8rem;
  place-items: center;
  cursor: pointer;
}
.toolbar-schema-table input {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}
.plan-project-group {
  margin: 1.5rem 0;
}
.plan-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}
.plan-library-card {
  margin: 0;
}
.plan-library-card > img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  margin: 0.75rem 0;
  border: 1px solid #cbd5e1;
}
.plan-library-card form,
.plan-upload-card form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.75rem 0;
}
.plan-library-card label,
.plan-upload-card label {
  display: grid;
  gap: 0.3rem;
}
.plan-library-card input,
.plan-library-card select,
.plan-upload-card input,
.plan-upload-card select {
  max-width: 100%;
  padding: 0.45rem;
}
.plan-bulk-actions {
  position: sticky;
  top: 0.5rem;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.8rem;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  box-shadow: 0 2px 8px #0f172a14;
}
.plan-selection-actions,
.plan-bulk-action {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.plan-selection-actions {
  align-items: center;
}
.plan-bulk-action label {
  display: grid;
  gap: 0.25rem;
  font-weight: 700;
}
.plan-bulk-action select,
.plan-bulk-action input {
  min-width: 180px;
  padding: 0.4rem;
}
.plans-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8dee6;
  border-radius: 9px;
  background: #fff;
}
.plans-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}
.plans-table th,
.plans-table td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}
.plans-table thead {
  background: #eef2f7;
}
.plans-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.plans-table tbody tr:last-child > * {
  border-bottom: 0;
}
.plans-table th small {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-weight: 400;
}
.plan-select-cell {
  display: grid;
  min-width: 2rem;
  min-height: 2rem;
  place-items: center;
  cursor: pointer;
}
.plan-select {
  width: 1.1rem;
  height: 1.1rem;
}
.plan-table-preview {
  display: block;
  width: 90px;
  height: 64px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  object-fit: cover;
}
.element-plan-preview {
  position: relative;
  display: inline-block;
  width: 180px;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  vertical-align: middle;
}
.element-plan-preview img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: contain;
}
.element-plan-preview > span {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px #0009;
  transform: translate(-50%, -50%);
}
.implantation-debug-info {
  padding: .2rem .45rem;
  border-radius: 4px;
  background: #fef3c7;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .78rem;
}
.plan-capability {
  display: inline-block;
  margin: 0.12rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.plan-capability.allowed {
  background: #dcfce7;
  color: #166534;
}
.plan-capability.denied {
  background: #f1f5f9;
  color: #94a3b8;
  text-decoration: line-through;
}
.plan-implantation-count {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
}
@media (max-width: 700px) {
  .plan-bulk-actions {
    position: static;
  }
  .plan-bulk-action {
    width: 100%;
  }
  .plan-bulk-action label {
    flex: 1;
  }
  .plan-bulk-action select,
  .plan-bulk-action input {
    width: 100%;
    min-width: 0;
  }
}
.plan-update-open {
  display: block;
  margin-top: 0.45rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
}
.plan-revision-editor {
  width: min(96vw, 1100px);
  max-width: none;
  max-height: 94vh;
  padding: 1rem;
  border: 0;
  border-radius: 10px;
}
.plan-revision-editor::backdrop {
  background: #0f172acc;
}
.plan-revision-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plan-revision-heading h2 {
  margin: 0.2rem 0;
}
.plan-revision-heading button {
  font-size: 1.2rem;
}
.plan-revision-file-fields {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.plan-revision-file-fields label {
  display: grid;
  gap: 0.35rem;
}
.plan-revision-file-fields input[type="number"] {
  width: 6rem;
}
.plan-revision-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.8rem 0;
}
.plan-revision-controls label {
  display: grid;
  gap: 0.2rem;
}
.plan-revision-controls input[type="number"] {
  width: 6rem;
}
.plan-revision-stage {
  max-height: 58vh;
  overflow: auto;
  border: 1px solid #94a3b8;
  background: repeating-conic-gradient(#e2e8f0 0 25%, #fff 0 50%) 50%/20px 20px;
}
.plan-revision-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: move;
  touch-action: none;
}
.plan-revision-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
}
.plan-revision-footer span {
  flex: 1;
}
.plan-revision-footer button {
  font-weight: 700;
}
.plan-scale-control {
  min-width: min(100%, 280px);
}
.plan-scale-control > span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.plan-scale-control input[type="range"] {
  width: 180px;
  max-width: 35vw;
}
.plan-name-editor {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.plan-name-input {
  width: min(260px, 24vw);
  min-width: 140px;
  padding: 0.35rem 0.45rem;
  font-weight: 700;
}
.plan-name-editor button {
  padding: 0.35rem 0.45rem;
}
@media (max-width: 700px) {
  .plan-revision-controls label {
    width: 100%;
  }
  .plan-revision-controls input[type="range"] {
    width: 100%;
  }
  .plan-revision-stage {
    max-height: 48vh;
  }
  .plan-revision-footer {
    align-items: stretch;
    flex-direction: column;
  }
}
.project-summary {
  list-style: none;
}
.home-recent {
  margin: 0.15rem 0 1rem 2rem;
  padding: 0.55rem 0.8rem;
  border-left: 3px solid #cbd5e1;
  background: #f8fafc;
  max-width: 42rem;
}
.home-recent small {
  font-weight: 700;
  color: #475569;
}
.home-recent ol {
  margin: 0.4rem 0 0;
  padding-left: 1.5rem;
}
.home-recent li {
  padding: 0.18rem 0;
}
.home-recent time {
  margin-left: 0.7rem;
  color: #64748b;
  font-size: 0.85em;
}
.home-recent-empty {
  margin: 0.35rem 0 0;
  color: #64748b;
}
.preferences-page {
  max-width: 42rem;
  margin: 2rem auto;
  padding: 1rem;
}
.preferences-card {
  margin: 1rem 0;
  background: #fff;
  padding: 1.25rem;
  border-radius: 10px;
}
.preferences-card label {
  display: block;
  margin-bottom: 1rem;
}
.preferences-card input,
.preferences-card select,
.preferences-card textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  max-width: 28rem;
  padding: 0.45rem;
}
.xml-summary-page {
  max-width: 72rem;
}
.xml-summary-metrics dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 0;
}
.xml-summary-metrics dl div {
  min-width: 0;
}
.xml-summary-metrics dt {
  color: #475569;
  font-size: 0.85rem;
}
.xml-summary-metrics dd {
  margin: 0.2rem 0 0;
  font-size: 1.6rem;
  font-weight: 700;
}
.xml-summary-table-wrap {
  overflow-x: auto;
}
.xml-insights {
  margin: 1.5rem 0;
}
.xml-insights h2,
.xml-insights h3 {
  margin-bottom: 0.45rem;
}
.xml-insights ul {
  margin-top: 0;
  padding-left: 1.4rem;
}
.xml-insights li {
  margin-bottom: 0.35rem;
}
.xml-summary-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.xml-summary-table th,
.xml-summary-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #dbe3ec;
  text-align: left;
  vertical-align: top;
}
.xml-summary-table thead {
  background: #e8eef5;
}
.xml-summary-table td:nth-child(2) {
  white-space: nowrap;
}
.xml-summary-table code {
  overflow-wrap: anywhere;
}
.xml-attribute {
  display: inline-block;
  margin: 0 0.7rem 0.25rem 0;
}
.xml-attribute small,
.xml-example {
  display: block;
  margin-top: 0.2rem;
  color: #475569;
  font-size: 0.82rem;
}
.xml-example {
  max-width: 24rem;
  overflow-wrap: anywhere;
}
.xml-extraction-form {
  max-width: none;
}
.xml-value-search {
  border-left: 4px solid #0f766e;
}
.xml-search-results {
  margin: 1.5rem 0;
}
.xml-search-results form,
.xml-node-card form,
.xml-summary-table form {
  margin: 0;
}
.xml-navigation-form {
  margin: 0;
  flex: 0 0 auto;
}
.xml-node-card {
  margin: 1.5rem 0;
}
.xml-node-context {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}
.xml-node-context dt {
  color: #475569;
  font-size: 0.85rem;
}
.xml-node-context dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
}
.xml-scope-form {
  margin-top: 1rem;
}
.xml-scope-form select {
  max-width: 100%;
}
.xml-probe-value {
  background: #fff7ed;
}
.xml-probe-value small {
  display: inline-block;
  margin-left: 0.4rem;
  color: #9a3412;
  font-weight: 700;
}
.xml-relation-source {
  background: #ecfdf5;
}
.xml-relation-source small {
  display: inline-block;
  margin-left: 0.4rem;
  color: #166534;
  font-weight: 700;
}
.xml-relation-reference {
  background: #eff6ff;
}
.xml-relation-reference small {
  display: inline-block;
  margin-left: 0.4rem;
  color: #1d4ed8;
  font-weight: 700;
}
.xml-record-path {
  margin-top: -0.5rem;
  color: #475569;
  overflow-wrap: anywhere;
}
.xml-field-picker {
  margin: 1rem 0;
  border: 1px solid #cbd5e1;
}
.xml-field-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.xml-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.35rem 1rem;
  max-height: 24rem;
  overflow-y: auto;
}
.xml-field-grid label {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
  margin: 0;
}
.xml-field-grid input {
  width: auto;
  margin: 0.15rem 0 0;
}
.xml-field-grid code {
  overflow-wrap: anywhere;
}
.xml-field-grid small {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  overflow-wrap: anywhere;
}
.xml-join-summary {
  border-left: 4px solid #2563eb;
}
.xml-preview-page {
  max-width: 96rem;
  margin: 2rem auto;
  padding: 1rem;
}
.xml-preview-actions {
  display: flex;
  gap: 0.6rem;
  margin: 1rem 0;
}
.xml-preview-table th {
  min-width: 12rem;
}
.xml-preview-table th input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 0.45rem;
}
.xml-preview-table thead tr:first-child th {
  background: #dbeafe;
}
.xml-preview-table .xml-filter-row th {
  background: #f1f5f9;
}
.xml-preview-table td {
  max-width: 28rem;
  overflow-wrap: anywhere;
}
.password-preferences-form {
  border-left: 4px solid #3b82f6;
}
.caldav-preferences-form {
  border-left: 4px solid #0ea5e9;
}
.caldav-preferences-form label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.caldav-preferences-form input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.preferences-warning {
  padding: 0.75rem 1rem;
  border-left: 4px solid #dc2626;
  background: #fef2f2;
  color: #991b1b;
}
.preferences-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.preferences-actions .danger {
  background: #dc2626;
  color: #fff;
}
.project-tree {
  margin: 0.35rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid #e2e8f0;
}
.project-tree:first-of-type {
  padding-left: 0.5rem;
  border-left: 0;
}
.create-subproject,
.gallery-link {
  margin-left: 0.45rem;
  text-decoration: none;
}
.project-hierarchy-manager .schema-card {
  margin: 0.7rem 0 0.7rem min(calc(var(--project-depth) * 1.5rem), 40%);
}
.project-hierarchy-manager form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.project-hierarchy-manager label {
  display: grid;
  gap: 0.3rem;
}
.project-hierarchy-manager select {
  padding: 0.45rem;
}
.project-description {
  max-width: 42rem;
  margin: 0.25rem 0 0.5rem 1.5rem;
  color: #64748b;
  font-size: 0.9rem;
}
.project-csv-import {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.project-csv-import legend {
  font-weight: 700;
}
.project-csv-import p {
  margin-top: 0;
  color: #64748b;
}
.history-user {
  display: inline-block;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.82em;
  font-weight: 700;
}
.fieldInput.field-unsaved {
  border-color: #d97706;
  box-shadow: 0 0 0 2px #fef3c7;
}
.fieldInput.field-saving {
  cursor: progress;
}
.element-management {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.inbox-schema-builder {
  margin: 1rem;
  padding: 1rem;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
}
.inbox-schema-builder form,
.inbox-schema-fields {
  display: grid;
  gap: 0.65rem;
}
.inbox-schema-fields {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.inbox-schema-builder label {
  display: grid;
  gap: 0.3rem;
}
.inbox-schema-builder input,
.inbox-schema-builder select {
  min-width: 0;
  padding: 0.5rem;
}
.inbox-existing-schema {
  display: flex;
  align-items: end;
  gap: 0.5rem;
}
.inbox-existing-schema label { flex: 1; }
.empty-project-creator {
  width: min(42rem, calc(100% - 2rem));
  margin: 2rem auto;
  padding: 1.25rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  box-shadow: 0 4px 16px #0f172a12;
}
.empty-project-creator h1 {
  margin-top: 0;
}
.element-schema-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.element-schema-form label {
  display: grid;
  gap: 0.25rem;
  font-weight: 700;
}
.element-schema-form select {
  min-width: min(22rem, 70vw);
}
.element-delete-button {
  margin-left: auto;
  border-color: #dc2626;
  color: #991b1b;
  background: #fff;
}
.element-delete-button:hover {
  background: #fee2e2;
}
@media (max-width: 600px) {
  .element-management,
  .element-schema-form {
    align-items: stretch;
  }
  .element-schema-form,
  .element-schema-form label,
  .element-schema-form select,
  .element-delete-button {
    width: 100%;
    margin-left: 0;
  }
}
.history-duration-tool {
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  box-shadow: 0 2px 8px #0f172a14;
}
.history-duration-tool > div:first-child {
  display: grid;
  gap: 0.15rem;
}
.history-duration-tool > div:first-child span {
  color: #475569;
  font-size: 0.85rem;
}
.history-duration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.history-duration-result {
  flex-basis: 100%;
}
.history-duration-result:empty {
  display: none;
}
.history-duration-result ol {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.5rem;
}
.history-version-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.35rem 0.2rem;
  border-bottom: 1px solid #e2e8f0;
}
.history-version-row:last-child {
  border-bottom: 0;
}
.history-version-selector {
  display: grid;
  min-width: 1.6rem;
  min-height: 1.6rem;
  place-items: center;
  cursor: pointer;
}
.history-version-select {
  width: 1.05rem;
  height: 1.05rem;
}
.history-version-content {
  flex: 1;
  min-width: 0;
}
.history-time-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
}
.history-time-toggle:hover,
.history-time-toggle:focus-visible {
  text-decoration: underline;
}
.history-stopwatch {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.82em;
  font-weight: 700;
}
.history-stopwatch[hidden] {
  display: none;
}
.history-reminder {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.history-reminder input {
  max-width: 12.5rem;
  padding: 0.2rem 0.3rem;
}
.history-reminder-save {
  padding: 0.2rem 0.35rem;
}
.history-reminder-save.has-reminder {
  border-color: #d97706;
  background: #fef3c7;
}
.field-reminder-indicator {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.85em;
}
.field-reminder-indicator[hidden] {
  display: none;
}
.history-reminder small {
  max-width: 8rem;
  color: #475569;
}
.history-delete {
  padding: 0.2rem 0.35rem;
}
@media (max-width: 600px) {
  .history-duration-tool {
    position: static;
    margin: 0.75rem 0;
  }
  .history-duration-actions {
    width: 100%;
  }
  .history-duration-actions button {
    flex: 1;
  }
  .history-version-row {
    align-items: center;
  }
  .history-version-content time {
    display: block;
  }
}
.projects-manager {
  max-width: 1500px;
}
.projects-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.projects-heading h1 {
  margin-bottom: 0.25rem;
}
.projects-heading p {
  margin-top: 0;
  color: #64748b;
}
.project-status:empty {
  display: none;
}
.project-status {
  padding: 0.6rem 0.8rem;
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
}
.projects-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8dee6;
  border-radius: 9px;
  background: #fff;
}
.projects-table {
  width: 100%;
  border-collapse: collapse;
}
.projects-table th,
.projects-table td {
  padding: 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}
.projects-table thead {
  background: #eef2f7;
}
.drag-cell {
  width: 2.5rem;
  text-align: center !important;
}
.project-drag-handle {
  padding: 0.55rem;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  cursor: grab;
  touch-action: none;
}
.project-name {
  display: block;
  padding-left: calc(var(--project-depth) * 1.25rem);
  white-space: nowrap;
}
.project-name::before {
  content: "↳";
  display: inline-block;
  width: 1.2rem;
  color: #94a3b8;
}
.project-row[data-depth="0"] .project-name::before {
  content: "📁";
}
.project-description-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 240px;
}
.project-description-form textarea {
  width: 100%;
  min-width: 180px;
  resize: vertical;
}
.project-schema-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 220px;
}
.project-schema-form select {
  min-width: 140px;
}
.project-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.project-actions form {
  display: inline;
}
.project-delete {
  border-color: #fecaca;
  background: #fff1f2;
}
.project-row.is-dragging {
  opacity: 0.35;
}
.project-row.drop-before > * {
  border-top: 4px solid #2563eb;
}
.project-row.drop-after > * {
  border-bottom: 4px solid #2563eb;
}
.project-row.drop-inside > * {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #2563eb;
}
@media (max-width: 700px) {
  .projects-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .projects-table,
  .projects-table tbody,
  .projects-table tr,
  .projects-table th,
  .projects-table td {
    display: block;
  }
  .projects-table thead {
    display: none;
  }
  .project-row {
    position: relative;
    padding: 0.7rem 0;
    border-bottom: 2px solid #cbd5e1;
  }
  .projects-table .project-row > * {
    padding: 0.4rem 0.75rem;
    border: 0;
  }
  .projects-table .drag-cell {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: auto;
  }
  .project-row > th {
    padding-right: 3.5rem !important;
  }
  .project-description-form,
  .project-schema-form {
    min-width: 0;
  }
  .project-schema-form select {
    flex: 1;
  }
  .project-row.drop-before {
    border-top: 4px solid #2563eb;
  }
  .project-row.drop-after {
    border-bottom: 4px solid #2563eb;
  }
  .project-row.drop-inside {
    background: #dbeafe;
  }
}
.project-name-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: calc(var(--project-depth) * 1.25rem);
  min-width: 220px;
}
.project-name-form input {
  min-width: 150px;
  width: 100%;
  padding: 0.4rem;
}
.project-name-form a {
  flex: none;
  text-decoration: none;
}
.plan-project-filter {
  display: flex;
  align-items: end;
  margin: 1rem 0;
  padding: 0.8rem;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
}
.plan-project-filter label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
}
.plan-project-filter select {
  min-width: 260px;
  padding: 0.5rem;
}
.schema-orphans-filter {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0;
  font-weight: 700;
}
.schema-orphans-filter input {
  width: auto;
}
.schema-orphan-badge {
  display: inline-block;
  margin: 0.2rem 0 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.8rem;
  font-weight: 700;
}
.quick-element-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}
.quick-element-panel h3 {
  margin-top: 0;
}
.quick-element-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.quick-element-form select,
.quick-element-form input {
  padding: 0.55rem;
}
.quick-schema-filter select {
  max-width: 16rem;
}
.quick-field-combobox {
  position: relative;
}
.quick-field-control {
  display: flex;
}
.quick-field-control input {
  box-sizing: border-box;
  min-width: 190px;
  border-radius: 4px 0 0 4px;
}
.quick-field-control button {
  min-width: 2.5rem;
  padding: 0.4rem;
  border-left: 0;
  border-radius: 0 4px 4px 0;
}
.quick-field-options {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  left: 0;
  z-index: 1100;
  max-height: min(45vh, 18rem);
  overflow-y: auto;
  border: 1px solid #94a3b8;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 5px 16px #0f172a33;
}
.quick-field-options[hidden] {
  display: none;
}
.quick-field-options button {
  display: block;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #0f172a;
  text-align: left;
}
.quick-field-options button[hidden] {
  display: none;
}
.quick-field-options button:hover,
.quick-field-options button.active {
  background: #dbeafe;
}
.quick-element-form .quick-value {
  flex: 1;
  min-width: 220px;
}
.quick-element-form .quick-value input {
  box-sizing: border-box;
  width: 100%;
}
.quick-photo-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.quick-photo-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.quick-element-message {
  font-weight: 700;
}
.quick-element-results {
  margin: 0.8rem 0 0;
  padding-left: 1.25rem;
}
.quick-element-results li {
  padding: 0.3rem;
}
.quick-element-results span {
  display: block;
  color: #475569;
}
@media (max-width: 650px) {
  .quick-element-form > * {
    width: 100%;
  }
  .quick-photo-button {
    box-sizing: border-box;
  }
  .quick-element-form button {
    width: auto;
  }
  .quick-field-control input,
  .quick-field-combobox,
  .quick-schema-filter select {
    width: 100%;
    max-width: none;
  }
  .quick-field-options button {
    width: 100%;
  }
}
.quick-photo-button.has-photo {
  border-color: #16a34a;
  background: #dcfce7;
}
.quick-inbox-list {
  display: grid;
  gap: 0.45rem;
}
.quick-inbox-element {
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(12rem, 1fr) auto minmax(
      10rem,
      auto
    );
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
}
.quick-inbox-attribute {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin-right: 0.8rem;
  margin-bottom: 0.35rem;
}
.quick-inbox-attribute-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.82em;
}
.quick-inbox-attribute-tools .history-stopwatch {
  margin-left: 0;
}
.quick-inbox-attribute-tools .history-reminder input {
  font-size: inherit;
}
.quick-inbox-photos {
  display: flex;
  gap: 0.35rem;
}
.quick-inbox-photos .photo {
  width: 58px;
  height: 58px;
  border-radius: 5px;
  object-fit: cover;
}
.quick-inbox-date {
  color: #64748b;
  white-space: nowrap;
}
.quick-inbox-move select {
  max-width: 15rem;
}
.quick-camera-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
}
.quick-camera-dialog::backdrop {
  background: #000;
}
.quick-camera-stage {
  display: grid;
  width: 100%;
  height: calc(100% - 76px);
  place-items: center;
}
.quick-camera-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.quick-camera-actions {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: #000b;
}
.quick-camera-actions button {
  font-size: 1rem;
}
.quick-inbox-select {
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: middle;
}
.quick-inbox-edit {
  margin-left: 0.75rem;
  font-weight: 400;
  text-decoration: none;
}
@media (max-width: 800px) {
  .quick-inbox-element {
    grid-template-columns: auto auto 1fr;
  }
  .quick-inbox-attributes {
    grid-column: 3;
  }
  .quick-inbox-date {
    grid-column: 2 / 3;
  }
  .quick-inbox-move {
    grid-column: 3;
  }
}
.quick-inbox-element:has(.quick-inbox-select:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}
#quickInboxBulkBar {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: 9px;
  background: #1e293b;
  color: #fff;
  box-shadow: 0 6px 24px #0005;
}
#quickInboxBulkBar.hidden {
  display: none;
}
.debug-json-trigger {
  cursor: help;
}
.element-json-dialog {
  width: min(92vw, 900px);
  max-height: 85vh;
  padding: 0;
  border: 1px solid #64748b;
  border-radius: 8px;
  box-shadow: 0 20px 60px #0008;
}
.element-json-dialog::backdrop {
  background: #0008;
}
.element-json-dialog-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1rem;
  background: #1e293b;
  color: #fff;
}
.element-json-dialog-header button {
  font-size: 1.35rem;
}
.element-json-dialog pre {
  box-sizing: border-box;
  max-height: calc(85vh - 3.5rem);
  margin: 0;
  padding: 1rem;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  font: .85rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#quickInboxBulkBar select,
#quickInboxBulkBar button {
  padding: 0.45rem;
}

.title-composer { margin: 1rem 0; }
.title-composer-part { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0; }
.title-composer-preview { white-space: pre-wrap; }

.filter-group-toggle { display: inline-flex; align-items: center; gap: .3rem; margin-left: .8rem; font-size: .85em; font-weight: normal; cursor: pointer; }

.projects-table .project-row[hidden] { display: none; }
.project-tree-controls { display: flex; gap: .5rem; margin-bottom: .75rem; }
.project-branch-toggle { flex: 0 0 2rem; cursor: pointer; }
