:root {
  --ocr-bg: #0f1c24;
  --ocr-bg-2: #1a3344;
  --ocr-accent: #3db8a0;
  --ocr-accent-2: #f0b429;
  --ocr-text: #f4f7f8;
  --ocr-muted: #a8b8c0;
  --ocr-danger: #e85d4c;
  --ocr-card: rgba(255, 255, 255, 0.06);
}

* { box-sizing: border-box; }

body.app-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ocr-text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 184, 160, 0.25), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(240, 180, 41, 0.18), transparent 55%),
    linear-gradient(160deg, var(--ocr-bg), var(--ocr-bg-2));
  font-family: "Segoe UI", "Source Sans 3", system-ui, sans-serif;
}

.app-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ocr-text) !important;
  text-decoration: none;
  font-size: 1.05rem;
  line-height: 1.2;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1rem 5rem;
}

/* —— Modern top nav (chips + optional admin burger) —— */
.app-topnav {
  position: sticky;
  top: 0;
  z-index: 1030;
  margin-bottom: 0.75rem;
  background: rgba(15, 28, 36, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.app-topnav-shell {
  max-width: 1100px;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.app-topnav-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.app-nav-burger {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ocr-text);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
}

.app-nav-burger:hover,
.app-nav-burger:focus-visible {
  background: rgba(61, 184, 160, 0.18);
  border-color: rgba(61, 184, 160, 0.45);
  outline: none;
}

.app-topnav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
}

/* Fixed-width slot: <select> intrinsic min-width otherwise bleeds over the avatar. */
.app-nav-workshop {
  flex: 0 0 5.15rem;
  width: 5.15rem;
  max-width: 5.15rem;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.app-nav-workshop .nav-workshop-select.form-select,
.app-nav-workshop .nav-workshop-select {
  display: block;
  width: 5.15rem !important;
  max-width: 5.15rem !important;
  min-width: 0 !important;
  min-height: 2rem;
  padding: 0.15rem 1.35rem 0.15rem 0.3rem !important;
  background-color: rgba(255, 255, 255, 0.08);
  background-position: right 0.35rem center;
  background-size: 12px 10px;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--ocr-text);
  font-size: 0.75rem !important;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.app-nav-workshop .nav-workshop-select.is-home-workshop {
  color: var(--ocr-accent);
  border-color: rgba(61, 184, 160, 0.55);
  background: rgba(61, 184, 160, 0.12);
  font-weight: 600;
}

.app-nav-workshop .nav-workshop-select.is-home-workshop:focus {
  color: var(--ocr-accent);
  border-color: var(--ocr-accent);
  box-shadow: 0 0 0 0.15rem rgba(61, 184, 160, 0.25);
}

.app-nav-workshop .nav-workshop-select.is-away-workshop {
  color: #f5b4ac;
  border-color: rgba(232, 93, 76, 0.7);
  background: rgba(232, 93, 76, 0.14);
  font-weight: 600;
}

.app-nav-workshop .nav-workshop-select.is-away-workshop:focus {
  color: #f8c5be;
  border-color: var(--ocr-danger);
  box-shadow: 0 0 0 0.15rem rgba(232, 93, 76, 0.28);
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ocr-text);
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
  z-index: 2;
  isolation: isolate;
}

.nav-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 0 0 2rem;
  display: block;
  background: #152833;
  position: relative;
  z-index: 2;
}

.nav-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ocr-muted);
  font-size: 1rem;
}

.nav-user-text {
  display: none;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.nav-user-name {
  font-size: 0.86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 10rem;
}

.nav-user-meta {
  font-size: 0.72rem;
}

.app-nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  line-height: 1;
}

.app-nav-logout-label {
  display: none;
}

.app-chip-rail {
  position: relative;
  margin: 0 -0.15rem;
}

.app-chip-rail::before,
.app-chip-rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.25rem;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.app-chip-rail::before {
  left: 0;
  background: linear-gradient(90deg, rgba(15, 28, 36, 0.95), transparent);
}

