:root {
  --bg-900: #0b0c0f;
  --bg-800: #13151b;
  --bg-700: #1a1d26;

  --text-100: #f2f5f7;
  --text-300: #c7ced6;

  --accent-500: #4ddf8a;
  --accent-600: #28a864;
  --accent-rgb: 77, 223, 138;
  --app-bottom-gap: clamp(2.5rem, 10vh, 7rem);
}

/* =====================
   Base
===================== */

body {
  background: radial-gradient(
    1200px 600px at 10% 0%,
    #1c1f2a 0%,
    var(--bg-900) 50%,
    #06070a 100%
  );
  color: var(--text-100);
  min-height: 100vh;
}

/* =====================
   Layout
===================== */

.app-shell {
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  gap: 1.5rem;
  align-items: start;
}

.container {
  max-width: 100%;
  padding-left: 2.25rem;
  padding-right: 2.25rem;
}

@media (max-width: 1200px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 52px 1fr;
}

.app-sidebar,
.app-content {
  min-width: 0;
}

.app-content {
  padding-bottom: var(--app-bottom-gap);
}

/* =====================
   Sidebar top (handle)
===================== */

.sidebar-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 40px;
  margin-top: 2px;
  margin-bottom: 10px;
}

body.sidebar-collapsed .sidebar-top {
  justify-content: center;
}

/* Handle button */
.sidebar-handle {
  width: 32px;
  height: 32px;

  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(19, 21, 27, 0.35);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  opacity: 0.3;
  cursor: pointer;

  color: rgba(242, 245, 247, 0.85);

  transition:
    opacity 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease,
    color 140ms ease;
}

.app-sidebar:hover .sidebar-handle {
  opacity: 1;
}

.sidebar-handle:hover {
  border-color: rgba(var(--accent-rgb), 0.32);
  background: rgba(19, 21, 27, 0.55);
  transform: translateY(-1px);
  color: rgba(242, 245, 247, 0.95);
}

.handle-ico {
  font-size: 1rem;
  line-height: 1;
  opacity: 1;
}

/* =====================
   Header / Cards
===================== */

.glow-card {
  background: linear-gradient(
    160deg,
    rgba(26, 29, 38, 0.9),
    rgba(11, 12, 15, 0.95)
  );
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.glow-card-inner {
  background: rgba(19, 21, 27, 0.55);
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.placeholder-surface {
  background: rgba(19, 21, 27, 0.55);
  border: 1px dashed rgba(var(--accent-rgb), 0.22);
}

.settings-surface {
  background: rgba(19, 21, 27, 0.55);
  border: 0;
}

/* =====================
   Header elements
===================== */

.brand-title {
  letter-spacing: 0;
  line-height: 1;
}

.brand-logo {
  height: 120px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(var(--accent-rgb), 0.22));
}

.brand-logo-header {
  height: 2.5rem;
  display: block;
}

.accent-line {
  height: 2px;
  width: 64px;
  background: linear-gradient(90deg, var(--accent-500), transparent);
}

.time-pill {
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(19, 21, 27, 0.8);
}

.auth-user-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 32px 0;
}

.login-card {
  width: min(100%, 420px);
  border-radius: 18px;
  padding: 24px;
  background: rgba(19, 21, 27, 0.72);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.login-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.dashboard-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  border: 0;
}

.dashboard-filter--wide {
  flex: 1 1 360px;
}

.dashboard-filter--wide .dashboard-filter-select {
  min-width: 360px;
  width: 100%;
}

.dashboard-worklogs-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.dashboard-worklogs-title {
  white-space: nowrap;
  flex: 0 0 auto;
}

.dashboard-worklogs-header .btn {
  flex: 0 0 auto;
}

.dashboard-worklogs-search {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-worklogs-search .dashboard-filter-select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 1200px) {
  .dashboard-worklogs-header {
    flex-wrap: wrap;
  }

  .dashboard-worklogs-title {
    flex: 1 0 100%;
  }

  .dashboard-worklogs-search {
    flex: 1 0 100%;
  }
}

.dashboard-worklogs-input {
  color: var(--text-100);
}

.dashboard-worklogs-input::placeholder {
  color: var(--text-300);
}

.worklogs-switch:checked {
  background-color: var(--accent-500);
  border-color: var(--accent-500);
}

.dashboard-worklogs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.dashboard-worklogs-row .dashboard-filter,
.dashboard-worklogs-row .form-check {
  align-items: center;
  margin-bottom: 0;
}

