:root {
  --kanliva-navbar-height: 56px;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #d7deea;
  --brand: #0f4c81;
  --brand-soft: #d7ecff;
  --accent: #e98a15;
  --success: #1f8f5f;
  --danger: #bb2d3b;
  --shadow: 0 20px 40px rgba(15, 76, 129, 0.08);
  --board-bg: #b89463;
  --board-frame: #8f6134;
  --column-bg: rgba(255, 255, 255, 0.14);
  --column-header-bg: rgba(255, 249, 236, 0.92);
  --column-header-text: #1f2937;
  --pagination-color: #0f4c81;
  --board-accent: #e98a15;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #fef7e8 0, #f4f7fb 38%, #eef4fb 100%);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  max-width: 180px;
  min-width: 0;
  white-space: nowrap;
  padding-top: 0;
  padding-bottom: 0;
}

.site-logo,
.brand-logo {
  height: 32px;
  max-height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 0;
}

.navbar-brand .brand-text {
  display: none !important;
}

.hero-logo {
  max-height: 90px;
  max-width: 280px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-inline-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  flex-wrap: wrap;
  line-height: inherit;
}

.brand-inline-logo {
  display: inline-block;
  height: 1em;
  width: auto;
  max-width: none;
  object-fit: contain;
  background: transparent;
  border: 0;
  padding: 0;
  flex: 0 0 auto;
  vertical-align: -0.08em;
}

.brand-inline-logo--hero,
.brand-inline-logo--heading {
  height: 1.04em;
}

.brand-inline-logo--text,
.brand-inline-logo--body {
  height: 1.08em;
}

.home-hero .hero-brand-inline-logo {
  width: auto;
  object-fit: contain;
  display: inline-block;
  background: transparent;
  border: 0;
  padding: 0;
}

.home-hero .brand-inline-wrap {
  display: block;
  line-height: inherit;
  white-space: normal;
}

.home-hero .inline-brand-logo {
  display: inline-block;
  height: 1.14em;
  max-height: 1.25em;
  width: auto;
  max-width: 4.4em;
  object-fit: contain;
  vertical-align: -0.11em;
  margin-inline-end: 0.16em;
  margin-inline-start: 0;
  background: transparent;
  border: 0;
  padding: 0;
}

.home-hero .inline-brand-logo--heading {
  height: 1.18em;
  max-height: 1.25em;
  max-width: 4.4em;
  vertical-align: -0.12em;
}

.home-hero .inline-brand-logo--body {
  height: 1.12em;
  max-height: 1.2em;
  max-width: 4.1em;
  vertical-align: -0.1em;
}

.home-hero .hero-brand-inline-logo-title {
  height: 1.18em;
  max-height: 1.25em;
  width: auto;
  max-width: 4.4em;
  object-fit: contain;
  vertical-align: -0.12em;
  display: inline-block;
  background: transparent;
  margin-inline-end: 0.16em;
}

.home-hero .hero-brand-inline-logo-text {
  height: 1.12em;
  max-height: 1.2em;
  width: auto;
  max-width: 4.1em;
  object-fit: contain;
  vertical-align: -0.1em;
  display: inline-block;
  background: transparent;
  margin-inline-end: 0.14em;
}

.navbar {
  min-height: 56px;
}

.navbar .container-fluid {
  min-height: 56px;
}

@media (max-width: 576px) {
  .site-logo,
  .brand-logo {
    height: 26px;
    max-height: 28px;
    max-width: 150px;
  }

  .navbar-brand {
    max-width: 150px;
    gap: 0;
  }

  .navbar-brand .brand-text {
    display: none !important;
  }

  .brand-inline-logo--hero,
  .brand-inline-logo--heading {
    height: 1.02em;
  }

  .brand-inline-logo--text,
  .brand-inline-logo--body {
    height: 1.05em;
  }

  .home-hero .hero-brand-inline-logo-title {
    height: 1.16em;
    max-height: 1.23em;
    width: auto;
    max-width: 4.2em;
    vertical-align: -0.11em;
  }

  .home-hero .hero-brand-inline-logo-text {
    height: 1.1em;
    max-height: 1.18em;
    width: auto;
    max-width: 4em;
    vertical-align: -0.1em;
  }

  .home-hero .inline-brand-logo--heading {
    height: 1.16em;
    max-height: 1.23em;
    max-width: 4.2em;
  }

  .home-hero .inline-brand-logo--body {
    height: 1.1em;
    max-height: 1.18em;
    max-width: 4em;
  }

  .navbar {
    min-height: 50px;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
  }

  .navbar .container-fluid {
    min-height: 50px;
  }
}

.shell-card,
.dashboard-card,
.kanban-column,
.sticky-card,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.page-header {
  padding: 1.5rem 0;
}

.app-shell {
  max-width: 1800px;
}

.workspace-subnav-shell {
  position: sticky;
  top: var(--kanliva-navbar-height);
  z-index: 1015;
  overflow-x: clip;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 76, 129, 0.12);
  box-shadow: 0 18px 32px rgba(15, 76, 129, 0.08);
}

.workspace-subnav-shell::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 18%, var(--brand) 52%, transparent 100%);
  opacity: 0;
  transform: scaleX(0.18);
  transform-origin: center;
}

.workspace-subnav-shell.is-loading::after {
  opacity: 1;
  animation: workspace-subnav-loading 1.1s ease-in-out infinite;
}

.workspace-subnav-meta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.9rem 0 0.8rem;
}

.workspace-subnav-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.workspace-subnav-heading {
  min-width: 0;
}

.workspace-subnav-name-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.workspace-subnav-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.workspace-subnav-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workspace-subnav-status.is-active {
  background: rgba(31, 143, 95, 0.12);
  color: #13633f;
}

.workspace-subnav-status.is-inactive {
  background: rgba(187, 45, 59, 0.12);
  color: #8f1f2a;
}

.workspace-subnav-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}

.workspace-subnav-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  min-width: 0;
}

.workspace-subnav-breadcrumb li + li::before {
  content: "/";
  color: #9fb0c4;
}

.workspace-subnav-breadcrumb a,
.workspace-subnav-breadcrumb span {
  color: inherit;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-subnav-breadcrumb a:hover {
  color: var(--brand);
}

.workspace-subnav-breadcrumb span[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.workspace-subnav-returns {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-return-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.48rem 0.82rem;
  border: 1px solid rgba(15, 76, 129, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.workspace-return-link:hover {
  color: var(--brand);
  border-color: rgba(15, 76, 129, 0.32);
  box-shadow: 0 10px 18px rgba(15, 76, 129, 0.08);
  transform: translateY(-1px);
}

.workspace-subnav-tabs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.workspace-subnav-tabs::-webkit-scrollbar {
  height: 8px;
}

.workspace-subnav-tabs::-webkit-scrollbar-thumb {
  background: rgba(15, 76, 129, 0.18);
  border-radius: 999px;
}

.workspace-subnav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.58rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.workspace-subnav-tab:hover {
  color: var(--brand);
  background: rgba(15, 76, 129, 0.06);
  border-color: rgba(15, 76, 129, 0.12);
}

.workspace-subnav-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0f4c81 0%, #1c75b8 100%);
  border-color: transparent;
  box-shadow: 0 14px 24px rgba(15, 76, 129, 0.18);
}

.rtl .workspace-subnav-breadcrumb li + li::before {
  content: "\\";
}

.rtl .workspace-subnav-returns {
  justify-content: flex-start;
}

@media (max-width: 991.98px) {
  .workspace-subnav-header {
    flex-direction: column;
  }

  .workspace-subnav-returns {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .workspace-subnav-shell {
    top: var(--kanliva-navbar-height);
  }

  .workspace-subnav-meta {
    gap: 0.75rem;
    padding-top: 0.75rem;
  }

  .workspace-subnav-title {
    font-size: 0.98rem;
  }

  .workspace-return-link,
  .workspace-subnav-tab {
    min-height: 38px;
    font-size: 0.88rem;
  }
}

@keyframes workspace-subnav-loading {
  0% {
    opacity: 0.35;
    transform: scaleX(0.18);
  }
  50% {
    opacity: 1;
    transform: scaleX(0.72);
  }
  100% {
    opacity: 0.35;
    transform: scaleX(0.18);
  }
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-card {
  padding: 1rem;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 1rem;
  align-items: start;
}

.kanban-board-wrap {
  min-height: 70vh;
  width: 100%;
}

.kanban-column {
  min-height: 64vh;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kanban-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
  cursor: grab;
  position: relative;
}

.kanban-card.priority-high {
  border-left: 5px solid #d9485f;
}

.kanban-card.priority-medium {
  border-left: 5px solid #e98a15;
}

.kanban-card.priority-low {
  border-left: 5px solid #0f766e;
}

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
  min-width: 0;
}

.report-toolbar .form-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.report-toolbar .form-control,
.report-toolbar .form-select {
  min-width: 140px;
}

.report-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  min-width: 0;
}

.report-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.08);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.report-panel h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
}

.report-chart {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
  min-height: 260px;
  height: 100%;
}

.chart-container,
.report-chart-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 280px;
}

.chart-container canvas,
.report-chart-container canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-height: 260px;
}

.report-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 1rem;
  color: var(--muted);
  background: #f9fbff;
}

.report-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 520px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.report-table-wrap table,
.report-table-wrap .table {
  min-width: 100%;
  width: max-content;
  margin-bottom: 0;
}

body.report-page {
  overflow-x: clip;
}

body.report-page main,
body.report-page .app-shell,
body.report-page .shell-card,
body.report-page .group-block,
body.report-page .row,
body.report-page [class*="col-"] {
  min-width: 0;
}

body.report-page .report-shell,
body.report-page .report-card,
body.report-page .report-chart-card {
  min-width: 0;
  max-width: 100%;
}

body.report-page .report-kpi-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

body.report-page .report-filter-bar,
body.report-page .report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-width: 0;
}

body.report-page .report-filter-bar > *,
body.report-page .report-toolbar > * {
  flex: 1 1 180px;
  min-width: 0;
}

body.report-page .btn {
  white-space: normal;
  overflow-wrap: anywhere;
}

body.report-page .report-chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 280px;
  height: 320px;
  max-height: 420px;
  overflow: hidden;
}

body.report-page .report-chart-wrap .report-chart {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 260px;
  display: block;
}

body.report-page .report-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

body.report-page .dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.sticky-style .kanban-card {
  border-left: 0;
}

