.app-sidebar,
.main-sidebar-header {
  background: #070735;
}

:root {
  /* EBu Engineering brand — aligned to www.ebu-engineering.nl
     Primary indigo = the website's --accent (#000687); warm amber accent (#e8a14e). */
  --primary-rgb: 0, 6, 135;
  --primary-color: #000687;
  --primary01: rgba(0, 6, 135, 0.1);
  --primary02: rgba(0, 6, 135, 0.2);
  --primary03: rgba(0, 6, 135, 0.3);
  --primary005: rgba(0, 6, 135, 0.05);
  --ebu-red: #e30613;
  --ebu-grey: #8c8c8c;
  --ebu-black: #050505;
  --ebu-accent: #e8a14e;
  --ebu-navy: #081927;
  --ebu-indigo-soft: #4f55a8;
  --ebu-surface: #f7f9f8;

  /* MudBlazor palette -> brand */
  --mud-palette-primary: #000687;
  --mud-palette-primary-rgb: 0, 6, 135;
  --mud-palette-primary-text: #ffffff;
  --mud-palette-primary-darken: #00045f;
  --mud-palette-primary-lighten: #4f55a8;
  --mud-palette-primary-hover: rgba(0, 6, 135, 0.08);
  --mud-palette-secondary: #e8a14e;
  --mud-palette-secondary-rgb: 232, 161, 78;

  /* Brand font: Causten (as used on the website) with system fallbacks, since the
     site serves it via local() only — falls back gracefully when not installed. */
  --mud-typography-default-family: "Causten", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mud-typography-h1-family: var(--mud-typography-default-family);
  --mud-typography-h2-family: var(--mud-typography-default-family);
  --mud-typography-h3-family: var(--mud-typography-default-family);
  --mud-typography-h4-family: var(--mud-typography-default-family);
  --mud-typography-h5-family: var(--mud-typography-default-family);
  --mud-typography-h6-family: var(--mud-typography-default-family);
  --mud-typography-subtitle1-family: var(--mud-typography-default-family);
  --mud-typography-subtitle2-family: var(--mud-typography-default-family);
  --mud-typography-body1-family: var(--mud-typography-default-family);
  --mud-typography-body2-family: var(--mud-typography-default-family);
  --mud-typography-button-family: var(--mud-typography-default-family);
  --mud-typography-caption-family: var(--mud-typography-default-family);
  --mud-typography-overline-family: var(--mud-typography-default-family);
}

body {
  font-family: "Causten", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Inline images rendered in place of [cid:...] email references */
.portal-task-inline-image {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Description / wiki images never overflow their panel; aspect ratio kept. Click to enlarge. */
.task-description img,
.wiki-markdown img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  cursor: zoom-in;
}

/* Click-to-enlarge lightbox overlay */
.portal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 11, 32, 0.88);
  cursor: zoom-out;
}

.portal-lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

.portal-lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

/* Read-only status/priority must not look interactive; editable ones do. */
.portal-chip-readonly,
.portal-chip-readonly .mud-chip {
  cursor: default !important;
}

.portal-chip-clickable,
.portal-chip-clickable .mud-chip {
  cursor: pointer;
}

.notifications-dropdown {
  display: none !important;
}

.app-sidebar .side-menu__item.active,
.app-sidebar .slide.active > .side-menu__item,
.app-sidebar .slide.open > .side-menu__item {
  background: rgba(255, 255, 255, 0.1);
  border-inline-start: 3px solid var(--ebu-accent);
  color: #fff;
}

.app-sidebar .side-menu__item.active .side-menu__icon,
.app-sidebar .slide.active > .side-menu__item .side-menu__icon,
.app-sidebar .slide.open > .side-menu__item .side-menu__icon,
.app-sidebar .side-menu__item.active .side-menu__label,
.app-sidebar .slide.active > .side-menu__item .side-menu__label,
.app-sidebar .slide.open > .side-menu__item .side-menu__label {
  color: #fff;
}

.mud-input-control .mud-input-control-input-container .mud-input-label,
.mud-input-control .mud-input-control-input-container .mud-input-label-outlined,
.mud-input-control .mud-input-control-helper-container,
.mud-input-root,
.mud-input-slot.mud-input-root,
.mud-select .mud-input-slot,
.mud-input > textarea.mud-input-root {
  font-size: 0.8125rem !important;
  letter-spacing: 0;
  line-height: 1.45 !important;
}

.mud-input-control .mud-input-control-input-container .mud-input-label {
  transform-origin: top left;
}

.mud-input-control .mud-input-control-input-container .mud-input-label.mud-input-label-margin-dense {
  line-height: 1.35 !important;
}

.mud-button-root .mud-button-label {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  justify-content: center;
}

.mud-button-root .mud-icon-root,
.mud-icon-button .mud-icon-root {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  margin: 0;
}

.portal-brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.portal-brand-logo-sidebar {
  background: #fff;
  border-radius: 0.25rem;
  max-height: 2.2rem;
  max-width: 9.75rem;
  padding: 0.25rem 0.35rem;
}

.portal-brand-logo-header {
  max-height: 2rem;
  max-width: 11rem;
}