.dashboard-worklogs-row--stage .dashboard-filter {
  flex: 0 1 auto;
}

.dashboard-worklogs-row--stage #dashboardWorklogsStageFilter {
  flex: 1 1 280px;
  min-width: 220px;
}

.dashboard-filter-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-filter-select {
  width: auto;
  min-width: 180px;
  background-color: rgba(19, 21, 27, 0.7);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--text-100);
}

#reportsProjectSearch {
  background-color: rgba(19, 21, 27, 0.9);
  color: var(--text-100);
}

#reportsProjectSearch::placeholder {
  color: var(--text-300);
}

.dashboard-filter-select--readonly {
  cursor: default;
  user-select: none;
  pointer-events: none;
  caret-color: transparent;
}

.dashboard-filter-select--readonly::placeholder {
  color: var(--text-200);
  opacity: 1;
}

.dashboard-period-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-period-picker-btn {
  height: 34px;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(19, 21, 27, 0.7);
  color: var(--text-100);
  line-height: 1;
}

.dashboard-period-picker-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(19, 21, 27, 0.9);
  color: var(--text-100);
}

.dashboard-period-clear-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  font-size: 18px;
}

.dashboard-period-native-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dashboard-filter-select::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
}

.worklogs-row-stage td {
  font-weight: 600;
}

.worklogs-stage-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(19, 21, 27, 0.35);
  color: var(--text-100);
  margin-right: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
}

.worklogs-stage-toggle:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(19, 21, 27, 0.55);
}

.worklogs-stage-toggle.is-expanded {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.65);
  color: var(--text-100);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4) inset;
}

.worklogs-stage-toggle-placeholder {
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-right: 8px;
}

.worklogs-stage-title {
  vertical-align: middle;
}

.worklogs-row-user td,
.worklogs-row-task td {
  color: var(--text-300);
}

.worklogs-row-user td:first-child {
  padding-left: 16px;
}

.worklogs-row-task td {
  font-size: 0.82rem;
}

.worklogs-row-task td:first-child {
  padding-left: 28px;
}

.worklogs-row-task a {
  color: #7ad7ff;
  text-decoration: none;
}

.worklogs-row-task a:hover {
  color: #9be2ff;
  text-decoration: none;
}

.worklogs-over-plan {
  color: #ff8a8a;
  font-weight: 600;
}

.worklogs-row-task .worklogs-over-plan {
  color: #ff8a8a;
}

.btn-download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-download-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

#dashboardWorklogsExportBtn,
#dashboardWorklogsProjectClearBtn,
#reportsWorklogsExportBtn,
#reportsWorklogsClearBtn,
#employeeClearBtn {
  width: 36px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-worklogs-header .btn {
  align-self: center;
}


.worklogs-row-user .worklogs-row-label {
  padding-left: 22px;
}

.worklogs-row-task .worklogs-row-label {
  padding-left: 40px;
}

.worklogs-row-hours {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dashboard-filter-select:focus {
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 0.2rem rgba(var(--accent-rgb), 0.2);
}

#projectsFiltersRow .dashboard-filter,
#reportsProjectsFinanceView .dashboard-filter {
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 6px;
}

#projectsFiltersRow .dashboard-filter-label,
#reportsProjectsFinanceView .dashboard-filter-label {
  flex: 1 1 auto;
}

.project-stages-filter-label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
  font-size: 0.85rem;
  color: #7a8290;
}

#projectsFiltersRow .dashboard-filter-select,
#reportsProjectsFinanceView .dashboard-filter-select {
  width: 100%;
  min-width: 0;
}

#reportsWorklogsTimeseriesView .dashboard-filter,
#reportsWorklogsView .dashboard-filter,
#reportsWorklogsView .dashboard-worklogs-row .dashboard-filter {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#reportsWorklogsTimeseriesView .dashboard-filter-label,
#reportsWorklogsView .dashboard-filter-label,
#reportsWorklogsView .dashboard-worklogs-row .dashboard-filter-label {
  width: 100%;
}

#reportsWorklogsTimeseriesView .dashboard-filter-select,
#reportsWorklogsView .dashboard-filter-select,
#reportsWorklogsView .dashboard-worklogs-row .dashboard-filter-select {
  width: 100%;
  min-width: 0;
}

.projects-search-input {
  background-color: rgba(19, 21, 27, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-100) !important;
  width: calc(100% - 24px);
  margin: 0 12px;
}