.app-chip-rail::after {
  right: 0;
  background: linear-gradient(270deg, rgba(15, 28, 36, 0.95), transparent);
}

.app-chip-rail.is-overflow-left::before,
.app-chip-rail.is-overflow-right::after {
  opacity: 1;
}

.app-chip-scroll {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.1rem 0.15rem 0.25rem;
}

.app-chip-scroll::-webkit-scrollbar {
  display: none;
}

.app-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(244, 247, 248, 0.78);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  scroll-snap-align: start;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.app-chip i {
  font-size: 1rem;
  opacity: 0.9;
}

.app-chip:hover,
.app-chip:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.app-chip.is-active {
  color: #06201a;
  background: var(--ocr-accent);
  border-color: rgba(255, 255, 255, 0.08);
  font-weight: 650;
}

.app-chip.is-active i {
  opacity: 1;
}

.app-admin-offcanvas {
  background: #13262f;
  max-width: min(20rem, 92vw);
}

.app-admin-list {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.app-admin-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.15rem;
  color: rgba(244, 247, 248, 0.85);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.app-admin-link:hover,
.app-admin-link:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
}

.app-admin-link.is-active {
  background: rgba(61, 184, 160, 0.14);
  border-left-color: var(--ocr-accent);
  color: #fff;
}

@media (min-width: 768px) {
  .nav-user-text {
    display: flex;
  }

  .app-nav-logout {
    width: auto;
    height: auto;
    padding: 0.25rem 0.55rem;
  }

  .app-nav-logout-label {
    display: inline;
  }

  .app-nav-workshop {
    flex: 0 0 7.25rem;
    width: 7.25rem;
    max-width: 7.25rem;
  }

  .app-nav-workshop .nav-workshop-select.form-select,
  .app-nav-workshop .nav-workshop-select {
    width: 7.25rem !important;
    max-width: 7.25rem !important;
    font-size: 0.82rem !important;
    padding: 0.25rem 1.6rem 0.25rem 0.45rem !important;
    background-position: right 0.45rem center;
  }
}

@media (min-width: 992px) {
  .app-chip-rail::before,
  .app-chip-rail::after {
    display: none;
  }

  .app-chip-scroll {
    flex-wrap: wrap;
    overflow: visible;
    scroll-snap-type: none;
  }
}

.card-soft {
  background: var(--ocr-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  backdrop-filter: blur(8px);
  padding: 1.25rem;
}

.btn-accent {
  background: var(--ocr-accent);
  border-color: var(--ocr-accent);
  color: #06201a;
  font-weight: 600;
}

.btn-accent:hover,
.btn-accent:focus {
  background: #34a58f;
  border-color: #34a58f;
  color: #06201a;
}

.form-control,
.form-check-input {
  /* background-color only — shorthand would wipe Bootstrap form-switch images */
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f3f7fa;
}

.form-control:focus {
  background-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: var(--ocr-accent);
  box-shadow: 0 0 0 0.2rem rgba(61, 184, 160, 0.25);
}

/* Explicit toggle switch look (Bootstrap form-switch + dark theme) */
.form-switch .form-check-input {
  width: 2.75em;
  height: 1.4em;
  margin-left: 0;
  margin-top: 0.15em;
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28243, 247, 250, 0.85%29'/%3e%3c/svg%3e");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 2em;
  border-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background-position 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  float: none;
  flex-shrink: 0;
}

.form-switch .form-check-input:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28243, 247, 250, 0.85%29'/%3e%3c/svg%3e");
  border-color: var(--ocr-accent);
  box-shadow: 0 0 0 0.2rem rgba(61, 184, 160, 0.25);
}

.form-switch .form-check-input:checked {
  background-color: var(--ocr-accent);
  border-color: var(--ocr-accent);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2306201a'/%3e%3c/svg%3e");
  background-position: right center;
}

.form-switch .form-check-input:checked:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2306201a'/%3e%3c/svg%3e");
}

/* Chrome autofill otherwise washes out dark-theme text */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #f3f7fa;
  transition: background-color 99999s ease-in-out 0s;
  caret-color: #f3f7fa;
}

