.dash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash-container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding-left: var(--layout-padding-x);
  padding-right: var(--layout-padding-x);
}

.dash-header {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}

.dash-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.dash-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
}

.dash-header__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-brand), #34d399);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.dash-header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

.notif-center {
  position: relative;
}

.notif-center__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
}

.notif-center__toggle svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notif-center__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: min(360px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.notif-panel[hidden] {
  display: none !important;
}

.notif-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.notif-panel__title {
  font-size: 14px;
  font-weight: 700;
}

.notif-panel__mark-all {
  border: none;
  background: none;
  color: var(--color-brand);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.notif-panel__mark-all:hover {
  color: var(--color-brand-hover);
}

.notif-panel__list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
}

.notif-panel__empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-muted);
}

.notif-panel__item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}

.notif-panel__item:hover {
  background: var(--color-brand-soft);
}

.notif-panel__item.is-unread {
  background: rgba(16, 185, 129, 0.06);
}

.notif-panel__item.is-unread .notif-panel__text {
  font-weight: 600;
}

.notif-panel__text {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 4px;
  color: var(--color-text);
}

.notif-panel__time {
  font-size: 12px;
  color: var(--color-text-muted);
}

.toast-stack {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: min(380px, calc(100vw - 48px));
  pointer-events: none;
}

.toast-item {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-item.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.toast-item--success {
  border-left: 4px solid var(--color-brand);
}

.toast-item--warning {
  border-left: 4px solid #f97316;
}

.toast-item--info {
  border-left: 4px solid var(--color-accent);
}

.dash-main {
  flex: 1;
  padding-top: var(--layout-padding-y);
  padding-bottom: var(--layout-padding-y);
}

.dash-page-head {
  margin-bottom: 32px;
}

.dash-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-brand-soft);
  color: var(--color-brand);
  margin-bottom: 16px;
}

.dash-title {
  font-size: clamp(28px, 2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.dash-subtitle {
  max-width: 72ch;
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.dash-section {
  margin-bottom: 40px;
}

.dash-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dash-section__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-section__meta {
  font-size: 14px;
  color: var(--color-text-muted);
}

.projects-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
}

.projects-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.toolbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-brand);
  color: #fff;
  line-height: 1;
}

.toolbar-badge[hidden] {
  display: none !important;
}

.column-picker {
  position: relative;
}

.column-picker__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.column-picker__toggle svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.column-picker__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 240px;
  padding: 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-lg);
}

.column-picker__panel--wide {
  min-width: 320px;
  width: max-content;
  max-width: min(400px, calc(100vw - 32px));
}

.column-picker__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.filter-picker__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-picker__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-picker__field--full {
  width: 100%;
}

.filter-picker__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.filter-picker__input,
.filter-picker__select {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-md);
  background: var(--color-input-bg);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-picker__input:focus,
.filter-picker__select:focus {
  border-color: var(--color-input-focus);
  box-shadow: 0 0 0 3px var(--color-brand-soft);
  outline: none;
}

.filter-picker__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.column-picker__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.column-picker__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
}

.column-picker__item:hover {
  background: var(--color-brand-soft);
}

.column-picker__item input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-brand);
}

.projects-table [data-col].is-col-hidden {
  display: none;
}

.projects-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
}

.projects-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 14px;
}

.projects-table thead {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.projects-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
  user-select: none;
}

.projects-table th.sortable {
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.projects-table th.sortable:hover {
  color: var(--color-text);
  background: var(--color-brand-soft);
}

.projects-table th.sortable:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: -2px;
}

.projects-table th .th-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.projects-table th .sort-icon {
  width: 14px;
  height: 14px;
  opacity: 0.35;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.projects-table th.is-sorted-asc .sort-icon,
.projects-table th.is-sorted-desc .sort-icon {
  opacity: 1;
  color: var(--color-brand);
}

.projects-table th.is-sorted-desc .sort-icon {
  transform: rotate(180deg);
}

.projects-table td {
  padding: 16px 18px;
  border-top: 1px solid var(--color-border);
  vertical-align: middle;
}

.projects-table tbody tr {
  transition: background var(--transition);
}

.projects-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.04);
}

.projects-table tbody tr.is-multi-site {
  background: rgba(99, 102, 241, 0.03);
}

.projects-table tbody tr.is-multi-site:hover {
  background: rgba(99, 102, 241, 0.06);
}