#reportsWorklogsTimeseriesView .projects-search-input,
#reportsWorklogsView .projects-search-input {
  width: 100% !important;
  margin: 0 !important;
}

#reportsWorklogsRenderMore .btn {
  min-width: 140px;
}

.outside-task-action-btn {
  min-width: 108px;
}

.outside-task-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.outside-task-actions .btn {
  width: 108px;
}

.outside-project-linklike,
.outside-task-linklike {
  color: var(--text-100);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.outside-project-linklike {
  cursor: pointer;
}

.outside-project-linklike:hover,
.outside-task-linklike:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.55);
  background-color: rgba(255, 255, 255, 0.06);
}

.projects-search-input:focus {
  background-color: rgba(19, 21, 27, 0.85);
}

.projects-search-input::placeholder {
  color: var(--text-300);
}

.reports-sortable {
  cursor: pointer;
  user-select: none;
}

.reports-sortable::after {
  content: "";
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75em;
  opacity: 0.6;
}

.reports-sortable.is-sorted-asc::after {
  content: "▲";
}

.reports-sortable.is-sorted-desc::after {
  content: "▼";
}

.reports-timeseries-chart {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 260px;
  padding: 8px 8px 24px;
  overflow-x: auto;
}

.reports-timeseries-chart-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: min-content;
  height: 100%;
  gap: 0;
}

.reports-timeseries-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.reports-timeseries-bar-group {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
}

.reports-timeseries-bar-group-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 100%;
}

.reports-timeseries-bar-group .reports-timeseries-bar {
  flex: 0 0 auto;
  width: 36px;
}

.reports-timeseries-bar-group .reports-timeseries-bar-label {
  margin-top: 2px;
}

.reports-timeseries-bar {
  flex: 0 0 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
}

.reports-timeseries-bar-column {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(255, 193, 7, 0.9), rgba(255, 193, 7, 0.4));
  transition: height 0.2s ease;
}

.reports-timeseries-bar-column.reports-timeseries-bar-hours {
  background: linear-gradient(to top, rgba(255, 193, 7, 0.9), rgba(255, 193, 7, 0.4));
}

.reports-timeseries-bar-column.reports-timeseries-bar-cost {
  background: linear-gradient(to top, rgba(76, 175, 80, 0.9), rgba(76, 175, 80, 0.4));
}

.reports-timeseries-chart-legend {
  flex: 0 0 auto;
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 6px;
  font-size: 0.75rem;
  color: var(--text-300);
}

.reports-timeseries-legend-item::before {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
  content: "";
  background: var(--legend-color, rgba(255, 193, 7, 0.8));
}

.reports-timeseries-legend-hours::before {
  background: rgba(255, 193, 7, 0.8);
}

.reports-timeseries-legend-cost::before {
  background: rgba(76, 175, 80, 0.8);
}

