/* T+Manager 4.0.4 — raised, translucent surfaces.
   Text keeps full opacity. Every surface has a readable colour/shadow fallback
   before backdrop-filter; this stylesheet never changes exported documents. */
.app-presentation-v404.app-presentation-v403 {
  --presentation-radius: .9rem;
  --glass-highlight: rgba(255, 255, 255, .68);
  --glass-shade: rgba(255, 255, 255, .08);
  --glass-shadow: 0 3px 9px rgba(23, 43, 69, .09), 0 1px 2px rgba(23, 43, 69, .06);
  --glass-raised-shadow: 0 6px 16px rgba(23, 43, 69, .15), 0 2px 5px rgba(23, 43, 69, .08);
}
html[data-bs-theme="dark"] .app-presentation-v404.app-presentation-v403 {
  --glass-highlight: rgba(255, 255, 255, .18);
  --glass-shade: rgba(255, 255, 255, .025);
  --glass-shadow: 0 4px 12px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .16);
  --glass-raised-shadow: 0 7px 20px rgba(0, 0, 0, .30), 0 2px 6px rgba(0, 0, 0, .22);
}

/* Subtle colour behind the glass makes its transparency visible without
   needing an image, animation or an external service. */
.app-presentation-v404.app-presentation-v403 :is(.sidebar, #mobileSidebar .offcanvas-body) {
  background-image:
    radial-gradient(ellipse at 0 4rem, rgba(99, 161, 231, .10), transparent 22rem),
    radial-gradient(ellipse at 100% 28rem, rgba(139, 107, 207, .09), transparent 23rem);
}
.app-presentation-v404.app-presentation-v403 .sidebar-group {
  --sidebar-caption-rgb: 30, 57, 88;
  --sidebar-caption-accent: #b9d8ff;
  gap: .55rem;
}
.app-presentation-v404.app-presentation-v403 .sidebar-group-modules {
  --sidebar-caption-rgb: 18, 69, 59;
  --sidebar-caption-accent: #b3f2d8;
}
.app-presentation-v404.app-presentation-v403 .sidebar-group-dossier {
  --sidebar-caption-rgb: 66, 43, 101;
  --sidebar-caption-accent: #e3ceff;
}
.app-presentation-v404.app-presentation-v403 .sidebar-group-admin {
  --sidebar-caption-rgb: 89, 54, 19;
  --sidebar-caption-accent: #ffe1a6;
}

/* Group names are dark glass plaques with a bright accent. Their colour,
   typography and inset edge distinguish them from actionable navigation. */
.app-presentation-v404.app-presentation-v403 .tplus-sidebar-nav .sidebar-caption {
  padding: .7rem .75rem;
  border: 1px solid rgba(var(--sidebar-caption-rgb), .66);
  border-inline-start: 3px solid var(--sidebar-caption-accent);
  background-color: rgba(var(--sidebar-caption-rgb), .94);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .13), transparent 48%, rgba(255, 255, 255, .04));
  color: #fff;
  font-size: max(.9rem, 12px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .035em;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .23);
}

/* All links have identical edges. The colour layer remains alpha .30;
   the sheen, inner highlight and shadow create depth without fading text. */
.app-presentation-v404.app-presentation-v403 .tplus-sidebar-nav .nav-link {
  padding: .7rem .75rem;
  border-color: rgba(var(--sidebar-rgb), .32);
  border-inline-start-color: rgba(var(--sidebar-rgb), .58);
  background-color: rgba(var(--sidebar-rgb), .30);
  background-image: linear-gradient(145deg, var(--glass-highlight), var(--glass-shade) 43%, transparent 75%);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 rgba(var(--sidebar-rgb), .10);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.app-presentation-v404.app-presentation-v403 .tplus-sidebar-nav .nav-link:hover {
  background-color: rgba(var(--sidebar-rgb), .40);
  box-shadow: var(--glass-raised-shadow), inset 0 1px 0 var(--glass-highlight);
  transform: translateY(-1px);
}
.app-presentation-v404.app-presentation-v403 .tplus-sidebar-nav .nav-link.active {
  background-color: rgba(var(--sidebar-rgb), .47);
  border-color: rgba(var(--sidebar-rgb), .72);
  border-inline-start-color: var(--sidebar-ink);
  box-shadow: var(--glass-raised-shadow), inset 0 1px 0 var(--glass-highlight), inset 0 0 0 1px rgba(var(--sidebar-rgb), .23);
}

/* Semantic in-page titles and section bars share the raised material. */
.app-presentation-v404.app-presentation-v403 .app-content :is(h1, h2, h3, h4, h5, h6, .card-title, .list-group-header, .presentation-title, .finance-project-heading, .project-health-heading, .card-header, .file-section-bar) {
  background-image: linear-gradient(145deg, var(--glass-highlight), var(--glass-shade) 43%, transparent 75%);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 rgba(var(--presentation-rgb), .10);
  border-color: rgba(var(--presentation-rgb), .30);
}
.app-presentation-v404.app-presentation-v403 .app-content .card-header {
  background: linear-gradient(145deg, var(--glass-highlight), var(--glass-shade) 43%, transparent 75%), rgba(var(--presentation-rgb), .30) !important;
}
/* A heading inside a coloured header remains a single surface, not two. */
.app-presentation-v404.app-presentation-v403 .app-content :is(.card-header, .file-section-bar) :is(h1, h2, h3, h4, h5, h6, .card-title) {
  background: transparent;
  box-shadow: none;
}
.app-presentation-v404.app-presentation-v403 .app-content :is(.metric-label, .detail-list > dt, .definition-list dt, .presentation-label, .dashboard-kpi > span:first-child, .form-section > legend) {
  background-image: linear-gradient(145deg, var(--glass-highlight), var(--glass-shade) 50%, transparent);
  box-shadow: 0 2px 6px rgba(23, 43, 69, .06), inset 0 1px 0 var(--glass-highlight);
}
.app-presentation-v404.app-presentation-v403 .app-content :is(.project-vertical-nav .list-group-item, .nav-tabs .nav-link, .nav-pills .nav-link, .presentation-tabs > a, .control-nav a, .control-tabs a) {
  background-image: linear-gradient(145deg, var(--glass-highlight), var(--glass-shade) 43%, transparent 75%);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}
.app-presentation-v404.app-presentation-v403 .app-content .presentation-tabs > a {
  background: linear-gradient(145deg, var(--glass-highlight), var(--glass-shade) 43%, transparent 75%), rgba(var(--presentation-rgb), .30) !important;
}
.app-presentation-v404.app-presentation-v403 .app-content .presentation-tabs > a[aria-current="page"] {
  background-color: rgba(var(--presentation-rgb), .47) !important;
  box-shadow: var(--glass-raised-shadow), inset 0 1px 0 var(--glass-highlight);
}

/* The dossier preview represents a sheet of paper, including in dark mode.
   Keep legal text black on white; application glass titles stop at its edge. */
.app-presentation-v404.app-presentation-v403 .app-content .dossier-paper {
  --presentation-ink: #111;
  --presentation-subtle-ink: #595959;
  --bs-body-color: #111;
  --bs-secondary-color: #595959;
  --bs-border-color: #dedede;
  color-scheme: light;
  background: #fff !important;
  color: #111 !important;
}
.app-presentation-v404.app-presentation-v403 .app-content .dossier-paper :is(h1, h2, h3, h4, h5, h6, .card-title, .presentation-title) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #111 !important;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.app-presentation-v404.app-presentation-v403 .app-content .dossier-paper .text-secondary {
  color: #595959 !important;
}