.projects-table__actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.project-cell__top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.project-cell__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.project-cell__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.project-cell__site {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.project-cell__sites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-cell__sites li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

.project-cell__sites li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.tariff-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tariff-badge--start {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.tariff-badge--pro {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.tariff-badge--enterprise {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge--active {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.status-badge--active .status-badge__dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.status-badge--inactive {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.status-badge--inactive .status-badge__dot {
  background: #94a3b8;
}

.project-manager {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-manager__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand-soft), var(--color-accent-soft));
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-brand);
  flex-shrink: 0;
}

.project-manager__name {
  font-weight: 500;
}

.project-regions {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.tasks-day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
}

.tasks-day-nav__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tasks-day-nav__btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition), background var(--transition);
}

.tasks-day-nav__btn:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
}

.tasks-day-nav__btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tasks-day-nav__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tasks-day-nav__date {
  font-size: 16px;
  font-weight: 600;
}

.tasks-day-nav__badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tasks-empty {
  padding: 40px 24px;
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
}

.task-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), filter var(--transition), opacity var(--transition);
}

.task-card[hidden] {
  display: none !important;
}

.task-card.is-current {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-soft), var(--shadow-md);
}

.task-card.is-current .task-card__summary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
}

.task-card.is-upcoming:not(.is-expanded) {
  filter: blur(2px);
  opacity: 0.55;
}

.task-card.is-upcoming.is-expanded {
  filter: none;
  opacity: 1;
}

.task-card.is-past:not(.is-expanded) {
  opacity: 0.82;
}

.task-card.is-expanded {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-md);
}

.task-card__summary {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  align-items: start;
  width: 100%;
  padding: 18px 20px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.task-card__summary:hover {
  background: rgba(16, 185, 129, 0.03);
}

.task-card__summary:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: -2px;
}

.task-card__chevron {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: transform var(--transition), color var(--transition);
}

.task-card__chevron svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-card.is-expanded .task-card__chevron {
  transform: rotate(180deg);
  color: var(--color-brand);
}

.task-card__details {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.task-card__details[hidden] {
  display: none !important;
}

.task-detail {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.task-detail__block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-detail__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.task-detail__hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: -4px;
}

.task-detail__text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
}

.task-detail__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-detail__content .task-detail__text {
  margin: 0;
}

.task-detail__figure {
  margin: 0;
  max-width: 420px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-elevated);
}

.task-detail__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.task-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-checklist__label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.task-checklist__label input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--color-brand);
  flex-shrink: 0;
}

.task-checklist__label:has(input:checked) span {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.task-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.task-detail__comment {
  padding: 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-detail__comment[hidden] {
  display: none !important;
}

.task-detail__comment-label {
  font-size: 14px;
  font-weight: 600;
}

.task-detail__required {
  color: var(--color-danger);
}

.task-detail__comment-input {
  width: 100%;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-md);
  background: var(--color-input-bg);
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.task-detail__comment-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-soft);
  outline: none;
}

.task-detail__comment-input.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

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

.task-card__time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.task-card__time-range {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.task-card__time-label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.task-card.is-current .task-card__time-label {
  color: var(--color-brand);
  font-weight: 600;
}

.task-card__body {
  min-width: 0;
}

.task-card__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.task-card__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 10px;
}

.task-card__project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.task-card__project svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-brand);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.task-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.task-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.task-status--planned {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.task-status--in_progress {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.task-status--done {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.task-status--cancelled {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.task-card__live-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-brand);
  color: #fff;
}

.task-card__live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: task-pulse 1.4s ease-in-out infinite;
}

.task-card.is-current .task-card__live-badge {
  display: inline-flex;
}

@keyframes task-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@media (max-width: 768px) {
  .task-card__summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .task-card__aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .task-detail__actions {
    flex-direction: column;
  }

  .task-detail__actions .btn {
    width: 100%;
  }
}

.dash-placeholder {
  padding: clamp(40px, 4vw, 64px) clamp(24px, 3vw, 48px);
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  font-size: 15px;
  line-height: 1.6;
}

.dash-placeholder strong {
  display: block;
  color: var(--color-text);
  font-size: clamp(18px, 1.4vw, 22px);
  margin-bottom: 8px;
}

.dash-section.is-block-hidden,
.dash-section.is-tab-hidden {
  display: none !important;
}

.project-page-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.project-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
}

.project-tabs__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.project-tabs__btn:hover {
  color: var(--color-text);
  background: rgba(99, 102, 241, 0.06);
}