.reports-timeseries-bar-label {
  margin-top: 0;
  font-size: 0.7rem;
  color: var(--text-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.reports-timeseries-bar-value {
  font-size: 0.7rem;
  color: var(--text-100);
  white-space: nowrap;
}

.reports-worklogs-search-row .projects-search-input {
  min-width: 0;
}

.reports-worklogs-search-row .d-flex {
  min-width: 0;
}

.employee-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.employee-search-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(640px, 100%);
  flex: 0 0 auto;
}

.employee-widgets-freshness {
  margin-left: auto;
  text-align: right;
  flex: 0 0 auto;
}

@media (max-width: 992px) {
  .employee-search-header {
    flex-wrap: wrap;
  }

  .employee-widgets-freshness {
    width: 100%;
    text-align: left;
    margin-left: 0;
  }
}

.reports-timeseries-stage-row {
  cursor: pointer;
}

.reports-timeseries-stage-row .stage-toggle {
  margin-right: 8px;
}

.reports-timeseries-user-row {
  font-size: 0.9em;
  font-weight: 400;
  color: var(--text-300);
}

.reports-timeseries-user-row td {
  padding-top: 2px;
  padding-bottom: 2px;
}

.reports-link {
  color: var(--text-100);
  text-decoration: none;
}

.reports-link:hover,
.reports-link:focus {
  color: var(--accent-500);
  text-decoration: underline;
  text-decoration-color: var(--accent-500);
}

.dashboard-card {
  cursor: pointer;
  height: 100%;
  min-height: 4.5rem;
  text-align: center;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.dashboard-card > div:first-child {
  color: #f8fafb !important;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.dashboard-card.is-active {
  border: 1px solid rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 20px 45px rgba(var(--accent-rgb), 0.2);
}

.table-surface {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-hover-bg: rgba(25, 30, 40, 0.78);
  margin-bottom: 0;
}

.table-surface thead th {
  border-bottom-color: rgba(var(--accent-rgb), 0.22);
}

.table-surface tbody td,
.table-surface thead th {
  border-color: rgba(255, 255, 255, 0.05);
}

.table-surface.table-hover tbody tr {
  transition: background 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.table-surface.table-hover tbody tr:hover {
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.45);
}

/* =====================
   Sidebar menu
===================== */

.nav-link-premium {
  color: var(--text-300);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  background: rgba(19, 21, 27, 0.35);
  border-radius: 14px;
  padding: 8px 10px;
  text-decoration: none;

  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.nav-link-premium:hover {
  color: var(--text-100);
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(19, 21, 27, 0.55);
  transform: translateY(-1px);
}

.nav-pills .nav-link.active.nav-link-premium {
  color: #1a1d26;
  background: linear-gradient(
    180deg,
    var(--accent-500),
    var(--accent-600)
  );
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 18px 40px rgba(var(--accent-rgb), 0.2);
}

.nav-icon {
  display: inline-flex;
  width: 1.25rem;
  justify-content: center;
  opacity: 0.9;
}

.sidebar-narrow .nav-link-premium {
  width: 100%;
  max-width: 18rem;
}

/* Collapsed sidebar */
body.sidebar-collapsed .nav-text {
  display: none;
}

body.sidebar-collapsed .nav-link-premium {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
}

body.sidebar-collapsed .nav-icon {
  margin-right: 0 !important;
}

/* =====================
   Forms / focus
===================== */

.form-control:focus,
.form-select:focus,
.combo-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.35);
}

/* =====================
   Employees combobox
===================== */

.combo-wrap {
  position: relative;
}

.combo-wrap.combo-open {
  z-index: 200;
}

.combo-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 300;

  background: rgba(19, 21, 27, 0.92);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);

  overflow-y: auto;
  padding: 6px;
  max-height: calc(5 * 44px + 8px);
}

#section-settings #specialistRatesTableWrap {
  position: relative;
  overflow: visible;
  min-height: 0;
  padding-bottom: 0;
}

#section-settings #specialistRatesTableWrap .rates-row {
  position: relative;
}

#section-settings #specialistRatesTableWrap .rates-row.rates-row-open {
  z-index: 20;
}

#section-settings #specialistRatesTableWrap .form-control,
#section-settings #specialistRatesTableWrap .btn,
#section-settings #specialistRatesTableWrap .combo-dropdown {
  border-radius: 0;
}

#section-settings #specialistRatesTableWrap .combo-wrap {
  position: relative;
  z-index: 10;
}

#section-settings #specialistRatesTableWrap .combo-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: auto;
  min-width: 0;
  z-index: 400;
  max-height: none;
  overflow: visible;
}

.combo-item {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  color: var(--text-100);
}

.combo-item:hover {
  background: rgba(var(--accent-rgb), 0.14);
}

.btn-outline-warning {
  color: var(--accent-500);
  border-color: rgba(var(--accent-rgb), 0.55);
}

.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-warning:active {
  color: #0b0c0f;
  border-color: rgba(var(--accent-rgb), 0.8);
  background: linear-gradient(180deg, var(--accent-500), var(--accent-600));
  box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.24);
}

.combo-dept {
  font-size: 0.92em;
  opacity: 0.7;
  margin-left: 8px;
}

/* =====================
   Specialist rates
===================== */

.rates-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rates-hint {
  padding-left: 2px;
  margin-bottom: 12px;
}

.rates-columns {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 0.6fr 96px;
  gap: var(--rates-col-gap, 12px);
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0;
  margin-bottom: 2px;
}

.rates-empty {
  padding: 16px;
  border-radius: 16px;
  background: rgba(19, 21, 27, 0.35);
  border: 1px dashed rgba(var(--accent-rgb), 0.22);
}

.rates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rates-list-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rates-actions-row {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 6px;
}

.rates-row {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 0.6fr 96px;
  gap: var(--rates-col-gap, 12px);
  align-items: center;
  padding: 2px 0;
}

.rates-row-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rates-row-rate {
  max-width: none;
}