.form-control::placeholder {
  color: var(--ocr-muted);
}

.form-label,
.form-check-label,
.text-muted-ocr {
  color: var(--ocr-muted);
}

.text-ocr-accent {
  color: var(--ocr-accent);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.status-box {
  min-height: 3rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.status-box .alert {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rejected-list ul {
  padding-left: 1.1rem;
  max-width: 100%;
}

.rejected-list li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rejected-file {
  display: inline;
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: 0.92em;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.preview-item {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 4 / 3;
  background: #000;
}

.preview-remove {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.preview-remove:hover {
  background: rgba(232, 93, 76, 0.92);
}

label.btn.disabled,
label.btn.pe-none {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.extra-counter {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--ocr-text, #e8eef7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.extra-counter.is-full {
  color: #fff;
  background: rgba(232, 93, 76, 0.28);
  border-color: rgba(232, 93, 76, 0.65);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item.invalid {
  outline: 2px solid var(--ocr-danger);
}

.preview-item.advise {
  outline: 2px solid rgba(234, 179, 8, 0.85);
}

.preview-badge {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  right: 0.4rem;
  max-width: calc(100% - 0.8rem);
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.65);
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.to-top {
  --scroll-remain: 100;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: none;
  z-index: 40;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--ocr-accent), var(--ocr-accent)) padding-box,
    conic-gradient(
      from -90deg,
      rgba(255, 255, 255, 0.95) calc(var(--scroll-remain) * 1%),
      rgba(255, 255, 255, 0.18) 0
    ) border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.to-top:hover,
.to-top:focus {
  background:
    linear-gradient(#34a58f, #34a58f) padding-box,
    conic-gradient(
      from -90deg,
      #fff calc(var(--scroll-remain) * 1%),
      rgba(255, 255, 255, 0.22) 0
    ) border-box;
  background-clip: padding-box, border-box;
  border-color: transparent;
}

.to-top.visible {
  display: inline-flex;
  align-items: center;
}

.workshop-quick-filter .workshop-quick-filter-prefix {
  background: rgba(61, 184, 160, 0.18);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--ocr-accent, #3db8a0);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.workshop-code-hr {
  color: var(--ocr-accent, #3db8a0);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.workshop-code-rest {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.workshop-quick-filter .form-control {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.nav-workshop-select {
  width: auto;
  min-width: 0;
  max-width: 11rem;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.8rem;
}

.nav-workshop-select option {
  color: #111;
}

.archive-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.archive-preview-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

.archive-preview-wrap .archive-preview-img {
  display: block;
  max-width: 100%;
  height: auto;
}

.archive-size-overlay {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.72);
  color: #f3f4f6;
  font-size: 0.75rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.archive-row-grouped {
  border-left: 3px solid hsl(var(--archive-group-hue, 160), 55%, 45%) !important;
  padding-left: 0.65rem !important;
}

.archive-group-badge {
  background: rgba(61, 184, 160, 0.22);
  color: var(--ocr-accent, #3db8a0);
  font-weight: 600;
  border: 1px solid rgba(61, 184, 160, 0.35);
}

.archive-extra-badge {
  background: rgba(158, 176, 196, 0.18);
  color: #9eb0c4;
  font-weight: 600;
  border: 1px solid rgba(158, 176, 196, 0.4);
}

.archive-sibling {
  display: inline-block;
  max-width: 88px;
  text-align: center;
}

.archive-sibling .archive-thumb {
  width: 88px;
  height: 66px;
}

.kpi-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.85rem 0.9rem;
}

.kpi-label {
  color: var(--ocr-muted);
  font-size: 0.8rem;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.2rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
}

a.status-chip:hover {
  filter: brightness(1.15);
  border-color: rgba(255, 255, 255, 0.35);
}

.status-chip {
  background: rgba(255, 255, 255, 0.06);
}

.status-chip.is-active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}

.job-status-head {
  flex-wrap: nowrap;
}

.job-status-head-dates {
  white-space: nowrap;
}

.job-status-banner {
  display: block;
  width: fit-content;
  max-width: 100%;
  white-space: normal;
  line-height: 1.4;
  border-radius: 0.75rem;
}

@media (max-width: 575.98px) {
  .job-status-head {
    flex-wrap: wrap;
  }

  .job-status-head-dates {
    width: 100%;
    text-align: left !important;
    white-space: normal;
  }
}

.status-success { border-color: rgba(61, 184, 160, 0.45); }
.status-partial { border-color: rgba(240, 180, 41, 0.45); }
.status-failed { border-color: rgba(232, 93, 76, 0.45); }

.importance-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.35;
  border: 1px solid transparent;
  vertical-align: middle;
  white-space: nowrap;
}

.importance-normal {
  color: #9eb0c4;
  background: rgba(158, 176, 196, 0.14);
  border-color: rgba(158, 176, 196, 0.35);
}

.importance-major {
  color: #f0b429;
  background: rgba(240, 180, 41, 0.16);
  border-color: rgba(240, 180, 41, 0.42);
}

.importance-critical {
  color: #f07167;
  background: rgba(232, 93, 76, 0.18);
  border-color: rgba(232, 93, 76, 0.48);
}

.archive-detail-report .row > [class*="col-"] {
  min-width: 0;
}

.archive-detail-report dd,
.archive-detail-filename {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.spark-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  align-items: end;
  min-height: 120px;
}

.spark-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 120px;
}

.spark-bar {
  width: 100%;
  max-width: 28px;
  background: linear-gradient(180deg, var(--ocr-accent), rgba(61, 184, 160, 0.35));
  border-radius: 0.35rem 0.35rem 0.15rem 0.15rem;
}

.spark-label,
.spark-count {
  font-size: 0.65rem;
  color: var(--ocr-muted);
  margin-top: 0.2rem;
}

.link-ocr {
  color: var(--ocr-accent);
  text-decoration: none;
}

.link-ocr:hover {
  color: #5fd0b8;
}

.presence-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.presence-dot.online {
  background: var(--ocr-accent);
  box-shadow: 0 0 0 3px rgba(61, 184, 160, 0.25);
}

.presence-dot.offline {
  background: rgba(255, 255, 255, 0.25);
}

@media (min-width: 576px) {
  .preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.docs-code {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.nav-user:hover .nav-user-name {
  color: var(--ocr-accent);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
}

.card-soft .d-flex > .flex-grow-1 {
  min-width: 0;
}

.card-soft dl.row {
  max-width: 100%;
}

.card-soft dl.row > dd {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  max-width: 22rem;
}

@media (max-width: 420px) {
  .avatar-preset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.avatar-preset {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  aspect-ratio: 1;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.avatar-preset img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preset input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-preset:hover {
  border-color: rgba(61, 184, 160, 0.65);
  transform: translateY(-1px);
}

.avatar-preset.is-selected,
.avatar-preset:has(input:checked) {
  border-color: var(--ocr-accent, #3db8a0);
  box-shadow: 0 0 0 3px rgba(61, 184, 160, 0.28);
}

.sticky-save-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0.6rem 0;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.98), rgba(18, 24, 38, 0.92));
}

.feedback-events-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.feedback-events-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
}

.feedback-events-table .feedback-col-when { width: 6rem; }
.feedback-events-table .feedback-col-stage { width: 5.25rem; }
.feedback-events-table .feedback-col-key { width: 18%; }
.feedback-events-table .feedback-col-user { width: 7.5rem; }
.feedback-events-table .feedback-col-ws { width: 5.75rem; }
.feedback-events-table .feedback-col-file { width: 28%; }

.feedback-events-table th {
  vertical-align: bottom;
  white-space: normal;
  overflow: visible;
  word-break: normal;
  line-height: 1.25;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.feedback-events-table td {
  vertical-align: top;
  overflow: hidden;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.feedback-when-cell {
  white-space: normal;
}

.feedback-date,
.feedback-time {
  display: block;
  line-height: 1.25;
}

.feedback-time {
  color: rgba(243, 247, 250, 0.72);
}

.feedback-key-cell code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.feedback-clip {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-ws-cell {
  white-space: nowrap;
}

.feedback-file-cell {
  overflow: visible;
}

.feedback-file-name {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: 0.85em;
  line-height: 1.35;
}

.error-page {
  max-width: 32rem;
  text-align: left;
}

.error-page-code {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ocr-accent, #3db8a0);
  opacity: 0.9;
}

.manual-dt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.manual-dt-date {
  position: relative;
  flex: 1 1 11rem;
  min-width: 11rem;
}

.manual-dt-time {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.manual-dt-time .form-select {
  width: 4.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f3f7fa;
  color-scheme: dark;
}

.manual-dt-colon {
  color: var(--ocr-muted);
  font-weight: 600;
}

.manual-dt-pop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  width: 16.5rem;
  padding: 0.6rem;
  border-radius: 0.75rem;
  background: #163042;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: #f3f7fa;
}

.manual-dt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.manual-dt-nav,
.manual-dt-day {
  border: 0;
  background: transparent;
  color: #f3f7fa;
  border-radius: 0.4rem;
}

.manual-dt-nav {
  width: 1.8rem;
  height: 1.8rem;
  font-size: 1.2rem;
  line-height: 1;
}

.manual-dt-nav:hover,
.manual-dt-day:hover {
  background: rgba(255, 255, 255, 0.08);
}

.manual-dt-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
  text-align: center;
}

.manual-dt-dow {
  font-size: 0.68rem;
  color: var(--ocr-muted);
  padding: 0.15rem 0 0.3rem;
}

.manual-dt-day {
  height: 1.9rem;
  font-size: 0.8rem;
}

.manual-dt-day.is-today {
  box-shadow: inset 0 0 0 1px var(--ocr-accent);
}

.manual-dt-day.is-selected {
  background: var(--ocr-accent);
  color: #06201a;
  font-weight: 700;
}

.plate-look-open {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 0.45rem;
  line-height: 0;
}

.plate-look-open img {
  height: 72px;
  width: auto;
  object-fit: cover;
  pointer-events: none;
}

.plate-look-open:hover img,
.plate-look-open:focus-visible img {
  outline: 2px solid #e0b84a;
  outline-offset: 2px;
}

body.plate-look-open-body {
  overflow: hidden;
}

.plate-look {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  background: rgba(6, 10, 16, 0.94);
}

.plate-look[hidden] {
  display: none !important;
}

.plate-look-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: #f3f7fa;
  background: rgba(0, 0, 0, 0.45);
}

.plate-look-hint {
  font-size: 0.9rem;
}

.plate-look-actions {
  display: flex;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.plate-look-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.plate-look-stage.is-dragging {
  cursor: grabbing;
}

.plate-look-stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
}

/* Photo host tree navigation */
.photos-brand {
  line-height: 1.25;
  word-break: break-word;
}

.photos-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 992px) {
  .photos-layout {
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
  }

  .photos-tree-toggle {
    display: none !important;
  }
}

.photos-nav {
  padding: 1rem;
  position: sticky;
  top: 0.75rem;
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
}

.photos-tree-drawer {
  background: #10262f;
  color: #f3f7fa;
  width: min(22rem, 92vw);
}

.photos-tree-drawer .offcanvas-body {
  overflow: auto;
}

.photos-nav-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(243, 247, 250, 0.55);
  margin-bottom: 0.65rem;
}

.photos-nav-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.85rem;
}

.photos-nav-list--root {
  padding-left: 0;
}

.photos-nav-item {
  margin: 0.15rem 0;
}

.photos-nav-label {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  color: #9fd6c8;
  text-decoration: none;
  word-break: break-word;
}

a.photos-nav-label:hover {
  color: #d7fff3;
  background: rgba(255, 255, 255, 0.06);
}

.photos-nav-item.is-current > .photos-nav-label {
  color: #f3f7fa;
  background: rgba(52, 165, 143, 0.22);
  font-weight: 600;
}

.photos-nav-item.is-open > .photos-nav-label {
  color: #e8f7f2;
}
