/*
 * Main layout polish: header + left sidebar.
 * Loaded after the theme and custom.css in layout/header.blade.php and layout/header-vue.blade.php.
 * Goals: clear separation of header / sidebar / content, WCAG AA text contrast (>= 4.5:1),
 * obvious hover / active / keyboard-focus states, comfortable 40px+ click targets.
 * To revert, remove the <link> to this file from both headers.
 */

:root {
  /* Quickview brand colours, sampled from the Quickview logo (proposal image: Downloads/quickview-colour-proposal.png) */
  --brand-navy: #0b003e;   /* Quickview navy, headings, active row, buttons  */
  --brand-blue: #3986fd;   /* small accents only: rules, focus ring, links on dark */
  --brand-ink: #0b003e;    /* body text */
  --brand-muted: #3d3c4a;  /* secondary text and icons */
  --brand-line: #e3e4ea;   /* borders and dividers */
  --brand-soft: #eeecfb;   /* active / soft background */
  --brand-tint: #f4f3fc;   /* hover and page tint */
  --brand-gradient: linear-gradient(90deg, #3986fd, #6f3ffc); /* the login page's Continue button */
  --brand-border: #cfc9f2;  /* button and control borders: indigo tint */
  /* theme variables (themes/default/css/style.css) pointed at the Quickview indigo */
  --sidenav-active-text-clr: #5b4fc7;
  --sidenav-hover-active-text-clr: #5b4fc7;
  --sidenav-hover-bg: #f4f3fc;
}

:root {
  --layout-accent: #5b4fc7;          /* active item text, contrast 6.3:1 on white */
  --layout-accent-soft: #eeecfb;     /* active / hover background tint */
  --layout-text: #3d3c4a;            /* menu text, contrast 10.5:1 on white */
  --layout-text-muted: #5f5e70;      /* secondary text / icons, contrast 6.2:1 on white */
  --layout-border: #e3e4ea;
}

/* ---------- Header ---------- */
.topbar .top-navbar {
  height: 60px;
  border-bottom: 1px solid var(--layout-border);
}

.fix-header .page-wrapper {
  padding-top: 60px;
}

.topbar .top-navbar .navbar-header {
  line-height: 58px;
}

/* header icons were pale grey: make them readable and give them a hit area */
.topbar .top-navbar .navbar-nav > .nav-item > .nav-link,
.topbar .top-navbar .navbar-nav > .nav-item > a {
  color: var(--layout-text-muted);
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.topbar .top-navbar .navbar-nav > .nav-item > .nav-link:hover,
.topbar .top-navbar .navbar-nav > .nav-item > a:hover {
  background: var(--layout-accent-soft);
  color: var(--layout-accent);
}

.top-header__icon-bg {
  color: var(--layout-text-muted);
}

.dashboard__text {
  color: var(--layout-text);
}

.dashboard__text:hover {
  opacity: 1;
  color: var(--layout-accent);
}

/* ---------- Sidebar ---------- */
.left-sidebar {
  border-right: 1px solid var(--layout-border);
  padding-top: 60px;
}

.sidebar-nav {
  padding: 8px 8px 0 8px;
}

.sidebar-nav > ul > li {
  margin: 2px 0;
}

.sidebar-nav ul li a {
  color: var(--layout-text);
  border-radius: 8px;
  padding: 11px 14px 11px 14px;
  min-height: 42px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-nav > ul > li > a .left-sidemenu-icon {
  opacity: 0.85;
}

.sidebar-nav ul li a:hover {
  background: #f4f4f8;
  color: var(--layout-text);
}

.sidebar-nav ul li a:hover .left-sidemenu-icon,
.sidebar-nav ul li a:hover i {
  opacity: 1;
}

/* active / current section: tint + accent bar + bolder text */
.sidebar-nav ul li.active > a,
.sidebar-nav ul li a.active {
  background: var(--layout-accent-soft);
  color: var(--layout-accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--layout-accent);
  border-left: 0;
}

.sidebar-nav ul li.active > a .left-sidemenu-icon,
.sidebar-nav ul li a.active .left-sidemenu-icon,
.sidebar-nav ul li.active > a i,
.sidebar-nav ul li a.active i {
  color: var(--layout-accent);
  opacity: 1;
}

/* sub menus */
.sidebar-nav ul li ul li a {
  padding: 8px 14px 8px 46px;
  font-weight: 500;
  color: var(--layout-text-muted);
}

.sidebar-nav ul li ul li a:hover {
  color: var(--layout-text);
}

/* sub menu items: a small dot under the parent's icon marks each item; the current page is accent text + an
   accent dot. No second tint / accent bar: the parent row already has them (two stacked purple blocks, the
   sub item's bar curved by its rounded corners). */
.sidebar-nav ul li ul li a {
  position: relative;
  display: flex;
  align-items: center; /* text in the middle of the row, on the same line as the dot */
}

/* sub item text starts exactly under the parent's text (46px), on every page: the Vue pages' app.css has
   .pl-8 { padding-left: 32px !important }, and the sub menu links carry pl-8 (the text then sat on the dot) */
#main-sidenav ul li ul li a,
#main-sidenav ul li ul li a.pl-8 {
  padding-left: 46px !important;
}

.sidebar-nav ul li ul li a::before {
  content: "";
  position: absolute;
  left: 22px; /* centred under the parent's icon */
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #c9c8d6;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-nav ul li ul li a:hover::before {
  background: var(--layout-text-muted);
}

#main-sidenav .sidenav-submenu a.active,
.sidenav-submenu a.active,
.sidebar-nav ul li ul li a.active {
  background: transparent !important; /* the theme (style.css #main-sidenav) adds a gradient here */
  color: var(--layout-accent) !important;
  font-weight: 600;
  box-shadow: none;
}

#main-sidenav .sidenav-submenu a.active:hover,
.sidenav-submenu a.active:hover,
.sidebar-nav ul li ul li a.active:hover {
  background: #f4f4f8 !important;
}

.sidenav-submenu a.active::before,
.sidebar-nav ul li ul li a.active::before {
  background: var(--layout-accent);
  box-shadow: 0 0 0 3px var(--layout-accent-soft);
}

/* keyboard users: visible focus ring */
.sidebar-nav a:focus-visible,
.topbar .top-navbar a:focus-visible,
.topbar .top-navbar button:focus-visible {
  outline: 2px solid var(--layout-accent);
  outline-offset: -2px;
}

/* the sidebar width now includes the 8px side padding */
.sidebar-nav .has-arrow::after {
  right: 16px;
}

/* ---------- Profile menu (header) ----------
 * Standard dropdown motion: short (180ms) fade + slide + slight scale, anchored to the avatar
 * (top right), ease-out on open. Replaces the 1s animate.css "flipInY". */
@keyframes profile-menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.u-pro .dropdown-menu {
  transform-origin: top right;
  border: 1px solid var(--layout-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(30, 30, 60, 0.14);
}

.u-pro .dropdown-menu.show {
  animation: profile-menu-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) both !important;
}

/* avatar feedback: hover ring, stronger ring while the menu is open */
.u-pro #topnav_avatar {
  border-radius: 50%;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.u-pro > a:hover #topnav_avatar,
.u-pro > a:focus-visible #topnav_avatar {
  box-shadow: 0 0 0 3px var(--layout-accent-soft), 0 0 0 4px var(--layout-accent);
}

.u-pro > a[aria-expanded="true"] #topnav_avatar,
.u-pro.show > a #topnav_avatar {
  box-shadow: 0 0 0 3px var(--layout-accent-soft), 0 0 0 4px var(--layout-accent);
  transform: scale(1.05);
}