.rate-locked {
  background: rgba(19, 21, 27, 0.45) !important;
  color: var(--text-300) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.rate-editing {
  background: #fff !important;
  color: #0b0c0f !important;
  border-color: rgba(77, 223, 138, 0.5) !important;
}

.rates-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.rates-row-dept {
  color: var(--text-300);
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .rates-columns {
    display: none;
  }

  .rates-row {
    grid-template-columns: 1fr;
  }

  .rates-row-rate {
    max-width: none;
  }

  .rates-row-actions {
    justify-content: flex-start;
  }
}

/* =====================
   Settings
===================== */

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

.settings-panel {
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 14px;
  background: rgba(19, 21, 27, 0.35);
  padding: 12px 14px;
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-panel-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.settings-panel-toggle:hover .settings-panel-title {
  color: var(--text-100);
}

.settings-panel-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--text-300);
}

.settings-panel-title {
  font-weight: 600;
  color: var(--text-100);
}

.summary-subtext {
  font-size: 0.9em;
  font-weight: 400;
  color: var(--text-300);
}

.settings-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-panel-body {
  padding-top: 12px;
}

.settings-subsection {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.12);
}

.settings-subsection-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  color: var(--text-300);
  margin-bottom: 6px;
}

.settings-subsection-note {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-300);
}

.settings-subsection-row .form-check-label {
  line-height: 1.2;
}

.settings-subsection-field {
  width: 220px;
  min-width: 180px;
}

.settings-subsection-field--sm {
  width: 160px;
  min-width: 140px;
}

@media (max-width: 900px) {
  .settings-subsection-field,
  .settings-subsection-field--sm {
    width: 100%;
    min-width: 0;
  }
}

.settings-collapse-btn {
  border-radius: 999px;
  line-height: 1;
  padding: 6px 10px;
  min-width: 36px;
  border: 0;
  background: transparent;
}

.settings-collapse-btn:not(.collapsed) {
  transform: rotate(180deg);
}

#section-settings .collapse.show {
  overflow: visible;
}

#section-settings .collapse.collapsing {
  overflow: hidden;
}

/* =====================
   Projects
===================== */

#projectStagesTableWrap .table {
  --bs-table-bg: transparent;
  table-layout: fixed;
  width: 100%;
}

#projectStagesTableWrap .table-hover tbody tr:hover,
#projectStagesTableWrap .table-hover tbody tr:hover > * {
  background-color: transparent !important;
  box-shadow: none !important;
}

#projectStagesTableWrap thead th {
  border-bottom-color: rgba(var(--accent-rgb), 0.22);
}

#projectStagesTableWrap tbody td,
#projectStagesTableWrap thead th {
  border-color: rgba(255, 255, 255, 0.05);
  vertical-align: top;
}

#projectStagesTableWrap thead th + th,
#projectStagesTableWrap tbody td + td {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.stage-head-row td {
  padding-top: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: none;
}

.stage-head-row.is-separated td {
  position: relative;
  padding-top: 1.4rem;
}

.stage-head-row.is-separated td::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0.35rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(77, 223, 138, 0.38), rgba(255, 255, 255, 0.2));
  border-radius: 999px;
  opacity: 0.8;
}

.stage-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(19, 21, 27, 0.35);
  color: var(--text-100);
  cursor: pointer;
}

.stage-toggle.is-expanded {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.65);
  color: var(--text-100);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4) inset;
}
.stage-head-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.stage-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  justify-content: flex-end;
}

.btn-icon-danger {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  color: #ff7a7a;
  border-color: rgba(255, 122, 122, 0.55);
}

.btn-icon-danger:hover {
  color: #fff;
  background: rgba(255, 90, 90, 0.25);
  border-color: rgba(255, 90, 90, 0.9);
}

.btn-icon-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stage-head-row.is-collapsed .stage-head-actions {
  display: none;
}

.stage-details-row.is-collapsed {
  display: none;
}

.stage-columns-row.is-collapsed {
  display: none;
}

.stage-docs-row.is-collapsed,
.stage-rates-row.is-collapsed {
  display: none;
}

.stage-worklogs-row.is-collapsed {
  display: none;
}

.stage-docs-panel,
.stage-rates-panel {
  min-height: calc(3 * 44px + 24px);
}

.stage-docs-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.stage-docs-line--after-status {
  margin-top: 24px;
}