.project-tabs__btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.project-tabs__btn.is-active {
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

.project-page-controls .projects-toolbar {
  margin-bottom: 0;
  flex-shrink: 0;
}

.project-sections {
  display: block;
}

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

.project-access-group {
  min-width: 0;
}

.project-access-group__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project-info__value--copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-access__value {
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

.project-access__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.project-access__copy:hover {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
}

.project-access__copy:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.project-access__copy.is-copied {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background: var(--color-brand-soft);
}

.project-access__copy svg {
  display: block;
}

.project-info {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-info__row {
  display: grid;
  grid-template-columns: minmax(200px, 42%) 1fr;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

.project-info__row:nth-child(-n+2) {
  border-top: none;
}

.project-info__row:nth-child(odd) {
  border-right: 1px solid var(--color-border);
}

.project-info__label {
  margin: 0;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg);
  line-height: 1.45;
}

.project-info__value {
  margin: 0;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}

.project-info__link {
  font-weight: 500;
  word-break: break-word;
}

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

.project-info--single .project-info__row:nth-child(odd) {
  border-right: none;
}

.project-info--single .project-info__row:nth-child(-n+2) {
  border-top: 1px solid var(--color-border);
}

.project-info--single .project-info__row:first-child {
  border-top: none;
}

.project-info--team .project-info__value {
  font-weight: 600;
}

.payment-schedule {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.payment-schedule__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.payment-schedule__table thead {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.payment-schedule__table th {
  padding: 12px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.payment-schedule__table td {
  padding: 14px 18px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

.payment-schedule__table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

.payment-schedule__amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.promoted-query__keyword {
  font-weight: 600;
  min-width: 180px;
}

.promoted-query__url {
  max-width: 320px;
}

.promoted-query__url-count {
  color: var(--color-text-muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.payment-schedule__table--queries .project-info__link {
  word-break: break-all;
}

.payment-schedule__table--links {
  min-width: 1220px;
}

.works-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.payment-schedule__table--works {
  min-width: 1100px;
}

.payment-schedule__table--works [data-col].is-col-hidden {
  display: none;
}

.payment-schedule__table--works tbody tr.work-row--overdue {
  background: rgba(239, 68, 68, 0.06);
}

.payment-schedule__table--works tbody tr.work-row--overdue:hover {
  background: rgba(239, 68, 68, 0.1);
}

.payment-schedule__table--works tbody tr.work-row--overdue td:first-child {
  box-shadow: inset 3px 0 0 #ef4444;
}

.work-overdue-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
}

.work-schedule-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.payment-schedule__date {
  white-space: nowrap;
}

.link-purchases-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.link-purchase__platform {
  min-width: 140px;
  font-weight: 600;
}

.link-purchase__url {
  min-width: 220px;
  max-width: 360px;
}

.link-purchase__url .project-info__link {
  word-break: break-all;
}

.link-purchase__anchor {
  min-width: 160px;
  max-width: 240px;
  font-weight: 500;
  line-height: 1.45;
}

.payment-schedule__table--pages .project-page__text {
  min-width: 160px;
  max-width: 260px;
  line-height: 1.45;
}

.payment-schedule__table--pages .project-page__text--wide {
  min-width: 220px;
  max-width: 320px;
}

.payment-schedule__table--pages .project-page__queries {
  min-width: 240px;
  max-width: 360px;
  font-weight: 500;
}

.project-pages-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.project-pages-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.payment-schedule__table--pages {
  min-width: 1280px;
}

.payment-schedule__table--pages [data-col].is-col-hidden {
  display: none;
}

.project-page__actions {
  text-align: right;
  white-space: nowrap;
}

.page-detail-modal__dialog {
  width: min(760px, 100%);
}

.page-detail-modal__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: auto;
}

.page-detail-modal__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 18px 20px;
}

.page-detail-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-detail-modal__field--full {
  grid-column: 1 / -1;
}

.page-detail-modal__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.page-detail-modal__control {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-md);
  background: var(--color-input-bg);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.page-detail-modal__control:focus {
  border-color: var(--color-input-focus);
  box-shadow: 0 0 0 3px var(--color-brand-soft);
  outline: none;
}

textarea.page-detail-modal__control {
  min-height: 88px;
  resize: vertical;
}

.page-detail-modal__hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.page-detail-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.project-page__url {
  min-width: 180px;
  max-width: 240px;
}

.project-page__url .project-info__link {
  word-break: break-all;
}

.payment-schedule__empty {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  color: var(--color-text-muted);
  font-size: 14px;
}

.payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.payment-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.payment-badge--paid {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.payment-badge--paid .payment-badge__dot {
  background: #22c55e;
}

.payment-badge--pending {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.payment-badge--pending .payment-badge__dot {
  background: #f59e0b;
}

.payment-badge--overdue {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.payment-badge--overdue .payment-badge__dot {
  background: #ef4444;
}

.payment-badge--upcoming {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.payment-badge--upcoming .payment-badge__dot {
  background: #94a3b8;
}

.payment-badge--upcoming .payment-badge__dot {
  background: #94a3b8;
}

.payment-schedule__actions {
  text-align: right;
  white-space: nowrap;
}

.payment-schedule__action-muted {
  color: var(--color-text-muted);
}

.report-view-btn {
  font-weight: 600;
}

body.is-modal-open {
  overflow: hidden;
}

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px);
}

.pdf-modal[hidden] {
  display: none !important;
}

.pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.pdf-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  max-height: calc(100vh - 32px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.pdf-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.pdf-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pdf-modal__close svg {
  display: block;
}

.pdf-modal__body {
  flex: 1;
  min-height: 0;
  background: #525659;
}

.pdf-modal__frame {
  display: block;
  width: 100%;
  height: min(78vh, 820px);
  border: 0;
  background: #fff;
}

.project-agreements {
  padding: 20px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
}

.project-agreements__item {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
}

.project-agreements__item:last-child {
  margin-bottom: 0;
}

.expert-conclusion {
  padding: 20px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
}

.expert-conclusion__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.08);
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 600;
}

.expert-conclusion__badge svg {
  fill: currentColor;
  stroke: none;
  flex-shrink: 0;
}

.expert-conclusion__block + .expert-conclusion__block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.expert-conclusion__subtitle {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.expert-conclusion__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
}

.expert-conclusion__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.expert-conclusion__item {
  position: relative;
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
}

.expert-conclusion__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-brand);
}

.expert-conclusion__item:last-child {
  margin-bottom: 0;
}

.work-gantt {
  --task-width-min: 280px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.work-gantt__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.work-gantt__modes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-gantt__mode.is-active {
  color: var(--color-brand);
  background: var(--color-brand-soft);
}

.work-gantt__nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.work-gantt__period {
  min-width: 180px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.work-gantt__viewport {
  max-height: 560px;
  overflow: auto;
}

.work-gantt__grid {
  width: max-content;
  min-width: 100%;
}

.work-gantt__row {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: max-content;
}

.work-gantt__head-row {
  position: sticky;
  top: 0;
  z-index: 4;
}

.work-gantt__timeline-head {
  display: flex;
  flex: 0 0 auto;
}

.work-gantt__timeline {
  position: relative;
  flex: 0 0 auto;
  min-height: 46px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background-image: linear-gradient(to right, var(--color-border) 1px, transparent 1px);
  background-size: var(--col-width, 64px) 100%;
}

.work-gantt__head-cell {
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.work-gantt__timeline-head .work-gantt__col {
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.work-gantt__task-col,
.work-gantt__task {
  position: sticky;
  left: 0;
  z-index: 2;
  flex: 1 0 var(--task-width-min);
  min-width: var(--task-width-min);
  padding: 12px 16px;
  background: var(--color-bg-elevated);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.work-gantt__head-row .work-gantt__task-col {
  z-index: 5;
  background: var(--color-bg);
}

.work-gantt__task-col {
  z-index: 3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-bg);
}

.work-gantt__task {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.work-gantt__col {
  flex: 0 0 var(--col-width, 64px);
  width: var(--col-width, 64px);
  padding: 10px 6px;
  text-align: center;
}

.work-gantt__col-primary {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

.work-gantt__col-secondary {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.work-gantt__week {
  padding: 10px 8px;
  text-align: center;
}

.work-gantt__week-date {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

.work-gantt__week-month {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.work-gantt__cell {
  min-height: 46px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.work-gantt__cell--bar {
  padding: 11px 0;
}

.work-gantt__bar {
  position: absolute;
  top: 11px;
  height: 24px;
  min-width: 6px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.work-gantt__bar--completed {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.work-gantt__bar--in_progress {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}

.work-gantt__bar--planned {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.work-gantt__bar--cancelled {
  background: linear-gradient(90deg, #f87171, #ef4444);
}

.work-gantt__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.work-gantt__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.work-gantt__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.work-gantt__legend-dot--completed {
  background: #16a34a;
}

.work-gantt__legend-dot--in_progress {
  background: #4f46e5;
}

.work-gantt__legend-dot--planned {
  background: #64748b;
}

@media (max-width: 1100px) {
  .project-page-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .project-tabs {
    width: 100%;
  }

  .project-page-controls .projects-toolbar {
    width: 100%;
    justify-content: flex-end;
  }

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

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

  .project-info__row:nth-child(-n+2) {
    border-top: 1px solid var(--color-border);
  }

  .project-info__row:first-child {
    border-top: none;
  }

  .project-info__row:nth-child(odd) {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .project-info__row {
    grid-template-columns: 1fr;
  }

  .project-info__label {
    padding-bottom: 6px;
  }

  .project-info__value {
    padding-top: 0;
  }
}

@media (max-width: 768px) {
  .dash-header__inner {
    min-height: 56px;
  }

  .dash-page-head {
    margin-bottom: 24px;
  }

  .page-detail-modal__fields {
    grid-template-columns: 1fr;
  }

  .work-gantt__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .work-gantt__nav {
    justify-content: space-between;
  }

  .work-gantt__period {
    min-width: 0;
    flex: 1;
  }
}