.u-pro .dropdown-menu .dropdown-user li a {
  transition: background-color 0.15s ease, padding-left 0.15s ease;
}

.u-pro .dropdown-menu .dropdown-user li a:hover {
  background: var(--layout-accent-soft);
}

/* accessibility: no motion when the user asks for less */
@media (prefers-reduced-motion: reduce) {
  .u-pro .dropdown-menu.show {
    animation: none !important;
  }
  .u-pro #topnav_avatar,
  .sidebar-nav ul li a,
  .topbar .top-navbar .navbar-nav > .nav-item > a {
    transition: none;
  }
}

/* ---------- Header icon alignment ----------
 * Every icon in the header gets the same 20px glyph in the same 24x24 centred box, whichever
 * icon font it comes from (simple-line-icons vs Material Design Icons, which used to be 22px
 * with a taller line box and sat lower than the rest). */
.topbar .top-navbar .navbar-nav > .nav-item > a > i,
.topbar .top-navbar .navbar-nav > .nav-item > .nav-link > i {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px !important;
  line-height: 1 !important;
  vertical-align: middle;
}

.topbar .top-navbar .navbar-nav > .nav-item > a > i.mdi::before {
  font-size: 20px;
  line-height: 1;
}

.topbar .top-navbar .navbar-nav > .nav-item > a,
.topbar .top-navbar .navbar-nav > .nav-item > .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Sidebar: top gap + icon consistency ---------- */
/* the theme sets .fix-header .left-sidebar to 105px (taller than the header), which left a gap
   above the first menu item; match the 72px header and use one small, even inset instead */
.fix-header .left-sidebar {
  padding-top: 60px;
}

.sidebar-nav {
  padding-top: 12px;
}

/* line icons (font) used for items that previously shared another item's SVG: same box, size and
   weight as the 16px SVG icons so every row has the same icon column */
.sidebar-nav > ul > li > a i.menu-font-icon {
  display: inline-block;
  width: 22px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
  font-weight: 400;
  text-align: left;
  vertical-align: middle;
  padding-right: 5px;
  color: var(--layout-text);
  opacity: 0.85;
}

.sidebar-nav ul li a:hover i.menu-font-icon,
.sidebar-nav ul li.active > a i.menu-font-icon,
.sidebar-nav ul li a.active i.menu-font-icon {
  opacity: 1;
}

.sidebar-nav ul li.active > a i.menu-font-icon,
.sidebar-nav ul li a.active i.menu-font-icon {
  color: var(--layout-accent);
}

/* same vertical rhythm for svg and font icons */
.sidebar-nav > ul > li > a .left-sidemenu-icon {
  margin-right: 6px;
}

/* long labels (e.g. "Quoted Work Order") fit on one line: less right padding and a tighter icon gap
   on rows that have no expand arrow */
.sidebar-nav > ul > li > a:not(.has-arrow) {
  padding-right: 6px;
}

.sidebar-nav > ul > li > a .left-sidemenu-icon {
  margin-right: 2px;
}

.sidebar-nav > ul > li > a .hide-menu {
  white-space: nowrap;
}

/* ---------- Dashboard widgets & charts (home and other dashboards) ----------
 * Minimal visibility fixes, no layout changes:
 *  - cards get a hairline border + soft shadow so they separate from the grey page background
 *  - secondary text raised to >= 4.5:1 contrast (breadcrumb, empty states, chart axis + legend)
 *  - filter inputs get a comfortable height and a visible focus state */
.dashboard-card,
.dashboard-tile-card {
  border: 1px solid var(--layout-border);
  box-shadow: 0 1px 3px rgba(30, 30, 60, 0.06);
  transition: box-shadow 0.15s ease;
}

.dashboard-tile-card:hover {
  box-shadow: 0 4px 14px rgba(30, 30, 60, 0.1);
}

/* breadcrumb / page sub heading */
.breadcrumb-revamp .breadcrumb-item,
.breadcrumb-revamp .breadcrumb-item a {
  color: var(--layout-text-muted);
}

/* secondary text inside stat cards */
.card-footer-primary-text {
  color: var(--layout-text-muted);
}

/* empty states: was faded to ~2.5:1 */
.no-results-found-title {
  color: var(--layout-text-muted);
  opacity: 1;
}

.no-results-found-sub-title {
  color: var(--layout-text-muted);
  opacity: 1;
}

/* chart text (c3 + ApexCharts): darker, same size */
.c3 text,
.c3-axis text,
.c3-legend-item text,
.apexcharts-text,
.apexcharts-legend-text {
  fill: var(--layout-text-muted) !important;
  color: var(--layout-text-muted) !important;
}

.c3 .c3-axis-x .tick text,
.c3 .c3-axis-y .tick text {
  font-size: 12px;
}

.c3 .c3-legend-item text {
  font-size: 13px;
}

/* filter inputs in card headers */
.dashboard-card .form-control-sm {
  height: 36px;
  border-radius: 8px;
  border-color: #c9ccd6;
  color: var(--layout-text);
}

.dashboard-card .form-control-sm:focus {
  border-color: var(--layout-accent);
  box-shadow: 0 0 0 3px var(--layout-accent-soft);
  outline: none;
}

/* html chart legends (e.g. "Open Jobs / Completed Jobs") were #a6acbe; keep size, raise contrast */
.dashboard-card .legend-label,
.dashboard-card .legend-label li {
  color: var(--layout-text-muted) !important;
  font-size: 13px;
}

/* empty states: the theme fades these with opacity: 0.7 on top of an already light colour */
.dashboard-card .no-results-found-title,
.dashboard-card .no-results-found-sub-title {
  opacity: 1 !important;
  color: var(--layout-text-muted) !important;
}

/* ---------- Restyle to the approved proposal (navbar + sidebar) ----------
 * One block, overrides the rules above. Nav-only tokens so the dashboard widgets keep --layout-*. */
.topbar,
.left-sidebar {
  --nav-accent: #5b4fc7;      /* 5.6:1 on white */
  --nav-accent-soft: #eeecfb;
  --nav-text: #3d3c4a;
  --nav-muted: #5f5e70;       /* 4.8:1 on white: group headings, icons, sub items */
  --nav-border: #e3e4ea;
  --nav-hover: #f4f3fc;
  --nav-badge: #d64545;
}

.topbar .top-navbar,
.left-sidebar {
  border-color: var(--nav-border);
}

