:root {
  --navy: #061b4f;
  --navy-2: #0a2f70;
  --blue: #0d63d8;
  --blue-2: #2f80ed;
  --red: #ed1b3a;
  --gold: #f4b11f;
  --green: #13a66b;
  --purple: #7d4de8;
  --orange: #f28418;
  --ink: #111d3d;
  --muted: #64728f;
  --line: #dde7f4;
  --soft: #f5f8fc;
  --soft-blue: #edf5ff;
  --card: #ffffff;
  --shadow: 0 16px 44px rgba(6, 27, 79, 0.09);
  --shadow-soft: 0 8px 24px rgba(6, 27, 79, 0.07);
  --radius: 8px;
  --sidebar: 268px;
}

/* Reference-old v2 refinements: final overrides after legacy CSS layers. */
body.theme-reference-old .sidebar {
  width: 270px !important;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden !important;
  background: #fff !important;
}

body.theme-reference-old .sidebar-inner {
  height: 100vh;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 24px 18px 18px !important;
}

body.theme-reference-old .sidebar-logo {
  width: 210px !important;
  min-height: 72px !important;
  align-items: flex-start !important;
}

body.theme-reference-old .sidebar-logo img.logo-full {
  width: 208px !important;
  max-height: 76px !important;
  object-fit: contain;
  object-position: left top;
}

body.theme-reference-old .sidebar-top {
  position: relative !important;
  display: block !important;
  margin-bottom: 18px !important;
}

body.theme-reference-old .sidebar-collapse-toggle {
  position: absolute !important;
  top: 54px;
  right: 2px;
  flex: 0 0 34px;
  margin-top: 0;
  z-index: 2;
}

body.theme-reference-old .sidebar-inner::after {
  bottom: 56px !important;
  height: 96px !important;
}

body.theme-reference-old .side-link {
  min-height: 40px !important;
  padding: 0 11px !important;
}

body.theme-reference-old .role-section-label {
  margin-top: 22px !important;
}

body.theme-reference-old .sidebar-role-card {
  margin-top: auto !important;
  margin-bottom: 2px;
  min-height: 64px !important;
  box-shadow: 0 10px 24px rgba(7, 31, 99, 0.08) !important;
}

body.theme-reference-old .role-icon-shell {
  background: #eef3fb !important;
  border-color: #dbe4f2 !important;
  box-shadow: inset 0 0 0 1px #fff !important;
}

body.theme-reference-old .role-icon-shell img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain;
  filter: none !important;
}

body.theme-reference-old .kpi-card {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
}

body.theme-reference-old .app-shell {
  grid-template-columns: 270px minmax(0, 1fr) !important;
}

body.sidebar-collapsed.theme-reference-old .app-shell {
  grid-template-columns: 78px minmax(0, 1fr) !important;
}

body.sidebar-collapsed.theme-reference-old .sidebar {
  width: 78px !important;
}

body.theme-reference-old .kpi-value,
body.theme-reference-old .kpi-label,
body.theme-reference-old .card-head h3,
body.theme-reference-old .portfolio-mini-card h4,
body.theme-reference-old .info-row b,
body.theme-reference-old .data-table td b {
  color: var(--old-ink) !important;
  opacity: 1 !important;
}

body.theme-reference-old .kpi-sub,
body.theme-reference-old .data-table small,
body.theme-reference-old .portfolio-mini-card small,
body.theme-reference-old .info-row small {
  color: #667392 !important;
  opacity: 1 !important;
}

body.theme-reference-old .icon-bubble {
  background: #f0f3f8 !important;
  color: var(--old-navy) !important;
  border: 1px solid #dfe6f0;
}

body.theme-reference-old .icon-bubble.gold {
  background: #fff4d3 !important;
  color: #a66b00 !important;
  border-color: #f4d178;
}

body.theme-reference-old .icon-bubble.red {
  background: #ffe8ed !important;
  color: var(--old-red) !important;
  border-color: #ffc2cd;
}

body.theme-reference-old .icon-bubble.green {
  background: #e8f7ee !important;
  color: #16723a !important;
  border-color: #bfe7ca;
}

body.theme-reference-old .icon-bubble .icon {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2.2;
}

body.theme-reference-old .table-actions {
  min-width: 168px !important;
}

body.theme-reference-old .table-actions .action-cell,
body.theme-reference-old .action-cell {
  justify-content: flex-start !important;
  gap: 7px !important;
}

body.theme-reference-old .table-actions .mini-btn,
body.theme-reference-old .action-cell .mini-btn,
body.theme-reference-old .mini-btn {
  min-height: 34px;
  padding: 0 11px !important;
  border: 1px solid #cbd6e8 !important;
  color: var(--old-navy) !important;
  background: #fff !important;
  box-shadow: 0 4px 10px rgba(7,31,99,0.06);
  text-decoration: none;
}

body.theme-reference-old .table-actions .mini-btn:hover,
body.theme-reference-old .action-cell .mini-btn:hover,
body.theme-reference-old .mini-btn:hover {
  border-color: var(--old-navy) !important;
  background: #f3f6ff !important;
}

body.theme-reference-old .table-actions .mini-btn.fill,
body.theme-reference-old .action-cell .mini-btn.fill,
body.theme-reference-old .mini-btn.fill {
  color: #fff !important;
  background: var(--old-navy) !important;
  border-color: var(--old-navy) !important;
}

body.theme-reference-old .action-cell .mini-btn.success {
  color: #16723a !important;
  background: #e8f7ee !important;
  border-color: #9ed9b0 !important;
}

body.theme-reference-old .action-cell .mini-btn.danger,
body.theme-reference-old .mini-btn.danger {
  color: var(--old-red) !important;
  background: #ffe8ed !important;
  border-color: #ffc2cd !important;
}

body.theme-reference-old .quick-progress-form {
  border-color: #dfe6f0 !important;
  background: #f8faff !important;
}

body.theme-reference-old .quick-progress-form input {
  background: #fff !important;
  border-color: #cbd6e8 !important;
}

body.theme-reference-old .pm-command-page .visual-dashboard-grid {
  grid-template-columns: 1.45fr 0.75fr 0.75fr !important;
  align-items: start !important;
}

body.theme-reference-old .pm-command-page .curve-card.span-2 {
  grid-column: span 1 !important;
}

body.theme-reference-old .pm-command-page .analytic-card {
  min-height: 172px !important;
  padding: 18px !important;
  align-content: start !important;
}

body.theme-reference-old .pm-command-page .curve-line-chart.compact svg {
  height: 136px !important;
}

body.theme-reference-old .pm-command-page .curve-card {
  min-height: 284px !important;
}

body.theme-reference-old .director-analytics-page .reference-old-analytics-row {
  grid-template-columns: 1.05fr 1.55fr 1.05fr 1.45fr !important;
}

body.theme-reference-old .old-gauge-card,
body.theme-reference-old .old-bars-card,
body.theme-reference-old .old-health-card,
body.theme-reference-old .old-phase-card {
  min-height: 198px !important;
}

body.theme-reference-old .profile-menu,
body.theme-reference-old .dropdown[data-dropdown="notifications"] {
  width: 246px !important;
}

@media (max-width: 980px) {
  body.theme-reference-old .sidebar,
  body.sidebar-open.theme-reference-old .sidebar {
    display: none !important;
  }

  body.theme-reference-old .bottom-nav button .icon,
  body.theme-reference-old .bottom-nav a .icon {
    width: 24px !important;
    height: 24px !important;
  }

  body.theme-reference-old .bottom-nav button.quick-plus {
    width: 68px !important;
    height: 68px !important;
  }

  body.theme-reference-old .mobile-menu-fab .icon {
    width: 24px !important;
    height: 24px !important;
  }

  body.theme-reference-old .pm-command-page .visual-dashboard-grid,
  body.theme-reference-old .director-analytics-page .reference-old-analytics-row {
    grid-template-columns: 1fr !important;
  }

  body.theme-reference-old .table-actions,
  body.theme-reference-old .table-actions .action-cell,
  body.theme-reference-old .action-cell {
    min-width: 0 !important;
    width: 100%;
  }

  body.theme-reference-old .table-actions .mini-btn,
  body.theme-reference-old .action-cell .mini-btn,
  body.theme-reference-old .mini-btn {
    justify-content: center;
  }
}

/* Phase 1.5 terminal overrides: keep these at EOF so they win over legacy layers. */
body.theme-reference-old .sidebar,
body.theme-reference-old .sidebar-inner {
  overflow: hidden !important;
}

body.theme-reference-old .sidebar-inner {
  display: flex !important;
  flex-direction: column !important;
}

body.theme-reference-old .side-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible !important;
}

body.theme-reference-old .sidebar-collapse-toggle {
  display: grid !important;
  place-items: center !important;
  align-self: center !important;
}

body.theme-reference-old .sidebar-collapse-toggle .icon {
  color: var(--old-navy) !important;
}

body.theme-reference-old .sidebar-collapse-toggle:hover,
body.theme-reference-old .sidebar-collapse-toggle:focus-visible {
  background: #f5f8fd !important;
  border-color: #c9d6eb !important;
}

body.theme-reference-old .sidebar-collapse-toggle:hover .icon,
body.theme-reference-old .sidebar-collapse-toggle:focus-visible .icon {
  color: var(--old-navy) !important;
}

body.theme-reference-old .projects-command-panel,
body.theme-reference-old .command-shell {
  padding: 22px 24px !important;
  margin-bottom: 22px !important;
  border: 1px solid #dbe5f2 !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 18px 34px rgba(11, 34, 84, 0.08) !important;
}

body.theme-reference-old .projects-command-panel > * + *,
body.theme-reference-old .command-shell > * + * {
  margin-top: 16px !important;
}

body.theme-reference-old .section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

body.theme-reference-old .project-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px !important;
  align-items: center !important;
}

body.theme-reference-old .project-toolbar .search-box {
  min-width: 0;
}

body.theme-reference-old .lane-segmented {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px !important;
  align-items: center;
}

body.theme-reference-old .lane-segmented a {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  border: 1px solid #d8e1ee !important;
  background: #fff !important;
  color: #5b6885 !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 18px rgba(10, 31, 82, 0.04);
}

body.theme-reference-old .lane-segmented a.active {
  color: var(--old-navy) !important;
  background: linear-gradient(180deg, #eef4ff 0%, #dce8ff 100%) !important;
  border-color: #b8caef !important;
  box-shadow: inset 0 -2px 0 rgba(18, 42, 104, 0.12), 0 12px 22px rgba(11, 34, 84, 0.08);
}

body.theme-reference-old .curve-line-chart,
body.theme-reference-old .curve-line-chart.compact {
  min-height: 232px !important;
  padding-top: 8px !important;
}

body.theme-reference-old .curve-line-chart svg,
body.theme-reference-old .curve-line-chart.compact svg {
  width: 100% !important;
  height: 220px !important;
  display: block;
}

body.theme-reference-old .curve-line.planned {
  stroke: #f6a609 !important;
  stroke-width: 4 !important;
  fill: none !important;
}

body.theme-reference-old .curve-line.actual {
  stroke: #d30624 !important;
  stroke-width: 4 !important;
  fill: none !important;
}

body.theme-reference-old .curve-line.certified {
  stroke: #183b8f !important;
  stroke-width: 4 !important;
  fill: none !important;
}

body.theme-reference-old .curve-line.paid {
  stroke: #d30624 !important;
  stroke-width: 4 !important;
  fill: none !important;
}

body.theme-reference-old .curve-dot.planned {
  fill: #f6a609 !important;
}

body.theme-reference-old .curve-dot.actual {
  fill: #d30624 !important;
}

body.theme-reference-old .curve-dot.certified {
  fill: #183b8f !important;
}

body.theme-reference-old .curve-dot.paid {
  fill: #d30624 !important;
}

body.theme-reference-old .curve-dot.planned,
body.theme-reference-old .curve-dot.actual,
body.theme-reference-old .curve-dot.certified,
body.theme-reference-old .curve-dot.paid {
  stroke: #fff !important;
  stroke-width: 2.4 !important;
}

body.theme-reference-old .curve-legend {
  display: flex !important;
  flex-wrap: wrap;
  gap: 14px !important;
  align-items: center;
  padding: 10px 6px 0 !important;
}

body.theme-reference-old .curve-source-note {
  margin-top: 10px !important;
  padding: 0 6px !important;
  color: #6b7894 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body.theme-reference-old .triple-progress {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px !important;
}

body.theme-reference-old .workspace-signal-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px !important;
  margin-bottom: 22px !important;
}

body.theme-reference-old .signal-card {
  display: flex !important;
  flex-direction: column;
  gap: 10px !important;
  min-height: 148px;
  padding: 18px !important;
  border: 1px solid #dbe5f2 !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 16px 32px rgba(11, 34, 84, 0.08) !important;
}

body.theme-reference-old .signal-card small:first-child {
  color: #7180a0 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.theme-reference-old .signal-card strong {
  color: var(--old-navy) !important;
  font-size: 26px !important;
  line-height: 1.1 !important;
}

body.theme-reference-old .signal-card p {
  margin: 0 !important;
  color: #5f6d89 !important;
}

body.theme-reference-old .signal-card .mini-btn {
  align-self: flex-start;
}

body.theme-reference-old .signal-card-wide {
  grid-column: span 2 !important;
}

body.theme-reference-old .signal-activity-list {
  display: grid !important;
  gap: 10px !important;
}

body.theme-reference-old .signal-activity-list .timeline-mini-row {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
  border: 1px solid #e0e8f4 !important;
  text-decoration: none !important;
}

body.theme-reference-old .mini-btn.primary,
body.theme-reference-old .action-cell .mini-btn.primary,
body.theme-reference-old .mini-btn.fill {
  background: #183b8f !important;
  border-color: #183b8f !important;
  color: #fff !important;
}

body.theme-reference-old .mini-btn.neutral,
body.theme-reference-old .action-cell .mini-btn.neutral,
body.theme-reference-old .mini-btn.info,
body.theme-reference-old .action-cell .mini-btn.info {
  background: #fff !important;
  border-color: #c7d3e8 !important;
  color: var(--old-navy) !important;
}

body.theme-reference-old .mini-btn.warning,
body.theme-reference-old .action-cell .mini-btn.warning {
  background: #fff4d3 !important;
  border-color: #f0cc6c !important;
  color: #9a6400 !important;
}

body.theme-reference-old .mini-btn.success,
body.theme-reference-old .action-cell .mini-btn.success {
  background: #e7f8ef !important;
  border-color: #9fdab6 !important;
  color: #16723a !important;
}

body.theme-reference-old .mini-btn.danger-soft,
body.theme-reference-old .action-cell .mini-btn.danger-soft {
  background: #fff3f5 !important;
  border-color: #f3bec8 !important;
  color: #b21733 !important;
}

body.theme-reference-old .mini-btn.danger,
body.theme-reference-old .action-cell .mini-btn.danger {
  background: #d30624 !important;
  border-color: #d30624 !important;
  color: #fff !important;
}

body.theme-reference-old .table-actions,
body.theme-reference-old .action-cell {
  align-items: center !important;
}

body.theme-reference-old .return-popover[open] > summary {
  margin-bottom: 8px;
}

body.theme-reference-old .return-popover[open] form {
  width: 220px;
}

@media (max-width: 1180px) {
  body.theme-reference-old .workspace-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  body.theme-reference-old .projects-command-panel,
  body.theme-reference-old .command-shell {
    padding: 18px !important;
    border-radius: 20px !important;
  }

  body.theme-reference-old .project-toolbar,
  body.theme-reference-old .section-title-row,
  body.theme-reference-old .workspace-signal-grid,
  body.theme-reference-old .triple-progress {
    grid-template-columns: 1fr !important;
  }

  body.theme-reference-old .section-title-row {
    align-items: stretch;
  }

  body.theme-reference-old .signal-card-wide {
    grid-column: span 1 !important;
  }

  body.theme-reference-old .return-popover[open] form {
    width: 100%;
  }
}

body.theme-reference-old .projects-command-panel,
body.theme-reference-old .command-shell,
body.theme-reference-old .signal-card {
  background: rgba(255, 255, 255, 0.9) !important;
}

body.theme-reference-old .projects-command-panel {
  padding: 24px !important;
  margin-bottom: 22px !important;
  border-radius: 24px !important;
}

body.theme-reference-old .project-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
}

body.theme-reference-old .workspace-signal-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}

body.theme-reference-old .signal-card {
  min-height: 162px !important;
  padding: 18px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 22px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05) !important;
}

body.theme-reference-old .signal-card strong {
  font-size: 26px !important;
  line-height: 1.1 !important;
  color: #13285b !important;
}

body.theme-reference-old .signal-card-wide {
  grid-column: span 2 !important;
}

body.theme-reference-old .signal-activity-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

body.theme-reference-old .signal-activity-list .timeline-mini-row {
  padding: 10px 12px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 14px !important;
  background: #fff !important;
}

body.theme-reference-old .lane-segmented {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 0 !important;
}

body.theme-reference-old .lane-segmented a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid #d5deed !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #173b93 !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

body.theme-reference-old .lane-segmented a.active {
  background: #edf4ff !important;
  border-color: #bcd0f5 !important;
  box-shadow: inset 0 0 0 1px #d7e5ff !important;
}

body.theme-reference-old .curve-line-chart svg,
body.theme-reference-old .curve-line-chart.compact svg {
  height: 236px !important;
}

body.theme-reference-old .curve-line.certified {
  fill: none !important;
  stroke: #1d4bb8 !important;
  stroke-width: 4 !important;
}

body.theme-reference-old .curve-line.paid {
  fill: none !important;
  stroke: #d31037 !important;
  stroke-width: 4 !important;
}

body.theme-reference-old .curve-dot.certified {
  fill: #1d4bb8 !important;
  stroke: #fff !important;
  stroke-width: 3 !important;
}

body.theme-reference-old .curve-dot.paid {
  fill: #d31037 !important;
  stroke: #fff !important;
  stroke-width: 3 !important;
}

body.theme-reference-old .curve-legend {
  padding: 0 14px 10px !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
}

body.theme-reference-old .curve-source-note {
  padding: 0 14px 8px !important;
  margin-top: 2px !important;
}