.stage-docs-label {
  color: var(--text-300);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.stage-docs-value {
  color: var(--text-100);
}

.stage-docs-row-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.stage-docs-field {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.stage-docs-field-label {
  color: var(--text-300);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Селекты статусов документов: тёмные, узкие, закруглённые как вкладки */
.stage-docs-select {
  width: auto;
  min-width: 8ch;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: 999px;
  background-color: rgba(19, 21, 27, 0.65);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--text-100);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23c7ced6' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M3 4.5 L6 7.5 L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.stage-docs-select:hover {
  background-color: rgba(19, 21, 27, 0.8);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.stage-docs-select:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}

.stage-docs-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.stage-docs-actions-row.d-none {
  display: none;
}

@media (max-width: 900px) {
  .stage-docs-row-fields {
    flex-direction: column;
    align-items: flex-start;
  }
}

.stage-worklogs-table {
  width: 100%;
  table-layout: fixed;
}

.stage-worklogs-table.is-collapsed {
  display: none;
}

.stage-worklogs-title {
  font-weight: 600;
  margin-bottom: 2px;
}


.stage-worklogs-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.7rem;
  color: #0b0b0b;
  background: #ff8a8a;
  margin-left: 6px;
}

.stage-worklogs-wrap {
  width: 100%;
  margin-top: 10px;
}

.stage-worklogs-section.is-collapsed {
  display: none;
}

.stage-detail-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  margin: 6px 0 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
}

.stage-detail-tabs.is-collapsed {
  display: none;
}

.stage-worklogs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.stage-worklogs-toggle:hover .stage-worklogs-title {
  color: var(--text-100);
}

.stage-worklogs-caret {
  font-size: 0.9rem;
  color: var(--text-300);
}

.stage-worklogs-head th {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-300);
  font-size: 0.78rem;
  font-weight: 600;
}

.stage-worklogs-table th,
.stage-worklogs-table td {
  border-color: rgba(255, 255, 255, 0.05);
  vertical-align: top;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  font-size: 0.8rem;
}

.stage-worklogs-table th + th,
.stage-worklogs-table td + td {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 1rem;
}

.stage-worklogs-table .stage-worklogs-empty td {
  color: var(--text-300);
  padding: 0.6rem 0;
}

.stage-worklogs-table .stage-worklogs-loading td {
  color: var(--text-300);
  text-align: center;
  padding: 0.8rem 0;
}

.stage-extra-wrap {
  width: 100%;
  margin-top: 10px;
}

.stage-extra-inline {
  margin-top: 16px;
}

.stage-extra-inline.is-collapsed {
  display: none;
}

.stage-extra-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.stage-extra-form .form-control-sm {
  min-width: 180px;
  flex: 1 1 220px;
}

.stage-extra-table {
  width: 100%;
  table-layout: fixed;
}

.stage-extra-head th {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-300);
  font-size: 0.78rem;
  font-weight: 600;
}

.stage-extra-table th,
.stage-extra-table td {
  border-color: rgba(255, 255, 255, 0.05);
  vertical-align: top;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  font-size: 0.8rem;
}

.stage-extra-actions {
  text-align: right;
  white-space: nowrap;
}

.stage-extra-col-actions {
  width: 12%;
}

.stage-extra-table th + th,
.stage-extra-table td + td {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 1rem;
}

.stage-extra-table .stage-extra-empty td {
  color: var(--text-300);
  padding: 0.6rem 0;
  text-align: center;
}

.stage-extra-table.table-hover tbody tr:hover,
.stage-extra-table.table-hover tbody tr:hover > * {
  background-color: transparent !important;
  box-shadow: none !important;
}

.stage-rates-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table.table-hover .stage-rates-row:hover,
.table.table-hover .stage-rates-row:hover > *,
.table.table-hover > tbody > tr.stage-rates-row:hover > * {
  background-color: transparent !important;
  box-shadow: none !important;
}

.stage-columns-row td {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-300);
  border-bottom-color: rgba(var(--accent-rgb), 0.12);
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.stage-worklogs-table col:nth-child(1) { width: 36%; }
.stage-worklogs-table col:nth-child(2) { width: 12%; }
.stage-worklogs-table col:nth-child(3) { width: 14%; }
.stage-worklogs-table col:nth-child(4) { width: 22%; }
.stage-worklogs-table col:nth-child(5) { width: 16%; }

.stage-col-1,
.stage-col-2,
.stage-col-3 {
  width: 16.5%;
}

.stage-col-4 {
  width: 32%;
}

.stage-col-5 {
  width: 18%;
}