.dashboard__navbar-bg {
  height: 60px;
}

.navbar-brand img.logo-large {
  max-height: 38px;
  width: auto;
}

/* top bar: icon buttons, all the same 36px square */
.topbar .top-navbar .navbar-nav > .nav-item > .nav-link,
.topbar .top-navbar .navbar-nav > .nav-item > a:not(.profile-pic) {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0 2px;
  color: var(--nav-muted);
  border-radius: 8px;
}

.topbar .top-navbar .navbar-nav > .nav-item > .nav-link:hover,
.topbar .top-navbar .navbar-nav > .nav-item > a:not(.profile-pic):hover {
  background: var(--nav-hover);
  color: var(--nav-accent);
}

.top-header__icon-bg {
  color: inherit;
}

.topbar .top-navbar a:focus-visible {
  outline-color: var(--nav-accent);
  outline-offset: 0;
}

/* the running timer keeps its time text, so it is a pill instead of a square */
.topbar .top-navbar .navbar-nav > .nav-item.my-timer-container > .nav-link {
  width: auto;
  padding: 0 10px;
}

/* search pill */
.topnav-search {
  height: 36px;
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topnav-search:hover {
  border-color: #e3e4ea;
}

.topnav-search:focus-within {
  border-color: var(--nav-accent);
  box-shadow: 0 0 0 3px var(--nav-accent-soft);
}

.topnav-search .topnav-search-icon {
  left: 10px;
  width: 18px;
  height: 18px;
  margin: 0;
}

.topnav-search .topnav-search-icon path {
  fill: var(--nav-muted);
}

.topnav-search input.topnav-actions-search {
  height: 34px;
  min-height: 34px;
  padding-left: 36px;
  font-size: 13px;
  color: var(--nav-text) !important; /* style.css sets #d1d5dc !important */
  box-shadow: none;
  outline: none;
}

.topnav-search input.topnav-actions-search::placeholder {
  color: var(--nav-muted);
  opacity: 1;
}

/* notification dot: a small badge on the bell, no pulse ring */
.topbar #topnav-notification-dropdown .notify {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 0;
  height: 0;
}

.topbar #topnav-notification-dropdown .notify .heartbit {
  display: none;
}

.topbar #topnav-notification-dropdown .notify .point {
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: var(--nav-badge);
  box-shadow: 0 0 0 2px #fff;
}

/* user menu */
.topbar .top-navbar .navbar-nav > .nav-item > a.profile-pic {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 10px 0 6px;
  border-left: 0;
  border-radius: 10px;
}

.topbar .top-navbar .navbar-nav > .nav-item > a.profile-pic:hover {
  background: var(--nav-hover);
}

/* two-line identity: name over email, truncated */
.topbar .profile-pic-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 200px;
  line-height: 1.25;
  text-align: left;
}

.topbar .profile-pic .profile-pic-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--nav-text);
}

.topbar .profile-pic .profile-pic-email {
  font-size: 12px;
  color: var(--nav-muted);
}

.topbar .profile-pic .profile-pic-name,
.topbar .profile-pic .profile-pic-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .profile-pic img {
  width: 36px;
  height: 36px;
  flex: none;
  object-fit: cover;
}

@media (max-width: 767.98px) {
  .topbar .profile-pic-text {
    display: none;
  }
}

/* ---------- Sidebar ---------- */
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: #d5d8e6 transparent;
}

.sidebar-nav ul li a {
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  min-height: 38px;
}

.sidebar-nav ul li a:hover {
  background: var(--nav-hover);
  color: var(--nav-text);
}

.sidebar-nav ul li.active > a,
.sidebar-nav ul li a.active {
  background: var(--nav-accent-soft);
  color: var(--nav-accent);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--nav-accent);
}

.sidebar-nav ul li.active > a .left-sidemenu-icon,
.sidebar-nav ul li a.active .left-sidemenu-icon,
.sidebar-nav ul li.active > a i,
.sidebar-nav ul li a.active i,
.sidebar-nav ul li.active > a i.menu-font-icon,
.sidebar-nav ul li a.active i.menu-font-icon {
  color: var(--nav-accent);
}

/* group headings */
.sidebar-nav ul li.nav-small-cap {
  padding: 16px 12px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--nav-muted);
}

/* the folded Admin item: a divider above it, no heading */
.sidebar-nav ul li.nav-small-cap--rule {
  margin: 8px 4px 0;
  padding: 0;
  border-top: 1px solid var(--nav-border);
}

/* sub items: smaller and muted, dot + indent come from the block above */
.sidebar-nav ul li ul li a {
  font-size: 13px;
  font-weight: 600;
  color: var(--nav-muted);
}

.sidebar-nav ul li ul li a:hover {
  color: var(--nav-text);
}

#main-sidenav .sidenav-submenu a.active,
.sidenav-submenu a.active,
.sidebar-nav ul li ul li a.active {
  color: var(--nav-accent) !important; /* same !important fight as the rule above */
  font-weight: 700;
}

.sidenav-submenu a.active::before,
.sidebar-nav ul li ul li a.active::before {
  background: var(--nav-accent);
  box-shadow: 0 0 0 3px var(--nav-accent-soft);
}

@media (prefers-reduced-motion: reduce) {
  .topnav-search {
    transition: none;
  }
}

/* search lives at the top of the sidebar (approved proposal) */
.left-sidebar .sidebar-search {
  position: relative;
  margin: 12px 12px 4px;
  width: auto;
}

.left-sidebar .sidebar-search input.topnav-actions-search {
  width: 100%;
  padding-right: 54px;
}

.left-sidebar .sidebar-search .sidebar-search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font: 600 10px/1 inherit;
  padding: 3px 5px;
  border: 1px solid var(--nav-border);
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--nav-muted);
  pointer-events: none;
}

.mini-sidebar .left-sidebar .sidebar-search {
  display: none;
}

/* ---------- Profile dropdown (header card + grouped rows) ---------- */
.topbar {
  --nav-danger: #b33a3a; /* 5.6:1 on white */
}

.topbar .u-pro .dropdown-menu {
  width: 264px;
  min-width: 264px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  margin-top: 8px;
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(30, 30, 60, 0.08);
}

.topbar .u-pro .dropdown-menu ul.dropdown-user {
  min-width: 0;
  padding: 0;
}

.topbar .u-pro .dropdown-menu ul.dropdown-user li.divider {
  height: 1px;
  margin: 6px 8px;
  background: var(--nav-border);
}

.topbar .u-pro .dropdown-menu ul.dropdown-user li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--nav-text);
}

.topbar .u-pro .dropdown-menu ul.dropdown-user li a:hover,
.topbar .u-pro .dropdown-menu ul.dropdown-user li a:focus-visible {
  background: var(--nav-hover);
  color: var(--nav-accent);
  text-decoration: none;
}

.topbar .u-pro .dropdown-menu ul.dropdown-user li a:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: -2px;
}