.portal-ag-grid {
  --ag-background-color: var(--custom-white);
  --ag-foreground-color: var(--default-text-color);
  --ag-border-color: var(--default-border);
  --ag-header-background-color: var(--custom-white);
  --ag-header-foreground-color: var(--default-text-color);
  --ag-odd-row-background-color: transparent;
  --ag-row-hover-color: rgba(var(--primary-rgb), 0.06);
  --ag-selected-row-background-color: rgba(var(--primary-rgb), 0.1);
  --ag-control-panel-background-color: var(--custom-white);
  --ag-subheader-background-color: var(--default-body-bg-color);
  --ag-input-background-color: var(--custom-white);
  --ag-input-border-color: var(--default-border);
  --ag-menu-background-color: var(--custom-white);
  --ag-card-shadow: none;
  --ag-font-family: inherit;
  --ag-font-size: 0.8125rem;
  color: var(--default-text-color);
}

.portal-ag-grid .ag-root-wrapper {
  border-color: var(--default-border);
  border-radius: 0.5rem;
  background: var(--custom-white);
}

.portal-ag-grid .ag-header,
.portal-ag-grid .ag-header-row,
.portal-ag-grid .ag-paging-panel,
.portal-ag-grid .ag-side-bar,
.portal-ag-grid .ag-tool-panel-wrapper {
  background: var(--custom-white);
  color: var(--default-text-color);
  border-color: var(--default-border);
}

.portal-ag-grid .ag-row,
.portal-ag-grid .ag-cell,
.portal-ag-grid .ag-header-cell,
.portal-ag-grid .ag-header-group-cell {
  border-color: var(--default-border);
}