.sticky-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 1rem;
  align-items: start;
  min-height: 72vh;
  padding: 1.1rem;
  border-radius: 14px;
  border: 12px solid var(--board-frame, #8f6134);
  background-color: var(--board-bg, #b89463);
  background-image:
    radial-gradient(rgba(72, 46, 24, 0.18) 1px, transparent 1px),
    radial-gradient(rgba(255, 245, 220, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, rgba(133, 95, 53, 0.4) 0%, rgba(199, 159, 110, 0.25) 100%);
  background-size: 8px 8px, 13px 13px, auto;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.18), 0 10px 28px rgba(84, 50, 20, 0.28);
}

.sticky-column {
  min-height: 66vh;
  background: var(--column-bg, rgba(255, 255, 255, 0.14));
  border: 1px dashed rgba(75, 45, 20, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sticky-board .kanban-column-header {
  background: var(--column-header-bg, rgba(255, 249, 236, 0.92));
  color: var(--column-header-text, #1f2937);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(122, 87, 46, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.sticky-note {
  position: relative;
  min-height: 150px;
  border-radius: 2px;
  border: 0;
  padding: 1.2rem 0.95rem 0.8rem;
  transform: rotate(var(--note-rotation, 0deg));
  transform-origin: center top;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.24);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  font-family: "Segoe Print", "Comic Sans MS", "Bradley Hand ITC", "Segoe UI", cursive, sans-serif;
  color: #2f2a1f;
  overflow-wrap: anywhere;
  background-image: linear-gradient(transparent 96%, rgba(35, 24, 14, 0.07) 100%);
  background-size: 100% 26px;
}

.sticky-note::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--pin-color, var(--board-accent, #cb2b3e));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.36), inset 0 1px 1px rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.sticky-note:hover,
.sticky-note.dragging {
  transform: rotate(var(--note-rotation, 0deg)) translateY(-4px) scale(1.02);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.32);
  z-index: 5;
}

.sticky-note .fw-semibold {
  font-size: 1.02rem;
  line-height: 1.25;
  margin-top: 0.15rem;
}

.sticky-note .fw-semibold a {
  color: #28231b;
  text-decoration: none;
}

.sticky-note .fw-semibold a:hover,
.sticky-note .fw-semibold a:focus {
  text-decoration: underline;
}

.sticky-note .card-note {
  color: rgba(36, 32, 25, 0.86);
  font-size: 0.78rem;
}

.kanban-card-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-bottom: 0.45rem;
}

.js-task-move-handle {
  touch-action: none;
  cursor: grab;
  min-width: 32px;
  min-height: 32px;
  padding: 0.2rem 0.4rem;
}

.js-task-move-btn {
  min-height: 32px;
  padding: 0.2rem 0.55rem;
}

.kanban-move-menu {
  position: absolute;
  z-index: 15;
  min-width: 152px;
  max-width: min(90vw, 250px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  padding: 0.35rem;
}

.kanban-move-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kanban-column.drop-target {
  outline: 2px dashed var(--board-accent, #e98a15);
  outline-offset: 2px;
}

body.task-dragging {
  user-select: none;
}

.sticky-note.note-yellow { background-color: #fff176; }
.sticky-note.note-pink { background-color: #f8a5c2; }
.sticky-note.note-blue { background-color: #81ecec; }
.sticky-note.note-green { background-color: #b8e994; }
.sticky-note.note-orange { background-color: #ffd08a; }
.sticky-note.note-purple { background-color: #d6a2e8; }

[dir="rtl"] .sticky-note {
  text-align: right;
}

.compact-style .kanban-card {
  padding: 0.6rem;
  font-size: 0.9rem;
}

.kanban-items {
  flex: 1 1 auto;
  overflow: hidden;
}

.kanban-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.kanban-page-btn {
  border: 1px solid rgba(15, 76, 129, 0.35);
  background: #fff;
  color: var(--pagination-color, #0f4c81);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  line-height: 1;
  font-weight: 700;
}

.kanban-page-btn[disabled] {
  opacity: 0.45;
}

.kanban-page-indicator {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 64px;
  text-align: center;
}

.detailed-style .kanban-card {
  padding: 1.1rem;
}

@media (max-width: 1400px) {
  .kanban-board,
  .sticky-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .kanban-board,
  .sticky-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .kanban-board,
  .sticky-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .kanban-board,
  .sticky-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .kanban-board-wrap {
    min-height: 58vh;
  }

  .kanban-column {
    min-height: 52vh;
  }

  .sticky-board {
    min-height: 60vh;
    border-width: 8px;
    padding: 0.75rem;
  }
  .sticky-column {
    min-height: 54vh;
  }

  .kanban-card-actions .btn {
    font-size: 0.8rem;
  }

  body.report-page .report-chart-wrap {
    min-height: 240px;
    height: 260px;
    max-height: 320px;
  }

  body.report-page .report-panel,
  body.report-page .shell-card {
    padding: 0.8rem;
  }

  body.report-page .report-toolbar > * {
    flex: 1 1 100%;
  }

  body.report-page .report-toolbar .btn {
    width: 100%;
  }

  body.report-page .report-grid {
    grid-template-columns: 1fr;
  }

  body.report-page .report-table-wrap table,
  body.report-page .report-table-wrap .table {
    min-width: 680px;
  }

  body.report-page .report-table-wrap .table {
    font-size: 0.86rem;
  }
}

@media (max-width: 430px) {
  body.report-page .report-chart-wrap {
    min-height: 220px;
    height: 240px;
  }

  body.report-page .report-panel h2 {
    font-size: 0.95rem;
  }

  body.report-page .report-toolbar .form-control,
  body.report-page .report-toolbar .form-select {
    min-width: 0;
    width: 100%;
  }
}

.rtl {
  direction: rtl;
  text-align: right;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 2rem;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,0.7);
}

.login-shell {
  max-width: 520px;
  margin: 3rem auto;
}

.card-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.navbar,
.navbar .container-fluid {
  max-width: 100%;
}

.topnav-shell {
  width: 100%;
  min-width: 0;
}

.nav-main-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.2rem;
  min-width: 0;
}

.nav-main-groups .nav-link {
  font-size: 0.92rem;
  padding: 0.45rem 0.55rem;
  white-space: nowrap;
}

.learning-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.learning-nav-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  border-radius: 6px;
  position: relative;
  background: linear-gradient(135deg, rgba(36, 89, 245, 0.18), rgba(14, 165, 160, 0.2));
  border: 1px solid rgba(19, 58, 168, 0.2);
}

.learning-nav-icon::before {
  content: "";
  position: absolute;
  inset: 4px 3px 3px 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #2459f5, #2b7fff);
  clip-path: polygon(0 0, 49% 22%, 100% 0, 100% 100%, 49% 78%, 0 100%);
}

.nav-profile-area {
  min-width: 0;
  flex-shrink: 0;
}

.profile-chip {
  display: inline-block;
  max-width: min(24vw, 220px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-profile-menu .dropdown-menu,
.nav-groups .dropdown-menu {
  min-width: 18rem;
  max-width: min(94vw, 360px);
  max-height: 72vh;
  overflow: auto;
  border-radius: 12px;
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(15, 76, 129, 0.12);
}

.nav-groups .dropdown-menu.nav-menu-wide {
  min-width: 21rem;
  max-width: min(94vw, 430px);
}

.nav-section-label {
  color: #52627a;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0.35rem 0.85rem 0.2rem;
  white-space: normal;
}

.nav-profile-menu .dropdown-item,
.nav-groups .dropdown-item {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25rem;
}

.group-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.82);
}

.group-block h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.group-block .card-note {
  margin-bottom: 0.65rem;
}

[dir="rtl"] .nav-groups .dropdown-menu,
[dir="rtl"] .nav-profile-menu .dropdown-menu {
  text-align: right;
}

[dir="rtl"] .nav-main-groups {
  margin-right: 0;
}

@media (max-width: 992px) {
  .topnav-shell {
    align-items: stretch;
  }

  .nav-main-groups,
  .nav-profile-area {
    width: 100%;
  }

  .nav-profile-area {
    border-top: 1px solid var(--line);
    margin-top: 0.35rem;
    padding-top: 0.35rem;
  }

  .nav-main-groups .nav-link {
    white-space: normal;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .profile-chip {
    max-width: calc(100vw - 140px);
  }

  .nav-groups .dropdown-menu {
    min-width: 100%;
    max-width: 100%;
    max-height: 60vh;
    box-shadow: none;
    border: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .nav-groups .dropdown-menu.nav-menu-wide {
    min-width: 100%;
    max-width: 100%;
  }

  .nav-profile-menu .dropdown-menu {
    min-width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
    position: static !important;
    inset: auto !important;
    transform: none !important;
  }
}

/* ===== 2026 SaaS Redesign Layer ===== */
:root {
  --color-primary: #2459f5;
  --color-primary-dark: #1638b8;
  --color-primary-soft: #e8efff;
  --color-accent: #0ea5a0;
  --color-bg: #f6f8fc;
  --color-surface: #ffffff;
  --color-surface-2: #f3f6ff;
  --color-border: #d9e1f0;
  --color-text: #14213d;
  --color-muted: #5d6b86;
  --color-success: #0e9f6e;
  --color-warning: #d08b09;
  --color-danger: #cc3a3a;
  --color-info: #2b7fff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 14px rgba(18, 31, 62, 0.07);
  --shadow-md: 0 10px 30px rgba(18, 31, 62, 0.1);
  --shadow-lg: 0 18px 44px rgba(18, 31, 62, 0.14);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --bg: var(--color-bg);
  --panel: var(--color-surface);
  --ink: var(--color-text);
  --muted: var(--color-muted);
  --line: var(--color-border);
  --brand: var(--color-primary);
  --brand-soft: var(--color-primary-soft);
  --accent: var(--color-accent);
  --success: var(--color-success);
  --danger: var(--color-danger);
  --shadow: var(--shadow-md);
}

body.app-body {
  background:
    radial-gradient(980px 450px at 8% -4%, rgba(36, 89, 245, 0.1) 0%, rgba(36, 89, 245, 0) 58%),
    radial-gradient(860px 420px at 94% -6%, rgba(14, 165, 160, 0.09) 0%, rgba(14, 165, 160, 0) 58%),
    linear-gradient(180deg, #f8faff 0%, #f5f8fd 100%);
  color: var(--color-text);
  font-family: "Segoe UI", "Inter", "Tahoma", sans-serif;
  line-height: 1.5;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5 {
  letter-spacing: -0.01em;
  color: #0f1d3d;
}

.app-shell {
  max-width: 1520px;
}

main.app-shell,
main.container-fluid.app-shell {
  padding-top: clamp(1rem, 2vw, 1.5rem) !important;
  padding-bottom: clamp(2rem, 3vw, 2.75rem) !important;
}

.navbar {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(199, 210, 234, 0.78) !important;
  box-shadow: 0 4px 16px rgba(25, 41, 78, 0.06);
}

.navbar .nav-link {
  border-radius: 10px;
  color: #24314d;
  font-weight: 500;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--color-primary-dark);
  background: rgba(36, 89, 245, 0.1);
}

.navbar .nav-link.active,
.nav-groups .dropdown-item.active {
  color: #133aa8 !important;
  background: rgba(36, 89, 245, 0.14);
  font-weight: 700;
}

.navbar-toggler {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
}

.nav-profile-menu .dropdown-menu,
.nav-groups .dropdown-menu {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.97);
}

.nav-groups .dropdown-item,
.nav-profile-menu .dropdown-item {
  border-radius: 8px;
  margin: 0.15rem 0.25rem;
}

.nav-groups .dropdown-item:hover,
.nav-profile-menu .dropdown-item:hover {
  background: rgba(36, 89, 245, 0.1);
}

.app-footer {
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(6px);
}

.app-footer a {
  color: var(--color-muted);
}

.app-footer a:hover {
  color: var(--color-primary-dark);
}

.app-version-badge {
  border: 1px solid rgba(15, 76, 129, 0.18);
  border-radius: 999px;
  padding: .15rem .55rem;
  background: rgba(15, 76, 129, 0.06);
  color: #466174;
  font-weight: 700;
}

.shell-card,
.group-block,
.report-panel,
.metric-card,
.dashboard-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.shell-card,
.group-block {
  padding: var(--space-6);
}

.group-block {
  position: relative;
  overflow: hidden;
}

.group-block::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  opacity: 0.85;
}

.group-block > * {
  position: relative;
}

.dashboard-grid {
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.dashboard-page .h3,
.dashboard-page .h4,
.dashboard-page .h5 {
  color: #112449;
}

.dashboard-page .group-block h3 {
  font-size: 1.03rem;
}

.learning-widget-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.learning-widget-card {
  border-radius: var(--radius-md);
  border: 1px solid #d9e4fa;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.92)),
    radial-gradient(520px 130px at 8% -12%, rgba(36, 89, 245, 0.16), rgba(36, 89, 245, 0));
  padding: 1rem 1rem 0.95rem;
  box-shadow: 0 8px 20px rgba(18, 31, 62, 0.08);
}

.learning-widget-kpi {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 700;
  color: #122f6c;
}

.learning-widget-track {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.16rem 0.62rem;
  font-size: 0.73rem;
  background: rgba(36, 89, 245, 0.12);
  color: #133aa8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.learning-widget-progress {
  height: 10px;
  border-radius: 999px;
  background: #e9eef9;
  overflow: hidden;
}

.learning-widget-progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(120deg, #2459f5, #0ea5a0);
}

.learning-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0a6f6b;
  background: rgba(14, 165, 160, 0.15);
  border: 1px solid rgba(14, 165, 160, 0.22);
}

.learning-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.learning-quick-link::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2459f5, #0ea5a0);
}

.metric-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid #d8e0f3;
  box-shadow: 0 5px 16px rgba(20, 31, 62, 0.07);
}

.metric-card .display-6 {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.1;
  margin-top: 0.2rem;
}

.card-note,
.text-secondary {
  color: var(--color-muted) !important;
}

.btn {
  border-radius: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--color-primary) 0%, #4778ff 100%);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(36, 89, 245, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(120deg, #1f4de2 0%, #3d6af0 100%);
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(36, 89, 245, 0.28);
}

.btn-outline-primary {
  border-color: #b9c8ed;
  color: #1f4bcf;
  background: #f7faff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: #e8f0ff;
  border-color: #9bb1e7;
  color: #173da8;
}

.btn-outline-secondary {
  border-color: #d2daea;
  color: #33405e;
  background: #ffffff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: #f4f7ff;
  color: #212c44;
}

.form-label {
  font-weight: 600;
  color: #2a3654;
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  border-radius: 10px;
  border-color: #d0d9ea;
  min-height: 42px;
  box-shadow: inset 0 1px 2px rgba(22, 34, 66, 0.03);
}

textarea.form-control {
  min-height: 110px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus-visible,
a:focus-visible {
  border-color: #86a8ff !important;
  box-shadow: 0 0 0 0.2rem rgba(36, 89, 245, 0.16) !important;
  outline: 0;
}

.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.table {
  --bs-table-striped-bg: rgba(36, 89, 245, 0.03);
  --bs-table-hover-bg: rgba(36, 89, 245, 0.07);
  border-color: #d6dff1;
}

.table > :not(caption) > * > * {
  padding: 0.72rem 0.72rem;
  vertical-align: middle;
}

.table thead th {
  color: #2a3a5f;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.table td a {
  text-decoration: none;
  font-weight: 600;
}

.badge {
  border-radius: 999px;
  padding: 0.45em 0.7em;
  font-weight: 600;
}

.alert {
  border-radius: 12px;
  border-width: 1px;
}

.empty-state {
  border-radius: 14px;
  border-color: #cfdaf0;
  background: linear-gradient(180deg, #fafcff, #f3f7ff);
}

.empty-state::before {
  content: " ";
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  background: radial-gradient(circle at 32% 30%, #ffffff 0%, #dce9ff 70%);
}

.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1,
.page-header .h1 {
  margin-bottom: 0.35rem;
}

.home-hero.hero-surface {
  background: linear-gradient(145deg, #f9fbff 0%, #f2f7ff 58%, #f5fffd 100%);
  border: 1px solid #d9e5fb;
  border-radius: clamp(18px, 3vw, 28px);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  box-shadow: 0 15px 42px rgba(20, 38, 82, 0.1);
  position: relative;
  overflow: hidden;
}

.home-hero.hero-surface::after {
  content: "";
  position: absolute;
  inline-size: 360px;
  block-size: 360px;
  inset-inline-end: -120px;
  inset-block-end: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 89, 245, 0.15) 0%, rgba(36, 89, 245, 0) 68%);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #e9f0ff;
  border: 1px solid #c9d7fa;
  color: #2048bc;
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.9rem;
}

.hero-title {
  font-size: clamp(1.8rem, 3vw, 3.05rem);
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.hero-description {
  max-width: 70ch;
}

.hero-actions .btn {
  min-width: 170px;
}

.hero-feature-card {
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.feature-list {
  padding-inline-start: 1.05rem;
}

.feature-list li {
  margin-bottom: 0.55rem;
}

.home-value-grid .shell-card {
  border-style: solid;
}

.auth-page-wrap {
  display: flex;
  justify-content: center;
}

.auth-card {
  max-width: 560px;
  width: 100%;
}

.auth-brand {
  display: flex;
  justify-content: center;
}

.auth-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.pricing-header {
  max-width: 760px;
}

.pricing-card {
  position: relative;
  overflow: hidden;
}

.pricing-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -50px;
  inset-block-start: -50px;
  inline-size: 130px;
  block-size: 130px;
  background: radial-gradient(circle, rgba(36, 89, 245, 0.13) 0%, rgba(36, 89, 245, 0) 70%);
}

.pricing-feature-list {
  margin-bottom: 0;
  padding-inline-start: 1.1rem;
}

.pricing-feature-list li {
  margin-bottom: 0.42rem;
}

body.report-page .report-panel {
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

body.report-page .report-chart-wrap {
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 0.45rem;
  border: 1px solid #e0e8f8;
}

.report-toolbar {
  gap: 0.9rem;
}

.report-toolbar > * {
  min-width: min(100%, 180px);
}

.report-table-wrap {
  display: block;
  border: 1px solid #d7e1f4;
  border-radius: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.report-table-wrap table,
.report-table-wrap .table {
  width: 100%;
  min-width: 980px;
  margin-bottom: 0;
}

body.report-page .report-table-wrap table,
body.report-page .report-table-wrap .table {
  width: max-content;
}

.kanban-column {
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.kanban-board-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.kanban-board,
.sticky-board {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.kanban-card {
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(18, 31, 62, 0.08);
}

.kanban-column-header {
  position: sticky;
  top: 0.25rem;
  z-index: 2;
  border-bottom: 1px solid rgba(201, 214, 238, 0.6);
  padding-bottom: 0.4rem;
  background: transparent;
}

.board-actions-row .btn {
  min-width: 140px;
}

[dir="rtl"] .table,
[dir="rtl"] .group-block,
[dir="rtl"] .shell-card,
[dir="rtl"] .report-panel {
  text-align: right;
}

[dir="rtl"] .feature-list,
[dir="rtl"] .pricing-feature-list {
  padding-inline-end: 1.1rem;
  padding-inline-start: 0;
}

@media (max-width: 992px) {
  .shell-card,
  .group-block {
    padding: 1rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .learning-widget-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .table > :not(caption) > * > * {
    padding: 0.58rem 0.55rem;
  }

  .home-hero.hero-surface {
    padding: 1rem;
  }

  .hero-title {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .metric-card .display-6 {
    font-size: 1.45rem;
  }

  .group-block::before {
    width: 3px;
  }
}

/* ===== Vivid Redesign Pass ===== */
.site-logo,
.brand-logo {
  height: auto !important;
  max-height: 34px !important;
  width: auto !important;
  max-width: 176px !important;
  object-fit: contain;
}

.auth-logo {
  height: auto;
  max-height: 58px;
  width: auto;
  max-width: 230px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.hero-brand-logo {
  height: auto;
  max-height: 64px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.hero-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid #cedcff;
  border-radius: 14px;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.95), rgba(236, 244, 255, 0.92));
  box-shadow: 0 8px 24px rgba(23, 49, 121, 0.12);
}

.hero-brand-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2346b4;
  letter-spacing: 0.01em;
}

.page-header-vivid {
  border: 1px solid #d8e3fb;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: linear-gradient(140deg, rgba(247, 251, 255, 0.96), rgba(235, 247, 255, 0.93));
  box-shadow: 0 10px 26px rgba(27, 54, 133, 0.1);
  margin-bottom: 1rem;
}

.route-home .home-hero.hero-surface {
  background:
    radial-gradient(760px 280px at 8% 6%, rgba(85, 134, 255, 0.22), rgba(85, 134, 255, 0) 70%),
    radial-gradient(540px 260px at 96% 22%, rgba(36, 218, 196, 0.17), rgba(36, 218, 196, 0) 70%),
    linear-gradient(145deg, #fbfdff 0%, #f0f6ff 54%, #f0fcfb 100%);
  border-color: #cfe0ff;
}

.route-home .home-value-grid .shell-card {
  border-color: #cfe0ff;
  background: linear-gradient(160deg, #ffffff 0%, #f4f8ff 100%);
}

.route-home .home-value-grid .h6 {
  color: #1a3494;
  font-weight: 700;
}

.route-account-login main.app-shell,
.route-account-register main.app-shell {
  min-height: calc(100vh - 138px);
  display: flex;
  align-items: center;
}

.route-account-login .auth-page-wrap,
.route-account-register .auth-page-wrap {
  width: 100%;
}

.route-account-login .auth-card,
.route-account-register .auth-card {
  border: 1px solid #cddcff;
  background:
    radial-gradient(560px 220px at 8% 8%, rgba(106, 144, 255, 0.13), rgba(106, 144, 255, 0) 72%),
    linear-gradient(155deg, #ffffff 0%, #f3f8ff 100%);
  box-shadow: 0 20px 46px rgba(22, 48, 124, 0.16);
}

.route-pricing .pricing-card {
  border-color: #cad9ff;
  background: linear-gradient(160deg, #ffffff 0%, #f1f7ff 100%);
}

.route-pricing .pricing-card:nth-child(2),
.route-pricing .pricing-grid .col-lg-4:nth-child(2) .pricing-card {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(26, 62, 170, 0.16);
}

.route-company-dashboard .dashboard-page > .d-flex:first-child,
.route-companyadmin-dashboard .dashboard-page > .d-flex:first-child,
.route-owner-dashboard .dashboard-page > .d-flex:first-child,
.route-user-dashboard .dashboard-page > .d-flex:first-child {
  border: 1px solid #ceddff;
  border-radius: 18px;
  padding: 1rem 1rem 0.95rem;
  background:
    radial-gradient(460px 180px at 8% 10%, rgba(90, 137, 255, 0.22), rgba(90, 137, 255, 0) 70%),
    linear-gradient(140deg, #f8fbff 0%, #f0f7ff 62%, #f4fffb 100%);
  box-shadow: 0 16px 34px rgba(20, 43, 112, 0.12);
}

.route-company-dashboard .metric-card:nth-child(odd),
.route-companyadmin-dashboard .metric-card:nth-child(odd),
.route-owner-dashboard .metric-card:nth-child(odd),
.route-user-dashboard .metric-card:nth-child(odd) {
  background: linear-gradient(160deg, #ffffff 0%, #eef4ff 100%);
}

.route-company-dashboard .metric-card:nth-child(even),
.route-companyadmin-dashboard .metric-card:nth-child(even),
.route-owner-dashboard .metric-card:nth-child(even),
.route-user-dashboard .metric-card:nth-child(even) {
  background: linear-gradient(160deg, #ffffff 0%, #edfdf9 100%);
}

.route-boards-boardlist .shell-card,
.route-boards-board .shell-card,
.route-boards-taskdetails .shell-card {
  border-color: #d4ddf2;
}

.route-boards-board .board-page-shell > .d-flex:first-child {
  border: 1px solid #ccdcff;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem !important;
  background: linear-gradient(145deg, #f8fbff 0%, #eef5ff 100%);
}

.route-boards-board .kanban-column {
  border: 1px solid #d2ddf6;
  box-shadow: 0 8px 18px rgba(22, 42, 97, 0.1);
}

.route-boards-board .kanban-card {
  border: 1px solid #d6def1;
  box-shadow: 0 10px 16px rgba(17, 34, 79, 0.11);
}

.route-boards-taskdetails .task-details-page > .d-flex:first-child {
  border: 1px solid #ceddff;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: linear-gradient(150deg, #f8fbff 0%, #edf5ff 100%);
}

.route-requests-list .report-toolbar,
.route-requests-create .row.g-3,
.route-requests-details .shell-card:first-of-type {
  border: 1px solid #d7e2f7;
  border-radius: 14px;
  padding: 0.75rem;
  background: linear-gradient(160deg, #ffffff 0%, #f5f9ff 100%);
}

.route-requests-details .request-header-shell {
  border: 1px solid #ccdcff;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: linear-gradient(150deg, #f9fcff 0%, #edf6ff 100%);
}

.route-companyadmin-masterdata-manage .shell-card,
.route-companyadmin-masterdata-manage .group-block {
  border-color: #cfdcf6;
  background: linear-gradient(165deg, #ffffff 0%, #f2f8ff 100%);
}

.route-reports-companykpi .dashboard-grid .metric-card,
.route-reports-performancereports .dashboard-grid .metric-card,
.route-reports-servicedesk .dashboard-grid .metric-card,
.route-reports-slareports .dashboard-grid .metric-card {
  border-color: #cddcff;
}

.route-reports-companykpi .report-panel h2,
.route-reports-performancereports .report-panel h2,
.route-reports-servicedesk .report-panel h2,
.route-reports-slareports .report-panel h2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.route-reports-companykpi .report-panel h2::before,
.route-reports-performancereports .report-panel h2::before,
.route-reports-servicedesk .report-panel h2::before,
.route-reports-slareports .report-panel h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3d6dff, #16b8b2);
}

.route-account-profile .shell-card {
  max-width: 980px;
  margin: 0 auto;
}

.route-workspaces-list .shell-card,
.route-workspaces-details .shell-card {
  border-color: #cfdbf3;
}

.route-workspaces-details .d-flex.justify-content-between.align-items-start.mb-3 {
  border: 1px solid #cfddfe;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: linear-gradient(150deg, #f8fbff, #eef5ff);
}

[dir="rtl"] .hero-brand-mark {
  flex-direction: row-reverse;
}

@media (max-width: 992px) {
  .route-account-login main.app-shell,
  .route-account-register main.app-shell {
    min-height: auto;
    display: block;
  }

  .hero-brand-mark {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .site-logo,
  .brand-logo {
    max-height: 28px !important;
    max-width: 144px !important;
  }

  .auth-logo {
    max-height: 44px;
    max-width: 180px;
  }

  .hero-brand-logo {
    max-height: 46px;
    max-width: 180px;
  }

  .route-pricing .pricing-card:nth-child(2),
  .route-pricing .pricing-grid .col-lg-4:nth-child(2) .pricing-card {
    transform: none;
  }

  .route-requests-create .row.g-3,
  .route-requests-list .report-toolbar,
  .route-requests-details .shell-card:first-of-type {
    padding: 0.55rem;
  }
}

/* ===== Vivid Redesign Final Pass ===== */
.site-logo,
.brand-logo {
  max-height: 34px !important;
  width: auto !important;
  object-fit: contain;
}

.hero-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.7rem;
  border-radius: 14px;
  border: 1px solid #cedcff;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(234, 244, 255, 0.94));
  box-shadow: 0 12px 26px rgba(23, 52, 124, 0.12);
}

.hero-brand-logo {
  max-height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.auth-logo {
  max-height: 52px;
  max-width: 190px;
  width: auto;
  object-fit: contain;
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 520px);
  gap: 1rem;
  align-items: stretch;
}

.auth-side {
  border: 1px solid #c7d9ff;
  background:
    radial-gradient(600px 220px at 15% 8%, rgba(63, 105, 255, 0.23), rgba(63, 105, 255, 0) 72%),
    radial-gradient(440px 200px at 94% 18%, rgba(13, 184, 173, 0.18), rgba(13, 184, 173, 0) 72%),
    linear-gradient(150deg, #f8fbff 0%, #edf4ff 54%, #effdf8 100%);
  box-shadow: 0 20px 42px rgba(17, 42, 112, 0.14);
}

.auth-side h2 {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.auth-side-points {
  margin: 0;
  padding-inline-start: 1.1rem;
}

.auth-side-points li {
  margin-bottom: 0.45rem;
  color: #274063;
}

.route-home .home-hero.hero-surface {
  border: 1px solid #cde0ff;
  box-shadow: 0 24px 52px rgba(20, 44, 112, 0.13);
}

.route-home .hero-title {
  font-size: clamp(2rem, 3.2vw, 3.35rem);
}

.route-home .hero-description {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
}

.route-home .hero-feature-card {
  border: 1px solid #cddfff;
  background:
    radial-gradient(420px 150px at 0% 10%, rgba(52, 99, 255, 0.12), rgba(52, 99, 255, 0) 76%),
    linear-gradient(165deg, #ffffff, #f2f7ff);
}

.route-home .home-value-grid .shell-card {
  border: 1px solid #cfe0ff;
  box-shadow: 0 14px 26px rgba(19, 40, 95, 0.09);
}

.route-pricing .page-header {
  border: 1px solid #d2e1ff;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background:
    radial-gradient(420px 140px at 8% 16%, rgba(60, 111, 255, 0.13), rgba(60, 111, 255, 0) 72%),
    linear-gradient(150deg, #f9fcff, #eef5ff);
}

.route-pricing .pricing-card {
  border-width: 1px;
  box-shadow: 0 14px 30px rgba(22, 46, 114, 0.11);
}

.route-company-dashboard .group-block,
.route-companyadmin-dashboard .group-block,
.route-owner-dashboard .group-block,
.route-user-dashboard .group-block {
  border-color: #ccdaf8;
  background:
    radial-gradient(380px 140px at 100% 0%, rgba(67, 113, 255, 0.09), rgba(67, 113, 255, 0) 74%),
    linear-gradient(165deg, #ffffff, #f5f9ff);
  box-shadow: 0 10px 24px rgba(20, 38, 86, 0.1);
}

.route-company-dashboard .dashboard-grid .metric-card:nth-child(4n + 1),
.route-companyadmin-dashboard .dashboard-grid .metric-card:nth-child(4n + 1),
.route-owner-dashboard .dashboard-grid .metric-card:nth-child(4n + 1),
.route-user-dashboard .dashboard-grid .metric-card:nth-child(4n + 1) {
  background: linear-gradient(160deg, #ffffff, #edf2ff);
}

.route-company-dashboard .dashboard-grid .metric-card:nth-child(4n + 2),
.route-companyadmin-dashboard .dashboard-grid .metric-card:nth-child(4n + 2),
.route-owner-dashboard .dashboard-grid .metric-card:nth-child(4n + 2),
.route-user-dashboard .dashboard-grid .metric-card:nth-child(4n + 2) {
  background: linear-gradient(160deg, #ffffff, #edfcf8);
}

.route-company-dashboard .dashboard-grid .metric-card:nth-child(4n + 3),
.route-companyadmin-dashboard .dashboard-grid .metric-card:nth-child(4n + 3),
.route-owner-dashboard .dashboard-grid .metric-card:nth-child(4n + 3),
.route-user-dashboard .dashboard-grid .metric-card:nth-child(4n + 3) {
  background: linear-gradient(160deg, #ffffff, #fff7e9);
}

.route-company-dashboard .dashboard-grid .metric-card:nth-child(4n + 4),
.route-companyadmin-dashboard .dashboard-grid .metric-card:nth-child(4n + 4),
.route-owner-dashboard .dashboard-grid .metric-card:nth-child(4n + 4),
.route-user-dashboard .dashboard-grid .metric-card:nth-child(4n + 4) {
  background: linear-gradient(160deg, #ffffff, #f0f8ff);
}

.route-company-dashboard .dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.route-company-dashboard .dashboard-hero-card {
  border: 1px solid #cbdcff;
  border-radius: 26px;
  padding: clamp(1.1rem, 2.4vw, 1.7rem);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(67, 113, 255, 0.16), rgba(67, 113, 255, 0) 72%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.98));
  box-shadow: 0 24px 42px rgba(20, 38, 86, 0.12);
}

.route-company-dashboard .dashboard-hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.route-company-dashboard .dashboard-hero-main {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.95fr);
  align-items: stretch;
}

.route-company-dashboard .dashboard-hero-copy {
  min-width: 0;
}

.route-company-dashboard .dashboard-hero-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.08;
  margin-bottom: 0.65rem;
  color: #122f6c;
}

.route-company-dashboard .dashboard-hero-subtitle {
  max-width: 68ch;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.route-company-dashboard .dashboard-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.route-company-dashboard .dashboard-status-chip {
  display: grid;
  gap: 0.12rem;
  min-width: 150px;
  padding: 0.75rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(49, 97, 220, 0.14);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.route-company-dashboard .dashboard-status-chip strong {
  font-size: 1rem;
  color: #163a89;
}

.route-company-dashboard .dashboard-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.route-company-dashboard .dashboard-quick-actions .btn {
  min-width: 160px;
}

.route-company-dashboard .dashboard-hero-side {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.route-company-dashboard .dashboard-mini-stat {
  display: grid;
  gap: 0.2rem;
  min-height: 104px;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(53, 102, 223, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 24px rgba(18, 35, 85, 0.09);
}

.route-company-dashboard .dashboard-mini-stat strong {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  color: #153880;
}

.route-company-dashboard .dashboard-kpi-grid {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-company-dashboard .dashboard-kpi-grid .metric-card {
  min-height: 124px;
  min-width: 0;
}

.route-company-dashboard .dashboard-summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-company-dashboard .dashboard-summary-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.route-company-dashboard .dashboard-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.route-company-dashboard .dashboard-summary-metrics {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-company-dashboard .dashboard-summary-metric {
  display: grid;
  gap: 0.18rem;
  min-height: 84px;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(240, 246, 255, 0.92), rgba(255, 255, 255, 0.98));
  border: 1px solid #d8e2f8;
}

.route-company-dashboard .dashboard-summary-metric.is-alert {
  background: linear-gradient(160deg, rgba(255, 248, 240, 0.96), rgba(255, 255, 255, 0.98));
}

.route-company-dashboard .dashboard-summary-metric span {
  color: var(--color-muted);
  font-size: 0.82rem;
}

.route-company-dashboard .dashboard-summary-metric strong {
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: #14336f;
}

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

.route-company-dashboard .row.g-4 {
  margin-top: 0 !important;
}

.route-company-dashboard .row.g-4 > [class*="col-"] {
  display: flex;
}

.route-company-dashboard .row.g-4 .group-block {
  width: 100%;
}

@media (max-width: 1199px) {
  .route-company-dashboard .dashboard-hero-main,
  .route-company-dashboard .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .route-company-dashboard .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .route-company-dashboard .dashboard-hero-side,
  .route-company-dashboard .dashboard-summary-metrics,
  .route-company-dashboard .dashboard-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-company-dashboard .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .route-company-dashboard .dashboard-hero-card {
    border-radius: 22px;
    padding: 1rem;
  }

  .route-company-dashboard .dashboard-quick-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .route-company-dashboard .dashboard-hero-side,
  .route-company-dashboard .dashboard-summary-metrics,
  .route-company-dashboard .dashboard-link-grid,
  .route-company-dashboard .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.route-boards-boardlist .shell-card,
.route-boards-board .shell-card,
.route-boards-taskdetails .shell-card {
  box-shadow: 0 12px 26px rgba(18, 35, 85, 0.12);
}

.route-boards-board .kanban-column {
  background:
    linear-gradient(180deg, #fefefe 0%, #f6f9ff 100%);
}

.route-boards-board .kanban-column-header {
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  border-radius: 10px;
  padding-top: 0.25rem;
}

.route-boards-board .kanban-card {
  border: 1px solid #d3dcf2;
  background: linear-gradient(170deg, #ffffff, #f8fbff);
}

.route-boards-board .kanban-board-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
}

.route-boards-board .kanban-board,
.route-boards-board .sticky-board {
  display: grid;
  gap: 1rem;
  width: max-content;
  min-width: 100%;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 300px);
  grid-template-columns: none;
  align-items: start;
}

.route-boards-board .kanban-column {
  min-height: 520px;
  min-width: 0;
  max-width: 300px;
  padding: 0.9rem;
}

.route-boards-board .kanban-column-header {
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.route-boards-board .kanban-column-header strong {
  min-width: 0;
}

.route-boards-board .kanban-items {
  min-height: 0;
}

.route-boards-board .kanban-card {
  margin-bottom: 0.7rem;
  padding: 0.8rem 0.85rem;
  border-radius: 18px;
}

.route-boards-board .kanban-card-title {
  margin-bottom: 0.45rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.route-boards-board .kanban-card-title a {
  color: #132d67;
  text-decoration: none;
}

.route-boards-board .kanban-card-title a:hover {
  text-decoration: underline;
}

.route-boards-board .kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  align-items: center;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.route-boards-board .kanban-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background: #edf3ff;
  color: #244caa;
  font-size: 0.76rem;
  font-weight: 700;
}

.route-boards-board .kanban-card-assignee,
.route-boards-board .kanban-card-due {
  font-size: 0.8rem;
}

.route-boards-board .kanban-card-due {
  color: #8b5a11;
  font-weight: 700;
}

.route-boards-board .kanban-card-preview {
  display: -webkit-box;
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.route-boards-board .kanban-card-extra .card-note {
  margin-bottom: 0.16rem;
  overflow-wrap: anywhere;
}

.route-boards-board .kanban-card-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.route-boards-board .kanban-pagination {
  margin-top: auto;
  padding-top: 0.15rem;
}

.route-boards-board .kanban-page-indicator {
  min-width: 112px;
}

@media (max-width: 767.98px) {
  .route-boards-board .kanban-board,
  .route-boards-board .sticky-board {
    grid-auto-columns: minmax(260px, 84vw);
  }

  .route-boards-board .kanban-column {
    max-width: 84vw;
    min-height: 430px;
    padding: 0.8rem;
  }

  .route-boards-board .kanban-page-indicator {
    min-width: 94px;
    font-size: 0.75rem;
  }
}

.route-boards-taskdetails .task-details-page .group-block,
.route-boards-taskdetails .task-details-page .shell-card {
  border-color: #d1def8;
}

.route-user-mytasks .shell-card,
.route-user-mytasks .group-block {
  border-color: #cfddfa;
  background: linear-gradient(160deg, #ffffff, #f5f9ff);
}

.route-requests-list .shell-card,
.route-requests-create .shell-card,
.route-requests-details .shell-card {
  border-color: #ceddf8;
}

.route-requests-list .table tbody tr td:first-child a,
.route-requests-details .h3 {
  color: #143ea8;
}

.route-requests-list .report-toolbar,
.route-requests-create .row.g-3 {
  border: 1px solid #d4e0fa;
  border-radius: 14px;
  background: linear-gradient(155deg, #ffffff, #f2f8ff);
}

.route-requests-details .table {
  width: 100%;
  table-layout: fixed;
}

.route-requests-details .table th,
.route-requests-details .table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.route-requests-details .request-header-shell {
  box-shadow: 0 10px 24px rgba(19, 42, 108, 0.1);
}

.route-companyadmin-masterdata-manage .table thead th,
.route-companyadmin-users .table thead th,
.route-companyadmin-roles .table thead th {
  background: #f2f7ff;
}

[class*="route-reports-"] .report-panel,
[class*="route-reports-"] .shell-card {
  border-color: #ceddf9;
  box-shadow: 0 12px 26px rgba(16, 37, 93, 0.11);
}

[class*="route-reports-"] .report-toolbar {
  border: 1px solid #d6e2fb;
  border-radius: 14px;
  padding: 0.75rem;
  background: linear-gradient(160deg, #ffffff, #f4f8ff);
}

[class*="route-reports-"] .report-chart-wrap {
  border: 1px solid #dbe6fb;
  background:
    radial-gradient(420px 120px at 8% 0%, rgba(60, 109, 255, 0.11), rgba(60, 109, 255, 0) 72%),
    linear-gradient(180deg, #ffffff, #f7faff);
}

[class*="route-reports-"] .dashboard-grid .metric-card {
  border-color: #cddcf8;
}

.route-workspaces-list .shell-card,
.route-workspaces-details .shell-card {
  border-color: #cfddf8;
  box-shadow: 0 12px 28px rgba(20, 38, 92, 0.1);
}

.route-workspaces-list .table tbody tr:hover td,
.route-workspaces-details .table tbody tr:hover td {
  background: rgba(48, 97, 252, 0.05);
}

.route-account-profile .shell-card {
  background:
    radial-gradient(500px 190px at 8% 6%, rgba(58, 108, 255, 0.14), rgba(58, 108, 255, 0) 72%),
    linear-gradient(160deg, #ffffff, #f2f8ff);
}

@media (max-width: 992px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .auth-side {
    order: 2;
  }

  .route-account-login .auth-card,
  .route-account-register .auth-card {
    order: 1;
  }
}

@media (max-width: 768px) {
  .site-logo,
  .brand-logo {
    max-height: 28px !important;
    max-width: 140px !important;
  }

  .auth-logo {
    max-height: 44px;
    max-width: 160px;
  }

  .hero-brand-logo {
    max-height: 46px;
    max-width: 170px;
  }

  .hero-brand-mark {
    padding: 0.3rem 0.55rem;
  }

  .route-home .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
  }

  .route-home .hero-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* ===== Logo Application 20260506 ===== */
.site-logo,
.brand-logo,
.navbar-brand img {
  height: 42px !important;
  width: auto !important;
  max-height: 42px !important;
  max-width: 180px !important;
  display: block;
  object-fit: contain;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  max-width: 180px;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
}

.hero-title-with-logo {
  display: block;
  line-height: 1.08;
}

.hero-title-logo {
  height: 0.9em;
  width: auto;
  max-width: 6.4em;
  display: inline-block;
  object-fit: contain;
  vertical-align: baseline;
  transform: translateY(-0.05em);
  margin-inline-end: 0.35em;
}

.hero-title-rest {
  display: inline;
}

.footer-logo {
  height: 36px;
  width: auto;
  max-width: 160px;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
}

.pmo-exec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .85rem;
}

.pmo-exec-card {
  border: 1px solid rgba(15, 76, 129, .12);
  border-radius: 1rem;
  background: linear-gradient(145deg, #fff, #f6fafc);
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(15, 76, 129, .06);
}

.pmo-exec-card span {
  display: block;
  color: #6b7c8c;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pmo-exec-card strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.15;
  color: #14364a;
}

.pmo-exec-card.warning {
  border-color: rgba(233, 138, 21, .28);
  background: linear-gradient(145deg, #fffaf2, #fff4df);
}

.pmo-exec-card.danger {
  border-color: rgba(187, 45, 59, .28);
  background: linear-gradient(145deg, #fff7f8, #fdecee);
}

.pmo-exec-card.success {
  border-color: rgba(31, 143, 95, .25);
  background: linear-gradient(145deg, #f4fff9, #e8f8f0);
}

.pmo-progress {
  overflow: hidden;
  width: 100%;
  height: .45rem;
  border-radius: 999px;
  background: #e9eef2;
  margin-top: .25rem;
}

.pmo-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f4c81, #1f8f5f);
}

.pmo-row-overdue {
  background: rgba(187, 45, 59, .05);
}

.pmo-action-create {
  border: 1px dashed rgba(15, 76, 129, .22);
  border-radius: 1rem;
  padding: 1rem;
  background: #f8fbfd;
}

.pmo-recommendation {
  border-inline-start: 4px solid #0f4c81;
  border-radius: .75rem;
  background: #f5f9fc;
  padding: .85rem 1rem;
}

.pmo-attention-list {
  display: grid;
  gap: .65rem;
}

.pmo-attention-item {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  padding: .75rem .9rem;
  border: 1px solid rgba(15, 76, 129, .1);
  border-radius: .85rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.pmo-attention-item:hover {
  border-color: rgba(15, 76, 129, .35);
  background: #f7fbff;
}

.pmo-attention-item span {
  color: #6b7c8c;
  font-size: .86rem;
}

.pmo-trend-bars {
  display: grid;
  gap: .45rem;
}

.pmo-trend-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 8rem;
  gap: .6rem;
  align-items: center;
}

.pmo-trend-stack {
  display: grid;
  gap: .18rem;
}

.pmo-trend-stack i {
  display: block;
  min-width: 4px;
  height: .35rem;
  border-radius: 999px;
}

.pmo-trend-stack .created { background: #0f4c81; }
.pmo-trend-stack .closed { background: #1f8f5f; }
.pmo-trend-stack .net { background: #e98a15; }

.pmo-empty-strong {
  border: 1px solid rgba(233, 138, 21, .25);
  border-radius: 1rem;
  background: #fff8ec;
  color: #62420d;
}

@media (max-width: 520px) {
  .pmo-trend-row,
  .pmo-attention-item {
    display: block;
  }

  .pmo-attention-item span,
  .pmo-trend-row small {
    display: block;
    margin-top: .25rem;
  }
}

.auth-logo {
  height: 54px !important;
  width: auto !important;
  max-height: 54px !important;
  max-width: 220px !important;
  display: inline-block !important;
  object-fit: contain;
}

.hero-pill,
.hero-pill-logo {
  display: none !important;
}

@media (max-width: 768px) {
  .site-logo,
  .brand-logo,
  .navbar-brand img,
  .brand-logo-img {
    height: 34px !important;
    max-height: 34px !important;
    max-width: 145px !important;
  }

  .hero-title-with-logo {
    line-height: 1.12;
  }

  .hero-title-logo {
    height: 0.85em;
    max-width: 6em;
    transform: translateY(-0.03em);
  }

  .auth-logo {
    height: 44px !important;
    max-height: 44px !important;
    max-width: 180px !important;
  }

}

/* Platform entitlement + realtime shell */
.realtime-status-pill {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1045;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  background: #f8f9fa;
  color: #495057;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.realtime-status-pill.connected { background: #e9f9ef; color: #0f5132; border-color: #badbcc; }
.realtime-status-pill.reconnecting { background: #fff4e5; color: #8a5300; border-color: #ffddad; }
.realtime-status-pill.disconnected { background: #f8d7da; color: #842029; border-color: #f5c2c7; }

.realtime-status-dot {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1045;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: 0 0 0 1px rgba(15,23,42,.18), 0 4px 14px rgba(15,23,42,.16);
  background: #dc3545;
}
.realtime-status-dot.connected { background: #16a34a; }
.realtime-status-dot.reconnecting { background: #f59e0b; }
.realtime-status-dot.disconnected { background: #dc3545; }
[dir="rtl"] .realtime-status-dot {
  right: auto;
  left: 14px;
}

.notification-menu .dropdown-menu {
  min-width: min(380px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
}
.notification-preview-list {
  max-height: 360px;
  overflow-y: auto;
}
.notification-preview-item {
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  padding: .75rem;
}
.notification-preview-item.unread {
  background: rgba(13, 110, 253, .06);
}
.notification-preview-title {
  font-weight: 700;
  font-size: .92rem;
}
.notification-preview-message {
  color: #64748b;
  font-size: .84rem;
  margin-top: .15rem;
}
.notification-preview-meta {
  color: #94a3b8;
  font-size: .76rem;
}
.notification-preview-actions {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}
@media (max-width: 575.98px) {
  .notification-menu .dropdown-menu {
    position: fixed !important;
    inset: 56px 8px auto 8px !important;
    transform: none !important;
    width: auto;
  }
}

.live-presence-pill {
  position: fixed;
  right: 16px;
  bottom: 52px;
  z-index: 1044;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #bee5eb;
  background: #e8f7ff;
  color: #0c5460;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
[dir="rtl"] .live-presence-pill {
  right: auto;
  left: 16px;
}

.kanliva-command-palette {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(10, 17, 31, 0.45);
  z-index: 1100;
}
.kanliva-command-palette.open { display: flex; }
.kanliva-command-box {
  width: min(680px, 92vw);
  background: #ffffff;
  border: 1px solid #dce4f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(9, 30, 66, 0.22);
}

body.theme-dark {
  background: #0f172a;
  color: #e2e8f0;
}
body.theme-dark .shell-card,
body.theme-dark .group-block,
body.theme-dark .metric-card,
body.theme-dark .kanliva-command-box,
body.theme-dark .navbar,
body.theme-dark .dropdown-menu,
body.theme-dark .table {
  background-color: #111c33 !important;
  color: #e2e8f0 !important;
  border-color: #22334f !important;
}
body.theme-dark a { color: #93c5fd; }

/* Workspace, sprint, calendar, and timeline experience */
.workspace-ux-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
}
.workspace-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.workspace-kpi-grid,
.sprint-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
}
.workspace-kpi,
.sprint-kpi {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  padding: .9rem;
  min-height: 92px;
  min-width: 0;
  overflow: hidden;
}
.workspace-kpi strong,
.sprint-kpi strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  color: #12263f;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.workspace-kpi span,
.sprint-kpi span {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.workspace-tabs {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding-bottom: .2rem;
}
.workspace-tabs a {
  white-space: nowrap;
  border: 1px solid #d7e1ee;
  border-radius: 999px;
  padding: .45rem .75rem;
  text-decoration: none;
  color: #243b53;
  background: #fff;
}
.workspace-tabs a.active {
  background: #12355b;
  color: #ffffff;
  border-color: #12355b;
}
.workspace-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
  gap: 1rem;
}
.workspace-section-grid > *,
.workspace-ux-shell .shell-card,
.workspace-ux-shell .report-panel {
  min-width: 0;
}
.workspace-ux-shell .table-responsive {
  max-width: 100%;
  overflow-x: auto;
}
.workspace-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .75rem;
}
.workspace-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}
.workspace-overview-hero {
  grid-template-columns: 1fr;
}
.workspace-overview-hero .workspace-action-bar {
  justify-content: flex-start;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 999px;
  padding: .25rem .55rem;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.status-badge.todo,
.status-badge.planned { background: #edf2f7; color: #334155; border-color: #dbe4ef; }
.status-badge.active,
.status-badge.inprogress { background: #e7f5ff; color: #075985; border-color: #bae6fd; }
.status-badge.done,
.status-badge.completed { background: #e9f9ef; color: #166534; border-color: #bbf7d0; }
.status-badge.overdue,
.status-badge.blocked { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.progress-thin {
  height: .5rem;
  background: #e9eef5;
  border-radius: 999px;
  overflow: hidden;
}
.progress-thin > span {
  display: block;
  height: 100%;
  width: 0;
  background: #1f8f5f;
  border-radius: inherit;
}
.sprint-card {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.backlog-toolbar,
.timeline-toolbar,
.calendar-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .65rem;
  align-items: end;
}
.backlog-table th:first-child,
.backlog-table td:first-child {
  width: 42px;
}
.empty-state {
  border: 1px dashed #b8c7d9;
  border-radius: 8px;
  background: #f8fafc;
  padding: 1.25rem;
  color: #52616f;
}
.complete-options {
  display: grid;
  gap: .5rem;
}
.complete-options label {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: .65rem .75rem;
  background: #fff;
}
.sprint-board-banner {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 8px;
  padding: .8rem 1rem;
}
.timeline-shell {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.gantt-shell {
  margin-top: .75rem;
}
.gantt-zoom-buttons {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  min-height: 38px;
}
.gantt-zoom-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.25rem;
  padding: .45rem .65rem;
  color: #334155;
  text-decoration: none;
  border-inline-end: 1px solid #dbe4ef;
  font-size: .9rem;
}
.gantt-zoom-buttons a:last-child {
  border-inline-end: 0;
}
.gantt-zoom-buttons a.active {
  background: #0f4c81;
  color: #fff;
}
.gantt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  padding: .75rem .85rem;
  border-bottom: 1px solid #e8eef6;
  background: #f8fafc;
  color: #475569;
  font-size: .86rem;
}
.gantt-legend span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.legend-dot {
  width: .75rem;
  height: .75rem;
  border-radius: 999px;
  display: inline-block;
}
.legend-dot.todo { background: #64748b; }
.legend-dot.inprogress { background: #0f766e; }
.legend-dot.done { background: #15803d; }
.legend-dot.overdue { background: #dc2626; }
.legend-dot.planning { background: #7c8aa5; }
.today-line-sample {
  display: inline-block;
  width: .25rem;
  height: 1rem;
  border-inline-start: 2px solid #e11d48;
}
.milestone-sample {
  display: inline-block;
  width: .7rem;
  height: .7rem;
  background: #475569;
  transform: rotate(45deg);
  border-radius: 2px;
}
.timeline-grid {
  display: grid;
  grid-template-columns: minmax(430px, 38%) minmax(680px, 1fr);
  overflow-x: auto;
  max-width: 100%;
}
.timeline-head,
.timeline-row {
  display: contents;
}
.timeline-cell-left,
.timeline-cell-right {
  border-bottom: 1px solid #e8eef6;
  min-height: 58px;
  padding: .65rem;
  min-width: 0;
}
.timeline-cell-left,
.timeline-cell-left a {
  overflow-wrap: anywhere;
}
.gantt-left-head,
.gantt-left-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(92px, .9fr) minmax(76px, .72fr) minmax(58px, .5fr) minmax(84px, .7fr) minmax(84px, .7fr);
  gap: .5rem;
  align-items: center;
  min-width: 0;
}
.gantt-left-head {
  color: #475569;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}
.gantt-left-row {
  font-size: .84rem;
}
.gantt-left-row > span,
.gantt-left-row > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-task-title a {
  display: block;
  font-weight: 700;
  color: #0f4c81;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-task-title span {
  display: block;
  color: #64748b;
  font-size: .76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-type-chip,
.timeline-board-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.1rem;
  padding: 0 .35rem;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  color: #334155;
  font-size: .68rem;
  font-weight: 700;
  margin-inline-end: .25rem;
}
.timeline-type-chip.task { border-color: #b7d2ef; color: #0f4c81; background: #eef6ff; }
.timeline-type-chip.milestone { border-color: #d7bfef; color: #6d28d9; background: #f5efff; }
.timeline-type-chip.planning { border-color: #c7d2fe; color: #3730a3; background: #eef2ff; }
.timeline-board-chip { border-color: #d6e0eb; color: #475569; background: #fff; }
.timeline-scale {
  display: grid;
  grid-template-columns: repeat(var(--timeline-days), minmax(38px, 1fr));
  min-width: calc(var(--timeline-days) * 38px);
  color: #64748b;
  font-size: .78rem;
}
.timeline-scale span {
  border-inline-start: 1px solid #edf2f7;
  padding-inline-start: .25rem;
}
.timeline-lane {
  position: relative;
  min-width: calc(var(--timeline-days) * 38px);
  min-height: 40px;
  background-image: linear-gradient(to right, #edf2f7 1px, transparent 1px);
  background-size: calc(100% / var(--timeline-days)) 100%;
}
.timeline-bar {
  position: absolute;
  top: .55rem;
  left: calc(var(--bar-left) * 1%);
  width: max(calc(var(--bar-width) * 1%), 2.5rem);
  min-height: 1.55rem;
  border-radius: 6px;
  padding: .25rem .45rem;
  color: #fff;
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #2563eb;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .18);
  z-index: 1;
}
.timeline-bar:hover,
.timeline-bar:focus {
  color: #fff;
  outline: 2px solid rgba(15, 76, 129, .25);
  outline-offset: 2px;
}
.timeline-bar-progress {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: calc(var(--bar-progress) * 1%);
  background: rgba(255,255,255,.22);
  pointer-events: none;
}
.timeline-bar-label {
  position: relative;
  z-index: 1;
}
.timeline-bar.done { background: #15803d; }
.timeline-bar.inprogress { background: #0f766e; }
.timeline-bar.overdue { background: #dc2626; }
.timeline-bar.todo { background: #64748b; }
.timeline-bar.planning {
  background: #7c8aa5;
  border: 1px dashed rgba(255, 255, 255, .7);
  box-shadow: 0 2px 4px rgba(51, 65, 85, .16);
}
.timeline-bar.milestone {
  min-width: 2rem;
  width: 2rem;
  padding-inline: .2rem;
  border-radius: 5px;
  background: #6d28d9;
}
.timeline-bar.milestone::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: .45rem;
  width: .55rem;
  height: .55rem;
  background: rgba(255,255,255,.9);
  transform: translateY(-50%) rotate(45deg);
  border-radius: 1px;
}
.timeline-bar.milestone .timeline-bar-progress {
  display: none;
}
.timeline-bar.milestone .timeline-bar-label {
  position: absolute;
  inset-inline-start: 2.25rem;
  color: #334155;
  background: #fff;
  border: 1px solid #d8e1ef;
  border-radius: 4px;
  padding: .05rem .3rem;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline-today {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--today-left) * 1%);
  border-inline-start: 2px solid #e11d48;
  pointer-events: none;
}
.gantt-empty-state {
  margin-top: .75rem;
}
.gantt-date-inline-form {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) auto;
  gap: .4rem;
  align-items: center;
}
.gantt-missing-table td,
.gantt-missing-table th {
  min-width: 8rem;
}
.timeline-add-modal .modal-content {
  border: 1px solid #cfdae8;
  border-radius: 8px;
}
.timeline-item-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}
.timeline-item-type-options label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .2rem .5rem;
  align-items: start;
  padding: .75rem;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}
.timeline-item-type-options input {
  margin-top: .2rem;
}
.timeline-item-type-options span {
  font-weight: 700;
  color: #1e293b;
}
.timeline-item-type-options small {
  grid-column: 2;
  color: #64748b;
}
.timeline-add-section[hidden] {
  display: none !important;
}
.gantt-task-title-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #0f4c81;
  font-weight: 700;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-task-title-button:hover,
.gantt-task-title-button:focus {
  color: #133aa8;
  text-decoration: underline;
}
.gantt-left-row[data-timeline-open],
.timeline-bar[data-timeline-open] {
  cursor: pointer;
}
.timeline-bar {
  border: 0;
  text-align: start;
}
.timeline-bar.is-selected-task,
.gantt-left-row.is-selected-task,
.gantt-missing-row.is-selected-task {
  outline: 2px solid rgba(36, 89, 245, .42);
  outline-offset: 2px;
}
.gantt-left-row.is-selected-task {
  background: #f1f6ff;
  border-radius: 8px;
  padding: .3rem;
}
.assignment-mini-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: .05rem .42rem;
  border-radius: 999px;
  border: 1px solid #cdd8ed;
  background: #f4f7ff;
  color: #2b4169;
  font-size: .72rem;
  font-weight: 700;
}
.timeline-quick-panel {
  position: fixed;
  inset-block: 5.25rem 1rem;
  inset-inline-end: 1rem;
  z-index: 1040;
  width: min(460px, calc(100vw - 2rem));
  display: none;
  overflow: auto;
  border: 1px solid #cfdaf0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 48px rgba(15, 23, 42, .18);
  padding: 1rem;
}
.timeline-quick-panel.is-open {
  display: block;
}
.timeline-quick-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid #e2eaf7;
}
.timeline-quick-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin: .9rem 0;
}
.timeline-quick-summary div {
  min-width: 0;
  border: 1px solid #e2eaf7;
  border-radius: 8px;
  background: #f8fbff;
  padding: .55rem .65rem;
}
.timeline-quick-summary span {
  display: block;
  color: #64748b;
  font-size: .75rem;
}
.timeline-quick-summary strong {
  display: block;
  color: #14213d;
  overflow-wrap: anywhere;
  font-size: .88rem;
}
.timeline-quick-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.timeline-quick-edit-grid.is-disabled {
  opacity: .6;
}
.timeline-quick-readonly {
  border-radius: 8px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #854d0e;
  padding: .65rem .75rem;
  margin-bottom: .75rem;
}
.timeline-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .9rem;
}
.timeline-quick-actions .btn:last-child {
  grid-column: 1 / -1;
}
.timeline-quick-feedback {
  min-height: 1.35rem;
  margin-top: .45rem;
  font-size: .82rem;
  font-weight: 700;
}
[data-assignment-user-group],
[data-assignment-team-group] {
  display: none;
}
.assignment-mode-user [data-assignment-user-group],
.assignment-mode-team [data-assignment-team-group] {
  display: block;
}
.gantt-missing-row.is-saved {
  background: #f0fdf4;
}
.gantt-missing-row select,
.gantt-missing-row input {
  min-width: 9rem;
}
.gantt-missing-assignment {
  min-width: 13rem;
}
.gantt-missing-table .gantt-date-inline-form {
  grid-template-columns: minmax(8rem, 1fr);
}
.task-assignment-form {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: .9rem;
}
.task-assignment-current {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: .8rem;
}
.task-assignment-current div {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: .55rem .65rem;
}
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: .5rem;
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
}
.calendar-day {
  min-height: 112px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: .55rem;
}
.calendar-day.today {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}
.calendar-day.muted {
  background: #f8fafc;
  color: #7a8699;
}
.calendar-day-number {
  font-weight: 700;
  color: #334155;
}
.calendar-item {
  display: block;
  margin-top: .35rem;
  padding: .35rem .45rem;
  border-radius: 6px;
  background: #eef6ff;
  color: #12355b;
  text-decoration: none;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-item span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-item.event {
  background: #ecfdf5;
  color: #166534;
}
.calendar-item.task.inprogress {
  background: #e7f5ff;
  color: #075985;
}
.calendar-item.task.done {
  background: #e9f9ef;
  color: #166534;
}
.calendar-item.task.todo {
  background: #f1f5f9;
  color: #334155;
}
.calendar-item.timeline.milestone {
  background: #f5efff;
  color: #6d28d9;
}
.calendar-item.timeline.planning {
  background: #eef2ff;
  color: #3730a3;
  border-inline-start: 3px dashed #818cf8;
}
.calendar-item.overdue {
  background: #fff1f2;
  color: #be123c;
}
.board-actions-row {
  flex-wrap: wrap;
}
.workspace-ux-shell .d-flex.justify-content-between {
  flex-wrap: wrap;
  gap: .5rem;
}
.report-chart-box {
  min-height: 260px;
  position: relative;
}
@media (max-width: 991.98px) {
  .workspace-hero,
  .workspace-section-grid {
    grid-template-columns: 1fr;
  }
  .workspace-action-bar {
    justify-content: flex-start;
  }
  .timeline-quick-panel {
    inset: auto .75rem .75rem .75rem;
    width: auto;
    max-height: 82vh;
  }
  .timeline-quick-summary,
  .timeline-quick-edit-grid,
  .timeline-quick-actions,
  .task-assignment-current {
    grid-template-columns: 1fr;
  }
  .timeline-item-type-options {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 575.98px) {
  .workspace-kpi strong,
  .sprint-kpi strong {
    font-size: 1.25rem;
  }
  .timeline-grid {
    grid-template-columns: minmax(360px, 44%) minmax(560px, 1fr);
  }
  .gantt-left-head,
  .gantt-left-row {
    grid-template-columns: minmax(130px, 1.3fr) minmax(82px, .8fr) minmax(70px, .7fr) minmax(52px, .5fr) minmax(78px, .7fr) minmax(78px, .7fr);
    gap: .4rem;
  }
  .gantt-date-inline-form {
    grid-template-columns: 1fr;
  }
  .calendar-month-grid {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
  }
}
body.theme-dark .workspace-hero,
body.theme-dark .workspace-kpi,
body.theme-dark .sprint-kpi,
body.theme-dark .sprint-card,
body.theme-dark .timeline-shell,
body.theme-dark .timeline-quick-panel,
body.theme-dark .timeline-quick-summary div,
body.theme-dark .task-assignment-form,
body.theme-dark .task-assignment-current div,
body.theme-dark .gantt-legend,
body.theme-dark .gantt-zoom-buttons,
body.theme-dark .calendar-day,
body.theme-dark .workspace-tabs a,
body.theme-dark .complete-options label {
  background-color: #111c33 !important;
  color: #e2e8f0 !important;
  border-color: #22334f !important;
}
body.theme-dark .gantt-zoom-buttons a {
  color: #e2e8f0;
  border-color: #22334f;
}
body.theme-dark .gantt-zoom-buttons a.active {
  background: #2563eb;
  color: #fff;
}
.pmo-shell {
  display: grid;
  gap: 1rem;
}
.pmo-toolbar,
.pmo-kpis,
.pmo-filter-grid,
.pmo-form-grid,
.pmo-link-grid {
  display: grid;
  gap: .75rem;
}
.pmo-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.pmo-kpis {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}
.pmo-filter-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}
.pmo-form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.pmo-form-grid .span-2 {
  grid-column: span 2;
}
.pmo-form-grid .span-4 {
  grid-column: 1 / -1;
}
.pmo-kpi {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: .85rem;
  background: #fff;
}
.pmo-kpi span {
  display: block;
  font-size: .78rem;
  color: #64748b;
}
.pmo-kpi strong {
  display: block;
  font-size: 1.45rem;
  color: #162033;
}
.pmo-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 999px;
  padding: .22rem .55rem;
  font-size: .78rem;
  font-weight: 650;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pmo-badge.low {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.pmo-badge.medium {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.pmo-badge.high {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.pmo-badge.critical,
.pmo-badge.overdue {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.pmo-badge.done {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.pmo-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8dee8;
  border-radius: 8px;
}
.pmo-table-wrap table {
  margin-bottom: 0;
  min-width: 980px;
}
.pmo-matrix {
  display: grid;
  gap: .5rem;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-bottom: .25rem;
}
.pmo-risk-matrix {
  grid-template-columns: 86px repeat(5, minmax(150px, 1fr));
  min-width: 0;
}
.pmo-matrix-head,
.pmo-matrix-axis,
.pmo-matrix-cell {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: .7rem;
  background: #fff;
}
.pmo-matrix-head,
.pmo-matrix-axis {
  font-weight: 700;
  color: #334155;
  text-align: center;
}
.pmo-matrix-cell {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.pmo-matrix-cell.low { background: #f0fdf4; }
.pmo-matrix-cell.medium { background: #fffbeb; }
.pmo-matrix-cell.high { background: #fff7ed; }
.pmo-matrix-cell.critical { background: #fef2f2; }
.pmo-chip {
  display: block;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 7px;
  padding: .38rem .45rem;
  background: rgba(255, 255, 255, .78);
  color: #0f172a;
  text-decoration: none;
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.pmo-stakeholder-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: .85rem;
}
.pmo-quadrant {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 1rem;
  min-height: 220px;
  background: #fff;
}
.pmo-quadrant h3 {
  font-size: 1rem;
  margin-bottom: .75rem;
}
.pmo-history {
  border-left: 3px solid #cbd5e1;
  padding-left: 1rem;
}
[dir="rtl"] .pmo-history {
  border-left: 0;
  border-right: 3px solid #cbd5e1;
  padding-left: 0;
  padding-right: 1rem;
}
.pmo-history-item {
  margin-bottom: .9rem;
}
.kanban-done-column {
  outline: 2px solid rgba(37, 99, 235, .26);
  outline-offset: -2px;
}
@media (max-width: 991.98px) {
  .pmo-toolbar,
  .pmo-filter-grid,
  .pmo-form-grid,
  .pmo-kpis,
  .pmo-stakeholder-matrix {
    grid-template-columns: 1fr 1fr;
  }
  .pmo-form-grid .span-2,
  .pmo-form-grid .span-4 {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  .pmo-risk-matrix {
    grid-template-columns: 64px repeat(5, minmax(92px, 1fr));
  }
  .pmo-matrix-head,
  .pmo-matrix-axis,
  .pmo-matrix-cell {
    padding: .45rem;
  }
  .pmo-matrix-cell {
    min-height: 104px;
  }
}
@media (max-width: 575.98px) {
  .pmo-toolbar,
  .pmo-filter-grid,
  .pmo-form-grid,
  .pmo-kpis,
  .pmo-stakeholder-matrix {
    grid-template-columns: 1fr;
  }
}
body.theme-dark .pmo-kpi,
body.theme-dark .pmo-matrix-head,
body.theme-dark .pmo-matrix-axis,
body.theme-dark .pmo-matrix-cell,
body.theme-dark .pmo-quadrant,
body.theme-dark .pmo-chip,
body.theme-dark .pmo-table-wrap {
  background-color: #111c33 !important;
  color: #e2e8f0 !important;
  border-color: #22334f !important;
}

/* Selected Visual UX Redesign Pass */
.pmo-visual-grid,
.pmo-card-grid,
.pmo-section-grid,
.pmo-mini-grid,
.board-settings-column-grid {
  display: grid;
  gap: .85rem;
  min-width: 0;
}

.pmo-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.pmo-section-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}

.pmo-mini-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.pmo-record-card,
.pmo-section-card,
.pmo-lane,
.pmo-report-card,
.board-column-card {
  min-width: 0;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.pmo-record-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .72rem;
  padding: .95rem;
  overflow: hidden;
}

.pmo-record-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: .28rem;
  background: #64748b;
}

.pmo-record-card.low::before { background: #10b981; }
.pmo-record-card.medium::before { background: #d97706; }
.pmo-record-card.high::before { background: #ea580c; }
.pmo-record-card.critical::before,
.pmo-record-card.overdue::before { background: #dc2626; }

.pmo-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .65rem;
}

.pmo-card-title a,
.pmo-card-title strong {
  color: #0f4c81;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.pmo-card-title a:hover,
.pmo-card-title a:focus {
  text-decoration: underline;
}

.pmo-card-meta,
.pmo-card-facts,
.pmo-action-row,
.pmo-chip-row,
.pmo-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-width: 0;
}

.pmo-card-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
}

.pmo-fact {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: .5rem .55rem;
}

.pmo-fact span {
  display: block;
  color: #64748b;
  font-size: .74rem;
}

.pmo-fact strong {
  display: block;
  color: #14213d;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.pmo-owner {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  max-width: 100%;
}

.pmo-avatar {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #e8efff;
  color: #2459f5;
  font-weight: 800;
  flex: 0 0 auto;
}

.pmo-soft-chip,
.pmo-date-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  max-width: 100%;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: .24rem .55rem;
  font-size: .78rem;
  font-weight: 650;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.pmo-date-chip.overdue,
.pmo-soft-chip.overdue {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.pmo-section-card {
  padding: 1rem;
}

.pmo-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .8rem;
}

.pmo-section-header h2,
.pmo-section-header h3 {
  margin: 0;
  font-size: 1rem;
}

.pmo-board-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: .75rem;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: .15rem;
}

.pmo-lane {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-height: 220px;
  padding: .75rem;
  background: #f8fafc;
}

.pmo-lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  color: #334155;
}

.pmo-lane-header strong {
  overflow-wrap: anywhere;
}

.pmo-matrix-frame {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: .75rem;
}

.pmo-matrix-frame .pmo-matrix,
.pmo-matrix-frame .pmo-stakeholder-matrix {
  min-width: 760px;
}

.pmo-matrix-note {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  color: #64748b;
  font-size: .86rem;
}

.pmo-stakeholder-matrix .pmo-quadrant {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.92)),
    #f8fafc;
}

.pmo-quadrant.manage { border-block-start: 5px solid #2563eb; }
.pmo-quadrant.satisfied { border-block-start: 5px solid #d97706; }
.pmo-quadrant.informed { border-block-start: 5px solid #0f766e; }
.pmo-quadrant.monitor { border-block-start: 5px solid #64748b; }

.pmo-timeline-list {
  display: grid;
  gap: .75rem;
}

.pmo-timeline-card {
  display: grid;
  grid-template-columns: minmax(110px, .28fr) minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: .85rem;
}

.pmo-timeline-date {
  color: #64748b;
  font-weight: 700;
}

.pmo-report-chart-list {
  display: grid;
  gap: .55rem;
}

.pmo-report-bar {
  display: grid;
  grid-template-columns: minmax(120px, .34fr) minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
}

.pmo-report-bar-track {
  height: .7rem;
  border-radius: 999px;
  background: #e9eef5;
  overflow: hidden;
}

.pmo-report-bar-track span {
  display: block;
  height: 100%;
  width: var(--bar-value, 0%);
  min-width: .35rem;
  border-radius: inherit;
  background: #2459f5;
}

.pmo-report-card {
  padding: 1rem;
}

.board-settings-shell {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.board-settings-shell > *,
.task-details-page > *,
.workspace-hero > *,
.workspace-action-bar {
  min-width: 0;
  max-width: 100%;
}

.board-settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

.board-settings-tabs {
  position: sticky;
  top: 0.75rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.board-settings-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.35rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #1e3a8a;
  background: #f8fbff;
  font-weight: 700;
  text-decoration: none;
}

.board-settings-tab:hover,
.board-settings-tab:focus {
  color: #0f172a;
  background: #eaf2ff;
  border-color: #93c5fd;
}

.board-settings-column-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.board-column-card {
  padding: .85rem;
}

.board-column-card.is-done {
  border-color: #bfdbfe;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18), 0 8px 24px rgba(15, 23, 42, .06);
}

.board-column-card .column-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 8px;
  background: #eef6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.board-settings-shell h1,
.board-settings-shell h2,
.board-settings-shell h3,
.board-settings-shell p,
.board-settings-shell .pmo-soft-chip,
.task-details-page h1,
.task-details-page h2,
.task-details-page h3,
.task-details-page p,
.task-details-page strong,
.task-details-page .btn,
.task-details-page .status-badge {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.task-detail-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .65rem;
}

.task-detail-overview .workspace-kpi {
  min-height: auto;
}

.task-move-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
  color: #334155;
  padding: .12rem .45rem;
  font-size: .75rem;
  font-weight: 700;
}

.task-move-badge.completed {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.task-move-badge.reopened {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.task-move-badge.picked-up {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

body.theme-dark .pmo-record-card,
body.theme-dark .pmo-section-card,
body.theme-dark .pmo-lane,
body.theme-dark .pmo-report-card,
body.theme-dark .board-column-card,
body.theme-dark .board-settings-hero,
body.theme-dark .pmo-timeline-card,
body.theme-dark .pmo-fact {
  background-color: #111c33 !important;
  color: #e2e8f0 !important;
  border-color: #22334f !important;
}

body.theme-dark .pmo-soft-chip,
body.theme-dark .pmo-date-chip,
body.theme-dark .task-move-badge {
  background: #16233d;
  color: #e2e8f0;
  border-color: #304463;
}

body.theme-dark .board-settings-tabs {
  background: rgba(17, 28, 51, 0.94);
  border-color: #22334f;
}

body.theme-dark .board-settings-tab {
  background: #16233d;
  color: #dbeafe;
  border-color: #304463;
}

[dir="rtl"] .pmo-record-card::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

@media (max-width: 991.98px) {
  .pmo-section-grid,
  .board-settings-hero {
    grid-template-columns: 1fr;
  }

  .pmo-board-lanes {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
  }
}

@media (max-width: 575.98px) {
  .board-settings-hero {
    grid-template-columns: 1fr;
  }

  .board-settings-shell > .row,
  .task-details-page > .row {
    margin-left: 0;
    margin-right: 0;
  }

  .board-settings-shell > .row > *,
  .task-details-page > .row > * {
    padding-left: 0;
    padding-right: 0;
  }

  .board-settings-shell .shell-card,
  .board-settings-hero {
    padding: .9rem !important;
  }

  .pmo-card-title,
  .pmo-section-header,
  .pmo-timeline-card,
  .pmo-report-bar {
    grid-template-columns: 1fr;
  }

  .pmo-timeline-card {
    display: grid;
  }

  .pmo-action-row .btn,
  .pmo-card-title .btn {
    width: 100%;
  }
}

/* Remaining Visual UX pass shared system */
.ux-page-header,
.ux-page-has-title > .ux-page-title {
  margin-bottom: 1rem;
}

.ux-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .85rem;
  padding: .9rem 0 .25rem;
}

.ux-page-title,
.ux-page-header h1,
.ux-page-header h2 {
  color: #10213f;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.ux-card,
.ux-section,
.ux-kpi-card {
  min-width: 0;
  max-width: 100%;
  border-radius: 8px;
}

.ux-section {
  position: relative;
  overflow: hidden;
}

.ux-section::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(15, 76, 129, .88), rgba(233, 138, 21, .7), rgba(31, 143, 95, .65));
  opacity: .55;
}

.ux-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: .85rem;
}

.ux-kpi-card {
  padding: .95rem;
  background: #fff;
  border: 1px solid #dbe4ef;
}

.ux-action-bar,
.ux-filter-bar {
  flex-wrap: wrap;
  gap: .55rem;
}

.ux-filter-bar,
.ux-form-grid {
  align-items: end;
}

.ux-form-grid .form-control,
.ux-form-grid .form-select,
.ux-filter-bar .form-control,
.ux-filter-bar .form-select {
  min-width: 0;
}

.ux-mobile-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ux-table {
  margin-bottom: 0;
  vertical-align: middle;
  border-collapse: separate;
  border-spacing: 0;
}

.ux-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faff;
  color: #334155;
  border-bottom-color: #cfdaf0;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ux-table tbody tr {
  transition: background-color .16s ease;
}

.ux-table tbody tr:hover {
  background: #f8fbff;
}

.ux-table td,
.ux-table th {
  overflow-wrap: anywhere;
}

.ux-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
  min-height: 1.45rem;
  padding: .12rem .55rem;
  border-radius: 999px;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
  color: #334155;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
}

.ux-status-success {
  color: #166534;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.ux-status-info {
  color: #075985;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ux-status-warning,
.ux-priority-medium {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.ux-status-danger,
.ux-priority-critical,
.ux-priority-high {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.ux-status-muted,
.ux-priority-low {
  color: #475569;
  background: #f1f5f9;
  border-color: #dbe4ef;
}

.ux-empty-state {
  display: block;
  width: 100%;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b !important;
  text-align: center;
}

.ux-empty-row td {
  padding: 0 !important;
}

.ux-timeline {
  display: grid;
  gap: .75rem;
}

.ux-matrix {
  max-width: 100%;
  overflow-x: auto;
}

.ux-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: .9rem;
}

.ux-form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.ux-form-grid > [class*="col-"] {
  min-width: min(100%, 10rem);
}

.remaining-visualux-enhanced .auth-card,
.route-shared-accessdenied .auth-card,
.route-shared-error .auth-card,
.route-shared-offline .shell-card,
.route-shared-upgraderequired .shell-card {
  max-width: 760px;
  margin-inline: auto;
}

.route-shared-accessdenied .auth-card,
.route-shared-error .auth-card,
.route-shared-offline .shell-card {
  border-top: 4px solid #0f4c81;
}

.route-shared-plancomparison .shell-card,
.route-shared-featureavailability .shell-card,
.route-owner-users .shell-card,
.route-companyadmin-users .shell-card,
.route-records-historydiff .shell-card {
  padding: 1rem !important;
}

.route-company-usage .usage-limit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: .75rem;
}

.route-company-usage .usage-limit-card {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: .85rem;
}

.route-company-usage .usage-limit-card span {
  display: block;
  color: #64748b;
  font-size: .78rem;
}

.route-company-usage .usage-limit-card strong {
  display: block;
  margin-top: .25rem;
  color: #10213f;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

body.theme-dark .ux-card,
body.theme-dark .ux-kpi-card,
body.theme-dark .route-company-usage .usage-limit-card {
  background-color: #111c33 !important;
  color: #e2e8f0 !important;
  border-color: #22334f !important;
}

body.theme-dark .ux-table thead th {
  background: #17233d;
  color: #e2e8f0;
  border-color: #263955;
}

body.theme-dark .ux-table tbody tr:hover {
  background: #16233d;
}

body.theme-dark .ux-empty-state,
body.theme-dark .ux-status-muted,
body.theme-dark .ux-badge {
  background: #16233d;
  color: #e2e8f0 !important;
  border-color: #304463;
}

[dir="rtl"] .ux-table thead th {
  text-align: right;
}

@media (max-width: 767.98px) {
  .ux-page-header,
  .ux-action-bar,
  .ux-filter-bar,
  .ux-form-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ux-action-bar .btn,
  .ux-filter-bar .btn,
  .ux-form-grid .btn {
    width: 100%;
  }

  .ux-table {
    min-width: 620px;
  }

  .route-shared-plancomparison .ux-table,
  .route-shared-featureavailability .ux-table {
    min-width: 760px;
  }
}

/* Workspace integration layer */
.workspace-list-page,
.workspace-report-page {
  gap: 1.1rem;
}

.workspace-list-hero,
.workspace-report-hero {
  background:
    radial-gradient(circle at top right, rgba(15, 76, 129, .08), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.workspace-list-subtitle {
  color: #516175;
  max-width: 58rem;
}

.workspace-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: .8rem;
}

.workspace-summary-card {
  border: 1px solid #d7e2ee;
  border-radius: 10px;
  background: #fff;
  padding: 1rem;
  min-width: 0;
}

.workspace-summary-card span {
  display: block;
  color: #64748b;
  font-size: .8rem;
}

.workspace-summary-card strong {
  display: block;
  margin-top: .35rem;
  color: #10213f;
  font-size: 1.55rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.workspace-filter-shell {
  border-color: #d7e2ee;
  border-radius: 10px;
  background: #fff;
}

.workspace-filter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .9rem;
  margin-bottom: .9rem;
}

.workspace-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: .8rem;
  align-items: end;
}

.workspace-filter-search {
  grid-column: span 2;
}

.workspace-filter-actions {
  display: flex;
  gap: .55rem;
  align-items: end;
  flex-wrap: wrap;
}

.workspace-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}

.workspace-card {
  border: 1px solid #d7e2ee;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, #f9fbfe 100%);
  padding: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: .95rem;
  min-width: 0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.workspace-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .85rem;
}

.workspace-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .55rem;
}

.workspace-health-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.workspace-health-healthy .workspace-health-badge {
  background: #e9f9ef;
  color: #166534;
  border-color: #b9efca;
}

.workspace-health-at-risk .workspace-health-badge {
  background: #fff7e6;
  color: #9a5b00;
  border-color: #f2d79f;
}

.workspace-health-critical .workspace-health-badge {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.workspace-health-no-activity .workspace-health-badge {
  background: #eef2f7;
  color: #475569;
  border-color: #d7e2ee;
}

.workspace-health-healthy {
  border-top: 4px solid #16a34a;
}

.workspace-health-at-risk {
  border-top: 4px solid #e98a15;
}

.workspace-health-critical {
  border-top: 4px solid #dc2626;
}

.workspace-health-no-activity {
  border-top: 4px solid #64748b;
}

.workspace-card-title,
.workspace-card-title a {
  margin: 0;
  color: #10213f;
  text-decoration: none;
  font-size: 1.16rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.workspace-card-title a:hover,
.workspace-card-title a:focus {
  color: #0f4c81;
}

.workspace-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .65rem;
  color: #64748b;
  font-size: .82rem;
}

.workspace-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.workspace-card-description {
  color: #465668;
  min-height: 3.6rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.workspace-owner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .85rem;
  border: 1px solid #e1e9f3;
  border-radius: 10px;
  background: #f9fbff;
}

.workspace-owner-row span {
  color: #64748b;
  font-size: .82rem;
}

.workspace-owner-row strong {
  color: #12263f;
  overflow-wrap: anywhere;
  text-align: end;
}

.workspace-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr));
  gap: .65rem;
}

.workspace-fact-grid > div,
.workspace-card-detail {
  border: 1px solid #e1e9f3;
  border-radius: 10px;
  background: #fff;
  padding: .75rem .85rem;
  min-width: 0;
}

.workspace-fact-grid span,
.workspace-card-detail span {
  display: block;
  color: #64748b;
  font-size: .78rem;
}

.workspace-fact-grid strong,
.workspace-card-detail strong {
  display: block;
  color: #10213f;
  font-size: 1.02rem;
  margin-top: .2rem;
  overflow-wrap: anywhere;
}

.workspace-card-detail small {
  display: block;
  margin-top: .25rem;
  color: #64748b;
}

.workspace-fact-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
}

.workspace-progress-shell,
.workspace-progress-hero {
  border: 1px solid #dce7f2;
  border-radius: 10px;
  background: #f8fbff;
  padding: .85rem;
}

.workspace-progress-label,
.workspace-progress-hero div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .6rem;
}

.workspace-progress-label span,
.workspace-progress-hero span {
  color: #64748b;
}

.workspace-progress-label strong,
.workspace-progress-hero strong {
  color: #0f4c81;
  font-size: 1rem;
}

.workspace-progress-bar {
  background: #dce7f2;
}

.workspace-card-stack,
.workspace-command-columns,
.workspace-mini-list,
.workspace-feed-list {
  display: grid;
  gap: .7rem;
}

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

.workspace-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .85rem;
  margin-bottom: .9rem;
}

.workspace-mini-item,
.workspace-feed-item,
.workspace-shortcut-card,
.related-item-card {
  display: block;
  border: 1px solid #dce7f2;
  border-radius: 10px;
  background: #fff;
  padding: .85rem;
  text-decoration: none;
  color: #10213f;
  min-width: 0;
}

.workspace-mini-item strong,
.workspace-feed-item strong,
.workspace-shortcut-card strong,
.related-item-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.workspace-mini-item span,
.workspace-feed-item span,
.workspace-shortcut-card span,
.related-item-card span {
  display: block;
  margin-top: .35rem;
  color: #64748b;
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.workspace-feed-item small,
.related-item-due {
  display: block;
  margin-top: .35rem;
  color: #94a3b8;
  font-size: .78rem;
}

.workspace-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: .75rem;
}

.workspace-shortcut-card {
  min-height: 112px;
  background:
    linear-gradient(135deg, rgba(15, 76, 129, .06), rgba(255,255,255,.98));
}

.workspace-card-actions,
.related-items-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.timeline-picker-shell {
  display: grid;
  gap: 1rem;
}

.timeline-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.timeline-picker-copy {
  min-width: 0;
}

.timeline-picker-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: .65rem;
  color: #64748b;
  font-size: .82rem;
}

.timeline-picker-breadcrumb a {
  color: #0f4c81;
  font-weight: 600;
  text-decoration: none;
}

.timeline-picker-breadcrumb a:hover,
.timeline-picker-breadcrumb a:focus {
  color: #12355b;
  text-decoration: underline;
}

.timeline-picker-alert {
  border-radius: 12px;
}

.timeline-picker-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr);
  gap: .85rem;
  align-items: end;
}

.timeline-picker-control {
  min-width: 0;
}

.timeline-picker-card {
  min-height: 100%;
}

.timeline-picker-card .workspace-card-description {
  min-height: 4.7rem;
}

.timeline-picker-fact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-picker-actions .btn[disabled] {
  opacity: 1;
  cursor: not-allowed;
}

.timeline-picker-empty,
.timeline-picker-empty-results {
  margin: 0;
}

.workspace-empty-state {
  text-align: center;
}

.workspace-empty-illustration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  min-height: 7rem;
  margin-bottom: .9rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(15, 76, 129, .16), transparent 40%),
    linear-gradient(135deg, #12355b, #325e8e);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .18);
}

.related-items-panel {
  border-color: #d7e2ee;
  border-radius: 12px;
}

.related-items-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .9rem;
  margin-bottom: 1rem;
}

.related-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: .9rem;
}

.related-group {
  border: 1px solid #e1e9f3;
  border-radius: 12px;
  background: #f9fbff;
  padding: .85rem;
  display: grid;
  gap: .65rem;
}

.related-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
}

.related-group-header h3 {
  margin: 0;
  font-size: .96rem;
}

.related-group-header span,
.related-item-type {
  color: #64748b;
  font-size: .76rem;
  font-weight: 700;
}

.related-item-meta {
  display: block;
  margin-top: .3rem;
  color: #64748b;
  font-size: .82rem;
}

.related-items-empty {
  border: 1px dashed #bfd0e4;
  border-radius: 10px;
  background: #f8fbff;
  padding: 1rem;
  color: #516175;
}

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

.workspace-report-grid .report-panel,
.workspace-report-page .shell-card {
  min-width: 0;
}

.calendar-item.integrated.risk {
  background: #fff1f2;
  color: #be123c;
}

.calendar-item.integrated.issue {
  background: #fff7ed;
  color: #b45309;
}

.calendar-item.integrated.communication {
  background: #eff6ff;
  color: #1d4ed8;
}

.calendar-item.integrated.sprint {
  background: #eef2ff;
  color: #4338ca;
  border-inline-start: 3px solid #818cf8;
}

body.theme-dark .workspace-summary-card,
body.theme-dark .workspace-card,
body.theme-dark .workspace-filter-shell,
body.theme-dark .workspace-owner-row,
body.theme-dark .workspace-fact-grid > div,
body.theme-dark .workspace-card-detail,
body.theme-dark .workspace-progress-shell,
body.theme-dark .workspace-progress-hero,
body.theme-dark .workspace-mini-item,
body.theme-dark .workspace-feed-item,
body.theme-dark .workspace-shortcut-card,
body.theme-dark .related-group,
body.theme-dark .related-item-card,
body.theme-dark .related-items-empty {
  background-color: #111c33 !important;
  color: #e2e8f0 !important;
  border-color: #22334f !important;
}

body.theme-dark .workspace-summary-card span,
body.theme-dark .workspace-card-meta,
body.theme-dark .workspace-card-description,
body.theme-dark .workspace-owner-row span,
body.theme-dark .workspace-fact-grid span,
body.theme-dark .workspace-card-detail span,
body.theme-dark .workspace-card-detail small,
body.theme-dark .workspace-mini-item span,
body.theme-dark .workspace-feed-item span,
body.theme-dark .workspace-feed-item small,
body.theme-dark .workspace-shortcut-card span,
body.theme-dark .related-item-meta,
body.theme-dark .related-item-due,
body.theme-dark .related-item-type,
body.theme-dark .related-items-empty {
  color: #c6d3e7 !important;
}

[dir="rtl"] .workspace-owner-row strong {
  text-align: start;
}

[dir="rtl"] .workspace-card-actions,
[dir="rtl"] .related-items-actions,
[dir="rtl"] .workspace-card-badges,
[dir="rtl"] .workspace-card-meta {
  justify-content: flex-start;
}

[dir="rtl"] .timeline-picker-breadcrumb {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .timeline-picker-head-actions {
  justify-content: flex-start;
}

@media (max-width: 991.98px) {
  .workspace-command-grid,
  .workspace-report-grid {
    grid-template-columns: 1fr;
  }

  .workspace-filter-search {
    grid-column: auto;
  }

  .timeline-picker-head,
  .timeline-picker-controls,
  .timeline-picker-fact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .workspace-filter-header,
  .related-items-header,
  .workspace-owner-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-filter-actions,
  .workspace-card-actions,
  .related-items-actions,
  .workspace-action-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-filter-actions .btn,
  .workspace-card-actions .btn,
  .related-items-actions .btn,
  .workspace-action-bar .btn {
    width: 100%;
  }

  .timeline-picker-breadcrumb {
    gap: .25rem;
  }
}

@media (max-width: 991.98px) {
  .workspace-card-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-card-actions .btn {
    width: 100%;
  }
}

/* Visual Design System Redesign Pass - 2026-05-30 */
.vd-page {
  display: grid;
  gap: 1.25rem;
}

.vd-page-header,
.ux-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.1rem, 2.4vw, 1.65rem);
  border: 1px solid #ccdaf3;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(47, 111, 237, 0.12), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f4f8ff 62%, #eef7ff 100%);
  box-shadow: 0 18px 40px rgba(15, 35, 75, 0.08);
}

.vd-page-header h1,
.ux-page-header h1 {
  margin: 0;
  color: #122653;
  letter-spacing: -0.025em;
}

.vd-page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  color: #285aa5;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vd-page-subtitle {
  max-width: 72ch;
  margin: 0.35rem 0 0;
  color: #5d6b82;
}

.vd-header-actions,
.vd-command-bar,
.vd-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.vd-command-bar,
.vd-filter-bar {
  padding: 0.85rem;
  border: 1px solid #d7e2f5;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.vd-kpi-grid,
.ux-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 0.9rem;
}

.vd-kpi-card,
.ux-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  padding: 1rem;
  border: 1px solid #d2def2;
  border-radius: 20px;
  background: linear-gradient(160deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 14px 30px rgba(15, 35, 75, 0.07);
}

.vd-kpi-card::after,
.ux-kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -34px auto;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.1);
}

.vd-kpi-card strong,
.ux-kpi-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0.35rem;
  color: #143671;
  letter-spacing: -0.04em;
}

.vd-section-card,
.vd-table-card {
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid #d5e0f2;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 12px 26px rgba(15, 35, 75, 0.06);
}

.vd-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.vd-section-title h2,
.vd-section-title h3 {
  margin: 0;
  color: #152b59;
}

.vd-table-wrap,
.vd-table-card .table-responsive,
.route-companyadmin-users .shell-card,
.route-companyadmin-roles .shell-card,
.route-companyadmin-permissions .shell-card,
.route-companyadmin-masterdata-manage .shell-card,
.route-owner-payments .shell-card,
.route-owner-plans .shell-card,
.route-owner-companies .shell-card,
.route-owner-planmatrix .shell-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vd-table-card table,
.route-owner-payments table,
.route-owner-plans table,
.route-owner-companies table,
.route-owner-planmatrix table,
.route-companyadmin-users table,
.route-companyadmin-roles table,
.route-companyadmin-permissions table,
.route-companyadmin-masterdata-manage table,
.route-companyadmin-apiwebhooks table,
.route-companyadmin-automationrules table,
.route-companyadmin-automationruns table,
.route-companyadmin-approvalschemes table,
.route-companyadmin-slapolicies table,
.route-companyadmin-invitations table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.vd-table-card thead th,
.route-owner-payments thead th,
.route-owner-plans thead th,
.route-owner-companies thead th,
.route-owner-planmatrix thead th,
.route-companyadmin-users thead th,
.route-companyadmin-roles thead th,
.route-companyadmin-permissions thead th,
.route-companyadmin-masterdata-manage thead th,
.route-companyadmin-apiwebhooks thead th,
.route-companyadmin-automationrules thead th,
.route-companyadmin-automationruns thead th,
.route-companyadmin-approvalschemes thead th,
.route-companyadmin-slapolicies thead th,
.route-companyadmin-invitations thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f6f9ff;
}

.vd-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.vd-danger-zone {
  padding: 0.65rem;
  border: 1px solid #ffd3d6;
  border-radius: 14px;
  background: #fff7f8;
}

.vd-badge,
.ux-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  border: 1px solid #d3dded;
  background: #f8fbff;
  color: #344767;
  font-size: 0.76rem;
  font-weight: 800;
}

.vd-status-success,
.ux-status-success {
  border-color: #b9e7cb;
  background: #effaf3;
  color: #166534;
}

.vd-status-info,
.ux-status-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.vd-status-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.vd-status-muted,
.ux-status-muted {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.vd-feature-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid #ccd9ef;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(47, 111, 237, 0.16), transparent 34%),
    linear-gradient(140deg, #ffffff 0%, #f4f8ff 56%, #eefaf7 100%);
  box-shadow: 0 22px 50px rgba(15, 35, 75, 0.1);
}

.vd-feature-card::before {
  content: "";
  position: absolute;
  inset: auto -52px -56px auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(20, 79, 159, 0.09);
}

.vd-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.vd-feature-fact {
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.vd-feature-fact span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.vd-feature-fact strong {
  display: block;
  margin-top: 0.2rem;
  color: #122653;
}

.vd-empty-state,
.empty-state {
  border: 1px dashed #bfd0e4;
  border-radius: 18px;
  background: linear-gradient(180deg, #f9fbff, #ffffff);
  padding: 1.15rem;
  color: #516175;
}

.vd-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.8rem;
}

.vd-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.vd-admin-card {
  padding: 1rem;
  border: 1px solid #d8e3f3;
  border-radius: 20px;
  background: #fff;
}

.vd-admin-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.route-owner-dashboard .group-block,
.route-companyadmin-dashboard .group-block,
.route-user-dashboard .group-block,
.route-company-dashboard .group-block {
  border-radius: 22px;
}

.route-owner-payments .table td,
.route-owner-plans .table td,
.route-owner-companies .table td,
.route-companyadmin-users .table td,
.route-companyadmin-roles .table td,
.route-companyadmin-permissions .table td,
.route-companyadmin-masterdata-manage .table td {
  vertical-align: top;
}

.route-owner-payments form,
.route-companyadmin-apiwebhooks form {
  min-width: min(100%, 220px);
}

.route-boards-taskdetails main,
.route-boards-taskdetails .app-shell,
.route-boards-taskdetails .shell-card,
.route-boards-taskdetails .group-block {
  max-width: 100%;
  min-width: 0;
}

.route-boards-taskdetails .shell-card,
.route-boards-taskdetails .table-responsive,
.route-boards-taskdetails .report-table-wrap {
  overflow-x: auto;
}

.route-boards-taskdetails input,
.route-boards-taskdetails select,
.route-boards-taskdetails textarea {
  min-width: 0;
}

body[class*="route-companyadmin-"] .btn,
body[class*="route-owner-"] .btn,
.route-company-dashboard .btn,
.route-user-dashboard .btn {
  border-radius: 999px;
}

[dir="rtl"] .vd-page-header,
[dir="rtl"] .ux-page-header,
[dir="rtl"] .vd-section-title,
[dir="rtl"] .vd-command-bar,
[dir="rtl"] .vd-filter-bar,
[dir="rtl"] .vd-header-actions {
  text-align: right;
}

[dir="rtl"] .vd-header-actions,
[dir="rtl"] .vd-command-bar,
[dir="rtl"] .vd-filter-bar,
[dir="rtl"] .vd-action-group {
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .vd-page-header,
  .ux-page-header,
  .vd-section-title {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vd-header-actions,
  .vd-command-bar,
  .vd-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vd-header-actions .btn,
  .vd-command-bar .btn,
  .vd-filter-bar .btn,
  .vd-action-group .btn {
    width: 100%;
  }

  .vd-table-card table,
  .route-owner-payments table,
  .route-owner-plans table,
  .route-owner-companies table,
  .route-owner-planmatrix table,
  .route-companyadmin-users table,
  .route-companyadmin-roles table,
  .route-companyadmin-permissions table,
  .route-companyadmin-masterdata-manage table,
  .route-companyadmin-apiwebhooks table,
  .route-companyadmin-automationrules table,
  .route-companyadmin-automationruns table,
  .route-companyadmin-approvalschemes table,
  .route-companyadmin-slapolicies table,
  .route-companyadmin-invitations table {
    min-width: 680px;
  }
}

@media (max-width: 430px) {
  .route-boards-taskdetails .row,
  .route-boards-taskdetails .d-flex {
    min-width: 0;
  }

  .route-boards-taskdetails .btn {
    white-space: normal;
  }
}

/* Responsive containment fixes from visual redesign QA */
.vd-page,
.vd-page > *,
.vd-table-card,
.vd-section-card,
.vd-kpi-card,
.ux-kpi-card,
.vd-kpi-grid,
.vd-page-header,
.ux-page-header {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.vd-page-header h1,
.ux-page-header h1,
.vd-section-card,
.vd-section-card *,
.vd-kpi-card,
.ux-kpi-card {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vd-table-card {
  width: 100%;
}

.vd-table-card .ux-mobile-scroll,
.vd-table-card .table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 767.98px) {
  .vd-table-card,
  .vd-page-header,
  .ux-page-header,
  .vd-kpi-grid,
  .vd-section-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .vd-table-card .ux-table,
  .vd-table-card table {
    min-width: 620px;
  }

  .route-boards-taskdetails main.app-shell {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .route-boards-taskdetails .row {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    margin-left: 0;
    margin-right: 0;
  }

  .route-boards-taskdetails [class^="col-"],
  .route-boards-taskdetails [class*=" col-"] {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    flex: 0 0 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .route-boards-taskdetails .shell-card,
  .route-boards-taskdetails .group-block,
  .route-boards-taskdetails .related-items-panel,
  .route-boards-taskdetails #task-related-items {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
  }

  .route-boards-taskdetails .workspace-subnav-tabs,
  .route-boards-taskdetails .workspace-subnav-shell {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    overflow-x: auto;
  }
}

.route-companyadmin-knowledgebase .vd-admin-editor-row {
  margin-left: 0;
  margin-right: 0;
}

.route-companyadmin-knowledgebase .vd-admin-editor-row > [class^="col-"],
.route-companyadmin-knowledgebase .vd-admin-editor-row > [class*=" col-"] {
  padding-left: 0;
  padding-right: 0;
}