.topbar .u-pro .dropdown-menu ul.dropdown-user li a i {
  flex: none;
  width: 18px;
  padding: 0 !important; /* drops the old p-r-4 */
  font-size: 18px;
  line-height: 1;
  text-align: center;
  color: var(--nav-muted);
}

.topbar .u-pro .dropdown-menu ul.dropdown-user li a:hover i {
  color: inherit;
}

/* logout: last row, muted danger */
.topbar .u-pro .dropdown-menu ul.dropdown-user li a.u-logout,
.topbar .u-pro .dropdown-menu ul.dropdown-user li a.u-logout i {
  color: var(--nav-danger);
}

.topbar .u-pro .dropdown-menu ul.dropdown-user li a.u-logout:hover {
  background: #fbeeee;
  color: var(--nav-danger);
}

/* header card */
.topbar .u-pro .dropdown-user .dw-user-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 2px;
  border-radius: 10px;
  background: var(--nav-hover);
}

.topbar .u-pro .dropdown-user .dw-user-box .u-img {
  flex: none;
  width: 48px;
  height: 48px;
}

.topbar .u-pro .dropdown-user .dw-user-box .u-img img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar .u-pro .dropdown-user .dw-user-box .u-text {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.topbar .u-pro .dropdown-user .dw-user-box .u-text h4,
.topbar .u-pro .dropdown-user .dw-user-box .u-text p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .u-pro .dropdown-user .dw-user-box .u-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--nav-text);
}

.topbar .u-pro .dropdown-user .dw-user-box .u-text p {
  margin: 2px 0 6px;
  font-size: 12px;
  color: var(--nav-muted) !important;
}

.topbar .u-pro .dropdown-user .u-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--nav-accent-soft);
  font-size: 11px;
  font-weight: 700;
  color: var(--nav-accent);
}

.topbar .u-pro .dropdown-user .u-avatar-row {
  width: 100%;
}

.topbar .u-pro .dropdown-user .dw-user-box a.u-avatar-action {
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--nav-border);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--nav-text);
  box-shadow: none;
}

.topbar .u-pro .dropdown-user .dw-user-box a.u-avatar-action:hover {
  border-color: var(--nav-accent);
  background: #fff;
  color: var(--nav-accent);
}

/* ---------- Sidebar: standard sizing (256px) ----------
 * Expanded state only (body:not(.mini-sidebar)); the 75px icon rail keeps the theme's own rules.
 * Old width 218px lives in themes/default/css/style.css (.left-sidebar, .page-wrapper >=1024px,
 * .settings .navbar-header) and the header logo block was 200px: all re-set here. */
:root {
  --sidebar-w: 256px;
}

.left-sidebar {
  width: var(--sidebar-w);
}

@media (min-width: 1024px) {
  .page-wrapper {
    margin-left: var(--sidebar-w);
  }
}

@media (min-width: 768px) {
  .navbar-header {
    width: var(--sidebar-w);
  }
}

.settings .navbar-header {
  width: var(--sidebar-w);
}

body:not(.mini-sidebar) .sidebar-nav,
body:not(.mini-sidebar) #main-sidenav {
  padding: 12px 12px 16px;
}

body:not(.mini-sidebar) .scroll-sidebar {
  padding-bottom: 16px;
}

/* search: 40px high, the 12px side space comes from the nav padding */
.left-sidebar .sidebar-search {
  height: 40px;
  margin: 0 0 4px;
}

.left-sidebar .sidebar-search input.topnav-actions-search {
  height: 38px;
  min-height: 38px;
}

body:not(.mini-sidebar) .sidebar-nav > ul > li {
  margin: 2px 0;
}

/* item rows: 40px, 10/12 padding, 20px icon, 12px gap */
body:not(.mini-sidebar) .sidebar-nav > ul > li > a,
body:not(.mini-sidebar) #main-sidenav #sidebarnav > li > a {
  display: flex;
  align-items: center;
  height: auto;
  min-height: 40px;
  padding: 10px 12px;
}

body:not(.mini-sidebar) .sidebar-nav > ul > li > a > i,
body:not(.mini-sidebar) .sidebar-nav > ul > li > a .left-sidemenu-icon,
body:not(.mini-sidebar) #main-sidenav #sidebarnav > li > a .left-sidemenu-icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  padding: 0;
  font-size: 20px;
  line-height: 20px;
}

body:not(.mini-sidebar) .sidebar-nav .has-arrow::after {
  right: 16px;
}

/* group headings: 11px, 20px above, 6px below */
body:not(.mini-sidebar) .sidebar-nav ul li.nav-small-cap {
  padding: 20px 12px 6px;
}

body:not(.mini-sidebar) .sidebar-nav ul li.nav-small-cap--rule {
  padding: 0;
}

/* submenu rows: 36px, text indented 44px (!important beats the pl-8 / 46px rules above) */
body:not(.mini-sidebar) #main-sidenav ul li ul li a,
body:not(.mini-sidebar) #main-sidenav ul li ul li a.pl-8,
body:not(.mini-sidebar) .sidebar-nav ul li ul li a {
  min-height: 36px;
  padding: 6px 12px 6px 44px !important;
}

body:not(.mini-sidebar) .sidebar-nav ul li ul li a::before {
  left: 19px; /* centred under the 20px icon (12px row padding + 10) */
}

@media (prefers-reduced-motion: reduce) {
  .topbar .u-pro .dropdown-menu ul.dropdown-user li a {
    transition: none;
  }
}

/* ---------- Sidebar: main items, bigger and clearer ----------
 * Top-level rows only (> li > a); submenu rows keep their own sizes above. */
body:not(.mini-sidebar) .sidebar-nav > ul > li {
  margin: 3px 0;
}

body:not(.mini-sidebar) .sidebar-nav > ul > li > a,
body:not(.mini-sidebar) #main-sidenav #sidebarnav > li > a {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
}

body:not(.mini-sidebar) .sidebar-nav > ul > li > a .hide-menu {
  font-size: 14.5px;
  font-weight: 600;
  color: #0b003e;
}

body:not(.mini-sidebar) .sidebar-nav > ul > li > a > i,
body:not(.mini-sidebar) .sidebar-nav > ul > li > a .left-sidemenu-icon,
body:not(.mini-sidebar) #main-sidenav #sidebarnav > li > a .left-sidemenu-icon {
  width: 22px;
  height: 22px;
  margin-right: 14px;
  font-size: 22px;
  line-height: 22px;
  color: #3d3c4a;
}

/* hover */
body:not(.mini-sidebar) .sidebar-nav > ul > li > a:hover {
  background: var(--nav-accent-soft);
}

/* active main item: stronger tint, 4px accent, purple icon and bold label */
body:not(.mini-sidebar) .sidebar-nav > ul > li.active > a,
body:not(.mini-sidebar) .sidebar-nav > ul > li > a.active {
  background: #e4e1f8;
  box-shadow: inset 4px 0 0 #5b4fc7;
}

body:not(.mini-sidebar) .sidebar-nav > ul > li.active > a .hide-menu,
body:not(.mini-sidebar) .sidebar-nav > ul > li > a.active .hide-menu {
  color: #5b4fc7;
  font-weight: 700;
}