.portal-ag-grid .ag-header-cell-text {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-ag-grid .ag-cell {
  display: flex;
  align-items: center;
}

.portal-ag-grid .ag-cell-focus,
.portal-ag-grid .ag-cell:focus,
.portal-ag-grid .ag-cell:focus-within {
  border-color: transparent !important;
  outline: 0 !important;
}

.portal-ag-grid .ag-row {
  background: var(--custom-white);
}

.portal-ag-grid .ag-row-odd {
  background: rgba(var(--light-rgb), 0.16);
}

.portal-ag-grid .ag-row-hover {
  background: rgba(var(--primary-rgb), 0.06) !important;
}

.portal-ag-grid .ag-column-drop {
  background: var(--default-body-bg-color);
  border-color: var(--default-border);
}

.portal-ag-grid .ag-column-drop-title,
.portal-ag-grid .ag-column-drop-empty-message,
.portal-ag-grid .ag-group-title-bar,
.portal-ag-grid .ag-side-button-label,
.portal-ag-grid .ag-paging-panel {
  color: var(--text-muted);
}

.portal-ag-grid .ag-floating-filter,
.portal-ag-grid .ag-floating-filter-body,
.portal-ag-grid .ag-input-wrapper,
.portal-ag-grid .ag-input-field-input,
.portal-ag-grid input[class*="ag-"],
.portal-ag-grid .ag-picker-field-wrapper {
  background: var(--custom-white) !important;
  color: var(--default-text-color) !important;
  border-color: var(--default-border) !important;
}

.portal-ag-grid .ag-input-field-input::placeholder,
.portal-ag-grid input[class*="ag-"]::placeholder {
  color: var(--text-muted) !important;
}

[data-theme-mode=dark] .portal-ag-grid {
  --ag-background-color: var(--custom-white);
  --ag-foreground-color: var(--default-text-color);
  --ag-header-background-color: var(--custom-white);
  --ag-header-foreground-color: var(--default-text-color);
  --ag-input-background-color: var(--custom-white);
  --ag-input-text-color: var(--default-text-color);
  --ag-control-panel-background-color: var(--custom-white);
  --ag-menu-background-color: var(--custom-white);
  --ag-subheader-background-color: var(--default-body-bg-color);
}

[data-theme-mode=dark] .portal-ag-grid .ag-row-odd {
  background: rgba(255, 255, 255, 0.025);
}

[data-theme-mode=dark] .portal-ag-grid .ag-floating-filter,
[data-theme-mode=dark] .portal-ag-grid .ag-floating-filter-body,
[data-theme-mode=dark] .portal-ag-grid .ag-input-wrapper,
[data-theme-mode=dark] .portal-ag-grid .ag-input-field-input,
[data-theme-mode=dark] .portal-ag-grid input[class*="ag-"],
[data-theme-mode=dark] .portal-ag-grid .ag-picker-field-wrapper {
  background: var(--custom-white) !important;
  color: var(--default-text-color) !important;
}

.portal-ag-open-button {
  align-items: center;
  background-color: var(--primary01);
  border: 0;
  border-radius: 0.35rem;
  color: var(--primary-color);
  display: inline-flex;
  height: 1.75rem;
  justify-content: center;
  line-height: 1;
  width: 1.75rem;
}

.portal-ag-open-button:hover,
.portal-ag-open-button:focus {
  background-color: var(--primary-color);
  color: #fff;
}

.portal-actions-grid {
  height: calc(100vh - 18.5rem);
  min-height: 520px;
  width: 100%;
}

.portal-ag-avatar-list {
  align-items: center;
  display: inline-flex;
  gap: 0.25rem;
}

.portal-ag-avatar {
  align-items: center;
  background: var(--primary01);
  border: 1px solid var(--custom-white);
  border-radius: 999px;
  color: var(--primary-color);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 800;
  height: 1.75rem;
  justify-content: center;
  overflow: hidden;
  width: 1.75rem;
}

.portal-ag-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.portal-ag-priority {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.35rem;
  line-height: 1;
  padding: 0.35rem 0.55rem;
}

.portal-ag-priority-urgent {
  background: rgba(var(--danger-rgb), 0.12);
  color: rgb(var(--danger-rgb));
}

.portal-ag-priority-high {
  background: rgba(var(--warning-rgb), 0.14);
  color: rgb(var(--warning-rgb));
}

.portal-ag-priority-normal {
  background: rgba(var(--info-rgb), 0.12);
  color: rgb(var(--info-rgb));
}

.portal-ag-priority-low,
.portal-ag-priority-clear {
  background: var(--default-background);
  color: var(--text-muted);
}

.portal-task-refresh-button {
  align-items: center;
  display: inline-flex;
  height: 1.82rem;
  justify-content: center;
  min-height: 1.82rem;
  min-width: 1.82rem;
  padding: 0;
  width: 1.82rem;
}

.portal-task-refresh-button .mud-icon-root {
  font-size: 0.82rem;
}

.portal-comment-input {
  align-items: flex-start !important;
  display: flex !important;
  padding: 0 !important;
}

.portal-comment-input .mud-input-control,
.portal-comment-input .mud-input-control-input-container,
.portal-comment-input .mud-input,
.portal-comment-input .mud-input-slot {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
}

.portal-comment-input textarea {
  line-height: 1.45 !important;
  margin: 0 !important;
  padding: 0.55rem 0.75rem !important;
}

.portal-task-description-images {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.portal-task-description-image {
  margin: 0;
}

.portal-task-description-image img {
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
  display: block;
  max-height: 22rem;
  max-width: 100%;
  object-fit: contain;
}

.portal-task-description-image figcaption {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

.portal-task-mention {
  align-items: center;
  background: var(--primary01);
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: 999px;
  color: var(--primary-color);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.35rem;
  line-height: 1.2;
  margin: 0 0.12rem;
  padding: 0.12rem 0.45rem 0.12rem 0.18rem;
  vertical-align: middle;
}

.portal-task-mention-avatar,
.portal-task-mention-initials {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 1.25rem;
  width: 1.25rem;
}

.portal-task-mention-avatar {
  object-fit: cover;
}

.portal-task-mention-initials {
  align-items: center;
  background: var(--primary-color);
  color: #fff;
  display: inline-flex;
  font-size: 0.58rem;
  justify-content: center;
}

/* Comment bodies keep their original line breaks / blank lines (especially e-mail replies) and
   wrap long words and URLs instead of overflowing the panel. */
.task-comment-body {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Planning-horizon card: let the bar chart fill the available card height instead of a fixed height. */
.portal-horizon-card {
  display: flex;
  flex-direction: column;
}

.portal-horizon-card .portal-horizon-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

/* Vertical bar chart used for the dashboard "Planning horizon" card. */
.portal-bar-chart {
  align-items: flex-end;
  display: flex;
  flex: 1 1 auto;
  gap: 0.6rem;
  min-height: 158px;
  padding-top: 0.5rem;
}

.portal-bar-col {
  align-items: center;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.portal-bar-value {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.portal-bar-track {
  align-items: flex-end;
  background: rgba(135, 144, 158, 0.12);
  border-radius: 0.4rem;
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
  width: 100%;
}

.portal-bar-fill {
  border-radius: 0.4rem 0.4rem 0 0;
  min-height: 3px;
  transition: height 0.35s ease;
  width: 100%;
}

.portal-bar-label {
  color: var(--text-muted);
  font-size: 0.64rem;
  line-height: 1.1;
  margin-top: 0.4rem;
  text-align: center;
}

/* File-center image attachments: thumbnail in the list, preview in the detail panel. */
.portal-file-thumb img {
  border-radius: 0.4rem;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.portal-file-preview {
  background: var(--default-body-bg-color);
  border: 1px solid var(--default-border);
  border-radius: 0.6rem;
  cursor: zoom-in;
  overflow: hidden;
}

.portal-file-preview img {
  display: block;
  max-height: 180px;
  object-fit: contain;
  width: 100%;
}

/* System status page */
.portal-status-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
}

.portal-status-pill i {
  font-size: 0.95rem;
}

.portal-status-pill-ok {
  background: rgba(0, 136, 68, 0.12);
  color: #008844;
}

.portal-status-pill-down {
  background: rgba(223, 90, 90, 0.12);
  color: #d9534f;
}

.portal-status-pill-warn {
  background: rgba(232, 161, 78, 0.15);
  color: #e8a14e;
}

.portal-status-row {
  align-items: center;
  border-bottom: 1px dashed var(--default-border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.55rem 0;
}

.portal-status-row:last-of-type {
  border-bottom: 0;
}

.portal-status-row span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.portal-status-row strong {
  font-size: 0.85rem;
  text-align: right;
  word-break: break-all;
}

.portal-status-mono {
  font-family: var(--bs-font-monospace, monospace);
  letter-spacing: 0.02em;
}

/* Floating tooltip shown when hovering a donut/pie segment (status name + item count). */
.portal-chart-tooltip {
  position: fixed;
  z-index: 3000;
  pointer-events: none;
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

/* Small colour dot shown next to each status in the status dropdown (matches the ClickUp colour). */
.portal-status-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.45rem;
  vertical-align: middle;
  flex: 0 0 auto;
}

/* Subtask marker in the task grid: a small accent-coloured ↳ before the title. */
.portal-subtask-arrow {
  color: var(--ebu-accent, #e8a14e);
  font-weight: 700;
  margin-right: 0.15rem;
}

/* Task-detail description: wrap the rendered markdown in a soft, slightly tinted container so it
   reads as one block instead of bleeding into the surrounding card layout. */
.portal-description-box {
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.portal-description-box > :first-child {
  margin-top: 0;
}

.portal-description-box > :last-child {
  margin-bottom: 0;
}

[data-theme-mode="dark"] .portal-description-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.09);
}

.portal-assignee-avatar-list {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.portal-assignee-avatar {
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
}

.portal-assignee-avatar:hover .mud-avatar {
  box-shadow: 0 0 0 2px var(--primary-color);
}

.portal-account-drawer .mud-drawer-content {
  background: var(--custom-white);
  color: var(--default-text-color);
  max-height: 100vh;
  overflow-y: auto;
}

.portal-account-drawer .form-label,
.portal-account-drawer .mud-input-label,
.portal-account-drawer .mud-table-cell,
.portal-account-drawer .mud-typography {
  letter-spacing: 0;
}

.portal-account-drawer .form-label {
  color: var(--default-text-color);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.portal-account-drawer .mud-input,
.portal-account-drawer .mud-select,
.portal-account-drawer .mud-table {
  font-size: 0.8125rem;
}

.wiki-shell {
  min-height: 640px;
}

.wiki-nav-button.mud-button {
  border-radius: 0;
  color: var(--default-text-color);
  justify-content: flex-start;
  min-height: 3rem;
  padding: 0.6rem 1rem;
  text-align: left;
}

.wiki-nav-button.active {
  background: var(--primary01);
  color: var(--primary-color);
}

.wiki-nav-button .mud-button-label {
  justify-content: flex-start;
}

.wiki-reader {
  min-height: 640px;
}

.wiki-markdown {
  color: var(--default-text-color);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.wiki-markdown h2,
.wiki-markdown h3,
.wiki-markdown h4 {
  color: var(--default-text-color);
  font-weight: 700;
  letter-spacing: 0;
}

.wiki-markdown pre {
  background: var(--default-body-bg-color);
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
  color: var(--default-text-color);
  padding: 1rem;
  white-space: pre-wrap;
}

.portal-news-markdown {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.75;
}

.portal-news-markdown-hero {
  font-size: 0.9375rem;
}

.portal-news-markdown p {
  margin-block-end: 0.85rem;
}

.portal-news-markdown h2,
.portal-news-markdown h3,
.portal-news-markdown h4 {
  color: var(--default-text-color);
  font-weight: 700;
  letter-spacing: 0;
  margin-block: 1.15rem 0.55rem;
}

.portal-news-markdown h2 {
  font-size: 1.25rem;
}

.portal-news-markdown h3 {
  font-size: 1.1rem;
}

.portal-news-markdown h4 {
  font-size: 1rem;
}

.portal-news-markdown ul {
  margin-block: 0.35rem 0.9rem;
  padding-inline-start: 1.15rem;
}

.portal-news-markdown li {
  margin-block-end: 0.35rem;
}

.portal-news-markdown a {
  color: var(--primary-color);
  font-weight: 600;
}

.portal-news-markdown img {
  background: #f4f5f8;
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
  display: block;
  height: auto;
  margin: 1rem 0;
  max-height: 420px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.portal-metric-row:last-child .mud-progress-linear,
.portal-folder-metric:last-child .mud-progress-linear {
  margin-bottom: 0 !important;
}

.portal-folder-metric {
  border-bottom: 1px dashed var(--default-border);
  padding: 0.85rem 0;
}

.portal-folder-metric:first-child {
  padding-top: 0;
}

.portal-folder-metric:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.portal-folder-percent {
  align-items: center;
  background: rgba(var(--info-rgb), 0.1);
  border-radius: 0.25rem;
  color: rgb(var(--info-rgb));
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  max-width: 3rem;
  padding: 0.28rem 0.42rem;
  white-space: nowrap;
}

.portal-dashboard-kpi .mud-card-content {
  padding: 1.5rem;
}

.portal-dashboard-welcome .mud-card-content {
  padding: 1.25rem 1.5rem;
}

.portal-inline-badge {
  border-radius: 0.25rem;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.45rem 0.6rem;
  white-space: nowrap;
}

.portal-dashboard-goal {
  border-bottom: 1px dashed var(--default-border);
  padding: 0.7rem 0;
}

.portal-dashboard-goal:first-child {
  padding-top: 0;
}

.portal-dashboard-goal:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.portal-kpi-label {
  color: var(--default-text-color);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
}

.portal-kpi-value {
  color: var(--default-text-color);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}

.portal-kpi-icon {
  align-items: center;
  border-radius: 0.5rem;
  display: inline-flex;
  height: 2.6rem;
  justify-content: center;
  min-width: 2.6rem;
}

.portal-kpi-chip {
  align-items: center;
  border-radius: 0.25rem;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.3rem 0.45rem;
  white-space: nowrap;
}

.portal-kpi-chip-success {
  background: rgba(var(--success-rgb), 0.1);
  color: rgb(var(--success-rgb));
}

.portal-kpi-chip-warning {
  background: rgba(var(--warning-rgb), 0.13);
  color: rgb(var(--warning-rgb));
}

.portal-kpi-chip-danger {
  background: rgba(var(--danger-rgb), 0.1);
  color: rgb(var(--danger-rgb));
}

.custom-card .mud-chart {
  color: var(--default-text-color);
}

[data-theme-mode=dark] .portal-ag-open-button:hover,
[data-theme-mode=dark] .portal-ag-open-button:focus {
  color: #fff;
}

.portal-view-switch {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

.portal-calendar {
  color: var(--default-text-color);
}

.portal-calendar-toolbar {
  align-items: center;
  border: 1px solid var(--default-border);
  border-bottom: 0;
  border-radius: 0.5rem 0.5rem 0 0;
  display: flex;
  justify-content: space-between;
  padding: 0.85rem;
}

.portal-calendar-toolbar .mud-icon-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
}

.portal-calendar-toolbar .mud-icon-button .mud-icon-root {
  margin: 0;
}

.portal-calendar-title {
  align-items: center;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: center;
}

.portal-calendar-title span {
  color: var(--default-text-color);
  font-size: 1rem;
  font-weight: 700;
  text-transform: capitalize;
}

.portal-calendar-title small {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.portal-calendar-scroll {
  overflow-x: auto;
}

.portal-calendar-grid {
  background: var(--default-border);
  border: 1px solid var(--default-border);
  border-radius: 0 0 0.5rem 0.5rem;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 760px;
  overflow: hidden;
}

.portal-calendar-weekday {
  background: var(--custom-white);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0.7rem 0.8rem;
  text-transform: uppercase;
}

.portal-calendar-day {
  background: var(--custom-white);
  min-height: 126px;
  overflow: visible;
  padding: 0.65rem;
}

.portal-calendar-day.is-muted {
  background: rgba(var(--light-rgb), 0.2);
}

.portal-calendar-day.is-muted .portal-calendar-date-row {
  color: var(--text-muted);
}

.portal-calendar-day.is-today {
  box-shadow: inset 0 0 0 1px var(--primary-color);
}

.portal-calendar-date-row {
  align-items: center;
  color: var(--default-text-color);
  display: flex;
  font-size: 0.78rem;
  font-weight: 700;
  justify-content: space-between;
  line-height: 1;
  min-height: 1.35rem;
}

.portal-calendar-today {
  background: var(--primary01);
  border-radius: 0.25rem;
  color: var(--primary-color);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.18rem 0.35rem;
}

.portal-calendar-events {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.portal-calendar-event {
  align-items: center;
  border: 0;
  border-radius: 0.35rem;
  display: flex;
  gap: 0.35rem;
  min-height: 1.8rem;
  overflow: hidden;
  padding: 0.35rem 0.45rem;
  position: relative;
  text-align: left;
  width: 100%;
  z-index: 1;
}

.portal-calendar-event:hover,
.portal-calendar-event:focus {
  filter: brightness(0.96);
  outline: 0;
}

.portal-calendar-event.is-range-start {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  margin-right: -0.72rem;
  padding-right: 1.05rem;
}

.portal-calendar-event.is-range-middle {
  border-radius: 0;
  margin-left: -0.72rem;
  margin-right: -0.72rem;
  padding-left: 1.05rem;
  padding-right: 1.05rem;
}

.portal-calendar-event.is-range-end {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  margin-left: -0.72rem;
  padding-left: 1.05rem;
}

.portal-calendar-event-continuation {
  display: block;
  min-height: 0.9rem;
  width: 100%;
}

.portal-calendar-event-id {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
}

.portal-calendar-event-title {
  flex: 1 1 auto;
  font-size: 0.72rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-calendar-event-primary {
  background: var(--primary01);
  color: var(--primary-color);
}

.portal-calendar-event-warning {
  background: rgba(var(--warning-rgb), 0.14);
  color: rgb(var(--warning-rgb));
}

.portal-calendar-event-danger {
  background: rgba(var(--danger-rgb), 0.12);
  color: rgb(var(--danger-rgb));
}

.portal-calendar-event-success {
  background: rgba(var(--success-rgb), 0.12);
  color: rgb(var(--success-rgb));
}

.portal-calendar-more {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding-left: 0.25rem;
}

.portal-calendar-legend {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  gap: 1rem;
  justify-content: flex-end;
}

.portal-calendar-legend span {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

.portal-calendar-dot {
  border-radius: 999px;
  display: inline-flex;
  height: 0.55rem;
  width: 0.55rem;
}

.portal-calendar-dot-primary {
  background: var(--primary-color);
}

.portal-calendar-dot-warning {
  background: rgb(var(--warning-rgb));
}

.portal-calendar-dot-danger {
  background: rgb(var(--danger-rgb));
}

.portal-calendar-dot-success {
  background: rgb(var(--success-rgb));
}

@media (max-width: 575.98px) {
  .portal-calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  .portal-calendar-title {
    align-items: flex-start;
    text-align: left;
  }
}

.portal-news-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}

.portal-news-hero-media,
.portal-news-detail-image,
.portal-dashboard-news-feature {
  overflow: hidden;
  position: relative;
}

.portal-news-hero-media img,
.portal-news-detail-image img,
.portal-dashboard-news-feature > img {
  display: block;
  height: auto !important;
  max-height: 360px;
  object-fit: contain !important;
  width: 100%;
}

.portal-news-hero-media {
  background: #f4f5f8;
  min-height: 0;
}

.portal-news-floating-badge {
  background: rgba(var(--primary-rgb), 0.92);
  border-radius: 0.35rem;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  left: 1rem;
  padding: 0.4rem 0.6rem;
  position: absolute;
  top: 1rem;
}

.portal-news-hero-content {
  padding: 1.25rem;
}

.portal-news-title {
  color: var(--default-text-color);
  letter-spacing: 0;
  line-height: 1.2;
}

.portal-news-meta {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.72rem;
  gap: 0.45rem;
}

.portal-news-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portal-news-tag {
  background: var(--primary01);
  border-radius: 0.25rem;
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.35rem 0.45rem;
}

.portal-news-insight-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-news-insight,
.portal-news-detail-block {
  background: var(--default-body-bg-color);
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
  padding: 0.85rem;
}

.portal-news-insight span,
.portal-news-detail-block span {
  color: var(--default-text-color);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.portal-news-insight p,
.portal-news-detail-block p {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0;
}

.portal-news-search {
  min-width: min(100%, 220px);
}

.portal-news-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.portal-news-card {
  align-items: stretch;
  background: var(--custom-white);
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
  cursor: pointer;
  display: grid;
  gap: 1rem;
  grid-template-columns: 7.25rem minmax(0, 1fr) auto;
  padding: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.portal-news-card:hover,
.portal-news-card.active {
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0.45rem 1.25rem rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.portal-news-card-image {
  background: #f4f5f8;
  border-radius: 0.45rem;
  overflow: hidden;
}

.portal-news-card-image img {
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.portal-news-card-body {
  min-width: 0;
}

.portal-news-card-action {
  align-items: center;
  display: flex;
}

.portal-news-workspace {
  height: calc(100vh - 15rem);
  min-height: 560px;
  overflow: hidden;
}

.portal-news-feed-column {
  border-inline-end: 1px solid var(--default-border);
}

.portal-news-column-header {
  border-bottom: 1px solid var(--default-border);
  padding: 1rem 1.25rem;
}

.portal-news-list-compact,
.portal-news-detail-content {
  max-height: calc(100vh - 22rem);
  min-height: 455px;
  overflow: auto;
  padding: 1.25rem;
}

.portal-news-list-compact .portal-news-card {
  gap: 0.65rem;
  grid-template-columns: 4rem minmax(0, 1fr);
  padding: 0.65rem;
}

.portal-news-list-compact .portal-news-card-image {
  min-height: 0;
}

.portal-news-list-compact .portal-news-card-action,
.portal-news-list-compact .portal-news-tag-list {
  display: none;
}

.portal-news-detail-image {
  background: #f4f5f8;
  border-radius: 0.5rem;
}

.portal-news-detail-block {
  margin-bottom: 0.85rem;
}

.portal-file-center {
  min-height: calc(100vh - 13rem);
}

.portal-file-panel {
  min-height: calc(100vh - 13rem);
}

.portal-file-dossier {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--default-border);
  color: var(--default-text-color);
  display: flex;
  gap: 0.75rem;
  padding: 0.95rem 1.25rem;
  text-align: left;
  width: 100%;
}

.portal-file-dossier:hover,
.portal-file-dossier.active {
  background: var(--primary01);
  color: var(--primary-color);
}

.portal-file-dossier-icon {
  align-items: center;
  background: var(--primary01);
  border-radius: 0.45rem;
  display: inline-flex;
  height: 2.1rem;
  justify-content: center;
  width: 2.1rem;
}

.portal-file-dossier-count {
  background: var(--default-body-bg-color);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
}

.portal-file-search {
  min-width: min(100%, 260px);
}

.portal-file-list {
  max-height: calc(100vh - 19rem);
  overflow: auto;
}

.portal-file-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--default-border);
  color: var(--default-text-color);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto minmax(0, 1fr) minmax(8rem, auto) auto;
  padding: 0.95rem 1.25rem;
  text-align: left;
  width: 100%;
}

.portal-file-row:hover,
.portal-file-row.active {
  background: var(--primary01);
}

.portal-file-row-main,
.portal-file-row-meta {
  min-width: 0;
}

.portal-file-row-main span,
.portal-file-row-meta span {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-file-row-main small,
.portal-file-row-meta small {
  color: var(--text-muted);
  display: block;
  font-size: 0.72rem;
}

.portal-file-row-meta {
  text-align: right;
}

.portal-file-detail-row {
  border-bottom: 1px dashed var(--default-border);
  padding: 0.85rem 0;
}

.portal-file-detail-row span {
  color: var(--text-muted);
  display: block;
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
}

.portal-file-detail-row strong,
.portal-file-detail-row p {
  color: var(--default-text-color);
  font-size: 0.86rem;
  margin: 0;
}

.portal-news-stat {
  align-items: center;
  border-bottom: 1px dashed var(--default-border);
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.portal-news-stat span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.portal-news-stat strong {
  color: var(--default-text-color);
  font-size: 1rem;
}

.portal-dashboard-news-feature {
  background: #f4f5f8;
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
}

.portal-dashboard-news-feature > img {
  height: auto !important;
  max-height: 180px;
  object-position: center;
}

.portal-dashboard-news-feature-body {
  padding: 1rem;
}

.portal-dashboard-news-summary {
  display: -webkit-box;
  line-height: 1.5;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.portal-goal-list-item {
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--default-border);
  color: var(--default-text-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease;
}

.portal-goal-list-name {
  font-size: 0.84rem;
  font-weight: 700;
  min-width: 0;
}

.portal-goal-list-pct {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-color);
}

.portal-goal-list-bar {
  margin-top: 0.4rem;
  margin-bottom: 0.1rem;
}

.portal-goal-list-item small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.portal-goal-list-item.active {
  background: var(--primary01);
  box-shadow: inset 3px 0 0 var(--primary-color);
}

.portal-goal-list-item:hover {
  background: var(--primary01);
}

/* Hero block: a conic-gradient progress ring next to the key goal stats. */
.portal-goal-hero {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.portal-goal-ring {
  --goal-pct: 0;
  --goal-ring-color: var(--mud-palette-primary, var(--primary-color));
  align-items: center;
  background: conic-gradient(var(--goal-ring-color) calc(var(--goal-pct) * 1%), rgba(135, 144, 158, 0.18) 0);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  height: 8.5rem;
  justify-content: center;
  position: relative;
  width: 8.5rem;
}

.portal-goal-ring::after {
  background: var(--custom-white, #fff);
  border-radius: 50%;
  content: "";
  inset: 0.7rem;
  position: absolute;
}

.portal-goal-ring-label {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  text-align: center;
  z-index: 1;
}

.portal-goal-ring-pct {
  color: var(--default-text-color);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.portal-goal-ring-pct small {
  font-size: 0.95rem;
  font-weight: 700;
  margin-left: 0.05rem;
}

.portal-goal-ring-cap {
  color: var(--text-muted);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  text-transform: uppercase;
}

.portal-goal-hero-stats {
  display: grid;
  flex: 1 1 240px;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.portal-goal-stat {
  background: var(--default-body-bg-color);
  border: 1px solid var(--default-border);
  border-radius: 0.6rem;
  padding: 0.7rem 0.85rem;
}

.portal-goal-stat span {
  color: var(--text-muted);
  display: block;
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
}

.portal-goal-stat strong {
  color: var(--default-text-color);
  font-size: 0.9rem;
}

.portal-goal-target {
  border-bottom: 1px dashed var(--default-border);
  padding: 0.85rem 0;
}

.portal-goal-target:first-child {
  padding-top: 0;
}

.portal-goal-target:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.portal-header-search-results {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.portal-header-search-result {
  align-items: center;
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
  color: var(--default-text-color);
  display: flex;
  gap: 0.75rem;
  padding: 0.8rem;
}

.portal-header-search-result:hover {
  background: var(--primary01);
  color: var(--default-text-color);
}

.portal-header-search-result span {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
}

.portal-header-search-result small {
  color: var(--text-muted);
  display: block;
  font-size: 0.72rem;
}

.portal-login-logo {
  height: auto;
  max-height: 4.25rem;
  max-width: 18rem;
  object-fit: contain;
}

.portal-login-button,
.portal-login-button:hover,
.portal-login-button:focus {
  background-image: linear-gradient(135deg, #000687 0%, #1c1ca6 100%) !important;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(0, 6, 135, 0.28) !important;
  color: #fff !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  overflow: hidden;
  padding-block: 0.8rem !important;
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.portal-login-button .mud-button-label {
  font-size: 1.1rem;
  font-weight: 700;
}

.portal-login-button:hover {
  box-shadow: 0 14px 30px rgba(0, 6, 135, 0.4) !important;
  transform: translateY(-1px);
}

/* Shine sweep across the login button on hover. */
.portal-login-button::after {
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  content: "";
  height: 100%;
  left: -130%;
  position: absolute;
  top: 0;
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  width: 60%;
}

.portal-login-button:hover::after {
  left: 150%;
}

.portal-login-gallery {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

/* Keep the login (form + cover) on the portal's brand font. The login layout's theme provider
   overrides --mud-typography-default-family to the template default (Inter), so pin the literal
   Causten stack here rather than the variable. Icon elements (ri-/bx-/ti-) are excluded so the
   icon fonts keep rendering their glyphs. */
.portal-login-form,
.portal-login-form *:not([class*="ri-"]):not([class*="bx-"]):not([class*="ti-"]),
.portal-login-gallery,
.portal-login-gallery *:not([class*="ri-"]):not([class*="bx-"]):not([class*="ti-"]) {
  font-family: "Causten", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}

.authentication .authentication-cover.portal-login-cover {
  animation: portalGradientShift 18s ease infinite;
  background: linear-gradient(135deg, #1a1f4e, #262f6e, #343a84, #1a1f4e) !important;
  background-image: linear-gradient(135deg, #1a1f4e, #262f6e, #343a84, #1a1f4e) !important;
  background-size: 300% 300% !important;
  overflow: hidden;
  position: relative;
}

@keyframes portalGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Subtle moving sheen across the cover. */
.authentication .authentication-cover.portal-login-cover .aunthentication-cover-content::before {
  animation: portalSheen 7s ease-in-out infinite;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  border-radius: inherit;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

@keyframes portalSheen {
  0%, 100% { opacity: 0; transform: translateX(-30%); }
  50% { opacity: 1; transform: translateX(30%); }
}

.portal-login-form {
  animation: portalLoginIn 0.6s ease both;
}

@keyframes portalLoginIn {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

.portal-login-title {
  background: linear-gradient(120deg, #000687, #4b4be0 55%, #e8a14e);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Soft floating accent glows behind the cover content, for depth. */
.authentication .authentication-cover.portal-login-cover::before {
  animation: portalFloat 11s ease-in-out infinite;
  background: radial-gradient(circle, rgba(232, 161, 78, 0.38), transparent 62%) !important;
  border-radius: 50%;
  content: "";
  height: 26rem;
  pointer-events: none;
  position: absolute;
  right: -12%;
  top: -18%;
  width: 26rem;
}

.authentication .authentication-cover.portal-login-cover::after {
  animation: portalFloat 14s ease-in-out infinite reverse;
  background: radial-gradient(circle, rgba(120, 130, 255, 0.3), transparent 60%);
  border-radius: 50%;
  bottom: -22%;
  content: "";
  height: 30rem;
  left: -16%;
  pointer-events: none;
  position: absolute;
  width: 30rem;
}

.authentication .authentication-cover.portal-login-cover .aunthentication-cover-content {
  backdrop-filter: blur(1.2rem);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
  z-index: 1;
}

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

.portal-login-preview {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.7rem;
  color: #fff;
  min-height: 8rem;
  padding: 1.1rem;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.portal-login-preview:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(232, 161, 78, 0.5);
  transform: translateY(-4px);
}

.portal-login-preview .mud-icon-root {
  color: #f0b766;
}

.portal-login-preview span,
.portal-login-preview small {
  display: block;
}

.portal-login-preview span {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.portal-login-preview small {
  font-size: 0.85rem;
  line-height: 1.35;
  opacity: 0.82;
}

.portal-login-splash {
  align-items: center;
  background: radial-gradient(circle at 30% 18%, #313a86 0%, #181b46 64%);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 2rem;
  position: relative;
}

.portal-login-splash::before {
  animation: portalFloat 12s ease-in-out infinite;
  background: radial-gradient(circle, rgba(232, 161, 78, 0.22), transparent 62%);
  border-radius: 50%;
  content: "";
  height: 34rem;
  left: 50%;
  margin-left: -17rem;
  pointer-events: none;
  position: absolute;
  top: -10rem;
  width: 34rem;
}

.portal-login-splash-content {
  animation: portalSplashIn 0.7s ease both;
  max-width: 44rem;
  position: relative;
  text-align: center;
  z-index: 1;
}

.portal-login-splash-logo {
  animation: portalSplashPulse 2.4s ease-in-out infinite;
  background: #fff;
  border-radius: 0.35rem;
  height: auto;
  max-height: 4.5rem;
  max-width: 20rem;
  object-fit: contain;
  padding: 0.5rem 0.75rem;
}

@keyframes portalSplashIn {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portalSplashPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(232, 161, 78, 0.35);
  }
  50% {
    box-shadow: 0 0 0 0.85rem rgba(232, 161, 78, 0);
  }
}

@keyframes portalFloat {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-1.5rem, 1.5rem);
  }
}

.portal-status-chip,
.portal-parent-chip {
  cursor: pointer;
}

.portal-priority-chip {
  font-size: 0.66rem !important;
  font-weight: 700;
  line-height: 1;
  min-height: 1.25rem;
  padding-inline: 0.42rem !important;
}

.portal-priority-chip .mud-chip-content {
  align-items: center;
  display: inline-flex;
}

.portal-priority-chip-icon {
  font-size: 0.68rem !important;
}

.contact-hover-buttons .btn-primary-light,
.contact-hover-buttons .btn-primary-light:hover,
.contact-hover-buttons .btn-primary-light:focus {
  background: #fff !important;
  color: var(--primary-color) !important;
}

.portal-person-card.contact-action {
  min-height: 16rem;
  overflow: hidden;
  padding-bottom: 4.5rem !important;
}

.portal-person-card .portal-person-card-body {
  position: relative;
  z-index: 2;
  transition: opacity 0.18s ease;
}

.portal-person-card:hover .portal-person-card-body {
  opacity: 0.16;
}

.portal-person-card.contact-action .contact-hover-buttons {
  inset-block-start: auto !important;
  inset-block-end: 1rem !important;
  height: auto !important;
  padding-inline: 1rem;
  z-index: 3;
}

.portal-person-card .contact-hover-btn {
  white-space: nowrap;
}

.portal-account-page-card {
  min-height: calc(100vh - 12rem);
}

.portal-account-page-card .mud-table-container {
  max-height: calc(100vh - 21rem);
  overflow: auto;
}

.portal-account-drawer {
  bottom: 0;
  height: 100vh;
  position: fixed !important;
  right: 0;
  top: 0;
  z-index: 1300;
}

.portal-account-drawer .mud-drawer {
  height: 100vh !important;
  max-height: 100vh;
  position: fixed !important;
  right: 0;
  top: 0;
}

.portal-account-drawer .main-profile-cover {
  position: sticky;
  top: 0;
  z-index: 2;
}

@media (max-width: 991.98px) {
  .portal-news-hero-grid {
    grid-template-columns: 1fr;
  }

  .portal-news-detail-panel {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .portal-news-insight-grid {
    grid-template-columns: 1fr;
  }

  .portal-news-card {
    grid-template-columns: 1fr;
  }

  .portal-news-card-image {
    min-height: 0;
  }

  .portal-news-card-action {
    justify-content: flex-end;
  }

  .portal-news-search {
    min-width: 100%;
  }
}

/* Popovers (menus / selects / date pickers) opened INSIDE a task dialog must render ABOVE it.
   MudBlazor gives popovers a base z-index of ~1200 (per-popover increments to 1202+), which is
   BELOW the dialog's 1400 — so a status/priority/date dropdown opens behind the dialog and a real
   mouse user can't click it. Setting --mud-zindex-popover on :root does NOT work: MudBlazor defines
   that variable on a closer ancestor, which shadows the root value. Override the popover element's
   z-index directly with !important so it always wins. 1450 stays below snackbars (1800). */
.mud-popover-provider .mud-popover {
  z-index: 1450 !important;
}