/* Blur is optional. The layered colour, contrast and shadows above are the
   complete fallback for browsers/devices without glass compositing. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app-presentation-v404.app-presentation-v403 :is(.tplus-sidebar-nav .nav-link, .tplus-sidebar-nav .sidebar-caption),
  .app-presentation-v404.app-presentation-v403 .app-content :is(.presentation-title, .card-header, .file-section-bar, .project-vertical-nav .list-group-item, .nav-tabs .nav-link, .nav-pills .nav-link, .presentation-tabs > a) {
    -webkit-backdrop-filter: blur(10px) saturate(135%);
    backdrop-filter: blur(10px) saturate(135%);
  }
}

/* Keep Scan visible next to the appearance control on phones as well. */
.app-presentation-v404.app-presentation-v403 .app-scan-button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
  border-radius: .7rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, .15), transparent), rgba(85, 164, 234, .20);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .13), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.app-presentation-v404.app-presentation-v403 .app-scan-button:hover { background-color: rgba(85, 164, 234, .35); color: #fff; }
.app-presentation-v404.app-presentation-v403 .app-scan-button:focus-visible { outline: 3px solid #a5d0ff; outline-offset: 2px; }
.app-presentation-v404.app-presentation-v403 .app-topbar .container-fluid { row-gap: .5rem; column-gap: .25rem; }
.app-presentation-v404.app-presentation-v403 .app-topbar form[role="search"] { min-width: 220px !important; flex: 1 1 250px; max-width: 460px; }
@media (max-width:1399.98px) {
  .app-presentation-v404.app-presentation-v403 .app-topbar .navbar-brand > .text-secondary { display: none; }
  /* Search and Dashboard remain in the sidebar. Give the new camera action
     and appearance control space in the top row on smaller desktop screens. */
  .app-presentation-v404.app-presentation-v403 .app-topbar form[role="search"],
  .app-presentation-v404.app-presentation-v403 .app-account-actions > .d-lg-inline-flex { display: none !important; }
}
@media (max-width:991.98px) {
  .app-presentation-v404.app-presentation-v403 .app-topbar .container-fluid { flex-wrap: wrap; }
  .app-presentation-v404.app-presentation-v403 .app-account-actions { width: 100%; flex-wrap: wrap; gap: .5rem !important; justify-content: flex-end; }
}
@media (prefers-reduced-motion:reduce) {
  .app-presentation-v404.app-presentation-v403 .tplus-sidebar-nav .nav-link { transition: none; transform: none; }
}
@media (forced-colors:active) {
  .app-presentation-v404.app-presentation-v403 .tplus-sidebar-nav :is(.nav-link, .sidebar-caption) { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
  .app-presentation-v404.app-presentation-v403 .tplus-sidebar-nav .nav-link.active { border-inline-start-color: Highlight; color: LinkText; }
}
@media print {
  .app-presentation-v404.app-presentation-v403 .app-content :is(h1, h2, h3, h4, h5, h6, .card-header, .card-title, .metric-label, .list-group-header, .presentation-title, .presentation-label, .detail-list > dt, .definition-list dt, .dashboard-kpi > span:first-child, .file-section-bar) { background: transparent !important; color: #111 !important; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