body:not(.mini-sidebar) .sidebar-nav > ul > li.active > a .left-sidemenu-icon,
body:not(.mini-sidebar) .sidebar-nav > ul > li.active > a > i,
body:not(.mini-sidebar) .sidebar-nav > ul > li > a.active .left-sidemenu-icon,
body:not(.mini-sidebar) .sidebar-nav > ul > li > a.active > i {
  color: #5b4fc7;
}

/* ---------- Top bar: profile area spacing ---------- */
.topbar .top-navbar {
  padding-right: 24px;
}

/* divider between the icon buttons and the profile, with room on both sides */
.topbar .top-navbar .navbar-nav > .nav-item.u-pro {
  display: flex;
  align-items: center;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--nav-border);
}

.topbar .top-navbar .navbar-nav > .nav-item > a.profile-pic {
  gap: 12px;
  height: 52px;
  padding: 0 12px 0 8px;
}

.topbar .profile-pic-text {
  max-width: 220px;
  gap: 2px;
}

.topbar .profile-pic .profile-pic-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.topbar .profile-pic .profile-pic-email {
  font-size: 12px;
  line-height: 1.2;
}

/* ---------- Top bar logo: Quickview logos from Settings ----------
 * logo.png is 350x85 with ~47px transparent margin each side, so the large logo is pulled left to line up with the menu. */
.topbar .navbar-brand img.logo-large {
  height: 46px;
  width: auto;
  max-width: none;
  max-height: none;
  margin-left: -25px; /* cancels the transparent margin in logo.png (47/85 of the height) */
}

.topbar .navbar-brand img.logo-small {
  width: 46px;
  height: 46px;
  max-width: none;
  margin: 0 auto;
}

/* which logo shows: full logo when expanded, the mark alone on the icon rail */
.topbar .navbar-brand img.logo-small,
.mini-sidebar .topbar .navbar-brand img.logo-large {
  display: none !important; /* the theme's sidebar toggle script sets inline display on these logos */
}

.topbar .navbar-brand img.logo-large,
.mini-sidebar .topbar .navbar-brand img.logo-small {
  display: inline-block !important;
  vertical-align: middle;
}

/* ---------- Sidebar: collapsed icon rail, same standards as the expanded menu ----------
 * Theme rules for the rail use #main-sidenav, so these do too. The 75px rail width and the hover flyout stay as they are. */
@media (min-width: 768px) {
  .mini-sidebar #main-sidenav #sidebarnav > li {
    margin: 3px 0;
  }

  .mini-sidebar #main-sidenav #sidebarnav > li > a {
    height: 44px;
    border-radius: 0 10px 10px 0;
    color: #3d3c4a;
  }

  /* bolder icons: 22px, heavier line on the svg icons, a hairline outline on the font icons */
  .mini-sidebar #main-sidenav #sidebarnav > li > a .left-sidemenu-icon {
    width: 22px;
    height: 22px;
    color: #3d3c4a;
  }

  .mini-sidebar #main-sidenav #sidebarnav > li > a svg.left-sidemenu-icon path,
  .mini-sidebar #main-sidenav #sidebarnav > li > a svg.left-sidemenu-icon rect,
  .mini-sidebar #main-sidenav #sidebarnav > li > a svg.left-sidemenu-icon circle {
    stroke-width: 1.9;
  }

  .mini-sidebar #main-sidenav #sidebarnav > li > a i.left-sidemenu-icon {
    font-size: 22px;
    line-height: 22px;
    -webkit-text-stroke: 0.4px currentColor;
  }

  .mini-sidebar #main-sidenav #sidebarnav > li:not(.has-submenu):hover > a {
    background: var(--nav-accent-soft);
  }

  /* active: same tint, accent and purple icon as the expanded menu */
  .mini-sidebar #main-sidenav #sidebarnav > li.active > a {
    background: #e4e1f8;
    box-shadow: inset 4px 0 0 #5b4fc7;
  }

  .mini-sidebar #main-sidenav #sidebarnav > li.active > a .left-sidemenu-icon {
    color: #5b4fc7;
  }

  /* the group headings are hidden on the rail, so a hairline marks where each group starts */
  .mini-sidebar #main-sidenav #sidebarnav > li.nav-small-cap {
    display: block;
    height: 1px;
    margin: 10px 18px;
    padding: 0;
    overflow: hidden;
    background: var(--nav-border);
    font-size: 0;
    line-height: 0;
  }

  /* logo mark centred over the rail */
  .mini-sidebar .topbar .navbar-header .navbar-brand {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  /* theme gives the logo link padding-left:10px !important and 22px side padding; zero it so the mark sits dead centre in the 75px rail */
  .mini-sidebar .topbar .navbar-header .navbar-brand,
  .mini-sidebar .left-sidebar .logo a {
    width: 75px;
    padding: 0 !important;
    margin: 0;
  }

  /* the header has Bootstrap's pl-2 (padding-left:8px !important), which the theme's rail reset cannot beat: it shifted the mark right */
  .mini-sidebar .topbar .top-navbar .navbar-header {
    width: 75px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mini-sidebar .topbar .navbar-brand img.logo-small {
    margin: 0 !important;  /* drops the mr-2 on the img */
  }

  /* Vue pages: the Vuetify template's ".mini-sidebar .logo { width: 40px; overflow: hidden }" (scss/layout/_sidebar.scss)
     also hits the top bar logo and cut the left of the mark; give it the whole 75px rail */
  .mini-sidebar .topbar .navbar-header .logo {
    width: 75px;
    overflow: visible;
  }
}

/* ---------- Smooth collapse / expand ----------
 * The toggle only flips .mini-sidebar on the body, so the sidebar width, the page's left margin and the logo block
 * used to jump. While the toggle is clicked (body.sidebar-animating, set in layout/footerjs.blade.php) they share one 0.25s curve. Labels and the big logo go display:none -> inline, which cannot
 * transition, so they fade in a moment after the width starts to open. Desktop only, off for reduced-motion. */
@media (min-width: 768px) {
  .sidebar-animating .left-sidebar,
  .sidebar-animating .navbar-header,
  .sidebar-animating .page-wrapper {
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .topbar .top-navbar .navbar-header {
    overflow: hidden; /* keeps the big logo from spilling out while the block is still narrow */
  }

  body.sidebar-animating:not(.mini-sidebar) .sidebar-nav .hide-menu,
  body.sidebar-animating:not(.mini-sidebar) .sidebar-nav .nav-small-cap,
  body.sidebar-animating:not(.mini-sidebar) .topbar .navbar-brand img.logo-large {
    white-space: nowrap;
    animation: layout-fade-in 0.2s ease 0.1s both;
  }
}

@keyframes layout-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .left-sidebar,
  .navbar-header,
  .page-wrapper {
    transition: none;
  }

  .sidebar-nav .hide-menu,
  .sidebar-nav .nav-small-cap,
  .topbar .navbar-brand img.logo-large {
    animation: none !important;
  }
}

/* ---------- Top bar border: same hairline as the sidebar ----------
 * One line along the bottom of the top bar and one down the right edge of the logo block, so they meet the
 * sidebar's own right border. They are drawn above the white nav children (z-index) or they would be hidden. */
.topbar::after,
.topbar::before {
  content: "";
  position: absolute;
  background: var(--nav-border);
  pointer-events: none;
  z-index: 10001; /* above .header-overlay (z-index 10000) */
}

.topbar::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
}