.stage-columns-row td:last-child {
  text-align: center;
}

.stage-columns-row td + td,
.stage-details-row td + td {
  border-left: 1px solid rgba(var(--accent-rgb), 0.12);
  padding-left: 1rem;
}

.stage-details-row td {
  vertical-align: top;
}

.stage-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border-radius: 999px;
  background: rgba(19, 21, 27, 0.4);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

.stage-detail-tabs {
  position: relative;
  padding: 0;
}

.stage-tabs-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.28);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4) inset;
  transition: transform 220ms ease, width 220ms ease, opacity 200ms ease;
  opacity: 0;
  z-index: 0;
}

.stage-tabs-indicator.no-transition {
  transition: none;
}

.stage-tab-btn {
  border: 0;
  background: transparent;
  color: var(--text-300);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  position: relative;
  z-index: 1;
}

.stage-tab-btn:hover {
  color: var(--text-100);
}

.stage-tab-btn.is-active {
  color: var(--text-100);
  font-weight: 600;
}

.stage-empty {
  color: var(--text-300);
  font-size: 0.9rem;
}

.system-users-table .system-users-actions {
  white-space: nowrap;
  align-items: center;
}

.system-users-table .system-users-actions .btn {
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.25;
}

.system-users-table [data-action="sys-pass-cancel"] {
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.25;
}

.system-users-table [data-action="sys-edit-cancel"] {
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.25;
}

.system-users-table .system-users-field {
  min-width: 140px;
  max-width: 240px;
  width: 100%;
}

.system-users-table .form-control-sm.system-users-field,
.system-users-table .form-select-sm.system-users-field {
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
}

.system-users-table .system-users-field:disabled {
  color: rgba(255, 255, 255, 0.55);
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.system-users-table .system-users-password:disabled {
  opacity: 0.6;
}

.system-users-table .system-users-pass-edit {
  padding: 0.2rem 0.4rem;
  line-height: 1;
}

.system-users-message {
  font-size: 0.95rem;
}

.system-users-message.is-error {
  color: #ff7a7a;
  font-weight: 600;
}

.system-users-message.is-success {
  color: #7ee2a8;
  font-weight: 600;
}

.stage-rates-table {
  display: grid;
  gap: 8px;
}

.stage-rates-head,
.stage-rate-row {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr auto;
  gap: 10px;
  align-items: center;
}

.stage-rates-head {
  color: var(--text-300);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stage-details-row td:last-child {
  position: relative;
}


.metric-grid {
  display: grid;
  grid-template-rows: repeat(4, 1.6rem);
  gap: 4px;
}

.cost-grid {
  display: grid;
  grid-template-rows: repeat(3, 1.6rem);
  gap: 4px;
}

.cost-grid--fact {
  grid-template-rows: 1fr;
}

.cost-grid--center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-label {
  color: var(--text-300);
  font-size: 0.85rem;
}

.metric-value {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.metric-row.is-total .metric-label,
.metric-row.is-total .metric-value {
  font-weight: 400;
  color: var(--text-100);
}
.metric-row.is-total .metric-value.metric-value--positive {
  color: #7fe7b1;
}
.metric-row.is-total .metric-value.metric-value--negative {
  color: #ff8a8a;
}

.metric-row.is-extra {
  border-top: 1px solid rgba(var(--accent-rgb), 0.16);
  padding-top: 0.35rem;
  margin-top: 0.25rem;
}

.metric-value--positive {
  color: #7fe7b1;
}

.metric-value--negative {
  color: #ff8a8a;
}

/* Фин. результат этапа: сумма и вторая строка — % рентабельности (красный минус, зелёный плюс, ноль — белый) */
.stage-fin-result-cell {
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
}
.stage-fin-result-sep {
  font-size: 0.85rem;
  color: var(--text-300);
  line-height: 1;
}

.project-card {
  height: 100%;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(19, 21, 27, 0.62);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color: var(--text-100) !important;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(25, 30, 40, 0.78);
  box-shadow: 0 20px 50px rgba(var(--accent-rgb), 0.22);
}

.project-card,
.project-card * {
  color: inherit !important;
}

.project-card-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-100) !important;
}

.project-card-meta {
  color: var(--text-300);
  font-size: 0.92rem;
}

.project-card-stage {
  margin-top: auto;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-100) !important;
}