body.theme-reference-old .badge-stack {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body.theme-reference-old .triple-progress {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.theme-reference-old .mini-btn.primary,
body.theme-reference-old .action-cell .mini-btn.primary,
body.theme-reference-old .mini-btn.fill {
  background: #173b93 !important;
  border-color: #173b93 !important;
  color: #fff !important;
}

body.theme-reference-old .mini-btn.info,
body.theme-reference-old .action-cell .mini-btn.info {
  background: #eef5ff !important;
  border-color: #cedcff !important;
  color: #173b93 !important;
}

body.theme-reference-old .mini-btn.warning,
body.theme-reference-old .action-cell .mini-btn.warning {
  background: #fff4d8 !important;
  border-color: #f2d17a !important;
  color: #8f5a00 !important;
}

body.theme-reference-old .mini-btn.success,
body.theme-reference-old .action-cell .mini-btn.success {
  background: #def7ea !important;
  border-color: #a2ddba !important;
  color: #147748 !important;
}

body.theme-reference-old .mini-btn.danger-soft,
body.theme-reference-old .action-cell .mini-btn.danger-soft {
  background: #fff3f6 !important;
  border-color: #f2b9c7 !important;
  color: #bf1738 !important;
}

body.theme-reference-old .mini-btn.danger,
body.theme-reference-old .action-cell .mini-btn.danger {
  background: #ffe9ef !important;
  border-color: #f2b8c6 !important;
  color: #b31635 !important;
}

body.theme-reference-old .sidebar-collapse-toggle:hover {
  background: #eef4ff !important;
}

body.theme-reference-old .sidebar-collapse-toggle:hover .icon {
  color: #193c96 !important;
  stroke: #193c96 !important;
}

@media (max-width: 1024px) {
  body.theme-reference-old .workspace-signal-grid,
  body.theme-reference-old .project-toolbar,
  body.theme-reference-old .triple-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.theme-reference-old .signal-card-wide {
    grid-column: span 2 !important;
  }
}

@media (max-width: 980px) {
  body.theme-reference-old .workspace-signal-grid,
  body.theme-reference-old .triple-progress {
    grid-template-columns: 1fr !important;
  }

  body.theme-reference-old .signal-card-wide {
    grid-column: span 1 !important;
  }

  body.theme-reference-old .project-toolbar {
    grid-template-columns: 1fr !important;
  }
}

/* Phase 1.5 final tail overrides */
.projects-command-panel {
  padding: 24px !important;
  margin-bottom: 22px !important;
  border-radius: 24px !important;
}

.projects-command-panel .section-title-row {
  margin-bottom: 18px !important;
}

.project-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: end !important;
}

.command-shell {
  padding: 24px !important;
}

.curve-line-chart svg,
.curve-line-chart.compact svg,
body.theme-reference-old .pm-command-page .curve-line-chart.compact svg {
  height: 236px !important;
}

.curve-line.certified {
  fill: none !important;
  stroke: #1d4bb8 !important;
  stroke-width: 4 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.curve-line.paid {
  fill: none !important;
  stroke: #d31037 !important;
  stroke-width: 4 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.curve-dot.certified {
  fill: #1d4bb8 !important;
  stroke: #fff !important;
  stroke-width: 3 !important;
}

.curve-dot.paid {
  fill: #d31037 !important;
  stroke: #fff !important;
  stroke-width: 3 !important;
}

.curve-legend {
  padding: 0 14px 10px !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
}

.curve-source-note {
  padding: 0 14px 8px !important;
  margin-top: 2px !important;
}

.badge-stack {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
}

.triple-progress {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.workspace-signal-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}

.signal-card {
  min-height: 162px !important;
  padding: 18px !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.92) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.signal-card strong {
  font-size: 26px !important;
  line-height: 1.1 !important;
}

.signal-card-wide {
  grid-column: span 2 !important;
}

.signal-activity-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.signal-activity-list .timeline-mini-row {
  padding: 10px 12px !important;
  border-radius: 14px !important;
}

.sidebar-collapse-toggle:hover,
body.theme-reference-old .sidebar-collapse-toggle:hover {
  background: #eef4ff !important;
}

.sidebar-collapse-toggle:hover .icon,
body.theme-reference-old .sidebar-collapse-toggle:hover .icon {
  color: #193c96 !important;
  stroke: #193c96 !important;
}

.table-actions {
  min-width: 200px !important;
}

.action-cell,
body.theme-reference-old .action-cell,
body.theme-reference-old .table-actions .action-cell {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  justify-content: flex-start !important;
}

.action-cell .mini-btn,
.table-actions .mini-btn,
.mini-btn {
  min-height: 36px !important;
  padding: 0 13px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  gap: 8px !important;
}

.mini-btn.primary,
.action-cell .mini-btn.primary,
body.theme-reference-old .mini-btn.primary,
body.theme-reference-old .action-cell .mini-btn.primary {
  background: #173b93 !important;
  border-color: #173b93 !important;
  color: #fff !important;
}

.mini-btn.info,
.action-cell .mini-btn.info,
body.theme-reference-old .mini-btn.info,
body.theme-reference-old .action-cell .mini-btn.info {
  background: #eef5ff !important;
  border-color: #cedcff !important;
  color: #173b93 !important;
}

.mini-btn.warning,
.action-cell .mini-btn.warning,
body.theme-reference-old .mini-btn.warning,
body.theme-reference-old .action-cell .mini-btn.warning {
  background: #fff4d8 !important;
  border-color: #f2d17a !important;
  color: #8f5a00 !important;
}

.mini-btn.neutral,
.action-cell .mini-btn.neutral {
  background: #fff !important;
  border-color: #d4ddeb !important;
  color: #19326c !important;
}

.mini-btn.success,
.action-cell .mini-btn.success,
body.theme-reference-old .mini-btn.success,
body.theme-reference-old .action-cell .mini-btn.success {
  background: #def7ea !important;
  border-color: #a2ddba !important;
  color: #147748 !important;
}

.mini-btn.danger-soft,
.action-cell .mini-btn.danger-soft,
body.theme-reference-old .mini-btn.danger-soft,
body.theme-reference-old .action-cell .mini-btn.danger-soft {
  background: #fff3f6 !important;
  border-color: #f2b9c7 !important;
  color: #bf1738 !important;
}

.mini-btn.danger,
.action-cell .mini-btn.danger,
body.theme-reference-old .mini-btn.danger,
body.theme-reference-old .action-cell .mini-btn.danger {
  background: #ffe9ef !important;
  border-color: #f2b8c6 !important;
  color: #b31635 !important;
}

.mini-btn.fill,
body.theme-reference-old .mini-btn.fill,
body.theme-reference-old .table-actions .mini-btn.fill,
body.theme-reference-old .action-cell .mini-btn.fill {
  background: #173b93 !important;
  border-color: #173b93 !important;
  color: #fff !important;
}

.quick-progress-form {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.quick-progress-form input {
  width: 58px !important;
  min-width: 58px !important;
}

body.theme-reference-old .projects-command-panel,
body.theme-reference-old .signal-card,
body.theme-reference-old .command-shell {
  background: rgba(255,255,255,.9) !important;
}

@media (max-width: 1024px) {
  .workspace-signal-grid,
  .project-toolbar,
  .triple-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .signal-card-wide {
    grid-column: span 2 !important;
  }
}

@media (max-width: 980px) {
  .projects-command-panel,
  .command-shell {
    padding: 18px !important;
  }

  .workspace-signal-grid,
  .triple-progress {
    grid-template-columns: 1fr !important;
  }

  .signal-card-wide {
    grid-column: span 1 !important;
  }

  .project-toolbar {
    grid-template-columns: 1fr !important;
  }

  .table-actions,
  .action-cell {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* Phase 1.5 final operation-flow hardening overrides */
.command-shell {
  padding: 24px;
  gap: 18px;
}

.projects-command-panel {
  padding: 24px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.06);
}

.projects-command-panel .section-title-row {
  margin-bottom: 18px;
}

.project-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.project-toolbar .search-box {
  min-height: 48px;
}

.badge-stack {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.triple-progress {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.curve-card .card-head {
  gap: 12px;
  align-items: flex-start;
}

.curve-card .curve-line-chart {
  padding: 16px 10px 8px;
}

.curve-line-chart svg,
.curve-line-chart.compact svg {
  width: 100%;
  height: 236px;
}

.curve-line.certified {
  fill: none;
  stroke: #1f4bb4;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.curve-line.paid {
  fill: none;
  stroke: #d10f33;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.curve-dot.certified {
  fill: #1f4bb4;
  stroke: #fff;
  stroke-width: 3;
}

.curve-dot.paid {
  fill: #d10f33;
  stroke: #fff;
  stroke-width: 3;
}

.curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  padding: 0 14px 10px;
}

.curve-source-note {
  margin: 2px 0 0;
  padding: 0 14px 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dot.blue {
  background: #1f4bb4;
}

.workspace-signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.signal-card {
  min-height: 162px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signal-card small:first-child {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  text-transform: uppercase;
}

.signal-card strong {
  font-size: 26px;
  line-height: 1.1;
  color: var(--old-navy, #13285b);
}

.signal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.signal-card .mini-btn {
  margin-top: auto;
  align-self: flex-start;
}

.signal-card-wide {
  grid-column: span 2;
}

.signal-activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signal-activity-list .timeline-mini-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.site-task-lanes {
  margin: 16px 0;
}

.baseline-lite-card {
  gap: 12px;
}

.baseline-mini-form {
  gap: 10px;
}

.baseline-mini-form .btn {
  margin-top: 4px;
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.action-cell.compact-actions {
  justify-content: flex-start;
}

.action-cell form {
  margin: 0;
}

.action-cell .mini-btn,
.table-actions .mini-btn,
.mini-btn {
  min-height: 36px;
  border-radius: 12px;
  padding: 0 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d4ddeb;
  background: #fff;
  color: #19326c;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  text-decoration: none;
}

.action-cell .mini-btn .icon,
.table-actions .mini-btn .icon,
.mini-btn .icon {
  width: 16px;
  height: 16px;
}

.action-cell .mini-btn:hover,
.table-actions .mini-btn:hover,
.mini-btn:hover {
  transform: translateY(-1px);
  border-color: #b8c7e0;
  background: #f8fbff;
}

.mini-btn.primary,
.action-cell .mini-btn.primary {
  background: #193c96;
  border-color: #193c96;
  color: #fff;
}

.mini-btn.info,
.action-cell .mini-btn.info {
  background: #eef4ff;
  border-color: #c7d8ff;
  color: #193c96;
}

.mini-btn.warning,
.action-cell .mini-btn.warning {
  background: #fff3cf;
  border-color: #f3d16d;
  color: #8f5b00;
}

.mini-btn.neutral,
.action-cell .mini-btn.neutral {
  background: #fff;
  border-color: #d4ddeb;
  color: #19326c;
}

.mini-btn.success,
.action-cell .mini-btn.success {
  background: #def7ea;
  border-color: #9fdcbb;
  color: #137346;
}

.mini-btn.danger-soft,
.action-cell .mini-btn.danger-soft {
  background: #fff3f5;
  border-color: #f3b7c4;
  color: #c01738;
}

.mini-btn.danger,
.action-cell .mini-btn.danger {
  background: #ffe9ef;
  border-color: #f2b8c6;
  color: #b31635;
}

.mini-btn.fill {
  background: #193c96;
  border-color: #193c96;
  color: #fff;
}

.quick-progress-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  background: #f8fbff;
}

.quick-progress-form input {
  width: 58px;
  min-width: 58px;
  border-radius: 10px;
  border: 1px solid #d4ddeb;
  padding: 0 10px;
  height: 34px;
  background: #fff;
}

.return-popover[open] form {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #f1c2cd;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.return-popover textarea {
  min-width: 220px;
  border-radius: 12px;
}

.table-actions {
  min-width: 200px;
}

.workspace-page .project-hero {
  align-items: center;
}

.workspace-page .project-hero > .btn,
.workspace-page .project-hero > .mini-btn {
  align-self: center;
}

.claim-form .form-two,
.claim-form .form-three {
  gap: 16px;
  margin-bottom: 14px;
}

.claim-form .diary-section {
  margin-top: 8px;
}

.claim-detail-page .detail-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-diaries-page .card-head {
  margin-bottom: 12px;
}

.finance-dashboard-page .finance-grid > .card,
.finance-dashboard-page .finance-side .card {
  padding: 20px;
}

.finance-dashboard-page .card-head + .data-table-wrap {
  margin-top: 10px;
}

.pm-command-page .pm-curve-grid,
.director-analytics-page .visual-dashboard-grid {
  align-items: stretch;
}

.pm-command-page .pm-scurve-card,
.director-analytics-page .curve-card {
  min-height: 100%;
}

.pm-command-page .curve-card .dual-progress,
.director-analytics-page .curve-card .dual-progress {
  margin-bottom: 12px;
}

.sidebar-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-collapse-toggle:hover {
  background: #eef4ff;
}

.sidebar-collapse-toggle:hover .icon {
  color: #193c96 !important;
  stroke: #193c96 !important;
}

body.theme-reference-old .sidebar-collapse-toggle {
  align-self: center !important;
}

body.theme-reference-old .sidebar-collapse-toggle:hover {
  background: #eef4ff !important;
}

body.theme-reference-old .sidebar-collapse-toggle:hover .icon {
  color: #193c96 !important;
  stroke: #193c96 !important;
}

body.theme-reference-old .action-cell .mini-btn.primary,
body.theme-reference-old .mini-btn.primary,
body.theme-reference-old .mini-btn.fill {
  background: #173b93 !important;
  border-color: #173b93 !important;
  color: #fff !important;
}

body.theme-reference-old .action-cell .mini-btn.info,
body.theme-reference-old .mini-btn.info {
  background: #eff5ff !important;
  border-color: #cddcff !important;
  color: #173b93 !important;
}

body.theme-reference-old .action-cell .mini-btn.warning,
body.theme-reference-old .mini-btn.warning {
  background: #fff4d8 !important;
  border-color: #f3d283 !important;
  color: #915c00 !important;
}

body.theme-reference-old .action-cell .mini-btn.success,
body.theme-reference-old .mini-btn.success {
  background: #dff7ea !important;
  border-color: #a8dfbe !important;
  color: #147748 !important;
}

body.theme-reference-old .action-cell .mini-btn.danger-soft,
body.theme-reference-old .mini-btn.danger-soft {
  background: #fff3f6 !important;
  border-color: #f2b9c7 !important;
  color: #bd1738 !important;
}

body.theme-reference-old .projects-command-panel,
body.theme-reference-old .signal-card,
body.theme-reference-old .command-shell {
  background: rgba(255, 255, 255, 0.9) !important;
}

body.theme-reference-old .curve-source-note {
  color: #64748b;
}

body.theme-reference-old .curve-line.certified {
  stroke: #1d4bb8 !important;
}

body.theme-reference-old .curve-line.paid {
  stroke: #d31037 !important;
}

body.theme-reference-old .curve-dot.certified {
  fill: #1d4bb8 !important;
}

body.theme-reference-old .curve-dot.paid {
  fill: #d31037 !important;
}

@media (max-width: 1280px) {
  .workspace-signal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .signal-card-wide {
    grid-column: span 3;
  }
}

@media (max-width: 1024px) {
  .project-toolbar,
  .triple-progress,
  .workspace-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-card-wide {
    grid-column: span 2;
  }

  .claim-detail-page .detail-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .command-shell,
  .projects-command-panel {
    padding: 18px;
  }

  .project-toolbar {
    grid-template-columns: 1fr;
  }

  .workspace-signal-grid,
  .triple-progress {
    grid-template-columns: 1fr;
  }

  .signal-card-wide {
    grid-column: span 1;
  }

  .curve-line-chart svg,
  .curve-line-chart.compact svg {
    height: 210px;
  }

  .site-diaries-page .table-actions,
  .claims-page .table-actions,
  .review-page .table-actions,
  .site-tasks-page .table-actions {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .claim-detail-page .detail-grid.compact {
    grid-template-columns: 1fr;
  }

  .site-task-lanes,
  .lane-segmented {
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

/* Final auth polish: preloader removed from markup; keep auth links premium and compact. */
.auth-view .auth-card {
  overflow: visible;
}

.auth-view .form-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.auth-view .link-button {
  min-height: 42px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px !important;
  border: 1px solid rgba(246, 166, 9, 0.42) !important;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #fff9ec) !important;
  color: #07184a !important;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(7, 24, 74, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.auth-view .link-button:hover,
.auth-view .link-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(217, 4, 41, 0.35) !important;
  background: #fff !important;
  box-shadow: 0 14px 28px rgba(217, 4, 41, 0.12);
}

.auth-view .auth-card > .link-button {
  width: 100%;
  margin-top: 18px;
}

.auth-view .auth-input-wrap input {
  border: 0 !important;
  box-shadow: none !important;
}

.auth-view .auth-input-wrap:focus-within {
  border-color: #d90429;
  box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.12);
}

.auth-view .demo-login-grid button {
  min-height: 48px;
  border-radius: 10px;
}

@media (max-width: 540px) {
  .auth-view .form-links {
    grid-template-columns: 1fr;
  }

  .auth-view .link-button {
    min-height: 40px;
  }
}

/* Reference-old v3 placement + compact mobile grids. Keep this as the final override layer. */
body.theme-reference-old .app-shell {
  grid-template-columns: 270px minmax(0, 1fr) !important;
}

body.sidebar-collapsed.theme-reference-old .app-shell {
  grid-template-columns: 78px minmax(0, 1fr) !important;
}

body.theme-reference-old .sidebar {
  width: 270px !important;
  height: 100vh !important;
  overflow: hidden !important;
}

body.sidebar-collapsed.theme-reference-old .sidebar {
  width: 78px !important;
}

body.theme-reference-old .sidebar-inner {
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 22px 18px 18px !important;
}

body.theme-reference-old .sidebar-top {
  position: relative !important;
  display: block !important;
  min-height: 78px !important;
  margin-bottom: 12px !important;
}

body.theme-reference-old .sidebar-logo {
  width: 196px !important;
  min-height: 64px !important;
}

body.theme-reference-old .sidebar-logo img.logo-full {
  width: 196px !important;
  max-height: 66px !important;
  object-position: left top;
}

body.theme-reference-old .sidebar-collapse-toggle {
  position: absolute !important;
  top: 54px !important;
  right: 4px !important;
  width: 34px !important;
  height: 34px !important;
  z-index: 3;
}

body.theme-reference-old .sidebar-section-label {
  margin: 10px 8px 9px !important;
}

body.theme-reference-old .role-section-label {
  margin-top: 28px !important;
}

body.theme-reference-old .sidebar-role-card {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.theme-reference-old .sidebar-inner::after {
  bottom: 12px !important;
  height: 86px !important;
  z-index: 0;
}

body.theme-reference-old .side-nav,
body.theme-reference-old .sidebar-role-card,
body.theme-reference-old .sidebar-section-label,
body.theme-reference-old .sidebar-top {
  position: relative;
  z-index: 1;
}

body.theme-reference-old .pm-command-page .visual-dashboard-grid {
  grid-template-columns: 1.5fr 0.72fr 0.72fr !important;
  align-items: start !important;
}

body.theme-reference-old .pm-command-page .curve-card {
  min-height: 286px !important;
}

body.theme-reference-old .pm-command-page .analytic-card {
  min-height: 174px !important;
  align-content: start !important;
}

body.theme-reference-old .pm-command-page .curve-line-chart.compact svg {
  height: 136px !important;
}

@media (max-width: 980px) {
  body.theme-reference-old .app-shell,
  body.sidebar-collapsed.theme-reference-old .app-shell {
    display: block !important;
  }

  body.theme-reference-old .sidebar,
  body.sidebar-open.theme-reference-old .sidebar {
    display: none !important;
  }

  body.theme-reference-old .kpi-grid,
  body.theme-reference-old .kpi-grid.six,
  body.theme-reference-old .kpi-grid.five,
  body.theme-reference-old .mobile-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.theme-reference-old .site-mobile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.theme-reference-old .site-mobile-grid .site-photo-card {
    grid-column: span 2;
  }

  body.theme-reference-old .portfolio-card-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
  }

  body.theme-reference-old .pm-command-page .visual-dashboard-grid,
  body.theme-reference-old .director-analytics-page .reference-old-analytics-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 430px) {
  body.theme-reference-old .main-content {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body.theme-reference-old .kpi-card,
  body.theme-reference-old .mobile-stat {
    min-height: 82px !important;
    padding: 10px !important;
  }

  body.theme-reference-old .kpi-card {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }

  body.theme-reference-old .icon-bubble,
  body.theme-reference-old .mobile-stat .icon-bubble {
    width: 40px !important;
    height: 40px !important;
  }

  body.theme-reference-old .site-mobile-grid .card-pad {
    padding: 12px !important;
  }
}

@media (max-width: 360px) {
  body.theme-reference-old .kpi-grid,
  body.theme-reference-old .kpi-grid.six,
  body.theme-reference-old .kpi-grid.five,
  body.theme-reference-old .site-mobile-grid,
  body.theme-reference-old .mobile-mini-grid,
  body.theme-reference-old .portfolio-card-grid {
    grid-template-columns: 1fr !important;
  }

  body.theme-reference-old .site-mobile-grid .site-photo-card {
    grid-column: auto;
  }
}

/* Dual theme: faithful design_reference_old mode. Scoped so current UI can remain available. */
.theme-reference-old {
  --old-navy: #071f63;
  --old-blue: #2563d9;
  --old-red: #d90429;
  --old-gold: #f7b51e;
  --old-green: #34a853;
  --old-ink: #06164a;
  --old-muted: #667392;
  --old-line: #e7ebf3;
  --old-soft: #f7f9fd;
  --old-shadow: 0 10px 28px rgba(7, 31, 99, 0.06);
  background: #fbfcff;
  color: var(--old-ink);
}

.theme-reference-old .app-shell {
  grid-template-columns: 238px minmax(0, 1fr);
  background: #fbfcff;
}

.theme-reference-old .shell-main {
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  min-width: 0;
}

.theme-reference-old .main-content {
  position: relative;
  padding: 18px 24px 30px;
  background: transparent;
  overflow: hidden;
}

.theme-reference-old .main-content::after {
  content: "";
  position: fixed;
  right: -54px;
  bottom: -42px;
  width: 430px;
  height: 138px;
  pointer-events: none;
  opacity: 0.92;
  background:
    linear-gradient(158deg, transparent 0 46%, rgba(7,31,99,0.16) 47% 51%, transparent 52%),
    linear-gradient(168deg, transparent 0 51%, rgba(217,4,41,0.92) 52% 61%, transparent 62%),
    linear-gradient(174deg, transparent 0 60%, rgba(7,31,99,0.9) 61% 68%, transparent 69%);
  z-index: 0;
}

.theme-reference-old .page-section {
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.theme-reference-old .sidebar {
  width: 238px;
  background: #fff !important;
  border-right: 1px solid var(--old-line);
  box-shadow: 6px 0 24px rgba(7, 31, 99, 0.04);
}

.theme-reference-old .sidebar::before,
.theme-reference-old .sidebar::after {
  display: none !important;
}

.theme-reference-old .sidebar-inner {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 22px 16px 24px;
  overflow: hidden;
  background: transparent;
}

.theme-reference-old .sidebar-inner::after {
  content: "";
  position: absolute;
  left: -22px;
  right: -20px;
  bottom: 86px;
  height: 122px;
  pointer-events: none;
  background:
    linear-gradient(156deg, transparent 0 46%, rgba(217, 4, 41, 0.94) 47% 55%, transparent 56%),
    linear-gradient(168deg, transparent 0 54%, rgba(7, 31, 99, 0.92) 55% 64%, transparent 65%),
    linear-gradient(178deg, transparent 0 68%, rgba(247, 181, 30, 0.8) 69% 72%, transparent 73%);
}

.theme-reference-old .sidebar-top {
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
}

.theme-reference-old .sidebar-logo {
  width: 178px;
  min-height: 58px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.theme-reference-old .sidebar-logo img.logo-full {
  display: block;
  width: 176px;
  max-height: 62px;
  object-fit: contain;
}

.theme-reference-old .sidebar-logo .logo-mark {
  display: none;
}

.theme-reference-old .sidebar-collapse-toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--old-navy);
  border: 1px solid var(--old-line);
  background: #fff;
  box-shadow: 0 8px 18px rgba(7,31,99,0.08);
}

.theme-reference-old .sidebar-section-label {
  margin: 16px 8px 10px;
  color: #7f8ba7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.theme-reference-old .side-nav {
  gap: 7px;
}

.theme-reference-old .side-link {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #243150;
  background: transparent;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.theme-reference-old .side-link .icon {
  width: 18px;
  height: 18px;
  color: #43506f;
}

.theme-reference-old .side-link:hover {
  background: #f3f6fd;
  color: var(--old-navy);
}

.theme-reference-old .side-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--old-navy), #0e3895);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(7, 31, 99, 0.18);
}

.theme-reference-old .side-link.active .icon {
  color: #fff;
}

.theme-reference-old .nav-badge {
  background: var(--old-red);
  color: #fff;
}

.theme-reference-old .sidebar-role-card {
  position: relative;
  z-index: 1;
  margin-top: auto;
  min-height: 64px;
  padding: 10px 12px;
  color: var(--old-ink);
  background: #fff;
  border: 1px solid var(--old-line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(7,31,99,0.08);
}

.theme-reference-old .sidebar-role-card b {
  color: var(--old-navy);
  font-size: 13px;
}

.theme-reference-old .sidebar-role-card small {
  color: var(--old-muted);
  font-size: 12px;
}

.theme-reference-old .role-icon-shell {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--old-navy);
  border: 3px solid #eef3ff;
  box-shadow: none;
}

.theme-reference-old .topbar {
  min-height: 76px;
  padding: 16px 24px;
  color: var(--old-ink);
  background: #fff;
  border-bottom: 1px solid var(--old-line);
  box-shadow: 0 8px 22px rgba(7,31,99,0.04);
}

.theme-reference-old .topbar .page-heading h1 {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--old-ink);
}

.theme-reference-old .topbar .breadcrumb,
.theme-reference-old .topbar .breadcrumb small {
  color: var(--old-muted);
  font-size: 12px;
}

.theme-reference-old .topbar .breadcrumb span:first-child {
  color: var(--old-navy);
  font-weight: 800;
}

.theme-reference-old .auth-lang,
.theme-reference-old .topbar .auth-lang {
  height: 40px;
  padding: 4px;
  border-radius: 10px;
  border-color: var(--old-line);
  background: #fff;
  box-shadow: none;
}

.theme-reference-old .auth-lang button {
  min-width: 42px;
  height: 30px;
  color: var(--old-muted);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.theme-reference-old .auth-lang button.active {
  color: #fff;
  background: var(--old-navy);
}

.theme-reference-old .lang-icon {
  color: var(--old-navy);
  background: #fff7de;
  border-color: #f8d77f;
}

.theme-reference-old .icon-button,
.theme-reference-old .profile-button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--old-navy);
  background: #fff;
  border: 1px solid var(--old-line);
  box-shadow: none;
}

.theme-reference-old .profile-button .avatar {
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--old-navy);
}

.theme-reference-old .profile-menu,
.theme-reference-old .dropdown[data-dropdown="notifications"] {
  width: 260px;
  right: 24px;
  top: 64px;
  border-radius: 14px;
  border: 1px solid var(--old-line);
  background: #fff;
  box-shadow: 0 18px 42px rgba(7,31,99,0.14);
  overflow: hidden;
}

.theme-reference-old .profile-menu .dropdown-list {
  padding: 6px;
}

.theme-reference-old .profile-menu .dropdown-item,
.theme-reference-old .dropdown-item {
  min-height: 46px;
  padding: 10px;
  border-radius: 10px;
  color: var(--old-ink);
}

.theme-reference-old .profile-menu .dropdown-item .icon,
.theme-reference-old .dropdown-item .icon {
  color: var(--old-navy);
  width: 18px;
  height: 18px;
}

.theme-reference-old .profile-menu .dropdown-item small,
.theme-reference-old .dropdown-item small {
  color: var(--old-muted);
}

.theme-reference-old .profile-menu .dropdown-item:hover,
.theme-reference-old .dropdown-item:hover {
  background: #f5f8ff;
}

.theme-reference-old .dashboard-hero {
  display: none;
}

.theme-reference-old .section-title-row {
  margin: 0 0 14px;
  align-items: center;
}

.theme-reference-old .section-title-row h2 {
  font-size: 20px;
  color: var(--old-ink);
}

.theme-reference-old .section-title-row p {
  color: var(--old-muted);
  font-size: 12px;
}

.theme-reference-old .kpi-grid,
.theme-reference-old .kpi-grid.six,
.theme-reference-old .kpi-grid.five {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.theme-reference-old .kpi-card {
  min-height: 96px;
  padding: 16px 14px;
  border-radius: 8px;
  border: 1px solid var(--old-line);
  background: #fff;
  box-shadow: var(--old-shadow);
  gap: 12px;
}

.theme-reference-old .icon-bubble {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #fff;
  box-shadow: none;
}

.theme-reference-old .icon-bubble.blue,
.theme-reference-old .icon-bubble.purple {
  background: var(--old-navy);
}

.theme-reference-old .icon-bubble.gold {
  background: var(--old-gold);
}

.theme-reference-old .icon-bubble.red {
  background: var(--old-red);
}

.theme-reference-old .icon-bubble.green {
  background: var(--old-green);
}

.theme-reference-old .kpi-value {
  font-size: 26px;
  line-height: 1;
  color: var(--old-ink);
}

.theme-reference-old .kpi-label {
  margin-top: 4px;
  color: var(--old-ink);
  font-size: 12px;
  font-weight: 800;
}

.theme-reference-old .kpi-sub {
  margin-top: 4px;
  color: var(--old-muted);
  font-size: 11px;
}

.theme-reference-old .card,
.theme-reference-old .curve-card,
.theme-reference-old .analytic-card,
.theme-reference-old .project-card,
.theme-reference-old .project-table-card,
.theme-reference-old .portfolio-mini-card,
.theme-reference-old .site-pulse-card,
.theme-reference-old .site-photo-card,
.theme-reference-old .issue-card,
.theme-reference-old .document-card,
.theme-reference-old .staff-card {
  border-radius: 8px;
  border: 1px solid var(--old-line);
  background: #fff;
  box-shadow: var(--old-shadow);
}

.theme-reference-old .card-pad {
  padding: 16px;
}

.theme-reference-old .card-head {
  margin-bottom: 12px;
}

.theme-reference-old .card-head h3 {
  color: var(--old-ink);
  font-size: 14px;
}

.theme-reference-old .visual-dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.theme-reference-old .reference-old-analytics-row {
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 1.2fr 1.6fr;
  gap: 14px;
  margin-bottom: 14px;
}

.theme-reference-old .old-gauge-card,
.theme-reference-old .old-bars-card,
.theme-reference-old .old-health-card,
.theme-reference-old .old-phase-card {
  min-height: 214px;
  padding: 16px;
  border: 1px solid var(--old-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--old-shadow);
}

.theme-reference-old .old-gauge {
  width: 172px;
  height: 94px;
  margin: 20px auto 12px;
  display: grid;
  place-items: end center;
  padding-bottom: 9px;
  color: var(--old-navy);
  background:
    radial-gradient(circle at 50% 100%, #fff 0 44%, transparent 45%),
    conic-gradient(from 270deg at 50% 100%, var(--old-navy) 0 calc(var(--value) * 1.8deg), #e8edf6 0 180deg, transparent 0);
  border-radius: 172px 172px 0 0;
}

.theme-reference-old .old-gauge span,
.theme-reference-old .old-health-donut span {
  display: block;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.theme-reference-old .old-gauge small,
.theme-reference-old .old-health-donut small {
  display: block;
  margin-top: 4px;
  color: var(--old-muted);
  font-size: 11px;
  font-weight: 700;
}

.theme-reference-old .old-health-donut {
  width: 128px;
  height: 128px;
  margin: 8px auto 12px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--old-navy);
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 0 54%, transparent 55%),
    conic-gradient(var(--old-green) 0 calc(var(--score) * 1%), #d90429 calc(var(--score) * 1%) 100%);
}

.theme-reference-old .old-mini-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--old-muted);
  font-size: 11px;
  font-weight: 700;
}

.theme-reference-old .old-bar-list,
.theme-reference-old .old-phase-list {
  display: grid;
  gap: 10px;
}

.theme-reference-old .old-bar-row {
  display: grid;
  grid-template-columns: 90px 42px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--old-muted);
  font-size: 11px;
}

.theme-reference-old .old-bar-row span,
.theme-reference-old .old-phase-row span {
  color: var(--old-ink);
  font-weight: 800;
}

.theme-reference-old .old-bar-row b,
.theme-reference-old .old-phase-row b {
  color: var(--old-navy);
  font-size: 11px;
}

.theme-reference-old .old-phase-row {
  display: grid;
  grid-template-columns: 126px 1fr 42px;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}

.theme-reference-old .mini-meter {
  height: 8px;
  border-radius: 999px;
  background: #e9edf5;
}

.theme-reference-old .mini-meter i {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--old-navy), var(--old-blue));
}

.theme-reference-old .mini-meter.red-meter i {
  background: linear-gradient(90deg, var(--old-gold), var(--old-red));
}

.theme-reference-old .visual-dashboard-grid .span-2,
.theme-reference-old .director-analytics-page .visual-dashboard-grid .curve-card.span-2,
.theme-reference-old .pm-command-page .visual-dashboard-grid .curve-card.span-2 {
  grid-column: span 2;
}

.theme-reference-old .curve-card {
  min-height: 250px;
  padding: 16px;
}

.theme-reference-old .curve-line-chart {
  height: 190px;
}

.theme-reference-old .curve-line-chart svg,
.theme-reference-old .curve-line-chart.compact svg {
  height: 190px;
}

.theme-reference-old .curve-grid {
  stroke: #e8edf6;
  stroke-width: 1.3;
  stroke-dasharray: 4 8;
}

.theme-reference-old .curve-axis-line {
  stroke: #d8deea;
  stroke-width: 1.5;
}

.theme-reference-old .curve-line.planned {
  stroke: var(--old-navy);
  stroke-width: 3;
}

.theme-reference-old .curve-line.actual {
  stroke: var(--old-red);
  stroke-width: 3;
}

.theme-reference-old .curve-area.planned {
  fill: rgba(37, 99, 217, 0.08);
}

.theme-reference-old .curve-area.actual {
  fill: rgba(217, 4, 41, 0.08);
}

.theme-reference-old .curve-dot.planned {
  fill: var(--old-navy);
  stroke: #fff;
  stroke-width: 2.5;
}

.theme-reference-old .curve-dot.actual {
  fill: var(--old-red);
  stroke: #fff;
  stroke-width: 2.5;
}

.theme-reference-old .badge.gold,
.theme-reference-old .status-badge.pending_review,
.theme-reference-old .status-badge.at_risk {
  color: #9b6500;
  background: #fff3cf;
}

.theme-reference-old .badge.red,
.theme-reference-old .status-badge.high,
.theme-reference-old .status-badge.critical,
.theme-reference-old .status-badge.returned,
.theme-reference-old .status-badge.delayed {
  color: #b00020;
  background: #ffe8ec;
}

.theme-reference-old .status-badge.approved,
.theme-reference-old .status-badge.completed,
.theme-reference-old .status-badge.on_track {
  color: #16723a;
  background: #e8f7ee;
}

.theme-reference-old .data-table-wrap {
  border-radius: 8px;
  border: 1px solid var(--old-line);
  overflow: auto;
}

.theme-reference-old .data-table th {
  height: 42px;
  padding: 10px 12px;
  color: var(--old-ink);
  font-size: 11px;
  background: #f8faff;
}

.theme-reference-old .data-table td {
  padding: 11px 12px;
  color: #243150;
  border-top: 1px solid var(--old-line);
  font-size: 12px;
}

.theme-reference-old .action-cell {
  gap: 6px;
  justify-content: flex-end;
}

.theme-reference-old .mini-btn,
.theme-reference-old .btn {
  border-radius: 8px;
  font-weight: 800;
}

.theme-reference-old .btn-primary,
.theme-reference-old .mini-btn.fill {
  background: var(--old-navy);
  border-color: var(--old-navy);
}

.theme-reference-old .btn-danger,
.theme-reference-old .mini-btn.danger {
  background: var(--old-red);
  border-color: var(--old-red);
}

.theme-reference-old .btn-outline,
.theme-reference-old .mini-btn {
  color: var(--old-navy);
  border-color: var(--old-line);
  background: #fff;
}

.theme-reference-old .project-card-thumb {
  height: 132px;
  border-radius: 8px 8px 0 0;
}

.theme-reference-old .project-card {
  overflow: hidden;
}

.theme-reference-old .project-card-body {
  padding: 14px;
}

body.sidebar-collapsed.theme-reference-old .app-shell {
  grid-template-columns: 78px minmax(0, 1fr);
}

body.sidebar-collapsed.theme-reference-old .sidebar {
  width: 78px;
}

body.sidebar-collapsed.theme-reference-old .sidebar-inner {
  padding: 20px 10px;
}

body.sidebar-collapsed.theme-reference-old .sidebar-logo {
  width: 48px;
  min-height: 48px;
}

body.sidebar-collapsed.theme-reference-old .sidebar-logo .logo-full {
  display: none;
}

body.sidebar-collapsed.theme-reference-old .sidebar-logo .logo-mark {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

body.sidebar-collapsed.theme-reference-old .sidebar-role-card {
  justify-content: center;
  padding: 8px;
}

@media (max-width: 1280px) {
  .theme-reference-old .kpi-grid,
  .theme-reference-old .kpi-grid.six,
  .theme-reference-old .kpi-grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .theme-reference-old .app-shell,
  body.sidebar-collapsed.theme-reference-old .app-shell {
    display: block;
  }

  .theme-reference-old .sidebar,
  body.sidebar-open.theme-reference-old .sidebar {
    display: none;
  }

  .theme-reference-old .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 70px;
    padding: 12px 14px;
  }

  .theme-reference-old .topbar .page-heading h1 {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
  }

  .theme-reference-old .top-actions {
    gap: 8px;
  }

  .theme-reference-old .auth-lang {
    display: none;
  }

  .theme-reference-old .profile-menu,
  .theme-reference-old .dropdown[data-dropdown="notifications"] {
    right: 12px;
    top: 62px;
    width: min(284px, calc(100vw - 24px));
  }

  .theme-reference-old .main-content {
    padding: 14px 14px 104px;
  }

  .theme-reference-old .kpi-grid,
  .theme-reference-old .kpi-grid.six,
  .theme-reference-old .kpi-grid.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .theme-reference-old .kpi-card {
    min-height: 86px;
    padding: 12px;
  }

  .theme-reference-old .icon-bubble {
    width: 42px;
    height: 42px;
  }

  .theme-reference-old .kpi-value {
    font-size: 22px;
  }

  .theme-reference-old .visual-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .theme-reference-old .reference-old-analytics-row {
    grid-template-columns: 1fr;
  }

  .theme-reference-old .visual-dashboard-grid .span-2,
  .theme-reference-old .director-analytics-page .visual-dashboard-grid .curve-card.span-2,
  .theme-reference-old .pm-command-page .visual-dashboard-grid .curve-card.span-2 {
    grid-column: auto;
  }

  .theme-reference-old .bottom-nav {
    left: 14px;
    right: 14px;
    bottom: 12px;
    height: 74px;
    padding: 8px 14px;
    border: 1px solid var(--old-line);
    border-radius: 28px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 18px 42px rgba(7,31,99,0.16);
    backdrop-filter: blur(14px);
  }

  .theme-reference-old .bottom-nav a,
  .theme-reference-old .bottom-nav > button {
    min-width: 54px;
  }

  .theme-reference-old .bottom-nav button {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #6f7892;
    transition: transform 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  }

  .theme-reference-old .bottom-nav button .icon,
  .theme-reference-old .bottom-nav a .icon {
    width: 23px;
    height: 23px;
  }

  .theme-reference-old .bottom-nav button span {
    display: none;
  }

  .theme-reference-old .bottom-nav button:hover,
  .theme-reference-old .bottom-nav a:hover button,
  .theme-reference-old .bottom-nav button.active {
    color: var(--old-red);
    background: #fff8e6;
    box-shadow: inset 0 -2px 0 var(--old-red), 0 8px 22px rgba(217,4,41,0.12);
    transform: translateY(-2px);
  }

  .theme-reference-old .bottom-nav button.quick-plus {
    width: 66px;
    height: 66px;
    margin-top: -30px;
    color: #fff;
    background: var(--old-navy);
    border: 6px solid #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 2px #ffe5a7, 0 16px 30px rgba(7,31,99,0.22);
  }

  .theme-reference-old .bottom-nav button.quick-plus:hover,
  .theme-reference-old .bottom-nav button.quick-plus.active {
    color: #fff;
    background: var(--old-red);
    transform: translateY(-3px) scale(1.03);
  }

  .theme-reference-old .mobile-menu-fab {
    right: 20px;
    bottom: 96px;
    width: 54px;
    height: 54px;
    color: var(--old-navy);
    background: #fff;
    border: 1px solid var(--old-line);
    box-shadow: 0 16px 34px rgba(7,31,99,0.16);
  }

  .theme-reference-old .mobile-menu-panel {
    border-radius: 24px 24px 0 0;
    background: #fff;
    border: 1px solid var(--old-line);
  }
}

@media (max-width: 620px) {
  .theme-reference-old .kpi-grid,
  .theme-reference-old .kpi-grid.six,
  .theme-reference-old .kpi-grid.five {
    grid-template-columns: 1fr;
  }

  .theme-reference-old .data-table-wrap {
    border: 0;
    overflow: visible;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fbff 0%, #f5f8fc 48%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

img {
  display: block;
  max-width: 100%;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-view {
  min-height: 100vh;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.72fr);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    url("../img/synar-bg-desktop.jpg") left bottom / cover no-repeat;
}

.auth-hero {
  position: relative;
  padding: 52px min(7vw, 86px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.auth-hero::after,
.sidebar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  pointer-events: none;
  background:
    radial-gradient(380px 50px at 78% 82%, rgba(13, 99, 216, 0.22), transparent 72%),
    linear-gradient(164deg, transparent 0 53%, rgba(13, 99, 216, 0.15) 54% 55%, transparent 56%),
    linear-gradient(170deg, transparent 0 57%, rgba(237, 27, 58, 0.18) 58% 59%, transparent 60%),
    linear-gradient(176deg, transparent 0 63%, rgba(13, 99, 216, 0.12) 64% 65%, transparent 66%);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup img {
  width: 212px;
  height: auto;
}

.auth-title {
  margin: 70px 0 12px;
  font-size: clamp(44px, 6.2vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--navy);
}

.auth-title span {
  color: var(--red);
}

.auth-copy {
  margin: 0;
  max-width: 620px;
  font-size: 20px;
  color: #52617f;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 760px;
  margin-top: 42px;
  position: relative;
  z-index: 1;
}

.auth-feature {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.auth-feature b {
  display: block;
  color: var(--blue);
  font-size: 18px;
}

.auth-feature span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px min(5vw, 64px);
  border-left: 1px solid rgba(221, 231, 244, 0.8);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
}

.auth-card {
  width: min(100%, 520px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 32px;
  text-align: center;
}

.auth-card p {
  margin: 0 0 24px;
  color: var(--muted);
  text-align: center;
}

.auth-lang {
  position: fixed;
  top: 34px;
  right: 44px;
  z-index: 5;
}

.lang-switch,
.segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.lang-switch button,
.segmented button {
  min-width: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 8px 10px;
}

.lang-switch button.active,
.segmented button.active {
  background: var(--soft-blue);
  color: var(--blue);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  gap: 7px;
}

.form-row label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .icon {
  position: absolute;
  left: 14px;
  color: #7a8aa7;
}

.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px 11px 42px;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-wrap textarea {
  min-height: 92px;
  resize: vertical;
}

.input-wrap input:focus,
.input-wrap select:focus,
.input-wrap textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 99, 216, 0.12);
}

.password-toggle {
  position: absolute;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.form-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  padding: 0;
}

.demo-role {
  padding: 12px;
  border: 1px dashed #c9d8ea;
  border-radius: var(--radius);
  background: #f8fbff;
}

.demo-role small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #004ab8);
  color: #fff;
  box-shadow: 0 12px 26px rgba(13, 99, 216, 0.22);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-soft {
  color: var(--blue);
  background: var(--soft-blue);
  border-color: #cfe1fb;
}

.btn-outline {
  color: var(--blue);
  background: #fff;
  border-color: #aecaef;
}

.btn-ghost {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.btn-wide {
  width: 100%;
}

.auth-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  color: #71809d;
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
  z-index: 20;
}

.sidebar-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 0 8px;
}

.sidebar-logo img {
  width: 198px;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 38px;
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #22314f;
  text-align: left;
  font-weight: 800;
}

.side-link .icon {
  color: var(--navy-2);
}

.side-link.active {
  color: var(--blue);
  background: linear-gradient(90deg, #eaf3ff, #f7fbff);
}

.side-link.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 7px;
  bottom: 7px;
  width: 4px;
  border-radius: 99px;
  background: var(--blue);
}

.nav-badge {
  margin-left: auto;
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.collapse-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #34415f;
  font-weight: 750;
}

.shell-main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.mobile-menu-btn {
  display: none;
}

.page-heading {
  min-width: 0;
}

.page-heading h1 {
  margin: 0;
  color: var(--navy);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb span:first-child {
  color: var(--blue);
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.role-select,
.project-select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
}

.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
}

.icon-button:hover {
  border-color: #bdd3ee;
  background: #f8fbff;
}

.bell-badge {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 5px 10px 5px 6px;
  font-weight: 850;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcebff, #86b9ff);
  color: var(--navy);
  font-size: 13px;
  font-weight: 950;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 28px;
  width: min(360px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 40;
  overflow: hidden;
}

.dropdown-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-weight: 900;
}

.dropdown-list {
  display: grid;
  max-height: 420px;
  overflow: auto;
}

.dropdown-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid #eef3f9;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.dropdown-item:hover {
  background: #f8fbff;
}

.dropdown-item b {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.dropdown-item span,
.dropdown-item small {
  color: var(--muted);
  font-size: 12px;
}

.profile-menu .dropdown-item {
  grid-template-columns: 24px 1fr;
  align-items: center;
}

.main-content {
  padding: 24px 28px 38px;
  max-width: 100vw;
  overflow-x: clip;
}

.page-section {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.page-section > * {
  min-width: 0;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.section-title-row > * {
  min-width: 0;
}

.section-title-row h2,
.card h2,
.card h3 {
  margin: 0;
  color: var(--navy);
  letter-spacing: 0;
}

.section-title-row p,
.card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi-grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card,
.kpi-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.kpi-card {
  min-height: 126px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
}

.kpi-card.compact {
  min-height: 98px;
}

.icon-bubble {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #eaf3ff;
}

.icon-bubble.red {
  color: var(--red);
  background: #ffe9ee;
}

.icon-bubble.gold {
  color: #bd7900;
  background: #fff3d7;
}

.icon-bubble.green {
  color: var(--green);
  background: #e4f8ef;
}

.icon-bubble.purple {
  color: var(--purple);
  background: #f0e7ff;
}

.kpi-value {
  display: block;
  color: #0b1534;
  font-size: 32px;
  line-height: 1;
  font-weight: 920;
  letter-spacing: 0;
}

.kpi-label {
  display: block;
  margin-top: 4px;
  color: #2d3a58;
  font-size: 13px;
  font-weight: 750;
}

.kpi-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.kpi-action {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 850;
  padding: 0;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.card-pad {
  padding: 18px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.micro-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  padding: 0;
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
}

.badge.blue,
.status-pill.blue,
.badge.review {
  color: #0757bf;
  background: #e7f1ff;
}

.badge.green,
.status-pill.green,
.badge.approved,
.badge.active,
.badge.completed {
  color: #067a4d;
  background: #e4f8ef;
}

.badge.gold,
.status-pill.gold,
.badge.pending,
.badge.in-progress {
  color: #9a6400;
  background: #fff0cc;
}

.badge.red,
.status-pill.red,
.badge.overdue,
.badge.high,
.badge.returned {
  color: #c4142d;
  background: #ffe6eb;
}

.badge.purple,
.status-pill.purple {
  color: #6d38d8;
  background: #efe6ff;
}

.badge.muted,
.status-pill.muted {
  color: #53617d;
  background: #eef2f7;
}

.row-list {
  display: grid;
  gap: 10px;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef3f9;
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row b {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.info-row span,
.info-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.data-table-wrap {
  width: 100%;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eef3f9;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: #43516d;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 900;
}

.data-table td {
  color: #22314f;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  position: relative;
}

.mini-btn {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #aecaef;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.mini-btn.fill {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.action-menu {
  position: absolute;
  right: 0;
  top: 34px;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 30;
}

.action-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 780;
}

.action-menu button:hover {
  background: #f3f7fd;
}

.donut-layout {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  --a: 48%;
  --b: 72%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0 var(--a), var(--gold) var(--a) var(--b), var(--green) var(--b) 90%, #d8e2ee 90% 100%);
  position: relative;
}

.donut.red {
  background: conic-gradient(var(--red) 0 28%, var(--gold) 28% 64%, var(--green) 64% 88%, #d8e2ee 88% 100%);
}

.donut.purple {
  background: conic-gradient(var(--purple) 0 22%, var(--blue) 22% 52%, var(--green) 52% 78%, var(--gold) 78% 100%);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
}

.donut-center b {
  display: block;
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
}

.donut-center span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legend {
  display: grid;
  gap: 8px;
}

.legend-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  color: #34415f;
  font-size: 13px;
  font-weight: 750;
}

.legend-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.dot.green { background: var(--green); }
.dot.gold { background: var(--gold); }
.dot.red { background: var(--red); }
.dot.purple { background: var(--purple); }
.dot.muted { background: #9ca8bc; }

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 126px 1fr 42px;
  gap: 12px;
  align-items: center;
  color: #34415f;
  font-size: 13px;
  font-weight: 800;
}

.bar-track {
  height: 11px;
  border-radius: 99px;
  background: #e8eef7;
  overflow: hidden;
}

.bar-fill {
  display: block;
  width: var(--w, 50%);
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), #5da8ff);
}

.bar-fill.red { background: linear-gradient(90deg, var(--red), #ff6880); }
.bar-fill.gold { background: linear-gradient(90deg, var(--gold), #ffd470); }
.bar-fill.green { background: linear-gradient(90deg, var(--green), #6bdab0); }
.bar-fill.purple { background: linear-gradient(90deg, var(--purple), #b692ff); }

.chart-svg {
  width: 100%;
  min-height: 210px;
  border: 1px solid #edf2f8;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f9fbff);
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #dbe6f4;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.timeline-item.gold::before { background: var(--gold); }
.timeline-item.green::before { background: var(--green); }
.timeline-item.red::before { background: var(--red); }

.timeline-item b {
  color: var(--navy);
  font-size: 13px;
}

.timeline-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.workspace-hero {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.project-thumb {
  width: 118px;
  height: 96px;
  border-radius: var(--radius);
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(13, 99, 216, 0.2), rgba(19, 166, 107, 0.14)),
    url("../img/synar-bg-desktop.jpg") center / cover;
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.meta-item {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.meta-item:first-child {
  border-left: 0;
  padding-left: 0;
}

.meta-item small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.meta-item b {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  font-size: 13px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: auto;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #34415f;
  font-weight: 850;
  white-space: nowrap;
  padding: 0 14px;
}

.tab-btn.active {
  color: var(--blue);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 3px;
  border-radius: 99px;
  background: var(--blue);
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.phase-card {
  display: grid;
  gap: 14px;
  min-height: 228px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.phase-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.phase-no {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.ring {
  --p: 60%;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(var(--ring, var(--blue)) 0 var(--p), #e9eef6 var(--p) 100%);
  position: relative;
  display: grid;
  place-items: center;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}

.ring b {
  position: relative;
  z-index: 1;
  color: var(--navy);
  font-size: 16px;
}

.mini-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.mini-stat-row b {
  color: var(--navy);
  font-size: 16px;
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kanban-col {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  overflow: hidden;
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-weight: 900;
}

.kanban-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.issue-card,
.task-card,
.mobile-card {
  border: 1px solid #e4ebf5;
  border-radius: var(--radius);
  background: #fff;
  padding: 13px;
  box-shadow: 0 5px 14px rgba(6, 27, 79, 0.05);
}

.issue-card b,
.task-card b,
.mobile-card b {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.issue-card small,
.task-card small,
.mobile-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  background: #fff;
  color: #34415f;
  font-size: 13px;
  font-weight: 800;
}

.chip.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.stepper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stepper {
  display: grid;
  gap: 8px;
}

.stepper label {
  color: #34415f;
  font-size: 13px;
  font-weight: 800;
}

.stepper-control {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  overflow: hidden;
}

.stepper-control button {
  border: 0;
  background: #f8fbff;
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.stepper-value {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-inline: 1px solid #d6e1ee;
  color: var(--navy);
  font-weight: 900;
}

.slider-wrap {
  display: grid;
  grid-template-columns: 1fr 78px;
  gap: 18px;
  align-items: center;
}

.range {
  width: 100%;
  accent-color: var(--blue);
}

.range-value {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 900;
}

.accordion {
  display: grid;
  gap: 12px;
}

.accordion details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion-body {
  padding: 0 16px 16px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.photo-thumb,
.photo-add {
  aspect-ratio: 1.15;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e9f1fb, #f7fbff);
  border: 1px solid #d6e1ee;
  overflow: hidden;
}

.photo-thumb {
  background:
    linear-gradient(135deg, rgba(13, 99, 216, 0.18), rgba(244, 177, 31, 0.18)),
    url("../img/synar-bg-desktop.jpg") center / cover;
}

.photo-add {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: var(--blue);
  font-weight: 850;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 30%);
  z-index: 3;
}

.mobile-prototype-shell {
  width: min(100%, 460px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mobile-screen {
  position: relative;
  min-height: 760px;
  padding: 22px 18px 96px;
  background: linear-gradient(180deg, #fff 0, #f8fbff 100%);
}

.mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.mobile-top img {
  width: 176px;
}

.mobile-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-hero-action {
  display: grid;
  grid-template-columns: 54px 1fr 42px;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0756ca, #003c98);
  color: #fff;
  text-align: left;
  box-shadow: 0 14px 30px rgba(13, 99, 216, 0.25);
}

.mobile-hero-action b {
  display: block;
  font-size: 20px;
}

.mobile-hero-action span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.mobile-bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-bottom-nav button,
.bottom-nav button {
  min-height: 60px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #53617d;
  font-size: 12px;
  font-weight: 800;
}

.mobile-bottom-nav button.active,
.bottom-nav button.active {
  color: var(--blue);
  background: var(--soft-blue);
}

.quick-plus {
  color: #53617d !important;
  background: transparent !important;
}

.quick-plus .icon {
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(13, 99, 216, 0.28);
}

.inbox-layout {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 16px;
}

.queue-list {
  display: grid;
  gap: 10px;
}

.queue-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 13px;
}

.queue-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 99, 216, 0.09);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-tile {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #fff;
}

.detail-tile small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.detail-tile b {
  display: block;
  color: var(--navy);
  margin-top: 5px;
}

.wizard {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}

.wizard-steps {
  display: grid;
  gap: 10px;
  align-content: start;
}

.wizard-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #34415f;
  font-weight: 850;
}

.wizard-step span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf3fa;
  color: var(--muted);
}

.wizard-step.active {
  border-color: var(--blue);
  color: var(--blue);
  background: #f4f9ff;
}

.wizard-step.active span {
  color: #fff;
  background: var(--blue);
}

.form-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.permission-grid {
  display: grid;
  grid-template-columns: 180px repeat(6, 1fr);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.permission-grid div {
  min-width: 112px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.permission-grid .head {
  background: #f8fbff;
  color: var(--navy);
  font-weight: 900;
}

.permission-grid .ok {
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 19, 48, 0.46);
}

.modal {
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 80px rgba(5, 16, 45, 0.3);
  padding: 20px;
}

.modal h3 {
  margin: 0;
  color: var(--navy);
}

.modal p {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: min(340px, calc(100vw - 32px));
  padding: 13px 14px;
  border: 1px solid #cfe1fb;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 800;
  animation: toastIn 0.22s ease both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.bottom-nav {
  display: none;
}

.auth-logo {
  width: min(240px, 70vw);
  margin-bottom: 28px;
}

.auth-lang {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.auth-lang button {
  min-width: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 8px 10px;
}

.auth-lang button.active {
  background: var(--soft-blue);
  color: var(--blue);
}

.topbar .auth-lang {
  position: static;
  z-index: auto;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-stack label:not(.check-row) {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.form-stack input,
.form-stack select,
.form-stack textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 99, 216, 0.12);
}

.form-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.bottom-nav a {
  color: inherit;
  text-decoration: none;
}

.badge.director,
.badge.project-manager,
.badge.project-engineer,
.badge.site-supervisor,
.badge.finance,
.badge.admin {
  color: #0757bf;
  background: #e7f1ff;
}

.badge.info,
.badge.success,
.badge.warning {
  color: #53617d;
  background: #eef2f7;
}

/* Milestone 2 UX polish */
.auth-view {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.96) 0 58%, rgba(255, 255, 255, 0.9) 58% 100%),
    url("../img/synar-bg-desktop.jpg") left bottom / cover no-repeat;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
}

.auth-hero {
  padding: 64px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
}

.auth-title {
  max-width: 720px;
  font-size: 58px;
  line-height: 1.05;
  color: var(--navy);
}

.auth-title span {
  color: var(--red);
}

.auth-copy {
  max-width: 600px;
  color: #44526f;
  font-size: 20px;
}

.auth-feature {
  min-height: 116px;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
}

.auth-panel {
  background: rgba(255, 255, 255, 0.62);
}

.auth-card {
  box-shadow: 0 18px 50px rgba(6, 27, 79, 0.1);
}

.app-shell {
  background: #f7f9fd;
}

.sidebar {
  background: #fff;
}

.sidebar-inner {
  padding: 24px 16px;
}

.side-nav {
  margin-top: 28px;
}

.side-link {
  min-height: 46px;
  border-radius: 8px;
  text-decoration: none;
}

.side-link:hover {
  background: #f4f8fe;
}

.topbar {
  background: rgba(255, 255, 255, 0.94);
}

.main-content {
  background:
    linear-gradient(180deg, #f8fbff 0, #f6f8fc 100%);
}

.card,
.kpi-card,
.panel,
.project-card,
.rail-card,
.empty-state {
  border-color: #dfe8f5;
  box-shadow: 0 10px 28px rgba(6, 27, 79, 0.055);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.on-track,
.badge.active,
.badge.completed,
.badge.approved,
.badge.low {
  color: #067a4d;
  background: #e4f8ef;
}

.badge.at-risk,
.badge.pending,
.badge.medium,
.badge.in-progress,
.badge.submitted,
.badge.under-review {
  color: #9a6400;
  background: #fff0cc;
}

.badge.delayed,
.badge.overdue,
.badge.returned,
.badge.high,
.badge.critical {
  color: #c4142d;
  background: #ffe6eb;
}

.badge.not-started,
.badge.to-do,
.badge.not-submitted,
.badge.locked,
.mini-btn.muted {
  color: #53617d;
  background: #eef2f7;
  border-color: #dbe4f0;
}

.danger-text {
  color: var(--red) !important;
}

.project-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.search-box {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #7a8aa7;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.project-card-grid-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.project-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-width: 0;
  max-width: 100%;
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.project-card h3 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: 17px;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-card-grid span,
.project-meta-strip span,
.phase-metrics span {
  min-width: 0;
}

.project-card-grid small,
.project-meta-strip small,
.phase-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.project-card-grid b,
.project-meta-strip b {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 13px;
}

.project-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 42px;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.project-card-actions > * {
  min-width: 0;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f8;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.project-table-card {
  margin-top: 4px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.empty-state h3 {
  margin: 8px 0 0;
  color: var(--navy);
}

.empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.project-hero {
  display: grid;
  grid-template-columns: 116px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.project-thumb {
  width: 116px;
  height: 92px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 99, 216, 0.12), rgba(19, 166, 107, 0.16)),
    url("../img/synar-bg-desktop.jpg") center / cover;
}

.project-title-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.project-title-line h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
}

.project-meta-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.project-hero-actions {
  display: grid;
  gap: 8px;
}

.workspace-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px 0 0;
  border-bottom: 1px solid var(--line);
}

.workspace-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 3px solid transparent;
  color: #34415f;
  text-decoration: none;
  font-weight: 850;
  white-space: nowrap;
}

.workspace-tabs a.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.workspace-rail {
  display: grid;
  gap: 12px;
}

.rail-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.rail-card b {
  color: var(--navy);
}

.rail-card small {
  color: var(--muted);
}

.phase-board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.phase-card-soft {
  position: relative;
  display: grid;
  gap: 16px;
  min-height: 264px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.phase-card-index {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.phase-card-title {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding-left: 24px;
}

.phase-card-title h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.phase-card-title small {
  color: var(--muted);
}

.phase-card-body {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 14px;
  align-items: center;
}

.progress-ring {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0 var(--progress), #edf2f8 var(--progress) 100%);
  position: relative;
}

.progress-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}

.progress-ring span {
  position: relative;
  z-index: 1;
  color: var(--navy);
  font-weight: 950;
}

.phase-metrics {
  display: grid;
  gap: 8px;
}

.phase-metrics b {
  display: block;
  color: var(--navy);
}

.phase-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

.phase-progress-list {
  display: grid;
  gap: 12px;
}

.phase-progress-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #edf2f8;
  border-radius: var(--radius);
  background: #fbfdff;
}

.phase-progress-row small {
  display: block;
  color: var(--muted);
}

.wizard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wizard-content {
  display: grid;
  gap: 16px;
}

.wizard-panel {
  scroll-margin-top: 100px;
}

.form-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 99, 216, 0.12);
}

.form-alert {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #ffcbd4;
  border-radius: var(--radius);
  background: #fff1f4;
  color: #8d1022;
}

.form-alert.soft {
  margin-top: 18px;
  border-color: #cfe1fb;
  background: #f4f9ff;
  color: var(--navy);
}

.empty-inline {
  min-height: 44px;
  display: grid;
  align-items: center;
  padding: 10px 12px;
  border: 1px dashed #c9d8ea;
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--muted);
}

.sop-template-summary {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d9eadf;
  border-radius: var(--radius);
  background: #f3fbf7;
}

.sop-template-summary p {
  margin: 4px 0 0;
}

.sop-phase-preview,
.setup-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.locked-check,
.setup-checklist span {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #34415f;
  font-weight: 850;
}

.locked-check input {
  accent-color: var(--green);
}

.detail-grid .detail-tile {
  min-width: 0;
}

.mini-stepper {
  display: grid;
  gap: 8px;
}

.mini-stepper span {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 6px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.mini-stepper span.done {
  color: #067a4d;
  background: #e4f8ef;
}

@media (max-width: 1280px) {
  .kpi-grid.six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .phase-grid,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-layout,
  .inbox-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.88)),
      url("../img/synar-bg-mobile.jpg") center / cover no-repeat;
  }

  .auth-hero {
    padding: 34px 22px 16px;
  }

  .auth-title {
    margin-top: 34px;
    font-size: 42px;
  }

  .auth-feature-grid {
    margin-top: 24px;
  }

  .auth-panel {
    padding: 18px 18px 58px;
    border-left: 0;
  }

  .auth-footer {
    position: static;
    padding: 0 0 18px;
    background: #fff;
  }

  .app-shell {
    display: block;
    padding-bottom: 74px;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 300px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .topbar {
    min-height: 70px;
    padding: 12px 14px;
  }

  .mobile-menu-btn {
    display: inline-grid;
  }

  .page-heading h1 {
    font-size: 20px;
  }

  .breadcrumb,
  .project-select,
  .profile-name,
  .role-select {
    display: none;
  }

  .main-content {
    padding: 18px 14px 24px;
  }

  .kpi-grid,
  .kpi-grid.six,
  .grid-3,
  .grid-4,
  .form-two,
  .detail-grid,
  .stepper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(var(--nav-count, 5), minmax(0, 1fr));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    padding: 8px;
  }
}

@media (max-width: 740px) {
  .auth-feature-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .kpi-grid,
  .kpi-grid.six,
  .phase-grid,
  .workspace-hero,
  .project-meta-grid,
  .donut-layout,
  .wizard,
  .form-two {
    grid-template-columns: 1fr;
  }

  .auth-lang {
    top: 16px;
    right: 16px;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .auth-feature {
    grid-template-columns: 42px 1fr;
    padding: 14px;
  }

  .section-title-row,
  .card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpi-card {
    grid-template-columns: 48px 1fr;
    min-height: auto;
  }

  .kpi-action {
    grid-column: 1 / -1;
  }

  .top-actions {
    gap: 6px;
  }

  .lang-switch button {
    min-width: 34px;
    padding: 7px;
  }

  .kanban {
    grid-template-columns: 1fr;
  }

  .kanban.mobile-filtered .kanban-col {
    display: none;
  }

  .kanban.mobile-filtered .kanban-col.active-mobile {
    display: block;
  }

  .data-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }

  .data-table td {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #eef3f9;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
    font-size: 12px;
  }

  .data-table td:last-child {
    border-bottom: 0;
  }

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

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

  .mobile-screen {
    min-height: calc(100vh - 92px);
  }

  .mobile-prototype-shell {
    border-radius: var(--radius);
  }
}

@media (max-width: 960px) {
  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-card-grid-list,
  .phase-board-grid {
    grid-template-columns: 1fr;
  }

  .project-card-actions {
    grid-template-columns: 1fr 1fr 42px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 14px 10px 20px;
  }

  .topbar {
    gap: 8px;
  }

  .page-heading h1 {
    font-size: 18px;
  }

  .icon-button,
  .profile-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .profile-button .avatar {
    width: 30px;
    height: 30px;
  }

  .mobile-mini-grid,
  .kpi-grid,
  .detail-grid,
  .stepper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-card {
    padding: 14px;
  }

  .kpi-value {
    font-size: 28px;
  }

  .bar-row {
    grid-template-columns: 92px 1fr 36px;
  }

  .sticky-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .project-card-grid-list,
  .phase-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-layout,
  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .wizard-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-meta-strip,
  .sop-phase-preview,
  .setup-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .auth-title {
    font-size: 38px;
  }

  .auth-copy {
    font-size: 16px;
  }

  .project-toolbar,
  .project-hero,
  .project-card-grid-list,
  .phase-board-grid,
  .project-meta-strip,
  .sop-phase-preview,
  .setup-checklist,
  .phase-progress-row,
  .wizard-steps {
    grid-template-columns: 1fr;
  }

  .project-hero {
    align-items: stretch;
  }

  .project-thumb {
    width: 100%;
    height: 140px;
  }

  .project-title-line,
  .phase-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .project-card-actions .icon-button {
    width: 100%;
  }

  .workspace-tabs {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .phase-card-body {
    grid-template-columns: 88px 1fr;
  }
}

@media (max-width: 480px) {
  .topbar .auth-lang {
    display: none;
  }

  .bell-badge {
    right: -2px;
  }

  .workspace-tabs {
    margin-inline: -10px;
    padding-inline: 10px;
    max-width: 100vw;
  }

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

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .phase-card-soft {
    min-height: auto;
  }
}

@media (max-width: 960px) {
  .project-card-grid-list,
  .phase-board-grid {
    grid-template-columns: 1fr;
  }

  .project-card-grid-list,
  .project-card {
    width: min(100%, calc(100vw - 28px));
    max-width: min(100%, calc(100vw - 28px));
    overflow: hidden;
  }

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

  .project-card-actions .icon-button {
    width: 100%;
  }
}

/* Milestone 3 task workflow */
.demo-switcher {
  display: grid;
  gap: 10px;
}

.demo-login-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.demo-login-grid button {
  min-height: 38px;
  border: 1px solid #cfe1fb;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.demo-login-grid button:hover {
  background: var(--soft-blue);
}

.table-actions {
  flex-wrap: wrap;
}

.table-actions form {
  margin: 0;
}

.data-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.task-progress {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #edf2f8;
  border-radius: var(--radius);
  background: #fbfdff;
}

.task-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-progress b {
  color: var(--navy);
  font-size: 22px;
}

.task-progress span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.quick-actions-card,
.mini-form,
.upload-box,
.comment-list,
.timeline-list,
.attachment-list {
  display: grid;
  gap: 10px;
}

.upload-box {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px;
  border: 1px dashed #c9d8ea;
  border-radius: var(--radius);
  background: #f8fbff;
}

.upload-box input {
  min-width: 0;
  width: 100%;
  color: var(--muted);
}

.help-text {
  display: block;
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-list {
  margin-top: 10px;
}

.attachment-list a {
  color: inherit;
  text-decoration: none;
}

.comment-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #edf2f8;
  border-radius: var(--radius);
  background: #fbfdff;
}

.comment-item b {
  color: var(--navy);
  font-size: 13px;
}

.comment-item small,
.timeline-item small {
  color: var(--muted);
  font-size: 12px;
}

.comment-item p,
.timeline-item p {
  margin: 2px 0 0;
  color: #34415f;
  font-size: 13px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}

.timeline-item > span {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px #dcebff;
}

.timeline-item b {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.task-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.task-kanban-col {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  padding: 12px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius);
  background: #f8fbff;
}

.task-kanban-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.task-kanban-head b {
  color: var(--navy);
  font-size: 13px;
}

.task-kanban-head span {
  min-width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e7f1ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.task-mini-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e1eaf6;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.task-mini-card b {
  color: var(--navy);
  font-size: 13px;
}

.task-mini-card small {
  color: var(--muted);
  font-size: 12px;
}

.workload-bars {
  display: grid;
  gap: 10px;
}

.workload-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
}

.workload-row span,
.workload-row b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.workload-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f8;
}

.workload-row i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.review-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.review-tabs span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.review-tabs span.active {
  color: var(--blue);
  border-color: #cfe1fb;
  background: var(--soft-blue);
}

.muted-panel {
  box-shadow: none;
}

.rail-card span {
  color: #34415f;
  font-size: 12px;
}

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

@media (max-width: 740px) {
  .demo-login-grid,
  .task-kanban,
  .upload-box {
    grid-template-columns: 1fr;
  }

  .status-stack,
  .task-progress > div:first-child {
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
  }

  .task-kanban-col {
    min-height: auto;
  }
}

/* Milestone 4 site diary */
.badge.draft {
  color: #53617d;
  background: #eef2f7;
}

.badge.resubmitted,
.badge.pending-review {
  color: #9a6400;
  background: #fff0cc;
}

.badge.done,
.badge.clear {
  color: #067a4d;
  background: #e4f8ef;
}

.site-mobile-page,
.site-diary-form-page {
  max-width: 980px;
  margin: 0 auto;
}

.site-mobile-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.site-mobile-head h2 {
  margin: 2px 0 3px;
  color: var(--navy);
}

.site-mobile-head p {
  margin: 0;
  color: var(--muted);
}

.site-context-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.site-context-bar label,
.site-context-bar div {
  display: grid;
  gap: 5px;
}

.site-context-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.site-context-bar select {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 900;
  outline: 0;
}

.site-context-bar b {
  color: var(--navy);
}

.site-diary-cta {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 36px;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0756ca, #003f9e);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(13, 99, 216, 0.24);
}

.site-diary-cta .icon-bubble {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.site-diary-cta b {
  display: block;
  font-size: 22px;
}

.site-diary-cta small {
  display: block;
  color: rgba(255, 255, 255, 0.88);
}

.mobile-stat {
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.mobile-stat b {
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
}

.mobile-stat small {
  color: var(--muted);
  font-weight: 800;
}

.site-pulse-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.site-pulse-card div {
  display: grid;
  grid-template-columns: 48px auto;
  gap: 12px;
  align-items: center;
}

.site-pulse-card b {
  color: var(--navy);
  font-size: 22px;
}

.site-pulse-card small {
  display: block;
  color: var(--muted);
}

.site-mobile-grid {
  align-items: stretch;
}

.site-photo-card {
  justify-items: center;
  text-align: center;
}

.site-photo-card p {
  margin: 0;
}

.site-checklist summary,
.diary-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.site-checklist summary::-webkit-details-marker,
.diary-section summary::-webkit-details-marker {
  display: none;
}

.site-checklist summary span,
.diary-section summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checklist-lines {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.checklist-lines span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f3f7fd;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.checklist-lines span.done {
  color: #067a4d;
  background: #e4f8ef;
}

.site-diary-form {
  display: grid;
  gap: 14px;
}

.diary-section {
  display: grid;
  gap: 14px;
}

.diary-section[open] {
  gap: 16px;
}

.manpower-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stepper-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.stepper-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  text-align: center;
  font-weight: 900;
}

.progress-slider {
  width: 100%;
  accent-color: var(--blue);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chip-grid,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-check span,
.chip-list span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid #d6e1ee;
  border-radius: 6px;
  background: #fff;
  color: #34415f;
  font-size: 12px;
  font-weight: 850;
}

.chip-check input:checked + span {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.chip-list.danger span {
  color: #c4142d;
  border-color: #ffd1da;
  background: #fff1f4;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.diary-photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diary-photo-thumb {
  display: block;
  min-height: 118px;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  background: #eef4fb center / cover no-repeat;
}

.review-split {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.review-queue {
  position: sticky;
  top: 98px;
}

.review-queue-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e1eaf6;
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.review-queue-item.active {
  border-color: var(--blue);
  background: #f4f9ff;
}

.review-queue-item b {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.review-queue-item small {
  color: var(--muted);
  font-size: 12px;
}

.review-detail {
  display: grid;
  gap: 16px;
}

.review-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.review-detail-head h3 {
  margin: 2px 0 4px;
  color: var(--navy);
}

.review-detail-head p {
  margin: 0;
  color: var(--muted);
}

.review-block-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-block {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #edf2f8;
  border-radius: var(--radius);
  background: #fbfdff;
}

.review-block h4,
.photo-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--navy);
  font-size: 14px;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 220px;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid #eef3f9;
}

.review-timeline {
  padding-top: 12px;
  border-top: 1px solid #eef3f9;
}

@media (max-width: 1280px) {
  .review-split {
    grid-template-columns: 1fr;
  }

  .review-queue {
    position: static;
  }
}

@media (max-width: 980px) {
  .site-diary-form .sticky-actions {
    bottom: 74px;
  }
}

@media (max-width: 740px) {
  .site-context-bar,
  .manpower-grid,
  .safety-grid,
  .review-block-grid,
  .review-actions,
  .diary-photo-grid {
    grid-template-columns: 1fr;
  }

  .site-diary-cta {
    grid-template-columns: 48px minmax(0, 1fr) 28px;
    min-height: 92px;
    padding: 15px;
  }

  .site-diary-cta b {
    font-size: 18px;
  }

  .site-pulse-card,
  .review-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-mobile-page,
  .site-diary-form-page {
    max-width: none;
  }

  .sticky-actions {
    margin-inline: -14px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
  }
}

/* Milestone 5 issue / RFI / risk */
.badge.issue,
.badge.rfi {
  color: #0757bf;
  background: #e7f1ff;
}

.badge.risk {
  color: #6d38d8;
  background: #efe6ff;
}

.badge.ncr,
.badge.critical {
  color: #c4142d;
  background: #ffe6eb;
}

.badge.medium,
.badge.new,
.badge.waiting-external {
  color: #9a6400;
  background: #fff0cc;
}

.badge.low,
.badge.resolved,
.badge.closed {
  color: #067a4d;
  background: #e4f8ef;
}

.badge.optional {
  color: #53617d;
  background: #eef2f7;
}

.issue-filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr)) minmax(180px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.issue-filter-bar label,
.issue-form label,
.issue-action-panel label {
  display: grid;
  gap: 6px;
}

.issue-filter-bar span,
.issue-form label > span,
.issue-action-panel label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.issue-filter-bar input,
.issue-filter-bar select,
.issue-form input,
.issue-form select,
.issue-form textarea,
.issue-action-panel select,
.issue-action-panel textarea,
.issue-detail-page textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  outline: 0;
}

.issue-form,
.issue-detail-main {
  display: grid;
  gap: 14px;
}

.issue-chip-grid {
  padding: 4px 0;
}

.issue-form .chip-check input {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
}

.issue-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.issue-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  min-width: 0;
}

.issue-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 420px;
  padding: 12px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius);
  background: #f8fbff;
}

.issue-column-head {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 9px;
  align-items: center;
}

.issue-column-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.issue-column-head.in_progress span,
.issue-column-head.waiting_external span {
  background: var(--gold);
}

.issue-column-head.done span {
  background: var(--green);
}

.issue-column-head b {
  color: var(--navy);
  font-size: 13px;
}

.issue-column-head em {
  min-width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e7f1ff;
  color: var(--blue);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.issue-card-list {
  display: grid;
  gap: 10px;
}

.issue-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e1eaf6;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 16px rgba(6, 27, 79, 0.04);
}

.issue-card-top,
.issue-card-meta,
.issue-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.issue-card-top a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.issue-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.35;
}

.issue-card small,
.issue-card-foot span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.issue-summary-rail,
.issue-action-panel {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 12px;
}

.donut-layout.compact {
  grid-template-columns: 132px 1fr;
}

.donut-layout.compact .donut {
  width: 120px;
  height: 120px;
}

.donut-layout.compact .donut::after {
  inset: 22px;
}

.metric-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-pair span {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #eef3f9;
  border-radius: var(--radius);
  background: #fbfdff;
}

.metric-pair b {
  color: var(--red);
  font-size: 28px;
  line-height: 1;
}

.metric-pair small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.issue-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.issue-description {
  padding: 12px;
  border: 1px solid #edf2f8;
  border-radius: var(--radius);
  background: #fbfdff;
}

.issue-action-panel .card {
  display: grid;
  gap: 14px;
}

@media (max-width: 1280px) {
  .issue-board-layout,
  .issue-detail-layout {
    grid-template-columns: 1fr;
  }

  .issue-summary-rail,
  .issue-action-panel {
    position: static;
  }

  .issue-kanban {
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (max-width: 980px) {
  .issue-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issue-search {
    grid-column: span 2;
  }
}

@media (max-width: 740px) {
  .issue-filter-bar,
  .issue-kanban,
  .donut-layout.compact,
  .metric-pair {
    grid-template-columns: 1fr;
  }

  .issue-column {
    min-height: auto;
  }

  .issue-board-page .kpi-grid.six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Milestone 6: claim/payment visibility */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.finance-grid .span-2 {
  min-width: 0;
}

.finance-side,
.claim-action-panel {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 12px;
}

.claim-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e7eef8;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 16px rgba(8, 33, 69, 0.04);
}

.claim-filter-bar label,
.claim-form label,
.claim-action-panel label {
  display: grid;
  gap: 6px;
}

.claim-filter-bar span,
.claim-form label span,
.claim-action-panel label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.claim-filter-bar input,
.claim-filter-bar select,
.claim-form input,
.claim-form select,
.claim-form textarea,
.claim-action-panel input,
.claim-action-panel select,
.claim-action-panel textarea {
  width: 100%;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  min-height: 42px;
  padding: 10px 11px;
}

.claim-form,
.claim-action-panel .card {
  display: grid;
  gap: 14px;
}

.form-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.claim-items {
  display: grid;
  gap: 8px;
}

.claim-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 8px;
}

.claim-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.claim-detail-main {
  display: grid;
  gap: 16px;
}

.cashflow-bars {
  display: grid;
  gap: 12px;
}

.cashflow-bar-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
}

.cashflow-bar-row b {
  grid-row: span 2;
  color: var(--navy);
  font-size: 12px;
}

.cashflow-bar-row .bar {
  display: block;
  width: var(--w);
  min-width: 18px;
  height: 10px;
  border-radius: 999px;
}

.cashflow-bar-row .bar.in {
  background: #2f9e74;
}

.cashflow-bar-row .bar.out {
  background: #8f5bd7;
}

.badge.progress-claim,
.badge.variation-claim,
.badge.subcontractor-claim,
.badge.final-account,
.badge.retention {
  background: #e7f1ff;
  color: var(--blue);
}

.badge.certified,
.badge.payment-in,
.badge.payment-out,
.badge.paid {
  background: #e8f7ef;
  color: #18794e;
}

.badge.under-review,
.badge.scheduled,
.badge.pending {
  background: #fff4df;
  color: #966200;
}

.badge.returned,
.badge.overdue {
  background: #feecef;
  color: var(--red);
}

@media (max-width: 1280px) {
  .finance-grid,
  .claim-detail-layout {
    grid-template-columns: 1fr;
  }

  .finance-side,
  .claim-action-panel {
    position: static;
  }
}

@media (max-width: 980px) {
  .claim-filter-bar,
  .form-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claim-search {
    grid-column: span 2;
  }

  .claim-filter-bar .btn {
    grid-column: span 2;
  }
}

@media (max-width: 740px) {
  .finance-dashboard-page .kpi-grid.six,
  .claims-page .kpi-grid,
  .claim-filter-bar,
  .form-three,
  .claim-item-row,
  .button-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claim-filter-bar label,
  .claim-search,
  .claim-filter-bar .btn,
  .form-three label,
  .claim-item-row input:first-child,
  .button-row .btn {
    grid-column: span 2;
  }

  .claim-action-panel {
    margin-bottom: 74px;
  }
}

/* Milestone 7: documents, admin, notifications */
.kpi-grid.five,
.kpi-grid.six {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.document-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(220px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e7eef8;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 16px rgba(8, 33, 69, 0.04);
}

.document-filter-bar label,
.document-form label,
.document-action-panel label,
.role-assign-row,
.setup-item-row {
  display: grid;
  gap: 6px;
}

.document-filter-bar span,
.document-form label span,
.document-action-panel label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.document-filter-bar input,
.document-filter-bar select,
.document-form input,
.document-form select,
.document-form textarea,
.document-action-panel input,
.document-action-panel select,
.document-action-panel textarea,
.role-assign-row select,
.setup-item-row input,
.setup-item-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  padding: 10px 11px;
}

.document-form {
  display: grid;
  gap: 14px;
}

.document-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.document-detail-main {
  display: grid;
  gap: 16px;
}

.document-action-panel {
  position: sticky;
  top: 98px;
}

.utility-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e7eef8;
  border-radius: var(--radius);
  background: #fbfdff;
}

.role-assign-row {
  grid-template-columns: minmax(0, 1fr) 220px auto;
  align-items: center;
}

.setup-item-row {
  grid-template-columns: minmax(220px, 1fr) 160px minmax(180px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eef3f9;
  border-radius: var(--radius);
  background: #fbfdff;
}

.notification-tabs {
  overflow-x: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eef3f9;
  border-radius: var(--radius);
  background: #fff;
}

.notification-item.unread,
.dropdown-item.unread {
  background: #fffaf0;
}

.notification-item b {
  display: block;
  color: var(--navy);
}

.notification-item small,
.notification-item em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.profile-avatar-large {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7f1ff;
  color: var(--blue);
  font-size: 28px;
  font-weight: 950;
}

.badge.yes {
  background: #e8f7ef;
  color: #18794e;
}

.badge.no {
  background: #f2f5f9;
  color: var(--muted);
}

.badge.missing,
.badge.requires-update,
.badge.expired,
.badge.deactivated {
  background: #feecef;
  color: var(--red);
}

.badge.uploaded,
.badge.under-review,
.badge.expiring-soon,
.badge.pending {
  background: #fff4df;
  color: #966200;
}

.badge.approved,
.badge.completed,
.badge.active {
  background: #e8f7ef;
  color: #18794e;
}

@media (max-width: 1280px) {
  .document-detail-layout {
    grid-template-columns: 1fr;
  }

  .document-action-panel {
    position: static;
  }
}

@media (max-width: 980px) {
  .document-filter-bar,
  .role-assign-row,
  .setup-item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-search,
  .document-filter-bar .btn,
  .setup-item-row span,
  .setup-item-row input {
    grid-column: span 2;
  }
}

@media (max-width: 740px) {
  .document-filter-bar,
  .role-assign-row,
  .setup-item-row,
  .notification-item,
  .utility-box {
    grid-template-columns: 1fr;
  }

  .doc-search,
  .document-filter-bar .btn,
  .setup-item-row span,
  .setup-item-row input {
    grid-column: auto;
  }

  .document-center-page .kpi-grid.five,
  .admin-dashboard-page .kpi-grid.six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Milestone 8 final UI polish */
:root {
  --sidebar-collapsed: 88px;
  --ease-ui: cubic-bezier(0.2, 0.8, 0.2, 1);
}

:focus-visible {
  outline: 3px solid rgba(13, 99, 216, 0.24);
  outline-offset: 2px;
}

.auth-preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(13, 99, 216, 0.11), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  transition: opacity 0.34s var(--ease-ui), visibility 0.34s var(--ease-ui);
}

.auth-preloader img {
  width: 400px;
  max-width: 75vw;
  filter: drop-shadow(0 20px 38px rgba(6, 27, 79, 0.16));
  animation: synarPreload 1.1s var(--ease-ui) both;
}

.auth-preloader.is-done {
  opacity: 0;
  visibility: hidden;
}

@keyframes synarPreload {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  42% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  72% {
    transform: scale(1.018);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.main-content {
  animation: pageEnter 0.24s var(--ease-ui) both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-shell {
  transition: grid-template-columns 0.22s var(--ease-ui);
}

.sidebar,
.shell-main,
.topbar,
.bottom-nav,
.mobile-bottom-nav,
.dropdown,
.modal,
.card,
.kpi-card,
.project-card,
.phase-card,
.phase-card-soft,
.issue-card,
.task-card,
.mobile-card,
.rail-card,
.data-table tr,
.btn,
.mini-btn,
.icon-button,
.profile-button,
.side-link {
  transition:
    background-color 0.2s var(--ease-ui),
    border-color 0.2s var(--ease-ui),
    box-shadow 0.2s var(--ease-ui),
    color 0.2s var(--ease-ui),
    opacity 0.2s var(--ease-ui),
    transform 0.2s var(--ease-ui);
}

.card:hover,
.kpi-card:hover,
.project-card:hover,
.phase-card:hover,
.phase-card-soft:hover,
.issue-card:hover,
.task-card:hover,
.mobile-card:hover,
.rail-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(6, 27, 79, 0.1);
}

.btn:active,
.mini-btn:active,
.icon-button:active {
  transform: translateY(0);
}

.btn,
.mini-btn,
.icon-button,
.profile-button {
  touch-action: manipulation;
}

.sidebar-logo {
  justify-content: flex-start;
  gap: 10px;
  transition: padding 0.22s var(--ease-ui), justify-content 0.22s var(--ease-ui);
}

.sidebar-logo .logo-mark {
  display: none;
  width: 42px;
}

.sidebar-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  font-weight: 850;
}

.sidebar-collapse-toggle:hover {
  border-color: #bdd3ee;
  background: #f8fbff;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: var(--sidebar-collapsed) 1fr;
}

body.sidebar-collapsed .sidebar-inner {
  padding-inline: 14px;
}

body.sidebar-collapsed .sidebar-logo {
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .sidebar-logo .logo-full {
  display: none;
}

body.sidebar-collapsed .sidebar-logo .logo-mark {
  display: block;
}

body.sidebar-collapsed .side-nav {
  gap: 10px;
}

body.sidebar-collapsed .side-link {
  justify-content: center;
  padding: 12px;
}

body.sidebar-collapsed .side-link > span:not(.nav-badge),
body.sidebar-collapsed .sidebar-collapse-toggle span,
body.sidebar-collapsed .collapse-note span,
body.sidebar-collapsed .sidebar-foot > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

body.sidebar-collapsed .nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  margin-left: 0;
}

body.sidebar-collapsed .collapse-note,
body.sidebar-collapsed .sidebar-collapse-toggle {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-collapse-toggle .icon {
  transform: rotate(180deg);
}

.dropdown {
  transform-origin: top right;
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dropdown-item {
  text-decoration: none;
}

.dropdown-item.unread {
  background: #f3f8ff;
}

.modal-backdrop:not(.is-hidden) .modal {
  animation: modalEnter 0.22s var(--ease-ui) both;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast.toast-out {
  animation: toastOut 0.2s ease both;
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.badge,
.status-badge,
.priority-badge,
.type-badge {
  letter-spacing: 0;
  white-space: nowrap;
}

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

.empty-state .icon,
.empty-state svg {
  color: var(--blue);
}

.data-table-wrap {
  border-radius: var(--radius);
}

.data-table th:last-child,
.data-table td:last-child {
  text-align: right;
}

.table-actions .btn,
.table-actions .mini-btn {
  min-width: 0;
}

.auth-card,
.auth-feature,
.card,
.kpi-card,
.project-card,
.phase-card,
.phase-card-soft,
.rail-card,
.mobile-card,
.issue-card,
.task-card {
  border-color: rgba(221, 231, 244, 0.95);
}

.auth-view {
  animation: authEnter 0.28s var(--ease-ui) both;
}

@keyframes authEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-card input,
.auth-card select,
.auth-card textarea,
.form-stack input,
.form-stack select,
.form-stack textarea {
  transition: border-color 0.18s var(--ease-ui), box-shadow 0.18s var(--ease-ui), background 0.18s var(--ease-ui);
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus,
.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus {
  border-color: #95c2fb;
  box-shadow: 0 0 0 4px rgba(13, 99, 216, 0.1);
  outline: 0;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-stack .check-row input[type="checkbox"],
.auth-card .check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0;
  accent-color: var(--navy-2);
}

.bottom-nav a {
  text-decoration: none;
}

.bottom-nav button,
.mobile-bottom-nav button {
  transition: transform 0.18s var(--ease-ui), background-color 0.18s var(--ease-ui), color 0.18s var(--ease-ui);
}

.bottom-nav button.active,
.mobile-bottom-nav button.active {
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  body.sidebar-collapsed .app-shell {
    display: block;
  }

  body.sidebar-collapsed .sidebar-inner {
    padding: 28px 18px;
  }

  body.sidebar-collapsed .side-link {
    justify-content: flex-start;
    padding: 11px 13px;
  }

  body.sidebar-collapsed .side-link > span:not(.nav-badge),
  body.sidebar-collapsed .collapse-note span,
  body.sidebar-collapsed .sidebar-foot > span,
  body.sidebar-collapsed .sidebar-collapse-toggle span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  body.sidebar-collapsed .sidebar-logo .logo-full {
    display: block;
  }

  body.sidebar-collapsed .sidebar-logo .logo-mark {
    display: none;
  }

  body.sidebar-collapsed .nav-badge {
    position: static;
    margin-left: auto;
  }

  .sidebar-collapse-toggle {
    display: none;
  }

  .top-actions {
    flex-wrap: nowrap;
  }
}

@media (max-width: 740px) {
  .auth-preloader img {
    width: min(75vw, 320px);
  }

  .auth-layout {
    min-height: auto;
  }

  .auth-hero {
    min-height: auto;
  }

  .auth-title {
    line-height: 1.02;
  }

  .topbar {
    gap: 10px;
  }

  .top-actions .auth-lang {
    display: inline-flex;
    padding: 3px;
  }

  .top-actions .auth-lang button {
    min-width: 32px;
    padding: 6px;
  }

  .icon-button,
  .profile-button {
    min-width: 40px;
  }

  .dropdown {
    right: 10px;
    width: min(360px, calc(100vw - 20px));
  }

  .modal {
    max-height: calc(100vh - 40px);
    overflow: auto;
  }

  .data-table tr {
    margin-bottom: 10px;
  }

  .data-table td {
    grid-template-columns: minmax(92px, 38%) 1fr;
    align-items: center;
  }

  .data-table th:last-child,
  .data-table td:last-child {
    text-align: left;
  }

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

  .table-actions .btn,
  .table-actions .mini-btn,
  .table-actions a,
  .table-actions button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Milestone 8 aesthetic refinement pass */
.main-content {
  animation: pageFade 0.24s var(--ease-ui) both;
  transform: none !important;
}

@keyframes pageFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.kpi-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto 14px 0 auto;
  width: 56px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, rgba(13, 99, 216, 0.12), rgba(237, 27, 58, 0.16));
  opacity: 0.85;
}

.kpi-value,
.kpi-label,
.kpi-sub {
  display: block;
  min-width: 0;
}

.kpi-card > div {
  min-width: 0;
}

.kpi-value {
  max-width: 100%;
  color: var(--navy);
  font-size: clamp(25px, 2.15vw, 36px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.kpi-label {
  margin-top: 5px;
  color: #243451;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.kpi-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

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

.finance-dashboard-page .kpi-card {
  min-height: 118px;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  padding: 18px 20px;
}

.finance-dashboard-page .kpi-value {
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.04;
}

.phase-board-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  align-items: stretch;
}

.workspace-layout {
  grid-template-columns: 1fr;
}

.workspace-layout .workspace-rail {
  position: static;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.phase-card-soft {
  min-height: 248px;
  padding: 18px 18px 16px;
}

.phase-card-title {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
}

.phase-card-title .icon-bubble {
  width: 44px;
  height: 44px;
}

.phase-card-title h3 {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 15px;
  line-height: 1.25;
}

.phase-card-title small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-card-body {
  grid-template-columns: 88px minmax(0, 1fr);
}

.phase-card-footer {
  align-items: stretch;
}

.phase-card-footer .micro-link {
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #cfe1fb;
  border-radius: 6px;
  background: #f8fbff;
  text-align: center;
}

.issue-board-layout {
  grid-template-columns: 1fr;
}

.issue-kanban {
  grid-template-columns: repeat(4, minmax(240px, 1fr));
}

.issue-summary-rail {
  position: static;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.issue-summary-rail .card {
  min-width: 0;
}

.issue-summary-rail .card-head h3 {
  font-size: 15px;
}

.donut-layout.compact {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}

.donut-layout.compact .donut {
  width: 104px;
  height: 104px;
}

.donut-layout.compact .donut::after {
  inset: 20px;
}

.issue-card {
  min-width: 0;
}

.issue-card h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.issue-card .mini-btn {
  width: 100%;
}

.data-table th {
  letter-spacing: 0;
}

.data-table td b {
  line-height: 1.25;
}

.data-table td small {
  line-height: 1.25;
}

.table-actions {
  min-width: 94px;
}

.document-filter-bar,
.issue-filter-bar,
.claim-filter-bar {
  box-shadow: 0 10px 28px rgba(6, 27, 79, 0.045);
}

.site-diary-form-page {
  padding-bottom: 116px;
}

.site-diary-form .sticky-actions {
  z-index: 45;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid rgba(221, 231, 244, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 30px rgba(6, 27, 79, 0.08);
  backdrop-filter: blur(12px);
}

.diary-section summary {
  min-height: 44px;
  cursor: pointer;
}

.chip-check span,
.chip-list span {
  border-radius: 999px;
}

.chip-check input:checked + span {
  box-shadow: 0 8px 18px rgba(13, 99, 216, 0.18);
}

.site-context-card,
.site-mobile-page .card,
.site-diary-form-page .card {
  overflow: hidden;
}

.site-context-card b,
.site-mobile-page .project-card b,
.site-diary-form-page select {
  text-overflow: ellipsis;
}

@media (min-width: 1640px) {
  .phase-board-grid {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }
}

@media (max-width: 1280px) {
  .finance-dashboard-page .kpi-grid.six,
  .issue-summary-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phase-board-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .workspace-layout .workspace-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issue-kanban {
    overflow-x: auto;
    padding-bottom: 6px;
  }
}

@media (max-width: 980px) {
  .finance-dashboard-page .kpi-grid.six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phase-board-grid {
    grid-template-columns: 1fr;
  }

  .phase-card-soft {
    min-height: auto;
  }
}

@media (max-width: 740px) {
  .kpi-value {
    font-size: clamp(24px, 8vw, 32px);
  }

  .finance-dashboard-page .kpi-grid.six,
  .issue-summary-rail,
  .issue-kanban {
    grid-template-columns: 1fr;
  }

  .finance-dashboard-page .kpi-card {
    min-height: 106px;
    padding: 15px;
  }

  .issue-summary-rail {
    gap: 10px;
  }

  .donut-layout.compact {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .site-diary-form-page {
    padding-bottom: 168px;
  }

  .site-diary-form .sticky-actions {
    position: fixed !important;
    left: 10px;
    right: 10px;
    bottom: 76px;
    width: auto;
    margin-inline: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .workspace-layout .workspace-rail {
    grid-template-columns: 1fr;
  }

  .diary-section summary {
    padding: 2px 0;
  }

  .phase-card-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .phase-card-footer .micro-link {
    width: 100%;
  }

  .site-mobile-page .section-title-row h2,
  .site-diary-form-page .section-title-row h2 {
    font-size: 24px;
  }
}

/* Synar premium revamp: legacy-inspired navy, crimson and gold visual system */
:root {
  --navy: #020b45;
  --navy-2: #123a83;
  --deep-navy: #00062e;
  --blue: #0b5fd3;
  --blue-2: #2f80ed;
  --red: #d30624;
  --crimson: #b9001e;
  --gold: #f6a609;
  --gold-soft: #fff0c4;
  --green: #18a77b;
  --ink: #07163d;
  --muted: #65728d;
  --line: #dce5f2;
  --soft: #f3f6fb;
  --soft-blue: #e9f0ff;
  --card: #ffffff;
  --shadow: 0 18px 44px rgba(2, 11, 69, 0.12);
  --shadow-soft: 0 10px 28px rgba(2, 11, 69, 0.08);
  --sidebar: 282px;
  --sidebar-collapsed: 92px;
  --radius: 8px;
}

body {
  color: var(--ink);
  background:
    radial-gradient(900px 360px at 82% -120px, rgba(18, 58, 131, 0.1), transparent 70%),
    linear-gradient(180deg, #f8fafc 0%, #f3f6fb 48%, #eef3fb 100%);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    var(--soft);
}

.main-content {
  padding-top: 28px;
}

.sidebar {
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(0, 6, 46, 0.92), rgba(2, 11, 69, 0.96)),
    url("../img/sidebar-background.jpg") center bottom / cover no-repeat;
  box-shadow: 12px 0 34px rgba(2, 11, 69, 0.12);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, rgba(246, 166, 9, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 36%);
}

.sidebar::after {
  height: 190px;
  opacity: 0.88;
  background:
    radial-gradient(420px 60px at 74% 84%, rgba(246, 166, 9, 0.25), transparent 72%),
    linear-gradient(164deg, transparent 0 52%, rgba(246, 166, 9, 0.38) 53% 54%, transparent 55%),
    linear-gradient(170deg, transparent 0 58%, rgba(211, 6, 36, 0.46) 59% 60%, transparent 61%),
    linear-gradient(176deg, transparent 0 65%, rgba(47, 128, 237, 0.22) 66% 67%, transparent 68%);
}

.sidebar-inner {
  padding: 26px 16px 18px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 76px;
}

.sidebar-logo {
  flex: 1;
  min-width: 0;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 34px rgba(0, 6, 46, 0.16);
}

.sidebar-logo img {
  width: 188px;
  max-height: 54px;
  object-fit: contain;
}

.sidebar-logo .logo-mark {
  width: 42px;
}

.sidebar-collapse-toggle {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 6, 46, 0.18);
}

.sidebar-collapse-toggle:hover {
  border-color: rgba(246, 166, 9, 0.74);
  background: rgba(246, 166, 9, 0.2);
  color: #fff;
}

.side-nav {
  gap: 9px;
  margin-top: 28px;
}

.side-link {
  min-height: 50px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid transparent;
}

.side-link .icon {
  color: rgba(255, 255, 255, 0.9);
}

.side-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.side-link.active {
  color: #fff;
  border-color: rgba(246, 166, 9, 0.36);
  background:
    linear-gradient(90deg, rgba(246, 166, 9, 0.24), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.09);
  box-shadow: inset 4px 0 0 var(--gold), 0 14px 28px rgba(0, 6, 46, 0.16);
}

.side-link.active::before {
  display: none;
}

.nav-badge {
  background: var(--red);
  box-shadow: 0 8px 20px rgba(211, 6, 36, 0.3);
}

.sidebar-foot {
  display: none !important;
}

.sidebar-role-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgba(246, 166, 9, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
}

.sidebar-role-card small {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.2;
}

.sidebar-role-card b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.role-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(246, 166, 9, 0.16);
}

body.sidebar-collapsed .sidebar-inner {
  padding-inline: 14px;
}

body.sidebar-collapsed .sidebar-top {
  justify-content: center;
  flex-direction: column;
}

body.sidebar-collapsed .sidebar-logo {
  flex: 0 0 auto;
  width: 58px;
  min-height: 58px;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-collapse-toggle {
  width: 42px;
}

body.sidebar-collapsed .sidebar-role-card {
  justify-content: center;
  padding: 12px 8px;
}

body.sidebar-collapsed .sidebar-role-card div {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.topbar {
  justify-content: space-between;
  min-height: 86px;
  padding: 15px 28px;
  border-bottom: 1px solid rgba(220, 229, 242, 0.92);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(2, 11, 69, 0.045);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar .mobile-menu-btn {
  display: none;
}

.page-heading {
  text-align: left;
}

.page-heading h1 {
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 900;
  color: var(--deep-navy);
}

.breadcrumb span:first-child {
  color: var(--navy-2);
}

.top-actions .auth-lang,
.profile-button,
.icon-button {
  border-color: #d6e1ef;
  box-shadow: 0 8px 18px rgba(2, 11, 69, 0.045);
}

.top-actions .auth-lang {
  border-radius: 10px;
}

.auth-lang button.active {
  background: var(--soft-blue);
  color: var(--navy-2);
}

.profile-button:hover,
.icon-button:hover {
  border-color: rgba(246, 166, 9, 0.58);
  background: #fffdf7;
}

.avatar {
  background: linear-gradient(135deg, #fff0c4, #b9d6ff);
  color: var(--deep-navy);
}

.btn-primary,
.project-card-actions .btn-primary,
.micro-link.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #0b5fd3 0%, #073a9b 48%, #020b45 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(11, 95, 211, 0.22);
}

.btn-primary:hover,
.project-card-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(11, 95, 211, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), var(--crimson));
}

.card,
.kpi-card,
.project-card,
.phase-card,
.phase-card-soft,
.rail-card,
.mobile-card,
.issue-card,
.task-card,
.data-table-wrap,
.auth-card {
  border: 1px solid rgba(220, 229, 242, 0.95);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 36px rgba(2, 11, 69, 0.07);
}

.card-head {
  border-bottom-color: rgba(220, 229, 242, 0.7);
}

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

.kpi-card::after {
  background:
    radial-gradient(140px 80px at 92% 10%, rgba(246, 166, 9, 0.16), transparent 64%),
    linear-gradient(135deg, transparent, rgba(18, 58, 131, 0.04));
}

.badge,
.status-badge,
.priority-badge,
.type-badge {
  min-height: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0;
}

.badge.gold,
.badge.pending,
.badge.in-progress,
.badge.medium,
.badge.under-review,
.badge.submitted,
.badge.at-risk,
.badge.waiting-external,
.badge.expiring-soon {
  color: #865800;
  background: linear-gradient(180deg, #fff4ce, #ffe6a1);
  border: 1px solid rgba(246, 166, 9, 0.25);
}

.badge.red,
.badge.overdue,
.badge.high,
.badge.critical,
.badge.returned,
.badge.requires-update,
.badge.expired,
.badge.delayed {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--crimson));
}

.badge.green,
.badge.approved,
.badge.active,
.badge.completed,
.badge.certified,
.badge.paid,
.badge.closed,
.badge.resolved,
.badge.low,
.badge.on-track {
  color: #0b6b4e;
  background: #daf7ec;
  border: 1px solid rgba(24, 167, 123, 0.24);
}

.data-table th {
  background: #f5f8fc;
  color: #3d4b68;
  font-size: 12px;
  text-transform: none;
}

.data-table tr:hover td {
  background: #fffdf7;
}

.project-card {
  overflow: hidden;
}

.project-card::before,
.workspace-hero::before {
  content: "";
  display: block;
  height: 4px;
  margin: -1px -1px 14px;
  background: linear-gradient(90deg, var(--navy-2), var(--gold), var(--red));
}

.workspace-tabs a.active {
  color: var(--deep-navy);
  border-color: rgba(246, 166, 9, 0.32);
  background: #fff7df;
  box-shadow: inset 0 -3px 0 var(--gold);
}

.auth-view {
  min-height: 100vh;
  background:
    radial-gradient(640px 320px at 10% 20%, rgba(246, 166, 9, 0.2), transparent 68%),
    linear-gradient(110deg, rgba(0, 6, 46, 0.92) 0 51%, rgba(247, 249, 254, 0.96) 51% 100%),
    url("../img/login-bg.jpg") center / cover no-repeat;
}

.auth-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.78fr);
  background: transparent;
}

.auth-hero {
  color: #fff;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.1), transparent 30%),
    linear-gradient(170deg, transparent 0 56%, rgba(246, 166, 9, 0.42) 57% 58%, transparent 59%),
    linear-gradient(176deg, transparent 0 64%, rgba(211, 6, 36, 0.52) 65% 66%, transparent 67%);
}

.auth-logo {
  position: relative;
  z-index: 1;
  width: min(300px, 72vw);
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 22px 50px rgba(0, 6, 46, 0.28);
}

.auth-title {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 18px 40px rgba(0, 6, 46, 0.32);
}

.auth-title span {
  color: var(--gold);
}

.auth-copy {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
}

.auth-feature {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 42px rgba(0, 6, 46, 0.18);
}

.auth-feature b {
  color: #fff;
}

.auth-feature span {
  color: rgba(255, 255, 255, 0.7);
}

.auth-panel {
  border-left: 0;
  background: rgba(255, 255, 255, 0.82);
}

.auth-card {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 70px rgba(2, 11, 69, 0.18);
}

.auth-card h1 {
  color: var(--deep-navy);
  text-align: left;
}

.auth-card p {
  text-align: left;
}

.auth-card .auth-lang {
  position: static;
  float: right;
  margin: -8px -4px 12px 16px;
}

.auth-preloader {
  background:
    radial-gradient(circle at 50% 46%, rgba(246, 166, 9, 0.16), transparent 30%),
    linear-gradient(135deg, #ffffff, #edf3ff);
}

.auth-preloader::before {
  content: "";
  position: absolute;
  width: min(540px, 84vw);
  height: min(190px, 32vw);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(246, 166, 9, 0.2), transparent 68%);
  filter: blur(10px);
  animation: synarGlow 1.2s var(--ease-ui) infinite alternate;
}

.auth-preloader img {
  position: relative;
  z-index: 1;
}

@keyframes synarGlow {
  from {
    opacity: 0.54;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

.bottom-nav {
  box-shadow: 0 -14px 34px rgba(2, 11, 69, 0.12);
}

.bottom-nav button {
  border: 0;
}

.bottom-nav button.quick-plus {
  transform: translateY(-14px);
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--crimson));
  box-shadow: 0 14px 28px rgba(211, 6, 36, 0.28);
}

.bottom-nav button.quick-plus .icon {
  width: 1.25em;
  height: 1.25em;
}

.mobile-menu-fab,
.mobile-menu-sheet {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    padding-bottom: 86px;
  }

  .sidebar {
    background:
      linear-gradient(180deg, rgba(0, 6, 46, 0.94), rgba(2, 11, 69, 0.97)),
      url("../img/sidebar-background.jpg") center bottom / cover no-repeat;
  }

  body.sidebar-collapsed .sidebar-top {
    flex-direction: row;
    justify-content: flex-start;
  }

  body.sidebar-collapsed .sidebar-logo {
    width: auto;
    min-height: 66px;
    justify-content: flex-start;
  }

  body.sidebar-collapsed .sidebar-role-card div {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .topbar {
    min-height: 72px;
    padding: 10px 14px;
  }

  .topbar .mobile-menu-btn {
    display: inline-grid;
  }

  .topbar-left {
    flex: 1;
  }

  .top-actions {
    gap: 8px;
  }

  .topbar .auth-lang {
    display: none;
  }

  .profile-button {
    padding: 4px;
  }

  .bottom-nav {
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(220, 229, 242, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    padding: 8px 10px;
  }

  .bottom-nav a,
  .bottom-nav > button {
    min-width: 0;
  }

  .bottom-nav button {
    min-height: 54px;
    width: 100%;
    border-radius: 14px;
    color: #6a7690;
    background: transparent;
  }

  .bottom-nav button.active {
    color: var(--deep-navy);
    background: #fff2c9;
  }

  .mobile-menu-fab {
    position: fixed;
    right: 18px;
    bottom: 92px;
    z-index: 46;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--deep-navy), var(--navy-2));
    color: #fff;
    box-shadow: 0 18px 36px rgba(2, 11, 69, 0.24);
  }

  body.has-sticky-actions .mobile-menu-fab {
    display: none;
  }

  .mobile-more-open .mobile-menu-fab {
    background: linear-gradient(135deg, var(--red), var(--crimson));
  }

  .mobile-menu-sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-more-open .mobile-menu-sheet {
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-menu-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 6, 46, 0.42);
    opacity: 0;
    transition: opacity 0.22s var(--ease-ui);
  }

  .mobile-more-open .mobile-menu-scrim {
    opacity: 1;
  }

  .mobile-menu-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 96px;
    padding: 10px 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 26px 60px rgba(0, 6, 46, 0.24);
    transform: translateY(20px) scale(0.98);
    opacity: 0;
    transition: transform 0.24s var(--ease-ui), opacity 0.24s var(--ease-ui);
  }

  .mobile-more-open .mobile-menu-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .mobile-menu-grip {
    width: 42px;
    height: 4px;
    margin: 0 auto 12px;
    border-radius: 99px;
    background: #d9e2ef;
  }

  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-menu-head small {
    display: block;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .mobile-menu-head b {
    color: var(--deep-navy);
    font-size: 18px;
  }

  .mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .mobile-menu-grid a {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 78px;
    padding: 12px 8px;
    border: 1px solid #dce5f2;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--deep-navy);
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-menu-grid a.active {
    border-color: rgba(246, 166, 9, 0.5);
    background: #fff2c9;
  }

  .mobile-menu-grid .icon {
    color: var(--navy-2);
    font-size: 18px;
  }

  .site-diary-form .sticky-actions {
    bottom: 104px;
    border-radius: 18px;
    box-shadow: 0 -16px 40px rgba(2, 11, 69, 0.14);
  }
}

@media (max-width: 740px) {
  .main-content {
    padding-inline: 12px;
  }

  .page-heading h1 {
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 19px;
  }

  .top-actions .icon-button {
    width: 39px;
    height: 39px;
  }

  .auth-view {
    background:
      linear-gradient(180deg, rgba(0, 6, 46, 0.78), rgba(248, 250, 252, 0.96) 42%),
      url("../img/login-bg.jpg") center top / cover no-repeat;
  }

  .auth-layout {
    display: block;
    min-height: 100vh;
    padding: 20px 12px 34px;
  }

  .auth-hero {
    min-height: 220px;
    padding: 16px 8px 12px;
    justify-content: flex-end;
  }

  .auth-logo {
    width: min(250px, 72vw);
    margin-bottom: 18px;
  }

  .auth-title {
    margin-top: 10px;
    font-size: clamp(34px, 12vw, 48px);
  }

  .auth-copy {
    font-size: 14px;
  }

  .auth-feature-grid {
    display: none;
  }

  .auth-panel {
    padding: 0;
    background: transparent;
  }

  .auth-card {
    width: 100%;
    padding: 22px;
    border-radius: 18px;
  }

  .auth-card .auth-lang {
    margin-bottom: 8px;
  }

  .demo-login-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-menu-panel {
    bottom: 92px;
  }
}

/* Synar Setara faithful correction pass */
:root {
  --legacy-navy: #020b45;
  --legacy-deep: #00062e;
  --legacy-red: #d30624;
  --legacy-gold: #f6a609;
  --legacy-line: #dde4f0;
  --mobile-nav-height: 76px;
  --sidebar: 270px;
}

.sidebar {
  width: auto;
  padding: 18px 14px;
  overflow: hidden auto;
  background-color: var(--legacy-navy);
  background-image: url("../img/sidebar-background.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  isolation: isolate;
}

.sidebar::before,
.sidebar::after {
  content: "";
  position: absolute;
  left: -72%;
  right: auto;
  width: 145%;
  height: 2px;
  z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(246, 166, 9, 0.78), rgba(255, 255, 255, 0.42), transparent);
  filter: drop-shadow(0 0 10px rgba(246, 166, 9, 0.28));
  transform: rotate(-28deg);
  animation: sidebarCyberLine 8s linear infinite;
  pointer-events: none;
  opacity: 0.75;
}

.sidebar::before {
  top: 22%;
  animation-duration: 9s;
}

.sidebar::after {
  top: 56%;
  bottom: auto;
  animation-delay: 3.2s;
}

@keyframes sidebarCyberLine {
  0% {
    transform: translateX(-16%) rotate(-28deg);
    opacity: 0;
  }
  12%,
  78% {
    opacity: 1;
  }
  100% {
    transform: translateX(145%) rotate(-28deg);
    opacity: 0;
  }
}

.sidebar-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 0;
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: auto;
  margin: 2px 2px 22px;
}

.sidebar-logo {
  flex: 1;
  min-width: 0;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar-logo img {
  width: 188px;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.24));
}

.sidebar-logo .logo-mark {
  display: none;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.sidebar-collapse-toggle {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.sidebar-collapse-toggle:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-section-label {
  margin: 20px 10px 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-nav {
  display: grid;
  gap: 4px;
  margin-top: 0;
}

.side-link {
  min-height: 42px;
  padding: 10px;
  gap: 10px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 800;
  background: rgba(2, 11, 69, 0.18);
  border: 1px solid transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.side-link .icon {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.9);
}

.side-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
}

.side-link.active {
  color: #fff;
  border-color: rgba(246, 166, 9, 0.38);
  background: linear-gradient(135deg, rgba(246, 166, 9, 0.24), rgba(211, 6, 36, 0.16));
  box-shadow: inset 3px 0 0 var(--legacy-gold), 0 10px 22px rgba(0, 0, 0, 0.16);
}

.nav-badge {
  background: var(--legacy-red);
  box-shadow: 0 8px 20px rgba(211, 6, 36, 0.36);
}

.role-section-label {
  margin-top: 28px;
}

.sidebar-role-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin: 8px 6px 0;
  padding: 12px;
  border: 1px solid rgba(246, 166, 9, 0.38);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.3), transparent 26%),
    linear-gradient(135deg, #b87300, #f6a609 42%, #8a0015);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
}

.sidebar-role-card b,
.sidebar-role-card small {
  display: block;
}

.sidebar-role-card b {
  font-size: 13px;
  line-height: 1.2;
}

.sidebar-role-card small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.role-icon-shell {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, #fff4c2 0 18%, transparent 19%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 166, 9, 0.28));
  border: 1px solid rgba(246, 166, 9, 0.45);
  box-shadow: 0 0 0 4px rgba(246, 166, 9, 0.16), 0 12px 20px rgba(211, 6, 36, 0.18);
  color: var(--legacy-navy);
}

.role-icon-shell .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 88px 1fr;
}

body.sidebar-collapsed .sidebar {
  padding-left: 12px;
  padding-right: 12px;
}

body.sidebar-collapsed .sidebar-top {
  display: grid;
  justify-items: center;
  gap: 10px;
}

body.sidebar-collapsed .sidebar-logo {
  width: auto;
  min-height: auto;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-logo .logo-full,
body.sidebar-collapsed .side-link > span:not(.nav-badge),
body.sidebar-collapsed .sidebar-section-label {
  display: none;
}

body.sidebar-collapsed .sidebar-logo .logo-mark {
  display: block;
}

body.sidebar-collapsed .side-link {
  justify-content: center;
  padding: 11px 0;
}

body.sidebar-collapsed .sidebar-role-card {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 8px;
  margin: 20px 0 0;
}

body.sidebar-collapsed .sidebar-role-card div {
  display: none;
}

body.sidebar-collapsed .role-icon-shell {
  width: 36px;
  height: 36px;
}

.topbar {
  min-height: 78px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.page-heading h1 {
  font-size: 26px;
  font-weight: 900;
}

.auth-view {
  min-height: 100vh;
  background: #f7f9fe;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(500px, 650px);
  background: #f7f9fe;
}

.auth-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 56px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0, 6, 46, 0.08), rgba(0, 6, 46, 0.02)),
    url("../img/login-bg.jpg") center center / cover no-repeat;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(90deg, rgba(0, 6, 46, 0.22), transparent 54%, rgba(0, 6, 46, 0.1));
  opacity: 0.82;
  pointer-events: none;
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(circle at 84% 22%, rgba(211, 6, 36, 0.1), transparent 28%);
  opacity: 0.44;
  pointer-events: none;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.login-cyber-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-cyber-lines::before,
.login-cyber-lines::after {
  content: "";
  position: absolute;
  width: 62%;
  height: 2px;
  left: -70%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.74), rgba(246, 166, 9, 0.64), transparent);
  filter: drop-shadow(0 0 10px rgba(246, 166, 9, 0.34));
  animation: loginCyberScan 7.5s linear infinite;
}

.login-cyber-lines::before {
  top: 28%;
}

.login-cyber-lines::after {
  top: 44%;
  animation-delay: 2.8s;
  opacity: 0.72;
}

@keyframes loginCyberScan {
  0% {
    transform: translateX(0) skewX(-28deg);
  }
  100% {
    transform: translateX(290%) skewX(-28deg);
  }
}

.auth-logo {
  width: min(360px, 38vw);
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.22));
}

.login-copy-card {
  width: min(610px, 100%);
  margin-top: 82px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.07));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.auth-title {
  max-width: 660px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(34px, 3.7vw, 50px);
  line-height: 1;
  text-shadow: none;
}

.auth-title span {
  color: var(--legacy-red);
}

.auth-copy {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin-top: 22px;
}

.auth-feature {
  display: block;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(246, 166, 9, 0.34);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(246, 166, 9, 0.22), rgba(255, 255, 255, 0.08) 44%, rgba(211, 6, 36, 0.1));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.auth-feature .icon {
  color: #ffd46a;
  filter: drop-shadow(0 5px 12px rgba(246, 166, 9, 0.24));
}

.auth-feature b {
  display: block;
  margin-top: 9px;
  color: #fff;
  font-size: 14px;
}

.auth-feature span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.login-footnote {
  position: absolute;
  left: 56px;
  bottom: 28px;
  z-index: 2;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, #f6a609, #c77800);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(246, 166, 9, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.auth-panel {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
  border-left: 0;
  background:
    radial-gradient(circle at 90% 8%, rgba(211, 6, 36, 0.06), transparent 22%),
    linear-gradient(135deg, #fff 0%, #f3f6fb 100%);
}

.auth-card {
  position: relative;
  width: min(100%, 460px);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-footer {
  display: none;
}

.auth-card h1 {
  margin: 0 0 4px;
  color: var(--legacy-navy);
  font-size: 24px;
  text-align: left;
}

.auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
  text-align: left;
}

.auth-card .auth-lang {
  position: absolute;
  top: -44px;
  right: 0;
  float: none;
  margin: 0;
  border: 1px solid rgba(246, 166, 9, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(246, 166, 9, 0.16), rgba(255, 255, 255, 0.88));
}

.auth-card .auth-lang button {
  min-width: 38px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--legacy-navy);
}

.auth-card .auth-lang button.active {
  background: transparent;
  color: var(--legacy-navy);
}

.auth-input-wrap {
  position: relative;
  display: block;
}

.auth-input-wrap > .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  z-index: 2;
  width: 18px;
  height: 18px;
  color: #667085;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-input-wrap > input {
  padding-left: 42px;
}

.auth-card input:focus {
  border-color: var(--legacy-red);
  box-shadow: 0 0 0 3px rgba(211, 6, 36, 0.12);
}

.auth-card .btn-primary {
  background: linear-gradient(135deg, #e00024, #c90020);
  box-shadow: 0 14px 26px rgba(211, 6, 36, 0.22);
}

.demo-switcher {
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.demo-switcher > small {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-switcher > small::before,
.demo-switcher > small::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--legacy-line);
}

.demo-login-grid {
  gap: 8px;
}

.demo-login-grid button {
  min-height: 48px;
  justify-content: flex-start;
  padding-inline: 14px;
  border: 1px solid var(--legacy-line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--legacy-navy);
  font-weight: 900;
}

.bottom-nav {
  border-radius: 0;
}

@media (max-width: 980px) {
  .sidebar,
  body.sidebar-open .sidebar {
    display: none !important;
    transform: translateX(-110%) !important;
  }

  .sidebar {
    width: min(86vw, 300px);
    padding: 18px 14px;
  }

  body.sidebar-collapsed .sidebar-top {
    display: flex;
    justify-items: stretch;
  }

  body.sidebar-collapsed .sidebar-logo .logo-full,
  body.sidebar-collapsed .side-link > span:not(.nav-badge),
  body.sidebar-collapsed .sidebar-section-label {
    display: initial;
  }

  body.sidebar-collapsed .sidebar-logo .logo-mark {
    display: none;
  }

  body.sidebar-collapsed .side-link {
    justify-content: flex-start;
    padding: 10px;
  }

  body.sidebar-collapsed .sidebar-role-card {
    grid-template-columns: 42px minmax(0, 1fr);
    justify-items: stretch;
    padding: 12px;
    margin: 8px 6px 0;
  }

  body.sidebar-collapsed .sidebar-role-card div {
    display: block;
  }

  .bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: var(--mobile-nav-height);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid rgba(221, 228, 240, 0.95);
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), #fff),
      radial-gradient(circle at 50% -30%, rgba(246, 166, 9, 0.2), transparent 42%);
    box-shadow: 0 -18px 38px rgba(2, 11, 69, 0.14);
    backdrop-filter: blur(18px);
  }

  .bottom-nav a,
  .bottom-nav > button {
    display: grid;
    min-width: 0;
    color: inherit;
    text-decoration: none;
  }

  .bottom-nav button {
    min-height: 52px;
    width: 100%;
    display: grid;
    place-items: center;
    gap: 2px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: #344054;
    font-size: 10px;
    font-weight: 900;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
  }

  .bottom-nav button .icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.25;
  }

  .bottom-nav a:hover button,
  .bottom-nav > button:hover,
  .bottom-nav a:focus-visible button,
  .bottom-nav > button:focus-visible {
    color: #07163d;
    border-color: rgba(246, 166, 9, 0.5);
    background: linear-gradient(135deg, rgba(255, 248, 223, 0.96), rgba(255, 255, 255, 0.94));
    box-shadow: 0 10px 22px rgba(2, 11, 69, 0.1), inset 0 -2px 0 rgba(211, 6, 36, 0.35);
    transform: translateY(-3px);
  }

  .bottom-nav a:active button,
  .bottom-nav > button:active {
    transform: translateY(-1px) scale(0.96);
  }

  .bottom-nav button span {
    display: none;
  }

  .bottom-nav button.active {
    color: var(--legacy-navy);
    background: linear-gradient(135deg, rgba(246, 166, 9, 0.16), rgba(255, 255, 255, 0.96));
    border-color: rgba(246, 166, 9, 0.34);
    box-shadow: inset 0 -2px 0 rgba(211, 6, 36, 0.55);
    transform: none;
  }

  .bottom-nav button.quick-plus {
    position: relative;
    min-height: 62px;
    height: 62px;
    max-width: 64px;
    width: 64px;
    justify-self: center;
    align-self: start;
    margin-top: -22px;
    color: #fff !important;
    background:
      radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.28), transparent 30%),
      linear-gradient(145deg, #d30624 0%, #a7041d 58%, #720317 100%) !important;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow:
      0 12px 24px rgba(211, 6, 36, 0.22),
      0 0 0 4px rgba(255, 255, 255, 0.86),
      0 0 0 6px rgba(246, 166, 9, 0.18);
    overflow: visible;
    transform: none;
  }

  .bottom-nav button.quick-plus.active,
  .bottom-nav button.quick-plus:hover {
    color: #fff !important;
    background:
      radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.26), transparent 30%),
      linear-gradient(145deg, #f6a609 0%, #d98200 48%, #b30521 100%) !important;
    border-color: #fff;
    box-shadow:
      0 13px 26px rgba(211, 6, 36, 0.24),
      0 0 0 3px rgba(246, 166, 9, 0.34),
      0 0 0 7px rgba(255, 255, 255, 0.72),
      inset 0 -4px 9px rgba(2, 11, 69, 0.18);
  }

  .bottom-nav button.quick-plus span {
    display: none;
  }

  .bottom-nav button.quick-plus .icon {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: currentColor;
    stroke-width: 2.35;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
  }

  .bottom-nav[style*="--nav-count: 3"] {
    grid-template-columns: repeat(3, 74px);
    justify-content: center;
    padding-inline: 18px;
  }

  .bottom-nav[style*="--nav-count: 3"] button {
    max-width: 74px;
    justify-self: center;
  }

  .mobile-menu-fab {
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
    border: 1px solid rgba(221, 228, 240, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--legacy-navy);
    box-shadow: 0 16px 32px rgba(2, 11, 69, 0.18), 0 0 0 4px rgba(255, 255, 255, 0.62);
  }

  .mobile-more-open .mobile-menu-fab,
  .mobile-menu-fab:hover {
    border-color: rgba(246, 166, 9, 0.48);
    background:
      radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
      linear-gradient(135deg, var(--legacy-navy), #08165a 58%, var(--legacy-red));
    color: #ffd46a;
    box-shadow: 0 18px 36px rgba(2, 11, 69, 0.28), 0 0 0 5px rgba(246, 166, 9, 0.16);
  }

  .mobile-menu-sheet {
    align-items: flex-end;
    background: rgba(2, 11, 69, 0.44);
    backdrop-filter: blur(5px);
  }

  .mobile-menu-panel {
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 76vh;
    overflow: auto;
    padding: 12px 12px calc(18px + env(safe-area-inset-bottom));
    border: 1px solid var(--legacy-line);
    border-radius: 18px 18px 0 0;
    background:
      linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)),
      url("../img/sidebar-background.jpg") center / cover no-repeat;
    box-shadow: 0 -24px 60px rgba(2, 11, 69, 0.26);
  }

  .site-diary-form .sticky-actions {
    bottom: calc(var(--mobile-nav-height) + 12px);
  }

  body.has-sticky-actions .mobile-menu-fab {
    display: none;
  }

  .dropdown {
    right: 10px;
    width: min(236px, calc(100vw - 44px));
    border-radius: 16px;
    box-shadow: 0 22px 48px rgba(2, 11, 69, 0.2);
  }

  .profile-menu.dropdown {
    width: min(208px, calc(100vw - 48px));
  }

  .profile-menu .dropdown-head {
    padding: 10px 13px;
    color: #07163d;
    background:
      radial-gradient(circle at 12% 20%, rgba(246, 166, 9, 0.16), transparent 28%),
      linear-gradient(135deg, #fff, #fff8df);
    border-bottom: 1px solid rgba(246, 166, 9, 0.22);
  }

  .profile-menu .dropdown-item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
  }

  .profile-menu .dropdown-item .icon {
    width: 17px;
    height: 17px;
    color: #07163d;
  }

  .profile-menu .dropdown-item:hover {
    background: #fff8df;
  }

  .profile-menu .dropdown-item b {
    font-size: 12px;
  }

  .profile-menu .dropdown-item small {
    font-size: 10.5px;
    overflow-wrap: anywhere;
  }

  .profile-menu form {
    margin: 0;
  }

  .profile-menu .dropdown-list {
    max-height: none;
    overflow: visible;
  }

  .topbar .profile-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .topbar .profile-button .avatar {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 740px) {
  .auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    min-height: 100dvh;
    padding: 18px 16px 24px;
    background:
      linear-gradient(180deg, rgba(0, 6, 46, 0.22), rgba(0, 6, 46, 0.34)),
      url("../img/login-bg.jpg") center center / cover no-repeat;
  }

  .auth-hero {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    width: 100%;
    max-width: 430px;
    padding: 0;
    background: transparent;
  }

  .auth-card {
    width: 100%;
    padding: 23px 18px 19px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
    overflow: hidden;
  }

  .auth-card::before {
    content: "";
    display: block;
    width: min(286px, 78%);
    height: 82px;
    margin: 0 auto 16px;
    background: url("../img/synar-logo-bigsize.png") center / contain no-repeat;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.24));
  }

  .auth-card .auth-lang {
    position: static;
    justify-content: center;
    width: max-content;
    margin: 0 auto 12px;
  }

  .auth-card h1,
  .auth-card p {
    text-align: center;
  }

  .auth-card h1 {
    font-size: 22px;
  }

  .demo-login-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-menu-panel {
    bottom: 0;
  }
}

/* Ultimate Synar visual layer: visible Synar backgrounds, red/gold accents and analytics dashboards */
body {
  position: relative;
  isolation: isolate;
  background-color: #f6f8fc;
  background-image: none !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../img/synar-bg-desktop.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.16;
}

.app-shell,
.auth-view {
  position: relative;
  z-index: 1;
}

.shell-main,
.main-content {
  background: #fff !important;
}

.app-shell {
  background: transparent !important;
}

.main-content {
  min-height: calc(100vh - 78px);
  border-left: 1px solid rgba(220, 229, 242, 0.86);
}

.synar-page-surface,
.page-section {
  position: relative;
}

.card,
.kpi-card,
.project-card,
.phase-card,
.phase-card-soft,
.rail-card,
.mobile-card,
.issue-card,
.task-card,
.data-table-wrap {
  background: #fff;
}

.page-heading h1 {
  color: #fff;
  text-shadow: 0 12px 26px rgba(0, 6, 46, 0.34);
}

.section-title-row h2 {
  color: #07163d;
  text-shadow: 0 8px 18px rgba(255, 255, 255, 0.72);
}

.section-title-row p {
  color: #53617d;
}

.breadcrumb,
.breadcrumb small {
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb span:first-child {
  color: #ffd46a;
}

.topbar {
  background: rgba(0, 6, 46, 0.58);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.topbar .auth-lang,
.topbar .icon-button,
.topbar .profile-button {
  background: rgba(255, 255, 255, 0.94);
}

.topbar .profile-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  justify-content: center;
  padding: 4px;
  border-radius: 14px;
}

.topbar .profile-button .avatar {
  width: 36px;
  height: 36px;
}

.topbar .profile-button .profile-avatar-icon .icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.synar-lang-switch {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(246, 166, 9, 0.42) !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(246, 166, 9, 0.18), transparent 30%),
    rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 12px 26px rgba(2, 11, 69, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.synar-lang-switch .lang-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #07163d;
  background: linear-gradient(135deg, #fff7d7, #ffd46a);
  border: 1px solid rgba(246, 166, 9, 0.45);
}

.synar-lang-switch .lang-icon .icon {
  width: 16px;
  height: 16px;
}

.synar-lang-switch button {
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #6b7487 !important;
  font-size: 13px;
  font-weight: 950;
  box-shadow: none !important;
}

.synar-lang-switch button.active {
  color: #07163d !important;
  background: linear-gradient(135deg, #fff7d7, #ffd46a) !important;
  box-shadow: inset 0 -2px 0 rgba(211, 6, 36, 0.22), 0 6px 14px rgba(246, 166, 9, 0.18) !important;
}

.profile-menu,
.dropdown[data-dropdown="notifications"] {
  width: min(220px, calc(100vw - 28px));
  border: 1px solid rgba(246, 166, 9, 0.24);
  border-radius: 16px;
  box-shadow: 0 22px 48px rgba(2, 11, 69, 0.18);
}

.profile-menu .dropdown-head {
  padding: 13px 16px;
  color: #07163d;
  background:
    radial-gradient(circle at 12% 20%, rgba(246, 166, 9, 0.16), transparent 28%),
    linear-gradient(135deg, #fff, #fff8df);
  border-bottom: 1px solid rgba(246, 166, 9, 0.22);
  font-size: 15px;
}

.profile-menu .dropdown-item {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  min-height: 52px;
  padding: 10px 13px;
}

.profile-menu .dropdown-item .icon {
  width: 17px;
  height: 17px;
  color: #07163d;
}

.profile-menu .dropdown-item:hover {
  background: #fff8df;
}

.btn-primary,
.micro-link.primary,
.project-card-actions .btn-primary {
  background: linear-gradient(135deg, #e00024, #b9001e) !important;
  box-shadow: 0 14px 28px rgba(211, 6, 36, 0.28) !important;
}

.btn-outline,
.btn-soft,
.mini-btn,
.micro-link {
  border-color: rgba(246, 166, 9, 0.38);
  color: #07163d;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 244, 206, 0.78));
}

.icon-bubble.blue,
.icon-bubble.purple {
  color: #8a0015;
  background: linear-gradient(135deg, #fff4c2, #f6a609);
}

.icon-bubble.gold {
  color: #7a0319;
  background: linear-gradient(135deg, #ffe7a2, #f6a609);
}

.icon-bubble.red {
  color: #fff;
  background: linear-gradient(135deg, #d30624, #8a0015);
}

.icon-bubble.green {
  color: #fff;
  background: linear-gradient(135deg, #18a77b, #0b6b4e);
}

.kpi-card {
  overflow: hidden;
  border-color: rgba(246, 166, 9, 0.2);
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #f6a609, #d30624);
}

.kpi-card::after {
  background:
    radial-gradient(150px 90px at 96% 0%, rgba(246, 166, 9, 0.18), transparent 70%),
    radial-gradient(120px 80px at 12% 105%, rgba(211, 6, 36, 0.08), transparent 70%);
}

.badge.blue,
.badge.review,
.badge.info {
  color: #865800;
  background: linear-gradient(180deg, #fff4ce, #ffe6a1);
  border: 1px solid rgba(246, 166, 9, 0.26);
}

.role-icon-shell img,
.demo-role-icon img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.demo-login-grid button {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-role-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, #fff4c2 0 18%, transparent 19%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 166, 9, 0.28));
  border: 1px solid rgba(246, 166, 9, 0.45);
  box-shadow: 0 0 0 3px rgba(246, 166, 9, 0.14);
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(2, 11, 69, 0.46), rgba(8, 22, 90, 0.34) 58%, rgba(138, 0, 21, 0.3));
  color: #fff;
  box-shadow: 0 24px 58px rgba(0, 6, 46, 0.24);
  overflow: hidden;
}

.dashboard-hero h2 {
  margin: 5px 0 8px;
  color: #fff;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 0.98;
}

.dashboard-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffd46a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-score {
  min-width: 170px;
  padding: 16px;
  border: 1px solid rgba(246, 166, 9, 0.32);
  border-radius: 12px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.26), transparent 30%),
    linear-gradient(135deg, #b87300, #f6a609 46%, #8a0015);
  color: #fff;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 18px 34px rgba(0, 0, 0, 0.2);
}

.hero-score small,
.hero-score span {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.hero-score strong {
  display: block;
  margin: 3px 0;
  font-size: 42px;
  line-height: 1;
}

.visual-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.visual-dashboard-grid .span-2 {
  grid-column: span 2;
}

.director-analytics-page .visual-dashboard-grid .curve-card.span-2 {
  grid-column: span 3;
}

.director-analytics-page .visual-dashboard-grid .analytic-card {
  grid-column: span 2;
}

.pm-command-page .visual-dashboard-grid .curve-card.span-2 {
  grid-column: span 4;
}

.pm-command-page .visual-dashboard-grid .analytic-card {
  grid-column: span 1;
}

.site-mobile-page .project-card,
.site-mobile-page .mobile-stat,
.site-mobile-page .card {
  border-color: rgba(246, 166, 9, 0.28);
  box-shadow: 0 18px 42px rgba(0, 6, 46, 0.12);
}

.site-mobile-page .project-card b,
.site-mobile-page .mobile-stat b {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.site-diary-cta {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(135deg, #d30624 0%, #a7041d 48%, #7a0319 100%) !important;
  border: 1px solid rgba(246, 166, 9, 0.62);
  color: #fff;
  box-shadow: 0 20px 38px rgba(150, 4, 28, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.site-diary-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 48px rgba(150, 4, 28, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.site-diary-cta .icon-bubble {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.34), transparent 32%),
    linear-gradient(145deg, #ffd66b, #f6a609 58%, #c77700) !important;
  color: var(--legacy-navy) !important;
}

.site-diary-cta b,
.site-diary-cta small {
  color: #fff !important;
}

.curve-card,
.analytic-card {
  border: 1px solid rgba(246, 166, 9, 0.22);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 6, 46, 0.14);
  padding: 18px;
}

.curve-line-chart {
  margin-top: 14px;
}

.curve-line-chart svg {
  width: 100%;
  min-height: 270px;
  display: block;
  overflow: visible;
}

.curve-line-chart.compact svg {
  min-height: 220px;
}

.curve-grid {
  fill: none;
  stroke: rgba(148, 163, 184, 0.2);
  stroke-width: 0.8;
  stroke-dasharray: 3 6;
}

.curve-axis-line {
  fill: none;
  stroke: rgba(15, 23, 42, 0.18);
  stroke-width: 1;
}

.curve-x-label,
.curve-y-label {
  fill: #69748c;
  font-size: 7.5px;
  font-weight: 850;
}

.curve-x-label {
  text-anchor: middle;
}

.curve-area {
  opacity: 0.16;
}

.curve-area.planned {
  fill: #f6a609;
}

.curve-area.actual {
  fill: #d30624;
  opacity: 0.11;
}

.curve-line {
  fill: none;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 10px rgba(2, 11, 69, 0.08));
}

.curve-line.planned {
  stroke: #f6a609;
}

.curve-line.actual {
  stroke: #d30624;
}

.curve-dot {
  stroke: #fff;
  stroke-width: 2.4;
}

.curve-dot.planned {
  fill: #f6a609;
}

.curve-dot.actual {
  fill: #d30624;
}

.curve-axis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: -8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

/* Cross-role UI polish: cleaner white workspace, warmer accents, compact data views */
.page-section {
  gap: 18px;
}

.card,
.card-pad,
.data-table-wrap,
.project-card,
.phase-card,
.rail-card,
.mobile-card,
.issue-card,
.task-card,
.claim-card,
.document-card {
  border-color: rgba(225, 231, 240, 0.96) !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 34px rgba(2, 11, 69, 0.07) !important;
}

.card:hover,
.project-card:hover,
.phase-card:hover,
.issue-card:hover,
.task-card:hover {
  border-color: rgba(246, 166, 9, 0.38) !important;
  box-shadow: 0 18px 42px rgba(2, 11, 69, 0.1) !important;
}

.data-table-wrap {
  overflow: hidden;
}

.data-table-wrap table thead th,
table thead th {
  background: linear-gradient(180deg, #fff8df, #fff);
  color: #07163d;
  border-bottom: 1px solid rgba(246, 166, 9, 0.18);
}

.data-table-wrap table tbody tr:hover,
table tbody tr:hover {
  background: #fffaf0;
}

input,
select,
textarea {
  border-color: rgba(202, 213, 229, 0.96);
  border-radius: 10px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(246, 166, 9, 0.7) !important;
  box-shadow: 0 0 0 4px rgba(246, 166, 9, 0.14) !important;
  outline: none;
}

.workspace-tabs,
.notification-tabs {
  border: 1px solid rgba(225, 231, 240, 0.95);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(2, 11, 69, 0.06);
}

.workspace-tabs a,
.notification-tabs a {
  border-radius: 11px;
}

.workspace-tabs a.active,
.notification-tabs a.active {
  color: #07163d;
  background: linear-gradient(135deg, #fff7d7, #ffd46a);
  box-shadow: inset 0 -2px 0 rgba(211, 6, 36, 0.28);
}

.filter-row,
.search-row,
.form-grid,
.form-stack {
  gap: 12px;
}

.empty-state,
.empty-inline {
  border-color: rgba(246, 166, 9, 0.24);
  background: linear-gradient(135deg, #fff, #fffaf0);
}

.curve-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 180px;
  margin-top: 14px;
}

.curve-bars.compact {
  min-height: 120px;
}

.curve-point {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 4px;
  min-width: 0;
}

.curve-point small {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 850;
}

.curve-track {
  position: relative;
  height: 140px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.curve-bars.compact .curve-track {
  height: 90px;
}

.curve-track i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--h);
  border-radius: 999px 999px 0 0;
}

.curve-track.planned i {
  background: linear-gradient(180deg, #ffd46a, #f6a609);
}

.curve-track.actual i {
  background: linear-gradient(180deg, #e00024, #8a0015);
}

.curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  margin-right: 5px;
}

.dot.gold {
  background: #f6a609;
}

.dot.red {
  background: #d30624;
}

.dot.blue {
  background: #102d7c;
}

.analytic-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.analytic-card .panel-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #8a0015;
  background: linear-gradient(135deg, #fff4c2, #f6a609);
}

.analytic-card small {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.analytic-card strong {
  color: var(--legacy-navy);
  font-size: 34px;
  line-height: 1;
}

.analytic-card p,
.panel-copy {
  margin: 0;
  color: var(--muted);
}

.gold-panel {
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(135deg, #fff9e7, #fff 48%, #fff0c4);
}

.risk-strip {
  border-color: rgba(211, 6, 36, 0.18);
  background:
    radial-gradient(circle at 10% 10%, rgba(211, 6, 36, 0.08), transparent 26%),
    #fff;
}

.risk-strip .panel-icon {
  color: #fff;
  background: linear-gradient(135deg, #d30624, #8a0015);
}

.cpm-list,
.heatmap-list,
.pm-pulse-list,
.portfolio-card-grid,
.director-portfolio {
  display: grid;
  gap: 10px;
}

.cpm-row,
.heatmap-row,
.pm-pulse-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  background: #fff;
}

.cpm-row code {
  padding: 7px 9px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #020b45, #8a0015);
  font-weight: 900;
}

.cpm-row b,
.heatmap-row b,
.pm-pulse-item b {
  display: block;
  color: var(--legacy-navy);
}

.cpm-row small,
.heatmap-row small,
.pm-pulse-item small {
  color: var(--muted);
}

.mini-meter {
  height: 8px;
  min-width: 92px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.mini-meter i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f6a609, #d30624);
}

.red-meter i {
  background: linear-gradient(90deg, #d30624, #8a0015);
}

.director-portfolio,
.portfolio-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.director-portfolio div,
.portfolio-mini-card {
  padding: 13px;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  background: #fffdf7;
}

.director-portfolio b,
.portfolio-mini-card b {
  display: block;
  color: #0b5fd3;
}

.director-portfolio span,
.portfolio-mini-card h4 {
  display: block;
  margin: 5px 0;
  color: var(--legacy-navy);
  font-size: 15px;
}

.director-portfolio small,
.portfolio-mini-card small {
  color: var(--muted);
  font-weight: 750;
}

.portfolio-mini-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dual-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.dual-progress > div {
  padding: 12px;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  background: #fffdf7;
}

.dual-progress span {
  color: var(--muted);
  font-weight: 850;
}

.dual-progress b {
  display: block;
  margin: 4px 0 8px;
  color: var(--legacy-navy);
  font-size: 28px;
}

@media (max-width: 1180px) {
  .visual-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual-dashboard-grid .span-2,
  .director-analytics-page .visual-dashboard-grid .curve-card.span-2,
  .director-analytics-page .visual-dashboard-grid .analytic-card,
  .pm-command-page .visual-dashboard-grid .curve-card.span-2,
  .pm-command-page .visual-dashboard-grid .analytic-card {
    grid-column: span 1;
  }
}

@media (max-width: 980px) {
  body {
    background-image: none !important;
  }

  body::before {
    background-image: url("../img/synar-bg-mobile.jpg");
    background-attachment: scroll;
    opacity: 0.14;
  }

  .section-title-row h2,
  .page-heading h1 {
    text-shadow: 0 10px 22px rgba(0, 6, 46, 0.42);
  }

  .dashboard-hero {
    display: grid;
    padding: 18px;
  }

  .hero-score {
    width: 100%;
  }
}

@media (max-width: 740px) {
  .visual-dashboard-grid,
  .director-portfolio,
  .portfolio-card-grid,
  .dual-progress {
    grid-template-columns: 1fr;
  }

  .curve-bars {
    min-height: 132px;
  }

  .curve-line-chart svg,
  .curve-line-chart.compact svg {
    min-height: 170px;
  }

  .dashboard-hero {
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px;
  }

  .dashboard-hero h2 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .dashboard-hero p {
    font-size: 14px;
  }

  .hero-score {
    padding: 13px;
  }

  .hero-score strong {
    font-size: 38px;
  }

  .data-table-wrap {
    border-radius: 12px !important;
  }

  .data-table-wrap table tbody tr {
    border-color: rgba(246, 166, 9, 0.16);
  }

  .workspace-tabs {
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
  }

  .workspace-tabs a {
    min-width: max-content;
    padding-inline: 12px;
  }

  .curve-line {
    stroke-width: 3.5;
  }

  .curve-axis {
    font-size: 10px;
  }

  .curve-track {
    height: 100px;
  }

  .cpm-row,
  .heatmap-row,
  .pm-pulse-item {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* Final Synar premium tuning: clean white work area, compact profile, proper chart feel. */
.shell-main,
.main-content {
  background: rgba(255, 255, 255, 0.9) !important;
}

.topbar {
  background: #fff !important;
}

.topbar {
  color: #07163d;
  border-bottom: 1px solid rgba(218, 226, 238, 0.92) !important;
  box-shadow: 0 12px 28px rgba(2, 11, 69, 0.055) !important;
  backdrop-filter: none !important;
}

.topbar .page-heading h1 {
  color: #07163d !important;
  text-shadow: none !important;
}

.topbar .breadcrumb,
.topbar .breadcrumb small {
  color: #65718a !important;
}

.topbar .breadcrumb span:first-child {
  color: #d30624 !important;
}

.profile-menu {
  width: min(190px, calc(100vw - 24px)) !important;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(2, 11, 69, 0.18) !important;
}

.profile-menu .dropdown-head {
  display: none !important;
}

.profile-menu .dropdown-list {
  padding: 0 !important;
}

.profile-menu .dropdown-item {
  width: 100%;
  min-height: 50px !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 9px 12px !important;
  border-bottom: 1px solid rgba(220, 229, 242, 0.8);
}

.profile-menu .dropdown-item:last-child {
  border-bottom: 0;
}

.profile-menu .dropdown-item small {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu .dropdown-item:hover {
  background: linear-gradient(135deg, #fff8df, #fff) !important;
}

.profile-button {
  width: 46px !important;
  min-width: 46px !important;
  padding: 4px !important;
}

.profile-button .avatar {
  margin: 0 !important;
}

.curve-card {
  background: rgba(255, 255, 255, 0.9) !important;
}

.curve-line-chart {
  padding: 4px 0 0;
}

.curve-dot {
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 5px 7px rgba(2, 11, 69, 0.12));
}

.curve-dot.planned {
  fill: #f6a609;
}

.curve-dot.actual {
  fill: #d30624;
}

@media (max-width: 768px) {
  .topbar {
    min-height: 76px;
    padding: 14px 12px !important;
  }

  .profile-menu.dropdown {
    width: min(184px, calc(100vw - 36px)) !important;
  }

  .profile-menu .dropdown-item {
    min-height: 46px !important;
    padding: 8px 11px !important;
  }

  .profile-menu .dropdown-item small {
    max-width: 118px;
    font-size: 10px;
  }

  .bottom-nav span {
    display: none !important;
  }

  .bottom-nav button {
    min-height: 54px !important;
  }

  .bottom-nav button .icon,
  .bottom-nav a .icon {
    width: 24px !important;
    height: 24px !important;
  }

  .bottom-nav .quick-plus .icon {
    width: 31px !important;
    height: 31px !important;
  }

  .bottom-nav button:hover,
  .bottom-nav button:focus-visible,
  .bottom-nav a:hover button,
  .bottom-nav a:focus-visible button {
    transform: translateY(-3px);
    color: #d30624;
    background: linear-gradient(135deg, #fff9e8, #fff);
    box-shadow: 0 14px 26px rgba(246, 166, 9, 0.22);
  }

  .curve-line-chart svg,
  .curve-line-chart.compact svg {
    min-height: 210px;
  }
}

/* Synar Setara premium pass: white hero, 0.9 content panels, red/gold accents. */
.dashboard-hero,
.dashboard-hero.executive-hero,
.dashboard-hero.pm-hero {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(246, 166, 9, 0.24) !important;
  box-shadow: 0 18px 44px rgba(0, 6, 46, 0.1) !important;
}

.dashboard-hero .eyebrow {
  color: #d30624 !important;
}

.dashboard-hero h2,
.dashboard-hero p {
  color: #07163d !important;
  text-shadow: none !important;
}

.dashboard-hero p {
  color: #53617d !important;
}

.card,
.kpi-card,
.project-card,
.phase-card,
.phase-card-soft,
.rail-card,
.mobile-card,
.issue-card,
.task-card,
.data-table-wrap,
.analytic-card,
.curve-card,
.form-card,
.workspace-panel,
.notification-card,
.staff-card {
  background-color: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: saturate(1.12) blur(1px);
}

.kpi-card,
.project-card,
.phase-card,
.issue-card,
.task-card,
.claim-card,
.document-card,
.staff-card {
  border-color: rgba(246, 166, 9, 0.18) !important;
  box-shadow: 0 16px 36px rgba(0, 6, 46, 0.08) !important;
}

.kpi-card:hover,
.project-card:hover,
.issue-card:hover,
.task-card:hover,
.claim-card:hover,
.document-card:hover,
.staff-card:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 166, 9, 0.4) !important;
  box-shadow: 0 22px 48px rgba(0, 6, 46, 0.12) !important;
}

.data-table-wrap thead th,
.table thead th {
  background: linear-gradient(135deg, rgba(255, 249, 232, 0.96), rgba(255, 255, 255, 0.96)) !important;
  color: #07163d !important;
}

.badge.gold,
.badge.warning,
.status-badge.pending,
.priority-badge.medium {
  background: linear-gradient(135deg, #fff4c2, #f6a609) !important;
  color: #7a3f00 !important;
  border-color: rgba(246, 166, 9, 0.4) !important;
}

.badge.red,
.badge.danger,
.status-badge.overdue,
.priority-badge.high,
.priority-badge.critical {
  background: linear-gradient(135deg, #e00024, #a7041d) !important;
  color: #fff !important;
  border-color: rgba(211, 6, 36, 0.35) !important;
}

.btn-primary,
.btn-danger,
.action-primary {
  background: linear-gradient(135deg, #e00024, #a7041d) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-danger:hover,
.action-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(211, 6, 36, 0.24) !important;
}

.btn-outline,
.btn-soft,
.mini-btn,
.micro-link {
  border-color: rgba(246, 166, 9, 0.38) !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

.workspace-tabs,
.tab-bar,
.filter-bar {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(246, 166, 9, 0.18) !important;
}

.workspace-tabs a.active,
.tab-bar .active,
.filter-chip.active {
  background: linear-gradient(135deg, #fff4c2, #f6a609) !important;
  color: #07163d !important;
  box-shadow: inset 0 -2px 0 rgba(211, 6, 36, 0.22);
}

@media (max-width: 768px) {
  .shell-main,
  .main-content,
  .dashboard-hero,
  .card,
  .kpi-card,
  .project-card,
  .mobile-card,
  .data-table-wrap,
  .analytic-card,
  .curve-card {
    background-color: rgba(255, 255, 255, 0.9) !important;
  }

  .dashboard-hero h2 {
    color: #07163d !important;
  }
}

/* Operation polish: visible action columns, real project thumbnails, compact analytics. */
.data-table th:last-child,
.data-table td:last-child {
  min-width: 190px;
}

.table-actions {
  vertical-align: middle;
}

.table-actions > a,
.table-actions > button,
.table-actions > form {
  margin: 3px;
}

.table-actions > form {
  display: inline-flex;
}

.action-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.action-cell form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.action-cell .mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  white-space: nowrap;
}

.action-cell .mini-btn .icon {
  width: 15px;
  height: 15px;
}

.action-cell .mini-btn.success {
  color: #0b6b38;
  border-color: rgba(22, 163, 74, 0.28);
  background: linear-gradient(135deg, #ecfdf3, #fff);
}

.action-cell .mini-btn.danger {
  color: #fff;
  border-color: rgba(211, 6, 36, 0.24);
  background: linear-gradient(135deg, #e00024, #a7041d) !important;
}

.quick-progress-form {
  padding: 3px;
  border: 1px solid rgba(246, 166, 9, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
}

.quick-progress-form input {
  width: 58px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid rgba(214, 225, 239, 0.96);
  border-radius: 8px;
  color: #07163d;
  font-weight: 850;
}

.return-popover {
  position: relative;
}

.return-popover summary {
  list-style: none;
  cursor: pointer;
}

.return-popover summary::-webkit-details-marker {
  display: none;
}

.return-popover[open] form {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(246, 166, 9, 0.26);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(2, 11, 69, 0.18);
}

.return-popover textarea {
  width: 100%;
  min-height: 70px;
  border: 1px solid rgba(214, 225, 239, 0.96);
  border-radius: 9px;
  resize: vertical;
}

.project-card-with-thumb {
  overflow: hidden;
  padding-top: 0 !important;
}

.project-card-thumb {
  position: relative;
  display: block;
  height: 148px;
  margin: -1px -1px 16px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: #eef3fa;
}

.project-card-thumb img,
.project-thumb-photo img,
.table-project-title img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 11, 69, 0.04), rgba(2, 11, 69, 0.46));
}

.project-card-thumb span {
  position: absolute;
  z-index: 1;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 999px;
  color: #07163d;
  background: linear-gradient(135deg, #fff4c2, #f6a609);
  font-size: 11px;
  font-weight: 900;
}

.project-thumb-photo {
  overflow: hidden;
  background: #eef3fa !important;
}

.table-project-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.table-project-title img {
  width: 56px;
  height: 42px;
  flex: 0 0 56px;
  border-radius: 8px;
  border: 1px solid rgba(214, 225, 239, 0.95);
}

.table-project-title span {
  display: grid;
  gap: 2px;
}

.director-analytics-page .dashboard-hero,
.pm-command-page .dashboard-hero {
  padding: 14px 18px !important;
  margin-bottom: 14px;
  min-height: 0;
  align-items: center;
}

.director-analytics-page .dashboard-hero h2,
.pm-command-page .dashboard-hero h2 {
  font-size: clamp(22px, 2.2vw, 30px) !important;
}

.director-analytics-page .dashboard-hero p,
.pm-command-page .dashboard-hero p {
  margin-top: 4px;
  max-width: 720px;
  font-size: 14px;
}

.director-analytics-page .hero-score,
.pm-command-page .hero-score {
  width: 180px;
  padding: 12px;
}

.kpi-grid,
.kpi-grid.six {
  align-items: stretch;
}

.kpi-card {
  min-height: 112px;
}

.pe-analytics-row {
  margin: 16px 0;
}

.weekly-workload-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 190px;
  padding: 18px 8px 4px;
}

.weekly-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  color: #53617d;
  font-size: 11px;
  font-weight: 850;
}

.weekly-bar i {
  width: 100%;
  max-width: 28px;
  height: var(--height);
  min-height: 8px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #102d7c, #1f5bd8);
  box-shadow: 0 10px 22px rgba(16, 45, 124, 0.16);
}

.weekly-bar b {
  color: #07163d;
  font-size: 13px;
}

.status-donut {
  width: 154px;
  height: 154px;
  margin: 8px auto 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 0 56%, transparent 57%),
    conic-gradient(#d30624 0 var(--returned), #f6a609 var(--returned) calc(var(--returned) + var(--progress)), #102d7c calc(var(--returned) + var(--progress)) calc(var(--returned) + var(--progress) + var(--todo)), #e8edf5 0);
}

.status-donut b,
.status-donut small {
  grid-area: 1 / 1;
}

.status-donut b {
  transform: translateY(-8px);
  color: #07163d;
  font-size: 34px;
}

.status-donut small {
  transform: translateY(20px);
  color: #65718a;
  font-weight: 850;
}

@media (max-width: 768px) {
  .data-table th:last-child,
  .data-table td:last-child {
    min-width: 0;
  }

  .action-cell,
  .compact-actions {
    justify-content: stretch;
    width: 100%;
  }

  .action-cell .mini-btn,
  .action-cell form,
  .quick-progress-form {
    width: 100%;
  }

  .quick-progress-form {
    display: grid !important;
    grid-template-columns: 72px 1fr;
  }

  .quick-progress-form label,
  .quick-progress-form input {
    width: 100%;
  }

  .return-popover[open] form {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .project-card-thumb {
    height: 132px;
  }

  .table-project-title {
    min-width: 0;
  }

  .director-analytics-page .dashboard-hero,
  .pm-command-page .dashboard-hero {
    padding: 14px !important;
  }

  .director-analytics-page .hero-score,
  .pm-command-page .hero-score {
    width: 100%;
  }
}

/* Reference-old v2 refinements: final overrides after every legacy CSS layer. */
body.theme-reference-old .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden !important;
  background: #fff !important;
}

body.theme-reference-old .sidebar-inner {
  height: 100vh;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 24px 15px 18px !important;
}

body.theme-reference-old .sidebar-logo {
  width: 192px !important;
  min-height: 72px !important;
  align-items: flex-start !important;
}

body.theme-reference-old .sidebar-logo img.logo-full {
  width: 190px !important;
  max-height: 76px !important;
  object-fit: contain;
  object-position: left top;
}

body.theme-reference-old .sidebar-top {
  margin-bottom: 18px !important;
}

body.theme-reference-old .sidebar-collapse-toggle {
  flex: 0 0 34px;
  margin-top: 2px;
}

body.theme-reference-old .side-link {
  min-height: 40px !important;
  padding: 0 11px !important;
}

body.theme-reference-old .role-section-label {
  margin-top: 22px !important;
}

body.theme-reference-old .sidebar-role-card {
  margin-top: auto !important;
  margin-bottom: 2px;
  min-height: 64px !important;
  box-shadow: 0 10px 24px rgba(7, 31, 99, 0.08) !important;
}

body.theme-reference-old .role-icon-shell {
  background: #eef3fb !important;
  border-color: #dbe4f2 !important;
  box-shadow: inset 0 0 0 1px #fff !important;
}

body.theme-reference-old .role-icon-shell img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain;
  filter: none !important;
}

body.theme-reference-old .kpi-card {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
}

body.theme-reference-old .icon-bubble {
  background: #f0f3f8 !important;
  color: var(--old-navy) !important;
  border: 1px solid #dfe6f0;
}

body.theme-reference-old .icon-bubble.gold {
  background: #fff4d3 !important;
  color: #a66b00 !important;
  border-color: #f4d178;
}

body.theme-reference-old .icon-bubble.red {
  background: #ffe8ed !important;
  color: var(--old-red) !important;
  border-color: #ffc2cd;
}

body.theme-reference-old .icon-bubble.green {
  background: #e8f7ee !important;
  color: #16723a !important;
  border-color: #bfe7ca;
}

body.theme-reference-old .icon-bubble .icon {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2.2;
}

body.theme-reference-old .table-actions {
  min-width: 168px !important;
}

body.theme-reference-old .table-actions .action-cell,
body.theme-reference-old .action-cell {
  justify-content: flex-start !important;
  gap: 7px !important;
}

body.theme-reference-old .table-actions .mini-btn,
body.theme-reference-old .action-cell .mini-btn,
body.theme-reference-old .mini-btn {
  min-height: 34px;
  padding: 0 11px !important;
  border: 1px solid #cbd6e8 !important;
  color: var(--old-navy) !important;
  background: #fff !important;
  box-shadow: 0 4px 10px rgba(7,31,99,0.06);
  text-decoration: none;
}

body.theme-reference-old .table-actions .mini-btn:hover,
body.theme-reference-old .action-cell .mini-btn:hover,
body.theme-reference-old .mini-btn:hover {
  border-color: var(--old-navy) !important;
  background: #f3f6ff !important;
}

body.theme-reference-old .table-actions .mini-btn.fill,
body.theme-reference-old .action-cell .mini-btn.fill,
body.theme-reference-old .mini-btn.fill {
  color: #fff !important;
  background: var(--old-navy) !important;
  border-color: var(--old-navy) !important;
}

body.theme-reference-old .action-cell .mini-btn.success {
  color: #16723a !important;
  background: #e8f7ee !important;
  border-color: #9ed9b0 !important;
}

body.theme-reference-old .action-cell .mini-btn.danger,
body.theme-reference-old .mini-btn.danger {
  color: var(--old-red) !important;
  background: #ffe8ed !important;
  border-color: #ffc2cd !important;
}

body.theme-reference-old .quick-progress-form {
  border-color: #dfe6f0 !important;
  background: #f8faff !important;
}

body.theme-reference-old .quick-progress-form input {
  background: #fff !important;
  border-color: #cbd6e8 !important;
}

body.theme-reference-old .pm-command-page .visual-dashboard-grid {
  grid-template-columns: 1.35fr 0.7fr 0.7fr !important;
  align-items: stretch;
}

body.theme-reference-old .pm-command-page .curve-card.span-2 {
  grid-column: span 1 !important;
}

body.theme-reference-old .pm-command-page .analytic-card {
  min-height: 208px !important;
  padding: 18px !important;
}

body.theme-reference-old .pm-command-page .curve-line-chart.compact svg {
  height: 150px !important;
}

body.theme-reference-old .director-analytics-page .reference-old-analytics-row {
  grid-template-columns: 1.05fr 1.55fr 1.05fr 1.45fr !important;
}

body.theme-reference-old .old-gauge-card,
body.theme-reference-old .old-bars-card,
body.theme-reference-old .old-health-card,
body.theme-reference-old .old-phase-card {
  min-height: 198px !important;
}

body.theme-reference-old .profile-menu,
body.theme-reference-old .dropdown[data-dropdown="notifications"] {
  width: 246px !important;
}

@media (max-width: 980px) {
  body.theme-reference-old .sidebar,
  body.sidebar-open.theme-reference-old .sidebar {
    display: none !important;
  }

  body.theme-reference-old .bottom-nav button .icon,
  body.theme-reference-old .bottom-nav a .icon {
    width: 24px !important;
    height: 24px !important;
  }

  body.theme-reference-old .bottom-nav button.quick-plus {
    width: 68px !important;
    height: 68px !important;
  }

  body.theme-reference-old .mobile-menu-fab .icon {
    width: 24px !important;
    height: 24px !important;
  }

  body.theme-reference-old .pm-command-page .visual-dashboard-grid,
  body.theme-reference-old .director-analytics-page .reference-old-analytics-row {
    grid-template-columns: 1fr !important;
  }

  body.theme-reference-old .table-actions,
  body.theme-reference-old .table-actions .action-cell,
  body.theme-reference-old .action-cell {
    min-width: 0 !important;
    width: 100%;
  }

  body.theme-reference-old .table-actions .mini-btn,
  body.theme-reference-old .action-cell .mini-btn,
  body.theme-reference-old .mini-btn {
    justify-content: center;
  }
}