@media (min-width: 768px) {
  .topbar::before {
    top: 0;
    bottom: 0;
    left: calc(var(--sidebar-w) - 1px);
    width: 1px;
  }

  .mini-sidebar .topbar::before {
    left: 74px;
  }
}


/* ---------- "Needs your attention" card (pages/home/widgets/attention-card.blade.php): manager and drafter dashboards ---------- */
.attention-list { margin: 0; padding: 0; list-style: none; }
.attention-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--brand-soft); color: var(--brand-navy); text-decoration: none; }
.attention-list li:last-child .attention-item { border-bottom: 0; }
.attention-item:hover { background: var(--brand-tint); text-decoration: none; color: var(--brand-navy); }
.attention-label { font-weight: 600; }
.attention-hint { display: block; font-size: 12px; color: var(--brand-muted); }
.attention-count { margin-left: auto; min-width: 44px; text-align: center; padding: 2px 10px; border-radius: 999px; font-weight: 700; background: var(--brand-soft); color: var(--layout-accent); }
.attention-count--alert { background: #fdeceb; color: #9b1c1c; }
.attention-count--zero { background: #f1f1f4; color: var(--brand-muted); }

/* Client dashboard, Active Fee Proposals: the building-name links were light blue (#60a5fa, about 2.5:1 on the page background) */
#client_active_fee_proposal a { color: var(--layout-accent); }
#client_active_fee_proposal a:hover { color: var(--brand-navy); }

/* ---------- Dashboard quick wins ----------
 * Restyle of the admin home dashboard (/home) in the EBC brand: same layout, widgets and data.
 * Scoped to :is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) and .dashboard-page-titles (page header).
 * The client dashboard (/clientHome) also renders inside #js-trigger-home-admin-wrapper.
 * KPI tiles: title + number are split into .kpi-label / .kpi-value in pages/home/admin/widgets/first-row. */
.dashboard-page-titles {
  margin: 0 0 20px;
  padding: 4px 0 0;
}

.dashboard-page-titles .breadcrumb-heading-text {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--brand-navy);
}

.dashboard-page-titles .breadcrumb-revamp {
  margin: 2px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--brand-muted);
}