/* Кнопка «К списку проектов»: закругление как у карточек (шапка проекта, этапы), серый по умолчанию, белый при наведении */
.project-detail-back-btn {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #8a9199;
}
.project-detail-back-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
  color: var(--text-100);
}

/* Шапка проекта: заголовок и «Обновлено» в одну строку справа; на узком экране «Обновлено» скрыто (d-none d-md-inline) */
.project-detail-title-row {
  flex-wrap: nowrap;
}
.project-detail-title-row #projectDetailTitle {
  min-width: 0;
}
.project-detail-title-meta {
  font-size: 0.8rem;
  flex-shrink: 0;
  white-space: nowrap;
}

#projectDetailTitle {
  font-size: 1.08rem;
}

#projectsLastSyncInfo {
  font-size: 0.8rem;
}

.project-stages-meta-date {
  font-size: 0.8rem;
}

.project-stages-count {
  white-space: nowrap;
}

.project-stages-header {
  flex-wrap: nowrap;
}

.project-stages-left {
  flex-wrap: nowrap;
  min-width: 0;
}

.project-stages-sync-wrap {
  min-width: 220px;
  flex-wrap: nowrap;
}

#projectStagesMeta {
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .project-stages-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .project-stages-left {
    flex-wrap: wrap;
  }

  .project-stages-sync-wrap {
    width: 100%;
    justify-content: flex-end;
  }
}

.project-stages-outside-hint {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.08);
  color: #ffd86f;
  font-size: 0.86rem;
}

.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 18px;
}

.project-summary-block {
  margin-top: 16px;
}

.project-summary-block .summary-label {
  color: var(--text-300);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-summary-block .summary-value {
  font-weight: 600;
  font-size: 0.88rem;
  color: #f2efe9;
}

.summary-item {
  display: grid;
  gap: 4px;
}

.summary-label {
  color: var(--text-300);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-value {
  font-weight: 600;
  font-size: 1rem;
  color: #f2efe9;
}

.project-id-note {
  font-size: 0.85em;
  color: var(--text-300);
  opacity: 0.7;
}

.project-id-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  transition: color 140ms ease, border-color 140ms ease;
}

.project-id-link:hover {
  color: var(--text-100);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.summary-value.metric-value--positive,
.summary-value.metric-value--negative {
  font-weight: 600;
}

.summary-value.metric-value--positive {
  color: #7fe7b1;
}

.summary-value.metric-value--negative {
  color: #ff8a8a;
}

.stage-title {
  font-weight: 600;
  font-size: 1.02rem;
}

.stage-title.is-overdue {
  color: #ff8a8a;
}

.stage-sub {
  font-size: 0.85rem;
}

.stage-sub .stage-sub-label {
  color: #7a8290;
}

.stage-sub .stage-sub-value {
  color: var(--text-100);
}

.stage-status.stage-status--planning {
  color: #e6c84a;
}

.stage-status.stage-status--inprogress {
  color: #6eb5e8;
}

.stage-status.stage-status--delivery {
  color: #7fe7b1;
}

.stage-status.stage-status--success {
  color: #28a864;
}

.stage-status.stage-status--failure {
  color: #b85c5c;
}

.stage-sub-value.plan-end-near {
  color: #e89b4a;
}

.stage-sub-value.plan-end-overdue {
  color: #ff8a8a;
}

.stage-metrics {
  display: grid;
  grid-template-rows: repeat(4, 1.6rem);
  gap: 4px;
  font-size: 0.9rem;
}

.stage-metrics div,
.stage-costs div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stage-metrics span,
.stage-costs span {
  color: var(--text-300);
  font-size: 0.85rem;
}

.stage-metrics strong,
.stage-costs strong {
  font-weight: 600;
  color: var(--text-100);
  font-variant-numeric: tabular-nums;
}

.stage-costs {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}

.stage-metrics,
.stage-costs {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}

.stage-metrics div,
.stage-costs div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stage-metrics span,
.stage-costs span {
  color: var(--text-300);
  font-size: 0.85rem;
}

.stage-metrics strong,
.stage-costs strong {
  font-weight: 600;
  color: var(--text-100);
}

/* =====================
   Responsive
===================== */

@media (max-width: 991.98px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-top {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .brand-logo {
    height: 72px;
  }

  .settings-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-panel-actions {
    align-self: flex-start;
  }
}
.stage-worklogs-table.table-hover tbody tr:hover,
.stage-worklogs-table.table-hover tbody tr:hover > * {
  background-color: transparent !important;
  box-shadow: none !important;
}