/* 16px gutters between the widgets (was 30px) */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .row {
  margin-left: -8px;
  margin-right: -8px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .row > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .row-divider {
  display: flex;
  margin-bottom: 16px;
}

/* cards: white, 1px line, 12px radius, no shadow, 20px padding */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card {
  width: 100%;
  margin-bottom: 0;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px !important; /* revamp_dashboard.css sets 10px !important */
  box-shadow: none;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .row > [class*="col-"] > .dashboard-tile-card {
  margin-bottom: 16px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card .card-body {
  padding: 20px;
}

/* All Jobs nests a second .card.card-body: flatten it */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card .card.card-body {
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
  background: transparent;
  height: 100%;
}

/* header row: 15px / 700 navy title, control on the right, 16px under it */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card .card-heading-primary-text {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand-navy);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card .card-body > .d-flex {
  align-items: center;
  margin-bottom: 16px !important; /* the m-b-20 / m-b-30 utilities are !important */
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card .card-body > p.card-heading-primary-text {
  margin-bottom: 16px !important;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card .ml-auto > .col-sm-12 {
  padding: 0;
}

/* month pickers: 36px, 8px radius, navy focus ring */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card .form-control-sm {
  width: 116px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-ink);
  background: #fff;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-card .form-control-sm:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ---- KPI tiles ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card {
  transition: border-color 0.15s ease, transform 0.15s ease;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card:hover {
  border-color: var(--brand-navy);
  box-shadow: none;
  transform: translateY(-1px);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .card-body {
  padding: 20px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .d-flex {
  padding: 0;
  gap: 16px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .display-6 {
  margin: 0 !important; /* mr-4 */
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .circle-icon {
  width: 22px;
  height: 22px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .circle-icon path,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .circle-icon circle,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .circle-icon rect {
  fill: var(--brand-navy);
  stroke: none;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .align-slef-center {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .card-heading-primary-text {
  display: flex;
  flex-direction: column;
  margin: 0 !important; /* m-b-0 */
  font-size: inherit;
  line-height: 1.2;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .kpi-label {
  order: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-muted);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .kpi-value {
  order: 2;
  margin-top: 2px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--brand-navy);
  font-variant-numeric: tabular-nums;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card .card-footer-primary-text {
  margin-top: 4px !important;
  font-size: 12px;
  color: var(--brand-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- staff leave ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .staff-leave-card .staff-leave-item {
  border-bottom-color: var(--brand-soft);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .staff-leave-card .staff-leave-name,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .staff-leave-card .staff-leave-days {
  color: var(--brand-ink);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .staff-leave-card .staff-leave-dates {
  color: var(--brand-muted);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .staff-leave-card .staff-leave-view-all {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
}

/* ---- empty states ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #staff-leave-empty,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #empty_task {
  padding: 56px 16px;
  font-size: 14px;
  text-align: center;
  color: var(--brand-muted) !important; /* .text-muted is !important */
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .c3-chart-arcs-background {
  fill: var(--brand-tint);
  stroke: none;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .c3-empty {
  font-size: 14px;
  font-weight: 600;
}

/* ---- My Notes ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-table-wrapper .table {
  border-collapse: separate;
  border-spacing: 0 6px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container tr > td {
  padding: 10px 12px !important; /* py-2 */
  border: 0;
  background: var(--brand-tint);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container tr > td:first-child {
  border-radius: 8px 0 0 8px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container tr > td:last-child {
  border-radius: 0 8px 8px 0;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container tr:has(.text-danger) > td {
  background: #fdeceb;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .dashboard__table_tile {
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-ink);
  white-space: normal;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .dashboard__table_due_date {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-muted);
}

/* overdue: dark red on soft red (7:1) */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .text-danger {
  color: #9b1c1c !important; /* .text-danger is !important */
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .list-table-action {
  display: inline-flex;
  gap: 4px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .list-table-action .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--brand-muted);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .list-table-action .btn i {
  font-size: 18px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .list-table-action .btn:hover,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .list-table-action .btn:focus-visible {
  background: var(--brand-soft);
  color: var(--brand-navy);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .list-table-action .btn-outline-danger:hover,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) #events-td-container .list-table-action .btn-outline-danger:focus-visible {
  background: #fdeceb;
  color: #9b1c1c;
}

/* the round "+": the <img> keeps its markup and click hooks; its pixels are pushed out of the box and a
 * navy circle with a white plus is drawn as the background */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .custom__add-button {
  width: 36px;
  height: 36px !important; /* the inline .custom__add-button rule sets 50px !important */
  padding: 0;
  border-radius: 50%;
  object-fit: none;
  object-position: -999px 0;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='18' fill='%230b1d58'/%3E%3Cpath d='M18 11v14M11 18h14' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 36px 36px no-repeat;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .custom__add-button:hover {
  opacity: 0.88;
}

/* ---- All Jobs ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-projects-admin {
  padding-right: 8px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .mailbox .message-center a.card-all-jobs {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--brand-soft);
  border-radius: 8px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .mailbox .message-center a.card-all-jobs:hover {
  background: var(--brand-tint);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .card-all-jobs .btn-circle {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .mailbox .message-center a .mail-contnet {
  display: block;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding-left: 0;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .card-all-jobs .card-text-line-one {
  font-size: 14px;
  color: var(--brand-ink);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .card-all-jobs .card-text-line-one:last-child {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .card-all-jobs .mail-inner-content:last-child {
  justify-content: flex-start;
  gap: 6px;
  margin-top: 2px;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .card-all-jobs .card-text-line-two {
  display: inline;
  margin: 0;
  font-size: 12px;
  color: var(--brand-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Jobs Open/Completed chart ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .legend-label .dashboard-label-info {
  background-color: var(--layout-accent);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .legend-label .dashboard-label-success {
  background-color: var(--brand-blue);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .apexcharts-gridline {
  stroke: var(--brand-soft);
}

/* ---- focus + motion ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) a:focus-visible,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) button:focus-visible,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .custom__add-button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  :is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card {
    transition: none;
  }

  :is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dashboard-tile-card:hover {
    transform: none;
  }
}

/* ---- admin title row: period quick filter + quick actions ---- */
.dashboard-page-titles--admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-left: 0;
  margin-right: 0;
}

.dashboard-page-titles--admin #breadcrumbs {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

.dash-toolbar {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  min-width: 0;
}

.dash-period {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
}

.dash-period__btn {
  height: 36px;
  padding: 0 14px;
  margin: 0 0 0 -1px;
  border: 1px solid var(--brand-border);
  border-radius: 0;
  background: #fff;
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.dash-period__btn:first-child {
  margin-left: 0;
  border-radius: 8px 0 0 8px;
}

.dash-period__btn:last-child {
  border-radius: 0 8px 8px 0;
}

.dash-period__btn:hover {
  background: var(--brand-tint);
  border-color: var(--layout-accent);
  position: relative; /* keeps the hovered border above its neighbours (they overlap by 1px) */
}

.dash-period__btn[aria-pressed="true"] {
  position: relative;
  background: var(--brand-gradient);
  border-color: var(--layout-accent);
  color: #fff;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--layout-accent);
  border-radius: 8px;
  background: #fff;
  color: var(--layout-accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.dash-btn:hover {
  background: var(--brand-soft);
}

.dash-btn--solid {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
}

.dash-btn--solid:hover {
  background: var(--brand-gradient); /* .dash-btn:hover would otherwise turn it pale */
  filter: brightness(0.92);
}

.dash-period__btn:focus-visible,
.dash-btn:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.dash-period-note {
  flex: 0 0 100%;
  margin: 0;
  font-size: 12px;
  color: var(--brand-muted);
}

/* picker showing a period label instead of a month */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .pickadate-month.is-period {
  background: var(--brand-soft);
  color: var(--brand-navy);
  font-weight: 600;
}

@media (max-width: 768px) {
  .dash-toolbar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-basis: 100%;
  }

  .dash-actions {
    justify-content: flex-start;
  }
}

/* ---------- Team and client dashboards ----------
 * The team dashboard (#js-trigger-home-team-wrapper) and the client dashboard (/clientHome, which renders inside
 * #js-trigger-home-admin-wrapper) reuse every rule above. Only what is specific to them is added here. */

/* ---- empty states (shared "no results" partial + Upcoming Jobs) ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .page-notification {
  padding: 32px 16px;
  text-align: center;
  color: var(--brand-muted);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .page-notification svg {
  width: 56px;
  height: 56px;
  margin-bottom: 8px !important; /* mb-3 */
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .no-results-found-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-ink);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .no-results-found-sub-title {
  margin-top: 2px;
  font-size: 13px;
  color: var(--brand-muted);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dash-empty {
  padding: 56px 16px;
  font-size: 14px;
  text-align: center;
  color: var(--brand-muted);
}

/* ---- team: Upcoming Jobs timeline ---- */
#js-trigger-home-team-wrapper .dashboard-events {
  height: 375px;
  overflow-y: auto;
  padding: 0;
}

#js-trigger-home-team-wrapper .dashboard-events .sl-item {
  padding: 10px 8px;
  margin: 0;
  border-bottom: 1px solid var(--brand-soft);
  border-radius: 8px;
}

#js-trigger-home-team-wrapper .dashboard-events .sl-item:hover {
  background: var(--brand-tint);
}

#js-trigger-home-team-wrapper .dashboard-events .sl-left img {
  width: 32px;
  height: 32px;
}

#js-trigger-home-team-wrapper .dashboard-events .x-meta a {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-navy);
}

#js-trigger-home-team-wrapper .dashboard-events .sl-date,
#js-trigger-home-team-wrapper .dashboard-events .x-title {
  font-size: 12px;
  color: var(--brand-muted);
}

/* ---- team: All Jobs (title left, count right) ---- */
#js-trigger-home-team-wrapper .card-all-jobs h5 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--brand-ink);
}

#js-trigger-home-team-wrapper .card-all-jobs .job-count {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---- client: tables (Report History, Active Fee Proposals) ---- */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__header {
  height: auto;
  padding: 0;
  border: 0;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__header .card-heading-primary-text {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-navy);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__body table thead th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--brand-line);
  background: #fff;
  font-size: 13px !important; /* client_dashboard.css sets 14px !important */
  font-weight: 700;
  color: var(--brand-muted) !important; /* ...and #A6ACBE !important (2.3:1) */
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__body table tbody {
  background: transparent;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__body table tbody td {
  padding: 12px;
  border-top: 0;
  border-bottom: 1px solid var(--brand-soft);
  font-size: 14px;
  color: var(--brand-ink);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__body table tbody tr:hover {
  background: var(--brand-tint);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__body .list-table-action .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  font-size: 18px;
  color: var(--brand-muted);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__body .list-table-action .btn:hover,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .ebc-table__body .list-table-action .btn:focus-visible {
  background: var(--brand-soft);
  color: var(--brand-navy);
}

/* DataTables chrome (Active Fee Proposals) */
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dataTables_wrapper .dataTables_info,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dataTables_wrapper .dataTables_processing {
  font-size: 13px;
  color: var(--brand-muted);
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px;
  color: var(--brand-navy) !important; /* DataTables sets its colour with !important */
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dataTables_wrapper .dataTables_paginate .paginate_button.current,
:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  border-color: var(--layout-accent);
  background: var(--brand-gradient);
  color: #fff !important;
}

:is(#js-trigger-home-admin-wrapper, #js-trigger-home-team-wrapper, #js-trigger-home-drafter-wrapper) .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
  border-color: var(--brand-line);
  background: var(--brand-tint);
  color: var(--brand-navy) !important;
}

/* ==========================================================================
 * Top bar dropdown menus
 * Notifications, Create new (+), Settings, Language and the running timer share the profile
 * menu skin: 12px radius, 1px --nav-border, navy shadow, 14px rows, --brand-* tokens.
 * ========================================================================== */
.topbar :is(.navbar-top-right > .nav-item.dropdown:not(.u-pro), .my-timer-container) > .dropdown-menu {
  min-width: 0;
  max-width: calc(100vw - 32px);
  padding: 6px;
  margin-top: 8px;
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(91, 79, 199, 0.14);
  z-index: 1050;
  transform-origin: top right;
}

.topbar .my-timer-container > .dropdown-menu {
  transform-origin: top left;
}

.topbar :is(.navbar-top-right > .nav-item.dropdown:not(.u-pro), .my-timer-container) > .dropdown-menu.show {
  animation: profile-menu-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) both !important; /* beats animate.css bounceInDown */
}

/* panel widths */
.topbar .navbar-top-right > .nav-item.dropdown > .dropdown-menu { width: 280px; }
.topbar #topnav-notification-dropdown > .dropdown-menu { width: 360px !important; padding: 0; overflow: hidden; } /* beats .top-nav-events 375px !important */
.topbar .my-timer-container > .dropdown-menu { width: 280px; }

/* group heading */
.topbar .dropdown-menu .menu-head {
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-muted);
}

.topbar .dropdown-menu .menu-sep {
  height: 1px;
  margin: 6px 8px;
  background: var(--brand-line);
}

/* rows: Create new, Settings, Language */
.topbar .navbar-top-right > .nav-item.dropdown:not(.u-pro) > .dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  color: var(--brand-ink);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.topbar .navbar-top-right > .nav-item.dropdown:not(.u-pro) > .dropdown-menu .dropdown-item:hover,
.topbar .navbar-top-right > .nav-item.dropdown:not(.u-pro) > .dropdown-menu .dropdown-item:focus {
  background: var(--brand-tint);
  color: var(--brand-navy);
  text-decoration: none;
}

/* icon chip (font icons keep their glyph) */
.topbar .navbar-top-right .dropdown-item.dropdown-item-iconed i {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: var(--brand-soft);
  font-size: 18px;
  line-height: 1;
  color: var(--brand-navy);
}

/* language: the two columns become one list */
.topbar .dropdown-menu.language { width: 280px; }
.topbar .dropdown-menu.language .row { display: block; margin: 0; }
.topbar .dropdown-menu.language [class*="col-"] { max-width: none; padding: 0; }

/* focus ring */
.topbar .dropdown-menu a:focus-visible,
.topbar .dropdown-menu button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: -2px;
}

/* ---- notifications ---- */
.topbar #topnav-notification-dropdown .dropdown-menu > ul { margin: 0; padding: 0; }

.topbar #topnav-notification-dropdown .drop-title {
  padding: 14px 16px;
  border-bottom: 1px solid var(--brand-line);
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-ink);
}

.topbar #topnav-notification-dropdown #topnav-events-container {
  height: auto;
  max-height: min(420px, calc(100vh - 220px));
  padding: 0;
  overflow-y: auto;
}

/* loading: centred spinner while the container is empty */
.topbar #topnav-events-container:empty { min-height: 120px; }
.topbar #topnav-events-container:empty::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 48px auto 0;
  border: 2px solid var(--brand-soft);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: topnav-menu-spin 0.8s linear infinite;
}

@keyframes topnav-menu-spin { to { transform: rotate(360deg); } }

.topbar #topnav-events-container .topevent {
  position: relative;
  min-height: 56px;
  padding: 14px 16px 14px 30px;
  border-bottom: 1px solid var(--brand-line);
  transition: background-color 0.15s ease;
}

.topbar #topnav-events-container .topevent:last-child { border-bottom: 0; }
.topbar #topnav-events-container .topevent:hover { background: var(--brand-tint); }

/* unread dot */
.topbar #topnav-events-container .topevent::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 21px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-blue);
}

.topbar #topnav-events-container .topevent .x-content {
  padding: 0 0 0 10px;
  font-size: 13px;
  color: var(--brand-muted);
}

.topbar #topnav-events-container .topevent .x-content .x-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brand-ink);
}

.topbar #topnav-events-container .topevent .x-content .x-time {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--brand-muted);
}

.topbar #topnav-events-container .topevent .x-content .x-title { font-size: 13px; color: var(--brand-muted); }
.topbar #topnav-events-container .topevent .x-content .x-ref-title { font-size: 12px; }
.topbar #topnav-events-container .topevent .x-content .x-description { padding: 4px 0 0; background: none; font-size: 13px; }
.topbar #topnav-events-container .topevent .x-content a { color: var(--brand-navy); }

/* empty state */
.topbar #topnav-events-container .top-nav-no-evenets { padding: 32px 24px; font-size: 14px; }
.topbar #topnav-events-container .top-nav-no-evenets img { width: 96px; padding-bottom: 12px; }
.topbar #topnav-events-container .top-nav-no-evenets .x-message { font-weight: 600; color: var(--brand-ink); }
.topbar #topnav-events-container .top-nav-no-evenets .x-message::after {
  content: "New activity will show up here.";
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--brand-muted);
}

/* mark all read (footer row) */
.topbar #topnav-events-container-footer .nav-link {
  padding: 12px 16px;
  border-top: 1px solid var(--brand-line);
  font-size: 13px;
  color: var(--brand-navy);
}
.topbar #topnav-events-container-footer .nav-link:hover { background: var(--brand-tint); }

/* ---- running timer ---- */
.topbar .active-timer-topnav { width: auto; padding: 10px; }
.topbar .active-timer-topnav .x-heading { font-size: 14px; font-weight: 700; color: var(--brand-ink); }
.topbar .active-timer-topnav .x-task { font-size: 14px; color: var(--brand-ink); }
.topbar .active-timer-topnav .x-task a { font-weight: 600; color: var(--brand-navy); }

/* ---- phones: full width minus 16px gutters, below the 60px bar ---- */
@media (max-width: 575.98px) {
  .topbar :is(.navbar-top-right > .nav-item.dropdown:not(.u-pro), .my-timer-container) > .dropdown-menu {
    position: fixed;
    top: 64px;
    left: 16px;
    right: 16px;
    width: auto !important; /* beats .top-nav-events 375px !important */
    max-width: none;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar :is(.navbar-top-right > .nav-item.dropdown:not(.u-pro), .my-timer-container) > .dropdown-menu.show { animation: none !important; }
  .topbar #topnav-events-container:empty::before { animation: none; }
  .topbar .dropdown-menu .dropdown-item,
  .topbar #topnav-events-container .topevent { transition: none; }
}
